MCPcopy Create free account
hub / github.com/diasurgical/devilution / DRLG_SetMapTrans

Function DRLG_SetMapTrans

Source/setmaps.cpp:106–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void DRLG_SetMapTrans(char *sFileName)
107{
108 int x, y;
109 int i, j;
110 BYTE *pLevelMap;
111 BYTE *d;
112 DWORD dwOffset;
113
114 pLevelMap = LoadFileInMem(sFileName, NULL);
115 d = pLevelMap + 2;
116 x = pLevelMap[0];
117 y = *d;
118 dwOffset = (x * y + 1) * 2;
119 x <<= 1;
120 y <<= 1;
121 dwOffset += 3 * x * y * 2;
122 d += dwOffset;
123
124 for (j = 0; j < y; j++) {
125 for (i = 0; i < x; i++) {
126 dTransVal[16 + i][16 + j] = *d;
127 d += 2;
128 }
129 }
130 mem_free_dbg(pLevelMap);
131}
132
133void LoadSetMap()
134{

Callers 1

LoadSetMapFunction · 0.85

Calls 2

LoadFileInMemFunction · 0.85
mem_free_dbgFunction · 0.85

Tested by

no test coverage detected