mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-02 19:45:57 -04:00
z_lights fully matched (#80)
* z_lights OK * Documentation * Fixup for z_collision_check * Improve function types of bind functions * Fixup for types
This commit is contained in:
@@ -66,7 +66,7 @@ void SceneProc_DrawType1Texture(GlobalContext* ctxt, u32 segment, ScrollingTextu
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Slight ordering differences at the beginning
|
||||
void SceneProc_DrawFlashingTexture(GlobalContext* ctxt, u32 segment, FlashingTexturePrimColor* primColor, RGBA8* envColor) {
|
||||
void SceneProc_DrawFlashingTexture(GlobalContext* ctxt, u32 segment, FlashingTexturePrimColor* primColor, Color_RGBA8* envColor) {
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dl;
|
||||
|
||||
@@ -108,7 +108,7 @@ void SceneProc_DrawFlashingTexture(GlobalContext* ctxt, u32 segment, FlashingTex
|
||||
#endif
|
||||
|
||||
void SceneProc_DrawType2Texture(GlobalContext* ctxt, u32 segment, FlashingTextureParams* params) {
|
||||
RGBA8* envColor;
|
||||
Color_RGBA8* envColor;
|
||||
FlashingTexturePrimColor* primColor = (FlashingTexturePrimColor *)Lib_PtrSegToVirt(params->primColors);
|
||||
u32 pad;
|
||||
u32 index = gSceneProcStep % params->cycleLength;
|
||||
@@ -116,7 +116,7 @@ void SceneProc_DrawType2Texture(GlobalContext* ctxt, u32 segment, FlashingTextur
|
||||
primColor += index;
|
||||
|
||||
if (params->envColors) {
|
||||
envColor = (RGBA8*)Lib_PtrSegToVirt(params->envColors) + index;
|
||||
envColor = (Color_RGBA8*)Lib_PtrSegToVirt(params->envColors) + index;
|
||||
} else {
|
||||
envColor = NULL;
|
||||
}
|
||||
@@ -132,18 +132,18 @@ s32 SceneProc_Lerp(s32 a, s32 b, f32 t) {
|
||||
// Slight ordering and regalloc differences around t = ...
|
||||
void SceneProc_DrawType3Texture(GlobalContext* ctxt, u32 segment, FlashingTextureParams* params) {
|
||||
FlashingTextureParams* params2 = params;
|
||||
RGBA8* envColorTo;
|
||||
Color_RGBA8* envColorTo;
|
||||
FlashingTexturePrimColor* primColorTo = (FlashingTexturePrimColor *)Lib_PtrSegToVirt(params2->primColors);
|
||||
u16* keyFrames = (u16*)Lib_PtrSegToVirt(params2->keyFrames);
|
||||
s32 index = gSceneProcStep % params2->cycleLength;
|
||||
s32 pad1;
|
||||
s32 keyFrameIndex;
|
||||
RGBA8* envColorPtrIn;
|
||||
Color_RGBA8* envColorPtrIn;
|
||||
f32 t;
|
||||
s32 pad2;
|
||||
FlashingTexturePrimColor primColorIn;
|
||||
RGBA8* envColorFrom;
|
||||
RGBA8 envColorIn;
|
||||
Color_RGBA8* envColorFrom;
|
||||
Color_RGBA8 envColorIn;
|
||||
s32 pad3;
|
||||
FlashingTexturePrimColor* primColorFrom;
|
||||
|
||||
@@ -169,7 +169,7 @@ void SceneProc_DrawType3Texture(GlobalContext* ctxt, u32 segment, FlashingTextur
|
||||
primColorIn.lodFrac = SceneProc_Lerp(primColorFrom->lodFrac, primColorTo->lodFrac, t);
|
||||
|
||||
if (params2->envColors) {
|
||||
envColorTo = (RGBA8*)Lib_PtrSegToVirt(params2->envColors) + keyFrameIndex;
|
||||
envColorTo = (Color_RGBA8*)Lib_PtrSegToVirt(params2->envColors) + keyFrameIndex;
|
||||
envColorFrom = envColorTo - 1;
|
||||
envColorIn.red = SceneProc_Lerp(envColorFrom->red, envColorTo->red, t);
|
||||
envColorIn.green = SceneProc_Lerp(envColorFrom->green, envColorTo->green, t);
|
||||
|
||||
Reference in New Issue
Block a user