Merge pull request #1104 from briaguya-ai/rachael-to-zhora

rachael -> zhora
This commit is contained in:
Kenix3 2022-08-08 21:53:04 -04:00 committed by GitHub
commit b924831eba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 101 additions and 78 deletions

View File

@ -25,7 +25,7 @@ typedef struct {
/* 0x0C */ Vec3f position; /* 0x0C */ Vec3f position;
/* 0x18 */ Vec3s unkVelocity; /* 0x18 */ Vec3s unkVelocity;
/* 0x1E */ Vec3s unkPosition; /* 0x1E */ Vec3s unkPosition;
/* 0x24 */ s32 epoch; /* 0x24 */ u32 epoch;
} EffectSparkElement; // size = 0x28 } EffectSparkElement; // size = 0x28
typedef struct { typedef struct {
@ -118,7 +118,7 @@ typedef struct {
/* 0x10 */ f32 startX; /* 0x10 */ f32 startX;
/* 0x14 */ s16 yaw; /* 0x14 */ s16 yaw;
/* 0x16 */ s16 pitch; /* 0x16 */ s16 pitch;
/* 0x18 */ s32 epoch; /* 0x18 */ u32 epoch;
} EffectShieldParticleElement; // size = 0x1C } EffectShieldParticleElement; // size = 0x1C
typedef struct { typedef struct {

View File

@ -3226,7 +3226,10 @@ void GenerateRandomizerImgui() {
cvarSettings[RSK_CUCCO_COUNT] = CVar_GetS32("gRandomizeCuccosToReturn", 7); cvarSettings[RSK_CUCCO_COUNT] = CVar_GetS32("gRandomizeCuccosToReturn", 7);
cvarSettings[RSK_BIG_POE_COUNT] = CVar_GetS32("gRandomizeBigPoeTargetCount", 10); cvarSettings[RSK_BIG_POE_COUNT] = CVar_GetS32("gRandomizeBigPoeTargetCount", 10);
cvarSettings[RSK_SKIP_CHILD_STEALTH] = CVar_GetS32("gRandomizeSkipChildStealth", 0); // If we skip child zelda, skip child stealth is pointless, so this needs to be reflected in the spoiler log
cvarSettings[RSK_SKIP_CHILD_STEALTH] =
!CVar_GetS32("gRandomizeSkipChildZelda", 0) && CVar_GetS32("gRandomizeSkipChildStealth", 0);
cvarSettings[RSK_SKIP_EPONA_RACE] = CVar_GetS32("gRandomizeSkipEponaRace", 0); cvarSettings[RSK_SKIP_EPONA_RACE] = CVar_GetS32("gRandomizeSkipEponaRace", 0);
cvarSettings[RSK_SKIP_TOWER_ESCAPE] = CVar_GetS32("gRandomizeSkipTowerEscape", 0); cvarSettings[RSK_SKIP_TOWER_ESCAPE] = CVar_GetS32("gRandomizeSkipTowerEscape", 0);

View File

@ -3957,7 +3957,7 @@ void Actor_DrawDoorLock(GlobalContext* globalCtx, s32 frame, s32 type) {
f32 chainsTranslateX; f32 chainsTranslateX;
f32 chainsTranslateY; f32 chainsTranslateY;
f32 rotZStep; f32 rotZStep;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
entry = &sDoorLocksInfo[type]; entry = &sDoorLocksInfo[type];

View File

@ -1459,7 +1459,7 @@ void Environment_DrawLensFlare(GlobalContext* globalCtx, EnvironmentContext* env
LENS_FLARE_RING, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_RING, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1,
LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1, LENS_FLARE_CIRCLE1,
}; };
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
@ -1642,7 +1642,7 @@ void Environment_DrawRain(GlobalContext* globalCtx, View* view, GraphicsContext*
Vec3f unused = { 0.0f, 0.0f, 0.0f }; Vec3f unused = { 0.0f, 0.0f, 0.0f };
Vec3f windDirection = { 0.0f, 0.0f, 0.0f }; Vec3f windDirection = { 0.0f, 0.0f, 0.0f };
Player* player = GET_PLAYER(globalCtx); Player* player = GET_PLAYER(globalCtx);
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
if (!(globalCtx->cameraPtrs[0]->unk_14C & 0x100) && (globalCtx->envCtx.unk_EE[2] == 0)) { if (!(globalCtx->cameraPtrs[0]->unk_14C & 0x100) && (globalCtx->envCtx.unk_EE[2] == 0)) {
@ -1925,7 +1925,7 @@ void Environment_DrawLightning(GlobalContext* globalCtx, s32 unused) {
s32 pad[2]; s32 pad[2];
Vec3f unused1 = { 0.0f, 0.0f, 0.0f }; Vec3f unused1 = { 0.0f, 0.0f, 0.0f };
Vec3f unused2 = { 0.0f, 0.0f, 0.0f }; Vec3f unused2 = { 0.0f, 0.0f, 0.0f };
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);

View File

@ -413,7 +413,7 @@ void HealthMeter_Draw(GlobalContext* globalCtx) {
s32 curCombineModeSet = 0; s32 curCombineModeSet = 0;
u8* curBgImgLoaded = NULL; u8* curBgImgLoaded = NULL;
s32 ddHeartCountMinusOne = gSaveContext.inventory.defenseHearts - 1; s32 ddHeartCountMinusOne = gSaveContext.inventory.defenseHearts - 1;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);

View File

@ -277,11 +277,15 @@ void Gameplay_Init(GameState* thisx) {
u8 tempSetupIndex; u8 tempSetupIndex;
s32 pad[2]; s32 pad[2];
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH)) { // Skip Child Stealth when option is enabled, Zelda's Letter isn't obtained and Impa's reward hasn't been received
// eventChkInf[4] & 1 = Got Zelda's Letter
// eventChkInf[5] & 0x200 = Got Impa's reward
// entranceIndex 0x7A, Castle Courtyard - Day from crawlspace
// entranceIndex 0x400, Zelda's Courtyard
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) &&
!(gSaveContext.eventChkInf[4] & 1) && !(gSaveContext.eventChkInf[5] & 0x200)) {
if (gSaveContext.entranceIndex == 0x7A) { if (gSaveContext.entranceIndex == 0x7A) {
gSaveContext.entranceIndex = 0x400; gSaveContext.entranceIndex = 0x400;
} else if (gSaveContext.entranceIndex == 0x296) {
gSaveContext.entranceIndex = 0x23D;
} }
} }

View File

@ -793,12 +793,12 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.eventChkInf[1] |= (1 << 3); gSaveContext.eventChkInf[1] |= (1 << 3);
gSaveContext.eventChkInf[1] |= (1 << 4); gSaveContext.eventChkInf[1] |= (1 << 4);
// Set "Got Zelda's Letter" flag. Also ensures Saria is back at SFM. TODO: Is this flag used for anything else?
gSaveContext.eventChkInf[4] |= 1;
// Got item from impa // Got item from impa
gSaveContext.eventChkInf[5] |= 0x200; gSaveContext.eventChkInf[5] |= 0x200;
// make sure saria is at SFM
gSaveContext.eventChkInf[4] |= (1 << 0);
// set this at the end to ensure we always start with the letter // set this at the end to ensure we always start with the letter
// this is for the off chance we got the weird egg from impa (which should never happen) // this is for the off chance we got the weird egg from impa (which should never happen)
INV_CONTENT(ITEM_LETTER_ZELDA) = ITEM_LETTER_ZELDA; INV_CONTENT(ITEM_LETTER_ZELDA) = ITEM_LETTER_ZELDA;

View File

@ -24,7 +24,7 @@ typedef struct {
/* 0x36 */ f32 pitch; /* 0x36 */ f32 pitch;
/* 0x36 */ f32 yaw; /* 0x36 */ f32 yaw;
/* 0x40 */ f32 roll; /* 0x40 */ f32 roll;
/* 0x44 */ s32 epoch; /* 0x44 */ u32 epoch;
} BgDyYoseizoParticle; // size = 0x48 } BgDyYoseizoParticle; // size = 0x48
typedef struct BgDyYoseizo { typedef struct BgDyYoseizo {

View File

@ -13,7 +13,7 @@ typedef struct {
/* 0x0C */ Vec3f vel; /* 0x0C */ Vec3f vel;
/* 0x18 */ s16 rotVelX; /* 0x18 */ s16 rotVelX;
/* 0x1A */ s16 rotVelY; /* 0x1A */ s16 rotVelY;
/* 0x1C */ s32 epoch; /* 0x1C */ u32 epoch;
} BgJyaMegamiPiece; // size = 0x20 } BgJyaMegamiPiece; // size = 0x20
typedef struct BgJyaMegami { typedef struct BgJyaMegami {

View File

@ -261,7 +261,7 @@ void BgSpot00Hanebasi_DrawTorches(Actor* thisx, GlobalContext* globalCtx2) {
GlobalContext* globalCtx = globalCtx2; GlobalContext* globalCtx = globalCtx2;
f32 angle; f32 angle;
s32 i; s32 i;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);

View File

@ -17,7 +17,7 @@ typedef struct {
/* 0x26 */ Color_RGB8 color; /* 0x26 */ Color_RGB8 color;
/* 0x2A */ s16 alpha; /* 0x2A */ s16 alpha;
/* 0x2C */ f32 unk_2C; /* 0x2C */ f32 unk_2C;
/* 0x30 */ s32 epoch; /* 0x30 */ u32 epoch;
} BossDodongoEffect; // Size = 0x34 } BossDodongoEffect; // Size = 0x34
typedef struct BossDodongo { typedef struct BossDodongo {

View File

@ -1835,7 +1835,7 @@ void BossFd_DrawBody(GlobalContext* globalCtx, BossFd* this) {
s16 i; s16 i;
f32 temp_float; f32 temp_float;
Mtx* tempMat = Graph_Alloc(globalCtx->state.gfxCtx, 18 * sizeof(Mtx)); Mtx* tempMat = Graph_Alloc(globalCtx->state.gfxCtx, 18 * sizeof(Mtx));
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);

View File

@ -87,7 +87,7 @@ typedef struct BossFd2 {
/* 0x1394 */ BossFd2Cam camData; /* 0x1394 */ BossFd2Cam camData;
/* 0x141C */ ColliderJntSph collider; /* 0x141C */ ColliderJntSph collider;
/* 0x143C */ ColliderJntSphElement elements[9]; /* 0x143C */ ColliderJntSphElement elements[9];
/* 0x167C */ s32 epoch; /* 0x167C */ u32 epoch;
} BossFd2; // size = 0x1680 } BossFd2; // size = 0x1680
#endif #endif

View File

@ -3356,7 +3356,7 @@ void BossGanon_DrawShock(BossGanon* this, GlobalContext* globalCtx) {
s32 pad; s32 pad;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
s16 i; s16 i;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
@ -3463,7 +3463,7 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, GlobalContext* globalCtx) {
f32 yRot; f32 yRot;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
s16 i; s16 i;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
@ -4158,7 +4158,7 @@ void BossGanon_LightBall_Draw(Actor* thisx, GlobalContext* globalCtx) {
s16 i; s16 i;
f32 alpha; f32 alpha;
s32 pad; s32 pad;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);

View File

@ -2464,7 +2464,7 @@ void func_80904340(BossGanon2* this, GlobalContext* globalCtx) {
f32 angle; f32 angle;
f32 sin; f32 sin;
f32 cos; f32 cos;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);
@ -2637,7 +2637,7 @@ void BossGanon2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
void func_80904D88(BossGanon2* this, GlobalContext* globalCtx) { void func_80904D88(BossGanon2* this, GlobalContext* globalCtx) {
s32 pad; s32 pad;
s16 i; s16 i;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);
@ -2701,7 +2701,7 @@ void func_80904FC8(BossGanon2* this, GlobalContext* globalCtx) {
void func_8090523C(BossGanon2* this, GlobalContext* globalCtx) { void func_8090523C(BossGanon2* this, GlobalContext* globalCtx) {
Player* player; Player* player;
f32 phi_f20; f32 phi_f20;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);
@ -2933,7 +2933,7 @@ void func_809060E8(GlobalContext* globalCtx) {
BossGanon2Effect* effect; BossGanon2Effect* effect;
s16 i; s16 i;
BossGanon2Effect* effects; BossGanon2Effect* effects;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
effects = effect = globalCtx->specialEffects; effects = effect = globalCtx->specialEffects;

View File

@ -2443,7 +2443,7 @@ void BossMo_DrawTentacle(BossMo* this, GlobalContext* globalCtx) {
f32 phi_f20; f32 phi_f20;
f32 phi_f22; f32 phi_f22;
Vec3f sp110; Vec3f sp110;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);

View File

@ -2706,7 +2706,7 @@ s32 BossSst_OverrideHandTrailDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
void BossSst_DrawHand(Actor* thisx, GlobalContext* globalCtx) { void BossSst_DrawHand(Actor* thisx, GlobalContext* globalCtx) {
BossSst* this = (BossSst*)thisx; BossSst* this = (BossSst*)thisx;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);

View File

@ -17,7 +17,7 @@ typedef struct {
/* 0x0020 */ s16 move; /* 0x0020 */ s16 move;
/* 0x0022 */ s16 status; /* 0x0022 */ s16 status;
/* 0x0024 */ u8 alpha; /* 0x0024 */ u8 alpha;
/* 0x0028 */ s32 epoch; /* 0x0028 */ u32 epoch;
} BossSstEffect; // size = 0x2C } BossSstEffect; // size = 0x2C
typedef struct { typedef struct {

View File

@ -3329,7 +3329,7 @@ void func_80942180(BossTw* this, GlobalContext* globalCtx) {
void func_809426F0(BossTw* this, GlobalContext* globalCtx) { void func_809426F0(BossTw* this, GlobalContext* globalCtx) {
s32 pad; s32 pad;
s16 i; s16 i;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);
@ -4418,7 +4418,7 @@ void BossTw_BlastDraw(Actor* thisx, GlobalContext* globalCtx2) {
f32 scaleFactor; f32 scaleFactor;
s16 tailIdx; s16 tailIdx;
s16 i; s16 i;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);
@ -4492,7 +4492,7 @@ void BossTw_DrawDeathBall(Actor* thisx, GlobalContext* globalCtx2) {
f32 scaleFactor; f32 scaleFactor;
s16 tailIdx; s16 tailIdx;
s16 i; s16 i;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);

View File

@ -43,7 +43,7 @@ typedef struct {
/* 0x002E */ s16 work[EFF_WORK_MAX]; /* 0x002E */ s16 work[EFF_WORK_MAX];
/* 0x0034 */ f32 workf[EFF_FWORK_MAX]; /* 0x0034 */ f32 workf[EFF_FWORK_MAX];
/* 0x0044 */ Actor* target; /* 0x0044 */ Actor* target;
s32 epoch; u32 epoch;
} BossTwEffect; } BossTwEffect;
typedef enum { typedef enum {

View File

@ -4006,7 +4006,7 @@ void BossVa_DrawDoor(GlobalContext* globalCtx, s16 scale) {
f32 yScale; f32 yScale;
f32 segAngle = 0.0f; f32 segAngle = 0.0f;
s32 i; s32 i;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);

View File

@ -564,7 +564,7 @@ void func_80967FFC(Actor* thisx, GlobalContext* globalCtx) {
Demo6K* this = (Demo6K*)thisx; Demo6K* this = (Demo6K*)thisx;
s32 pad; s32 pad;
u16 timer1 = this->timer1; u16 timer1 = this->timer1;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);
@ -695,7 +695,7 @@ void func_809688C4(Actor* thisx, GlobalContext* globalCtx2) {
GlobalContext* globalCtx = globalCtx2; GlobalContext* globalCtx = globalCtx2;
u32 frames = globalCtx->state.frames; u32 frames = globalCtx->state.frames;
s32 i; s32 i;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
if ((i = (globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[1] != NULL)) && if ((i = (globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[1] != NULL)) &&

View File

@ -522,7 +522,7 @@ void DemoKankyo_DrawRain(Actor* thisx, GlobalContext* globalCtx) {
f32 translateY; f32 translateY;
f32 translateZ; f32 translateZ;
s16 j; s16 j;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);
@ -663,7 +663,7 @@ void DemoKankyo_DrawClouds(Actor* thisx, GlobalContext* globalCtx) {
f32 dx; f32 dx;
f32 dy; f32 dy;
f32 dz; f32 dz;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);
@ -784,7 +784,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, GlobalContext* globalCtx) {
f32 translateZ; f32 translateZ;
PosRot posRot; PosRot posRot;
u8 linkAge = gSaveContext.linkAge; u8 linkAge = gSaveContext.linkAge;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);
@ -933,7 +933,7 @@ void DemoKankyo_DrawSparkles(Actor* thisx, GlobalContext* globalCtx) {
f32 scale; f32 scale;
s16 i; s16 i;
PosRot posRot; PosRot posRot;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);

View File

@ -19,7 +19,7 @@ typedef struct {
/* 0x30 */ char unk_2C[4]; /* 0x30 */ char unk_2C[4];
/* 0x34 */ f32 scale; /* 0x34 */ f32 scale;
/* 0x38 */ char unk_34[8]; /* 0x38 */ char unk_34[8];
/* 0x3C */ s32 epoch; /* 0x3C */ u32 epoch;
} EfcErupcParticles; // size 0x40 } EfcErupcParticles; // size 0x40
#define EFC_ERUPC_NUM_PARTICLES 100 #define EFC_ERUPC_NUM_PARTICLES 100

View File

@ -269,7 +269,7 @@ void EffDust_DrawFunc_8099E4F4(Actor* thisx, GlobalContext* globalCtx2) {
f32* distanceTraveled; f32* distanceTraveled;
s32 i; s32 i;
f32 aux; f32 aux;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
@ -321,7 +321,7 @@ void EffDust_DrawFunc_8099E784(Actor* thisx, GlobalContext* globalCtx2) {
s32 i; s32 i;
f32 aux; f32 aux;
Player* player = GET_PLAYER(globalCtx); Player* player = GET_PLAYER(globalCtx);
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);

View File

@ -19,7 +19,7 @@ typedef struct EnAnubiceFire {
/* 0x015E */ s16 unk_15E; /* 0x015E */ s16 unk_15E;
/* 0x0178 */ Vec3f unk_160[6]; /* 0x0178 */ Vec3f unk_160[6];
/* 0x01A8 */ ColliderCylinder cylinder; /* 0x01A8 */ ColliderCylinder cylinder;
/* 0x01F4 */ s32 epoch; /* 0x01F4 */ u32 epoch;
} EnAnubiceFire; // size = 0x01F8 } EnAnubiceFire; // size = 0x01F8
#endif #endif

View File

@ -32,7 +32,7 @@ typedef struct EnBa {
/* 0x031C */ s16 unk31C; /* 0x031C */ s16 unk31C;
/* 0x0320 */ ColliderJntSph collider; /* 0x0320 */ ColliderJntSph collider;
/* 0x0340 */ ColliderJntSphElement colliderItems[2]; /* 0x0340 */ ColliderJntSphElement colliderItems[2];
/* 0x03C0 */ s32 epoch; /* 0x03C0 */ u32 epoch;
} EnBa; // size = 0x03C4 } EnBa; // size = 0x03C4
#endif #endif

View File

@ -16,7 +16,7 @@ typedef struct EnBx {
/* 0x01B4 */ Vec3s unk_1B4[4]; /* 0x01B4 */ Vec3s unk_1B4[4];
/* 0x01CC */ ColliderCylinder collider; /* 0x01CC */ ColliderCylinder collider;
/* 0x0218 */ ColliderQuad colliderQuad; /* 0x0218 */ ColliderQuad colliderQuad;
/* 0x0298 */ s32 epoch; /* 0x0298 */ u32 epoch;
} EnBx; // size = 0x029C } EnBx; // size = 0x029C
#endif #endif

View File

@ -88,7 +88,7 @@ typedef struct EnClearTagEffect {
/* 0x0058 */ f32 rotationX; /* 0x0058 */ f32 rotationX;
/* 0x005C */ f32 floorHeight; /* 0x005C */ f32 floorHeight;
/* 0x0060 */ Vec3f floorTangent; /* 0x0060 */ Vec3f floorTangent;
/* 0x006C */ s32 epoch; /* 0x006C */ u32 epoch;
} EnClearTagEffect; // size = 0x70 } EnClearTagEffect; // size = 0x70
#define CLEAR_TAG_EFFECT_MAX_COUNT 100 #define CLEAR_TAG_EFFECT_MAX_COUNT 100

View File

@ -14,7 +14,7 @@ typedef struct {
/* 0x0010 */ u8 isAlive; /* 0x0010 */ u8 isAlive;
/* 0x0014 */ Vec3f moveDirection; /* 0x0014 */ Vec3f moveDirection;
/* 0x0020 */ Vec3f rot; /* 0x0020 */ Vec3f rot;
/* 0x002C */ s32 epoch; /* 0x002C */ u32 epoch;
} EnEncount2Particle; // size = 0x30 } EnEncount2Particle; // size = 0x30
typedef struct EnEncount2 { typedef struct EnEncount2 {

View File

@ -25,7 +25,7 @@ typedef struct {
/* 0x0014 */ Vec3f pos; /* 0x0014 */ Vec3f pos;
/* 0x0020 */ Vec3f velocity; /* 0x0020 */ Vec3f velocity;
/* 0x002C */ Vec3f accel; /* 0x002C */ Vec3f accel;
s32 epoch; u32 epoch;
} EnFdEffect; // size = 0x38 } EnFdEffect; // size = 0x38
typedef struct EnFd { typedef struct EnFd {

View File

@ -19,7 +19,7 @@ typedef struct {
/* 0x0014 */ Vec3f pos; /* 0x0014 */ Vec3f pos;
/* 0x0020 */ Vec3f velocity; /* 0x0020 */ Vec3f velocity;
/* 0x002C */ Vec3f accel; /* 0x002C */ Vec3f accel;
s32 epoch; u32 epoch;
} EnFwEffect; } EnFwEffect;
typedef struct EnFw { typedef struct EnFw {

View File

@ -21,7 +21,7 @@ typedef struct {
/* 0x0030 */ f32 xyScale; // /* 0x0030 */ f32 xyScale; //
/* 0x0034 */ f32 xyScaleTarget; /* 0x0034 */ f32 xyScaleTarget;
/* 0x0038 */ u8 isTimerMod8; // conditional, used to run CollisionCheck_SetAT /* 0x0038 */ u8 isTimerMod8; // conditional, used to run CollisionCheck_SetAT
s32 epoch; u32 epoch;
} EnFzEffectSsIceSmoke; // size = 0x3C } EnFzEffectSsIceSmoke; // size = 0x3C
typedef struct EnFz { typedef struct EnFz {

View File

@ -32,7 +32,7 @@ typedef struct {
/* 0x12 */ u8 flag; /* 0x12 */ u8 flag;
/* 0x14 */ Vec3f velocity; /* 0x14 */ Vec3f velocity;
/* 0x20 */ Vec3f rot; /* 0x20 */ Vec3f rot;
s32 epoch; u32 epoch;
} EnGSwitchEffect; // size = 0x2C } EnGSwitchEffect; // size = 0x2C
typedef struct EnGSwitch { typedef struct EnGSwitch {

View File

@ -27,7 +27,7 @@ typedef struct {
/* 0x20 */ f32 unk_20; /* 0x20 */ f32 unk_20;
/* 0x24 */ f32 unk_24; /* 0x24 */ f32 unk_24;
/* 0x28 */ f32 unk_28; /* 0x28 */ f32 unk_28;
s32 epoch; u32 epoch;
} EnGbCagedSoul; // size = 0x2C } EnGbCagedSoul; // size = 0x2C
typedef struct EnGb { typedef struct EnGb {

View File

@ -34,7 +34,7 @@ typedef struct {
/* 0x0014 */ Vec3f pos; /* 0x0014 */ Vec3f pos;
/* 0x0020 */ Vec3f velocity; /* 0x0020 */ Vec3f velocity;
/* 0x002C */ Vec3f accel; /* 0x002C */ Vec3f accel;
s32 epoch; u32 epoch;
} EnGoEffect; // size = 0x38 } EnGoEffect; // size = 0x38
typedef struct EnGo { typedef struct EnGo {

View File

@ -112,14 +112,23 @@ void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx) {
} }
} }
// eventChkInf[4] & 1 = Got Zelda's Letter
// eventChkInf[5] & 0x200 = Got item from impa
// eventChkInf[8] & 1 = Ocarina thrown in moat
bool metZelda = (gSaveContext.eventChkInf[4] & 1) && (gSaveContext.eventChkInf[5] & 0x200);
if (this->type != 5) { if (this->type != 5) {
if (((gSaveContext.dayTime < 0xB888) || IS_DAY) && (gSaveContext.n64ddFlag || !(gSaveContext.eventChkInf[8] & 1))) { if ((gSaveContext.dayTime < 0xB888 || IS_DAY) &&
((!gSaveContext.n64ddFlag && !(gSaveContext.eventChkInf[8] & 1)) ||
(gSaveContext.n64ddFlag && !metZelda))) {
this->actionFunc = EnHeishi1_SetupWalk; this->actionFunc = EnHeishi1_SetupWalk;
} else { } else {
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }
} else { } else {
if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY || (!gSaveContext.n64ddFlag && (gSaveContext.eventChkInf[8] & 1))) { if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY ||
(!gSaveContext.n64ddFlag && gSaveContext.eventChkInf[8] & 1) ||
(gSaveContext.n64ddFlag && metZelda)) {
this->actionFunc = EnHeishi1_SetupWaitNight; this->actionFunc = EnHeishi1_SetupWaitNight;
} else { } else {
Actor_Kill(&this->actor); Actor_Kill(&this->actor);

View File

@ -18,7 +18,7 @@ typedef struct {
/* 0x002C */ f32 scale; /* 0x002C */ f32 scale;
/* 0x0030 */ f32 unk_30; /* 0x0030 */ f32 unk_30;
/* 0x0034 */ u8 timer; /* 0x0034 */ u8 timer;
s32 epoch; u32 epoch;
} EnNiwFeather; // size = 0x0038 } EnNiwFeather; // size = 0x0038
typedef struct EnNiw { typedef struct EnNiw {

View File

@ -23,7 +23,7 @@ typedef struct EnNwcChick {
/* 0x36 */ u16 height; /* 0x36 */ u16 height;
/* 0x38 */ CollisionPoly* floorPoly; /* 0x38 */ CollisionPoly* floorPoly;
/* 0x44 */ char unk_3C[0x20]; /* 0x44 */ char unk_3C[0x20];
s32 epoch; u32 epoch;
} EnNwcChick; // size = 0x5C } EnNwcChick; // size = 0x5C
typedef struct EnNwc { typedef struct EnNwc {

View File

@ -30,7 +30,7 @@ typedef struct EnNy {
/* 0x01F0 */ f32 unk_1F0; /* 0x01F0 */ f32 unk_1F0;
/* 0x01F4 */ f32 unk_1F4; /* 0x01F4 */ f32 unk_1F4;
/* 0x01F8 */ Vec3f unk_1F8[16]; /* 0x01F8 */ Vec3f unk_1F8[16];
s32 epoch; u32 epoch;
} EnNy; // size = 0x02B8 } EnNy; // size = 0x02B8
#endif #endif

View File

@ -29,7 +29,7 @@ typedef struct EnPoSisters {
/* 0x029C */ LightInfo lightInfo; /* 0x029C */ LightInfo lightInfo;
/* 0x02AC */ ColliderCylinder collider; /* 0x02AC */ ColliderCylinder collider;
/* 0x02F8 */ MtxF unk_2F8; /* 0x02F8 */ MtxF unk_2F8;
s32 epoch; u32 epoch;
} EnPoSisters; // size = 0x0338 } EnPoSisters; // size = 0x0338
#endif #endif

View File

@ -760,6 +760,14 @@ void func_80AEC2C0(EnRu1* this, GlobalContext* globalCtx) {
func_80AEC070(this, globalCtx, something); func_80AEC070(this, globalCtx, something);
} }
// Convenience function used so that Ruto always spawns in Jabu in rando, even after she's been kidnapped
// Equivalent to !(gSaveContext.infTable[20] & 0x20) in vanilla
bool shouldSpawnRuto() {
// gSaveContext.infTable[20] & 0x40 check is to prevent Ruto from spawning during the short period of time when
// she's on the Zora's Sapphire pedestal but hasn't been kidnapped yet (would result in multiple Rutos otherwise)
return !(gSaveContext.infTable[20] & 0x20) || (gSaveContext.n64ddFlag && (gSaveContext.infTable[20] & 0x40));
}
void func_80AEC320(EnRu1* this, GlobalContext* globalCtx) { void func_80AEC320(EnRu1* this, GlobalContext* globalCtx) {
s8 actorRoom; s8 actorRoom;
@ -767,8 +775,7 @@ void func_80AEC320(EnRu1* this, GlobalContext* globalCtx) {
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0); func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
this->action = 7; this->action = 7;
EnRu1_SetMouthIndex(this, 1); EnRu1_SetMouthIndex(this, 1);
} else if ((gSaveContext.infTable[20] & 0x80) && !(gSaveContext.infTable[20] & 1) && } else if ((gSaveContext.infTable[20] & 0x80) && !(gSaveContext.infTable[20] & 1) && shouldSpawnRuto()) {
!(gSaveContext.infTable[20] & 0x20)) {
if (!func_80AEB020(this, globalCtx)) { if (!func_80AEB020(this, globalCtx)) {
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0); func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
actorRoom = this->actor.room; actorRoom = this->actor.room;
@ -1172,7 +1179,7 @@ void func_80AED414(EnRu1* this, GlobalContext* globalCtx) {
void func_80AED44C(EnRu1* this, GlobalContext* globalCtx) { void func_80AED44C(EnRu1* this, GlobalContext* globalCtx) {
s8 actorRoom; s8 actorRoom;
if ((gSaveContext.infTable[20] & 2) && !(gSaveContext.infTable[20] & 0x20) && !(gSaveContext.infTable[20] & 1) && if ((gSaveContext.infTable[20] & 2) && shouldSpawnRuto() && !(gSaveContext.infTable[20] & 1) &&
!(gSaveContext.infTable[20] & 0x80)) { !(gSaveContext.infTable[20] & 0x80)) {
if (!func_80AEB020(this, globalCtx)) { if (!func_80AEB020(this, globalCtx)) {
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0); func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
@ -2179,7 +2186,7 @@ void func_80AEFF40(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEFF94(EnRu1* this, GlobalContext* globalCtx) { void func_80AEFF94(EnRu1* this, GlobalContext* globalCtx) {
s8 actorRoom; s8 actorRoom;
if ((gSaveContext.infTable[20] & 2) && (gSaveContext.infTable[20] & 1) && !(gSaveContext.infTable[20] & 0x20) && if ((gSaveContext.infTable[20] & 2) && (gSaveContext.infTable[20] & 1) && shouldSpawnRuto() &&
(!(func_80AEB020(this, globalCtx)))) { (!(func_80AEB020(this, globalCtx)))) {
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0); func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
actorRoom = this->actor.room; actorRoom = this->actor.room;

View File

@ -18,7 +18,7 @@ typedef struct {
/* 0x2C */ f32 unk_2C; /* 0x2C */ f32 unk_2C;
/* 0x30 */ f32 unk_30; /* 0x30 */ f32 unk_30;
/* 0x34 */ u8 unk_34; /* 0x34 */ u8 unk_34;
s32 epoch; u32 epoch;
} EnSyatekiNiw_1; // size = 0x38 } EnSyatekiNiw_1; // size = 0x38
typedef struct EnSyatekiNiw { typedef struct EnSyatekiNiw {

View File

@ -17,7 +17,7 @@ typedef struct EnTkEff {
/* 0x0014 */ Vec3f pos; /* 0x0014 */ Vec3f pos;
/* 0x0020 */ Vec3f speed; /* 0x0020 */ Vec3f speed;
/* 0x002C */ Vec3f accel; /* 0x002C */ Vec3f accel;
s32 epoch; u32 epoch;
} EnTkEff; // size = 0x0038 } EnTkEff; // size = 0x0038
struct EnTk; struct EnTk;

View File

@ -56,7 +56,7 @@ typedef struct {
/* 0x28 */ f32 scale; /* 0x28 */ f32 scale;
/* 0x2C */ f32 lerpFactor; /* 0x2C */ f32 lerpFactor;
/* 0x30 */ u8 state; /* 0x30 */ u8 state;
s32 epoch; u32 epoch;
} EnViewerFireEffect; // size = 0x34 } EnViewerFireEffect; // size = 0x34
typedef struct EnViewer { typedef struct EnViewer {

View File

@ -90,7 +90,7 @@ typedef struct {
/* 0x32 */ s16 timer; /* 0x32 */ s16 timer;
/* 0x34 */ u8 shouldDraw; /* 0x34 */ u8 shouldDraw;
/* 0x38 */ f32 drawDistance; /* 0x38 */ f32 drawDistance;
s32 epoch; u32 epoch;
} FishingProp; // size = 0x3C } FishingProp; // size = 0x3C
typedef enum { typedef enum {
@ -116,7 +116,7 @@ typedef struct {
/* 0x40 */ s16 unk_40; /* 0x40 */ s16 unk_40;
/* 0x42 */ s16 unk_42; /* 0x42 */ s16 unk_42;
/* 0x44 */ u8 shouldDraw; /* 0x44 */ u8 shouldDraw;
s32 epoch; u32 epoch;
} FishingGroupFish; // size = 0x48 } FishingGroupFish; // size = 0x48
#define LINE_SEG_COUNT 200 #define LINE_SEG_COUNT 200
@ -1766,7 +1766,7 @@ static f32 sSinkingLureSizes[] = {
void Fishing_DrawSinkingLure(GlobalContext* globalCtx) { void Fishing_DrawSinkingLure(GlobalContext* globalCtx) {
s16 i; s16 i;
f32 scale; f32 scale;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
OPEN_DISPS(globalCtx->state.gfxCtx); OPEN_DISPS(globalCtx->state.gfxCtx);

View File

@ -482,7 +482,7 @@ void MirRay_Draw(Actor* thisx, GlobalContext* globalCtx) {
s32 i; s32 i;
MirRayShieldReflection reflection[6]; MirRayShieldReflection reflection[6];
s32 temp; s32 temp;
static s32 epoch = 0; static u32 epoch = 0;
epoch++; epoch++;
this->reflectIntensity = 0.0f; this->reflectIntensity = 0.0f;

View File

@ -11,7 +11,7 @@ typedef struct {
/* 0x24 */ s16 scale; /* 0x24 */ s16 scale;
/* 0x26 */ s16 scaleStep; /* 0x26 */ s16 scaleStep;
/* 0x28 */ u8 drawMode; /* 0x28 */ u8 drawMode;
/* 0x29 */ s32 epoch; /* 0x29 */ u32 epoch;
} EffectSsBomb2InitParams; // size = 0x30 } EffectSsBomb2InitParams; // size = 0x30
#endif #endif

View File

@ -12,12 +12,12 @@ static s16 sEquipMoveTimer = 10;
bool gSelectingMask; bool gSelectingMask;
static s16 sAmmoVtxOffset[] = { static s16 sAmmoVtxOffset[] = {
0, 2, 4, 6, 99, 99, 8, 99, 99, 10, 99, 99, 99, 99, 99, 99, 12, 0, 2, 4, 6, 99, 99, 8, 99, 10, 99, 99, 99, 99, 99, 12,
}; };
extern const char* _gAmmoDigit0Tex[]; extern const char* _gAmmoDigit0Tex[];
void KaleidoScope_DrawAmmoCount(PauseContext* pauseCtx, GraphicsContext* gfxCtx, s16 item) { void KaleidoScope_DrawAmmoCount(PauseContext* pauseCtx, GraphicsContext* gfxCtx, s16 item, int slot) {
s16 ammo; s16 ammo;
s16 i; s16 i;
@ -51,7 +51,7 @@ void KaleidoScope_DrawAmmoCount(PauseContext* pauseCtx, GraphicsContext* gfxCtx,
gDPPipeSync(POLY_KAL_DISP++); gDPPipeSync(POLY_KAL_DISP++);
if (i != 0) { if (i != 0) {
gSPVertex(POLY_KAL_DISP++, &pauseCtx->itemVtx[(sAmmoVtxOffset[item] + 31) * 4], 4, 0); gSPVertex(POLY_KAL_DISP++, &pauseCtx->itemVtx[(sAmmoVtxOffset[slot] + 31) * 4], 4, 0);
gDPLoadTextureBlock(POLY_KAL_DISP++, ((u8*)_gAmmoDigit0Tex[i]), G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0, gDPLoadTextureBlock(POLY_KAL_DISP++, ((u8*)_gAmmoDigit0Tex[i]), G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
@ -60,7 +60,7 @@ void KaleidoScope_DrawAmmoCount(PauseContext* pauseCtx, GraphicsContext* gfxCtx,
gSP1Quadrangle(POLY_KAL_DISP++, 0, 2, 3, 1, 0); gSP1Quadrangle(POLY_KAL_DISP++, 0, 2, 3, 1, 0);
} }
gSPVertex(POLY_KAL_DISP++, &pauseCtx->itemVtx[(sAmmoVtxOffset[item] + 32) * 4], 4, 0); gSPVertex(POLY_KAL_DISP++, &pauseCtx->itemVtx[(sAmmoVtxOffset[slot] + 32) * 4], 4, 0);
gDPLoadTextureBlock(POLY_KAL_DISP++, ((u8*)_gAmmoDigit0Tex[ammo]), G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0, gDPLoadTextureBlock(POLY_KAL_DISP++, ((u8*)_gAmmoDigit0Tex[ammo]), G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
@ -499,7 +499,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
for (i = 0; i < 15; i++) { for (i = 0; i < 15; i++) {
if ((gAmmoItems[i] != ITEM_NONE) && (gSaveContext.inventory.items[i] != ITEM_NONE)) { if ((gAmmoItems[i] != ITEM_NONE) && (gSaveContext.inventory.items[i] != ITEM_NONE)) {
KaleidoScope_DrawAmmoCount(pauseCtx, globalCtx->state.gfxCtx, gSaveContext.inventory.items[i]); KaleidoScope_DrawAmmoCount(pauseCtx, globalCtx->state.gfxCtx, gSaveContext.inventory.items[i], i);
} }
} }