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

Function LoadMapObjs

Source/objects.cpp:573–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573void LoadMapObjs(BYTE *pMap, int startx, int starty)
574{
575 int rw, rh;
576 int i, j;
577 BYTE *lm;
578 long mapoff;
579
580 InitObjFlag = TRUE;
581 lm = pMap;
582 rw = *lm;
583 lm += 2;
584 rh = *lm;
585 mapoff = (rw * rh + 1) * 2;
586 rw <<= 1;
587 rh <<= 1;
588 mapoff += 2 * rw * rh * 2;
589 lm += mapoff;
590
591 for (j = 0; j < rh; j++) {
592 for (i = 0; i < rw; i++) {
593 if (*lm) {
594 AddObject(ObjTypeConv[*lm], startx + 16 + i, starty + 16 + j);
595 }
596 lm += 2;
597 }
598 }
599 InitObjFlag = FALSE;
600}
601
602void AddDiabObjs()
603{

Callers 3

InitObjectsFunction · 0.85
OperatePedistalFunction · 0.85
SyncPedistalFunction · 0.85

Calls 1

AddObjectFunction · 0.85

Tested by

no test coverage detected