1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-12 01:40:47 +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

@ -2517,12 +2517,13 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
pauseCtx->unk_204 = -314.0f;
//! @bug messed up alignment, should match `ALIGN64`
pauseCtx->playerSegment = (void*)(((u32)globalCtx->objectCtx.spaceStart + 0x30) & ~0x3F);
size1 = func_80091738(globalCtx, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime);
osSyncPrintf("プレイヤー size1%x\n", size1);
pauseCtx->iconItemSegment = (void*)(((u32)pauseCtx->playerSegment + size1 + 0xF) & ~0xF);
pauseCtx->iconItemSegment = (void*)ALIGN16((u32)pauseCtx->playerSegment + size1);
size0 = (u32)_icon_item_staticSegmentRomEnd - (u32)_icon_item_staticSegmentRomStart;
osSyncPrintf("icon_item size0=%x\n", size0);
@ -2537,14 +2538,14 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
}
}
pauseCtx->iconItem24Segment = (void*)(((u32)pauseCtx->iconItemSegment + size0 + 0xF) & ~0xF);
pauseCtx->iconItem24Segment = (void*)ALIGN16((u32)pauseCtx->iconItemSegment + size0);
size = (u32)_icon_item_24_staticSegmentRomEnd - (u32)_icon_item_24_staticSegmentRomStart;
osSyncPrintf("icon_item24 size=%x\n", size);
DmaMgr_SendRequest1(pauseCtx->iconItem24Segment, (u32)_icon_item_24_staticSegmentRomStart, size,
"../z_kaleido_scope_PAL.c", 3675);
pauseCtx->iconItemAltSegment = (void*)(((u32)pauseCtx->iconItem24Segment + size + 0xF) & ~0xF);
pauseCtx->iconItemAltSegment = (void*)ALIGN16((u32)pauseCtx->iconItem24Segment + size);
switch (globalCtx->sceneNum) {
case SCENE_YDAN:
@ -2585,7 +2586,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
break;
}
pauseCtx->iconItemLangSegment = (void*)(((u32)pauseCtx->iconItemAltSegment + size2 + 0xF) & ~0xF);
pauseCtx->iconItemLangSegment = (void*)ALIGN16((u32)pauseCtx->iconItemAltSegment + size2);
if (gSaveContext.language == LANGUAGE_ENG) {
size = (u32)_icon_item_nes_staticSegmentRomEnd - (u32)_icon_item_nes_staticSegmentRomStart;
@ -2604,7 +2605,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
"../z_kaleido_scope_PAL.c", 3753);
}
pauseCtx->nameSegment = (void*)(((u32)pauseCtx->iconItemLangSegment + size + 0xF) & ~0xF);
pauseCtx->nameSegment = (void*)ALIGN16((u32)pauseCtx->iconItemLangSegment + size);
osSyncPrintf("サイズ=%x\n", size2 + size1 + size0 + size);
osSyncPrintf("item_name I_N_PT=%x\n", 0x800);
@ -2630,7 +2631,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
}
}
sPreRenderCvg = (void*)(((u32)pauseCtx->nameSegment + 0x400 + 0xA00 + 0xF) & ~0xF);
sPreRenderCvg = (void*)ALIGN16((u32)pauseCtx->nameSegment + 0x400 + 0xA00);
PreRender_Init(&sPlayerPreRender);
PreRender_SetValuesSave(&sPlayerPreRender, 64, 112, pauseCtx->playerSegment, NULL, sPreRenderCvg);
@ -3128,25 +3129,26 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
pauseCtx->unk_204 = -434.0f;
Interface_ChangeAlpha(1);
//! @bug messed up alignment, should match `ALIGN64`
pauseCtx->iconItemSegment = (void*)(((u32)globalCtx->objectCtx.spaceStart + 0x30) & ~0x3F);
size0 = (u32)_icon_item_staticSegmentRomEnd - (u32)_icon_item_staticSegmentRomStart;
osSyncPrintf("icon_item size0=%x\n", size0);
DmaMgr_SendRequest1(pauseCtx->iconItemSegment, (u32)_icon_item_staticSegmentRomStart, size0,
"../z_kaleido_scope_PAL.c", 4356);
pauseCtx->iconItem24Segment = (void*)(((u32)pauseCtx->iconItemSegment + size0 + 0xF) & ~0xF);
pauseCtx->iconItem24Segment = (void*)ALIGN16((u32)pauseCtx->iconItemSegment + size0);
size = (u32)_icon_item_24_staticSegmentRomEnd - (u32)_icon_item_24_staticSegmentRomStart;
osSyncPrintf("icon_item24 size=%x\n", size);
DmaMgr_SendRequest1(pauseCtx->iconItem24Segment, (u32)_icon_item_24_staticSegmentRomStart, size,
"../z_kaleido_scope_PAL.c", 4363);
pauseCtx->iconItemAltSegment = (void*)(((u32)pauseCtx->iconItem24Segment + size + 0xF) & ~0xF);
pauseCtx->iconItemAltSegment = (void*)ALIGN16((u32)pauseCtx->iconItem24Segment + size);
size2 = (u32)_icon_item_gameover_staticSegmentRomEnd - (u32)_icon_item_gameover_staticSegmentRomStart;
osSyncPrintf("icon_item_dungeon gameover-size2=%x\n", size2);
DmaMgr_SendRequest1(pauseCtx->iconItemAltSegment, (u32)_icon_item_gameover_staticSegmentRomStart, size2,
"../z_kaleido_scope_PAL.c", 4370);
pauseCtx->iconItemLangSegment = (void*)(((u32)pauseCtx->iconItemAltSegment + size2 + 0xF) & ~0xF);
pauseCtx->iconItemLangSegment = (void*)ALIGN16((u32)pauseCtx->iconItemAltSegment + size2);
if (gSaveContext.language == LANGUAGE_ENG) {
size = (u32)_icon_item_nes_staticSegmentRomEnd - (u32)_icon_item_nes_staticSegmentRomStart;