Skip to content

Commit

Permalink
Updating to 0.16.1b
Browse files Browse the repository at this point in the history
  • Loading branch information
lunarsoap5 authored Jul 18, 2020
1 parent 580c8b0 commit 43bd106
Show file tree
Hide file tree
Showing 26 changed files with 2,987 additions and 1,719 deletions.
43 changes: 23 additions & 20 deletions include/chestRando.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ namespace mod
u8 areDungeonItemsRandomized = 1;
u8 isTwilightSkipEnabled = 1;
u8 isKeysanityEnabled = 1;
u8 areHeartPiecesRandomized = 1;
u8 areRupeesRandomized = 1;
u8 areAmmoRandomized = 1;

u8 itemThatReplacesHalfMilk = 0;
u8 itemThatReplacesSlingShot = 0;
Expand Down Expand Up @@ -69,14 +72,14 @@ namespace mod
*
* excludes hyrule castle since boss doesn't spawn heart container
*/
bool isStageBoss();

/**
* checks if the stage is one of the 5 grotto stages
*/

bool isStageDungeon();

bool isStageBoss();

/**
* checks if the stage is one of the 5 grotto stages
*/

bool isStageDungeon();

bool isStageGrotto();

bool isStageInterior();
Expand Down Expand Up @@ -126,20 +129,20 @@ namespace mod
*/
bool isItemBombs(u8 itemID);

/**
* checks if item given is a bottle content without a bottle
*/
/**
* checks if item given is a bottle content without a bottle
*/
bool isItemBottleFill(u8 itemID);

/**
*
* places the key checks correctly
*/
void handleKeysanity();

/**
* check if the check gotten in a grotto is the right one
*/
/**
*
* places the key checks correctly
*/
void handleKeysanity();

/**
* check if the check gotten in a grotto is the right one
*/
bool isGrottoCheckOk(u16 checkID);
};
}
2 changes: 1 addition & 1 deletion include/customChecks.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace mod
/*Sera Bottle*/
{"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*/ } },
/*Slingshot*/
{"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*/ } },
{"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*/ } },
/*Lantern*/
{"F_SP108", 0xFF, 1, 0xF8, 0x48, 0xC66D4C1B, 0x41C19A25, 0xC65D2696, 0x36EC, nullptr, []() { return true; } },
/*Zora Armor*/
Expand Down
4 changes: 2 additions & 2 deletions include/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ union typeTransform {
};

// Array modification
#define MAX_LOAD_EVENTS 20 // eventListener
#define MAX_LOAD_EVENTS 40 // eventListener
#define MAX_HUDCONSOLE_PAGES 12 // HUDConsole

// Mnemonics
#define AUTHOR "ZTPR"
#define VERSION "v0.16b"
#define VERSION "v0.16.1b"
#define RAND_SEED mod::tools::randomSeed
#define gameInfo tp::d_com_inf_game::dComIfG_gameInfo
#define getPlayerPos tp::d_map_path_dmap::getMapPlayerPos
Expand Down
35 changes: 35 additions & 0 deletions include/game_patches.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ namespace mod::game_patch
*/
void removeIBLimit();


/**
* Changes the max rupee amounts for each
* of the wallets
Expand Down Expand Up @@ -189,5 +190,39 @@ namespace mod::game_patch
*/
void skipMDH();

/**
* unset the story flag and boss flag when re-entering a dungeon
*/
void setLanternFlag();

void breakBarrier();

/**
* unset the story flag and boss flag when re-entering a dungeon
*/
void fixFTState();
void fixGMState();
void fixLBTState();
void fixAGState();
void fixSPRState();
void fixToTState();
void fixCiTSState();

/**
* reset the flags for a dungeon if it has been beaten or if a skip is active
*/
void setFTDungeonFlag();
void setFTBossFlag();
void setGMDungeonFlag();
void setGMBossFlag();
void setLakeDungeonFlags();
void setLBTBossFlag();
void setAGDungeonFlag();
void setAGBossFlag();
void setSPRDungeonFlag();
void setSPRBossFlag();
void setToTDungeonFlag();
void setToTBossFlag();
void setCiTSDungeonFlag();
void setCiTSBossFlag();
}
9 changes: 5 additions & 4 deletions include/item.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace mod::item
Coral_Earring = 0b000000000000000010000,//0x3D
Wooden_Sword = 0b000000000000000001000,//0x3F
Ordon_Sword = 0b000000000000000000100,//0x28
Master_Sword = 0b000000000000000000010,//0x29 locked not randomized yet (implies transformation too)
Shadow_Crystal = 0b000000000000000000010,//0x32
Shield = 0b000000000000000000001,//0x2C
};

Expand Down Expand Up @@ -78,8 +78,9 @@ namespace mod::item
ItemCheck* destination;
};

/**
* Contains the values for the flags to be set to skip the animations of first getting specific items
*/
/**
* Contains the values for the flags to be set to skip the animations of first getting specific items
*/
extern u8 itemGetAnimationFlags[10];
extern u8 itemsWithNoFieldModel[2];
}
21 changes: 21 additions & 0 deletions include/mod.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "eventListener.h"
#include "chestRando.h"
#include "HUDConsole.h"
#include <string>

namespace mod
{
Expand Down Expand Up @@ -124,6 +125,7 @@ namespace mod
u8 bombBag1Ammo;
u8 bombBag2Ammo;
u8 bombBag3Ammo;
u8 lastGoodSpawn;

u8 yetaTrickOn = 0;

Expand All @@ -133,6 +135,15 @@ namespace mod
u8 eventFlagToEdit = 0;
u8 newValueForEventFlag = 0;
u8 triggerEventFlagEdit = 0;
u8 innerRed = 0x50;
u8 innerGreen = 0x28;
u8 innerBlue = 0x14;
u8 outerRed = 0x28;
u8 outerGreen = 0x1E;
u8 outerBlue = 0x0A;

char itemName[10];
//u8 newItemId;

// Functions
private:
Expand All @@ -155,6 +166,10 @@ namespace mod

void procItem_func_UTUWA_HEART();

bool canQuickTransform();

bool canChangeToD();

/**
* gives the unlocked scent that can be seen in the current area (defaults to most advanced one obtained)
*/
Expand Down Expand Up @@ -202,7 +217,13 @@ namespace mod
*/
void doCustomTRESActor(void* mStatus_roomControl);

void changeLanternColor();

void fixFTTotemMonkey();

//void setFieldModels();

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

Expand Down
15 changes: 15 additions & 0 deletions include/singleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ namespace mod
u8 diababaMusicFixed;
u8 midnaTimeControl;
u8 hasActorCommonLayerRan;
u8 isEarlyToTEnabled;
u8 isEarlyPoTEnabled;
u8 isGMStoryPatch;
u8 isEarlyHCEnabled;
u8 startWithCrystal;

//dungeon flags
u8 hasFTBeenBeaten;
u8 hasGMBeenBeaten;
u8 hasLBTBeenBeaten;
u8 hasAGBeenBeaten;
u8 hasSPRBeenBeaten;
u8 hasToTBeenBeaten;
u8 hasCiTSBeenBeaten;
u8 hasCiTSOoccoo;

private:

Expand Down
2 changes: 1 addition & 1 deletion include/stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ namespace mod::stage
extern const char* caveStages[6];
extern const char* interiorStages[8];
extern const char* specialStages[3];
extern const char* timeOfDayStages[19];
extern const char* timeOfDayStages[18];
}
Loading

0 comments on commit 43bd106

Please sign in to comment.