summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2021-08-01 13:15:21 -0400
committerGitHub <noreply@github.com>2021-08-01 19:15:21 +0200
commitd2bad8fb6af983bf12f7b287064a8519dcb749a5 (patch)
tree72296d9a028bf46f72a7ec227121093309043b48
parenta209195183d71b988a50aabd53d34156b70ca4c5 (diff)
convert remaining RGB5a1 to RGBA16 (#879)
-rw-r--r--include/color.h2
-rw-r--r--src/code/PreRender.c8
-rw-r--r--src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c20
3 files changed, 15 insertions, 15 deletions
diff --git a/include/color.h b/include/color.h
index a005f4e6d..17102b6bb 100644
--- a/include/color.h
+++ b/include/color.h
@@ -29,6 +29,6 @@ typedef union {
u16 a : 1;
};
u16 rgba;
-} Color_RGB5A1;
+} Color_RGBA16;
#endif
diff --git a/src/code/PreRender.c b/src/code/PreRender.c
index ec502596f..74a95e4e8 100644
--- a/src/code/PreRender.c
+++ b/src/code/PreRender.c
@@ -365,8 +365,8 @@ void func_800C2500(PreRender* this, s32 x, s32 y) {
s32 pxR2;
s32 pxG2;
s32 pxB2;
- Color_RGB5A1 pxIn;
- Color_RGB5A1 pxOut;
+ Color_RGBA16 pxIn;
+ Color_RGBA16 pxOut;
u32 pxR3;
u32 pxG3;
u32 pxB3;
@@ -483,7 +483,7 @@ void func_800C2FE4(PreRender* this) {
for (y = 0; y < this->height; y++) {
for (x = 0; x < this->width; x++) {
- Color_RGB5A1 pxIn;
+ Color_RGBA16 pxIn;
pxIn.rgba = this->fbufSave[x + y * this->width];
buffR[x] = pxIn.r;
@@ -492,7 +492,7 @@ void func_800C2FE4(PreRender* this) {
}
for (x = 1; x < this->width - 1; x++) {
- Color_RGB5A1 pxOut;
+ Color_RGBA16 pxOut;
s32 a = this->cvgSave[x + y * this->width];
a >>= 5;
diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
index d591ed497..1dbdfed9f 100644
--- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
+++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
@@ -182,20 +182,20 @@ static u8 sDecayMaskTotal[16 * 16] = {
// clang-format on
// These are Phantom Ganon's body textures, but I don't know which is which.
-static u64* sLimbTex_rgb5a1_8x8[] = {
+static u64* sLimbTex_rgba16_8x8[] = {
gPhantomGanonLimbTex_00A800, gPhantomGanonLimbTex_00AE80, gPhantomGanonLimbTex_00AF00,
gPhantomGanonLimbTex_00C180, gPhantomGanonLimbTex_00C400,
};
-static u64* sLimbTex_rgb5a1_16x8[] = {
+static u64* sLimbTex_rgba16_16x8[] = {
gPhantomGanonLimbTex_00B980, gPhantomGanonLimbTex_00C480, gPhantomGanonLimbTex_00BC80,
gPhantomGanonLimbTex_00BD80, gPhantomGanonLimbTex_00C080,
};
-static u64* sLimbTex_rgb5a1_16x16[] = {
+static u64* sLimbTex_rgba16_16x16[] = {
gPhantomGanonLimbTex_00C200, gPhantomGanonLimbTex_00A000, gPhantomGanonLimbTex_00A200,
gPhantomGanonLimbTex_00A400, gPhantomGanonLimbTex_00A600, gPhantomGanonLimbTex_00A880,
gPhantomGanonLimbTex_00B780, gPhantomGanonLimbTex_00BA80, gPhantomGanonLimbTex_00BE80,
};
-static u64* sLimbTex_rgb5a1_16x32[] = { gPhantomGanonLimbTex_00AA80, gPhantomGanonLimbTex_00AF80 };
+static u64* sLimbTex_rgba16_16x32[] = { gPhantomGanonLimbTex_00AA80, gPhantomGanonLimbTex_00AF80 };
static u64* sMouthTex_ci8_16x16[] = { gPhantomGanonMouthTex, gPhantomGanonSmileTex };
@@ -249,16 +249,16 @@ void BossGanondrof_ClearPixels(u8* mask, s16 index) {
for (i = 0; i < 5; i++) {
// ARRAY_COUNT can't be used here because the arrays aren't guaranteed to be the same size.
- BossGanondrof_ClearPixels8x8(SEGMENTED_TO_VIRTUAL(sLimbTex_rgb5a1_8x8[i]), mask, index);
- BossGanondrof_ClearPixels16x8(SEGMENTED_TO_VIRTUAL(sLimbTex_rgb5a1_16x8[i]), mask, index);
+ BossGanondrof_ClearPixels8x8(SEGMENTED_TO_VIRTUAL(sLimbTex_rgba16_8x8[i]), mask, index);
+ BossGanondrof_ClearPixels16x8(SEGMENTED_TO_VIRTUAL(sLimbTex_rgba16_16x8[i]), mask, index);
}
- for (i = 0; i < ARRAY_COUNT(sLimbTex_rgb5a1_16x16); i++) {
- BossGanondrof_ClearPixels16x16(SEGMENTED_TO_VIRTUAL(sLimbTex_rgb5a1_16x16[i]), mask, index);
+ for (i = 0; i < ARRAY_COUNT(sLimbTex_rgba16_16x16); i++) {
+ BossGanondrof_ClearPixels16x16(SEGMENTED_TO_VIRTUAL(sLimbTex_rgba16_16x16[i]), mask, index);
}
- for (i = 0; i < ARRAY_COUNT(sLimbTex_rgb5a1_16x32); i++) {
- BossGanondrof_ClearPixels16x32(SEGMENTED_TO_VIRTUAL(sLimbTex_rgb5a1_16x32[i]), mask, index);
+ for (i = 0; i < ARRAY_COUNT(sLimbTex_rgba16_16x32); i++) {
+ BossGanondrof_ClearPixels16x32(SEGMENTED_TO_VIRTUAL(sLimbTex_rgba16_16x32[i]), mask, index);
}
BossGanondrof_ClearPixels32x16(SEGMENTED_TO_VIRTUAL(gPhantomGanonLimbTex_00B380), mask, index);