Skip to content

Commit

Permalink
fix inconsistent RGBA_BUF_SIZE naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainchus committed Mar 5, 2024
1 parent f7cfb52 commit 3bf973a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/background_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ void gfx_frame_filter_pass_1(Color_RGBA8* filterBuf0, Color_RGBA8 filterBuf1, u1
}

void func_80027600(Color_RGBA8* arg0, s16* out) {
#define RGBA_SIZE_BUF 32
#define RGBA_BUF_SIZE 32
Color_RGBA8 final;
u8 rs[RGBA_SIZE_BUF];
u8 gs[RGBA_SIZE_BUF];
u8 bs[RGBA_SIZE_BUF];
u8 rs[RGBA_BUF_SIZE];
u8 gs[RGBA_BUF_SIZE];
u8 bs[RGBA_BUF_SIZE];
s32 i;
s32 sum;

for (i = 0; i < RGBA_SIZE_BUF; i++) {
for (i = 0; i < RGBA_BUF_SIZE; i++) {
rs[i] = 0;
gs[i] = 0;
bs[i] = 0;
Expand All @@ -178,7 +178,7 @@ void func_80027600(Color_RGBA8* arg0, s16* out) {
}

sum = 0;
for (i = 0; i < RGBA_SIZE_BUF; i++) {
for (i = 0; i < RGBA_BUF_SIZE; i++) {
sum += rs[i];
if (sum >= 5) {
break;
Expand All @@ -187,7 +187,7 @@ void func_80027600(Color_RGBA8* arg0, s16* out) {
final.r = i;

sum = 0;
for (i = 0; i < RGBA_SIZE_BUF; i++) {
for (i = 0; i < RGBA_BUF_SIZE; i++) {
sum += gs[i];
if (sum >= 5) {
break;
Expand All @@ -196,7 +196,7 @@ void func_80027600(Color_RGBA8* arg0, s16* out) {
final.g = i;

sum = 0;
for (i = 0; i < RGBA_SIZE_BUF; i++) {
for (i = 0; i < RGBA_BUF_SIZE; i++) {
sum += bs[i];
if (sum >= 5) {
break;
Expand All @@ -205,7 +205,7 @@ void func_80027600(Color_RGBA8* arg0, s16* out) {
final.b = i;

*out = (final.r << 11) + (final.g << 6) + (final.b << 1) + 1;
#undef RGBA_SIZE_BUF
#undef RGBA_BUF_SIZE
}

void func_80027774(u16* frameBuffer0, u16* frameBuffer1, u16* zBuffer) {
Expand Down
1 change: 1 addition & 0 deletions src/battle/area/sam2/actor/monstar.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ API_CALLABLE(N(UpdateMonstarImgFX)) {
}

return ApiStatus_BLOCK;

#undef RGBA_BUF_SIZE
}

Expand Down
1 change: 1 addition & 0 deletions src/common/UpdateEnchantedBowserColors.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ API_CALLABLE(N(UpdateEnchantedBowserColors)) {
script->functionTemp[0] = 0;
return ApiStatus_BLOCK;
}

#undef RGBA_BUF_SIZE
}
2 changes: 2 additions & 0 deletions src/world/area_sam/sam_05/sam_05_4_npc.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ API_CALLABLE(N(UpdateMonstarSpriteEffects)) {
enemy->varTable[3], 0, enemy->varTable[3], 0);
}
return ApiStatus_BLOCK;

#undef RGBA_BUF_SIZE
}

API_CALLABLE(N(CheckSkipInput)) {
Expand Down

0 comments on commit 3bf973a

Please sign in to comment.