diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2024-12-26 07:14:55 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-26 08:14:55 -0700 |
| commit | bececbff99bd2bb208a811c100c8f79ebbecc77d (patch) | |
| tree | e2e3e00ac3d9aa866c727197e20c6f6b0201f24b /src/overlays | |
| parent | 60579a4260965c1de2e8a8f320fe9f8c3f5d2dde (diff) | |
main OK (#234)
* main OK
* gSegments -> SegmentBaseAddress
* newline
* format
Diffstat (limited to 'src/overlays')
| -rw-r--r-- | src/overlays/actors/ovl_Dump/ac_dump.c | 2 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Goza/ac_goza.c | 2 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Kago/ac_kago.c | 2 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Koinobori/ac_koinobori.c | 8 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Mikuji/ac_mikuji.c | 2 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Radio/ac_radio.c | 2 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Tama/ac_tama.c | 2 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Toudai/ac_toudai.c | 6 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Weather/ac_weather.c | 4 | ||||
| -rw-r--r-- | src/overlays/gamestates/ovl_cpedit/m_cpedit.c | 2 | ||||
| -rw-r--r-- | src/overlays/gamestates/ovl_play/m_play.c | 10 |
11 files changed, 22 insertions, 20 deletions
diff --git a/src/overlays/actors/ovl_Dump/ac_dump.c b/src/overlays/actors/ovl_Dump/ac_dump.c index 9897276..a58e8d1 100644 --- a/src/overlays/actors/ovl_Dump/ac_dump.c +++ b/src/overlays/actors/ovl_Dump/ac_dump.c @@ -186,7 +186,7 @@ void aDUM_actor_draw(UNUSED Actor* thisx, Game_Play* game_play) { OPEN_POLY_OPA_DISP(gfxCtx); gSPSegment(__polyOpa++, 0x08, palette); - gSegments[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object); + SegmentBaseAddress[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object); gSPSegment(__polyOpa++, 0x06, object); Matrix_translate(-6000.0f, 0.0f, -10000.0f, 1); diff --git a/src/overlays/actors/ovl_Goza/ac_goza.c b/src/overlays/actors/ovl_Goza/ac_goza.c index 59adcc8..d3a4f37 100644 --- a/src/overlays/actors/ovl_Goza/ac_goza.c +++ b/src/overlays/actors/ovl_Goza/ac_goza.c @@ -150,7 +150,7 @@ void aGOZ_actor_draw(Actor* thisx UNUSED, Game_Play* game_play) { OPEN_SHADOW_DISP(gfxCtx); gSPSegment(__shadow_gfx++, G_MWO_SEGMENT_8, palette); - gSegments[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object); + SegmentBaseAddress[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object); gSPSegment(__shadow_gfx++, G_MWO_SEGMENT_6, object); gDPSetPrimColor(__shadow_gfx++, 0, 0x80, 255, 255, 255, 255); diff --git a/src/overlays/actors/ovl_Kago/ac_kago.c b/src/overlays/actors/ovl_Kago/ac_kago.c index 60867fb..de03554 100644 --- a/src/overlays/actors/ovl_Kago/ac_kago.c +++ b/src/overlays/actors/ovl_Kago/ac_kago.c @@ -125,7 +125,7 @@ void aKAG_actor_draw(Actor* thisx, Game_Play* game_play) { _texture_z_light_fog_prim(gfxCtx); OPEN_POLY_OPA_DISP(gfxCtx); gSPSegment(__polyOpa++, 0x08, palette); - gSegments[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object); + SegmentBaseAddress[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object); gSPSegment(__polyOpa++, 0x06, object); gSPMatrix(__polyOpa++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(__polyOpa++, model[this->structureActor.unk_2B4]); diff --git a/src/overlays/actors/ovl_Koinobori/ac_koinobori.c b/src/overlays/actors/ovl_Koinobori/ac_koinobori.c index c92b162..8b5511d 100644 --- a/src/overlays/actors/ovl_Koinobori/ac_koinobori.c +++ b/src/overlays/actors/ovl_Koinobori/ac_koinobori.c @@ -44,7 +44,8 @@ ShadowData aKOI_shadow_data = { 8, aKOI_shadow_vtx_fix_flg_table, 60.0f, obj_e_k void aKOI_actor_ct(Actor* thisx, Game_Play* game_play UNUSED) { Koinobori* this = THIS; - gSegments[6] = OS_K0_TO_PHYSICAL(common_data.clip.structureClip->getObjectSegment(STRUCTURE_TYPE_KOINOBORI)); + SegmentBaseAddress[6] = + OS_K0_TO_PHYSICAL(common_data.clip.structureClip->getObjectSegment(STRUCTURE_TYPE_KOINOBORI)); cKF_SkeletonInfo_R_ct(&this->structureActor.skeletonInfo, &cKF_bs_r_obj_e_koinobori, 0, this->structureActor.jointTable, this->structureActor.morphTable); aKOI_set_bgOffset(this, 1); @@ -101,7 +102,8 @@ void aKOI_actor_move(Actor* thisx, Game_Play* game_play) { return; } - gSegments[6] = OS_K0_TO_PHYSICAL(common_data.clip.structureClip->getObjectSegment(STRUCTURE_TYPE_KOINOBORI)); + SegmentBaseAddress[6] = + OS_K0_TO_PHYSICAL(common_data.clip.structureClip->getObjectSegment(STRUCTURE_TYPE_KOINOBORI)); cKF_SkeletonInfo_R_play(&this->structureActor.skeletonInfo); ((KoinoboriActionFunc)this->structureActor.process)(this, game_play); sAdo_OngenPos((uintptr_t)this, 0x35, &this->structureActor.actor.world.pos); @@ -137,7 +139,7 @@ void aKOI_actor_draw(Actor* thisx, Game_Play* game_play) { gSPSegment(__polyOpa++, 0x08, palette); gSPSegment(__polyOpa++, 0x09, Lib_SegmentedToVirtual(&obj_e_koinobori_b_pal)); gSPSegment(__polyOpa++, 0x0A, Lib_SegmentedToVirtual(&aKOI_obj_e_koinobori_a_pal)); - gSegments[6] = OS_K0_TO_PHYSICAL(object); + SegmentBaseAddress[6] = OS_K0_TO_PHYSICAL(object); gSPSegment(__polyOpa++, 0x06, object); CLOSE_POLY_OPA_DISP(gfxCtx); cKF_Si3_draw_R_SV(game_play, &this->structureActor.skeletonInfo, mtx, NULL, NULL, this); diff --git a/src/overlays/actors/ovl_Mikuji/ac_mikuji.c b/src/overlays/actors/ovl_Mikuji/ac_mikuji.c index bf34f3c..552acce 100644 --- a/src/overlays/actors/ovl_Mikuji/ac_mikuji.c +++ b/src/overlays/actors/ovl_Mikuji/ac_mikuji.c @@ -145,7 +145,7 @@ void aMIK_actor_draw(UNUSED Actor* actor, Game_Play* play) { _texture_z_light_fog_prim_npc(graph); OPEN_POLY_OPA_DISP(graph); gSPSegment(__polyOpa++, G_MWO_SEGMENT_8, pal); - gSegments[6] = OS_K0_TO_PHYSICAL(obj); + SegmentBaseAddress[6] = OS_K0_TO_PHYSICAL(obj); gSPSegment(__polyOpa++, G_MWO_SEGMENT_6, obj); gSPMatrix(__polyOpa++, cur, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_Radio/ac_radio.c b/src/overlays/actors/ovl_Radio/ac_radio.c index 30108c9..3adca63 100644 --- a/src/overlays/actors/ovl_Radio/ac_radio.c +++ b/src/overlays/actors/ovl_Radio/ac_radio.c @@ -121,7 +121,7 @@ void aRAD_actor_draw(UNUSED Actor* thisx, Game_Play* game_play) { _texture_z_light_fog_prim_npc(gfxCtx); OPEN_POLY_OPA_DISP(gfxCtx); gSPSegment(__polyOpa++, 0x08, palette); - gSegments[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object); + SegmentBaseAddress[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object); gSPSegment(__polyOpa++, 0x06, object); gSPMatrix(__polyOpa++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(__polyOpa++, &aRAD_model); diff --git a/src/overlays/actors/ovl_Tama/ac_tama.c b/src/overlays/actors/ovl_Tama/ac_tama.c index bb1b2ec..dedd988 100644 --- a/src/overlays/actors/ovl_Tama/ac_tama.c +++ b/src/overlays/actors/ovl_Tama/ac_tama.c @@ -110,7 +110,7 @@ void aTAM_actor_draw(Actor* thisx, Game_Play* game_play) { OPEN_POLY_OPA_DISP(gfxCtx); gSPSegment(__polyOpa++, 0x08, palette); - gSegments[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object); + SegmentBaseAddress[6] = (uintptr_t)OS_PHYSICAL_TO_K0(object); gSPSegment(__polyOpa++, 0x06, object); Matrix_translate(0.0f, 0.0f, 4000.0f, 1); mtx = _Matrix_to_Mtx_new(gfxCtx); diff --git a/src/overlays/actors/ovl_Toudai/ac_toudai.c b/src/overlays/actors/ovl_Toudai/ac_toudai.c index 16cced7..3097bdb 100644 --- a/src/overlays/actors/ovl_Toudai/ac_toudai.c +++ b/src/overlays/actors/ovl_Toudai/ac_toudai.c @@ -52,7 +52,7 @@ void aTOU_actor_ct(Actor* thisx, Game_Play* game_play UNUSED) { static BaseSkeletonR* skl[] = { &cKF_bs_r_obj_s_toudai, &cKF_bs_r_obj_w_toudai }; s32 type = (common_data.time.season == WINTER); - gSegments[6] = OS_K0_TO_PHYSICAL(common_data.clip.structureClip->getObjectSegment(STRUCTURE_TYPE_TOUDAI)); + SegmentBaseAddress[6] = OS_K0_TO_PHYSICAL(common_data.clip.structureClip->getObjectSegment(STRUCTURE_TYPE_TOUDAI)); cKF_SkeletonInfo_R_ct(&this->structureActor.skeletonInfo, skl[type], NULL, this->structureActor.jointTable, this->structureActor.morphTable); aTOU_set_bgOffset(this, 1); @@ -190,7 +190,7 @@ void aTOU_setup_action(Toudai* this, s32 processIndex) { void aTOU_actor_move(Actor* thisx, Game_Play* game_play) { Toudai* this = THIS; - gSegments[6] = OS_K0_TO_PHYSICAL(common_data.clip.structureClip->getObjectSegment(STRUCTURE_TYPE_TOUDAI)); + SegmentBaseAddress[6] = OS_K0_TO_PHYSICAL(common_data.clip.structureClip->getObjectSegment(STRUCTURE_TYPE_TOUDAI)); this->structureActor.unk_174 = cKF_SkeletonInfo_R_play(&this->structureActor.skeletonInfo); this->structureActor.unk_1E8 = this->structureActor.skeletonInfo.frameControl.currentFrame; ((ToudaiActionFunc)this->structureActor.process)(this, game_play); @@ -276,7 +276,7 @@ void aTOU_actor_draw(Actor* thisx, Game_Play* game_play) { _texture_z_light_fog_prim_npc(gfxCtx); OPEN_POLY_OPA_DISP(gfxCtx); gSPSegment(__polyOpa++, 0x8, palette); - gSegments[6] = OS_K0_TO_PHYSICAL(object); + SegmentBaseAddress[6] = OS_K0_TO_PHYSICAL(object); gSPSegment(__polyOpa++, 0x6, object); CLOSE_POLY_OPA_DISP(gfxCtx); diff --git a/src/overlays/actors/ovl_Weather/ac_weather.c b/src/overlays/actors/ovl_Weather/ac_weather.c index ebbc4d4..12fa5eb 100644 --- a/src/overlays/actors/ovl_Weather/ac_weather.c +++ b/src/overlays/actors/ovl_Weather/ac_weather.c @@ -494,7 +494,7 @@ void aWeather_DrawWeatherPrv(Actor* thisx, Game_Play* play) { s32 i; _texture_z_light_fog_prim_xlu(play->state.gfxCtx); - gSegments[6] = OS_K0_TO_PHYSICAL(this->segment); + SegmentBaseAddress[6] = OS_K0_TO_PHYSICAL(this->segment); OPEN_DISPS(play->state.gfxCtx); @@ -537,7 +537,7 @@ void aWeather_MoveWeatherPrv(Weather* this, Game_Play* play) { s32 i; if ((this->currentProfile != NULL) && (priv != NULL) && (this->currentProfile->mv != NULL)) { - gSegments[6] = OS_K0_TO_PHYSICAL(this->segment); + SegmentBaseAddress[6] = OS_K0_TO_PHYSICAL(this->segment); OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/gamestates/ovl_cpedit/m_cpedit.c b/src/overlays/gamestates/ovl_cpedit/m_cpedit.c index 7b8fa00..55dc518 100644 --- a/src/overlays/gamestates/ovl_cpedit/m_cpedit.c +++ b/src/overlays/gamestates/ovl_cpedit/m_cpedit.c @@ -34,7 +34,7 @@ void func_80804930_jp(Game_CPEdit* edit) { SET_NEXT_GAMESTATE((Game*)edit, trademark_init, sizeof(Game_Trademark)); } - gSegments[4] = OS_K0_TO_PHYSICAL(segment); + SegmentBaseAddress[4] = OS_K0_TO_PHYSICAL(segment); OPEN_DISPS(graph); diff --git a/src/overlays/gamestates/ovl_play/m_play.c b/src/overlays/gamestates/ovl_play/m_play.c index 1cbd4a2..44dea63 100644 --- a/src/overlays/gamestates/ovl_play/m_play.c +++ b/src/overlays/gamestates/ovl_play/m_play.c @@ -482,8 +482,8 @@ void Game_play_move(Game_Play* game_play) { game_play->state.unk_9D = 0x8D; game_play->state.unk_9C = 1; Game_play_Reset_destiny(); - gSegments[4] = (uintptr_t)OS_K0_TO_PHYSICAL(p->status[0].segment); - gSegments[2] = (uintptr_t)OS_K0_TO_PHYSICAL(game_play->unk_010C); + SegmentBaseAddress[4] = (uintptr_t)OS_K0_TO_PHYSICAL(p->status[0].segment); + SegmentBaseAddress[2] = (uintptr_t)OS_K0_TO_PHYSICAL(game_play->unk_010C); game_play->state.unk_9C = 2; if (zurumode_flag >= 2) { @@ -536,8 +536,8 @@ void Game_play_move(Game_Play* game_play) { void func_80803810_jp(Game_Play* game_play, GraphicsContext* gfxCtx) { void* temp_v0 = game_play->objectExchangeBank.status[0].segment; - gSegments[4] = (uintptr_t)OS_K0_TO_PHYSICAL(temp_v0); - gSegments[2] = (uintptr_t)OS_K0_TO_PHYSICAL(game_play->unk_010C); + SegmentBaseAddress[4] = (uintptr_t)OS_K0_TO_PHYSICAL(temp_v0); + SegmentBaseAddress[2] = (uintptr_t)OS_K0_TO_PHYSICAL(game_play->unk_010C); OPEN_DISPS(gfxCtx); @@ -861,7 +861,7 @@ void Gameplay_Scene_Read(Game_Play* game_play, s16 arg1) { game_play->unk_00E0 = arg1; game_play->unk_010C = func_80804138_jp(game_play, sp1C); sp1C->unk_13 = 0; - gSegments[2] = (uintptr_t)OS_K0_TO_PHYSICAL(game_play->unk_010C); + SegmentBaseAddress[2] = (uintptr_t)OS_K0_TO_PHYSICAL(game_play->unk_010C); Gameplay_Scene_Init(game_play); sAdo_RoomType(mPl_SceneNo2SoundRoomType(common_data.save.sceneNo)); } |
