diff --git a/include/bg_palette_buffer.h b/include/bg_palette_buffer.h index 2b10e90b6..ab3593aec 100644 --- a/include/bg_palette_buffer.h +++ b/include/bg_palette_buffer.h @@ -4,10 +4,10 @@ #include "structs/rgb.h" void InitBGPaletteBuffer(void); -void nullsub_4(s32 index, const Rgb32 *color, s32 brightness, const Rgb32 *ramp); -void nullsub_5(s32 index, const Rgb32 *color); -void SetBGPaletteBufferColorArray(s32 index, const Rgb32 *color); -void SetBGPaletteBufferColorRGB(s32 index, const Rgb32 *color, s32 brightness, const Rgb32 *ramp); +void nullsub_4(s32 index, const RGB *color, s32 brightness, const RGB *ramp); +void nullsub_5(s32 index, const RGB *color); +void SetBGPaletteBufferColorArray(s32 index, const RGB *color); +void SetBGPaletteBufferColorRGB(s32 index, const RGB *color, s32 brightness, const RGB *ramp); void TransferBGPaletteBuffer(void); #endif // GUARD_BG_PALETTE_BUFFER_H diff --git a/include/code_8004AA0.h b/include/code_8004AA0.h index 5d2b18dd4..8c6d517b7 100644 --- a/include/code_8004AA0.h +++ b/include/code_8004AA0.h @@ -10,10 +10,10 @@ typedef struct unkStruct_202EE8C u32 unk0; u16 unk4; s16 unk6; - Rgb32 *unk8; - Rgb32 *unkC; - Rgb32 *unk10; - Rgb32 unk14; + RGB *unk8; + RGB *unkC; + RGB *unk10; + RGB unk14; } unkStruct_202EE8C; extern unkStruct_202EE8C gUnknown_202EE8C[32]; @@ -37,12 +37,12 @@ typedef struct unkDataFor8004AA4 { /* 0x0 */ s16 colorCount; s16 unk2; - /* 0x4 */ Rgb32 colors[0]; + /* 0x4 */ RGB colors[0]; } unkDataFor8004AA4; void nullsub_6(void); void sub_8004AA4(unkStruct_202EE8C *, OpenedFile *, s32); -bool8 sub_8004AF0(bool8, unkStruct_202EE8C *, s32, s32, s32, const Rgb32 *); +bool8 sub_8004AF0(bool8, unkStruct_202EE8C *, s32, s32, s32, const RGB *); bool8 sub_8004D14(unkStruct_202EE8C *, s32); bool8 sub_8004D40(unkStruct_202EE8C *, s32); diff --git a/include/code_800558C.h b/include/code_800558C.h index e16e166d0..463e0e2b1 100644 --- a/include/code_800558C.h +++ b/include/code_800558C.h @@ -10,7 +10,7 @@ struct axMapSprite { axmain axmain; const u32 *tiles; - const Rgb32 *pal; + const RGB *pal; s32 tileCount; }; @@ -23,8 +23,8 @@ void nullsub_10(bool8); void nullsub_12(void); void nullsub_13(void); void nullsub_14(void); -void sub_8005610(OpenedFile *, s32, s32, const Rgb32 *); -void sub_8005770(s32, const Rgb32 *color, s32, const Rgb32 *ramp); +void sub_8005610(OpenedFile *, s32, s32, const RGB *); +void sub_8005770(s32, const RGB *color, s32, const RGB *ramp); void sub_80057E8(void); void sub_8005838(s32 *, u8 kind); void sub_80060EC(void); diff --git a/include/code_8009804.h b/include/code_8009804.h index b161ef8b4..d8509046a 100644 --- a/include/code_8009804.h +++ b/include/code_8009804.h @@ -19,6 +19,6 @@ void sub_80098BC(u32 *, const u32 *, u32); void sub_80098F8(u32); void sub_8009908(void); void sub_80099C0(void); -void sub_80099F0(Rgb32); +void sub_80099F0(RGB); #endif // GUARD_CODE_8009804_H diff --git a/include/code_801D014.h b/include/code_801D014.h index 1f7549319..63168f5b7 100644 --- a/include/code_801D014.h +++ b/include/code_801D014.h @@ -28,7 +28,7 @@ struct unk_203B250 struct TeamBadgeData { /* 0x0 */ u8 *pics; // probably a pointer to an arrays of pixels? - /* 0x4 */ Rgb32 *palette; // Pics share common palette + /* 0x4 */ RGB *palette; // Pics share common palette }; bool8 sub_801D014(PokemonStruct1 *); diff --git a/include/string_format.h b/include/string_format.h index 185897ed6..0dd5e875a 100644 --- a/include/string_format.h +++ b/include/string_format.h @@ -20,7 +20,7 @@ void sub_80155F0(void); struct PortraitGfxSub { - const Rgb32 *pal; + const RGB *pal; const u8 *gfx; }; diff --git a/include/structs/rgb.h b/include/structs/rgb.h index b76eb7d61..8bdd6058f 100644 --- a/include/structs/rgb.h +++ b/include/structs/rgb.h @@ -1,16 +1,16 @@ #ifndef GUARD_RGB_H #define GUARD_RGB_H -typedef struct Rgb32 +typedef struct RGB { u8 r; u8 g; u8 b; -} Rgb32; +} RGB; typedef struct Palette32 { - Rgb32 pal[16]; + RGB pal[16]; } Palette32; #endif // GUARD_RGB_H diff --git a/include/structs/str_dungeon.h b/include/structs/str_dungeon.h index c84fc992e..c7daddb1b 100644 --- a/include/structs/str_dungeon.h +++ b/include/structs/str_dungeon.h @@ -259,7 +259,7 @@ typedef struct Dungeon Entity *unkBC; u8 fillC0[0x134 - 0xC0]; struct unkStruct_Dungeon134_sub unk134; - Rgb32 colorRamp[0x100]; + RGB colorRamp[0x100]; /* 0x57C */ u8 fill57C[0x5C0 - 0x57c]; /* 0x5C0 */ s32 unk5C0; /* 0x5C4 */ struct unkStruct_Dungeon5C4_sub unk5C4[3]; diff --git a/src/bg_palette_buffer.c b/src/bg_palette_buffer.c index bb2c6c798..c47699ca6 100644 --- a/src/bg_palette_buffer.c +++ b/src/bg_palette_buffer.c @@ -21,7 +21,7 @@ void InitBGPaletteBuffer(void) } } -void SetBGPaletteBufferColorRGB(s32 index, const Rgb32 *color, s32 brightnessRaw, const Rgb32 *ramp) +void SetBGPaletteBufferColorRGB(s32 index, const RGB *color, s32 brightnessRaw, const RGB *ramp) { s32 brightness = brightnessRaw; @@ -44,7 +44,7 @@ void SetBGPaletteBufferColorRGB(s32 index, const Rgb32 *color, s32 brightnessRaw ramp[color->b].b * brightness / 256 & 0x1F); } -void SetBGPaletteBufferColorArray(s32 index, const Rgb32 *color32) +void SetBGPaletteBufferColorArray(s32 index, const RGB *color32) { sBGPaletteRowDirty[index / BG_PALETTE_ROW_SIZE] = TRUE; sBGPaletteBuffer[index] = RGB2(color32->r >> 3, color32->g >> 3, color32->b >> 3); @@ -56,11 +56,11 @@ void SetBGPaletteBufferColor(s32 index, u16 *color) sBGPaletteBuffer[index] = *color; } -void nullsub_4(s32 index, const Rgb32 *colorArray, s32 brightness, const Rgb32 *ramp) +void nullsub_4(s32 index, const RGB *colorArray, s32 brightness, const RGB *ramp) { } -void nullsub_5(s32 index, const Rgb32 *colorArray) +void nullsub_5(s32 index, const RGB *colorArray) { } diff --git a/src/code_2.c b/src/code_2.c index 6fc5effa5..15f81e89a 100644 --- a/src/code_2.c +++ b/src/code_2.c @@ -108,7 +108,7 @@ void GameLoop(void) s32 i; gTitleBrightness++; for (i = 0; i < 240; i++) - SetBGPaletteBufferColorRGB(i, &((Rgb32*)gTitlePaletteFile->data)[i], gTitleBrightness, NULL); + SetBGPaletteBufferColorRGB(i, &((RGB*)gTitlePaletteFile->data)[i], gTitleBrightness, NULL); xxx_update_stuff(0); } if (tmp3) { @@ -149,7 +149,7 @@ void GameLoop(void) s32 i; gTitleBrightness--; for (i = 0; i < 240; i++) - SetBGPaletteBufferColorRGB(i, &((Rgb32*)gTitlePaletteFile->data)[i], gTitleBrightness, NULL); + SetBGPaletteBufferColorRGB(i, &((RGB*)gTitlePaletteFile->data)[i], gTitleBrightness, NULL); xxx_update_stuff(0); } CloseFile(gTitlePaletteFile); diff --git a/src/code_8004AA0.c b/src/code_8004AA0.c index 43339e8dc..cac7766cd 100644 --- a/src/code_8004AA0.c +++ b/src/code_8004AA0.c @@ -31,7 +31,7 @@ void sub_8004AA4(unkStruct_202EE8C *a0, OpenedFile *a1, s32 a2) } } -bool8 sub_8004AF0(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const Rgb32 *a5) +bool8 sub_8004AF0(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const RGB *a5) { bool8 bVar3; bool8 ret; @@ -63,7 +63,7 @@ bool8 sub_8004AF0(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const return ret; } -UNUSED static bool8 sub_8004B78(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const Rgb32 *a5) +UNUSED static bool8 sub_8004B78(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const RGB *a5) { bool8 bVar3; bool8 ret; @@ -95,14 +95,14 @@ UNUSED static bool8 sub_8004B78(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, return ret; } -bool8 sub_8004C00(unkStruct_202EE8C *a0, s32 a1, s32 a2, s32 brightness, const Rgb32 *ramp, s16 *a5) +bool8 sub_8004C00(unkStruct_202EE8C *a0, s32 a1, s32 a2, s32 brightness, const RGB *ramp, s16 *a5) { bool8 ret; s32 i; s32 r; s32 g; s32 b; - Rgb32 color; + RGB color; ret = FALSE; diff --git a/src/code_800558C.c b/src/code_800558C.c index 8aaf3ad24..b62d47d72 100644 --- a/src/code_800558C.c +++ b/src/code_800558C.c @@ -31,8 +31,8 @@ extern const s16 gUnknown_80B83EA[16 * 10]; extern s32 sin_abs_4096(s32); extern s32 cos_4096(s32); -static void sub_800561C(struct axMapSprite *, s32, s32, const Rgb32 *); -const Rgb32 *sub_8005674(struct axMapSprite *, s32); +static void sub_800561C(struct axMapSprite *, s32, s32, const RGB *); +const RGB *sub_8005674(struct axMapSprite *, s32); void DoAxFrame_800558C(struct axObject *a0, s32 spriteX, s32 spriteY, u32 a3, u32 paletteNum, u16 *spriteMasks) { @@ -56,12 +56,12 @@ void DoAxFrame_800558C(struct axObject *a0, s32 spriteX, s32 spriteY, u32 a3, u3 a0->axdata.flags &= 0xF7FF; } -void sub_8005610(OpenedFile *a0, s32 vramIdx, s32 brightness, const Rgb32 *ramp) +void sub_8005610(OpenedFile *a0, s32 vramIdx, s32 brightness, const RGB *ramp) { sub_800561C((struct axMapSprite *)a0->data, vramIdx, brightness, ramp); } -static void sub_800561C(struct axMapSprite *a0, s32 vramIdx, s32 brightness, const Rgb32 *ramp) +static void sub_800561C(struct axMapSprite *a0, s32 vramIdx, s32 brightness, const RGB *ramp) { s32 i; @@ -74,12 +74,12 @@ static void sub_800561C(struct axMapSprite *a0, s32 vramIdx, s32 brightness, con } } -UNUSED static const Rgb32 *sub_8005668(OpenedFile *a0, s32 vramIdx) +UNUSED static const RGB *sub_8005668(OpenedFile *a0, s32 vramIdx) { return sub_8005674((struct axMapSprite *)a0->data, vramIdx); } -const Rgb32 *sub_8005674(struct axMapSprite *a0, s32 vramIdx) +const RGB *sub_8005674(struct axMapSprite *a0, s32 vramIdx) { if (a0->tiles != NULL) CpuCopy(OBJ_VRAM0 + vramIdx * 0x20, a0->tiles, a0->tileCount * 0x20); @@ -149,12 +149,12 @@ void sub_8005700(Position *a0, struct axObject *a1) } } -UNUSED static void sub_8005764(s32 a0, OpenedFile *file, s32 a2, const Rgb32 *a3) +UNUSED static void sub_8005764(s32 a0, OpenedFile *file, s32 a2, const RGB *a3) { - sub_8005770(a0, (const Rgb32*)file->data, a2, a3); + sub_8005770(a0, (const RGB*)file->data, a2, a3); } -void sub_8005770(s32 param_1, const Rgb32 *color, s32 brightness, const Rgb32 *ramp) +void sub_8005770(s32 param_1, const RGB *color, s32 brightness, const RGB *ramp) { s32 i; diff --git a/src/code_8009804.c b/src/code_8009804.c index dcc39f0bd..60061638e 100644 --- a/src/code_8009804.c +++ b/src/code_8009804.c @@ -20,7 +20,7 @@ void InitFontPalette(void) { OpenedFile *fontpalFile; s32 i; - Rgb32 *ptr; + RGB *ptr; fontpalFile = OpenFileAndGetFileDataPtr(gUnknown_80B88CC, &gSystemFileArchive); // fontpal CpuCopy(gFontPalette, fontpalFile->data, sizeof(gFontPalette)); @@ -126,7 +126,7 @@ void sub_80099C0(void) CpuCopy(BG_SCREEN_ADDR(13), gUnknown_202B038[1], BG_SCREEN_SIZE); } -void sub_80099F0(Rgb32 a0) +void sub_80099F0(RGB a0) { s32 i; diff --git a/src/code_801D014.c b/src/code_801D014.c index 6eb954e40..3a524e986 100644 --- a/src/code_801D014.c +++ b/src/code_801D014.c @@ -597,7 +597,7 @@ static void LoadTeamRankBadge(u32 a0, u32 a1, u32 a2) OpenedFile *teamBadgeFile; s32 paletteIndex; u8 rank; - Rgb32 *colorArray; + RGB *colorArray; u8 *teamBadgePic; teamBadgeFile = OpenFileAndGetFileDataPtr(sTeamRankBadgeFileName, &gTitleMenuFileArchive); diff --git a/src/code_803D110.c b/src/code_803D110.c index dabddea5e..937591752 100644 --- a/src/code_803D110.c +++ b/src/code_803D110.c @@ -546,7 +546,7 @@ struct DungeonNameFontFileData struct DungeonNamePaletteFileData { - Rgb32 pal[16]; + RGB pal[16]; }; void ShowDungeonNameBanner(void) @@ -1050,7 +1050,7 @@ NAKED void sub_803E02C(void) void sub_803E13C(void) { s32 i; - Rgb32 *pal; + RGB *pal; SetWindowBGColor(); if (gGameOptionsRef->playerGender != 0) diff --git a/src/code_803E724.c b/src/code_803E724.c index f881827b2..c48260830 100644 --- a/src/code_803E724.c +++ b/src/code_803E724.c @@ -37,13 +37,13 @@ struct DungeonPalFile extern struct DungeonPalFile *gDungeonPaletteFile; extern struct DungeonPalFile *gDungeonNameBannerPalette; extern struct DungeonPalFile *gUnknown_202EC94; -extern Rgb32 gUnknown_202ECA4[]; -extern Rgb32 gUnknown_202D058; +extern RGB gUnknown_202ECA4[]; +extern RGB gUnknown_202D058; extern u8 gUnknown_203B40C; extern MenuInputStruct gUnknown_202EE10; extern SpriteOAM gUnknown_202EDDC; -extern const Rgb32 gUnknown_80F62AC; +extern const RGB gUnknown_80F62AC; extern const struct UnkTextStruct2 gUnknown_80F62B0[]; extern const struct UnkTextStruct2 gUnknown_80F6310[]; extern const struct UnkTextStruct2 gUnknown_80F6370[]; @@ -85,7 +85,7 @@ void sub_803FF18(s32 a0, u16 *a1, bool8 a2); void sub_803E874(bool8 r10, s32 r9) { s32 i, index, count; - const Rgb32 *color; + const RGB *color; color = gDungeonPaletteFile->unk4; SetBGPaletteBufferColorRGB(0, &gUnknown_80F62AC, gUnknown_202EDC8, gDungeon->colorRamp); @@ -138,7 +138,7 @@ void sub_803E874(bool8 r10, s32 r9) void BgColorCallNullsub4(void) { s32 i, index, count; - const Rgb32 *color; + const RGB *color; color = ((struct DungeonPalFile*) gDungeon->paletFile)->unk4; index = 256; @@ -153,7 +153,7 @@ void BgColorCallNullsub4(void) void sub_803EA10(void) { s32 i, index, count; - const Rgb32 *color; + const RGB *color; color= gDungeonPaletteFile->unk4; SetBGPaletteBufferColorRGB(0, &gUnknown_80F62AC, gUnknown_202EDC8, gDungeon->colorRamp); diff --git a/src/code_8042B34.c b/src/code_8042B34.c index b4019b80c..e2fe1701c 100644 --- a/src/code_8042B34.c +++ b/src/code_8042B34.c @@ -416,7 +416,7 @@ void xxx_dungeon_8042F6C(struct UnkStruct_xxx_dungeon_8042F6C *r8) bool8 r9; bool8 r10; u8 sp; - Rgb32 colorArray; + RGB colorArray; gUnknown_203B40C = 0; r6 = r8->unk8; diff --git a/src/game_options.c b/src/game_options.c index aeb8f349c..9158f5231 100644 --- a/src/game_options.c +++ b/src/game_options.c @@ -191,7 +191,7 @@ void ReadGameOptions(struct unkStruct_8094924 *param_1) void SetWindowBGColor(void) { - struct Rgb32 winColors[] = { + struct RGB winColors[] = { {0x20, 0x48, 0x68}, // Blue {0x80, 0x38, 0x20}, // Red {0x28, 0x80, 0x48}, // Green diff --git a/src/load_screen.c b/src/load_screen.c index c8c73ea1f..cd2094511 100644 --- a/src/load_screen.c +++ b/src/load_screen.c @@ -369,7 +369,7 @@ void DrawLoadScreenText(void) struct ClmkFileData { /* 0x0 */ u32 *pics; - /* 0x4 */ Rgb32 *palette; + /* 0x4 */ RGB *palette; }; void sub_80397B4(void)