MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / LoadTransparency

Function LoadTransparency

Source/levels/gendung.cpp:547–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547void LoadTransparency(const uint16_t *dunData)
548{
549 int width = SDL_SwapLE16(dunData[0]);
550 int height = SDL_SwapLE16(dunData[1]);
551
552 int layer2Offset = 2 + width * height;
553
554 // The rest of the layers are at dPiece scale
555 width *= 2;
556 height *= 2;
557
558 const uint16_t *transparentLayer = &dunData[layer2Offset + width * height * 3];
559
560 for (int j = 0; j < height; j++) {
561 for (int i = 0; i < width; i++) {
562 dTransVal[16 + i][16 + j] = SDL_SwapLE16(*transparentLayer);
563 transparentLayer++;
564 }
565 }
566}
567
568void LoadDungeonBase(const char *path, Point spawn, int floorId, int dirtId)
569{

Callers 2

SetMapTransparencyFunction · 0.85
LoadDungeonBaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected