mirror of
https://github.com/zeldaret/mm.git
synced 2026-06-14 22:08:59 -04:00
General Cleanup 2 (#681)
* cleanup * Clean up toto * More ClockTime macro * rename pad * EnGo and format * EntityLineTest booleans * Other bgcheck tests * Graph Allocs * Lib_Segmented * Fix toto comment * Remove macro comment for EnBigpo_DrawLantern * Format and remove sym from undefined_syms.txt * PR suggestions * BgIkanaRay params * One day i'll remember Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
This commit is contained in:
@@ -57,15 +57,13 @@ s32 func_800E9138(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s*
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16 sVar3;
|
||||
Vec3f local_14;
|
||||
s16 sVar3A;
|
||||
|
||||
actor->focus.pos = actor->world.pos;
|
||||
actor->focus.pos.y += param_5;
|
||||
|
||||
if (((globalCtx->csCtx).state == 0) && (D_801D0D50 == 0)) {
|
||||
sVar3 = actor->yawTowardsPlayer - actor->shape.rot.y;
|
||||
sVar3A = ABS_ALT(sVar3);
|
||||
if (sVar3A >= 0x4300) {
|
||||
sVar3 = ABS_ALT(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
|
||||
if (sVar3 >= 0x4300) {
|
||||
func_800E8F08(param_3, param_4);
|
||||
return 0;
|
||||
}
|
||||
@@ -86,14 +84,12 @@ s32 func_800E9250(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s*
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
s16 sVar3;
|
||||
Vec3f local_14;
|
||||
s16 sVar3A;
|
||||
|
||||
actor->focus.pos = param_5;
|
||||
|
||||
if (((globalCtx->csCtx).state == 0) && (D_801D0D50 == 0)) {
|
||||
sVar3 = actor->yawTowardsPlayer - actor->shape.rot.y;
|
||||
sVar3A = ABS_ALT(sVar3);
|
||||
if (sVar3A >= 0x4300) {
|
||||
sVar3 = ABS_ALT(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
|
||||
if (sVar3 >= 0x4300) {
|
||||
func_800E8F08(param_3, param_4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+2
-1
@@ -3405,7 +3405,8 @@ void func_800BB604(GameState* gameState, ActorContext* actorCtx, Player* player,
|
||||
if (((phi_s2) || (phi_s2_2)) && (func_800B83BC(actor, temp_f0_2))) {
|
||||
if (func_800BB59C(globalCtx, actor)) {
|
||||
if (((!BgCheck_CameraLineTest1(&globalCtx->colCtx, &player->actor.focus.pos,
|
||||
&actor->focus.pos, &sp70, &sp80, 1, 1, 1, 1, &sp7C)) ||
|
||||
&actor->focus.pos, &sp70, &sp80, true, true, true, true,
|
||||
&sp7C)) ||
|
||||
(SurfaceType_IsIgnoredByProjectiles(&globalCtx->colCtx, sp80, sp7C)))) {
|
||||
if (actor->targetPriority != 0) {
|
||||
if ((phi_s2 != 0) && (actor->targetPriority < D_801ED8D4)) {
|
||||
|
||||
+16
-7
@@ -30,13 +30,22 @@ const ActorInit En_Item00_InitVars = {
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{ COLTYPE_NONE, AT_NONE, AC_ON | AT_TYPE_PLAYER, OC1_NONE, OC2_NONE, COLSHAPE_CYLINDER },
|
||||
{ ELEMTYPE_UNK0,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0x00000010, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_NONE },
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_NONE,
|
||||
AC_ON | AT_TYPE_PLAYER,
|
||||
OC1_NONE,
|
||||
OC2_NONE,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0x00000010, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_NONE,
|
||||
},
|
||||
{ 10, 30, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ void SkelCurve_Clear(SkelAnimeCurve* skelCurve) {
|
||||
s32 SkelCurve_Init(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, SkelCurveLimbList* limbListSeg,
|
||||
TransformUpdateIndex* transUpdIdx) {
|
||||
SkelCurveLimb** limbs;
|
||||
SkelCurveLimbList* limbList = (SkelCurveLimbList*)Lib_SegmentedToVirtual(limbListSeg);
|
||||
SkelCurveLimbList* limbList = Lib_SegmentedToVirtual(limbListSeg);
|
||||
|
||||
skelCurve->limbCount = limbList->limbCount;
|
||||
skelCurve->limbList = (SkelCurveLimb**)Lib_SegmentedToVirtual(limbList->limbs);
|
||||
skelCurve->limbList = Lib_SegmentedToVirtual(limbList->limbs);
|
||||
|
||||
skelCurve->transforms = ZeldaArena_Malloc(sizeof(*skelCurve->transforms) * skelCurve->limbCount);
|
||||
|
||||
@@ -100,7 +100,7 @@ s32 SkelCurve_Update(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve) {
|
||||
|
||||
void SkelCurve_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, SkelAnimeCurve* skelCurve,
|
||||
OverrideCurveLimbDraw overrideLimbDraw, PostCurveLimbDraw postLimbDraw, s32 lod, Actor* thisx) {
|
||||
SkelCurveLimb* limb = (SkelCurveLimb*)Lib_SegmentedToVirtual(skelCurve->limbList[limbIndex]);
|
||||
SkelCurveLimb* limb = Lib_SegmentedToVirtual(skelCurve->limbList[limbIndex]);
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
||||
gSaveContext.nextTransition = 2;
|
||||
gSaveContext.health = 48;
|
||||
gameOverCtx->state++;
|
||||
if (gSaveContext.inventory.items[SLOT(ITEM_MASK_DEKU)] == ITEM_MASK_DEKU) {
|
||||
if (INV_CONTENT(ITEM_MASK_DEKU) == ITEM_MASK_DEKU) {
|
||||
gSaveContext.playerForm = PLAYER_FORM_HUMAN;
|
||||
gSaveContext.equippedMask = PLAYER_MASK_NONE;
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ void Room_DrawType0Mesh(GlobalContext* globalCtx, Room* room, u32 flags) {
|
||||
}
|
||||
|
||||
mesh = &room->mesh->type0;
|
||||
meshParams = (RoomMeshType0Params*)Lib_SegmentedToVirtual(mesh->paramsStart);
|
||||
meshParams = Lib_SegmentedToVirtual(mesh->paramsStart);
|
||||
for (i = 0; i < mesh->count; i++) {
|
||||
if ((flags & 1) && (meshParams->opaqueDl != NULL)) {
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, meshParams->opaqueDl);
|
||||
|
||||
+27
-28
@@ -13,8 +13,7 @@ s32 Object_Spawn(ObjectContext* objectCtx, s16 id) {
|
||||
}
|
||||
|
||||
if (objectCtx->num < OBJECT_EXCHANGE_BANK_MAX - 1) {
|
||||
objectCtx->status[objectCtx->num + 1].segment =
|
||||
(void*)ALIGN16((u32)objectCtx->status[objectCtx->num].segment + size);
|
||||
objectCtx->status[objectCtx->num + 1].segment = ALIGN16((u32)objectCtx->status[objectCtx->num].segment + size);
|
||||
}
|
||||
|
||||
objectCtx->num++;
|
||||
@@ -172,9 +171,9 @@ void Scene_HeaderCmdSpawnList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x01: Actor List
|
||||
void Scene_HeaderCmdActorList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->numSetupActors = (u16)cmd->actorList.num;
|
||||
globalCtx->setupActorList = (ActorEntry*)Lib_SegmentedToVirtual(cmd->actorList.segment);
|
||||
globalCtx->actorCtx.unkC = (u16)0;
|
||||
globalCtx->numSetupActors = cmd->actorList.num;
|
||||
globalCtx->setupActorList = Lib_SegmentedToVirtual(cmd->actorList.segment);
|
||||
globalCtx->actorCtx.unkC = 0;
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x02: List of cameras for actor cutscenes
|
||||
@@ -187,21 +186,21 @@ void Scene_HeaderCmdColHeader(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
CollisionHeader* colHeaderTemp;
|
||||
CollisionHeader* colHeader;
|
||||
|
||||
colHeaderTemp = (CollisionHeader*)Lib_SegmentedToVirtual(cmd->colHeader.segment);
|
||||
colHeaderTemp = Lib_SegmentedToVirtual(cmd->colHeader.segment);
|
||||
colHeader = colHeaderTemp;
|
||||
colHeader->vtxList = (Vec3s*)Lib_SegmentedToVirtual(colHeaderTemp->vtxList);
|
||||
colHeader->polyList = (CollisionPoly*)Lib_SegmentedToVirtual(colHeader->polyList);
|
||||
colHeader->vtxList = Lib_SegmentedToVirtual(colHeaderTemp->vtxList);
|
||||
colHeader->polyList = Lib_SegmentedToVirtual(colHeader->polyList);
|
||||
|
||||
if (colHeader->surfaceTypeList != NULL) {
|
||||
colHeader->surfaceTypeList = (SurfaceType*)Lib_SegmentedToVirtual(colHeader->surfaceTypeList);
|
||||
colHeader->surfaceTypeList = Lib_SegmentedToVirtual(colHeader->surfaceTypeList);
|
||||
}
|
||||
|
||||
if (colHeader->cameraDataList != NULL) {
|
||||
colHeader->cameraDataList = (void*)Lib_SegmentedToVirtual(colHeader->cameraDataList);
|
||||
colHeader->cameraDataList = Lib_SegmentedToVirtual(colHeader->cameraDataList);
|
||||
}
|
||||
|
||||
if (colHeader->waterBoxes != NULL) {
|
||||
colHeader->waterBoxes = (WaterBox*)Lib_SegmentedToVirtual(colHeader->waterBoxes);
|
||||
colHeader->waterBoxes = Lib_SegmentedToVirtual(colHeader->waterBoxes);
|
||||
}
|
||||
|
||||
BgCheck_Allocate(&globalCtx->colCtx, globalCtx, colHeader);
|
||||
@@ -210,12 +209,12 @@ void Scene_HeaderCmdColHeader(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
// SceneTableEntry Header Command 0x04: Room List
|
||||
void Scene_HeaderCmdRoomList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->numRooms = cmd->roomList.num;
|
||||
globalCtx->roomList = (RomFile*)Lib_SegmentedToVirtual(cmd->roomList.segment);
|
||||
globalCtx->roomList = Lib_SegmentedToVirtual(cmd->roomList.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x06: Entrance List
|
||||
void Scene_HeaderCmdEntranceList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->setupEntranceList = (EntranceEntry*)Lib_SegmentedToVirtual(cmd->entranceList.segment);
|
||||
globalCtx->setupEntranceList = Lib_SegmentedToVirtual(cmd->entranceList.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x07: Special Files
|
||||
@@ -248,19 +247,21 @@ void Scene_HeaderCmdRoomBehavior(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x0A: Mesh Header
|
||||
void Scene_HeaderCmdMesh(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->roomCtx.currRoom.mesh = (RoomMesh*)Lib_SegmentedToVirtual(cmd->mesh.segment);
|
||||
globalCtx->roomCtx.currRoom.mesh = Lib_SegmentedToVirtual(cmd->mesh.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x0B: Object List
|
||||
void Scene_HeaderCmdObjectList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
s32 i, j, k;
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 k;
|
||||
ObjectStatus* firstObject;
|
||||
ObjectStatus* status;
|
||||
ObjectStatus* status2;
|
||||
s16* objectEntry;
|
||||
void* nextPtr;
|
||||
|
||||
objectEntry = (s16*)Lib_SegmentedToVirtual(cmd->objectList.segment);
|
||||
objectEntry = Lib_SegmentedToVirtual(cmd->objectList.segment);
|
||||
k = 0;
|
||||
i = globalCtx->objectCtx.spawnedObjectCount;
|
||||
status = &globalCtx->objectCtx.status[i];
|
||||
@@ -305,7 +306,7 @@ void Scene_HeaderCmdObjectList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
// SceneTableEntry Header Command 0x0C: Light List
|
||||
void Scene_HeaderCmdLightList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
s32 i;
|
||||
LightInfo* lightInfo = (LightInfo*)Lib_SegmentedToVirtual(cmd->lightList.segment);
|
||||
LightInfo* lightInfo = Lib_SegmentedToVirtual(cmd->lightList.segment);
|
||||
|
||||
for (i = 0; i < cmd->lightList.num; i++) {
|
||||
LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, lightInfo);
|
||||
@@ -315,14 +316,13 @@ void Scene_HeaderCmdLightList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x0D: Path List
|
||||
void Scene_HeaderCmdPathList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->setupPathList = (Path*)Lib_SegmentedToVirtual(cmd->pathList.segment);
|
||||
globalCtx->setupPathList = Lib_SegmentedToVirtual(cmd->pathList.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x0E: Transition Actor List
|
||||
void Scene_HeaderCmdTransiActorList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->doorCtx.numTransitionActors = cmd->transiActorList.num;
|
||||
globalCtx->doorCtx.transitionActorList =
|
||||
(TransitionActorEntry*)Lib_SegmentedToVirtual((void*)cmd->transiActorList.segment);
|
||||
globalCtx->doorCtx.transitionActorList = Lib_SegmentedToVirtual(cmd->transiActorList.segment);
|
||||
func_80105818(globalCtx, globalCtx->doorCtx.numTransitionActors, globalCtx->doorCtx.transitionActorList);
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ void Door_InitContext(GameState* state, DoorContext* doorCtx) {
|
||||
// SceneTableEntry Header Command 0x0F: Environment Light Settings List
|
||||
void Scene_HeaderCmdEnvLightSettings(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->envCtx.numLightSettings = cmd->lightSettingList.num;
|
||||
globalCtx->envCtx.lightSettingsList = (void*)Lib_SegmentedToVirtual(cmd->lightSettingList.segment);
|
||||
globalCtx->envCtx.lightSettingsList = Lib_SegmentedToVirtual(cmd->lightSettingList.segment);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -440,7 +440,7 @@ void Scene_HeaderCmdWindSettings(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x13: Exit List
|
||||
void Scene_HeaderCmdExitList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->setupExitList = (u16*)Lib_SegmentedToVirtual(cmd->exitList.segment);
|
||||
globalCtx->setupExitList = Lib_SegmentedToVirtual(cmd->exitList.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x09: Undefined
|
||||
@@ -468,11 +468,11 @@ void Scene_HeaderCmdAltHeaderList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
SceneCmd* altHeader;
|
||||
|
||||
if (gSaveContext.sceneSetupIndex) {
|
||||
altHeaderList = (SceneCmd**)Lib_SegmentedToVirtual(cmd->altHeaders.segment);
|
||||
altHeaderList = Lib_SegmentedToVirtual(cmd->altHeaders.segment);
|
||||
altHeader = altHeaderList[gSaveContext.sceneSetupIndex - 1];
|
||||
|
||||
if (altHeader != NULL) {
|
||||
Scene_ProcessHeader(globalCtx, (SceneCmd*)Lib_SegmentedToVirtual(altHeader));
|
||||
Scene_ProcessHeader(globalCtx, Lib_SegmentedToVirtual(altHeader));
|
||||
(cmd + 1)->base.code = 0x14;
|
||||
}
|
||||
}
|
||||
@@ -480,14 +480,13 @@ void Scene_HeaderCmdAltHeaderList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
|
||||
// SceneTableEntry Header Command 0x17: Cutscene List
|
||||
void Scene_HeaderCmdCutsceneList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->csCtx.sceneCsCount = (u8)cmd->base.data1;
|
||||
globalCtx->csCtx.sceneCsList = (CutsceneEntry*)Lib_SegmentedToVirtual((void*)cmd->base.data2);
|
||||
globalCtx->csCtx.sceneCsCount = cmd->base.data1;
|
||||
globalCtx->csCtx.sceneCsList = Lib_SegmentedToVirtual(cmd->base.data2);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x1B: Actor Cutscene List
|
||||
void Scene_HeaderCmdActorCutsceneList(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
ActorCutscene_Init(globalCtx, (ActorCutscene*)Lib_SegmentedToVirtual(cmd->cutsceneActorList.segment),
|
||||
cmd->cutsceneActorList.num);
|
||||
ActorCutscene_Init(globalCtx, Lib_SegmentedToVirtual(cmd->cutsceneActorList.segment), cmd->cutsceneActorList.num);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x1C: Mini Maps
|
||||
|
||||
+12
-18
@@ -114,7 +114,7 @@ void AnimatedMat_DrawTwoTexScroll(GlobalContext* globalCtx, s32 segment, void* p
|
||||
* Generates a displaylist that sets the prim and env color, and stores it in the provided segment ID.
|
||||
*/
|
||||
void AnimatedMat_SetColor(GlobalContext* globalCtx, s32 segment, F3DPrimColor* primColorResult, F3DEnvColor* envColor) {
|
||||
Gfx* colorDList = (Gfx*)GRAPH_ALLOC(globalCtx->state.gfxCtx, sizeof(Gfx) * 4);
|
||||
Gfx* colorDList = GRAPH_ALLOC(globalCtx->state.gfxCtx, sizeof(Gfx) * 4);
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -141,13 +141,10 @@ void AnimatedMat_SetColor(GlobalContext* globalCtx, s32 segment, F3DPrimColor* p
|
||||
*/
|
||||
void AnimatedMat_DrawColor(GlobalContext* globalCtx, s32 segment, void* params) {
|
||||
AnimatedMatColorParams* colorAnimParams = (AnimatedMatColorParams*)params;
|
||||
F3DPrimColor* primColor;
|
||||
F3DPrimColor* primColor = Lib_SegmentedToVirtual(colorAnimParams->primColors);
|
||||
F3DEnvColor* envColor;
|
||||
s32 curFrame;
|
||||
s32 curFrame = sMatAnimStep % colorAnimParams->keyFrameLength;
|
||||
|
||||
primColor = (F3DPrimColor*)Lib_SegmentedToVirtual(colorAnimParams->primColors);
|
||||
|
||||
curFrame = sMatAnimStep % colorAnimParams->keyFrameLength;
|
||||
primColor += curFrame;
|
||||
envColor = (colorAnimParams->envColors != NULL)
|
||||
? (F3DEnvColor*)Lib_SegmentedToVirtual(colorAnimParams->envColors) + curFrame
|
||||
@@ -169,10 +166,10 @@ s32 AnimatedMat_Lerp(s32 min, s32 max, f32 norm) {
|
||||
*/
|
||||
void AnimatedMat_DrawColorLerp(GlobalContext* globalCtx, s32 segment, void* params) {
|
||||
AnimatedMatColorParams* colorAnimParams = (AnimatedMatColorParams*)params;
|
||||
F3DPrimColor* primColorMax;
|
||||
F3DPrimColor* primColorMax = Lib_SegmentedToVirtual(colorAnimParams->primColors);
|
||||
F3DEnvColor* envColorMax;
|
||||
u16* keyFrames;
|
||||
s32 curFrame;
|
||||
u16* keyFrames = Lib_SegmentedToVirtual(colorAnimParams->keyFrames);
|
||||
s32 curFrame = sMatAnimStep % colorAnimParams->keyFrameLength;
|
||||
s32 endFrame;
|
||||
s32 relativeFrame; // relative to the start frame
|
||||
s32 startFrame;
|
||||
@@ -183,9 +180,6 @@ void AnimatedMat_DrawColorLerp(GlobalContext* globalCtx, s32 segment, void* para
|
||||
F3DEnvColor envColorResult;
|
||||
s32 i;
|
||||
|
||||
primColorMax = (F3DPrimColor*)Lib_SegmentedToVirtual(colorAnimParams->primColors);
|
||||
keyFrames = (u16*)Lib_SegmentedToVirtual(colorAnimParams->keyFrames);
|
||||
curFrame = sMatAnimStep % colorAnimParams->keyFrameLength;
|
||||
keyFrames++;
|
||||
i = 1;
|
||||
|
||||
@@ -211,7 +205,7 @@ void AnimatedMat_DrawColorLerp(GlobalContext* globalCtx, s32 segment, void* para
|
||||
primColorResult.lodFrac = AnimatedMat_Lerp(primColorMin->lodFrac, primColorMax->lodFrac, norm);
|
||||
|
||||
if (colorAnimParams->envColors) {
|
||||
envColorMax = (F3DEnvColor*)Lib_SegmentedToVirtual(colorAnimParams->envColors);
|
||||
envColorMax = Lib_SegmentedToVirtual(colorAnimParams->envColors);
|
||||
envColorMax += i;
|
||||
envColorMin = envColorMax - 1;
|
||||
envColorResult.r = AnimatedMat_Lerp(envColorMin->r, envColorMax->r, norm);
|
||||
@@ -370,8 +364,8 @@ void AnimatedMat_DrawColorNonLinearInterp(GlobalContext* globalCtx, s32 segment,
|
||||
*/
|
||||
void AnimatedMat_DrawTexCycle(GlobalContext* globalCtx, s32 segment, void* params) {
|
||||
AnimatedMatTexCycleParams* texAnimParams = params;
|
||||
void** texList = (void**)Lib_SegmentedToVirtual(texAnimParams->textureList);
|
||||
u8* texId = (u8*)Lib_SegmentedToVirtual(texAnimParams->textureIndexList);
|
||||
void** texList = Lib_SegmentedToVirtual(texAnimParams->textureList);
|
||||
u8* texId = Lib_SegmentedToVirtual(texAnimParams->textureIndexList);
|
||||
s32 curFrame = sMatAnimStep % texAnimParams->keyFrameLength;
|
||||
void* tex = Lib_SegmentedToVirtual(texList[texId[curFrame]]);
|
||||
|
||||
@@ -408,9 +402,9 @@ void AnimatedMat_DrawMain(GlobalContext* globalCtx, AnimatedMaterial* matAnim, f
|
||||
do {
|
||||
segment = matAnim->segment;
|
||||
segmentAbs = ((segment < 0) ? -segment : segment) + 7;
|
||||
matAnimDrawHandlers[matAnim->type](globalCtx, segmentAbs, (void*)Lib_SegmentedToVirtual(matAnim->params));
|
||||
matAnimDrawHandlers[matAnim->type](globalCtx, segmentAbs, Lib_SegmentedToVirtual(matAnim->params));
|
||||
matAnim++;
|
||||
} while (segment > -1);
|
||||
} while (segment >= 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -726,7 +720,7 @@ void Scene_DrawConfigGreatBayTemple(GlobalContext* globalCtx) {
|
||||
BgCheck_UnsetContextFlags(&globalCtx->colCtx, BGCHECK_FLAG_REVERSE_CONVEYOR_FLOW);
|
||||
}
|
||||
|
||||
dList = (Gfx*)GRAPH_ALLOC(globalCtx->state.gfxCtx, sizeof(Gfx) * 18);
|
||||
dList = GRAPH_ALLOC(globalCtx->state.gfxCtx, sizeof(Gfx) * 18);
|
||||
|
||||
AnimatedMat_Draw(globalCtx, globalCtx->sceneMaterialAnims);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user