Skip to content

Commit 67765f7

Browse files
authored
update to 0.16b
1 parent c240c41 commit 67765f7

20 files changed

+407
-112
lines changed

include/chestRando.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,19 @@ namespace mod
7474
/**
7575
* checks if the stage is one of the 5 grotto stages
7676
*/
77+
78+
bool isStageDungeon();
79+
7780
bool isStageGrotto();
7881

82+
bool isStageInterior();
83+
84+
bool isStageCave();
85+
86+
bool isStageSpecial();
87+
88+
bool isStageTOD();
89+
7990

8091
private:
8192
/**

include/customChecks.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ namespace mod
3030
{
3131
customCheck customChecks[37] = {
3232
/*Ordon Shield*/
33-
{"F_SP103", 0, 0, 0x74, 0x2A, 0x456C12A0, 0x43390000, 0x44405C5E, 0x5FA0, []() { gameInfo.localAreaNodes.unk_0[0x8] |= 0x1;/*remove ordon shield*/ }, []() { return (gameInfo.scratchPad.eventBits[0x5] & 0x7A) != 0;/*have sewers been done*/ } },
33+
{"F_SP103", 0, 0, 0x74, 0x2A, 0x456C12A0, 0x43390000, 0x44405C5E, 0x5FA0, []() { gameInfo.localAreaNodes.unk_0[0x8] |= 0x4;/*remove ordon shield*/ }, []() { return (gameInfo.scratchPad.eventBits[0x5] & 0x7A) != 0;/*have sewers been done*/ } },
3434
/*Ordon Sword*/
35-
{"R_SP01", 4, 0, 0x70, 0x28, 0x439D0602, 0x0, 0xC26ABE99, 0xCC7D, []() { gameInfo.localAreaNodes.unk_0[0x8] |= 0x4;/*remove ordon sword*/ }, []() { return (gameInfo.scratchPad.eventBits[0x5] & 0x7A) != 0;/*have sewers been done*/ } },
35+
{"R_SP01", 4, 0, 0x70, 0x28, 0x439D0602, 0x0, 0xC26ABE99, 0xCC7D, []() { gameInfo.localAreaNodes.unk_0[0x8] |= 0x1;/*got ordon sword*/ gameInfo.localAreaNodes.unk_0[0x1B] |= 0x8;/*remove ordon sword*/ }, []() { return (gameInfo.scratchPad.eventBits[0x5] & 0x7A) != 0;/*have sewers been done*/ } },
3636
/*Fishing rod*/
3737
{"F_SP103", 0, 1, 0x68, 0x4A, 0xC3FEB5F1, 0x42960000, 0x4514FB40, 0x883A, []() { gameInfo.scratchPad.eventBits[0x3] |= 0x5;/*brought Cradle to Uli and got fishing rod*/ gameInfo.scratchPad.eventBits[0x46] |= 0x1;/*took cradle from monkey*/ }, []() { return (gameInfo.localAreaNodes.unk_0[0xC] & 0x2) != 0;/*is goats 1 done*/ } },
3838
/*Sera Bottle*/
@@ -56,7 +56,7 @@ namespace mod
5656
/*Wooden Statue*/
5757
{"F_SP122", 16, 1, 0x68, 0x82, 0xC7493734, 0xC5C3E9D7, 0x46F956C6, 0x7FE1, []() { gameInfo.scratchPad.eventBits[0x22] |= 0x80;/*Got Wooden Statue from wolves*/ }, []() { return tools::checkItemFlag(ItemFlags::Medicine_Scent); } },
5858
/*Ilia's Charm*/
59-
{"F_SP128", 0, 1, 0x64, 0x83, 0x44F7650C, 0x42D20705, 0xC4A1A68B, 0x4226, nullptr /*Flag is set in game_patches to avoid interaction with vanilla check*/, []() { return (gameInfo.localAreaNodes.unk_0[0x9] & 0x2) != 0; /*All Bublins dead in HV*/ } },
59+
{"F_SP128", 0, 1, 0x64, 0x83, 0x44F7650C, 0x42D20705, 0xC4A1A68B, 0x4226, nullptr /*Flag is set in game_patches to avoid interaction with vanilla check*/, []() { return true; } },
6060
/*Horse Call*/
6161
{"R_SP109", 0, 1, 0x74, 0x84, 0x43CDBCA1, 0x0, 0xC31EEBF3, 0xBDBE, []() { gameInfo.scratchPad.eventBits[0x23] |= 0x20;/*Got horse call from Illia*/ }, []() { return tools::checkItemFlag(ItemFlags::Ilias_Charm); } },
6262
/*Fishing Hole Bottle*/
@@ -66,17 +66,17 @@ namespace mod
6666
/*Gate Keys*/
6767
{"F_SP121", 0xFF, 1, 0x7C, 0xF3, 0xC781DFDB, 0xC607B38E, 0x47897B50, 0xC0C9, nullptr, []() { return (gameInfo.scratchPad.eventBits[0x8] & 0x40) != 0;/*was escort started*/ } },
6868
/*Camp Key*/
69-
{"F_SP118", 1, 0, 0x7C, 0x20, 0x457F816B, 0x43820000, 0xC572F680, 0x0000, nullptr, []() { return true; } },
69+
{"F_SP118", 1, 0, 0x7C, 0x20, 0x457F816B, 0x43820000, 0xC572F680, 0x0000, []() { gameInfo.localAreaNodes.unk_0[0x4] |= 0x80;/*get camp key*/ }, []() { return true; } },
7070
/*Jovani Poe*/
71-
{"R_SP160", 5, 0, 0x7C, 0xE0, 0x45906531, 0xC2960000, 0x45229AEB, 0xC3C9, []() { gameInfo.localAreaNodes.unk_0[0x8] |= 0x80;/*killed poe*/ gameInfo.localAreaNodes.unk_0[0xF] |= 0x7;/*cs + open path to sewers*/ }, []() { return true; } },
71+
{"R_SP160", 5, 0, 0x7C, 0xE0, 0x45906531, 0xC2960000, 0x45229AEB, 0xC3C9, []() { gameInfo.localAreaNodes.unk_0[0x8] |= 0x80;/*killed poe*/ gameInfo.localAreaNodes.unk_0[0xF] |= 0x7;/*cs + open path to sewers*/ gameInfo.localAreaNodes.unk_0[0x17] |= 0x8; /*Gengle Free*/}, []() { return true; } },
7272
/*Shadow Crystal*/
7373
{"F_SP117", 1, 0, 0x7C, 0x32, 0xC36EB7DC, 0x44CB2000, 0xC5964574, 0x0000, []() { gameInfo.scratchPad.eventBits[0x10] |= 0x20;/*got master sword cs*/ }, []() { return true; } },
7474
/*Master Sword*/
7575
{"F_SP117", 1, 2, 0x78, 0x29, 0x4372ACFB, 0x44CB2000, 0xC5991A55, 0x0000, []() { gameInfo.scratchPad.eventBits[0x10] |= 0x20;/*got master sword cs*/ }, []() { return true; } },
7676
/*Powered Dominion Rod*/
7777
{"R_SP209", 7, 1, 0x70, 0x4C, 0xC3DB30E9, 0xC4408000, 0xC523C471, 0x3CF0, nullptr, []() { return tools::checkItemFlag(ItemFlags::Ancient_Sky_Book_empty); } },
7878
/*Light Master Sword*/
79-
{"F_SP125", 4, 1, 0x7C, 0x49, 0x44E0DBF7, 0x45898B09, 0xC6A4AAFA, 0x7DBC, nullptr, []() { return ((((gameInfo.scratchPad.eventBits[0x43] & 0x2) != 0) && ((gameInfo.scratchPad.eventBits[0x45] & 0x80) != 0)) || ((gameInfo.scratchPad.eventBits[0x44] & 0x28) != 0));/*both sols placed*/ } },
79+
{"F_SP125", 4, 1, 0x74, 0x49, 0x44E0DBF7, 0x45898B09, 0xC6A4AAFA, 0x7DBC, nullptr, []() { return ((gameInfo.scratchPad.eventBits[0x26] & 0x40) != 0) && (gameInfo.scratchPad.eventBits[0x26] & 0x20) != 0;/*both sols outside of Palace*/ } },
8080
/*Ending Blow*/
8181
{"F_SP108", 6, 2, 0xF0, 0xE1, 0xC71A5B41, 0x44898000, 0xC6E08544, 0x0000, nullptr, []() { return gameInfo.scratchPad.clearedTwilights.Faron == 0b1; } },
8282
/*Shield Bash*/
@@ -94,7 +94,7 @@ namespace mod
9494
/*Youth's Scent*/
9595
{"F_SP121", 0xFF, 0, 0x70, 0xB4, 0xC681A76B, 0xC5C99000, 0x4783ED29, 0xA6A9, []() { gameInfo.scratchPad.eventBits[0x22] |= 0x40;/*Got Youth's scent*/ gameInfo.localAreaNodes.unk_0[0x16] |= 0x4;/*Midna text after getting Youth's scent*/ gameInfo.localAreaNodes.unk_0[0x17] |= 0x40;/*got youth's scent cs*/ }, []() { return true; } },
9696
/*Ilia's Scent*/
97-
{"F_SP121", 0xFF, 0, 0x6C, 0xB0, 0xC5DD1EF2, 0x4529ED9A, 0xC73F5AD1, 0x71A6, nullptr, []() { return true; } },
97+
{"F_SP121", 0xFF, 0, 0x6C, 0xB0, 0xC5DD1EF2, 0x4529ED9A, 0xC73F5AD1, 0x71A6, []() { gameInfo.scratchPad.eventBits[0x22] |= 0x20;/*Got Ilia's scent*/ gameInfo.localAreaNodes.unk_0[0x16] |= 0x20;/*Midna text after getting Ilia's scent*/ gameInfo.localAreaNodes.unk_0[0x17] |= 0x80;/*got Ilia's scent cs*/ }, []() { return true; } },
9898
/*Poe Scent*/
9999
{"D_MN10", 0xFF, 0, 0x3C, 0xB2, 0xC1571A39, 0xC1200000, 0x4355109A, 0x0000, nullptr, []() { return true; } },
100100
/*Reekfish Scent*/

include/defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ union typeTransform {
3939

4040
// Mnemonics
4141
#define AUTHOR "ZTPR"
42-
#define VERSION "v0.15.2a"
42+
#define VERSION "v0.16b"
4343
#define RAND_SEED mod::tools::randomSeed
4444
#define gameInfo tp::d_com_inf_game::dComIfG_gameInfo
4545
#define getPlayerPos tp::d_map_path_dmap::getMapPlayerPos

include/game_patches.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ namespace mod::game_patch
150150
/**
151151
* give boss key to all dungeons
152152
*/
153-
void unlockBossDoors();
153+
void checkBossKeysey();
154154

155155
/**
156156
* check wether to show hawkeye and hylian shield in malo mart
@@ -175,5 +175,19 @@ namespace mod::game_patch
175175
/**
176176
* skips the zant CS for MDH
177177
*/
178+
void skipMDHCS();
179+
180+
void fixFTBossMusic();
181+
182+
/**
183+
* won't allow you to leave the forest if Faron escape is disabled until you beat Diababa
184+
*/
185+
void allowFaronEscape();
186+
187+
/**
188+
* set MDH skip after Lanayru Twilight
189+
*/
178190
void skipMDH();
191+
192+
void setLanternFlag();
179193
}

include/item.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ namespace mod::item
5757
Bug = 10,
5858
PoeSoul = 11,
5959
Shop = 12,
60-
Skill = 13
60+
Skill = 13,
61+
Scent = 14
6162
};
6263

6364
/**

include/itemChecks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
namespace mod::item
77
{
8-
extern ItemCheck checks[503];
8+
extern ItemCheck checks[505];
99
extern u16 checkPriorityOrder[24];
1010
}

include/mod.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ namespace mod
130130
u8 LBTBossDoorTrickOn = 0;
131131
u8 nbLBTKeys = 0;
132132

133-
133+
u8 eventFlagToEdit = 0;
134+
u8 newValueForEventFlag = 0;
135+
u8 triggerEventFlagEdit = 0;
136+
134137
// Functions
135138
private:
136139
/**
@@ -218,7 +221,9 @@ namespace mod
218221

219222
void (*item_func_UTUWA_HEART_trampoline)() = nullptr;
220223

221-
void(*actorCommonLayerInit_trampoline)(void* mStatus_roomControl, tp::d_stage::dzxChunkTypeInfo* chunkTypeInfo, int unk3, void* unk4) = nullptr;
224+
bool (*actorCommonLayerInit_trampoline)(void* mStatus_roomControl, tp::d_stage::dzxChunkTypeInfo* chunkTypeInfo, int unk3, void* unk4) = nullptr;
225+
226+
void (*putSave_trampoline)(tp::d_com_inf_game::GameInfo* gameInfoPtr, s32 areaID) = nullptr;
222227

223228
// Item functions
224229
s32 (*createItemForPresentDemo_trampoline)(const float pos[3], s32 item, u8 unk3, s32 unk4, s32 unk5, const float unk6[3], const float unk7[3]) = nullptr;

include/singleton.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ namespace mod
2828
u8 shuffledSkybook;
2929
u8 isIntroSkipped;
3030
u8 isTwilightSkipped;
31+
u8 diababaMusicFixed;
32+
u8 midnaTimeControl;
33+
u8 hasActorCommonLayerRan;
3134

3235
private:
3336

include/stage.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ namespace mod::stage
99
extern const char* bossStages[8];
1010
extern const char* shopStages[8];
1111
extern const char* grottoStages[5];
12+
extern const char* caveStages[6];
13+
extern const char* interiorStages[8];
14+
extern const char* specialStages[3];
15+
extern const char* timeOfDayStages[19];
1216
}

include/tp.eu.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
/ d_stage.o
1717
80025914:actorCommonLayerInit
18+
80025AE0:actorInit
1819
// data
1920
803F8034:mStatus_roomControl
2021

0 commit comments

Comments
 (0)