| 741 | } |
| 742 | |
| 743 | void InitObjects() |
| 744 | { |
| 745 | int sp_id; |
| 746 | BYTE *mem; |
| 747 | |
| 748 | ClrAllObjects(); |
| 749 | if (currlevel == 16) { |
| 750 | AddDiabObjs(); |
| 751 | } else { |
| 752 | InitObjFlag = TRUE; |
| 753 | GetRndSeed(); |
| 754 | if (currlevel == 9 && gbMaxPlayers == 1) |
| 755 | AddSlainHero(); |
| 756 | if (currlevel == quests[QTYPE_BLKM]._qlevel && quests[QTYPE_BLKM]._qactive == 1) |
| 757 | AddMushPatch(); |
| 758 | if (currlevel == 4) |
| 759 | AddStoryBooks(); |
| 760 | if (currlevel == 8) |
| 761 | AddStoryBooks(); |
| 762 | if (currlevel == 12) |
| 763 | AddStoryBooks(); |
| 764 | if (leveltype == DTYPE_CATHEDRAL) { |
| 765 | if (QuestStatus(QTYPE_BUTCH)) |
| 766 | AddTortures(); |
| 767 | if (QuestStatus(QTYPE_PW)) |
| 768 | AddCandles(); |
| 769 | if (QuestStatus(QTYPE_BOL)) |
| 770 | AddObject(OBJ_SIGNCHEST, 2 * setpc_x + 26, 2 * setpc_y + 19); |
| 771 | InitRndLocBigObj(10, 15, OBJ_SARC); |
| 772 | AddL1Objs(0, 0, MAXDUNX, MAXDUNY); |
| 773 | InitRndBarrels(); |
| 774 | } |
| 775 | if (leveltype == DTYPE_CATACOMBS) { |
| 776 | if (QuestStatus(QTYPE_INFRA)) |
| 777 | InitRndLocObj5x5(1, 1, OBJ_STAND); |
| 778 | if (QuestStatus(QTYPE_BONE)) |
| 779 | InitRndLocObj5x5(1, 1, OBJ_BOOK2R); |
| 780 | AddL2Objs(0, 0, MAXDUNX, MAXDUNY); |
| 781 | AddL2Torches(); |
| 782 | if (QuestStatus(QTYPE_BLIND)) { |
| 783 | if (plr[myplr]._pClass == PC_WARRIOR) { |
| 784 | sp_id = QUEST_BLINDING; |
| 785 | } else if (plr[myplr]._pClass == PC_ROGUE) { |
| 786 | sp_id = QUEST_RBLINDING; |
| 787 | } else if (plr[myplr]._pClass == PC_SORCERER) { |
| 788 | sp_id = QUEST_MBLINDING; |
| 789 | } |
| 790 | quests[QTYPE_BLIND]._qmsg = sp_id; |
| 791 | AddBookLever(0, 0, MAXDUNX, MAXDUNY, setpc_x, setpc_y, setpc_w + setpc_x + 1, setpc_h + setpc_y + 1, sp_id); |
| 792 | mem = LoadFileInMem("Levels\\L2Data\\Blind2.DUN", NULL); |
| 793 | LoadMapObjs(mem, 2 * setpc_x, 2 * setpc_y); |
| 794 | mem_free_dbg(mem); |
| 795 | } |
| 796 | if (QuestStatus(QTYPE_BLOOD)) { |
| 797 | if (plr[myplr]._pClass == PC_WARRIOR) { |
| 798 | sp_id = QUEST_BLOODY; |
| 799 | } else if (plr[myplr]._pClass == PC_ROGUE) { |
| 800 | sp_id = QUEST_RBLOODY; |
no test coverage detected