mirror of
https://github.com/zeldaret/mm.git
synced 2026-06-27 01:55:07 -04:00
z_kankyo pt 1 (#1377)
* z64environment.h * remove todo * Cleanup * data + bss + 2 functions * Bring over simple functions * Remove lerp comment * code functions csv * Remove docs changes * ZBufValToFixedPoint * Remove leading 0's * SEGMENT macros * eventDayCount * format * z64bombers_notebook.h * fix merge * Comments --------- Co-authored-by: angie <angheloalf95@gmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z64.h"
|
||||
#include "regs.h"
|
||||
#include "functions.h"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z64.h"
|
||||
#include "regs.h"
|
||||
#include "functions.h"
|
||||
|
||||
@@ -12,7 +12,7 @@ void SaveContext_Init(void) {
|
||||
gSaveContext.nextCutsceneIndex = 0xFFEF;
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
gSaveContext.chamberCutsceneNum = 0;
|
||||
gSaveContext.nextDayTime = 0xFFFF;
|
||||
gSaveContext.nextDayTime = NEXT_TIME_NONE;
|
||||
gSaveContext.skyboxTime = 0;
|
||||
gSaveContext.dogIsLost = true;
|
||||
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
|
||||
|
||||
+25
-18
@@ -1,6 +1,4 @@
|
||||
#include "PR/ultratypes.h"
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "prevent_bss_reordering2.h"
|
||||
|
||||
// Variables are put before most headers as a hacky way to bypass bss reordering
|
||||
struct CutsceneCamera;
|
||||
@@ -13,6 +11,15 @@ static s16 sBssPad;
|
||||
u8 gDisablePlayerCsModeStartPos;
|
||||
s16 gDungeonBossWarpSceneId;
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "prevent_bss_reordering2.h"
|
||||
// clang-format off
|
||||
// Partial structs taken from "prevent_bss_reordering.h"
|
||||
struct Dummy200 { int x; };
|
||||
struct Dummy201 { int x; };
|
||||
struct Dummy202 { int x; };
|
||||
// clang-format on
|
||||
|
||||
#include "global.h"
|
||||
#include "z64quake.h"
|
||||
#include "z64rumble.h"
|
||||
@@ -154,8 +161,8 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
|
||||
switch (cmd->type) {
|
||||
case CS_MISC_RAIN:
|
||||
if (isFirstFrame) {
|
||||
func_800FD78C(play);
|
||||
play->envCtx.unk_F2[0] = 60;
|
||||
Environment_PlayStormNatureAmbience(play);
|
||||
play->envCtx.precipitation[PRECIP_RAIN_MAX] = 60;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -163,19 +170,19 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
|
||||
if (isFirstFrame) {
|
||||
Audio_SetAmbienceChannelIO(AMBIENCE_CHANNEL_LIGHTNING, CHANNEL_IO_PORT_0, 0);
|
||||
Environment_AddLightningBolts(play, 3);
|
||||
D_801F4E68 = 1;
|
||||
gLightningStrike.state = LIGHTNING_STRIKE_START;
|
||||
}
|
||||
break;
|
||||
|
||||
case CS_MISC_LIFT_FOG:
|
||||
if (play->envCtx.lightSettings.zFar < 12800) {
|
||||
play->envCtx.lightSettings.zFar += 35;
|
||||
if (play->envCtx.adjLightSettings.zFar < 12800) {
|
||||
play->envCtx.adjLightSettings.zFar += 35;
|
||||
}
|
||||
break;
|
||||
|
||||
case CS_MISC_CLOUDY_SKY:
|
||||
if (isFirstFrame) {
|
||||
play->envCtx.changeSkyboxState = 1;
|
||||
play->envCtx.changeSkyboxState = CHANGE_SKYBOX_REQUESTED;
|
||||
play->envCtx.skyboxConfig = 1;
|
||||
play->envCtx.changeSkyboxNextConfig = 0;
|
||||
play->envCtx.changeSkyboxTimer = 60;
|
||||
@@ -238,16 +245,16 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
|
||||
|
||||
case CS_MISC_RED_PULSATING_LIGHTS:
|
||||
if (play->state.frames & 8) {
|
||||
if (play->envCtx.lightSettings.ambientColor[0] < 40) {
|
||||
play->envCtx.lightSettings.ambientColor[0] += 2;
|
||||
play->envCtx.lightSettings.diffuseColor1[1] -= 3;
|
||||
play->envCtx.lightSettings.diffuseColor1[2] -= 3;
|
||||
if (play->envCtx.adjLightSettings.ambientColor[0] < 40) {
|
||||
play->envCtx.adjLightSettings.ambientColor[0] += 2;
|
||||
play->envCtx.adjLightSettings.light1Color[1] -= 3;
|
||||
play->envCtx.adjLightSettings.light1Color[2] -= 3;
|
||||
}
|
||||
} else {
|
||||
if (play->envCtx.lightSettings.ambientColor[0] > 2) {
|
||||
play->envCtx.lightSettings.ambientColor[0] -= 2;
|
||||
play->envCtx.lightSettings.diffuseColor1[1] += 3;
|
||||
play->envCtx.lightSettings.diffuseColor1[2] += 3;
|
||||
if (play->envCtx.adjLightSettings.ambientColor[0] > 2) {
|
||||
play->envCtx.adjLightSettings.ambientColor[0] -= 2;
|
||||
play->envCtx.adjLightSettings.light1Color[1] += 3;
|
||||
play->envCtx.adjLightSettings.light1Color[2] += 3;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -262,7 +269,7 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
|
||||
|
||||
case CS_MISC_SANDSTORM_FILL:
|
||||
if (isFirstFrame) {
|
||||
play->envCtx.sandstormState = 1;
|
||||
play->envCtx.sandstormState = SANDSTORM_FILL;
|
||||
}
|
||||
Audio_PlaySfx_2(NA_SE_EV_SAND_STORM - SFX_FLAG);
|
||||
break;
|
||||
@@ -409,7 +416,7 @@ void CutsceneCmd_SetLightSetting(PlayState* play, CutsceneContext* csCtx, CsCmdL
|
||||
play->envCtx.lightSettingOverride = cmd->settingPlusOne - 1;
|
||||
play->envCtx.lightBlend = 1.0f;
|
||||
} else {
|
||||
play->envCtx.lightSettingOverride = 0xFF;
|
||||
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ void GameOver_FadeLights(PlayState* play) {
|
||||
|
||||
if ((gameOverCtx->state >= GAMEOVER_DEATH_WAIT_GROUND && gameOverCtx->state < GAMEOVER_REVIVE_START) ||
|
||||
(gameOverCtx->state >= GAMEOVER_REVIVE_RUMBLE && gameOverCtx->state < GAMEOVER_REVIVE_FADE_OUT)) {
|
||||
Kankyo_FadeInGameOverLights(play);
|
||||
Environment_FadeInGameOverLights(play);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ void GameOver_Update(PlayState* play) {
|
||||
gSaveContext.nextHudVisibility = HUD_VISIBILITY_IDLE;
|
||||
gSaveContext.hudVisibility = HUD_VISIBILITY_IDLE;
|
||||
gSaveContext.hudVisibilityTimer = 0;
|
||||
Kankyo_InitGameOverLights(play);
|
||||
Environment_InitGameOverLights(play);
|
||||
sGameOverTimer = 20;
|
||||
Rumble_Request(0.0f, 126, 124, 63);
|
||||
gameOverCtx->state = GAMEOVER_DEATH_WAIT_GROUND;
|
||||
@@ -92,7 +92,7 @@ void GameOver_Update(PlayState* play) {
|
||||
case GAMEOVER_REVIVE_START:
|
||||
gameOverCtx->state++; // GAMEOVER_REVIVE_RUMBLE
|
||||
sGameOverTimer = 0;
|
||||
Kankyo_InitGameOverLights(play);
|
||||
Environment_InitGameOverLights(play);
|
||||
ShrinkWindow_Letterbox_SetSizeTarget(32);
|
||||
break;
|
||||
|
||||
@@ -119,7 +119,7 @@ void GameOver_Update(PlayState* play) {
|
||||
break;
|
||||
|
||||
case GAMEOVER_REVIVE_FADE_OUT:
|
||||
Kankyo_FadeOutGameOverLights(play);
|
||||
Environment_FadeOutGameOverLights(play);
|
||||
sGameOverTimer--;
|
||||
if (sGameOverTimer == 0) {
|
||||
gameOverCtx->state = GAMEOVER_INACTIVE;
|
||||
|
||||
+892
-63
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -663,7 +663,7 @@ void Lib_Vec3f_TranslateAndRotateY(Vec3f* translation, s16 rotAngle, Vec3f* src,
|
||||
dst->z = translation->z + (src->z * cos - src->x * sin);
|
||||
}
|
||||
|
||||
void Lib_LerpRGB(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst) {
|
||||
void Color_RGB8_Lerp(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst) {
|
||||
f32 aF;
|
||||
|
||||
aF = a->r;
|
||||
|
||||
+7
-7
@@ -257,15 +257,15 @@ void LightContext_Init(PlayState* play, LightContext* lightCtx) {
|
||||
}
|
||||
|
||||
void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b) {
|
||||
lightCtx->ambient.r = r;
|
||||
lightCtx->ambient.g = g;
|
||||
lightCtx->ambient.b = b;
|
||||
lightCtx->ambientColor[0] = r;
|
||||
lightCtx->ambientColor[1] = g;
|
||||
lightCtx->ambientColor[2] = b;
|
||||
}
|
||||
|
||||
void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 near, s16 far) {
|
||||
lightCtx->fogColor.r = r;
|
||||
lightCtx->fogColor.g = g;
|
||||
lightCtx->fogColor.b = b;
|
||||
lightCtx->fogColor[0] = r;
|
||||
lightCtx->fogColor[1] = g;
|
||||
lightCtx->fogColor[2] = b;
|
||||
lightCtx->fogNear = near;
|
||||
lightCtx->zFar = far;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 near, s16
|
||||
* Allocate a new Lights group and initilize the ambient color with that provided by LightContext
|
||||
*/
|
||||
Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx) {
|
||||
return Lights_New(gfxCtx, lightCtx->ambient.r, lightCtx->ambient.g, lightCtx->ambient.b);
|
||||
return Lights_New(gfxCtx, lightCtx->ambientColor[0], lightCtx->ambientColor[1], lightCtx->ambientColor[2]);
|
||||
}
|
||||
|
||||
void LightContext_InitList(PlayState* play, LightContext* lightCtx) {
|
||||
|
||||
@@ -5432,7 +5432,7 @@ void Interface_StartMoonCrash(PlayState* play) {
|
||||
}
|
||||
|
||||
gSaveContext.save.day = 4;
|
||||
gSaveContext.save.daysElapsed = 4;
|
||||
gSaveContext.save.eventDayCount = 4;
|
||||
gSaveContext.save.time = CLOCK_TIME(6, 0) + 10;
|
||||
play->nextEntrance = ENTRANCE(TERMINA_FIELD, 12);
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
|
||||
+25
-25
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z64.h"
|
||||
#include "regs.h"
|
||||
#include "functions.h"
|
||||
@@ -360,8 +361,8 @@ void Play_ClearTransition(PlayState* this) {
|
||||
Gfx* Play_SetFog(PlayState* this, Gfx* gfx) {
|
||||
s32 fogFar = this->lightCtx.zFar * (5.0f / 64.0f);
|
||||
|
||||
return Gfx_SetFogWithSync(gfx, this->lightCtx.fogColor.r, this->lightCtx.fogColor.g, this->lightCtx.fogColor.b, 0,
|
||||
this->lightCtx.fogNear, ((fogFar <= 1000) ? 1000 : fogFar));
|
||||
return Gfx_SetFogWithSync(gfx, this->lightCtx.fogColor[0], this->lightCtx.fogColor[1], this->lightCtx.fogColor[2],
|
||||
0, this->lightCtx.fogNear, ((fogFar <= 1000) ? 1000 : fogFar));
|
||||
}
|
||||
|
||||
void Play_Destroy(GameState* thisx) {
|
||||
@@ -524,7 +525,7 @@ void Play_UpdateWaterCamera(PlayState* this, Camera* camera) {
|
||||
}
|
||||
|
||||
func_801A3EC0(0x20);
|
||||
func_800F6834(this, lightIndex);
|
||||
Environment_EnableUnderwaterLights(this, lightIndex);
|
||||
|
||||
if ((sQuakeIndex == -1) || (Quake_GetTimeLeft(sQuakeIndex) == 10)) {
|
||||
s16 quakeIndex = Quake_Request(camera, QUAKE_TYPE_5);
|
||||
@@ -553,7 +554,7 @@ void Play_UpdateWaterCamera(PlayState* this, Camera* camera) {
|
||||
if (sQuakeIndex != 0) {
|
||||
Quake_RemoveRequest(sQuakeIndex);
|
||||
}
|
||||
func_800F694C(this);
|
||||
Environment_DisableUnderwaterLights(this);
|
||||
func_801A3EC0(0);
|
||||
}
|
||||
}
|
||||
@@ -585,20 +586,20 @@ void Play_UpdateTransition(PlayState* this) {
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE)) ||
|
||||
((this->nextEntrance == ENTRANCE(ROAD_TO_IKANA, 1)) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE))) &&
|
||||
(!func_800FE590(this) || (Entrance_GetSceneId(this->nextEntrance + sceneLayer) < 0) ||
|
||||
(!Environment_IsFinalHours(this) || (Entrance_GetSceneId(this->nextEntrance + sceneLayer) < 0) ||
|
||||
(AudioSeq_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_FINAL_HOURS))) {
|
||||
func_801A4058(20);
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
|
||||
}
|
||||
|
||||
if (func_800FD768()) {
|
||||
if (Environment_IsForcedSequenceDisabled()) {
|
||||
func_801A4058(20);
|
||||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
|
||||
}
|
||||
|
||||
if (func_800FE590(this) && (Entrance_GetSceneId(this->nextEntrance + sceneLayer) >= 0) &&
|
||||
if (Environment_IsFinalHours(this) && (Entrance_GetSceneId(this->nextEntrance + sceneLayer) >= 0) &&
|
||||
(AudioSeq_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) == NA_BGM_FINAL_HOURS)) {
|
||||
func_801A41C8(20);
|
||||
}
|
||||
@@ -824,10 +825,10 @@ void Play_UpdateTransition(PlayState* this) {
|
||||
|
||||
case TRANS_MODE_SANDSTORM_INIT:
|
||||
if (this->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
this->envCtx.sandstormState = 1;
|
||||
this->envCtx.sandstormState = SANDSTORM_FILL;
|
||||
this->transitionMode = TRANS_MODE_SANDSTORM;
|
||||
} else {
|
||||
this->envCtx.sandstormState = 2;
|
||||
this->envCtx.sandstormState = SANDSTORM_UNFILL;
|
||||
this->envCtx.sandstormPrimA = 255;
|
||||
this->envCtx.sandstormEnvA = 255;
|
||||
this->transitionMode = TRANS_MODE_SANDSTORM;
|
||||
@@ -856,7 +857,7 @@ void Play_UpdateTransition(PlayState* this) {
|
||||
|
||||
case TRANS_MODE_SANDSTORM_END_INIT:
|
||||
if (this->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
this->envCtx.sandstormState = 4;
|
||||
this->envCtx.sandstormState = SANDSTORM_DISSIPATE;
|
||||
this->envCtx.sandstormPrimA = 255;
|
||||
this->envCtx.sandstormEnvA = 255;
|
||||
|
||||
@@ -1144,8 +1145,8 @@ void Play_DrawMain(PlayState* this) {
|
||||
if (this->skyboxCtx.skyboxShouldDraw || (this->roomCtx.curRoom.roomShape->base.type == ROOM_SHAPE_TYPE_IMAGE)) {
|
||||
func_8012CF0C(gfxCtx, false, true, 0, 0, 0);
|
||||
} else {
|
||||
func_8012CF0C(gfxCtx, true, true, this->lightCtx.fogColor.r, this->lightCtx.fogColor.g,
|
||||
this->lightCtx.fogColor.b);
|
||||
func_8012CF0C(gfxCtx, true, true, this->lightCtx.fogColor[0], this->lightCtx.fogColor[1],
|
||||
this->lightCtx.fogColor[2]);
|
||||
}
|
||||
} else {
|
||||
func_8012CF0C(gfxCtx, false, false, 0, 0, 0);
|
||||
@@ -1292,7 +1293,7 @@ void Play_DrawMain(PlayState* this) {
|
||||
}
|
||||
}
|
||||
|
||||
func_800FE390(this);
|
||||
Environment_Draw(this);
|
||||
}
|
||||
|
||||
sp268 = LightContext_NewLights(&this->lightCtx, gfxCtx);
|
||||
@@ -1324,8 +1325,7 @@ void Play_DrawMain(PlayState* this) {
|
||||
}
|
||||
}
|
||||
|
||||
// envCtx.precipitation[PRECIP_RAIN_CUR]
|
||||
if (this->envCtx.unk_F2[1] != 0) {
|
||||
if (this->envCtx.precipitation[PRECIP_RAIN_CUR] != 0) {
|
||||
Environment_DrawRain(this, &this->view, gfxCtx);
|
||||
}
|
||||
}
|
||||
@@ -1339,7 +1339,7 @@ void Play_DrawMain(PlayState* this) {
|
||||
}
|
||||
|
||||
if (1) {
|
||||
if (!this->envCtx.sunMoonDisabled) {
|
||||
if (!this->envCtx.sunDisabled) {
|
||||
sp25C.x = this->view.eye.x + this->envCtx.sunPos.x;
|
||||
sp25C.y = this->view.eye.y + this->envCtx.sunPos.y;
|
||||
sp25C.z = this->view.eye.z + this->envCtx.sunPos.z;
|
||||
@@ -1367,7 +1367,7 @@ void Play_DrawMain(PlayState* this) {
|
||||
}
|
||||
|
||||
if (1) {
|
||||
if (this->envCtx.sandstormState != 0) {
|
||||
if (this->envCtx.sandstormState != SANDSTORM_OFF) {
|
||||
Environment_DrawSandstorm(this, this->envCtx.sandstormState);
|
||||
}
|
||||
}
|
||||
@@ -1440,7 +1440,7 @@ SkipPostWorldDraw:
|
||||
}
|
||||
|
||||
if (!sp25B) {
|
||||
func_800FE3E0(this);
|
||||
Environment_DrawSkyboxStars(this);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
@@ -2217,7 +2217,7 @@ void Play_Init(GameState* thisx) {
|
||||
gSaveContext.save.cutsceneIndex = 0;
|
||||
}
|
||||
|
||||
if (gSaveContext.nextDayTime != 0xFFFF) {
|
||||
if (gSaveContext.nextDayTime != NEXT_TIME_NONE) {
|
||||
gSaveContext.save.time = gSaveContext.nextDayTime;
|
||||
gSaveContext.skyboxTime = gSaveContext.nextDayTime;
|
||||
}
|
||||
@@ -2250,14 +2250,14 @@ void Play_Init(GameState* thisx) {
|
||||
KaleidoScopeCall_Init(this);
|
||||
Interface_Init(this);
|
||||
|
||||
if (gSaveContext.nextDayTime != 0xFFFF) {
|
||||
if (gSaveContext.nextDayTime == 0x8000) {
|
||||
if (gSaveContext.nextDayTime != NEXT_TIME_NONE) {
|
||||
if (gSaveContext.nextDayTime == NEXT_TIME_DAY) {
|
||||
gSaveContext.save.day++;
|
||||
gSaveContext.save.daysElapsed++;
|
||||
gSaveContext.save.eventDayCount++;
|
||||
gSaveContext.dogIsLost = true;
|
||||
gSaveContext.nextDayTime = -2;
|
||||
gSaveContext.nextDayTime = NEXT_TIME_DAY_SET;
|
||||
} else {
|
||||
gSaveContext.nextDayTime = -3;
|
||||
gSaveContext.nextDayTime = NEXT_TIME_NIGHT_SET;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2348,7 +2348,7 @@ void Play_Init(GameState* thisx) {
|
||||
|
||||
CutsceneManager_StoreCamera(&this->mainCamera);
|
||||
Interface_SetSceneRestrictions(this);
|
||||
func_800FB758(this);
|
||||
Environment_PlaySceneSequence(this);
|
||||
gSaveContext.seqId = this->sequenceCtx.seqId;
|
||||
gSaveContext.ambienceId = this->sequenceCtx.ambienceId;
|
||||
AnimationContext_Update(this, &this->animationCtx);
|
||||
|
||||
+4
-4
@@ -581,12 +581,12 @@ s32 Room_HandleLoadCallbacks(PlayState* play, RoomContext* roomCtx) {
|
||||
Actor_SpawnTransitionActors(play, &play->actorCtx);
|
||||
|
||||
if (((play->sceneId != SCENE_IKANA) || (roomCtx->curRoom.num != 1)) && (play->sceneId != SCENE_IKNINSIDE)) {
|
||||
play->envCtx.lightSettingOverride = 0xFF;
|
||||
play->envCtx.unk_E0 = 0;
|
||||
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
|
||||
play->envCtx.lightBlendOverride = LIGHT_BLEND_OVERRIDE_NONE;
|
||||
}
|
||||
func_800FEAB0();
|
||||
if (!func_800FE4B8(play)) {
|
||||
func_800FD858(play);
|
||||
if (Environment_GetStormState(play) == STORM_STATE_OFF) {
|
||||
Environment_StopStormNatureAmbience(play);
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
|
||||
+5
-5
@@ -255,7 +255,7 @@ void Scene_CommandRoomBehavior(PlayState* play, SceneCmd* cmd) {
|
||||
play->roomCtx.curRoom.lensMode = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
|
||||
play->msgCtx.unk12044 = (cmd->roomBehavior.gpFlag2 >> 0xA) & 1;
|
||||
play->roomCtx.curRoom.enablePosLights = (cmd->roomBehavior.gpFlag2 >> 0xB) & 1;
|
||||
play->envCtx.unk_E2 = (cmd->roomBehavior.gpFlag2 >> 0xC) & 1;
|
||||
play->envCtx.stormState = (cmd->roomBehavior.gpFlag2 >> 0xC) & 1;
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x0A: Mesh Header
|
||||
@@ -386,7 +386,7 @@ void Scene_CommandSkyboxSettings(PlayState* play, SceneCmd* cmd) {
|
||||
// SceneTableEntry Header Command 0x12: Skybox Disables
|
||||
void Scene_CommandSkyboxDisables(PlayState* play, SceneCmd* cmd) {
|
||||
play->envCtx.skyboxDisabled = cmd->skyboxDisables.unk4;
|
||||
play->envCtx.sunMoonDisabled = cmd->skyboxDisables.unk5;
|
||||
play->envCtx.sunDisabled = cmd->skyboxDisables.unk5;
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x10: Time Settings
|
||||
@@ -436,9 +436,9 @@ void Scene_CommandWindSettings(PlayState* play, SceneCmd* cmd) {
|
||||
s8 temp2 = cmd->windSettings.vertical;
|
||||
s8 temp3 = cmd->windSettings.south;
|
||||
|
||||
play->envCtx.windDir.x = temp1;
|
||||
play->envCtx.windDir.y = temp2;
|
||||
play->envCtx.windDir.z = temp3;
|
||||
play->envCtx.windDirection.x = temp1;
|
||||
play->envCtx.windDirection.y = temp2;
|
||||
play->envCtx.windDirection.z = temp3;
|
||||
play->envCtx.windSpeed = cmd->windSettings.clothIntensity;
|
||||
}
|
||||
|
||||
|
||||
@@ -430,7 +430,7 @@ void Sram_SaveEndOfCycle(PlayState* play) {
|
||||
u8 item;
|
||||
|
||||
gSaveContext.save.timeSpeedOffset = 0;
|
||||
gSaveContext.save.daysElapsed = 0;
|
||||
gSaveContext.save.eventDayCount = 0;
|
||||
gSaveContext.save.day = 0;
|
||||
gSaveContext.save.time = CLOCK_TIME(6, 0) - 1;
|
||||
|
||||
@@ -650,7 +650,7 @@ void Sram_SaveEndOfCycle(PlayState* play) {
|
||||
void Sram_IncrementDay(void) {
|
||||
if (CURRENT_DAY <= 3) {
|
||||
gSaveContext.save.day++;
|
||||
gSaveContext.save.daysElapsed++;
|
||||
gSaveContext.save.eventDayCount++;
|
||||
}
|
||||
|
||||
gSaveContext.save.saveInfo.bombersCaughtNum = 0;
|
||||
@@ -918,7 +918,7 @@ u16 sSaveDefaultChecksum = 0;
|
||||
*/
|
||||
void Sram_InitNewSave(void) {
|
||||
gSaveContext.save.playerForm = PLAYER_FORM_HUMAN;
|
||||
gSaveContext.save.daysElapsed = 0;
|
||||
gSaveContext.save.eventDayCount = 0;
|
||||
gSaveContext.save.day = 0;
|
||||
gSaveContext.save.time = CLOCK_TIME(6, 0) - 1;
|
||||
Sram_ResetSave();
|
||||
|
||||
Reference in New Issue
Block a user