| 1022 | } |
| 1023 | |
| 1024 | void SetMapMonsters(BYTE *pMap, int startx, int starty) |
| 1025 | { |
| 1026 | WORD rw, rh; |
| 1027 | WORD *lm; |
| 1028 | int i, j; |
| 1029 | int mtype; |
| 1030 | |
| 1031 | AddMonsterType(MT_GOLEM, 2); |
| 1032 | AddMonster(1, 0, 0, 0, FALSE); |
| 1033 | AddMonster(1, 0, 0, 0, FALSE); |
| 1034 | AddMonster(1, 0, 0, 0, FALSE); |
| 1035 | AddMonster(1, 0, 0, 0, FALSE); |
| 1036 | if (setlevel && setlvlnum == SL_VILEBETRAYER) { |
| 1037 | AddMonsterType(UniqMonst[UMT_LAZURUS].mtype, 4); |
| 1038 | AddMonsterType(UniqMonst[UMT_RED_VEX].mtype, 4); |
| 1039 | AddMonsterType(UniqMonst[UMT_BLACKJADE].mtype, 4); |
| 1040 | PlaceUniqueMonst(UMT_LAZURUS, 0, 0); |
| 1041 | PlaceUniqueMonst(UMT_RED_VEX, 0, 0); |
| 1042 | PlaceUniqueMonst(UMT_BLACKJADE, 0, 0); |
| 1043 | } |
| 1044 | lm = (WORD *)pMap; |
| 1045 | rw = SDL_SwapLE16(*lm); |
| 1046 | lm++; |
| 1047 | rh = SDL_SwapLE16(*lm); |
| 1048 | lm += (rw * rh + 1); |
| 1049 | rw = rw << 1; |
| 1050 | rh = rh << 1; |
| 1051 | lm += rw * rh; |
| 1052 | |
| 1053 | for (j = 0; j < rh; j++) { |
| 1054 | for (i = 0; i < rw; i++) { |
| 1055 | if (*lm) { |
| 1056 | mtype = AddMonsterType(MonstConvTbl[SDL_SwapLE16(*lm) - 1], 2); |
| 1057 | PlaceMonster(nummonsters++, mtype, i + startx + 16, j + starty + 16); |
| 1058 | } |
| 1059 | lm++; |
| 1060 | } |
| 1061 | } |
| 1062 | } |
| 1063 | #endif |
| 1064 | |
| 1065 | void DeleteMonster(int i) |
no test coverage detected