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

Function DrawWarLord

Source/quests.cpp:373–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373void DrawWarLord(int x, int y)
374{
375 int rw, rh;
376 int i, j;
377 BYTE *sp, *setp;
378 int v;
379
380 setp = LoadFileInMem("Levels\\L4Data\\Warlord2.DUN", NULL);
381 rw = *setp;
382 sp = setp + 2;
383 rh = *sp;
384 sp += 2;
385 setpc_w = rw;
386 setpc_h = rh;
387 setpc_x = x;
388 setpc_y = y;
389 for (j = y; j < y + rh; j++) {
390 for (i = x; i < x + rw; i++) {
391 if (*sp != 0) {
392 v = *sp;
393 } else {
394 v = 6;
395 }
396 dungeon[i][j] = v;
397 sp += 2;
398 }
399 }
400 mem_free_dbg(setp);
401}
402
403void DrawSChamber(int q, int x, int y)
404{

Callers 1

DRLG_CheckQuestsFunction · 0.85

Calls 2

LoadFileInMemFunction · 0.85
mem_free_dbgFunction · 0.85

Tested by

no test coverage detected