diff --git a/src/code/code_800ACE70.c b/src/code/code_800ACE70.c index 90cb9494b8..ebb93da34c 100644 --- a/src/code/code_800ACE70.c +++ b/src/code/code_800ACE70.c @@ -53,10 +53,10 @@ Gfx D_8012AC58[] = { void func_800ACE70(struct_801664F0* this) { this->type = 0; this->setScissor = false; - this->color.r = 0xFF; - this->color.g = 0xFF; - this->color.b = 0xFF; - this->color.a = 0xFF; + this->color.r = 255; + this->color.g = 255; + this->color.b = 255; + this->color.a = 255; } // Destroy diff --git a/src/code/code_800AD920.c b/src/code/code_800AD920.c index 147c47c093..5123960068 100644 --- a/src/code/code_800AD920.c +++ b/src/code/code_800AD920.c @@ -9,14 +9,14 @@ extern u16 D_0E000000[]; void func_800AD920(struct_80166500* this) { this->useRgba = false; this->setScissor = false; - this->primColor.r = 0xFF; - this->primColor.g = 0xFF; - this->primColor.b = 0xFF; - this->primColor.a = 0xFF; - this->envColor.a = 0xFF; - this->envColor.r = 0x00; - this->envColor.g = 0x00; - this->envColor.b = 0x00; + this->primColor.r = 255; + this->primColor.g = 255; + this->primColor.b = 255; + this->primColor.a = 255; + this->envColor.a = 255; + this->envColor.r = 0; + this->envColor.g = 0; + this->envColor.b = 0; } // Destroy diff --git a/src/code/fault_drawer.c b/src/code/fault_drawer.c index 60fc9b2f65..593696173e 100644 --- a/src/code/fault_drawer.c +++ b/src/code/fault_drawer.c @@ -36,26 +36,40 @@ const u32 sFaultDrawerFont[] = { }; // data -// clang-format off FaultDrawer sFaultDrawerDefault = { - (u16*)0x803DA800, // fb - 320, 240, // w, h - 16, 223, // yStart, yEnd - 22, 297, // xStart, xEnd - 0xFFFF, 0x0000, // foreColor, backColor - 22, 16, // cursorX, cursorY - sFaultDrawerFont, // font - 8, 8, 0, 0, - { // printColors - 0x0001, 0xF801, 0x07C1, 0xFFC1, - 0x003F, 0xF83F, 0x07FF, 0xFFFF, - 0x7BDF, 0xB5AD + (u16*)0x803DA800, // fb + 320, // w + 240, // h + 16, // yStart + 223, // yEnd + 22, // xStart + 297, // xEnd + GPACK_RGBA5551(255, 255, 255, 255), // foreColor + GPACK_RGBA5551(0, 0, 0, 0), // backColor + 22, // cursorX + 16, // cursorY + sFaultDrawerFont, // font + 8, + 8, + 0, + 0, + { + // printColors + GPACK_RGBA5551(0, 0, 0, 1), + GPACK_RGBA5551(255, 0, 0, 1), + GPACK_RGBA5551(0, 255, 0, 1), + GPACK_RGBA5551(255, 255, 0, 1), + GPACK_RGBA5551(0, 0, 255, 1), + GPACK_RGBA5551(255, 0, 255, 1), + GPACK_RGBA5551(0, 255, 255, 1), + GPACK_RGBA5551(255, 255, 255, 1), + GPACK_RGBA5551(120, 120, 120, 1), + GPACK_RGBA5551(176, 176, 176, 1), }, - 0, // escCode - 0, // osSyncPrintfEnabled + 0, // escCode + 0, // osSyncPrintfEnabled NULL, // inputCallback }; -// clang-format on // bss extern FaultDrawer sFaultDrawerStruct; diff --git a/src/code/flg_set.c b/src/code/flg_set.c index 170d144558..b49c10947e 100644 --- a/src/code/flg_set.c +++ b/src/code/flg_set.c @@ -52,7 +52,7 @@ void FlagSet_Update(GlobalContext* globalCtx) { GfxPrint_Init(&printer); GfxPrint_Open(&printer, gfx); - GfxPrint_SetColor(&printer, 0xFA, 0x32, 0x32, 0xFF); + GfxPrint_SetColor(&printer, 250, 50, 50, 255); GfxPrint_SetPos(&printer, 4, 13); GfxPrint_Printf(&printer, entries[entryIdx].name); GfxPrint_SetPos(&printer, 4, 15); diff --git a/src/code/game.c b/src/code/game.c index 2aa4bf6ea5..782a9934f7 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -120,12 +120,12 @@ void func_800C4344(GameState* gameState) { // regalloc differences void GameState_DrawInputDisplay(u16 input, Gfx** gfx) { static const u16 sInpDispBtnColors[] = { - GPACK_RGBA5551(0xFF, 0xFF, 0x00, 1), GPACK_RGBA5551(0xFF, 0xFF, 0x00, 1), GPACK_RGBA5551(0xFF, 0xFF, 0x00, 1), - GPACK_RGBA5551(0xFF, 0xFF, 0x00, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1), - GPACK_RGBA5551(0x00, 0xFF, 0xFF, 1), GPACK_RGBA5551(0xFF, 0x00, 0xFF, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1), - GPACK_RGBA5551(0x78, 0x78, 0x78, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1), - GPACK_RGBA5551(0xFF, 0x00, 0x00, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1), GPACK_RGBA5551(0x00, 0xFF, 0x00, 1), - GPACK_RGBA5551(0x00, 0x00, 0xFF, 1), + GPACK_RGBA5551(255, 255, 0, 1), GPACK_RGBA5551(255, 255, 0, 1), GPACK_RGBA5551(255, 255, 0, 1), + GPACK_RGBA5551(255, 255, 0, 1), GPACK_RGBA5551(120, 120, 120, 1), GPACK_RGBA5551(120, 120, 120, 1), + GPACK_RGBA5551(0, 255, 255, 1), GPACK_RGBA5551(255, 0, 255, 1), GPACK_RGBA5551(120, 120, 120, 1), + GPACK_RGBA5551(120, 120, 120, 1), GPACK_RGBA5551(120, 120, 120, 1), GPACK_RGBA5551(120, 120, 120, 1), + GPACK_RGBA5551(255, 0, 0, 1), GPACK_RGBA5551(120, 120, 120, 1), GPACK_RGBA5551(0, 255, 0, 1), + GPACK_RGBA5551(0, 0, 255, 1), }; s32 i, j, k; Gfx* gfxP = *gfx; diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c index d30b10c464..b7cbc412e6 100644 --- a/src/code/speed_meter.c +++ b/src/code/speed_meter.c @@ -18,12 +18,9 @@ volatile OSTime gRDPTotalTime; SpeedMeterTimeEntry* gSpeedMeterTimeEntryPtr; SpeedMeterTimeEntry sSpeedMeterTimeEntryArray[] = { - { &D_8016A520, 0, 0, GPACK_RGBA5551(0xFF, 0x00, 0x00, 1) }, - { &D_8016A528, 0, 2, GPACK_RGBA5551(0xFF, 0xFF, 0x00, 1) }, - { &D_8016A530, 0, 4, GPACK_RGBA5551(0x00, 0x00, 0xFF, 1) }, - { &D_8016A538, 0, 6, GPACK_RGBA5551(0xFF, 0x80, 0x80, 1) }, - { &D_8016A540, 0, 8, GPACK_RGBA5551(0x00, 0xFF, 0x00, 1) }, - { &D_8016A548, 0, 10, GPACK_RGBA5551(0xFF, 0x00, 0xFF, 1) }, + { &D_8016A520, 0, 0, GPACK_RGBA5551(255, 0, 0, 1) }, { &D_8016A528, 0, 2, GPACK_RGBA5551(255, 255, 0, 1) }, + { &D_8016A530, 0, 4, GPACK_RGBA5551(0, 0, 255, 1) }, { &D_8016A538, 0, 6, GPACK_RGBA5551(255, 128, 128, 1) }, + { &D_8016A540, 0, 8, GPACK_RGBA5551(0, 255, 0, 1) }, { &D_8016A548, 0, 10, GPACK_RGBA5551(255, 0, 255, 1) }, }; #define DrawRec(gfx, color, ulx, uly, lrx, lry) \ @@ -88,10 +85,10 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) { G_TD_CLAMP | G_TP_NONE | G_CYC_FILL | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2); - DrawRec(gfx++, GPACK_RGBA5551(0x00, 0x00, 0xFF, 1), baseX + 64 * 0, uly, baseX + 64 * 1, lry); - DrawRec(gfx++, GPACK_RGBA5551(0x00, 0xFF, 0x00, 1), baseX + 64 * 1, uly, baseX + 64 * 2, lry); - DrawRec(gfx++, GPACK_RGBA5551(0xFF, 0x00, 0x00, 1), baseX + 64 * 2, uly, baseX + 64 * 3, lry); - DrawRec(gfx++, GPACK_RGBA5551(0xFF, 0x00, 0xFF, 1), baseX + 64 * 3, uly, baseX + 64 * 4, lry); + DrawRec(gfx++, GPACK_RGBA5551(0, 0, 255, 1), baseX + 64 * 0, uly, baseX + 64 * 1, lry); + DrawRec(gfx++, GPACK_RGBA5551(0, 255, 0, 1), baseX + 64 * 1, uly, baseX + 64 * 2, lry); + DrawRec(gfx++, GPACK_RGBA5551(255, 0, 0, 1), baseX + 64 * 2, uly, baseX + 64 * 3, lry); + DrawRec(gfx++, GPACK_RGBA5551(255, 0, 255, 1), baseX + 64 * 3, uly, baseX + 64 * 4, lry); gSpeedMeterTimeEntryPtr = sSpeedMeterTimeEntryArray; for (i = 0; i < ARRAY_COUNT(sSpeedMeterTimeEntryArray); i++) { @@ -174,8 +171,8 @@ void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, GraphicsContext* gfxCtx, Gam if (SREG(0) > 2) { if (ZeldaArena_IsInitalized()) { ZeldaArena_GetSizes(&zeldaFreeMax, &zeldaFree, &zeldaAlloc); - SpeedMeter_InitAllocEntry(&entry, zeldaFree + zeldaAlloc, zeldaAlloc, GPACK_RGBA5551(0x00, 0x00, 0xFF, 1), - GPACK_RGBA5551(0xFF, 0xFF, 0xFF, 1), ulx, lrx, y, y + 1); + SpeedMeter_InitAllocEntry(&entry, zeldaFree + zeldaAlloc, zeldaAlloc, GPACK_RGBA5551(0, 0, 255, 1), + GPACK_RGBA5551(255, 255, 255, 1), ulx, lrx, y, y + 1); SpeedMeter_DrawAllocEntry(&entry, gfxCtx); y++; y++; @@ -185,33 +182,32 @@ void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, GraphicsContext* gfxCtx, Gam if (SREG(0) > 1) { SystemArena_GetSizes(&sysFreeMax, &sysFree, &sysAlloc); SpeedMeter_InitAllocEntry(&entry, sysFree + sysAlloc - state->tha.size, sysAlloc - state->tha.size, - GPACK_RGBA5551(0x00, 0x00, 0xFF, 1), GPACK_RGBA5551(0xFF, 0x80, 0x80, 1), ulx, lrx, y, - y); + GPACK_RGBA5551(0, 0, 255, 1), GPACK_RGBA5551(255, 128, 128, 1), ulx, lrx, y, y); SpeedMeter_DrawAllocEntry(&entry, gfxCtx); y++; } thga = (TwoHeadGfxArena*)&state->tha; SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THA_GetSize((TwoHeadArena*)thga), - GPACK_RGBA5551(0x00, 0x00, 0xFF, 1), GPACK_RGBA5551(0x00, 0xFF, 0x00, 1), ulx, lrx, y, y); + GPACK_RGBA5551(0, 0, 255, 1), GPACK_RGBA5551(0, 255, 0, 1), ulx, lrx, y, y); SpeedMeter_DrawAllocEntry(&entry, gfxCtx); y++; thga = &gfxCtx->polyOpa; - SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetSize(thga), GPACK_RGBA5551(0x00, 0x00, 0xFF, 1), - GPACK_RGBA5551(0xFF, 0x00, 0xFF, 1), ulx, lrx, y, y); + SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetSize(thga), GPACK_RGBA5551(0, 0, 255, 1), + GPACK_RGBA5551(255, 0, 255, 1), ulx, lrx, y, y); SpeedMeter_DrawAllocEntry(&entry, gfxCtx); y++; thga = &gfxCtx->polyXlu; - SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetSize(thga), GPACK_RGBA5551(0x00, 0x00, 0xFF, 1), - GPACK_RGBA5551(0xFF, 0xFF, 0x00, 1), ulx, lrx, y, y); + SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetSize(thga), GPACK_RGBA5551(0, 0, 255, 1), + GPACK_RGBA5551(255, 255, 0, 1), ulx, lrx, y, y); SpeedMeter_DrawAllocEntry(&entry, gfxCtx); y++; thga = &gfxCtx->overlay; - SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetSize(thga), GPACK_RGBA5551(0x00, 0x00, 0xFF, 1), - GPACK_RGBA5551(0xFF, 0x00, 0x00, 1), ulx, lrx, y, y); + SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetSize(thga), GPACK_RGBA5551(0, 0, 255, 1), + GPACK_RGBA5551(255, 0, 0, 1), ulx, lrx, y, y); SpeedMeter_DrawAllocEntry(&entry, gfxCtx); y++; } diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 4c05123060..db059634d5 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -64,7 +64,7 @@ void ActorShadow_DrawFunc_Circle(Actor* actor, LightMapper* lightMapper, GlobalC func_8002B200(actor, lightMapper, globalCtx, &D_04049210, NULL); } -Color_RGBA8 D_80115F80 = { 0xFF, 0xFF, 0xFF, 0xFF }; +Color_RGBA8 D_80115F80 = { 255, 255, 255, 255 }; void ActorShadow_DrawFunc_WhiteCircle(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx) { func_8002B200(actor, lightMapper, globalCtx, &D_04049210, &D_80115F80); @@ -238,19 +238,13 @@ typedef struct { } NaviColor; // size = 0x8 NaviColor sNaviColorList[] = { - { { 0x00, 0xFF, 0x00, 0xFF }, { 0x00, 0xFF, 0x00, 0x00 } }, - { { 0x00, 0xFF, 0x00, 0xFF }, { 0x00, 0xFF, 0x00, 0x00 } }, - { { 0xFF, 0xFF, 0xFF, 0xFF }, { 0x00, 0x00, 0xFF, 0x00 } }, - { { 0x00, 0xFF, 0x00, 0xFF }, { 0x00, 0xFF, 0x00, 0x00 } }, - { { 0x96, 0x96, 0xFF, 0xFF }, { 0x96, 0x96, 0xFF, 0x00 } }, - { { 0xFF, 0xFF, 0x00, 0xFF }, { 0xC8, 0x9B, 0x00, 0x00 } }, - { { 0x00, 0xFF, 0x00, 0xFF }, { 0x00, 0xFF, 0x00, 0x00 } }, - { { 0x00, 0xFF, 0x00, 0xFF }, { 0x00, 0xFF, 0x00, 0x00 } }, - { { 0x00, 0xFF, 0x00, 0xFF }, { 0x00, 0xFF, 0x00, 0x00 } }, - { { 0xFF, 0xFF, 0x00, 0xFF }, { 0xC8, 0x9B, 0x00, 0x00 } }, - { { 0x00, 0xFF, 0x00, 0xFF }, { 0x00, 0xFF, 0x00, 0x00 } }, - { { 0x00, 0xFF, 0x00, 0xFF }, { 0x00, 0xFF, 0x00, 0x00 } }, - { { 0x00, 0xFF, 0x00, 0xFF }, { 0x00, 0xFF, 0x00, 0x00 } }, + { { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, { { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, + { { 255, 255, 255, 255 }, { 0, 0, 255, 0 } }, { { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, + { { 150, 150, 255, 255 }, { 150, 150, 255, 0 } }, { { 255, 255, 0, 255 }, { 200, 155, 0, 0 } }, + { { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, { { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, + { { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, { { 255, 255, 0, 255 }, { 200, 155, 0, 0 } }, + { { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, { { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, + { { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, }; // unused @@ -428,7 +422,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 32768), MTXMODE_APPLY); Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 0xFF); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255); gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2153), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(gfxCtx->polyXlu.p++, &D_0400CB70); @@ -1791,8 +1785,8 @@ void func_8002FA60(GlobalContext* globalCtx) { Vec3f D_80116048 = { 0.0f, -0.05f, 0.0f }; Vec3f D_80116054 = { 0.0f, -0.025f, 0.0f }; -Color_RGB8 D_80116060 = { 0xFF, 0xFF, 0xFF }; -Color_RGB8 D_80116064 = { 0x64, 0xC8, 0x00 }; +Color_RGB8 D_80116060 = { 255, 255, 255 }; +Color_RGB8 D_80116064 = { 100, 200, 0 }; #ifdef NON_MATCHING // saved register, stack usage and minor ordering differences @@ -1928,8 +1922,8 @@ void func_8002FBAC(GlobalContext* globalCtx) { Matrix_Push(); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0xFF, 0xFF, 0xC8, spD0); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x64, 0xC8, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 200, spD0); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 100, 200, 0, 255); phi_f10 = (globalCtx->gameplayFrames * 1500) & 0xFFFF; Matrix_RotateZ((phi_f10 * M_PI) / 32768.0f, MTXMODE_APPLY); @@ -2216,7 +2210,7 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { if (actor->dmgEffectTimer != 0) { // Must be inline data to match - Color_RGBA8 sp2C = { 0x00, 0x00, 0x00, 0xFF }; + Color_RGBA8 sp2C = { 0, 0, 0, 255 }; if (actor->dmgEffectParams & 0x8000) { sp2C.r = sp2C.g = sp2C.b = ((actor->dmgEffectParams & 0x1F00) >> 5) | 7; } else if (actor->dmgEffectParams & 0x4000) { @@ -2301,7 +2295,7 @@ void func_8003115C(GlobalContext* globalCtx, s32 nbInvisibleActors, Actor** invi G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PRIM | Z_UPD | G_RM_CLD_SURF | G_RM_CLD_SURF2); gDPSetCombineMode(gfxCtx->polyXlu.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0xFF, 0x00, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 0, 0, 255); } else { gDPSetOtherMode(gfxCtx->polyXlu.p++, G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | @@ -2311,7 +2305,7 @@ void func_8003115C(GlobalContext* globalCtx, s32 nbInvisibleActors, Actor** invi GBL_c2(G_BL_CLR_BL, G_BL_0, G_BL_CLR_MEM, G_BL_1MA)); gDPSetCombineLERP(gfxCtx->polyXlu.p++, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, 0); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0xFF, 0x4A, 0x4A, 0x4A, 0x4A); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0xFF, 74, 74, 74, 74); } gDPSetPrimDepth(gfxCtx->polyXlu.p++, 0, 0); @@ -2342,7 +2336,7 @@ void func_8003115C(GlobalContext* globalCtx, s32 nbInvisibleActors, Actor** invi G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PRIM | G_RM_CLD_SURF | G_RM_CLD_SURF2); gDPSetCombineMode(gfxCtx->polyXlu.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0xFF, 0x00, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 0, 0, 255); func_80030FA8(gfxCtx); @@ -3466,7 +3460,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx) gfxCtx->polyOpa.p = Gfx_CallSetupDL(gfxCtx->polyOpa.p, 0x2C); - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 0x00, 0x00, 0x00, alpha); + gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 0, 0, 0, alpha); sp50.x = arg0->x; sp50.y = arg0->y + 1.0f; @@ -3846,7 +3840,7 @@ void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbD func_80093D18(globalCtx->state.gfxCtx); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, alpha); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, alpha); gDPPipeSync(gfxCtx->polyOpa.p++); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, func_80034B28(globalCtx->state.gfxCtx)); @@ -3866,7 +3860,7 @@ void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbD func_80093D84(globalCtx->state.gfxCtx); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, alpha); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, alpha); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, func_80034B54(globalCtx->state.gfxCtx)); gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, @@ -4001,13 +3995,13 @@ void func_8003555C(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* ar Color_RGB8 color1; Color_RGB8 color2; - color1.r = 0xC8; - color1.g = 0xA0; - color1.b = 0x78; + color1.r = 200; + color1.g = 160; + color1.b = 120; - color2.r = 0x82; - color2.g = 0x5A; - color2.b = 0x32; + color2.r = 130; + color2.g = 90; + color2.b = 50; func_80028B74(globalCtx, arg1, arg2, arg3, &color1, &color2); } diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index fbe38abad5..8afb26877a 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -1243,38 +1243,38 @@ void func_8005DFAC(GlobalContext* globalCtx, Collider* collider, Vec3f* v) { D_8015D8A0.position.z = (s32)v->z; D_8015D8A0.uDiv = 5; D_8015D8A0.vDiv = 5; - D_8015D8A0.colorStart[0].r = 0x0A; - D_8015D8A0.colorStart[0].g = 0x0A; - D_8015D8A0.colorStart[0].b = 0xC8; - D_8015D8A0.colorStart[0].a = 0xFF; - D_8015D8A0.colorStart[1].r = 0x00; - D_8015D8A0.colorStart[1].g = 0x00; - D_8015D8A0.colorStart[1].b = 0x80; - D_8015D8A0.colorStart[1].a = 0xFF; - D_8015D8A0.colorStart[2].r = 0x00; - D_8015D8A0.colorStart[2].g = 0x00; - D_8015D8A0.colorStart[2].b = 0x80; - D_8015D8A0.colorStart[2].a = 0xFF; - D_8015D8A0.colorStart[3].r = 0x00; - D_8015D8A0.colorStart[3].g = 0x00; - D_8015D8A0.colorStart[3].b = 0x80; - D_8015D8A0.colorStart[3].a = 0xFF; - D_8015D8A0.colorEnd[0].r = 0x00; - D_8015D8A0.colorEnd[0].g = 0x00; - D_8015D8A0.colorEnd[0].b = 0x20; - D_8015D8A0.colorEnd[0].a = 0x00; - D_8015D8A0.colorEnd[1].r = 0x00; - D_8015D8A0.colorEnd[1].g = 0x00; - D_8015D8A0.colorEnd[1].b = 0x20; - D_8015D8A0.colorEnd[1].a = 0x00; - D_8015D8A0.colorEnd[2].r = 0x00; - D_8015D8A0.colorEnd[2].g = 0x00; - D_8015D8A0.colorEnd[2].b = 0x40; - D_8015D8A0.colorEnd[2].a = 0x00; - D_8015D8A0.colorEnd[3].r = 0x00; - D_8015D8A0.colorEnd[3].g = 0x00; - D_8015D8A0.colorEnd[3].b = 0x40; - D_8015D8A0.colorEnd[3].a = 0x00; + D_8015D8A0.colorStart[0].r = 10; + D_8015D8A0.colorStart[0].g = 10; + D_8015D8A0.colorStart[0].b = 200; + D_8015D8A0.colorStart[0].a = 255; + D_8015D8A0.colorStart[1].r = 0; + D_8015D8A0.colorStart[1].g = 0; + D_8015D8A0.colorStart[1].b = 128; + D_8015D8A0.colorStart[1].a = 255; + D_8015D8A0.colorStart[2].r = 0; + D_8015D8A0.colorStart[2].g = 0; + D_8015D8A0.colorStart[2].b = 128; + D_8015D8A0.colorStart[2].a = 255; + D_8015D8A0.colorStart[3].r = 0; + D_8015D8A0.colorStart[3].g = 0; + D_8015D8A0.colorStart[3].b = 128; + D_8015D8A0.colorStart[3].a = 255; + D_8015D8A0.colorEnd[0].r = 0; + D_8015D8A0.colorEnd[0].g = 0; + D_8015D8A0.colorEnd[0].b = 32; + D_8015D8A0.colorEnd[0].a = 0; + D_8015D8A0.colorEnd[1].r = 0; + D_8015D8A0.colorEnd[1].g = 0; + D_8015D8A0.colorEnd[1].b = 32; + D_8015D8A0.colorEnd[1].a = 0; + D_8015D8A0.colorEnd[2].r = 0; + D_8015D8A0.colorEnd[2].g = 0; + D_8015D8A0.colorEnd[2].b = 64; + D_8015D8A0.colorEnd[2].a = 0; + D_8015D8A0.colorEnd[3].r = 0; + D_8015D8A0.colorEnd[3].g = 0; + D_8015D8A0.colorEnd[3].b = 64; + D_8015D8A0.colorEnd[3].a = 0; D_8015D8A0.timer = 0; D_8015D8A0.duration = 16; D_8015D8A0.speed = 8.0f; @@ -1299,38 +1299,38 @@ void func_8005E10C(GlobalContext* globalCtx, Collider* collider, Vec3f* v) { D_8015DD68.position.z = (s32)v->z; D_8015DD68.uDiv = 5; D_8015DD68.vDiv = 5; - D_8015DD68.colorStart[0].r = 0x0A; - D_8015DD68.colorStart[0].g = 0xC8; - D_8015DD68.colorStart[0].b = 0x0A; - D_8015DD68.colorStart[0].a = 0xFF; - D_8015DD68.colorStart[1].r = 0x00; - D_8015DD68.colorStart[1].g = 0x80; - D_8015DD68.colorStart[1].b = 0x00; - D_8015DD68.colorStart[1].a = 0xFF; - D_8015DD68.colorStart[2].r = 0x00; - D_8015DD68.colorStart[2].g = 0x80; - D_8015DD68.colorStart[2].b = 0x00; - D_8015DD68.colorStart[2].a = 0xFF; - D_8015DD68.colorStart[3].r = 0x00; - D_8015DD68.colorStart[3].g = 0x80; - D_8015DD68.colorStart[3].b = 0x00; - D_8015DD68.colorStart[3].a = 0xFF; - D_8015DD68.colorEnd[0].r = 0x00; - D_8015DD68.colorEnd[0].g = 0x20; - D_8015DD68.colorEnd[0].b = 0x00; - D_8015DD68.colorEnd[0].a = 0x00; - D_8015DD68.colorEnd[1].r = 0x00; - D_8015DD68.colorEnd[1].g = 0x20; - D_8015DD68.colorEnd[1].b = 0x00; - D_8015DD68.colorEnd[1].a = 0x00; - D_8015DD68.colorEnd[2].r = 0x00; - D_8015DD68.colorEnd[2].g = 0x40; - D_8015DD68.colorEnd[2].b = 0x00; - D_8015DD68.colorEnd[2].a = 0x00; - D_8015DD68.colorEnd[3].r = 0x00; - D_8015DD68.colorEnd[3].g = 0x40; - D_8015DD68.colorEnd[3].b = 0x00; - D_8015DD68.colorEnd[3].a = 0x00; + D_8015DD68.colorStart[0].r = 10; + D_8015DD68.colorStart[0].g = 200; + D_8015DD68.colorStart[0].b = 10; + D_8015DD68.colorStart[0].a = 255; + D_8015DD68.colorStart[1].r = 0; + D_8015DD68.colorStart[1].g = 128; + D_8015DD68.colorStart[1].b = 0; + D_8015DD68.colorStart[1].a = 255; + D_8015DD68.colorStart[2].r = 0; + D_8015DD68.colorStart[2].g = 128; + D_8015DD68.colorStart[2].b = 0; + D_8015DD68.colorStart[2].a = 255; + D_8015DD68.colorStart[3].r = 0; + D_8015DD68.colorStart[3].g = 128; + D_8015DD68.colorStart[3].b = 0; + D_8015DD68.colorStart[3].a = 255; + D_8015DD68.colorEnd[0].r = 0; + D_8015DD68.colorEnd[0].g = 32; + D_8015DD68.colorEnd[0].b = 0; + D_8015DD68.colorEnd[0].a = 0; + D_8015DD68.colorEnd[1].r = 0; + D_8015DD68.colorEnd[1].g = 32; + D_8015DD68.colorEnd[1].b = 0; + D_8015DD68.colorEnd[1].a = 0; + D_8015DD68.colorEnd[2].r = 0; + D_8015DD68.colorEnd[2].g = 64; + D_8015DD68.colorEnd[2].b = 0; + D_8015DD68.colorEnd[2].a = 0; + D_8015DD68.colorEnd[3].r = 0; + D_8015DD68.colorEnd[3].g = 64; + D_8015DD68.colorEnd[3].b = 0; + D_8015DD68.colorEnd[3].a = 0; D_8015DD68.timer = 0; D_8015DD68.duration = 16; D_8015DD68.speed = 8.0f; @@ -2949,38 +2949,38 @@ void func_80062A28(GlobalContext* globalCtx, Vec3f* v) { D_8015CF10.position.z = (s32)v->z; D_8015CF10.uDiv = 5; D_8015CF10.vDiv = 5; - D_8015CF10.colorStart[0].r = 0x80; - D_8015CF10.colorStart[0].g = 0x00; - D_8015CF10.colorStart[0].b = 0x40; - D_8015CF10.colorStart[0].a = 0xFF; - D_8015CF10.colorStart[1].r = 0x80; - D_8015CF10.colorStart[1].g = 0x00; - D_8015CF10.colorStart[1].b = 0x40; - D_8015CF10.colorStart[1].a = 0xFF; - D_8015CF10.colorStart[2].r = 0xFF; - D_8015CF10.colorStart[2].g = 0x80; - D_8015CF10.colorStart[2].b = 0x00; - D_8015CF10.colorStart[2].a = 0xFF; - D_8015CF10.colorStart[3].r = 0xFF; - D_8015CF10.colorStart[3].g = 0x80; - D_8015CF10.colorStart[3].b = 0x00; - D_8015CF10.colorStart[3].a = 0xFF; - D_8015CF10.colorEnd[0].r = 0x40; - D_8015CF10.colorEnd[0].g = 0x00; - D_8015CF10.colorEnd[0].b = 0x20; - D_8015CF10.colorEnd[0].a = 0x00; - D_8015CF10.colorEnd[1].r = 0x40; - D_8015CF10.colorEnd[1].g = 0x00; - D_8015CF10.colorEnd[1].b = 0x20; - D_8015CF10.colorEnd[1].a = 0x00; - D_8015CF10.colorEnd[2].r = 0x80; - D_8015CF10.colorEnd[2].g = 0x00; - D_8015CF10.colorEnd[2].b = 0x40; - D_8015CF10.colorEnd[2].a = 0x00; - D_8015CF10.colorEnd[3].r = 0x80; - D_8015CF10.colorEnd[3].g = 0x00; - D_8015CF10.colorEnd[3].b = 0x40; - D_8015CF10.colorEnd[3].a = 0x00; + D_8015CF10.colorStart[0].r = 128; + D_8015CF10.colorStart[0].g = 0; + D_8015CF10.colorStart[0].b = 64; + D_8015CF10.colorStart[0].a = 255; + D_8015CF10.colorStart[1].r = 128; + D_8015CF10.colorStart[1].g = 0; + D_8015CF10.colorStart[1].b = 64; + D_8015CF10.colorStart[1].a = 255; + D_8015CF10.colorStart[2].r = 255; + D_8015CF10.colorStart[2].g = 128; + D_8015CF10.colorStart[2].b = 0; + D_8015CF10.colorStart[2].a = 255; + D_8015CF10.colorStart[3].r = 255; + D_8015CF10.colorStart[3].g = 128; + D_8015CF10.colorStart[3].b = 0; + D_8015CF10.colorStart[3].a = 255; + D_8015CF10.colorEnd[0].r = 64; + D_8015CF10.colorEnd[0].g = 0; + D_8015CF10.colorEnd[0].b = 32; + D_8015CF10.colorEnd[0].a = 0; + D_8015CF10.colorEnd[1].r = 64; + D_8015CF10.colorEnd[1].g = 0; + D_8015CF10.colorEnd[1].b = 32; + D_8015CF10.colorEnd[1].a = 0; + D_8015CF10.colorEnd[2].r = 128; + D_8015CF10.colorEnd[2].g = 0; + D_8015CF10.colorEnd[2].b = 64; + D_8015CF10.colorEnd[2].a = 0; + D_8015CF10.colorEnd[3].r = 128; + D_8015CF10.colorEnd[3].g = 0; + D_8015CF10.colorEnd[3].b = 64; + D_8015CF10.colorEnd[3].a = 0; D_8015CF10.timer = 0; D_8015CF10.duration = 16; D_8015CF10.speed = 8.0f; @@ -3004,38 +3004,38 @@ void func_80062B80(GlobalContext* globalCtx, Vec3f* v) { D_8015D3D8.position.z = (s32)v->z; D_8015D3D8.uDiv = 5; D_8015D3D8.vDiv = 5; - D_8015D3D8.colorStart[0].r = 0xFF; - D_8015D3D8.colorStart[0].g = 0xFF; - D_8015D3D8.colorStart[0].b = 0xFF; - D_8015D3D8.colorStart[0].a = 0xFF; - D_8015D3D8.colorStart[1].r = 0x64; - D_8015D3D8.colorStart[1].g = 0x64; - D_8015D3D8.colorStart[1].b = 0x64; - D_8015D3D8.colorStart[1].a = 0x64; - D_8015D3D8.colorStart[2].r = 0x64; - D_8015D3D8.colorStart[2].g = 0x64; - D_8015D3D8.colorStart[2].b = 0x64; - D_8015D3D8.colorStart[2].a = 0x64; - D_8015D3D8.colorStart[3].r = 0x64; - D_8015D3D8.colorStart[3].g = 0x64; - D_8015D3D8.colorStart[3].b = 0x64; - D_8015D3D8.colorStart[3].a = 0x64; - D_8015D3D8.colorEnd[0].r = 0x32; - D_8015D3D8.colorEnd[0].g = 0x32; - D_8015D3D8.colorEnd[0].b = 0x32; - D_8015D3D8.colorEnd[0].a = 0x32; - D_8015D3D8.colorEnd[1].r = 0x32; - D_8015D3D8.colorEnd[1].g = 0x32; - D_8015D3D8.colorEnd[1].b = 0x32; - D_8015D3D8.colorEnd[1].a = 0x32; - D_8015D3D8.colorEnd[2].r = 0x32; - D_8015D3D8.colorEnd[2].g = 0x32; - D_8015D3D8.colorEnd[2].b = 0x32; - D_8015D3D8.colorEnd[2].a = 0x32; - D_8015D3D8.colorEnd[3].r = 0x00; - D_8015D3D8.colorEnd[3].g = 0x00; - D_8015D3D8.colorEnd[3].b = 0x00; - D_8015D3D8.colorEnd[3].a = 0x00; + D_8015D3D8.colorStart[0].r = 255; + D_8015D3D8.colorStart[0].g = 255; + D_8015D3D8.colorStart[0].b = 255; + D_8015D3D8.colorStart[0].a = 255; + D_8015D3D8.colorStart[1].r = 100; + D_8015D3D8.colorStart[1].g = 100; + D_8015D3D8.colorStart[1].b = 100; + D_8015D3D8.colorStart[1].a = 100; + D_8015D3D8.colorStart[2].r = 100; + D_8015D3D8.colorStart[2].g = 100; + D_8015D3D8.colorStart[2].b = 100; + D_8015D3D8.colorStart[2].a = 100; + D_8015D3D8.colorStart[3].r = 100; + D_8015D3D8.colorStart[3].g = 100; + D_8015D3D8.colorStart[3].b = 100; + D_8015D3D8.colorStart[3].a = 100; + D_8015D3D8.colorEnd[0].r = 50; + D_8015D3D8.colorEnd[0].g = 50; + D_8015D3D8.colorEnd[0].b = 50; + D_8015D3D8.colorEnd[0].a = 50; + D_8015D3D8.colorEnd[1].r = 50; + D_8015D3D8.colorEnd[1].g = 50; + D_8015D3D8.colorEnd[1].b = 50; + D_8015D3D8.colorEnd[1].a = 50; + D_8015D3D8.colorEnd[2].r = 50; + D_8015D3D8.colorEnd[2].g = 50; + D_8015D3D8.colorEnd[2].b = 50; + D_8015D3D8.colorEnd[2].a = 50; + D_8015D3D8.colorEnd[3].r = 0; + D_8015D3D8.colorEnd[3].g = 0; + D_8015D3D8.colorEnd[3].b = 0; + D_8015D3D8.colorEnd[3].a = 0; D_8015D3D8.timer = 0; D_8015D3D8.duration = 16; D_8015D3D8.speed = 8.0f; diff --git a/src/code/z_construct.c b/src/code/z_construct.c index e4159a5836..42f2789771 100644 --- a/src/code/z_construct.c +++ b/src/code/z_construct.c @@ -171,16 +171,16 @@ void func_801109B0(GlobalContext* globalCtx) { interfaceCtx->unk_23C = 0; R_ITEM_BTN_X(0) = 160; - R_B_BTN_COLOR(0) = 0xFF; - R_B_BTN_COLOR(1) = 0x1E; - R_B_BTN_COLOR(2) = 0x1E; + R_B_BTN_COLOR(0) = 255; + R_B_BTN_COLOR(1) = 30; + R_B_BTN_COLOR(2) = 30; R_ITEM_ICON_X(0) = 160; R_ITEM_AMMO_X(0) = 162; R_A_BTN_X = 186; R_A_ICON_X = 186; - R_A_BTN_COLOR(0) = 0x00; - R_A_BTN_COLOR(1) = 0xC8; - R_A_BTN_COLOR(2) = 0x32; + R_A_BTN_COLOR(0) = 0; + R_A_BTN_COLOR(1) = 200; + R_A_BTN_COLOR(2) = 50; } #else #pragma GLOBAL_ASM("asm/non_matchings/code/z_construct/func_801109B0.s") @@ -290,7 +290,7 @@ void func_80111070(void) { YREG(94) = 3; YREG(95) = 1; R_MAGIC_FILL_COLOR(0) = 0; - R_MAGIC_FILL_COLOR(1) = 0xC8; + R_MAGIC_FILL_COLOR(1) = 200; R_MAGIC_FILL_COLOR(2) = 0; ZREG(9) = 0x8C; ZREG(10) = 0xC8; @@ -321,8 +321,8 @@ void func_80111070(void) { ZREG(36) = 0; ZREG(37) = 0; ZREG(38) = 0; - R_C_BTN_COLOR(0) = 0xFF; - R_C_BTN_COLOR(1) = 0xA0; + R_C_BTN_COLOR(0) = 255; + R_C_BTN_COLOR(1) = 160; R_C_BTN_COLOR(2) = 0; ZREG(46) = 1; ZREG(47) = 1; @@ -548,8 +548,8 @@ void func_80111070(void) { R_COMPASS_OFFSET_X = 0x6E; R_COMPASS_OFFSET_Y = -0x2E4; R_MINIMAP_COLOR(0) = 0; - R_MINIMAP_COLOR(1) = 0xFF; - R_MINIMAP_COLOR(2) = 0xFF; + R_MINIMAP_COLOR(1) = 255; + R_MINIMAP_COLOR(2) = 255; } VREG(21) = 0; diff --git a/src/code/z_debug.c b/src/code/z_debug.c index a595de5a68..658f641442 100644 --- a/src/code/z_debug.c +++ b/src/code/z_debug.c @@ -20,8 +20,8 @@ PrintTextBuffer D_8015FA98[0x16]; s16 D_8011E0B0 = 0; // PrintTextBuffer index Color_RGBA8 printTextColors[] = { - { 0xFF, 0xFF, 0x20, 0xC0 }, { 0xFF, 0x96, 0x80, 0xC0 }, { 0x80, 0x60, 0x00, 0x40 }, { 0xC0, 0x80, 0x10, 0x80 }, - { 0xFF, 0xC0, 0x20, 0x80 }, { 0xE6, 0xE6, 0xDC, 0x40 }, { 0x80, 0x96, 0xFF, 0x80 }, { 0x80, 0xFF, 0x20, 0x80 }, + { 255, 255, 32, 192 }, { 255, 150, 128, 192 }, { 128, 96, 0, 64 }, { 192, 128, 16, 128 }, + { 255, 192, 32, 128 }, { 230, 230, 220, 64 }, { 128, 150, 255, 128 }, { 128, 255, 32, 128 }, }; InputCombo inputCombos[REG_GROUPS] = { @@ -201,16 +201,16 @@ void func_80063C04(GfxPrint* gfxPrint) { name[0] = 'R'; name[1] = regChar[gGameInfo->regGroup]; // r_group type char name[2] = '\0'; - GfxPrint_SetColor(gfxPrint, 0, 0x80, 0x80, 0x80); + GfxPrint_SetColor(gfxPrint, 0, 128, 128, 128); for (i = 0; i != REG_PER_PAGE; i++) { if (i == gGameInfo->regCur) { - GfxPrint_SetColor(gfxPrint, 0, 0xff, 0xff, 0xff); + GfxPrint_SetColor(gfxPrint, 0, 255, 255, 255); } GfxPrint_SetPos(gfxPrint, 3, i + 5); GfxPrint_Printf(gfxPrint, "%s%02d%6d", &name, page + i, gGameInfo->data[i + regGroup]); if (i == gGameInfo->regCur) { - GfxPrint_SetColor(gfxPrint, 0, 0x80, 0x80, 0x80); + GfxPrint_SetColor(gfxPrint, 0, 128, 128, 128); } } } diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 26d5a3f8df..1e03b4e610 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -296,15 +296,15 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase* gSaveContext.eventChkInf[6] |= 0x0200; break; case 22: - D_801614B0.r = 0xFF; - D_801614B0.g = 0xFF; - D_801614B0.b = 0xFF; - D_801614B0.a = 0xFF; + D_801614B0.r = 255; + D_801614B0.g = 255; + D_801614B0.b = 255; + D_801614B0.a = 255; break; case 23: - D_801614B0.r = 0xFF; - D_801614B0.g = 0xB4; - D_801614B0.b = 0x64; + D_801614B0.r = 255; + D_801614B0.g = 180; + D_801614B0.b = 100; D_801614B0.a = 255.0f * temp; break; case 24: diff --git a/src/code/z_eff_blure.c b/src/code/z_eff_blure.c index bad6871ab9..e6d9b5232d 100644 --- a/src/code/z_eff_blure.c +++ b/src/code/z_eff_blure.c @@ -139,14 +139,14 @@ void EffectBlure_Init1(void* thisx, void* initParamsx) { this->addAngleChange = 0; this->addAngle = 0; this->drawMode = 0; - this->altPrimColor.r = 0x00; - this->altPrimColor.g = 0x00; - this->altPrimColor.b = 0x00; - this->altPrimColor.a = 0x00; - this->altEnvColor.r = 0x00; - this->altEnvColor.g = 0x00; - this->altEnvColor.b = 0x00; - this->altEnvColor.a = 0x00; + this->altPrimColor.r = 0; + this->altPrimColor.g = 0; + this->altPrimColor.b = 0; + this->altPrimColor.a = 0; + this->altEnvColor.r = 0; + this->altEnvColor.g = 0; + this->altEnvColor.b = 0; + this->altEnvColor.a = 0; this->mode4Param = 1.0f; } } @@ -372,14 +372,14 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3 sp30 = sp30; // Optimized out but seems necessary to match stack usage if (this->flags & 0x10) { - color1->a = 0xFF; - color1->b = 0xFF; - color1->g = 0xFF; - color1->r = 0xFF; - color2->r = 0xFF; - color2->g = 0xFF; - color2->b = 0xFF; - color2->a = 0xFF; + color1->a = 255; + color1->b = 255; + color1->g = 255; + color1->r = 255; + color2->r = 255; + color2->g = 255; + color2->b = 255; + color2->a = 255; } else { color1->r = func_80027E84(this->p1StartColor.r, this->p1EndColor.r, ratio); color1->g = func_80027E84(this->p1StartColor.g, this->p1EndColor.g, ratio); diff --git a/src/code/z_eff_ss_dead.c b/src/code/z_eff_ss_dead.c index 05e60bdcd7..885e94b143 100644 --- a/src/code/z_eff_ss_dead.c +++ b/src/code/z_eff_ss_dead.c @@ -18,7 +18,7 @@ void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a gDPPipeSync(displayListHead++); if (color == NULL) { - gDPSetFogColor(displayListHead++, 0xFF, 0x00, 0x00, 0x00); + gDPSetFogColor(displayListHead++, 255, 0, 0, 0); } else { gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a); } @@ -88,7 +88,7 @@ void func_80026690(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 a gDPPipeSync(displayListHead++); if (color == NULL) { - gDPSetFogColor(displayListHead++, 0xFF, 0x00, 0x00, 0x00); + gDPSetFogColor(displayListHead++, 255, 0, 0, 0); } else { gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a); } diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c index 6106841344..f06dc4a031 100644 --- a/src/code/z_effect_soft_sprite_old_init.c +++ b/src/code/z_effect_soft_sprite_old_init.c @@ -162,7 +162,7 @@ // EffectSsFhgFlash Spawn Functions -void EffectSsFhgFlash_Spawn(GlobalContext *globalCtx, Vec3f *pos, Vec3f *velocity, Vec3f *accel, s16 arg4, u8 arg5) { +void EffectSsFhgFlash_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 arg4, u8 arg5) { EffectSsFhgFlashInitParams initParams; Math_Vec3f_Copy(&initParams.pos, pos); @@ -175,8 +175,7 @@ void EffectSsFhgFlash_Spawn(GlobalContext *globalCtx, Vec3f *pos, Vec3f *velocit EffectSs_Spawn(globalCtx, EFFECT_SS_FHG_FLASH, 128, &initParams); } - -void EffectSsFhgFlash_Spawn2(GlobalContext *globalCtx, Actor *arg1, Vec3f *pos, s16 arg3, u8 arg4) { +void EffectSsFhgFlash_Spawn2(GlobalContext* globalCtx, Actor* arg1, Vec3f* pos, s16 arg3, u8 arg4) { EffectSsFhgFlashInitParams initParams; initParams.unk_28 = arg1; diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index a48378b8ce..a7b7fba35a 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -331,7 +331,7 @@ void EnAObj_Draw(Actor* thisx, GlobalContext* globalCtx) { } if (thisx->params == A_OBJ_KNOB) { - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 1, 0x3C, 0x3C, 0x3C, 0x32); + gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 1, 60, 60, 60, 50); } gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_a_keep.c", 712), diff --git a/src/code/z_fbdemo.c b/src/code/z_fbdemo.c index 5a91cfd6ca..1b7aa46176 100644 --- a/src/code/z_fbdemo.c +++ b/src/code/z_fbdemo.c @@ -5,10 +5,10 @@ Gfx D_8012AFB0[] = { gsDPPipeSync(), gsDPSetCycleType(G_CYC_FILL), gsDPSetColorImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0x0F000000), - gsDPSetFillColor(RGBA8(0x42, 0x11, 0x42, 0x11)), + gsDPSetFillColor((GPACK_RGBA5551(65, 65, 65, 1) << 16) | GPACK_RGBA5551(65, 65, 65, 1)), gsDPFillRectangle(0, 0, 319, 239), gsDPPipeSync(), - gsDPSetFillColor(RGBA8(0x42, 0x3F, 0x42, 0x3F)), + gsDPSetFillColor((GPACK_RGBA5551(65, 65, 255, 1) << 16) | GPACK_RGBA5551(65, 65, 255, 1)), gsDPFillRectangle(20, 20, 300, 220), gsDPPipeSync(), gsSPEndDisplayList(), diff --git a/src/code/z_fbdemo_circle.c b/src/code/z_fbdemo_circle.c index 8eb5786383..dfcf7e54a7 100644 --- a/src/code/z_fbdemo_circle.c +++ b/src/code/z_fbdemo_circle.c @@ -304,18 +304,18 @@ void TransitionCircle_Start(TransitionCircle* this) { } if (this->typeColor == 0) { - this->color.rgba = RGBA8(0x00, 0x00, 0x00, 0xFF); + this->color.rgba = RGBA8(0, 0, 0, 255); } else if (this->typeColor == 1) { - this->color.rgba = RGBA8(0xA0, 0xA0, 0xA0, 0xFF); + this->color.rgba = RGBA8(160, 160, 160, 255); } else if (this->typeColor == 2) { // yes, really. - this->color.r = 0x64; - this->color.g = 0x64; - this->color.b = 0x64; - this->color.a = 0xFF; + this->color.r = 100; + this->color.g = 100; + this->color.b = 100; + this->color.a = 255; } else { this->step = 0x28; - this->color.rgba = this->effect == 1 ? RGBA8(0x00, 0x00, 0x00, 0xFF) : RGBA8(0xA0, 0xA0, 0xA0, 0xFF); + this->color.rgba = this->effect == 1 ? RGBA8(0, 0, 0, 255) : RGBA8(160, 160, 160, 255); } if (this->unk_14 != 0) { this->texY = 0; diff --git a/src/code/z_fbdemo_wipe1.c b/src/code/z_fbdemo_wipe1.c index c0cacc18ce..93b3a95118 100644 --- a/src/code/z_fbdemo_wipe1.c +++ b/src/code/z_fbdemo_wipe1.c @@ -215,7 +215,7 @@ void TransitionWipe_Draw(TransitionWipe* this, Gfx** gfxP) { gDPPipeSync(gfx++); tex = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0, 0); gSPSegment(gfx++, 8, tex); - gDPSetPrimColor(gfx++, 0, 0x80, this->color.r, this->color.g, this->color.b, 0xFF); + gDPSetPrimColor(gfx++, 0, 0x80, this->color.r, this->color.g, this->color.b, 255); gSPMatrix(gfx++, &this->projection, G_MTX_LOAD | G_MTX_PROJECTION); gSPPerspNormalize(gfx++, this->normal); gSPMatrix(gfx++, &this->lookAt, G_MTX_MUL | G_MTX_PROJECTION); diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c index 8556920735..883c7a5492 100644 --- a/src/code/z_lifemeter.c +++ b/src/code/z_lifemeter.c @@ -25,26 +25,26 @@ void Health_InitData(GlobalContext* globalCtx) { interfaceCtx->unk_22A = interfaceCtx->unk_1FE = 0; interfaceCtx->unk_22C = interfaceCtx->unk_200 = 0; - interfaceCtx->unk_20E[0] = 0xFF; - interfaceCtx->unk_20E[2] = 0x46; - interfaceCtx->unk_20E[4] = 0x32; - interfaceCtx->unk_21A[0] = 0x32; - interfaceCtx->unk_21A[2] = 0x28; - interfaceCtx->unk_21A[4] = 0x3C; + interfaceCtx->unk_20E[0] = 255; + interfaceCtx->unk_20E[2] = 70; + interfaceCtx->unk_20E[4] = 50; + interfaceCtx->unk_21A[0] = 50; + interfaceCtx->unk_21A[2] = 40; + interfaceCtx->unk_21A[4] = 60; - interfaceCtx->unk_20E[1] = 0xFF; - interfaceCtx->unk_20E[3] = 0x46; - interfaceCtx->unk_20E[5] = 0x32; - interfaceCtx->unk_21A[1] = 0x32; - interfaceCtx->unk_21A[3] = 0x28; - interfaceCtx->unk_21A[5] = 0x3C; + interfaceCtx->unk_20E[1] = 255; + interfaceCtx->unk_20E[3] = 70; + interfaceCtx->unk_20E[5] = 50; + interfaceCtx->unk_21A[1] = 50; + interfaceCtx->unk_21A[3] = 40; + interfaceCtx->unk_21A[5] = 60; - D_8015FDD0[0] = D_8015FDD0[3] = 0xFF; - D_8015FDD0[1] = D_8015FDD0[4] = 0xFF; - D_8015FDD0[2] = D_8015FDD0[5] = 0xFF; - D_8015FDE0[0] = D_8015FDE0[3] = 0xC8; - D_8015FDE0[1] = D_8015FDE0[4] = 0x00; - D_8015FDE0[2] = D_8015FDE0[5] = 0x00; + D_8015FDD0[0] = D_8015FDD0[3] = 255; + D_8015FDD0[1] = D_8015FDD0[4] = 255; + D_8015FDD0[2] = D_8015FDD0[5] = 255; + D_8015FDE0[0] = D_8015FDE0[3] = 200; + D_8015FDE0[1] = D_8015FDE0[4] = 0; + D_8015FDE0[2] = D_8015FDE0[5] = 0; } #ifdef NON_MATCHING @@ -70,13 +70,13 @@ void Health_UpdateData(GlobalContext* globalCtx) { } } - interfaceCtx->unk_20E[0] = 0xFF; - interfaceCtx->unk_20E[2] = 0x46; - interfaceCtx->unk_20E[4] = 0x32; + interfaceCtx->unk_20E[0] = 255; + interfaceCtx->unk_20E[2] = 70; + interfaceCtx->unk_20E[4] = 50; - interfaceCtx->unk_21A[0] = 0x32; - interfaceCtx->unk_21A[2] = 0x28; - interfaceCtx->unk_21A[4] = 0x3C; + interfaceCtx->unk_21A[0] = 50; + interfaceCtx->unk_21A[2] = 40; + interfaceCtx->unk_21A[4] = 60; interfaceCtx->unk_20E[1] = D_8011FF10[0]; interfaceCtx->unk_20E[3] = D_8011FF10[1]; @@ -110,9 +110,9 @@ void Health_UpdateData(GlobalContext* globalCtx) { D_8015FDD0[1] = 0xFF; D_8015FDD0[2] = 0xFF; - D_8015FDE0[0] = 0xC8; - D_8015FDE0[1] = 0x00; - D_8015FDE0[2] = 0x00; + D_8015FDE0[0] = 200; + D_8015FDE0[1] = 0; + D_8015FDE0[2] = 0; D_8015FDD0[3] = D_8011FF60[0]; D_8015FDD0[4] = D_8011FF60[1]; diff --git a/src/code/z_lights.c b/src/code/z_lights.c index 1bca397c57..7abfb6a253 100644 --- a/src/code/z_lights.c +++ b/src/code/z_lights.c @@ -117,7 +117,7 @@ void Lights_Free(z_Light* light) { void func_8007A614(GlobalContext* globalCtx, LightingContext* lightCtx) { Lights_ClearHead(globalCtx, lightCtx); - Lights_SetAmbientColor(lightCtx, 0x50, 0x50, 0x50); + Lights_SetAmbientColor(lightCtx, 80, 80, 80); func_8007A698(lightCtx, 0, 0, 0, 0x3e4, 0x3200); bzero(&sLightsList, sizeof(sLightsList)); } diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index 690553acf0..17d2ef1f00 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -329,7 +329,7 @@ void Minimap_DrawCompassIcons(GlobalContext* globalCtx) { gSPMatrix(gfxCtx->overlay.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, 0xFF); + gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 255); gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); tempX = player->actor.posRot.pos.x; @@ -344,7 +344,7 @@ void Minimap_DrawCompassIcons(GlobalContext* globalCtx) { gSPMatrix(gfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_map_exp.c", 585), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xC8, 0xFF, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 200, 255, 0, 255); gSPDisplayList(gfxCtx->overlay.p++, D_0400C820); tempX = sPlayerInitialPosX; @@ -358,7 +358,7 @@ void Minimap_DrawCompassIcons(GlobalContext* globalCtx) { gSPMatrix(gfxCtx->overlay.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_map_exp.c", 603), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0xFF, 0xC8, 0x00, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0xFF, 200, 0, 0, 255); gSPDisplayList(gfxCtx->overlay.p++, D_0400C820); } @@ -395,7 +395,7 @@ void Minimap_Draw(GlobalContext* globalCtx) { 0, TEXEL0, 0, PRIMITIVE, 0); if (gSaveContext.dungeonItems[mapIndex] & gBitFlags[DUNGEON_MAP]) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x64, 0xFF, 0xFF, interfaceCtx->minimapAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha); gDPLoadTextureBlock_4b(gfxCtx->overlay.p++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, diff --git a/src/code/z_map_mark.c b/src/code/z_map_mark.c index 510731fc66..52836d8ec6 100644 --- a/src/code/z_map_mark.c +++ b/src/code/z_map_mark.c @@ -108,8 +108,8 @@ void MapMark_Draw(GlobalContext* globalCtx) { gDPPipeSync(gfxCtx->overlay.p++); gDPSetTextureLUT(gfxCtx->overlay.p++, G_TT_NONE); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->minimapAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, interfaceCtx->minimapAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->minimapAlpha); + gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, interfaceCtx->minimapAlpha); markPoint = &mapMarkData->points[0]; for (i = 0; i < mapMarkData->count; i++) { diff --git a/src/code/z_moji.c b/src/code/z_moji.c index d6966544fd..d7366ceb93 100644 --- a/src/code/z_moji.c +++ b/src/code/z_moji.c @@ -1,10 +1,10 @@ #include #include -u32 sFontColorRed = 0xFF; -u32 sFontColorGreen = 0xFF; -u32 sFontColorBlue = 0xFF; -u32 sFontColorAlpha = 0xFF; +u32 sFontColorRed = 255; +u32 sFontColorGreen = 255; +u32 sFontColorBlue = 255; +u32 sFontColorAlpha = 255; s32 D_80120120 = 0; s32 D_80120124 = 0; diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index ded945fce3..3715d01803 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -123,9 +123,9 @@ u16 sCUpTimer = 0; s16 gSpoilingItems[] = { ITEM_ODD_MUSHROOM, ITEM_FROG, ITEM_EYEDROPS }; s16 gSpoilingItemReverts[] = { ITEM_COJIRO, ITEM_PRESCRIPTION, ITEM_PRESCRIPTION }; -s16 sMagicBorderR = 0xFF; -s16 sMagicBorderG = 0xFF; -s16 sMagicBorderB = 0xFF; +s16 sMagicBorderR = 255; +s16 sMagicBorderG = 255; +s16 sMagicBorderB = 255; s16 sExtraItemBases[] = { ITEM_STICK, ITEM_STICK, ITEM_NUT, ITEM_NUT, ITEM_BOMB, ITEM_BOMB, ITEM_BOMB, ITEM_BOMB, ITEM_BOW, @@ -159,51 +159,51 @@ void func_80082644(GlobalContext* globalCtx, s16 alpha) { InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; if (gSaveContext.buttonStatus[0] == BTN_DISABLED) { - if (interfaceCtx->bAlpha != 0x46) { - interfaceCtx->bAlpha = 0x46; + if (interfaceCtx->bAlpha != 70) { + interfaceCtx->bAlpha = 70; } } else { - if (interfaceCtx->bAlpha != 0xFF) { + if (interfaceCtx->bAlpha != 255) { interfaceCtx->bAlpha = alpha; } } if (gSaveContext.buttonStatus[1] == BTN_DISABLED) { - if (interfaceCtx->cLeftAlpha != 0x46) { - interfaceCtx->cLeftAlpha = 0x46; + if (interfaceCtx->cLeftAlpha != 70) { + interfaceCtx->cLeftAlpha = 70; } } else { - if (interfaceCtx->cLeftAlpha != 0xFF) { + if (interfaceCtx->cLeftAlpha != 255) { interfaceCtx->cLeftAlpha = alpha; } } if (gSaveContext.buttonStatus[2] == BTN_DISABLED) { - if (interfaceCtx->cDownAlpha != 0x46) { - interfaceCtx->cDownAlpha = 0x46; + if (interfaceCtx->cDownAlpha != 70) { + interfaceCtx->cDownAlpha = 70; } } else { - if (interfaceCtx->cDownAlpha != 0xFF) { + if (interfaceCtx->cDownAlpha != 255) { interfaceCtx->cDownAlpha = alpha; } } if (gSaveContext.buttonStatus[3] == BTN_DISABLED) { - if (interfaceCtx->cRightAlpha != 0x46) { - interfaceCtx->cRightAlpha = 0x46; + if (interfaceCtx->cRightAlpha != 70) { + interfaceCtx->cRightAlpha = 70; } } else { - if (interfaceCtx->cRightAlpha != 0xFF) { + if (interfaceCtx->cRightAlpha != 255) { interfaceCtx->cRightAlpha = alpha; } } if (gSaveContext.buttonStatus[4] == BTN_DISABLED) { - if (interfaceCtx->aAlpha != 0x46) { - interfaceCtx->aAlpha = 0x46; + if (interfaceCtx->aAlpha != 70) { + interfaceCtx->aAlpha = 70; } } else { - if (interfaceCtx->aAlpha != 0xFF) { + if (interfaceCtx->aAlpha != 255) { interfaceCtx->aAlpha = alpha; } } @@ -242,7 +242,7 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; s16 alpha; - alpha = 0xFF - maxAlpha; + alpha = 255 - maxAlpha; switch (gSaveContext.unk_13E8) { case 1: @@ -251,7 +251,7 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { osSyncPrintf("a_alpha=%d, c_alpha=%d → ", interfaceCtx->aAlpha, interfaceCtx->cLeftAlpha); if (gSaveContext.unk_13E8 == 8) { - if (interfaceCtx->bAlpha != 0xFF) { + if (interfaceCtx->bAlpha != 255) { interfaceCtx->bAlpha = alpha; } } else { @@ -306,7 +306,7 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { interfaceCtx->minimapAlpha = maxAlpha; } - if (interfaceCtx->healthAlpha != 0xFF) { + if (interfaceCtx->healthAlpha != 255) { interfaceCtx->healthAlpha = alpha; } @@ -344,7 +344,7 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { interfaceCtx->minimapAlpha = maxAlpha; } - if (interfaceCtx->aAlpha != 0xFF) { + if (interfaceCtx->aAlpha != 255) { interfaceCtx->aAlpha = alpha; } @@ -356,15 +356,15 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { interfaceCtx->minimapAlpha = maxAlpha; } - if (interfaceCtx->aAlpha != 0xFF) { + if (interfaceCtx->aAlpha != 255) { interfaceCtx->aAlpha = alpha; } - if (interfaceCtx->healthAlpha != 0xFF) { + if (interfaceCtx->healthAlpha != 255) { interfaceCtx->healthAlpha = alpha; } - if (interfaceCtx->magicAlpha != 0xFF) { + if (interfaceCtx->magicAlpha != 255) { interfaceCtx->magicAlpha = alpha; } @@ -372,15 +372,15 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { case 6: func_8008277C(globalCtx, maxAlpha, alpha); - if (interfaceCtx->aAlpha != 0xFF) { + if (interfaceCtx->aAlpha != 255) { interfaceCtx->aAlpha = alpha; } - if (interfaceCtx->healthAlpha != 0xFF) { + if (interfaceCtx->healthAlpha != 255) { interfaceCtx->healthAlpha = alpha; } - if (interfaceCtx->magicAlpha != 0xFF) { + if (interfaceCtx->magicAlpha != 255) { interfaceCtx->magicAlpha = alpha; } @@ -405,14 +405,14 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { case SCENE_SPOT18: case SCENE_SPOT20: case SCENE_GANON_TOU: - if (interfaceCtx->minimapAlpha < 0xAA) { + if (interfaceCtx->minimapAlpha < 170) { interfaceCtx->minimapAlpha = alpha; } else { - interfaceCtx->minimapAlpha = 0xAA; + interfaceCtx->minimapAlpha = 170; } break; default: - if (interfaceCtx->minimapAlpha != 0xFF) { + if (interfaceCtx->minimapAlpha != 255) { interfaceCtx->minimapAlpha = alpha; } break; @@ -425,11 +425,11 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { func_80082644(globalCtx, alpha); - if (interfaceCtx->healthAlpha != 0xFF) { + if (interfaceCtx->healthAlpha != 255) { interfaceCtx->healthAlpha = alpha; } - if (interfaceCtx->magicAlpha != 0xFF) { + if (interfaceCtx->magicAlpha != 255) { interfaceCtx->magicAlpha = alpha; } @@ -459,11 +459,11 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { interfaceCtx->minimapAlpha = maxAlpha; } - if (interfaceCtx->healthAlpha != 0xFF) { + if (interfaceCtx->healthAlpha != 255) { interfaceCtx->healthAlpha = alpha; } - if (interfaceCtx->magicAlpha != 0xFF) { + if (interfaceCtx->magicAlpha != 255) { interfaceCtx->magicAlpha = alpha; } @@ -497,7 +497,7 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { interfaceCtx->minimapAlpha = maxAlpha; } - if (interfaceCtx->bAlpha != 0xFF) { + if (interfaceCtx->bAlpha != 255) { interfaceCtx->bAlpha = alpha; } @@ -531,21 +531,21 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { interfaceCtx->magicAlpha = maxAlpha; } - if (interfaceCtx->healthAlpha != 0xFF) { + if (interfaceCtx->healthAlpha != 255) { interfaceCtx->healthAlpha = alpha; } break; case 12: - if (interfaceCtx->aAlpha != 0xFF) { + if (interfaceCtx->aAlpha != 255) { interfaceCtx->aAlpha = alpha; } - if (interfaceCtx->bAlpha != 0xFF) { + if (interfaceCtx->bAlpha != 255) { interfaceCtx->bAlpha = alpha; } - if (interfaceCtx->minimapAlpha != 0xFF) { + if (interfaceCtx->minimapAlpha != 255) { interfaceCtx->minimapAlpha = alpha; } @@ -581,11 +581,11 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { interfaceCtx->aAlpha = maxAlpha; } - if (interfaceCtx->healthAlpha != 0xFF) { + if (interfaceCtx->healthAlpha != 255) { interfaceCtx->healthAlpha = alpha; } - if (interfaceCtx->magicAlpha != 0xFF) { + if (interfaceCtx->magicAlpha != 255) { interfaceCtx->magicAlpha = alpha; } @@ -593,7 +593,7 @@ void func_80082850(GlobalContext* globalCtx, s16 maxAlpha) { } if ((globalCtx->roomCtx.curRoom.unk_03 == 1) && (interfaceCtx->minimapAlpha >= 0xFF)) { - interfaceCtx->minimapAlpha = 0xFF; + interfaceCtx->minimapAlpha = 255; } } @@ -2443,14 +2443,14 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { if (gSaveContext.magic <= 0) { gSaveContext.magic = 0; gSaveContext.unk_13F0 = 3; - sMagicBorderB = 0xFF; - sMagicBorderG = 0xFF; - sMagicBorderR = 0xFF; + sMagicBorderB = 255; + sMagicBorderG = 255; + sMagicBorderR = 255; } else if (gSaveContext.magic == gSaveContext.unk_13F8) { gSaveContext.unk_13F0 = 3; - sMagicBorderB = 0xFF; - sMagicBorderG = 0xFF; - sMagicBorderR = 0xFF; + sMagicBorderB = 255; + sMagicBorderG = 255; + sMagicBorderR = 255; } case 3: case 4: @@ -2488,9 +2488,9 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { } break; case 5: - sMagicBorderB = 0xFF; - sMagicBorderG = 0xFF; - sMagicBorderR = 0xFF; + sMagicBorderB = 255; + sMagicBorderG = 255; + sMagicBorderR = 255; gSaveContext.unk_13F0 = 0; break; case 7: @@ -2506,7 +2506,7 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); gSaveContext.unk_13F0 = 0; - sMagicBorderR = sMagicBorderG = sMagicBorderB = 0xFF; + sMagicBorderR = sMagicBorderG = sMagicBorderB = 255; break; } @@ -2597,7 +2597,7 @@ void Interface_DrawMagicBar(GlobalContext* globalCtx) { gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, sMagicBorderR, sMagicBorderG, sMagicBorderB, interfaceCtx->magicAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x64, 0x32, 0x32, 0xFF); + gDPSetEnvColor(gfxCtx->overlay.p++, 100, 50, 50, 255); gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, D_020038C0, 8, 16, R_MAGIC_BAR_X, magicBarY, 8, 16, 1024, 1024); @@ -2622,11 +2622,11 @@ void Interface_DrawMagicBar(GlobalContext* globalCtx) { gDPPipeSync(gfxCtx->overlay.p++); gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, 0xFF); + gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 255); if (gSaveContext.unk_13F0 == 4) { // Yellow part of the bar being used when casting a spell - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFA, 0xFA, 0x00, interfaceCtx->magicAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 250, 250, 0, interfaceCtx->magicAlpha); gDPLoadMultiBlock_4b(gfxCtx->overlay.p++, D_02003AC0, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, @@ -2744,7 +2744,7 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, R_B_BTN_COLOR(0), R_B_BTN_COLOR(1), R_B_BTN_COLOR(2), interfaceCtx->bAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, 0xFF); + gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 255); gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, &D_02000A00[0], 32, 32, R_ITEM_BTN_X(0), R_ITEM_BTN_Y(0), R_ITEM_BTN_WIDTH(0), R_ITEM_BTN_WIDTH(0), R_ITEM_BTN_DD(0) * 2, R_ITEM_BTN_DD(0) * 2); @@ -2775,13 +2775,13 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { if ((globalCtx->pauseCtx.state != 0) || (globalCtx->pauseCtx.flag != 0)) { // Start Button Texture, Color & Label gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x78, 0x78, 0x78, interfaceCtx->startAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 120, 120, 120, interfaceCtx->startAlpha); gSPTextureRectangle(gfxCtx->overlay.p++, sStartButtonLeftPos[gSaveContext.language] << 2, 68, (sStartButtonLeftPos[gSaveContext.language] + 22) << 2, 156, G_TX_RENDERTILE, 0, 0, 1462, 1462); gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->startAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, 0x00); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->startAlpha); + gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 0); gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); @@ -2817,7 +2817,7 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { cUpAlpha = 0; } else if ((player->stateFlags2 & 0x00200000) || (func_8008F2F8(globalCtx) == 4) || (player->stateFlags2 & 0x00040000)) { - cUpAlpha = 0x46; + cUpAlpha = 70; } else { cUpAlpha = interfaceCtx->healthAlpha; } @@ -2827,8 +2827,8 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { gSPTextureRectangle(gfxCtx->overlay.p++, R_C_UP_BTN_X << 2, R_C_UP_BTN_Y << 2, (R_C_UP_BTN_X + 16) << 2, (R_C_UP_BTN_Y + 16) << 2, G_TX_RENDERTILE, 0, 0, 2048, 2048); gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, cUpAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, 0x00); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, cUpAlpha); + gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 0); gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); @@ -2941,11 +2941,11 @@ void Interface_DrawAmmoCount(GlobalContext* globalCtx, s16 button, s16 alpha) { ((item == ITEM_STICK) && (AMMO(item) == CUR_CAPACITY(UPG_STICKS))) || ((item == ITEM_NUT) && (AMMO(item) == CUR_CAPACITY(UPG_NUTS))) || ((item == ITEM_BOMBCHU) && (ammo == 50)) || ((item == ITEM_BEAN) && (ammo == 15))) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x78, 0xFF, 0x00, alpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 120, 255, 0, alpha); } if (ammo == 0) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x64, 0x64, 0x64, alpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 100, 100, 100, alpha); } for (i = 0; ammo >= 10; i++) { @@ -3108,7 +3108,7 @@ s16 sDigitWidth[] = { 9, 9, 8, 9, 9 }; // unused, most likely colors s16 D_80125B1C[][3] = { - { 0x00, 0x96, 0x00 }, { 0x64, 0xFF, 0x00 }, { 0xFF, 0xFF, 0xFF }, { 0x00, 0x00, 0x00 }, { 0xFF, 0xFF, 0xFF }, + { 0, 150, 0 }, { 100, 255, 0 }, { 255, 255, 255 }, { 0, 0, 0 }, { 255, 255, 255 }, }; s16 sRupeeDigitsFirst[] = { 1, 0, 0 }; @@ -3158,8 +3158,8 @@ void Interface_Draw(GlobalContext* globalCtx) { func_80094520(globalCtx->state.gfxCtx); // Rupee Icon - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xC8, 0xFF, 0x64, interfaceCtx->magicAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x50, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 200, 255, 100, interfaceCtx->magicAlpha); + gDPSetEnvColor(gfxCtx->overlay.p++, 0, 80, 0, 255); gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, D_02001F00, 16, 16, 26, 206, 16, 16, 1024, 1024); switch (globalCtx->sceneNum) { @@ -3180,14 +3180,14 @@ void Interface_Draw(GlobalContext* globalCtx) { if (gSaveContext.dungeonKeys[gSaveContext.mapIndex] >= 0) { // Small Key Icon gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xC8, 0xE6, 0xFF, interfaceCtx->magicAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x14, 0xFF); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 200, 230, 255, interfaceCtx->magicAlpha); + gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 20, 255); gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, D_02001E00, 16, 16, 26, 190, 16, 16, 1024, 1024); // Small Key Counter gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->magicAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); gDPSetCombineLERP(gfxCtx->overlay.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); @@ -3224,11 +3224,11 @@ void Interface_Draw(GlobalContext* globalCtx) { gDPPipeSync(gfxCtx->overlay.p++); if (gSaveContext.rupees == CUR_CAPACITY(UPG_WALLET)) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x78, 0xFF, 0x00, interfaceCtx->magicAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 120, 255, 0, interfaceCtx->magicAlpha); } else if (gSaveContext.rupees != 0) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->magicAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->magicAlpha); } else { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x64, 0x64, 0x64, interfaceCtx->magicAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 100, 100, 100, interfaceCtx->magicAlpha); } gDPSetCombineLERP(gfxCtx->overlay.p++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, @@ -3271,7 +3271,7 @@ void Interface_Draw(GlobalContext* globalCtx) { Interface_DrawItemButtons(globalCtx); gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->bAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); if (interfaceCtx->unk_1FA == 0) { @@ -3293,7 +3293,7 @@ void Interface_Draw(GlobalContext* globalCtx) { gDPPipeSync(gfxCtx->overlay.p++); gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->bAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, (u32)interfaceCtx->do_actionSegment + 0x180); @@ -3319,7 +3319,7 @@ void Interface_Draw(GlobalContext* globalCtx) { // C-Left Button Icon & Ammo Count if (gSaveContext.equips.buttonItems[1] < 0xF0) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->cLeftAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cLeftAlpha); gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); Interface_DrawItemIconTexture(globalCtx, (void*)((u32)interfaceCtx->icon_itemSegment + 0x1000), 1); gDPPipeSync(gfxCtx->overlay.p++); @@ -3332,7 +3332,7 @@ void Interface_Draw(GlobalContext* globalCtx) { // C-Down Button Icon & Ammo Count if (gSaveContext.equips.buttonItems[2] < 0xF0) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->cDownAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cDownAlpha); gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); Interface_DrawItemIconTexture(globalCtx, (void*)((u32)interfaceCtx->icon_itemSegment + 0x2000), 2); gDPPipeSync(gfxCtx->overlay.p++); @@ -3345,7 +3345,7 @@ void Interface_Draw(GlobalContext* globalCtx) { // C-Right Button Icon & Ammo Count if (gSaveContext.equips.buttonItems[3] < 0xF0) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->cRightAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->cRightAlpha); gDPSetCombineMode(gfxCtx->overlay.p++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); Interface_DrawItemIconTexture(globalCtx, (void*)((u32)interfaceCtx->icon_itemSegment + 0x3000), 3); gDPPipeSync(gfxCtx->overlay.p++); @@ -3367,8 +3367,8 @@ void Interface_Draw(GlobalContext* globalCtx) { gSPSetGeometryMode(gfxCtx->overlay.p++, G_CULL_BACK); gDPSetCombineLERP(gfxCtx->overlay.p++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->aAlpha); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, 0x00); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); + gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 0); Matrix_Translate(0.0f, 0.0f, WREG(46 + gSaveContext.language) / 10.0f, MTXMODE_NEW); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); Matrix_RotateX(interfaceCtx->unk_1F4 / 10000.0f, MTXMODE_APPLY); @@ -3402,7 +3402,7 @@ void Interface_Draw(GlobalContext* globalCtx) { if (pauseCtx->unk_24E < 0xBF) { // Normal Equip (icon goes from the inventory slot to the C button when equipping it) - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, pauseCtx->unk_258); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, pauseCtx->unk_258); gSPVertex(gfxCtx->overlay.p++, &pauseCtx->vtx_168[16], 4, 0); gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 1, gItemIcons[pauseCtx->unk_24E]); @@ -3475,9 +3475,9 @@ void Interface_Draw(GlobalContext* globalCtx) { for (phi_s3 = 1; phi_s3 < 7; phi_s3++) { // Carrot Color (based on availability) if ((interfaceCtx->unk_23A == 0) || (interfaceCtx->unk_23A < phi_s3)) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x00, 0x96, 0xFF, interfaceCtx->aAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0, 150, 255, interfaceCtx->aAlpha); } else { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->aAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->aAlpha); } gSPTextureRectangle(gfxCtx->overlay.p++, phi_s1 << 2, ZREG(15) << 2, (phi_s1 + 16) << 2, @@ -3488,7 +3488,7 @@ void Interface_Draw(GlobalContext* globalCtx) { } } else { // Score for the Horseback Archery - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->bAlpha); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); // Target Icon gDPSetTextureImage(gfxCtx->overlay.p++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, D_02002600); @@ -3905,8 +3905,8 @@ void Interface_Draw(GlobalContext* globalCtx) { // Clock Icon gDPPipeSync(gfxCtx->overlay.p++); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); - gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, 0x00); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, 255); + gDPSetEnvColor(gfxCtx->overlay.p++, 0, 0, 0, 0); gfxCtx->overlay.p = Gfx_TextureIA8(gfxCtx->overlay.p, D_02002000, 16, 16, gSaveContext.timerX[sp274], gSaveContext.timerY[sp274] + 2, 16, 16, 1024, 1024); @@ -3916,15 +3916,15 @@ void Interface_Draw(GlobalContext* globalCtx) { if (gSaveContext.timer1State != 0) { if ((gSaveContext.timer1Value < 10) && (gSaveContext.timer1State < 11)) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0x32, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 50, 0, 255); } else { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 255, 255); } } else { if ((gSaveContext.timer2Value < 10) && (gSaveContext.timer2State < 6)) { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0x32, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 50, 0, 255); } else { - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 255, 255, 0, 255); } } @@ -3945,7 +3945,7 @@ void Interface_Draw(GlobalContext* globalCtx) { if (interfaceCtx->unk_244 != 0) { gDPPipeSync(gfxCtx->overlay.p++); gSPDisplayList(gfxCtx->overlay.p++, sSetupDL_80125A60); - gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x00, 0x00, 0x00, interfaceCtx->unk_244); + gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0, 0, 0, interfaceCtx->unk_244); gDPFillRectangle(gfxCtx->overlay.p++, 0, 0, gScreenWidth - 1, gScreenHeight - 1); } @@ -4009,7 +4009,7 @@ void Interface_Update(GlobalContext* globalCtx) { case 11: case 12: case 13: - alpha = 0xFF - (gSaveContext.unk_13EC << 5); + alpha = 255 - (gSaveContext.unk_13EC << 5); if (alpha < 0) { alpha = 0; } @@ -4022,7 +4022,7 @@ void Interface_Update(GlobalContext* globalCtx) { } break; case 50: - alpha = 0xFF - (gSaveContext.unk_13EC << 5); + alpha = 255 - (gSaveContext.unk_13EC << 5); if (alpha < 0) { alpha = 0; } @@ -4035,11 +4035,11 @@ void Interface_Update(GlobalContext* globalCtx) { osSyncPrintf("case 50 : alpha=%d alpha1=%d\n", alpha, alpha1); func_80082644(globalCtx, alpha1); - if (interfaceCtx->healthAlpha != 0xFF) { + if (interfaceCtx->healthAlpha != 255) { interfaceCtx->healthAlpha = alpha1; } - if (interfaceCtx->magicAlpha != 0xFF) { + if (interfaceCtx->magicAlpha != 255) { interfaceCtx->magicAlpha = alpha1; } @@ -4064,14 +4064,14 @@ void Interface_Update(GlobalContext* globalCtx) { case SCENE_SPOT18: case SCENE_SPOT20: case SCENE_GANON_TOU: - if (interfaceCtx->minimapAlpha < 0xAA) { + if (interfaceCtx->minimapAlpha < 170) { interfaceCtx->minimapAlpha = alpha1; } else { - interfaceCtx->minimapAlpha = 0xAA; + interfaceCtx->minimapAlpha = 170; } break; default: - if (interfaceCtx->minimapAlpha != 0xFF) { + if (interfaceCtx->minimapAlpha != 255) { interfaceCtx->minimapAlpha = alpha1; } break; diff --git a/src/code/z_play.c b/src/code/z_play.c index 63241b65f4..6092806044 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -363,10 +363,10 @@ void Gameplay_Init(GlobalContext* globalCtx) { ShrinkWindow_Init(); TransitionFade_Init(&globalCtx->transitionFade); TransitionFade_SetType(&globalCtx->transitionFade, 3); - TransitionFade_SetColor(&globalCtx->transitionFade, RGBA8(0xA0, 0xA0, 0xA0, 0xFF)); + TransitionFade_SetColor(&globalCtx->transitionFade, RGBA8(160, 160, 160, 255)); TransitionFade_Start(&globalCtx->transitionFade); VisMono_Init(&D_80161498); - D_801614B0.a = 0x00; + D_801614B0.a = 0; Flags_UnsetAllEnv(globalCtx); osSyncPrintf("ZELDA ALLOC SIZE=%x\n", THA_GetSize(&globalCtx->state.tha)); @@ -542,32 +542,27 @@ void Gameplay_Update(GlobalContext* globalCtx) { (globalCtx->transitionCtx.transitionType == 7) || (globalCtx->transitionCtx.transitionType == 13) || (globalCtx->transitionCtx.transitionType == 17)) { - globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, - RGBA8(0xA0, 0xA0, 0xA0, 0xFF)); + globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, RGBA8(160, 160, 160, 255)); if (globalCtx->transitionCtx.setEnvColor != NULL) { globalCtx->transitionCtx.setEnvColor(&globalCtx->transitionCtx.data, - RGBA8(0xA0, 0xA0, 0xA0, 0xFF)); + RGBA8(160, 160, 160, 255)); } } else if (globalCtx->transitionCtx.transitionType == 18) { - globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, - RGBA8(0x8C, 0x8C, 0x64, 0xFF)); + globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, RGBA8(140, 140, 100, 255)); if (globalCtx->transitionCtx.setEnvColor != NULL) { globalCtx->transitionCtx.setEnvColor(&globalCtx->transitionCtx.data, - RGBA8(0x8C, 0x8C, 0x64, 0xFF)); + RGBA8(140, 140, 100, 255)); } } else if (globalCtx->transitionCtx.transitionType == 19) { - globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, - RGBA8(0x46, 0x64, 0x6E, 0xFF)); + globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, RGBA8(70, 100, 110, 255)); if (globalCtx->transitionCtx.setEnvColor != NULL) { globalCtx->transitionCtx.setEnvColor(&globalCtx->transitionCtx.data, - RGBA8(0x46, 0x64, 0x6E, 0xFF)); + RGBA8(70, 100, 110, 255)); } } else { - globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, - RGBA8(0x00, 0x00, 0x00, 0x00)); + globalCtx->transitionCtx.setColor(&globalCtx->transitionCtx.data, RGBA8(0, 0, 0, 0)); if (globalCtx->transitionCtx.setEnvColor != NULL) { - globalCtx->transitionCtx.setEnvColor(&globalCtx->transitionCtx.data, - RGBA8(0x00, 0x00, 0x00, 0x00)); + globalCtx->transitionCtx.setEnvColor(&globalCtx->transitionCtx.data, RGBA8(0, 0, 0, 0)); } } @@ -1149,7 +1144,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { TransitionFade_Draw(&globalCtx->transitionFade, &gfxP); - if (D_801614B0.a > 0x00) { + if (D_801614B0.a > 0) { D_80161498.primColor.rgba = D_801614B0.rgba; VisMono_Draw(&D_80161498, &gfxP); } diff --git a/src/code/z_prenmi.c b/src/code/z_prenmi.c index 286c6328ff..c897083e5a 100644 --- a/src/code/z_prenmi.c +++ b/src/code/z_prenmi.c @@ -35,8 +35,7 @@ void PreNMI_Draw(PreNMIContext* prenmiCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x00, NULL); func_80095248(gfxCtx, 0, 0, 0); func_800940B0(gfxCtx); - gDPSetFillColor(gfxCtx->polyOpa.p++, - (GPACK_RGBA5551(0xFF, 0xFF, 0xFF, 1) << 16) | GPACK_RGBA5551(0xFF, 0xFF, 0xFF, 1)); + gDPSetFillColor(gfxCtx->polyOpa.p++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1)); gDPFillRectangle(gfxCtx->polyOpa.p++, 0, prenmiCtx->timer + 100, SCREEN_WIDTH - 1, prenmiCtx->timer + 100); Graph_CloseDisps(dispRefs, gfxCtx, "../z_prenmi.c", 112); diff --git a/src/code/z_rcp.c b/src/code/z_rcp.c index 750d353c04..63c2d93820 100644 --- a/src/code/z_rcp.c +++ b/src/code/z_rcp.c @@ -744,7 +744,7 @@ Gfx sFillSetupDL[] = { G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2), gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH), gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), - gsDPSetBlendColor(0x00, 0x00, 0x00, 0x08), + gsDPSetBlendColor(0, 0, 0, 8), gsSPClipRatio(FRUSTRATIO_2), gsSPEndDisplayList(), }; @@ -752,7 +752,7 @@ Gfx sFillSetupDL[] = { // unused? Gfx D_80127030[] = { gsDPPipeSync(), - gsDPSetFillColor((GPACK_RGBA5551(0xFF, 0xFF, 0xF0, 0) << 16) | GPACK_RGBA5551(0xFF, 0xFF, 0xF0, 0)), + gsDPSetFillColor((GPACK_RGBA5551(255, 255, 240, 0) << 16) | GPACK_RGBA5551(255, 255, 240, 0)), gsDPFillRectangle(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1), gsDPSetDepthSource(G_ZS_PIXEL), gsDPPipeSync(), @@ -764,7 +764,7 @@ Gfx D_80127060[] = { gsDPPipeSync(), gsDPSetCycleType(G_CYC_FILL), gsDPSetRenderMode(G_RM_NOOP, G_RM_NOOP2), - gsDPSetFillColor((GPACK_RGBA5551(0x00, 0x00, 0x00, 1) << 16) | GPACK_RGBA5551(0x00, 0x00, 0x00, 1)), + gsDPSetFillColor((GPACK_RGBA5551(0, 0, 0, 1) << 16) | GPACK_RGBA5551(0, 0, 0, 1)), gsDPFillRectangle(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1), gsDPPipeSync(), gsSPEndDisplayList(), @@ -1517,7 +1517,7 @@ void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) { gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_FILL); gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_NOOP, G_RM_NOOP2); gDPSetFillColor(gfxCtx->polyOpa.p++, - (GPACK_RGBA5551(0xFF, 0xFF, 0xF0, 0) << 16) | GPACK_RGBA5551(0xFF, 0xFF, 0xF0, 0)); + (GPACK_RGBA5551(255, 255, 240, 0) << 16) | GPACK_RGBA5551(255, 255, 240, 0)); gDPFillRectangle(gfxCtx->polyOpa.p++, 0, ret, gScreenWidth - 1, gScreenHeight - ret - 1); gDPPipeSync(gfxCtx->polyOpa.p++); diff --git a/src/code/z_sample.c b/src/code/z_sample.c index bd6cbd5552..6bd1e95203 100644 --- a/src/code/z_sample.c +++ b/src/code/z_sample.c @@ -36,7 +36,7 @@ void Sample_Draw(SampleContext* this) { gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_1CYCLE); gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); gDPSetCombineMode(gfxCtx->polyOpa.p++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 0xFF, 0xFF, 0x00, 0x00); + gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 255, 255, 0, 0); Graph_CloseDisps(dispRefs, gfxCtx, "../z_sample.c", 111); } diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index f97e900e7d..9d2ed095d0 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -918,8 +918,8 @@ Gfx sDefaultDisplayList[] = { gsSPSegment(0x0C, gEmptyDL), gsSPSegment(0x0D, gEmptyDL), gsDPPipeSync(), - gsDPSetPrimColor(0, 0, 0x80, 0x80, 0x80, 0x80), - gsDPSetEnvColor(0x80, 0x80, 0x80, 0x80), + gsDPSetPrimColor(0, 0, 128, 128, 128, 128), + gsDPSetEnvColor(128, 128, 128, 128), gsSPEndDisplayList(), }; @@ -975,7 +975,7 @@ void func_800995DC(GlobalContext* globalCtx) { 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); { s32 pad; } // Necessary to match stack usage @@ -999,7 +999,7 @@ void func_80099760(GlobalContext* globalCtx) { (gameplayFrames * 2) % 128, 64, 32)); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 4859); } @@ -1033,18 +1033,18 @@ void func_80099878(GlobalContext* globalCtx) { { s32 pad2[2]; } // Necessary to match stack usage gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); gSPSegment(gfxCtx->polyOpa.p++, 0x0B, displayListHead); gDPPipeSync(displayListHead++); - gDPSetEnvColor(displayListHead++, 0xFF, 0xFF, 0xFF, globalCtx->unk_11D30[0]); + gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, displayListHead); gDPPipeSync(displayListHead++); - gDPSetEnvColor(displayListHead++, 0xFF, 0xFF, 0xFF, globalCtx->unk_11D30[1]); + gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->unk_11D30[1]); gSPEndDisplayList(displayListHead); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 4956); @@ -1066,14 +1066,14 @@ void func_80099BD8(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyXlu.p++, 0x08, displayListHead); gSPSegment(gfxCtx->polyOpa.p++, 0x08, displayListHead); - gDPSetPrimColor(displayListHead++, 0, 0, 0xFF - (u8)(185.0f * temp), 0xFF - (u8)(145.0f * temp), - 0xFF - (u8)(105.0f * temp), 0xFF); + gDPSetPrimColor(displayListHead++, 0, 0, 255 - (u8)(185.0f * temp), 255 - (u8)(145.0f * temp), + 255 - (u8)(105.0f * temp), 255); gSPEndDisplayList(displayListHead++); gSPSegment(gfxCtx->polyXlu.p++, 0x09, displayListHead); gSPSegment(gfxCtx->polyOpa.p++, 0x09, displayListHead); - gDPSetPrimColor(displayListHead++, 0, 0, 0x4C + (u8)(6.0f * temp), 0x4C + (u8)(34.0f * temp), - 0x4C + (u8)(74.0f * temp), 0xFF); + gDPSetPrimColor(displayListHead++, 0, 0, 76 + (u8)(6.0f * temp), 76 + (u8)(34.0f * temp), 76 + (u8)(74.0f * temp), + 255); gSPEndDisplayList(displayListHead++); gSPSegment(gfxCtx->polyOpa.p++, 0x0A, displayListHead); @@ -1084,16 +1084,16 @@ void func_80099BD8(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x0B, displayListHead); gSPSegment(gfxCtx->polyXlu.p++, 0x0B, displayListHead); - gDPSetPrimColor(displayListHead++, 0, 0, 0x59 + (u8)(166.0f * temp), 0x59 + (u8)(166.0f * temp), - 0x59 + (u8)(166.0f * temp), 0xFF); + gDPSetPrimColor(displayListHead++, 0, 0, 89 + (u8)(166.0f * temp), 89 + (u8)(166.0f * temp), + 89 + (u8)(166.0f * temp), 255); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, displayListHead); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, displayListHead); - gDPSetPrimColor(displayListHead++, 0, 0, 0xFF + (u8)(179.0f * temp), 0xFF + (u8)(179.0f * temp), - 0xFF + (u8)(179.0f * temp), 0xFF); + gDPSetPrimColor(displayListHead++, 0, 0, 255 + (u8)(179.0f * temp), 255 + (u8)(179.0f * temp), + 255 + (u8)(179.0f * temp), 255); gDPPipeSync(displayListHead++); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gSPEndDisplayList(displayListHead++); @@ -1144,10 +1144,10 @@ void func_8009A45C(GlobalContext* globalCtx) { Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5212); } @@ -1166,7 +1166,7 @@ void func_8009A798(GlobalContext* globalCtx) { Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 64, 64)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gSPSegment(gfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, @@ -1176,10 +1176,10 @@ void func_8009A798(GlobalContext* globalCtx) { (gameplayFrames * 1) % 256, 32, 64, 1, 0, 0, 32, 128)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5264); } @@ -1202,10 +1202,10 @@ void func_8009A9DC(GlobalContext* globalCtx) { 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5301); } @@ -1223,10 +1223,10 @@ void func_8009AB98(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyXlu.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5330); } @@ -1247,10 +1247,10 @@ void func_8009ACA8(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyXlu.p++, 0x09, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5367); } @@ -1277,10 +1277,10 @@ void func_8009AE30(GlobalContext* globalCtx) { } gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5416); } @@ -1335,11 +1335,11 @@ void func_8009B0FC(GlobalContext* globalCtx) { } else if (spB0 < 1) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, - 0, 0, 0, 0xFF)); + 0, 0, 0, 255)); } else { gSPSegment(gfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, - 0, 0, 0, 0xA0)); + 0, 0, 0, 160)); } if (spB0 == 2) { @@ -1349,35 +1349,35 @@ void func_8009B0FC(GlobalContext* globalCtx) { } else if (spB0 < 2) { gSPSegment(gfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, - 0, 0, 0, 0xFF)); + 0, 0, 0, 255)); } else { gSPSegment(gfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, - 0, 0, 0, 0xA0)); + 0, 0, 0, 160)); } if (spB0 != 0) { gSPSegment(gfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, - 0, 0, 0, 0xA0)); + 0, 0, 0, 160)); gSPSegment(gfxCtx->polyOpa.p++, 0x0B, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, - 0, 0, 0, 0xB4)); + 0, 0, 0, 180)); } else { gSPSegment(gfxCtx->polyOpa.p++, 0x0A, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, - 32, 32, 0, 0, 0, 0xA0 + (s32)((spAC / 200.0f) * 95.0f))); + 32, 32, 0, 0, 0, 160 + (s32)((spAC / 200.0f) * 95.0f))); gSPSegment(gfxCtx->polyOpa.p++, 0x0B, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, - 0, 0, 0, 0xB9 + (s32)((spAC / 200.0f) * 70.0f))); + 0, 0, 0, 185 + (s32)((spAC / 200.0f) * 70.0f))); } gSPSegment(gfxCtx->polyXlu.p++, 0x0C, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, - 0, 127 - (gameplayFrames * 1), 32, 32, 0, 0, 0, 0x80)); + 0, 127 - (gameplayFrames * 1), 32, 32, 0, 0, 0, 128)); gSPSegment(gfxCtx->polyXlu.p++, 0x0D, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames * 4, 0, 32, 32, 1, - gameplayFrames * 4, 0, 32, 32, 0, 0, 0, 0x80)); + gameplayFrames * 4, 0, 32, 32, 0, 0, 0, 128)); { s32 pad[2]; } // Necessary to match stack usage @@ -1398,10 +1398,10 @@ void func_8009B86C(GlobalContext* globalCtx) { Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, globalCtx->unk_11D30[0]); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, globalCtx->unk_11D30[0]); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x91); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 145); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5808); } @@ -1419,7 +1419,7 @@ void func_8009B9BC(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, Gfx_TexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames % 64, 4, 16)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5836); } @@ -1444,10 +1444,10 @@ void func_8009BAA4(GlobalContext* globalCtx) { } gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5876); } @@ -1482,14 +1482,14 @@ void func_8009BC44(GlobalContext* globalCtx) { (gameplayFrames * 1) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); sp83 = (sp83 >> 1) + 192; gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, sp83, sp83, sp83, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, sp83, sp83, sp83, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 5930); } @@ -1539,14 +1539,14 @@ void func_8009C0AC(GlobalContext* globalCtx) { (gameplayFrames * 30) % 2048, 16, 512)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); sp7B = (sp7B >> 1) + 192; gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, sp7B, sp7B, sp7B, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, sp7B, sp7B, sp7B, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6004); @@ -1583,10 +1583,10 @@ void func_8009C3EC(GlobalContext* globalCtx) { { s32 pad[2]; } // Necessary to match stack usage gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6076); } @@ -1614,10 +1614,10 @@ void func_8009C608(GlobalContext* globalCtx) { 1023 - (gameplayFrames * 3) % 1024, 16, 256)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6187); } @@ -1641,10 +1641,10 @@ void func_8009C8B8(GlobalContext* globalCtx) { Gfx_TexScroll(globalCtx->state.gfxCtx, 0, 255 - (gameplayFrames * 10) % 256, 32, 64)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6232); } @@ -1664,10 +1664,10 @@ void func_8009CAC0(GlobalContext* globalCtx) { 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6264); } @@ -1697,10 +1697,10 @@ void func_8009CC00(GlobalContext* globalCtx) { { s32 pad[2]; } // Necessary to match stack usage gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6320); } @@ -1737,14 +1737,14 @@ void func_8009CF84(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScrollPrimColor(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, - (gameplayFrames * 1) % 128, 32, 32, 0xFF, 0xFF, 0xFF, + (gameplayFrames * 1) % 128, 32, 32, 255, 255, 255, globalCtx->unk_11D30[0] + 127)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6449); } @@ -1769,10 +1769,10 @@ void func_8009D0E8(GlobalContext* globalCtx) { Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, 1, 0, 0, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6491); } @@ -1791,10 +1791,10 @@ void func_8009D31C(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A348[gSaveContext.nightFlag])); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6528); } @@ -1821,10 +1821,10 @@ void func_8009D438(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_8012A350[var])); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6581); } @@ -1846,10 +1846,10 @@ void func_8009D5B4(GlobalContext* globalCtx) { 1023 - (gameplayFrames * 6) % 1024, 16, 256)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6615); } @@ -1879,10 +1879,10 @@ void func_8009D758(GlobalContext* globalCtx) { { s32 pad[2]; } // Necessary to match stack usage gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6671); } @@ -1924,10 +1924,10 @@ void func_8009DA30(GlobalContext* globalCtx) { 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); gSPSegment(gfxCtx->polyXlu.p++, 0x0A, displayListHead); @@ -1944,7 +1944,7 @@ void func_8009DA30(GlobalContext* globalCtx) { } } - gDPSetPrimColor(displayListHead++, 0, 0, 0xFF, 0xFF, 0xFF, globalCtx->unk_11D30[0]); + gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, globalCtx->unk_11D30[0]); gSPDisplayList(displayListHead++, &D_03012B20); gSPEndDisplayList(displayListHead); } @@ -1966,10 +1966,10 @@ void func_8009DD5C(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A370[gSaveContext.nightFlag])); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6903); } @@ -1995,10 +1995,10 @@ void func_8009DE78(GlobalContext* globalCtx) { 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 6948); } @@ -2029,10 +2029,10 @@ void func_8009E0B8(GlobalContext* globalCtx) { 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); if (gSaveContext.sceneSetupIndex == 4) { spA3 = 255 - (u8)globalCtx->unk_11D30[0]; @@ -2044,13 +2044,13 @@ void func_8009E0B8(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x0A, displayListHead); gDPPipeSync(displayListHead++); - gDPSetEnvColor(displayListHead++, 0x80, 0x80, 0x80, spA3); + gDPSetEnvColor(displayListHead++, 128, 128, 128, spA3); gSPEndDisplayList(displayListHead++); gSPSegment(gfxCtx->polyXlu.p++, 0x0B, displayListHead); gSPSegment(gfxCtx->polyOpa.p++, 0x0B, displayListHead); gDPPipeSync(displayListHead++); - gDPSetEnvColor(displayListHead++, 0x80, 0x80, 0x80, spA0 * 0.1f); + gDPSetEnvColor(displayListHead++, 128, 128, 128, spA0 * 0.1f); gSPEndDisplayList(displayListHead); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, @@ -2076,13 +2076,13 @@ void func_8009E54C(GlobalContext* globalCtx) { gameplayFrames = globalCtx->gameplayFrames; gSPSegment(gfxCtx->polyOpa.p++, 0x08, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames, gameplayFrames, 32, 32, 1, 0, 0, 32, - 32, 0, 0, 0, globalCtx->unk_11D30[0] + 0xA8)); + 32, 0, 0, 0, globalCtx->unk_11D30[0] + 168)); gSPSegment(gfxCtx->polyOpa.p++, 0x09, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, -gameplayFrames, -gameplayFrames, 32, 32, 1, 0, 0, - 16, 64, 0, 0, 0, globalCtx->unk_11D30[0] + 0xA8)); + 16, 64, 0, 0, 0, globalCtx->unk_11D30[0] + 168)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0xFF, 0xFF, 0xFF, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 255, 255, 255, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7097); } @@ -2108,7 +2108,7 @@ void func_8009E730(GlobalContext* globalCtx) { Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 64, 32, 1, 0, var, 64, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A378[gSaveContext.nightFlag])); @@ -2137,10 +2137,10 @@ void func_8009E8C0(GlobalContext* globalCtx) { (gameplayFrames * 1) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7192); } @@ -2175,10 +2175,10 @@ void func_8009EAD8(GlobalContext* globalCtx) { (gameplayFrames * 1) % 64, 16, 16)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7260); } @@ -2203,10 +2203,10 @@ void func_8009EE44(GlobalContext* globalCtx) { gameplayFrames % 128, gameplayFrames % 128, 32, 32)); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); if ((globalCtx->unk_11D30[0] == 0) && (INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO)) { if (globalCtx->unk_11D30[1] == 50) { @@ -2233,10 +2233,10 @@ void func_8009F074(GlobalContext* globalCtx) { Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - gameplayFrames % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7339); } @@ -2275,10 +2275,10 @@ void func_8009F270(GlobalContext* globalCtx) { 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7409); } @@ -2301,10 +2301,10 @@ void func_8009F40C(GlobalContext* globalCtx) { 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7443); } @@ -2335,16 +2335,16 @@ void func_8009F5D4(GlobalContext* globalCtx) { } } - gDPSetPrimColor(displayListHead++, 0, 0, 0xFF, 0xFF, 0xFF, globalCtx->unk_11D30[0]); + gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, globalCtx->unk_11D30[0]); gSPDisplayList(displayListHead++, &D_0300AA48); gSPEndDisplayList(displayListHead); } gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7495); } @@ -2372,10 +2372,10 @@ void func_8009F7D4(GlobalContext* globalCtx) { 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, sp6F, sp6E, 0xFF, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, sp6F, sp6E, 255, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7530); } @@ -2397,10 +2397,10 @@ void func_8009F9D0(GlobalContext* globalCtx) { gameplayFrames % 128, 0, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A388[gSaveContext.nightFlag])); @@ -2423,10 +2423,10 @@ void func_8009FB74(GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A390[gSaveContext.nightFlag])); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7615); } @@ -2450,10 +2450,10 @@ void func_8009FC90(GlobalContext* globalCtx) { 127 - (gameplayFrames * 3) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x40); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 64); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x40); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 64); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7653); } @@ -2489,10 +2489,10 @@ void func_8009FE58(GlobalContext* globalCtx) { } gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); if (func_800C0D28(globalCtx) != 1) { D_8012A39C += 1820; @@ -2567,10 +2567,10 @@ void func_800A0334(GlobalContext* globalCtx) { 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7852); } @@ -2601,10 +2601,10 @@ void func_800A059C(GlobalContext* globalCtx) { Gfx_TexScroll(globalCtx->state.gfxCtx, 0, (gameplayFrames * 2) % 512, 128, 128)); gDPPipeSync(gfxCtx->polyOpa.p++); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, 128); gDPPipeSync(gfxCtx->polyXlu.p++); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0x80, 0x80); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 128, 128, 128, 128); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_scene_table.c", 7910); } diff --git a/src/code/z_vismono.c b/src/code/z_vismono.c index b544132857..112f64c00d 100644 --- a/src/code/z_vismono.c +++ b/src/code/z_vismono.c @@ -12,14 +12,14 @@ void VisMono_Init(VisMono* this) { bzero(this, sizeof(VisMono)); this->unk_00 = 0; this->setScissor = false; - this->primColor.r = 0xFF; - this->primColor.g = 0xFF; - this->primColor.b = 0xFF; - this->primColor.a = 0xFF; - this->envColor.r = 0x00; - this->envColor.g = 0x00; - this->envColor.b = 0x00; - this->envColor.a = 0x00; + this->primColor.r = 255; + this->primColor.g = 255; + this->primColor.b = 255; + this->primColor.a = 255; + this->envColor.r = 0; + this->envColor.g = 0; + this->envColor.b = 0; + this->envColor.a = 0; } void VisMono_Destroy(VisMono* this) { diff --git a/src/code/z_vr_box_draw.c b/src/code/z_vr_box_draw.c index d4077d9239..b961271d15 100644 --- a/src/code/z_vr_box_draw.c +++ b/src/code/z_vr_box_draw.c @@ -21,7 +21,7 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb gSPSegment(gfxCtx->polyOpa.p++, 8, skyboxCtx->staticSegments[1]); gSPSegment(gfxCtx->polyOpa.p++, 9, skyboxCtx->staticSegments[2]); - gDPSetPrimColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0x00, 0x00, alpha); + gDPSetPrimColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0, 0, 0, alpha); gSPTexture(gfxCtx->polyOpa.p++, 0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON) sSkyboxDrawMatrix = Graph_Alloc(gfxCtx, sizeof(Mtx)); diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 3c987c4d28..6a42782443 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -34,8 +34,8 @@ Vec3f sUnusedVec1 = { 0.0f, 0.5f, 0.0f }; Vec3f sUnusedVec2 = { 0.0f, 0.5f, 0.0f }; Color_RGB8 sUnusedColors[] = { - { 0xFF, 0xFF, 0x64 }, - { 0xFF, 0xFF, 0x32 }, + { 255, 255, 100 }, + { 255, 255, 50 }, }; Vec3f D_80865B70 = { 0.0f, 0.0f, 0.0f }; diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 751a01f108..0b709b98cc 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -50,7 +50,7 @@ void ArrowFire_Init(Actor* thisx, GlobalContext* globalCtx) { this->unk_158 = 1.0f; ArrowFire_SetupAction(&this->actor, ArrowFire_Charge); Actor_SetScale(this, 0.01f); - this->alpha = 0xA0; + this->alpha = 160; this->timer = 0; this->unk_15C = 0.0f; } @@ -84,7 +84,7 @@ void ArrowFire_Charge(ArrowFire* this, GlobalContext* globalCtx) { this->unkPos = this->actor.posRot.pos; this->radius = 10; ArrowFire_SetupAction(this, ArrowFire_Fly); - this->alpha = 0xFF; + this->alpha = 255; } } @@ -170,9 +170,9 @@ void ArrowFire_Fly(ArrowFire* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_IT_EXPLOSION_FRAME); ArrowFire_SetupAction(this, ArrowFire_Hit); this->timer = 32; - this->alpha = 0xFF; + this->alpha = 255; } else if (arrow->timer < 34) { - if (this->alpha < 0x23) { + if (this->alpha < 35) { Actor_Kill(&this->actor); } else { this->alpha -= 0x19; @@ -218,7 +218,7 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw red effect over the screen when arrow hits if (this->unk_15C > 0) { gfxCtx->polyXlu.p = func_800937C0(gfxCtx->polyXlu.p); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0x00, 0x00, + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0, (s32)(150.0f * this->unk_15C) & 0xFF); gDPSetAlphaDither(gfxCtx->polyXlu.p++, G_AD_DISABLE); gDPSetColorDither(gfxCtx->polyXlu.p++, G_CD_DISABLE); @@ -227,8 +227,8 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw fire on the arrow func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0xFF, 0xC8, 0x00, this->alpha); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0xFF, 0x00, 0x00, 0x80); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 255, 200, 0, this->alpha); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, 128); Matrix_RotateRPY(0x4000, 0x0, 0x0, MTXMODE_APPLY); if (this->timer != 0) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 75e53a4ebd..d1e8506b3f 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -51,7 +51,7 @@ void ArrowIce_Init(Actor* thisx, GlobalContext* globalCtx) { this->unk_160 = 1.0f; ArrowIce_SetupAction(this, ArrowIce_Charge); Actor_SetScale(&this->actor, 0.01f); - this->alpha = 0x64; + this->alpha = 100; this->timer = 0; this->unk_164 = 0.0f; } @@ -85,7 +85,7 @@ void ArrowIce_Charge(ArrowIce* this, GlobalContext* globalCtx) { this->unkPos = this->actor.posRot.pos; this->radius = 10; ArrowIce_SetupAction(this, ArrowIce_Fly); - this->alpha = 0xFF; + this->alpha = 255; } } @@ -171,9 +171,9 @@ void ArrowIce_Fly(ArrowIce* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_IT_EXPLOSION_ICE); ArrowIce_SetupAction(this, ArrowIce_Hit); this->timer = 32; - this->alpha = 0xFF; + this->alpha = 255; } else if (arrow->timer < 34) { - if (this->alpha < 0x23) { + if (this->alpha < 35) { Actor_Kill(&this->actor); } else { this->alpha -= 0x19; @@ -228,8 +228,8 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw ice on the arrow func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0xAA, 0xFF, 0xFF, this->alpha); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0xFF, 0x80); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 170, 255, 255, this->alpha); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 255, 128); Matrix_RotateRPY(0x4000, 0x0, 0x0, MTXMODE_APPLY); if (this->timer != 0) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 337c4d41d5..c1c85ce2d5 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -51,7 +51,7 @@ void ArrowLight_Init(Actor* thisx, GlobalContext* globalCtx) { this->unk_160 = 1.0f; ArrowLight_SetupAction(this, ArrowLight_Charge); Actor_SetScale(&this->actor, 0.01f); - this->alpha = 0x82; + this->alpha = 130; this->timer = 0; this->unk_164 = 0.0f; } @@ -85,7 +85,7 @@ void ArrowLight_Charge(ArrowLight* this, GlobalContext* globalCtx) { this->unkPos = this->actor.posRot.pos; this->radius = 10; ArrowLight_SetupAction(this, ArrowLight_Fly); - this->alpha = 0xFF; + this->alpha = 255; } } @@ -171,9 +171,9 @@ void ArrowLight_Fly(ArrowLight* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_IT_EXPLOSION_LIGHT); ArrowLight_SetupAction(this, ArrowLight_Hit); this->timer = 32; - this->alpha = 0xFF; + this->alpha = 255; } else if (arrow->timer < 34) { - if (this->alpha < 0x23) { + if (this->alpha < 35) { Actor_Kill(&this->actor); } else { this->alpha -= 0x19; @@ -228,8 +228,8 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw light on the arrow func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0xFF, 0xFF, 0xAA, this->alpha); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0xFF, 0xFF, 0x00, 0x80); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 170, this->alpha); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 255, 0, 128); Matrix_RotateRPY(0x4000, 0x0, 0x0, MTXMODE_APPLY); if (this->timer != 0) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c index 4a2d33ec16..5fbd61c80c 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c +++ b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c @@ -487,7 +487,7 @@ void BgHakaTrap_Draw(Actor* thisx, GlobalContext* globalCtx) { static Gfx* sDLists[5] = { 0x06007610, 0x06009860, 0x06007EF0, 0x06008A20, 0x060072C0, }; - static Color_RGBA8 D_8088103C = { 0 }; + static Color_RGBA8 D_8088103C = { 0, 0, 0, 0 }; BgHakaTrap* this = THIS; s32 pad; Vec3f sp2C; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c index 0a229373bc..bdbd71149f 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c @@ -201,8 +201,8 @@ void BgHidanFirewall_Draw(Actor* thisx, GlobalContext* globalCtx) { gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0x14); gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_80886D04[this->unk_150])); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0x01, 0xFF, 0xFF, 0x00, 0x96); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0xFF, 0x00, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0x01, 255, 255, 0, 150); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, 255); gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 458), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfxCtx->polyXlu.p++, D_0600DA80); diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c index de6c385125..12ea2707e8 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c @@ -72,38 +72,38 @@ void func_808AAD3C(GlobalContext* globalCtx, Vec3f* vec, u32 arg2) { effect.gravity = -1.0f; effect.uDiv = arg2; effect.vDiv = arg2; - effect.colorStart[0].r = 0x00; - effect.colorStart[0].g = 0x00; - effect.colorStart[0].b = 0x00; - effect.colorStart[0].a = 0xFF; - effect.colorStart[1].r = 0x00; - effect.colorStart[1].g = 0x00; - effect.colorStart[1].b = 0x00; - effect.colorStart[1].a = 0xFF; - effect.colorStart[2].r = 0x00; - effect.colorStart[2].g = 0x00; - effect.colorStart[2].b = 0x00; - effect.colorStart[2].a = 0xFF; - effect.colorStart[3].r = 0x00; - effect.colorStart[3].g = 0x00; - effect.colorStart[3].b = 0x00; - effect.colorStart[3].a = 0xFF; - effect.colorEnd[0].r = 0x00; - effect.colorEnd[0].g = 0x00; - effect.colorEnd[0].b = 0x00; - effect.colorEnd[0].a = 0x00; - effect.colorEnd[1].r = 0x00; - effect.colorEnd[1].g = 0x00; - effect.colorEnd[1].b = 0x00; - effect.colorEnd[1].a = 0x00; - effect.colorEnd[2].r = 0x00; - effect.colorEnd[2].g = 0x00; - effect.colorEnd[2].b = 0x00; - effect.colorEnd[2].a = 0x00; - effect.colorEnd[3].r = 0x00; - effect.colorEnd[3].g = 0x00; - effect.colorEnd[3].b = 0x00; - effect.colorEnd[3].a = 0x00; + effect.colorStart[0].r = 0; + effect.colorStart[0].g = 0; + effect.colorStart[0].b = 0; + effect.colorStart[0].a = 255; + effect.colorStart[1].r = 0; + effect.colorStart[1].g = 0; + effect.colorStart[1].b = 0; + effect.colorStart[1].a = 255; + effect.colorStart[2].r = 0; + effect.colorStart[2].g = 0; + effect.colorStart[2].b = 0; + effect.colorStart[2].a = 255; + effect.colorStart[3].r = 0; + effect.colorStart[3].g = 0; + effect.colorStart[3].b = 0; + effect.colorStart[3].a = 255; + effect.colorEnd[0].r = 0; + effect.colorEnd[0].g = 0; + effect.colorEnd[0].b = 0; + effect.colorEnd[0].a = 0; + effect.colorEnd[1].r = 0; + effect.colorEnd[1].g = 0; + effect.colorEnd[1].b = 0; + effect.colorEnd[1].a = 0; + effect.colorEnd[2].r = 0; + effect.colorEnd[2].g = 0; + effect.colorEnd[2].b = 0; + effect.colorEnd[2].a = 0; + effect.colorEnd[3].r = 0; + effect.colorEnd[3].g = 0; + effect.colorEnd[3].b = 0; + effect.colorEnd[3].a = 0; effect.timer = 0; effect.duration = 32; diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index fff9e01b7f..baf45c7019 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -51,7 +51,7 @@ void BgSpot16Doughnut_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->actor, sInitChain); Actor_SetScale(&this->actor, 0.1f); this->fireFlag = 0; - this->envColorAlpha = 0xFF; + this->envColorAlpha = 255; params = this->actor.params; if (params == 1 || params == 2 || params == 3 || params == 4) { Actor_SetScale(&this->actor, sScales[this->actor.params] * 1.0e-4f); @@ -91,10 +91,10 @@ void BgSpot16Doughnut_Update(Actor* thisx, GlobalContext* globalCtx) { if (!(this->fireFlag & 1)) { this->actor.shape.rot.y -= 0x20; - if (this->envColorAlpha < 0xFF) { + if (this->envColorAlpha < 255) { this->envColorAlpha += 5; } else { - this->envColorAlpha = 0xFF; + this->envColorAlpha = 255; } } else if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[2] != NULL && globalCtx->csCtx.npcActions[2]->action == 2) { @@ -137,11 +137,11 @@ void BgSpot16Doughnut_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPSegment( gfxCtx->polyXlu.p++, 0x08, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * (-1), 0, 16, 32, 1, scroll, scroll * (-2), 16, 32)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0xFF, 0x00, 0x00, this->envColorAlpha); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 0, 0, this->envColorAlpha); gSPDisplayList(gfxCtx->polyXlu.p++, D_06000660); } else { - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0xFF, 0xFF, 0xFF, this->envColorAlpha); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 255, 255, this->envColorAlpha); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, 255); gSPDisplayList(gfxCtx->polyXlu.p++, D_06000FC0); } Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 238); @@ -158,8 +158,8 @@ void BgSpot16Doughnut_DrawExpanding(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 248), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0xFF, 0xFF, 0xFF, this->envColorAlpha); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 255, 255, this->envColorAlpha); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, 255); gSPDisplayList(gfxCtx->polyXlu.p++, D_06000FC0); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 256); } diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c index d7a47592b1..925570980d 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -225,7 +225,7 @@ void BgTreemouth_Update(Actor* thisx, GlobalContext* globalCtx) { void BgTreemouth_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - u16 alpha = 0x1F4; + u16 alpha = 500; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; Gfx* dispRefs[4]; @@ -234,7 +234,7 @@ void BgTreemouth_Draw(Actor* thisx, GlobalContext* globalCtx) { if ((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) { if (gSaveContext.eventChkInf[0] & 0x80) { - alpha = 0x866; + alpha = 2150; } } else { // neeeded to match } @@ -243,7 +243,7 @@ void BgTreemouth_Draw(Actor* thisx, GlobalContext* globalCtx) { alpha = (globalCtx->unk_11D30[0] + 0x1F4); } - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x80, 0x80, 0x80, alpha * 0.1f); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 128, 128, 128, alpha * 0.1f); gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_treemouth.c", 932), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gfxCtx->polyOpa.p++, &D_060009D0); diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index fad31e797a..efcde8f5c8 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -125,7 +125,7 @@ void func_8098E51C(DemoSa* this, s16 arg1) { void func_8098E530(DemoSa* this) { this->action = 7; this->drawConfig = 0; - this->unk_1A4 = 0; + this->alpha = 0; this->unk_1A8 = 0; this->actor.shape.unk_14 = 0; this->unk_1A0 = 0.0f; @@ -379,7 +379,7 @@ void func_8098EEA8(DemoSa* this, GlobalContext* globalCtx) { if (func_8098E654(this, globalCtx, 4, 4)) { this->action = 8; this->drawConfig = 2; - this->unk_1A4 = 0; + this->alpha = 0; this->actor.shape.unk_14 = 0; this->unk_1A0 = 0.0f; func_8098EE08(); @@ -387,7 +387,7 @@ void func_8098EEA8(DemoSa* this, GlobalContext* globalCtx) { } void func_8098EEFC(DemoSa* this, GlobalContext* globalCtx) { - s32 alpha = 0xFF; + s32 alpha = 255; f32* unk_1A0 = &this->unk_1A0; if (func_8098E654(this, globalCtx, 4, 4)) { @@ -396,7 +396,7 @@ void func_8098EEFC(DemoSa* this, GlobalContext* globalCtx) { this->action = 9; this->drawConfig = 1; *unk_1A0 = kREG(5) + 10.0f; - this->unk_1A4 = alpha; + this->alpha = alpha; this->actor.shape.unk_14 = alpha; return; } @@ -406,12 +406,12 @@ void func_8098EEFC(DemoSa* this, GlobalContext* globalCtx) { this->action = 7; this->drawConfig = 0; *unk_1A0 = 0.0f; - this->unk_1A4 = 0; + this->alpha = 0; this->actor.shape.unk_14 = 0; return; } } - this->actor.shape.unk_14 = this->unk_1A4 = (*unk_1A0 / (kREG(5) + 10.0f)) * 255.0f; + this->actor.shape.unk_14 = this->alpha = (*unk_1A0 / (kREG(5) + 10.0f)) * 255.0f; } void func_8098F050(DemoSa* this, GlobalContext* globalCtx) { @@ -419,7 +419,7 @@ void func_8098F050(DemoSa* this, GlobalContext* globalCtx) { this->action = 8; this->drawConfig = 2; this->unk_1A0 = kREG(5) + 10.0f; - this->unk_1A4 = 0xFF; + this->alpha = 255; if (this->unk_1A8 == 0) { func_8098EE28(this, globalCtx); this->unk_1A8 = 1; @@ -466,7 +466,7 @@ void func_8098F1C0(DemoSa* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp78)); gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp78)); gSPSegment(gfxCtx->polyXlu.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, this->unk_1A4); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, D_80116280); gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, @@ -494,7 +494,7 @@ void func_8098F420(DemoSa* this, GlobalContext* globalCtx) { } void func_8098F480(DemoSa* this) { - s32 alpha = 0xFF; + s32 alpha = 255; f32* unk_1A0 = &this->unk_1A0; f32 temp_f0; @@ -502,9 +502,9 @@ void func_8098F480(DemoSa* this) { temp_f0 = kREG(17) + 10.0f; if (temp_f0 <= *unk_1A0) { - this->actor.shape.unk_14 = this->unk_1A4 = alpha; + this->actor.shape.unk_14 = this->alpha = alpha; } else { - this->actor.shape.unk_14 = this->unk_1A4 = (*unk_1A0 / temp_f0) * 255.0f; + this->actor.shape.unk_14 = this->alpha = (*unk_1A0 / temp_f0) * 255.0f; } } @@ -614,7 +614,7 @@ void func_8098F83C(DemoSa* this, GlobalContext* globalCtx) { } void func_8098F8F8(DemoSa* this) { - s32 alpha = 0xFF; + s32 alpha = 255; f32* unk_1A0 = &this->unk_1A0; f32 temp_f0; @@ -622,9 +622,9 @@ void func_8098F8F8(DemoSa* this) { temp_f0 = kREG(17) + 10.0f; if (temp_f0 <= *unk_1A0) { - this->actor.shape.unk_14 = this->unk_1A4 = alpha; + this->actor.shape.unk_14 = this->alpha = alpha; } else { - this->actor.shape.unk_14 = this->unk_1A4 = (*unk_1A0 / temp_f0) * 255.0f; + this->actor.shape.unk_14 = this->alpha = (*unk_1A0 / temp_f0) * 255.0f; } } @@ -805,7 +805,7 @@ void func_8098FEB4(DemoSa* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp70)); gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp70)); gSPSegment(gfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp64)); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0xFF); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, 255); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h index d2ef5b71b9..ac98e7c130 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h @@ -18,7 +18,7 @@ typedef struct DemoSa { /* 0x0198 */ s32 action; /* 0x019C */ s32 drawConfig; /* 0x01A0 */ f32 unk_1A0; - /* 0x01A4 */ s32 unk_1A4; + /* 0x01A4 */ s32 alpha; /* 0x01A8 */ s32 unk_1A8; /* 0x01AC */ s32 unk_1AC; /* 0x01B0 */ s32 unk_1B0; diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h index 17dd2fb42a..83e4dff704 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h @@ -9,7 +9,7 @@ struct DoorWarp1; typedef struct DoorWarp1 { /* 0x0000 */ Actor actor; /* 0x014C */ char unk_14C[0x5C]; - /* 0x01A8 */ f32 unk_1A8; + /* 0x01A8 */ f32 alpha; /* 0x01AC */ char unk_1AC[0x40]; /* 0x01EC */ s32 unk_1EC; } DoorWarp1; // size = 0x01F0 diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index df62f0b371..2927bc6784 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -140,14 +140,14 @@ void func_809C2324(GlobalContext* globalCtx, Gfx* dList, s32 alpha) { Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_blkobj.c", 322); - if (alpha == 0xFF) { + if (alpha == 255) { segment = D_809C2590; } else { segment = D_809C25A0; } gSPSegment(gfxCtx->polyXlu.p++, 0x08, segment); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, alpha); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, alpha); gSPDisplayList(gfxCtx->polyXlu.p++, dList); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_blkobj.c", 330); diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 61a935050e..e1ce985bca 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -54,25 +54,25 @@ void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->actor, sInitChain); - trail.p1StartColor.r = 0xFF; - trail.p1StartColor.g = 0xFF; - trail.p1StartColor.b = 0x64; - trail.p1StartColor.a = 0xFF; + trail.p1StartColor.r = 255; + trail.p1StartColor.g = 255; + trail.p1StartColor.b = 100; + trail.p1StartColor.a = 255; - trail.p2StartColor.r = 0xFF; - trail.p2StartColor.g = 0xFF; - trail.p2StartColor.b = 0x64; - trail.p2StartColor.a = 0x40; + trail.p2StartColor.r = 255; + trail.p2StartColor.g = 255; + trail.p2StartColor.b = 100; + trail.p2StartColor.a = 64; - trail.p1EndColor.r = 0xFF; - trail.p1EndColor.g = 0xFF; - trail.p1EndColor.b = 0x64; - trail.p1EndColor.a = 0x00; + trail.p1EndColor.r = 255; + trail.p1EndColor.g = 255; + trail.p1EndColor.b = 100; + trail.p1EndColor.a = 0; - trail.p2EndColor.r = 0xFF; - trail.p2EndColor.g = 0xFF; - trail.p2EndColor.b = 0x64; - trail.p2EndColor.a = 0x00; + trail.p2EndColor.r = 255; + trail.p2EndColor.g = 255; + trail.p2EndColor.b = 100; + trail.p2EndColor.a = 0; trail.elemDuration = 8; trail.unkFlag = 0; diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index c4f5925147..34c41e498d 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -450,7 +450,7 @@ void EnDog_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve void EnDog_Draw(Actor* thisx, GlobalContext* globalCtx) { EnDog* this = THIS; - Color_RGBA8 colors[] = { { 0xFF, 0xFF, 0xC8, 0x00 }, { 0x96, 0x64, 0x32, 0x00 } }; + Color_RGBA8 colors[] = { { 255, 255, 200, 0 }, { 150, 100, 50, 0 } }; GraphicsContext* gfxCtx; Gfx* dispRefs[4]; diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index 0f44e49ea2..c7d90827a8 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -217,8 +217,8 @@ void func_80A0F6F8(EnFhgFire* this, GlobalContext* globalCtx) { for (i = 0; i < 8; i++) { Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_FHG_FIRE, - this->actor.posRot.pos.x, this->actor.posRot.pos.y, - this->actor.posRot.pos.z, 0, (i * 8192) + randY, 0x4000, i + 0x64); + this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, + (i * 8192) + randY, 0x4000, i + 0x64); } for (i = 0; i < 8; i++) { @@ -472,8 +472,8 @@ void EnFhgFire_Draw(Actor* thisx, GlobalContext* globalCtx) { Graph_OpenDisps(dispRefs, gfxCtx, "../z_en_fhg_fire.c", 1723); if (thisx->params == 0x24) { func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0xFF, 0xFF, 0xFF, (s32)this->unk_160 & 0xFF); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0xA5, 0xFF, 0x4B, 0x00); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s32)this->unk_160 & 0xFF); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 165, 255, 75, 0); gDPPipeSync(gfxCtx->polyXlu.p++); gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1745), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -486,9 +486,9 @@ void EnFhgFire_Draw(Actor* thisx, GlobalContext* globalCtx) { gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0xFF, 0xFF, 0xFF, (s32)this->unk_160 & 0xFF); if (this->fireMode > 0) { - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0xFF, 0xFF, 0x00); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 255, 255, 0); } else { - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0xA5, 0xFF, 0x4B, 0x00); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 165, 255, 75, 0); } gDPPipeSync(gfxCtx->polyXlu.p++); @@ -500,9 +500,8 @@ void EnFhgFire_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPDisplayList(gfxCtx->polyXlu.p++, D_06012160); } else if ((thisx->params == 0x27) || (thisx->params == 0x28) || (thisx->params == 0x29)) { func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, - ((u32)this->unk_188 & 0xFF)); // sic u32 - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x5A, 0x32, 0x5F, (s32)(this->unk_188 * 0.5f)); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, ((u32)this->unk_188 & 0xFF)); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 90, 50, 95, (s32)(this->unk_188 * 0.5f)); gDPPipeSync(gfxCtx->polyXlu.p++); gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1833), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -517,8 +516,8 @@ void EnFhgFire_Draw(Actor* thisx, GlobalContext* globalCtx) { Matrix_Translate(0.0f, -100.0f, 0.0f, 1); func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0xFF, 0xFF, 0xFF, (s32)this->unk_160 & 0xFF); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0xFF, 0x1E, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 255, (s32)this->unk_160 & 0xFF); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 30, 0, 255); gDPPipeSync(gfxCtx->polyXlu.p++); gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1892), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index b977f8b8a6..e4bce5c726 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -96,10 +96,10 @@ static Vec3f sDustPos = { }; static Color_RGBA8 sMergeColor = { - 0x00, - 0xFF, - 0x00, - 0x00, + 0, + 255, + 0, + 0, }; // display lists diff --git a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c index 5ce1da8ada..9d9bc86c53 100644 --- a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c +++ b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c @@ -69,7 +69,7 @@ Gfx* func_80A280BC(GraphicsContext* gfxCtx, BossGanon* dorf) { do { if (1) {} } while (0); - gDPSetEnvColor(displayListHead++, 0x19, 0x14, 0x00, dorf->organFadeTimer); + gDPSetEnvColor(displayListHead++, 25, 20, 0, dorf->organFadeTimer); gDPSetRenderMode(displayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_SURF2); gSPEndDisplayList(displayListHead); return displayList; @@ -86,7 +86,7 @@ Gfx* func_80A28148(GraphicsContext* gfxCtx, BossGanon* dorf) { do { if (1) {} } while (0); - gDPSetEnvColor(displayListHead++, 0x00, 0x00, 0x00, dorf->organFadeTimer); + gDPSetEnvColor(displayListHead++, 0, 0, 0, dorf->organFadeTimer); gDPSetRenderMode(displayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_SURF2); gSPEndDisplayList(displayListHead); return displayList; diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c index e502b011b8..9acd6f230a 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -236,7 +236,7 @@ s32 EnHeishi3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL void EnHeishi3_Draw(Actor* thisx, GlobalContext* globalCtx) { EnHeishi3* this = THIS; - + func_80093D18(globalCtx->state.gfxCtx); SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, EnHeishi3_OverrideLimbDraw, NULL, &this->actor); diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index 34109ef6a4..fbe67d63a1 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -576,7 +576,7 @@ void func_80AAB5A4(EnMd* this, GlobalContext* globalCtx) { this->alpha = func_80034DD4(this, globalCtx, this->alpha, temp); this->actor.shape.unk_14 = this->alpha; } else { - this->alpha = 0xFF; + this->alpha = 255; this->actor.shape.unk_14 = this->alpha; } } @@ -600,7 +600,7 @@ void EnMd_Init(Actor* thisx, GlobalContext* globalCtx) { func_80034EC0(&this->skelAnime, sAnimations, 0); Actor_SetScale(&this->actor, 0.01f); this->actor.unk_1F = 6; - this->alpha = 0xFF; + this->alpha = 255; Actor_SpawnAttached(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ELF, this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 3); @@ -812,7 +812,7 @@ void EnMd_Draw(Actor* thisx, GlobalContext* globalCtx) { gfxCtx = globalCtx->state.gfxCtx; Graph_OpenDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_md.c", 1280); - if (this->alpha == 0xFF) { + if (this->alpha == 255) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeIdx])); func_80034BA0(globalCtx, &this->skelAnime, EnMd_OverrideLimbDraw, EnMd_PostLimbDraw, &this->actor, this->alpha); } else if (this->alpha != 0) { diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index f872133b4f..95af9a2fe4 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -2367,7 +2367,7 @@ void func_80AF0400(EnRu1* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr1)); gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr1)); gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr2)); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0xFF); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, 255); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, @@ -2392,7 +2392,7 @@ void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr1)); gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr1)); gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr2)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, this->unk_2A8); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, this->unk_2A8); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index 191e175b16..323750c31b 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -145,7 +145,7 @@ s32 func_80AF26A0(EnRu2* this) { void func_80AF26AC(EnRu2* this) { this->action = 7; this->drawConfig = 0; - this->unk_2B4 = 0; + this->alpha = 0; this->unk_2B8 = 0; this->actor.shape.unk_14 = 0; this->unk_2B0 = 0.0f; @@ -399,7 +399,7 @@ void func_80AF2F04(EnRu2* this, GlobalContext* globalCtx) { if (func_80AF27D0(this, globalCtx, 4, 3)) { this->action = 8; this->drawConfig = 2; - this->unk_2B4 = 0; + this->alpha = 0; this->actor.shape.unk_14 = 0; this->unk_2B0 = 0.0f; func_80AF2E64(); @@ -408,7 +408,7 @@ void func_80AF2F04(EnRu2* this, GlobalContext* globalCtx) { void func_80AF2F58(EnRu2* this, GlobalContext* globalCtx) { f32* unk_2B0 = &this->unk_2B0; - s32 something; + s32 alpha; if (func_80AF27D0(this, globalCtx, 4, 3)) { *unk_2B0 += 1.0f; @@ -416,7 +416,7 @@ void func_80AF2F58(EnRu2* this, GlobalContext* globalCtx) { this->action = 9; this->drawConfig = 1; *unk_2B0 = kREG(5) + 10.0f; - this->unk_2B4 = 0xFF; + this->alpha = 255; this->actor.shape.unk_14 = 0xFF; return; } @@ -426,14 +426,14 @@ void func_80AF2F58(EnRu2* this, GlobalContext* globalCtx) { this->action = 7; this->drawConfig = 0; *unk_2B0 = 0.0f; - this->unk_2B4 = 0; + this->alpha = 0; this->actor.shape.unk_14 = 0; return; } } - something = (*unk_2B0 / (kREG(5) + 10.0f)) * 255.0f; - this->unk_2B4 = something; - this->actor.shape.unk_14 = something; + alpha = (*unk_2B0 / (kREG(5) + 10.0f)) * 255.0f; + this->alpha = alpha; + this->actor.shape.unk_14 = alpha; } void func_80AF30AC(EnRu2* this, GlobalContext* globalCtx) { @@ -441,7 +441,7 @@ void func_80AF30AC(EnRu2* this, GlobalContext* globalCtx) { this->action = 8; this->drawConfig = 2; this->unk_2B0 = kREG(5) + 10.0f; - this->unk_2B4 = 0xFF; + this->alpha = 255; if (this->unk_2B8 == 0) { func_80AF2E84(this, globalCtx); this->unk_2B8 = 1; @@ -484,7 +484,7 @@ void func_80AF321C(EnRu2* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, this->unk_2B4); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, @@ -509,11 +509,11 @@ void func_80AF33E0(EnRu2* this) { temp_f0 = kREG(17) + 10.0f; if (temp_f0 <= *unk_2B0) { - this->unk_2B4 = 0xFF; + this->alpha = 255; this->actor.shape.unk_14 = 0xFF; } else { temp_f18 = (*unk_2B0 / temp_f0) * 255.0f; - this->unk_2B4 = temp_f18; + this->alpha = temp_f18; this->actor.shape.unk_14 = temp_f18; } } @@ -810,7 +810,7 @@ void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0xFF); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, 255); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, NULL, NULL, diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h index 510b679b8b..82d0bee9bc 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h @@ -19,7 +19,7 @@ typedef struct EnRu2 { /* 0x02A8 */ s32 action; /* 0x02AC */ s32 drawConfig; /* 0x02B0 */ f32 unk_2B0; - /* 0x02B4 */ u32 unk_2B4; + /* 0x02B4 */ u32 alpha; /* 0x02B8 */ s32 unk_2B8; /* 0x02BC */ s32 unk_2BC; /* 0x02C0 */ u16 unk_2C0; diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 99fe0cbdb9..75b804ebef 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -133,12 +133,12 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) { if (gfxSetup == 0) { gfxCtx->polyXlu.p = Gfx_CallSetupDL(gfxCtx->polyXlu.p, 0); gSPDisplayList(gfxCtx->polyXlu.p++, D_0600BC90); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x64, 0x3C, 0x14, 0x00); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 100, 60, 20, 0); gfxSetup = 1; } alpha = eff->timeLeft * (255.f / eff->timeTotal); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0xAA, 0x82, 0x5A, alpha); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 170, 130, 90, alpha); gDPPipeSync(gfxCtx->polyXlu.p++); Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW); diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index d205814c56..bc871a32ed 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -569,7 +569,7 @@ void EnWallmas_DrawXlu(EnWallmas* this, GlobalContext* globalCtx) { // clang-format on func_80094044(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0x00, 0x00, 0x00, 0xFF); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 0, 0, 0, 255); func_80038A28(this->actor.floorPoly, this->actor.posRot.pos.x, this->actor.groundY, this->actor.posRot.pos.z, &mf); Matrix_Mult(&mf, MTXMODE_NEW); diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c index 08017814b6..1b7e1be53a 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c @@ -248,16 +248,16 @@ CutsceneData D_80B4C5D0[] = { // clang-format on u32 D_80B4D5C0[] = { - 0xC3DC0000, 0x42EA0000, 0x00000000, 0xC3F50000, 0x42F00000, 0x00000000, 0x0000002D, 0xC3F20000, 0x42F40000, - 0xC1E80000, 0xC3F00000, 0x42E80000, 0x41900000, 0x00000050, 0xC3CE8000, 0x43080000, 0xC2900000, 0xC3C98000, - 0x430D0000, 0xC2B20000, 0x00000019, 0xC3E30000, 0x42F00000, 0x00000000, 0xC3D90000, 0x42F20000, 0x00000000, - 0x00000014, 0xC3E30000, 0x42F00000, 0x00000000, 0xC3D70000, 0x42CE0000, 0xC2140000, 0x00000014, 0xC3E30000, - 0x42D20000, 0x42480000, 0xC3E28000, 0x42D20000, 0x42840000, 0x0000003C, 0xC3FA8000, 0x42F40000, 0x00000000, - 0xC3E08000, 0x42EE0000, 0x00000000, 0x0000002D, 0xC3E70000, 0x42F20000, 0x00000000, 0xC3D18000, 0x42FA0000, - 0x00000000, 0x00000014, 0xC409C000, 0x42EE0000, 0x40E00000, 0xC412C000, 0x42E60000, 0x41600000, 0x00000014, - 0xC3F48000, 0x43010000, 0x00000000, 0xC3EB0000, 0x43000000, 0x00000000, 0x00000028, 0xC4034000, 0x42FC0000, - 0x00000000, 0xC3FE8000, 0x42FC0000, 0x00000000, 0x0000000A, 0xC3F58000, 0x42F00000, 0xC0E00000, 0xC3FE8000, - 0x42E60000, 0xC0E00000, 0x0000004B, 0xC3F28000, 0x42F00000, 0xC2280000, 0xC3F20000, 0x42F00000, 0x41200000, + 0xC3DC0000, 0x42EA0000, 0x00000000, 0xC3F50000, 0x42F00000, 0x00000000, 0x0000002D, 0xC3F20000, 0x42F40000, + 0xC1E80000, 0xC3F00000, 0x42E80000, 0x41900000, 0x00000050, 0xC3CE8000, 0x43080000, 0xC2900000, 0xC3C98000, + 0x430D0000, 0xC2B20000, 0x00000019, 0xC3E30000, 0x42F00000, 0x00000000, 0xC3D90000, 0x42F20000, 0x00000000, + 0x00000014, 0xC3E30000, 0x42F00000, 0x00000000, 0xC3D70000, 0x42CE0000, 0xC2140000, 0x00000014, 0xC3E30000, + 0x42D20000, 0x42480000, 0xC3E28000, 0x42D20000, 0x42840000, 0x0000003C, 0xC3FA8000, 0x42F40000, 0x00000000, + 0xC3E08000, 0x42EE0000, 0x00000000, 0x0000002D, 0xC3E70000, 0x42F20000, 0x00000000, 0xC3D18000, 0x42FA0000, + 0x00000000, 0x00000014, 0xC409C000, 0x42EE0000, 0x40E00000, 0xC412C000, 0x42E60000, 0x41600000, 0x00000014, + 0xC3F48000, 0x43010000, 0x00000000, 0xC3EB0000, 0x43000000, 0x00000000, 0x00000028, 0xC4034000, 0x42FC0000, + 0x00000000, 0xC3FE8000, 0x42FC0000, 0x00000000, 0x0000000A, 0xC3F58000, 0x42F00000, 0xC0E00000, 0xC3FE8000, + 0x42E60000, 0xC0E00000, 0x0000004B, 0xC3F28000, 0x42F00000, 0xC2280000, 0xC3F20000, 0x42F00000, 0x41200000, 0x0000002D, }; u32 D_80B4D72C[] = { diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index a4169e3b64..66441d956e 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -602,7 +602,7 @@ void EnZl2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve Matrix_RotateRPY(-0x5DE7, -0x53E9, 0x3333, MTXMODE_APPLY); Matrix_Scale(1.2f, 1.2f, 1.2f, MTXMODE_APPLY); gSPMatrix((*gfx)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1253), - G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList((*gfx)++, &D_0600BAE8); } Matrix_Pull(); @@ -755,9 +755,9 @@ void func_80B500E0(EnZl2* this, GlobalContext* globalCtx) { } } -void func_80B501C4(EnZl2* this, s32 arg1) { +void func_80B501C4(EnZl2* this, s32 alpha) { if (this->actor.attachedB != NULL) { - ((DoorWarp1*)this->actor.attachedB)->unk_1A8 = arg1; + ((DoorWarp1*)this->actor.attachedB)->alpha = alpha; } } @@ -765,9 +765,9 @@ void func_80B501E8(EnZl2* this, GlobalContext* globalCtx) { CsCmdActorAction* npcAction = EnZl2_GetNpcAction(globalCtx, 0); if (npcAction != NULL) { - this->actor.shape.unk_14 = this->unk_1A8 = + this->actor.shape.unk_14 = this->alpha = (1.0f - func_8006F93C(npcAction->endFrame, npcAction->startFrame, globalCtx->csCtx.frames)) * 255.0f; - func_80B501C4(this, this->unk_1A8); + func_80B501C4(this, this->alpha); } } @@ -948,7 +948,7 @@ void func_80B50970(EnZl2* this, GlobalContext* globalCtx) { void func_80B50980(EnZl2* this, GlobalContext* globalCtx) { this->action = 23; this->drawConfig = 2; - this->unk_1A8 = 0xFF; + this->alpha = 255; } void func_80B509A0(EnZl2* this, GlobalContext* globalCtx) { @@ -1696,7 +1696,7 @@ void func_80B523C8(EnZl2* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp74)); gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp70)); gSPSegment(gfxCtx->polyOpa.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp64)); - gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0xFF); + gDPSetEnvColor(gfxCtx->polyOpa.p++, 0, 0, 0, 255); gSPSegment(gfxCtx->polyOpa.p++, 0x0B, &D_80116280[2]); gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, @@ -1720,7 +1720,7 @@ void func_80B525D4(EnZl2* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(sp78)); gSPSegment(gfxCtx->polyXlu.p++, 0x09, SEGMENTED_TO_VIRTUAL(sp78)); gSPSegment(gfxCtx->polyXlu.p++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C)); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, this->unk_1A8); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 0, 0, this->alpha); gSPSegment(gfxCtx->polyXlu.p++, 0x0B, &D_80116280[0]); gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h index 23a2f5eb23..57fc6f7cda 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h @@ -23,7 +23,7 @@ typedef struct EnZl2 { /* 0x019C */ s32 action; /* 0x01A0 */ s32 drawConfig; /* 0x01A4 */ char unk_1A4[0x4]; - /* 0x01A8 */ s32 unk_1A8; + /* 0x01A8 */ s32 alpha; /* 0x01AC */ s16 unk_1AC[0x18]; // ??? /* 0x01DC */ s16 unk_1DC[0x18]; // ??? /* 0x020C */ s16 unk_20C[0x18]; // ??? diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.c b/src/overlays/actors/ovl_End_Title/z_end_title.c index 2beda0fa45..632a5ddaf7 100644 --- a/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -91,7 +91,7 @@ void EndTitle_Draw(Actor* thisx, GlobalContext* globalCtx) { } gfxCtx->overlay.p = func_80093F34(gfxCtx->overlay.p); gDPSetTextureLUT(gfxCtx->overlay.p++, G_TT_NONE); - gDPSetEnvColor(gfxCtx->overlay.p++, 0xFF, 0x78, 0x1E, 0x00); + gDPSetEnvColor(gfxCtx->overlay.p++, 255, 120, 30, 0); gDPSetRenderMode(gfxCtx->overlay.p++, G_RM_PASS, G_RM_XLU_SURF2); gSPClearGeometryMode(gfxCtx->overlay.p++, G_TEXTURE_ENABLE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind_gfx.c b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind_gfx.c index eece4ec38f..7a6a03a4b4 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind_gfx.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind_gfx.c @@ -272,8 +272,8 @@ Gfx sInnerCylinderDList[] = { ENVIRONMENT, COMBINED, ENVIRONMENT, COMBINED, 0, SHADE, 0), gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_XLU_SURF2), gsSPClearGeometryMode(G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR), - gsDPSetPrimColor(0, 0x80, 0xFF, 0xFF, 0xAA, 0xFF), - gsDPSetEnvColor(0x96, 0xFF, 0x00, 0x00), + gsDPSetPrimColor(0, 0x80, 255, 255, 170, 255), + gsDPSetEnvColor(150, 255, 0, 0), gsSPDisplayList(0x08000000), gsSPVertex(&sCylinderVtx[0], 18, 0), gsSP2Triangles(0, 1, 2, 0, 0, 3, 1, 0), @@ -299,8 +299,8 @@ Gfx sOuterCylinderDList[] = { ENVIRONMENT, COMBINED, ENVIRONMENT, COMBINED, 0, SHADE, 0), gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_XLU_SURF2), gsSPClearGeometryMode(G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR), - gsDPSetPrimColor(0, 0x80, 0xFF, 0xFF, 0xAA, 0xFF), - gsDPSetEnvColor(0x00, 0x96, 0x00, 0x00), + gsDPSetPrimColor(0, 0x80, 255, 255, 170, 255), + gsDPSetEnvColor(0, 150, 0, 0), gsSPDisplayList(0x09000000), gsSPVertex(&sCylinderVtx[18], 18, 0), gsSP2Triangles(0, 1, 2, 0, 0, 3, 1, 0), diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot_gfx.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot_gfx.c index 60462accc4..dda2580727 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot_gfx.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot_gfx.c @@ -65,8 +65,8 @@ static Gfx sTextureDL[] = { GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1), G_RM_AA_ZB_XLU_SURF2), gsSPClearGeometryMode(G_TEXTURE_ENABLE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR), - gsDPSetPrimColor(0x00, 0x00, 0xFF, 0xFF, 0xAA, 0xFF), - gsDPSetEnvColor(0xC8, 0xFF, 0x00, 0x80), + gsDPSetPrimColor(0x00, 0x00, 255, 255, 170, 255), + gsDPSetEnvColor(200, 255, 0, 128), gsSPEndDisplayList(), }; diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index d837acf14f..43b98c7850 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -163,8 +163,8 @@ void OceffStorm_Draw(Actor* thisx, GlobalContext* globalCtx) { func_80093D84(globalCtx->state.gfxCtx); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 0xFF, 0xFF, 0xC8, 0xFF); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x96, 0x96, 0x00, 0x80); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x80, 0x80, 255, 255, 200, 255); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 150, 150, 0, 128); gDPSetAlphaDither(gfxCtx->polyXlu.p++, G_AD_NOISE); gDPSetColorDither(gfxCtx->polyXlu.p++, G_CD_NOISE); diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm_gfx.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm_gfx.c index 490d709c31..e2a9ebef23 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm_gfx.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm_gfx.c @@ -125,7 +125,7 @@ static Gfx sTextureDL[] = { gsDPSetTextureLUT(G_TT_NONE), gsDPSetRenderMode(IM_RD | CVG_DST_SAVE | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1), G_RM_CLD_SURF2), - gsDPSetEnvColor(0x32, 0x32, 0x00, 0x00), + gsDPSetEnvColor(50, 50, 0, 0), gsSPClearGeometryMode(G_TEXTURE_ENABLE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR), gsDPSetCombineLERP(TEXEL1, TEXEL0, PRIM_LOD_FRAC, TEXEL0, TEXEL1, TEXEL0, PRIM_LOD_FRAC, TEXEL0, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0), diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index 2fb18002c9..61c7bd7d95 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -114,11 +114,11 @@ void OceffWipe_Draw(Actor* thisx, GlobalContext* globalCtx) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->actor.params) { - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0xAA, 0xFF, 0xFF, 0xFF); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x96, 0xFF, 0x80); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 170, 255, 255, 255); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 0, 150, 255, 128); } else { - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0xFF, 0xFF, 0xC8, 0xFF); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 100, 0x00, 0xFF, 0x80); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 200, 255); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 100, 0, 255, 128); } gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index e3706ee7d1..7b5d4d52e0 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -84,7 +84,7 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) { if (this->counter >= 80) { alpha = 12 * (100 - this->counter); } else { - alpha = 0xFF; + alpha = 255; } vtxPtr[1].v.cn[3] = vtxPtr[3].v.cn[3] = vtxPtr[5].v.cn[3] = vtxPtr[7].v.cn[3] = vtxPtr[9].v.cn[3] = @@ -104,8 +104,8 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 400), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0xFF, 0xFF, 0xAA, 0xFF); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0xFF, 0x64, 0x00, 0x80); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 170, 255); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 255, 100, 0, 128); gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); gSPDisplayList(gfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64, 1, scroll * (-6), 0, 64, 64)); diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index c891ade574..c7b4127a96 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -86,7 +86,7 @@ void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) { if (this->counter >= 80) { alpha = 12 * (100 - this->counter); } else { - alpha = 0xFF; + alpha = 255; } vtxPtr[1].v.cn[3] = vtxPtr[3].v.cn[3] = vtxPtr[5].v.cn[3] = vtxPtr[7].v.cn[3] = vtxPtr[9].v.cn[3] = @@ -106,8 +106,8 @@ void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 353), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gDPSetPrimColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0xFF, 0xFF, 0xAA, 0xFF); - gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x64, 0xC8, 0x00, 0x80); + gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, 255, 255, 170, 255); + gDPSetEnvColor(gfxCtx->polyXlu.p++, 100, 200, 0, 128); gSPDisplayList(gfxCtx->polyXlu.p++, sTextureDL); gSPDisplayList(gfxCtx->polyXlu.p++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 12, scroll * (-12), 64, 64, 1, scroll * 8, scroll * (-8), 64, 64)); diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index b0c84b8f04..726fb7b706 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -80,7 +80,7 @@ void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) { if (this->counter >= 30) { alpha = 12 * (50 - this->counter); } else { - alpha = 0xFF; + alpha = 255; } vtxPtr[1].v.cn[3] = vtxPtr[3].v.cn[3] = vtxPtr[5].v.cn[3] = vtxPtr[7].v.cn[3] = vtxPtr[9].v.cn[3] = diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index bc01afc7a4..456c87fd1f 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -21,10 +21,10 @@ void Title_PrintBuildInfo(Gfx** gfxp) { printer = alloca(sizeof(GfxPrint)); GfxPrint_Init(printer); GfxPrint_Open(printer, g); - GfxPrint_SetColor(printer, 0xFF, 0x9B, 0xFF, 0xFF); + GfxPrint_SetColor(printer, 255, 155, 255, 255); GfxPrint_SetPos(printer, 9, 21); GfxPrint_Printf(printer, "NOT MARIO CLUB VERSION"); - GfxPrint_SetColor(printer, 0xFF, 0xFF, 0xFF, 0xFF); + GfxPrint_SetColor(printer, 255, 255, 255, 255); GfxPrint_SetPos(printer, 7, 23); GfxPrint_Printf(printer, "[Creator:%s]", gBuildTeam); GfxPrint_SetPos(printer, 7, 24); @@ -180,7 +180,7 @@ void Title_Init(TitleContext* this) { func_800A9CD4(&this->state, &this->sram); this->ult = 0; this->unk_1D4 = 0x14; - this->coverAlpha = 0xFF; + this->coverAlpha = 255; this->addAlpha = -3; this->visibleDuration = 0x3C; } diff --git a/sym_info.py b/sym_info.py old mode 100644 new mode 100755 diff --git a/tools/rgba5551.py b/tools/rgba5551.py new file mode 100755 index 0000000000..9b5377643f --- /dev/null +++ b/tools/rgba5551.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 + +import argparse + +def decode_rgba5551(short, max=False): + red = (short & 0xF800) >> 8 + green = (short & 0x07C0) >> 3 + blue = (short & 0x003E) << 2 + alpha = 1 if (short % 2) else 0 + if max: + red |= red >> 5 + green |= green >> 5 + blue |= blue >> 5 + return (red, green, blue, alpha) + +def u16(x): + x = int(x, 16) + if x > 0xFFFF: + raise argparse.ArgumentTypeError("expecting a short (u16) representing a single color.") + return x + +def main(): + parser = argparse.ArgumentParser(description="Decodes a color encoded in rgba5551.") + parser.add_argument("short", type=u16, help="u16 raw value of the color to decode") + args = parser.parse_args() + print("Min: GPACK_RGBA5551(%d, %d, %d, %d)" % decode_rgba5551(args.short, max=False)) + print("Max: GPACK_RGBA5551(%d, %d, %d, %d)" % decode_rgba5551(args.short, max=True)) + print("Note: All RGB values between these encode to the given value.") + print(" Use the representation that makes the most sense.\n") + +if __name__ == "__main__": + main()