| 541 | } |
| 542 | |
| 543 | void LoadMapObjects(BYTE *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx) |
| 544 | { |
| 545 | int rw, rh, i, j, oi; |
| 546 | BYTE *lm; |
| 547 | long mapoff; |
| 548 | |
| 549 | InitObjFlag = TRUE; |
| 550 | |
| 551 | lm = pMap + 2; |
| 552 | rw = pMap[0]; |
| 553 | rh = *lm; |
| 554 | mapoff = (rw * rh + 1) * 2; |
| 555 | rw <<= 1; |
| 556 | rh <<= 1; |
| 557 | mapoff += rw * 2 * rh * 2; |
| 558 | lm += mapoff; |
| 559 | |
| 560 | for (j = 0; j < rh; j++) { |
| 561 | for (i = 0; i < rw; i++) { |
| 562 | if (*lm) { |
| 563 | AddObject(ObjTypeConv[*lm], startx + 16 + i, starty + 16 + j); |
| 564 | oi = ObjIndex(startx + 16 + i, starty + 16 + j); |
| 565 | SetObjMapRange(oi, x1, y1, x1 + w, y1 + h, leveridx); |
| 566 | } |
| 567 | lm += 2; |
| 568 | } |
| 569 | } |
| 570 | InitObjFlag = FALSE; |
| 571 | } |
| 572 | |
| 573 | void LoadMapObjs(BYTE *pMap, int startx, int starty) |
| 574 | { |
no test coverage detected