1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 14:31:17 +00:00

Misc. doc/cleanup 5 (#1096)

* `0` -> `CHEST_ANIM_SHORT` in `GET_ITEM` z_player macro

* fix typos in z_en_skj

Co-authored-by: Yanis42 <yalink88@gmail.com>

* `unkSkjStruct` -> `EnSkjUnkStruct`

* Use `EFFECT_SS_` enum in all `EffectSs_Spawn` calls

* Decimal for all `EffectSs_Spawn` priorities

* Use `OBJECT_INVALID` more

* `Object_IsLoaded` returns a boolean

* Add `@bug` in `DmaMgr_SendRequestImpl` about passing partially uninitialized struct

* Fix typo `forc_structure_alignment` -> "force"

* Move `CMD_F` to `z64cutscene_commands.h` since it is specifically for cutscene data

* Use `ALIGN16` macro more

* Use `ALIGN256` macro more

* Add `@bug` on two messed up 8-bytes-aligns

* Set `gSaveContext.nightFlag` to 0/1 instead of false/true

* Use `IS_DAY` macro more

* Run formatter

Co-authored-by: Yanis42 <yalink88@gmail.com>
This commit is contained in:
Dragorn421 2022-01-12 21:48:04 +01:00 committed by GitHub
parent 11917bf640
commit e5ecdfd559
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 61 additions and 59 deletions

View file

@ -238,9 +238,9 @@ void Environment_Init(GlobalContext* globalCtx2, EnvironmentContext* envCtx, s32
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
if (((void)0, gSaveContext.dayTime) > 0xC000 || ((void)0, gSaveContext.dayTime) < 0x4555) {
((void)0, gSaveContext.nightFlag = true);
((void)0, gSaveContext.nightFlag = 1);
} else {
((void)0, gSaveContext.nightFlag = false);
((void)0, gSaveContext.nightFlag = 0);
}
globalCtx->state.gfxCtx->callback = Environment_GraphCallback;
@ -820,7 +820,7 @@ void Environment_PrintDebugInfo(GlobalContext* globalCtx, Gfx** gfx) {
GfxPrint_SetColor(&printer, 55, 255, 255, 64);
GfxPrint_SetPos(&printer, 22, 6);
if (gSaveContext.nightFlag) {
if (!IS_DAY) {
GfxPrint_Printf(&printer, "%s", "YORU"); // "night"
} else {
GfxPrint_Printf(&printer, "%s", "HIRU"); // "day"
@ -881,7 +881,7 @@ void Environment_Update(GlobalContext* globalCtx, EnvironmentContext* envCtx, Li
if ((envCtx->unk_1A == 0) && !FrameAdvance_IsEnabled(globalCtx) &&
(globalCtx->transitionMode == 0 || ((void)0, gSaveContext.gameMode) != 0)) {
if (!((void)0, gSaveContext.nightFlag) || gTimeIncrement >= 0x190) {
if (IS_DAY || gTimeIncrement >= 0x190) {
gSaveContext.dayTime += gTimeIncrement;
} else {
gSaveContext.dayTime += gTimeIncrement * 2; // time moves twice as fast at night
@ -900,9 +900,9 @@ void Environment_Update(GlobalContext* globalCtx, EnvironmentContext* envCtx, Li
time = gSaveContext.dayTime;
if (time > 0xC000 || time < 0x4555) {
gSaveContext.nightFlag = true;
gSaveContext.nightFlag = 1;
} else {
gSaveContext.nightFlag = false;
gSaveContext.nightFlag = 0;
}
if (SREG(0) != 0 || CREG(2) != 0) {