Skip to content

Commit 43bd106

Browse files
authored
Updating to 0.16.1b
1 parent 580c8b0 commit 43bd106

26 files changed

+2987
-1719
lines changed

include/chestRando.h

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ namespace mod
4040
u8 areDungeonItemsRandomized = 1;
4141
u8 isTwilightSkipEnabled = 1;
4242
u8 isKeysanityEnabled = 1;
43+
u8 areHeartPiecesRandomized = 1;
44+
u8 areRupeesRandomized = 1;
45+
u8 areAmmoRandomized = 1;
4346

4447
u8 itemThatReplacesHalfMilk = 0;
4548
u8 itemThatReplacesSlingShot = 0;
@@ -69,14 +72,14 @@ namespace mod
6972
*
7073
* excludes hyrule castle since boss doesn't spawn heart container
7174
*/
72-
bool isStageBoss();
73-
74-
/**
75-
* checks if the stage is one of the 5 grotto stages
76-
*/
77-
78-
bool isStageDungeon();
79-
75+
bool isStageBoss();
76+
77+
/**
78+
* checks if the stage is one of the 5 grotto stages
79+
*/
80+
81+
bool isStageDungeon();
82+
8083
bool isStageGrotto();
8184

8285
bool isStageInterior();
@@ -126,20 +129,20 @@ namespace mod
126129
*/
127130
bool isItemBombs(u8 itemID);
128131

129-
/**
130-
* checks if item given is a bottle content without a bottle
131-
*/
132+
/**
133+
* checks if item given is a bottle content without a bottle
134+
*/
132135
bool isItemBottleFill(u8 itemID);
133136

134-
/**
135-
*
136-
* places the key checks correctly
137-
*/
138-
void handleKeysanity();
139-
140-
/**
141-
* check if the check gotten in a grotto is the right one
142-
*/
137+
/**
138+
*
139+
* places the key checks correctly
140+
*/
141+
void handleKeysanity();
142+
143+
/**
144+
* check if the check gotten in a grotto is the right one
145+
*/
143146
bool isGrottoCheckOk(u16 checkID);
144147
};
145148
}

include/customChecks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace mod
3838
/*Sera Bottle*/
3939
{"F_SP103", 0, 1, 0x7C, 0x65, 0x444C8DC3, 0x42AF0000, 0xC4CB2577, 0xA3E7, []() { gameInfo.scratchPad.eventBits[0x12] |= 0x8;/*can shop at Sera's shop*/ gameInfo.scratchPad.eventBits[0x14] |= 0x8;/*Sera Bottle gotten*/ }, []() { return (gameInfo.localAreaNodes.unk_0[0xC] & 0x2) != 0;/*is goats 1 done*/ } },
4040
/*Slingshot*/
41-
{"F_SP103", 0, 0, 0x78, 0x4B, 0xC3EDF8A9, 0x44CD922E, 0x45F31BF5, 0x7881, nullptr /*Flag is set in game_patches to avoid interaction with vanilla check*/, []() { return gameInfo.scratchPad.counters.rupees >= 30 && (gameInfo.localAreaNodes.unk_0[0xC] & 0x2) != 0;/*is goats 1 done*/ } },
41+
{"F_SP103", 0, 0, 0x78, 0x4B, 0xC3EDF8A9, 0x44CD922E, 0x45F31BF5, 0x7881, nullptr /*Flag is set in game_patches to avoid interaction with vanilla check*/, []() { return (gameInfo.localAreaNodes.unk_0[0xC] & 0x2) != 0;/*is goats 1 done*/ } },
4242
/*Lantern*/
4343
{"F_SP108", 0xFF, 1, 0xF8, 0x48, 0xC66D4C1B, 0x41C19A25, 0xC65D2696, 0x36EC, nullptr, []() { return true; } },
4444
/*Zora Armor*/

include/defines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ union typeTransform {
3434
};
3535

3636
// Array modification
37-
#define MAX_LOAD_EVENTS 20 // eventListener
37+
#define MAX_LOAD_EVENTS 40 // eventListener
3838
#define MAX_HUDCONSOLE_PAGES 12 // HUDConsole
3939

4040
// Mnemonics
4141
#define AUTHOR "ZTPR"
42-
#define VERSION "v0.16b"
42+
#define VERSION "v0.16.1b"
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: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ namespace mod::game_patch
4747
*/
4848
void removeIBLimit();
4949

50+
5051
/**
5152
* Changes the max rupee amounts for each
5253
* of the wallets
@@ -189,5 +190,39 @@ namespace mod::game_patch
189190
*/
190191
void skipMDH();
191192

193+
/**
194+
* unset the story flag and boss flag when re-entering a dungeon
195+
*/
192196
void setLanternFlag();
197+
198+
void breakBarrier();
199+
200+
/**
201+
* unset the story flag and boss flag when re-entering a dungeon
202+
*/
203+
void fixFTState();
204+
void fixGMState();
205+
void fixLBTState();
206+
void fixAGState();
207+
void fixSPRState();
208+
void fixToTState();
209+
void fixCiTSState();
210+
211+
/**
212+
* reset the flags for a dungeon if it has been beaten or if a skip is active
213+
*/
214+
void setFTDungeonFlag();
215+
void setFTBossFlag();
216+
void setGMDungeonFlag();
217+
void setGMBossFlag();
218+
void setLakeDungeonFlags();
219+
void setLBTBossFlag();
220+
void setAGDungeonFlag();
221+
void setAGBossFlag();
222+
void setSPRDungeonFlag();
223+
void setSPRBossFlag();
224+
void setToTDungeonFlag();
225+
void setToTBossFlag();
226+
void setCiTSDungeonFlag();
227+
void setCiTSBossFlag();
193228
}

include/item.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace mod::item
3838
Coral_Earring = 0b000000000000000010000,//0x3D
3939
Wooden_Sword = 0b000000000000000001000,//0x3F
4040
Ordon_Sword = 0b000000000000000000100,//0x28
41-
Master_Sword = 0b000000000000000000010,//0x29 locked not randomized yet (implies transformation too)
41+
Shadow_Crystal = 0b000000000000000000010,//0x32
4242
Shield = 0b000000000000000000001,//0x2C
4343
};
4444

@@ -78,8 +78,9 @@ namespace mod::item
7878
ItemCheck* destination;
7979
};
8080

81-
/**
82-
* Contains the values for the flags to be set to skip the animations of first getting specific items
83-
*/
81+
/**
82+
* Contains the values for the flags to be set to skip the animations of first getting specific items
83+
*/
8484
extern u8 itemGetAnimationFlags[10];
85+
extern u8 itemsWithNoFieldModel[2];
8586
}

include/mod.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "eventListener.h"
88
#include "chestRando.h"
99
#include "HUDConsole.h"
10+
#include <string>
1011

1112
namespace mod
1213
{
@@ -124,6 +125,7 @@ namespace mod
124125
u8 bombBag1Ammo;
125126
u8 bombBag2Ammo;
126127
u8 bombBag3Ammo;
128+
u8 lastGoodSpawn;
127129

128130
u8 yetaTrickOn = 0;
129131

@@ -133,6 +135,15 @@ namespace mod
133135
u8 eventFlagToEdit = 0;
134136
u8 newValueForEventFlag = 0;
135137
u8 triggerEventFlagEdit = 0;
138+
u8 innerRed = 0x50;
139+
u8 innerGreen = 0x28;
140+
u8 innerBlue = 0x14;
141+
u8 outerRed = 0x28;
142+
u8 outerGreen = 0x1E;
143+
u8 outerBlue = 0x0A;
144+
145+
char itemName[10];
146+
//u8 newItemId;
136147

137148
// Functions
138149
private:
@@ -155,6 +166,10 @@ namespace mod
155166

156167
void procItem_func_UTUWA_HEART();
157168

169+
bool canQuickTransform();
170+
171+
bool canChangeToD();
172+
158173
/**
159174
* gives the unlocked scent that can be seen in the current area (defaults to most advanced one obtained)
160175
*/
@@ -202,7 +217,13 @@ namespace mod
202217
*/
203218
void doCustomTRESActor(void* mStatus_roomControl);
204219

220+
void changeLanternColor();
221+
222+
void fixFTTotemMonkey();
223+
224+
//void setFieldModels();
205225

226+
//bool procActorCommonLayerInit(void* mStatus_roomControl, tp::d_stage::dzxChunkTypeInfo* chunkTypeInfo, s32 unk3, void* unk4);
206227
// Private members
207228
//private:
208229

include/singleton.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ namespace mod
3131
u8 diababaMusicFixed;
3232
u8 midnaTimeControl;
3333
u8 hasActorCommonLayerRan;
34+
u8 isEarlyToTEnabled;
35+
u8 isEarlyPoTEnabled;
36+
u8 isGMStoryPatch;
37+
u8 isEarlyHCEnabled;
38+
u8 startWithCrystal;
39+
40+
//dungeon flags
41+
u8 hasFTBeenBeaten;
42+
u8 hasGMBeenBeaten;
43+
u8 hasLBTBeenBeaten;
44+
u8 hasAGBeenBeaten;
45+
u8 hasSPRBeenBeaten;
46+
u8 hasToTBeenBeaten;
47+
u8 hasCiTSBeenBeaten;
48+
u8 hasCiTSOoccoo;
3449

3550
private:
3651

include/stage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ namespace mod::stage
1212
extern const char* caveStages[6];
1313
extern const char* interiorStages[8];
1414
extern const char* specialStages[3];
15-
extern const char* timeOfDayStages[19];
15+
extern const char* timeOfDayStages[18];
1616
}

0 commit comments

Comments
 (0)