1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-09 18:43:45 +00:00

use official macros, delete old ones

This commit is contained in:
fig02 2025-04-23 18:34:25 -04:00
parent 680ba667c7
commit 1083527da7
35 changed files with 85 additions and 88 deletions

View file

@ -24,9 +24,6 @@
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNT_2D(arr) (s32)(sizeof(arr) / sizeof(arr[0][0]))
#define PHYSICAL_TO_VIRTUAL(addr) (void*)((uintptr_t)(addr) + 0x80000000)
#define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - 0x80000000)
#define ABS(x) ((x) >= 0 ? (x) : -(x))
#define DECR(x) ((x) == 0 ? 0 : --(x))
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))

View file

@ -59,7 +59,7 @@ typedef void (*UcodeDisasCallback)(UCodeDisas*, u32);
void* UCodeDisas_TranslateAddr(UCodeDisas* this, uintptr_t addr) {
uintptr_t physical = this->segments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr);
return PHYSICAL_TO_VIRTUAL(physical);
return OS_PHYSICAL_TO_K0(physical);
}
F3dzexConst sUCodeDisasGeometryModes[] = {

View file

@ -929,7 +929,7 @@ void Actor_SetScale(Actor* actor, f32 scale) {
}
void Actor_SetObjectDependency(PlayState* play, Actor* actor) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[actor->objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[actor->objectSlot].segment);
}
void Actor_Init(Actor* actor, PlayState* play) {

View file

@ -70,7 +70,7 @@ void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture) {
SkinMatrix_SetScale(&mfScale, scale, scale, scale);
SkinMatrix_MtxFMtxFMult(&mfTrans, &play->billboardMtxF, &mfTransBillboard);
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfScale, &mfResult);
gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);

View file

@ -46,12 +46,12 @@ void Jpeg_ScheduleDecoderTask(JpegContext* ctx) {
JpegWork* workBuf = ctx->workBuf;
s32 pad[2];
workBuf->taskData.address = VIRTUAL_TO_PHYSICAL(&workBuf->data);
workBuf->taskData.address = OS_K0_TO_PHYSICAL(&workBuf->data);
workBuf->taskData.mode = ctx->mode;
workBuf->taskData.mbCount = 4;
workBuf->taskData.qTableYPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableY);
workBuf->taskData.qTableUPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableU);
workBuf->taskData.qTableVPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableV);
workBuf->taskData.qTableYPtr = OS_K0_TO_PHYSICAL(&workBuf->qTableY);
workBuf->taskData.qTableUPtr = OS_K0_TO_PHYSICAL(&workBuf->qTableU);
workBuf->taskData.qTableVPtr = OS_K0_TO_PHYSICAL(&workBuf->qTableV);
sJpegTask.t.flags = 0;
sJpegTask.t.ucode_boot = SysUcode_GetUCodeBoot();

View file

@ -2161,7 +2161,7 @@ void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 l
DO_ACTION_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 2145);
osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK);
} else {
gSegments[7] = VIRTUAL_TO_PHYSICAL(interfaceCtx->doActionSegment);
gSegments[7] = OS_K0_TO_PHYSICAL(interfaceCtx->doActionSegment);
func_80086D5C(SEGMENTED_TO_VIRTUAL(sDoActionTextures[loadOffset]), DO_ACTION_TEX_SIZE / 4);
}
}

View file

@ -582,9 +582,9 @@ void Play_Update(PlayState* this) {
}
#endif
gSegments[4] = VIRTUAL_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
gSegments[5] = VIRTUAL_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
gSegments[2] = VIRTUAL_TO_PHYSICAL(this->sceneSegment);
gSegments[4] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
gSegments[5] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
gSegments[2] = OS_K0_TO_PHYSICAL(this->sceneSegment);
if (FrameAdvance_Update(&this->frameAdvCtx, &input[1])) {
if ((this->transitionMode == TRANS_MODE_OFF) && (this->transitionTrigger != TRANS_TRIGGER_OFF)) {
@ -1143,9 +1143,9 @@ void Play_Draw(PlayState* this) {
OPEN_DISPS(gfxCtx, "../z_play.c", 3907);
gSegments[4] = VIRTUAL_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
gSegments[5] = VIRTUAL_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
gSegments[2] = VIRTUAL_TO_PHYSICAL(this->sceneSegment);
gSegments[4] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
gSegments[5] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
gSegments[2] = OS_K0_TO_PHYSICAL(this->sceneSegment);
gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
gSPSegment(POLY_XLU_DISP++, 0x00, NULL);
@ -1604,7 +1604,7 @@ void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn) {
ASSERT(this->sceneSegment != NULL, "this->sceneSegment != NULL", "../z_play.c", 4960);
gSegments[2] = VIRTUAL_TO_PHYSICAL(this->sceneSegment);
gSegments[2] = OS_K0_TO_PHYSICAL(this->sceneSegment);
Play_InitScene(this, spawn);

View file

@ -1525,7 +1525,7 @@ void Player_DrawGetItemImpl(PlayState* play, Player* this, Vec3f* refPos, s32 dr
OPEN_DISPS(play->state.gfxCtx, "../z_player_lib.c", 2401);
gSegments[6] = VIRTUAL_TO_PHYSICAL(this->giObjectSegment);
gSegments[6] = OS_K0_TO_PHYSICAL(this->giObjectSegment);
gSPSegment(POLY_OPA_DISP++, 0x06, this->giObjectSegment);
gSPSegment(POLY_XLU_DISP++, 0x06, this->giObjectSegment);
@ -1879,9 +1879,9 @@ u32 Player_InitPauseDrawData(PlayState* play, u8* segment, SkelAnime* skelAnime)
ptr = (void*)ALIGN16((uintptr_t)ptr + size);
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE);
gSegments[4] = OS_K0_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE);
gSegments[6] =
VIRTUAL_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE + PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE);
OS_K0_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE + PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE);
SkelAnime_InitLink(play, skelAnime, gPlayerSkelHeaders[(void)0, gSaveContext.save.linkAge],
&gPlayerAnim_link_normal_wait, 9, ptr, ptr, PLAYER_LIMB_MAX);
@ -2057,9 +2057,9 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
Vec3s* srcTable;
s32 i;
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE);
gSegments[4] = OS_K0_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE);
gSegments[6] =
VIRTUAL_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE + PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE);
OS_K0_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE + PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE);
if (!LINK_IS_ADULT) {
if (shield == PLAYER_SHIELD_DEKU) {

View file

@ -713,7 +713,7 @@ s32 Room_ProcessRoomRequest(PlayState* play, RoomContext* roomCtx) {
if (osRecvMesg(&roomCtx->loadQueue, NULL, OS_MESG_NOBLOCK) == 0) {
roomCtx->status = 0;
roomCtx->curRoom.segment = roomCtx->roomRequestAddr;
gSegments[3] = VIRTUAL_TO_PHYSICAL(roomCtx->curRoom.segment);
gSegments[3] = OS_K0_TO_PHYSICAL(roomCtx->curRoom.segment);
Scene_ExecuteCommands(play, roomCtx->curRoom.segment);
Player_SetBootData(play, GET_PLAYER(play));
@ -728,7 +728,7 @@ s32 Room_ProcessRoomRequest(PlayState* play, RoomContext* roomCtx) {
void Room_Draw(PlayState* play, Room* room, u32 flags) {
if (room->segment != NULL) {
gSegments[3] = VIRTUAL_TO_PHYSICAL(room->segment);
gSegments[3] = OS_K0_TO_PHYSICAL(room->segment);
ASSERT(room->roomShape->base.type < ARRAY_COUNTU(sRoomDrawHandlers),
"this->ground_shape->polygon.type < number(Room_Draw_Proc)", "../z_room.c", 1125);
sRoomDrawHandlers[room->roomShape->base.type](play, room, flags);

View file

@ -106,7 +106,7 @@ void Object_InitContext(PlayState* play, ObjectContext* objectCtx) {
objectCtx->spaceEnd = (void*)((uintptr_t)objectCtx->spaceStart + spaceSize);
objectCtx->mainKeepSlot = Object_SpawnPersistent(objectCtx, OBJECT_GAMEPLAY_KEEP);
gSegments[4] = VIRTUAL_TO_PHYSICAL(objectCtx->slots[objectCtx->mainKeepSlot].segment);
gSegments[4] = OS_K0_TO_PHYSICAL(objectCtx->slots[objectCtx->mainKeepSlot].segment);
}
void Object_UpdateEntries(ObjectContext* objectCtx) {
@ -262,7 +262,7 @@ BAD_RETURN(s32) Scene_CommandSpawnList(PlayState* play, SceneCmd* cmd) {
BAD_RETURN(s32) Scene_CommandSpecialFiles(PlayState* play, SceneCmd* cmd) {
if (cmd->specialFiles.keepObjectId != OBJECT_INVALID) {
play->objectCtx.subKeepSlot = Object_SpawnPersistent(&play->objectCtx, cmd->specialFiles.keepObjectId);
gSegments[5] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[play->objectCtx.subKeepSlot].segment);
gSegments[5] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[play->objectCtx.subKeepSlot].segment);
}
if (cmd->specialFiles.naviQuestHintFileId != NAVI_QUEST_HINTS_NONE) {

View file

@ -117,7 +117,7 @@ void BgMjin_Draw(Actor* thisx, PlayState* play) {
s32 objectSlot = Object_GetSlot(&play->objectCtx, sObjectIds[thisx->params - 1]);
if (objectSlot >= 0) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
}
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&D_06000000));

View file

@ -99,7 +99,7 @@ void func_808AC2BC(BgSpot01Objects2* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
PRINTF(T("-----バンク切り換え成功!!\n", "----- Successful bank switching!!\n"));
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
this->dyna.actor.objectSlot = this->requiredObjectSlot;
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);

View file

@ -359,7 +359,7 @@ void BossGanon_SetColliderPos(Vec3f* pos, ColliderCylinder* collider) {
void BossGanon_SetAnimationObject(BossGanon* this, PlayState* play, s32 objectId) {
this->animObjectSlot = Object_GetSlot(&play->objectCtx, objectId);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
}
static InitChainEntry sInitChain[] = {
@ -522,7 +522,7 @@ void BossGanon_SetupIntroCutscene(BossGanon* this, PlayState* play) {
this->actionFunc = BossGanon_IntroCutscene;
this->unk_198 = 1;
this->animObjectSlot = animObjectSlot;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
Animation_MorphToLoop(&this->skelAnime, &gGanondorfPlayOrganAnim, 0.0f);
} else {
this->actionFunc = BossGanon_SetupIntroCutscene;
@ -570,7 +570,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
f32 cos;
Camera* mainCam;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
sCape->backPush = -2.0f;
sCape->backSwayMagnitude = 0.25f;
@ -1117,7 +1117,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
if (this->csTimer == 50) {
gSegments[6] =
VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[Object_GetSlot(&play->objectCtx, OBJECT_GANON)].segment);
OS_K0_TO_PHYSICAL(play->objectCtx.slots[Object_GetSlot(&play->objectCtx, OBJECT_GANON)].segment);
if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GANONDORF_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gGanondorfTitleCardTex),
@ -1207,7 +1207,7 @@ void BossGanon_SetupDeathCutscene(BossGanon* this, PlayState* play) {
this->csTimer = this->csState = 0;
this->unk_198 = 1;
this->animObjectSlot = animObjectSlot;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfDefeatedStartAnim, 0.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfDefeatedStartAnim);
this->unk_508 = 0.0f;
@ -1220,7 +1220,7 @@ void BossGanon_SetupTowerCutscene(BossGanon* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, animObjectSlot)) {
this->animObjectSlot = animObjectSlot;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfDefeatedStartAnim, 0.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfDefeatedStartAnim);
this->actionFunc = BossGanon_DeathAndTowerCutscene;
@ -1255,7 +1255,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s16 pad;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
this->csTimer++;
SkelAnime_Update(&this->skelAnime);
@ -2834,7 +2834,7 @@ void BossGanon_Update(Actor* thisx, PlayState* play2) {
if ((this->actionFunc != BossGanon_IntroCutscene) && (this->actionFunc != BossGanon_DeathAndTowerCutscene)) {
BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1);
} else {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
}
if (this->windowShatterState != GDF_WINDOW_SHATTER_OFF) {

View file

@ -379,7 +379,7 @@ void BossGanon2_SetObjectSegment(BossGanon2* this, PlayState* play, s32 objectId
s32 pad;
s32 objectSlot = Object_GetSlot(&play->objectCtx, objectId);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
if (setRSPSegment) {
OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 790);
@ -1342,7 +1342,7 @@ void func_808FFDB0(BossGanon2* this, PlayState* play) {
s32 objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GANON2);
if (Object_IsLoaded(&play->objectCtx, objectSlot)) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
Animation_MorphToLoop(&this->skelAnime, &gGanonGuardIdleAnim, -10.0f);
this->actionFunc = func_808FFEBC;

View file

@ -328,7 +328,7 @@ void DemoEc_UseDrawObject(DemoEc* this, PlayState* play) {
OPEN_DISPS(gfxCtx, "../z_demo_ec.c", 662);
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[drawObjectSlot].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[drawObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[drawObjectSlot].segment);
if (!play) {}
CLOSE_DISPS(gfxCtx, "../z_demo_ec.c", 670);
@ -337,7 +337,7 @@ void DemoEc_UseDrawObject(DemoEc* this, PlayState* play) {
void DemoEc_UseAnimationObject(DemoEc* this, PlayState* play) {
s32 animObjectSlot = this->animObjectSlot;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
}
CsCmdActorCue* DemoEc_GetCue(PlayState* play, s32 cueChannel) {

View file

@ -101,7 +101,7 @@ void func_80977F80(DemoGeff* this, PlayState* play) {
OPEN_DISPS(gfxCtx, "../z_demo_geff.c", 204);
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[objectSlot].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
// Necessary to match
if (!play) {}

View file

@ -471,9 +471,9 @@ void DoorKiller_Wait(DoorKiller* this, PlayState* play) {
void DoorKiller_UpdateTexture(Actor* thisx, PlayState* play) {
DoorKiller* this = (DoorKiller*)thisx;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
this->texture = SEGMENTED_TO_VIRTUAL(this->texture);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
}
/**

View file

@ -191,7 +191,7 @@ void EnDntNomal_Destroy(Actor* thisx, PlayState* play) {
void EnDntNomal_WaitForObject(EnDntNomal* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
this->actor.objectSlot = this->requiredObjectSlot;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
this->actor.gravity = -2.0f;

View file

@ -220,7 +220,7 @@ void EnGSwitch_Break(EnGSwitch* this, PlayState* play) {
void EnGSwitch_WaitForObject(EnGSwitch* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
this->actor.objectSlot = this->requiredObjectSlot;
this->actor.draw = EnGSwitch_DrawPot;
this->actionFunc = EnGSwitch_ArcheryPot;

View file

@ -117,7 +117,7 @@ void func_80A3D838(EnGm* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->gmObjectSlot)) {
this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, 18);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->gmObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->gmObjectSlot].segment);
Animation_Change(&this->skelAnime, &object_gm_Anim_0002B8, 1.0f, 0.0f,
Animation_GetLastFrame(&object_gm_Anim_0002B8), ANIMMODE_LOOP, 0.0f);
this->actor.draw = EnGm_Draw;
@ -286,7 +286,7 @@ void func_80A3DF60(EnGm* this, PlayState* play) {
}
void func_80A3DFBC(EnGm* this, PlayState* play) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->gmObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->gmObjectSlot].segment);
this->timer++;
this->actionFunc(this, play);
this->actor.focus.rot.x = this->actor.world.rot.x;

View file

@ -93,7 +93,7 @@ void EnGuest_Update(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(play, &this->skelAnime, &gHylianMan2Skel, NULL, this->jointTable, this->morphTable, 16);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
Animation_Change(&this->skelAnime, &gObjOsAnim_42AC, 1.0f, 0.0f, Animation_GetLastFrame(&gObjOsAnim_42AC),
ANIMMODE_LOOP, 0.0f);
@ -171,7 +171,7 @@ void func_80A505CC(Actor* thisx, PlayState* play) {
Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 16);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
SkelAnime_Update(&this->skelAnime);
Actor_SetFocus(&this->actor, 60.0f);

View file

@ -1162,12 +1162,12 @@ void EnHy_Destroy(Actor* thisx, PlayState* play) {
void EnHy_WaitForObjects(EnHy* this, PlayState* play) {
if (EnHy_IsOsAnimeObjectLoaded(this, play) && EnHy_AreSkelAndHeadObjectsLoaded(this, play)) {
this->actor.objectSlot = this->objectSlotLowerSkel;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime,
sSkeletonInfo[sModelInfo[ENHY_GET_TYPE(&this->actor)].lowerSkelInfoIndex].skeleton, NULL,
this->jointTable, this->morphTable, ENHY_LIMB_MAX);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sColCylInit);
EnHy_InitCollider(this);
@ -1350,7 +1350,7 @@ void EnHy_Update(Actor* thisx, PlayState* play) {
EnHy* this = (EnHy*)thisx;
if (this->actionFunc != EnHy_WaitForObjects) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
SkelAnime_Update(&this->skelAnime);
EnHy_UpdateEyes(this);
@ -1377,7 +1377,7 @@ s32 EnHy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
if (limbIndex == ENHY_LIMB_HEAD) {
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->objectSlotHead].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotHead].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotHead].segment);
headInfoIndex = sModelInfo[ENHY_GET_TYPE(&this->actor)].headInfoIndex;
*dList = sHeadInfo[headInfoIndex].headDList;
@ -1386,7 +1386,7 @@ s32 EnHy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(eyeTex));
}
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotLowerSkel].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotLowerSkel].segment);
}
if (limbIndex == ENHY_LIMB_HEAD) {
@ -1423,7 +1423,7 @@ void EnHy_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == ENHY_LIMB_RIGHT_FOOT) {
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->objectSlotUpperSkel].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotUpperSkel].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotUpperSkel].segment);
}
if (ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_MAN_2_BALD && limbIndex == ENHY_LIMB_TORSO) {

View file

@ -1185,11 +1185,11 @@ void func_80A99048(EnKo* this, PlayState* play) {
if (EnKo_IsOsAnimeLoaded(this, play) && EnKo_AreObjectsLoaded(this, play)) {
this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.objectSlot = this->legsObjectSlot;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime, sSkeleton[sModelInfo[ENKO_TYPE].legsId].flexSkeletonHeader, NULL,
this->jointTable, this->morphTable, 16);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
@ -1304,7 +1304,7 @@ void EnKo_Update(Actor* thisx, PlayState* play) {
if (this->actionFunc != func_80A99048) {
if ((s32)this->modelAlpha != 0) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
SkelAnime_Update(&this->skelAnime);
func_80A98DB4(this, play);
EnKo_Blink(this);
@ -1337,7 +1337,7 @@ s32 EnKo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
if (limbIndex == 15) {
gSPSegment((*gfx)++, 0x06, play->objectCtx.slots[this->headObjectSlot].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->headObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->headObjectSlot].segment);
headId = sModelInfo[ENKO_TYPE].headId;
*dList = sHead[headId].dList;
@ -1345,7 +1345,7 @@ s32 EnKo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
eyeTexture = sHead[headId].eyeTextures[this->eyeTextureIndex];
gSPSegment((*gfx)++, 0x0A, SEGMENTED_TO_VIRTUAL(eyeTexture));
}
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->legsObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->legsObjectSlot].segment);
}
if (limbIndex == 8) {
limbRot = this->interactInfo.torsoRot;
@ -1373,7 +1373,7 @@ void EnKo_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == 7) {
gSPSegment((*gfx)++, 0x06, play->objectCtx.slots[this->bodyObjectSlot].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->bodyObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->bodyObjectSlot].segment);
}
if (limbIndex == 15) {
Matrix_MultVec3f(&D_80A9A774, &this->actor.focus.pos);

View file

@ -170,9 +170,9 @@ void func_80AB9F24(EnNiwLady* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->aneObjectSlot) &&
Object_IsLoaded(&play->objectCtx, this->osAnimeObjectSlot)) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->aneObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->aneObjectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoLadySkel, NULL, this->jointTable, this->morphTable, 16);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
this->unk_27E = 1;
this->actor.gravity = -3.0f;
Actor_SetScale(&this->actor, 0.01f);
@ -533,7 +533,7 @@ void EnNiwLady_Update(Actor* thisx, PlayState* play) {
if (this->unk_276 == 0) {
Math_SmoothStepToS(&this->headRot.y, 0, 5, 3000, 0);
}
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
if (this->osAnimeObjectSlot >= 0) {
if (this->unk_27E != 0) {
if (this->unk_26E != 0) {

View file

@ -2024,7 +2024,7 @@ void EnOssan_InitBazaarShopkeeper(EnOssan* this, PlayState* play) {
void EnOssan_InitKokiriShopkeeper(EnOssan* this, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gKm1Skel, NULL, NULL, NULL, 0);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
Animation_Change(&this->skelAnime, &object_masterkokiri_Anim_0004A8, 1.0f, 0.0f,
Animation_GetLastFrame(&object_masterkokiri_Anim_0004A8), 0, 0.0f);
this->actor.draw = EnOssan_DrawKokiriShopkeeper;
@ -2035,7 +2035,7 @@ void EnOssan_InitKokiriShopkeeper(EnOssan* this, PlayState* play) {
void EnOssan_InitGoronShopkeeper(EnOssan* this, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, NULL, NULL, 0);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
Animation_Change(&this->skelAnime, &gGoronShopkeeperAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGoronShopkeeperAnim),
0, 0.0f);
this->actor.draw = EnOssan_DrawGoronShopkeeper;
@ -2044,7 +2044,7 @@ void EnOssan_InitGoronShopkeeper(EnOssan* this, PlayState* play) {
void EnOssan_InitZoraShopkeeper(EnOssan* this, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, NULL, NULL, NULL, 0);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
Animation_Change(&this->skelAnime, &gZoraShopkeeperAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gZoraShopkeeperAnim),
0, 0.0f);
this->actor.draw = EnOssan_DrawZoraShopkeeper;
@ -2227,7 +2227,7 @@ void EnOssan_InitActionFunc(EnOssan* this, PlayState* play) {
}
void EnOssan_Obj3ToSeg6(EnOssan* this, PlayState* play) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
}
void EnOssan_MainActionFunc(EnOssan* this, PlayState* play) {
@ -2397,7 +2397,7 @@ s32 EnOssan_OverrideLimbDrawKokiriShopkeeper(PlayState* play, s32 limbIndex, Gfx
if (limbIndex == 15) {
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->objectSlot2].segment);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot2].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot2].segment);
*dList = gKokiriShopkeeperHeadDL;
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sKokiriShopkeeperEyeTextures[this->eyeTextureIdx]));
}

View file

@ -157,7 +157,7 @@ void EnSth_SetupAfterObjectLoaded(EnSth* this, PlayState* play) {
s16* params;
EnSth_SetupShapeColliderUpdate2AndDraw(this, play);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime, sSkeletons[this->actor.params], NULL, this->jointTable, this->morphTable,
16);
Animation_PlayLoop(&this->skelAnime, sAnimations[this->actor.params]);
@ -400,7 +400,7 @@ void EnSth_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_en_sth.c", 2133);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
Gfx_SetupDL_37Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08,

View file

@ -140,7 +140,7 @@ void EnViewer_InitAnimGanondorfOrZelda(EnViewer* this, PlayState* play, void* sk
SkelAnime_Init(play, &this->skin.skelAnime, skeletonHeaderSeg, NULL, NULL, NULL, 0);
}
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
if (type == ENVIEWER_TYPE_3_GANONDORF || type == ENVIEWER_TYPE_7_GANONDORF || type == ENVIEWER_TYPE_8_GANONDORF ||
type == ENVIEWER_TYPE_9_GANONDORF) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, anim, 1.0f);
@ -151,7 +151,7 @@ void EnViewer_InitAnimGanondorfOrZelda(EnViewer* this, PlayState* play, void* sk
void EnViewer_InitAnimImpa(EnViewer* this, PlayState* play, void* skeletonHeaderSeg, AnimationHeader* anim) {
SkelAnime_InitFlex(play, &this->skin.skelAnime, skeletonHeaderSeg, NULL, NULL, NULL, 0);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, anim, 3.0f);
}
@ -504,7 +504,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
void EnViewer_Update(Actor* thisx, PlayState* play) {
EnViewer* this = (EnViewer*)thisx;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
this->actionFunc(this, play);
}

View file

@ -594,7 +594,7 @@ void EnZl2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
void func_80B4FCCC(EnZl2* this, PlayState* play) {
s32 objectSlot = this->zl2Anime1ObjectSlot;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
}
void func_80B4FD00(EnZl2* this, AnimationHeader* animation, u8 arg2, f32 morphFrames, s32 arg4) {

View file

@ -763,7 +763,7 @@ s32 func_80B54DD4(EnZl3* this) {
void func_80B54DE0(EnZl3* this, PlayState* play) {
s32 objectSlot = this->zl2Anime2ObjectSlot;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
}
void func_80B54E14(EnZl3* this, AnimationHeader* animation, u8 arg2, f32 morphFrames, s32 arg4) {

View file

@ -87,7 +87,7 @@ void EffectSsDFire_Draw(PlayState* play, u32 index, EffectSs* this) {
OPEN_DISPS(gfxCtx, "../z_eff_ss_d_fire.c", 276);
if (Object_GetSlot(&play->objectCtx, OBJECT_DODONGO) >= 0) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
scale = this->rScale / 100.0f;
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
@ -103,7 +103,7 @@ void EffectSsDFire_Draw(PlayState* play, u32 index, EffectSs* this) {
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB,
this->rPrimColorA);
gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIndex]));
gSPDisplayList(POLY_XLU_DISP++, this->gfx);
}

View file

@ -39,7 +39,7 @@ u32 EffectSsExtra_Init(PlayState* play, u32 index, EffectSs* this, void* initPar
if ((objectSlot >= 0) && Object_IsLoaded(&play->objectCtx, objectSlot)) {
uintptr_t oldSeg6 = gSegments[6];
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
this->pos = initParams->pos;
this->velocity = initParams->velocity;
this->accel = initParams->accel;
@ -71,7 +71,7 @@ void EffectSsExtra_Draw(PlayState* play, u32 index, EffectSs* this) {
OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_extra.c", 168);
gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);

View file

@ -54,7 +54,7 @@ u32 EffectSsFhgFlash_Init(PlayState* play, u32 index, EffectSs* this, void* init
if ((objectSlot >= 0) && Object_IsLoaded(&play->objectCtx, objectSlot)) {
prevSeg6 = gSegments[6];
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
this->rObjectSlot = objectSlot;
this->pos = initParams->pos;
this->velocity = initParams->velocity;
@ -110,7 +110,7 @@ void EffectSsFhgFlash_DrawLightBall(PlayState* play, u32 index, EffectSs* this)
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, this->rAlpha);

View file

@ -53,7 +53,7 @@ u32 EffectSsGMagma2_Init(PlayState* play, u32 index, EffectSs* this, void* initP
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
EffectSsGMagma2InitParams* initParams = (EffectSsGMagma2InitParams*)initParamsx;
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
this->rObjectSlot = objectSlot;
this->pos = initParams->pos;
this->velocity = zeroVec;
@ -92,7 +92,7 @@ void EffectSsGMagma2_Draw(PlayState* play, u32 index, EffectSs* this) {
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, gfxCtx, "../z_eff_ss_g_magma2.c", 282);

View file

@ -39,7 +39,7 @@ u32 EffectSsIceSmoke_Init(PlayState* play, u32 index, EffectSs* this, void* init
if ((objectSlot >= 0) && Object_IsLoaded(&play->objectCtx, objectSlot)) {
uintptr_t prevSeg6 = gSegments[6];
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
Math_Vec3f_Copy(&this->pos, &initParams->pos);
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
Math_Vec3f_Copy(&this->accel, &initParams->accel);
@ -75,7 +75,7 @@ void EffectSsIceSmoke_Draw(PlayState* play, u32 index, EffectSs* this) {
if ((objectSlot >= 0) && Object_IsLoaded(&play2->objectCtx, objectSlot)) {
gDPPipeSync(POLY_XLU_DISP++);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gFreezardSteamStartDL));
gDPPipeSync(POLY_XLU_DISP++);

View file

@ -3661,7 +3661,7 @@ void KaleidoScope_Update(PlayState* play) {
DMA_REQUEST_SYNC(pauseCtx->iconItemSegment, (uintptr_t)_icon_item_staticSegmentRomStart, size0,
"../z_kaleido_scope_PAL.c", 3662);
gSegments[8] = VIRTUAL_TO_PHYSICAL(pauseCtx->iconItemSegment);
gSegments[8] = OS_K0_TO_PHYSICAL(pauseCtx->iconItemSegment);
for (i = 0; i < ARRAY_COUNTU(gItemAgeReqs); i++) {
if (!CHECK_AGE_REQ_ITEM(i)) {