From 75e11a716f5a67aa1cb0be71bec5b4a10025d6da Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 06:33:44 -0700 Subject: [PATCH 01/11] Identify unk_02002F38 -> palette --- include/battle/healthbar.h | 3 +- include/battle/ov16_0223DF00.h | 2 +- include/battle/ov16_0226DB7C.h | 3 +- include/battle/ov16_0226DE44.h | 3 +- include/battle/party_gauge.h | 3 +- include/battle/struct_ov16_02264408.h | 2 +- include/inlines.h | 2 +- include/overlay011/ov11_0221F800.h | 2 +- include/overlay012/ov12_0221FC20.h | 2 +- include/overlay012/ov12_02225864.h | 3 +- .../overlay012/struct_ov12_02223764_sub1.h | 3 +- include/overlay012/struct_ov12_0223595C.h | 2 +- include/overlay012/struct_ov12_02237728.h | 3 +- include/overlay013/struct_ov13_022213F0.h | 2 +- include/overlay013/struct_ov13_02227244.h | 2 +- include/overlay017/ov17_0223F118.h | 2 +- include/overlay017/ov17_022413D8.h | 3 +- include/overlay017/ov17_02252AB0.h | 3 +- include/overlay017/struct_ov17_0223F744.h | 3 +- include/overlay017/struct_ov17_0223F88C.h | 2 +- include/overlay017/struct_ov17_0224145C.h | 3 +- include/overlay017/struct_ov17_022476F8.h | 2 +- include/overlay017/struct_ov17_0224A1EC.h | 2 +- include/overlay017/struct_ov17_022507C4.h | 2 +- include/overlay021/struct_ov21_021E8E0C.h | 2 +- include/overlay062/struct_ov62_0223118C.h | 2 +- .../overlay062/struct_ov62_02246BF4_sub2.h | 2 +- include/overlay063/ov63_0222AE60.h | 3 +- include/overlay063/ov63_0222CCE4.h | 3 +- include/overlay076/ov76_0223B870.h | 2 +- include/overlay076/struct_ov76_0223C398.h | 2 +- include/overlay099/struct_ov99_021D2CB0.h | 2 +- include/overlay100/struct_ov100_021D46C8.h | 2 +- include/overlay104/ov104_0223D768.h | 3 +- include/overlay104/ov104_0223D9E4.h | 3 +- include/overlay104/struct_ov104_0223C4CC.h | 2 +- include/overlay116/struct_ov116_022649E4.h | 2 +- include/overlay117/struct_ov117_02261280.h | 2 +- include/overlay119/ov119_021D0D80.h | 2 +- include/overlay119/struct_ov119_021D17B8.h | 2 +- include/{unk_02002F38.h => palette.h} | 43 +++++++++++++++++-- include/pokemon.h | 2 +- include/struct_decls/struct_02002F38_decl.h | 6 --- include/struct_defs/battle_system.h | 2 +- include/struct_defs/struct_020032D0.h | 13 ------ include/struct_defs/struct_0200330C.h | 16 ------- include/struct_defs/struct_0207A778.h | 2 +- include/struct_defs/struct_0207AE68_t.h | 2 +- include/struct_defs/struct_02089688_sub1.h | 2 +- include/struct_defs/struct_0208B878_sub1.h | 3 +- include/unk_0200C6E4.h | 2 +- include/unk_0201567C.h | 2 +- include/unk_0207C908.h | 3 +- include/unk_0208B284.h | 3 +- platinum.us/main.lsf | 2 +- src/battle/battle_display.c | 3 +- src/battle/battle_io_command.c | 2 +- src/battle/battle_script.c | 3 +- src/battle/healthbar.c | 3 +- src/battle/ov16_0223B140.c | 2 +- src/battle/ov16_0223DF00.c | 3 +- src/battle/ov16_02268520.c | 2 +- src/battle/ov16_0226871C.c | 3 +- src/battle/ov16_0226DB7C.c | 2 +- src/battle/ov16_0226DE44.c | 2 +- src/battle/party_gauge.c | 2 +- src/meson.build | 2 +- src/overlay005/encounter_effect.c | 2 +- src/overlay005/ov5_021F007C.c | 2 +- src/overlay010/ov10_0221F800.c | 3 +- src/overlay011/ov11_0221F800.c | 4 +- src/overlay012/ov12_0221FC20.c | 3 +- src/overlay012/ov12_02225864.c | 3 +- src/overlay012/ov12_02226B84.c | 3 +- src/overlay012/ov12_0222AC70.c | 3 +- src/overlay012/ov12_0222E91C.c | 2 +- src/overlay012/ov12_0222F700.c | 3 +- src/overlay012/ov12_02234E44.c | 2 +- src/overlay012/ov12_02235E94.c | 2 +- src/overlay013/ov13_0221FC20.c | 2 +- src/overlay013/ov13_02225710.c | 2 +- src/overlay013/ov13_022264F4.c | 2 +- src/overlay013/ov13_02227BDC.c | 2 +- src/overlay017/ov17_0223B140.c | 2 +- src/overlay017/ov17_0223CB1C.c | 2 +- src/overlay017/ov17_0223DAD0.c | 2 +- src/overlay017/ov17_0223F118.c | 2 +- src/overlay017/ov17_0223F7E4.c | 3 +- src/overlay017/ov17_022413D8.c | 3 +- src/overlay017/ov17_02247A48.c | 2 +- src/overlay017/ov17_022492DC.c | 2 +- src/overlay017/ov17_0224A0FC.c | 2 +- src/overlay017/ov17_0224CFB8.c | 2 +- src/overlay017/ov17_0224F4D4.c | 2 +- src/overlay017/ov17_02250744.c | 2 +- src/overlay017/ov17_02252AB0.c | 2 +- src/overlay021/ov21_021E737C.c | 2 +- src/overlay021/ov21_021E8D48.c | 3 +- src/overlay062/ov62_0222F2C0.c | 2 +- src/overlay062/ov62_022300D8.c | 3 +- src/overlay062/ov62_02231690.c | 3 +- src/overlay062/ov62_02234A10.c | 2 +- src/overlay062/ov62_02235278.c | 2 +- src/overlay062/ov62_02235E64.c | 2 +- src/overlay062/ov62_02236CBC.c | 3 +- src/overlay062/ov62_02237D24.c | 2 +- src/overlay062/ov62_02239D60.c | 3 +- src/overlay062/ov62_0223CAEC.c | 2 +- src/overlay062/ov62_0223DFA8.c | 2 +- src/overlay062/ov62_02241204.c | 2 +- src/overlay062/ov62_02246B00.c | 2 +- src/overlay062/ov62_02247D74.c | 2 +- src/overlay063/ov63_0222AE60.c | 3 +- src/overlay063/ov63_0222CCE4.c | 3 +- src/overlay073/ov73_021D0D80.c | 2 +- src/overlay073/ov73_021D3250.c | 2 +- src/overlay075/ov75_021D0D80.c | 3 +- src/overlay076/ov76_0223B140.c | 2 +- src/overlay076/ov76_0223B870.c | 3 +- src/overlay076/ov76_0223D338.c | 2 +- src/overlay099/ov99_021D0D80.c | 2 +- src/overlay099/ov99_021D1A54.c | 2 +- src/overlay099/ov99_021D2E28.c | 2 +- src/overlay099/ov99_021D340C.c | 2 +- src/overlay099/ov99_021D4134.c | 2 +- src/overlay100/ov100_021D0D80.c | 2 +- src/overlay100/ov100_021D13E4.c | 3 +- src/overlay100/ov100_021D1C44.c | 3 +- src/overlay100/ov100_021D2F0C.c | 3 +- src/overlay100/ov100_021D46C8.c | 2 +- src/overlay104/ov104_0222FBE4.c | 3 +- src/overlay104/ov104_02231F74.c | 3 +- src/overlay104/ov104_02237378.c | 2 +- src/overlay104/ov104_02237DD8.c | 2 +- src/overlay104/ov104_0223C2D4.c | 2 +- src/overlay104/ov104_0223D768.c | 2 +- src/overlay104/ov104_0223D9E4.c | 3 +- src/overlay104/ov104_0223DC7C.c | 3 +- src/overlay105/ov105_02241AE0.c | 3 +- src/overlay106/ov106_02241AE0.c | 3 +- src/overlay107/ov107_02241AE0.c | 3 +- src/overlay107/ov107_02245EB0.c | 3 +- src/overlay108/ov108_02241AE0.c | 3 +- src/overlay109/ov109_021D0D80.c | 3 +- src/overlay110/ov110_021D0D80.c | 3 +- src/overlay111/ov111_021D0D80.c | 3 +- src/overlay112/ov112_0225C700.c | 2 +- src/overlay113/ov113_0225C700.c | 3 +- src/overlay116/ov116_022604C4.c | 2 +- src/overlay116/ov116_02261870.c | 3 +- src/overlay116/ov116_0226432C.c | 3 +- src/overlay117/ov117_02260668.c | 2 +- src/overlay117/ov117_022626B0.c | 2 +- src/overlay117/ov117_02263AF0.c | 2 +- src/overlay119/ov119_021D0D80.c | 3 +- src/overlay119/ov119_021D191C.c | 2 +- src/{unk_02002F38.c => palette.c} | 23 +--------- src/pokemon.c | 2 +- src/unk_0200762C.c | 2 +- src/unk_0200C6E4.c | 3 +- src/unk_0201567C.c | 4 +- src/unk_0207AE68.c | 2 +- src/unk_0207C908.c | 2 +- src/unk_020890F4.c | 2 +- src/unk_02089604.c | 2 +- src/unk_0208A3F4.c | 3 +- src/unk_0208B284.c | 2 +- src/unk_02097B18.c | 2 +- src/unk_02098218.c | 2 +- 169 files changed, 217 insertions(+), 277 deletions(-) rename include/{unk_02002F38.h => palette.h} (72%) delete mode 100644 include/struct_decls/struct_02002F38_decl.h delete mode 100644 include/struct_defs/struct_020032D0.h delete mode 100644 include/struct_defs/struct_0200330C.h rename src/{unk_02002F38.c => palette.c} (97%) diff --git a/include/battle/healthbar.h b/include/battle/healthbar.h index 939e9d7914..f7490b116f 100644 --- a/include/battle/healthbar.h +++ b/include/battle/healthbar.h @@ -2,13 +2,14 @@ #define POKEPLATINUM_OV16_02266F1C_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "battle/struct_ov16_022674C4.h" +#include "palette.h" + #define HEALTHBAR_INFO_NONE 0 #define HEALTHBAR_INFO_HP_GAUGE (1 << 0) #define HEALTHBAR_INFO_CURRENT_HP (1 << 1) diff --git a/include/battle/ov16_0223DF00.h b/include/battle/ov16_0223DF00.h index b9251e6091..87f1b46876 100644 --- a/include/battle/ov16_0223DF00.h +++ b/include/battle/ov16_0223DF00.h @@ -7,7 +7,6 @@ #include "struct_decls/pokedexdata_decl.h" #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" @@ -32,6 +31,7 @@ #include "bg_window.h" #include "game_options.h" #include "message.h" +#include "palette.h" #include "pokemon.h" #include "strbuf.h" #include "string_template.h" diff --git a/include/battle/ov16_0226DB7C.h b/include/battle/ov16_0226DB7C.h index cde1f9d8ed..58df2ce9c9 100644 --- a/include/battle/ov16_0226DB7C.h +++ b/include/battle/ov16_0226DB7C.h @@ -1,12 +1,13 @@ #ifndef POKEPLATINUM_OV16_0226DB7C_H #define POKEPLATINUM_OV16_0226DB7C_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "battle/struct_ov16_0226DC24_decl.h" +#include "palette.h" + void ov16_0226DB7C(SpriteRenderer *param0, SpriteGfxHandler *param1, PaletteData *param2, int param3, u32 param4, u32 param5, u32 param6, u32 param7); void ov16_0226DBFC(SpriteGfxHandler *param0, u32 param1, u32 param2, u32 param3, u32 param4); UnkStruct_ov16_0226DC24 *ov16_0226DC24(SpriteRenderer *param0, SpriteGfxHandler *param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8); diff --git a/include/battle/ov16_0226DE44.h b/include/battle/ov16_0226DE44.h index 11030c2d95..d884ea41e5 100644 --- a/include/battle/ov16_0226DE44.h +++ b/include/battle/ov16_0226DE44.h @@ -1,12 +1,13 @@ #ifndef POKEPLATINUM_OV16_0226DE44_H #define POKEPLATINUM_OV16_0226DE44_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "battle/struct_ov16_0226DEEC_decl.h" +#include "palette.h" + void ov16_0226DE44(SpriteRenderer *param0, SpriteGfxHandler *param1, u32 param2, PaletteData *param3, u32 param4, u32 param5, u32 param6, u32 param7); void ov16_0226DEC4(SpriteGfxHandler *param0, u32 param1, u32 param2, u32 param3, u32 param4); UnkStruct_ov16_0226DEEC *ov16_0226DEEC(SpriteRenderer *param0, SpriteGfxHandler *param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8); diff --git a/include/battle/party_gauge.h b/include/battle/party_gauge.h index c144aee84d..0d77d518b0 100644 --- a/include/battle/party_gauge.h +++ b/include/battle/party_gauge.h @@ -1,12 +1,13 @@ #ifndef POKEPLATINUM_BATTLE_PARTY_GAUGE_H #define POKEPLATINUM_BATTLE_PARTY_GAUGE_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "battle/struct_ov16_0226D160_decl.h" +#include "palette.h" + enum PartyGaugeSide { PARTY_GAUGE_OURS, PARTY_GAUGE_THEIRS, diff --git a/include/battle/struct_ov16_02264408.h b/include/battle/struct_ov16_02264408.h index 80a7640708..c320b5274a 100644 --- a/include/battle/struct_ov16_02264408.h +++ b/include/battle/struct_ov16_02264408.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_STRUCT_OV16_02264408_H #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_defs/chatot_cry.h" @@ -10,6 +9,7 @@ #include "battle/struct_ov16_02264408_sub1.h" #include "bg_window.h" +#include "palette.h" typedef struct { SpriteRenderer *unk_00; diff --git a/include/inlines.h b/include/inlines.h index 6f707affc4..e10b68c947 100644 --- a/include/inlines.h +++ b/include/inlines.h @@ -15,10 +15,10 @@ #include "field_script_context.h" #include "heap.h" #include "map_header.h" +#include "palette.h" #include "script_manager.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0201D15C.h" #include "unk_0206A8DC.h" diff --git a/include/overlay011/ov11_0221F800.h b/include/overlay011/ov11_0221F800.h index 92bd8c43b7..c5c4dd97ad 100644 --- a/include/overlay011/ov11_0221F800.h +++ b/include/overlay011/ov11_0221F800.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_OV11_0221F800_H #define POKEPLATINUM_OV11_0221F800_H -#include "struct_decls/struct_02002F38_decl.h" +#include "palette.h" const u16 *ov11_0221F800(int param0); void ov11_0221F81C(PaletteData *param0, int param1, int param2, int param3, int param4); diff --git a/include/overlay012/ov12_0221FC20.h b/include/overlay012/ov12_0221FC20.h index ea5821b03f..10425677c2 100644 --- a/include/overlay012/ov12_0221FC20.h +++ b/include/overlay012/ov12_0221FC20.h @@ -4,7 +4,6 @@ #include "struct_decls/battle_system.h" #include "struct_decls/cell_actor_data.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02014014_decl.h" @@ -19,6 +18,7 @@ #include "overlay012/struct_ov12_022380DC.h" #include "bg_window.h" +#include "palette.h" #include "spl.h" #include "sys_task_manager.h" diff --git a/include/overlay012/ov12_02225864.h b/include/overlay012/ov12_02225864.h index e586f5570b..9556fcd89a 100644 --- a/include/overlay012/ov12_02225864.h +++ b/include/overlay012/ov12_02225864.h @@ -3,7 +3,6 @@ #include "struct_decls/cell_actor_data.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "overlay012/funcptr_ov12_02226274.h" #include "overlay012/struct_ov12_0221FCDC_decl.h" @@ -15,6 +14,8 @@ #include "overlay012/struct_ov12_0222660C_decl.h" #include "overlay012/struct_ov12_022267D4_decl.h" +#include "palette.h" + void ov12_02225864(int param0, int param1, s16 *param2, s16 *param3); void ov12_02225898(UnkStruct_ov12_0221FCDC *param0, int param1, s16 *param2, s16 *param3); s16 ov12_022258E0(UnkStruct_ov12_0221FCDC *param0, int param1, int param2); diff --git a/include/overlay012/struct_ov12_02223764_sub1.h b/include/overlay012/struct_ov12_02223764_sub1.h index 9ac5e719d7..26b04171e7 100644 --- a/include/overlay012/struct_ov12_02223764_sub1.h +++ b/include/overlay012/struct_ov12_02223764_sub1.h @@ -1,10 +1,11 @@ #ifndef POKEPLATINUM_STRUCT_OV12_02223764_SUB1_H #define POKEPLATINUM_STRUCT_OV12_02223764_SUB1_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" +#include "palette.h" + typedef struct { SpriteRenderer *unk_00; SpriteGfxHandler *unk_04; diff --git a/include/overlay012/struct_ov12_0223595C.h b/include/overlay012/struct_ov12_0223595C.h index d3b4b418e1..aadb41572c 100644 --- a/include/overlay012/struct_ov12_0223595C.h +++ b/include/overlay012/struct_ov12_0223595C.h @@ -1,13 +1,13 @@ #ifndef POKEPLATINUM_STRUCT_OV12_0223595C_H #define POKEPLATINUM_STRUCT_OV12_0223595C_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "overlay012/struct_ov12_0221FCDC_decl.h" #include "bg_window.h" +#include "palette.h" typedef struct { u8 unk_00; diff --git a/include/overlay012/struct_ov12_02237728.h b/include/overlay012/struct_ov12_02237728.h index b79bf7da3d..43528987d2 100644 --- a/include/overlay012/struct_ov12_02237728.h +++ b/include/overlay012/struct_ov12_02237728.h @@ -2,9 +2,10 @@ #define POKEPLATINUM_STRUCT_OV12_02237728_H #include "struct_decls/battle_system.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" +#include "palette.h" + typedef struct BallThrow { int type; int heapID; diff --git a/include/overlay013/struct_ov13_022213F0.h b/include/overlay013/struct_ov13_022213F0.h index dbe07fa40b..3a66aef509 100644 --- a/include/overlay013/struct_ov13_022213F0.h +++ b/include/overlay013/struct_ov13_022213F0.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_STRUCT_OV13_022213F0_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -12,6 +11,7 @@ #include "bg_window.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" diff --git a/include/overlay013/struct_ov13_02227244.h b/include/overlay013/struct_ov13_02227244.h index a48e9c6544..fbad6dd8fd 100644 --- a/include/overlay013/struct_ov13_02227244.h +++ b/include/overlay013/struct_ov13_02227244.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_STRUCT_OV13_02227244_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -13,6 +12,7 @@ #include "bag.h" #include "bg_window.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" diff --git a/include/overlay017/ov17_0223F118.h b/include/overlay017/ov17_0223F118.h index dd9aa71359..69d22a347d 100644 --- a/include/overlay017/ov17_0223F118.h +++ b/include/overlay017/ov17_0223F118.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_OV17_0223F118_H #define POKEPLATINUM_OV17_0223F118_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012744_decl.h" @@ -13,6 +12,7 @@ #include "overlay017/struct_ov17_0223F744.h" #include "bg_window.h" +#include "palette.h" #include "strbuf.h" #include "text.h" diff --git a/include/overlay017/ov17_022413D8.h b/include/overlay017/ov17_022413D8.h index 1f5e495752..be9090b67d 100644 --- a/include/overlay017/ov17_022413D8.h +++ b/include/overlay017/ov17_022413D8.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_OV17_022413D8_H #define POKEPLATINUM_OV17_022413D8_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -15,6 +14,8 @@ #include "overlay017/struct_ov17_02246F24.h" #include "overlay017/struct_ov17_022472F8.h" +#include "palette.h" + void ov17_022413D8(void); void ov17_022413E4(UnkStruct_ov17_02246F24 *param0, int param1, int param2); void ov17_02241428(UnkStruct_ov17_02246F24 *param0); diff --git a/include/overlay017/ov17_02252AB0.h b/include/overlay017/ov17_02252AB0.h index 2d0f7abbc1..c3f4275671 100644 --- a/include/overlay017/ov17_02252AB0.h +++ b/include/overlay017/ov17_02252AB0.h @@ -1,12 +1,13 @@ #ifndef POKEPLATINUM_OV17_02252AB0_H #define POKEPLATINUM_OV17_02252AB0_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "overlay017/struct_ov17_02252B48_decl.h" +#include "palette.h" + void ov17_02252AB0(SpriteRenderer *param0, SpriteGfxHandler *param1, PaletteData *param2, u32 param3, u32 param4, u32 param5, u32 param6); void ov17_02252B20(SpriteGfxHandler *param0, u32 param1, u32 param2, u32 param3, u32 param4); UnkStruct_ov17_02252B48 *ov17_02252B48(SpriteRenderer *param0, SpriteGfxHandler *param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8); diff --git a/include/overlay017/struct_ov17_0223F744.h b/include/overlay017/struct_ov17_0223F744.h index 1632ebd52e..7135354ae4 100644 --- a/include/overlay017/struct_ov17_0223F744.h +++ b/include/overlay017/struct_ov17_0223F744.h @@ -1,8 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV17_0223F744_H #define POKEPLATINUM_STRUCT_OV17_0223F744_H -#include "struct_decls/struct_02002F38_decl.h" - +#include "palette.h" #include "sys_task_manager.h" typedef struct { diff --git a/include/overlay017/struct_ov17_0223F88C.h b/include/overlay017/struct_ov17_0223F88C.h index b9cc1061ba..60f81c7767 100644 --- a/include/overlay017/struct_ov17_0223F88C.h +++ b/include/overlay017/struct_ov17_0223F88C.h @@ -3,7 +3,6 @@ #include "struct_decls/cell_actor_data.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -16,6 +15,7 @@ #include "bg_window.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" diff --git a/include/overlay017/struct_ov17_0224145C.h b/include/overlay017/struct_ov17_0224145C.h index 32cde3488c..94c86e270c 100644 --- a/include/overlay017/struct_ov17_0224145C.h +++ b/include/overlay017/struct_ov17_0224145C.h @@ -1,8 +1,7 @@ #ifndef POKEPLATINUM_STRUCT_OV17_0224145C_H #define POKEPLATINUM_STRUCT_OV17_0224145C_H -#include "struct_decls/struct_02002F38_decl.h" - +#include "palette.h" #include "sys_task_manager.h" typedef struct { diff --git a/include/overlay017/struct_ov17_022476F8.h b/include/overlay017/struct_ov17_022476F8.h index b3ca3bb7f4..35753a7256 100644 --- a/include/overlay017/struct_ov17_022476F8.h +++ b/include/overlay017/struct_ov17_022476F8.h @@ -3,7 +3,6 @@ #include "struct_decls/cell_actor_data.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -14,6 +13,7 @@ #include "bg_window.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" diff --git a/include/overlay017/struct_ov17_0224A1EC.h b/include/overlay017/struct_ov17_0224A1EC.h index 8611b21032..a4c3f55129 100644 --- a/include/overlay017/struct_ov17_0224A1EC.h +++ b/include/overlay017/struct_ov17_0224A1EC.h @@ -3,7 +3,6 @@ #include "struct_decls/cell_actor_data.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -24,6 +23,7 @@ #include "bg_window.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" #include "sys_task_manager.h" diff --git a/include/overlay017/struct_ov17_022507C4.h b/include/overlay017/struct_ov17_022507C4.h index 7cede59620..15f31b0583 100644 --- a/include/overlay017/struct_ov17_022507C4.h +++ b/include/overlay017/struct_ov17_022507C4.h @@ -3,7 +3,6 @@ #include "struct_decls/cell_actor_data.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -15,6 +14,7 @@ #include "bg_window.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" #include "sys_task_manager.h" diff --git a/include/overlay021/struct_ov21_021E8E0C.h b/include/overlay021/struct_ov21_021E8E0C.h index e988b6ac93..12eea450b9 100644 --- a/include/overlay021/struct_ov21_021E8E0C.h +++ b/include/overlay021/struct_ov21_021E8E0C.h @@ -1,10 +1,10 @@ #ifndef POKEPLATINUM_STRUCT_OV21_021E8E0C_H #define POKEPLATINUM_STRUCT_OV21_021E8E0C_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "bg_window.h" +#include "palette.h" #include "pokemon.h" typedef struct { diff --git a/include/overlay062/struct_ov62_0223118C.h b/include/overlay062/struct_ov62_0223118C.h index 65ad042d32..c4cad25cfb 100644 --- a/include/overlay062/struct_ov62_0223118C.h +++ b/include/overlay062/struct_ov62_0223118C.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_OV62_0223118C_H #define POKEPLATINUM_STRUCT_OV62_0223118C_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" @@ -17,6 +16,7 @@ #include "bg_window.h" #include "message.h" +#include "palette.h" #include "touch_screen.h" typedef struct { diff --git a/include/overlay062/struct_ov62_02246BF4_sub2.h b/include/overlay062/struct_ov62_02246BF4_sub2.h index 183e6d83d8..349ee7505a 100644 --- a/include/overlay062/struct_ov62_02246BF4_sub2.h +++ b/include/overlay062/struct_ov62_02246BF4_sub2.h @@ -1,13 +1,13 @@ #ifndef POKEPLATINUM_STRUCT_OV62_02246BF4_SUB2_H #define POKEPLATINUM_STRUCT_OV62_02246BF4_SUB2_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "bg_window.h" +#include "palette.h" #include "touch_screen.h" typedef struct { diff --git a/include/overlay063/ov63_0222AE60.h b/include/overlay063/ov63_0222AE60.h index 6a3e6df170..13460fdba0 100644 --- a/include/overlay063/ov63_0222AE60.h +++ b/include/overlay063/ov63_0222AE60.h @@ -1,13 +1,12 @@ #ifndef POKEPLATINUM_OV63_0222AE60_H #define POKEPLATINUM_OV63_0222AE60_H -#include "struct_decls/struct_02002F38_decl.h" - #include "overlay063/struct_ov63_0222AE60_decl.h" #include "overlay063/struct_ov63_0222BB38_decl.h" #include "overlay064/struct_ov64_022302EC.h" #include "cell_actor.h" +#include "palette.h" UnkStruct_ov63_0222AE60 *ov63_0222AE60(CellActorCollection *param0, PaletteData *param1, u32 param2, u32 param3); void ov63_0222AF14(UnkStruct_ov63_0222AE60 *param0); diff --git a/include/overlay063/ov63_0222CCE4.h b/include/overlay063/ov63_0222CCE4.h index 8f19ed8507..3b373f6054 100644 --- a/include/overlay063/ov63_0222CCE4.h +++ b/include/overlay063/ov63_0222CCE4.h @@ -1,14 +1,13 @@ #ifndef POKEPLATINUM_OV63_0222CCE4_H #define POKEPLATINUM_OV63_0222CCE4_H -#include "struct_decls/struct_02002F38_decl.h" - #include "overlay063/struct_ov63_0222BEC0_decl.h" #include "overlay063/struct_ov63_0222CC3C.h" #include "overlay063/struct_ov63_0222CD2C.h" #include "overlay063/struct_ov63_0222CE44.h" #include "cell_actor.h" +#include "palette.h" UnkStruct_ov63_0222CD2C *ov63_0222CCE4(CellActorCollection *param0, PaletteData *param1, u32 param2, u32 param3, u32 param4); UnkStruct_ov63_0222CD2C *ov63_0222CD2C(CellActorCollection *param0, PaletteData *param1, u32 param2, u32 param3, int param4, u32 param5, u32 param6); diff --git a/include/overlay076/ov76_0223B870.h b/include/overlay076/ov76_0223B870.h index 65ce966112..7fb8553367 100644 --- a/include/overlay076/ov76_0223B870.h +++ b/include/overlay076/ov76_0223B870.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_OV76_0223B870_H #define POKEPLATINUM_OV76_0223B870_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -11,6 +10,7 @@ #include "overlay076/struct_ov76_0223DE00.h" #include "bg_window.h" +#include "palette.h" void ov76_0223B8A8(UnkStruct_ov76_0223DE00 *param0); void ov76_0223B8C4(UnkStruct_ov76_0223DE00 *param0); diff --git a/include/overlay076/struct_ov76_0223C398.h b/include/overlay076/struct_ov76_0223C398.h index 23dba338eb..a47c5c62e4 100644 --- a/include/overlay076/struct_ov76_0223C398.h +++ b/include/overlay076/struct_ov76_0223C398.h @@ -5,7 +5,6 @@ #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/sprite_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -21,6 +20,7 @@ #include "overlay022/struct_ov22_02258A48.h" #include "bg_window.h" +#include "palette.h" #include "touch_screen.h" typedef struct { diff --git a/include/overlay099/struct_ov99_021D2CB0.h b/include/overlay099/struct_ov99_021D2CB0.h index 5274d36cc0..eb514c3fce 100644 --- a/include/overlay099/struct_ov99_021D2CB0.h +++ b/include/overlay099/struct_ov99_021D2CB0.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_STRUCT_OV99_021D2CB0_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -18,6 +17,7 @@ #include "camera.h" #include "easy3d_object.h" #include "message.h" +#include "palette.h" #include "sys_task_manager.h" typedef struct { diff --git a/include/overlay100/struct_ov100_021D46C8.h b/include/overlay100/struct_ov100_021D46C8.h index e278eaea96..59d9dca53f 100644 --- a/include/overlay100/struct_ov100_021D46C8.h +++ b/include/overlay100/struct_ov100_021D46C8.h @@ -4,7 +4,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -18,6 +17,7 @@ #include "bg_window.h" #include "camera.h" #include "message.h" +#include "palette.h" typedef struct { NARC *unk_00; diff --git a/include/overlay104/ov104_0223D768.h b/include/overlay104/ov104_0223D768.h index 5e7ab554bc..84d93604cd 100644 --- a/include/overlay104/ov104_0223D768.h +++ b/include/overlay104/ov104_0223D768.h @@ -2,11 +2,12 @@ #define POKEPLATINUM_OV104_0223D768_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" +#include "palette.h" + void ov104_0223D768(SpriteRenderer *param0, SpriteGfxHandler *param1, NARC *param2, PaletteData *param3, u16 param4); void ov104_0223D7EC(SpriteGfxHandler *param0, u16 param1); CellActorData *ov104_0223D828(SpriteRenderer *param0, SpriteGfxHandler *param1, u16 param2); diff --git a/include/overlay104/ov104_0223D9E4.h b/include/overlay104/ov104_0223D9E4.h index 345d23e2da..82d9b20ba0 100644 --- a/include/overlay104/ov104_0223D9E4.h +++ b/include/overlay104/ov104_0223D9E4.h @@ -1,11 +1,10 @@ #ifndef POKEPLATINUM_OV104_0223D9E4_H #define POKEPLATINUM_OV104_0223D9E4_H -#include "struct_decls/struct_02002F38_decl.h" - #include "overlay104/struct_ov104_0223DA28_decl.h" #include "bg_window.h" +#include "palette.h" UnkStruct_ov104_0223DA28 *ov104_0223D9E4(BgConfig *param0, PaletteData *param1); void ov104_0223DA28(UnkStruct_ov104_0223DA28 *param0); diff --git a/include/overlay104/struct_ov104_0223C4CC.h b/include/overlay104/struct_ov104_0223C4CC.h index ab38c62d4c..29139dfc97 100644 --- a/include/overlay104/struct_ov104_0223C4CC.h +++ b/include/overlay104/struct_ov104_0223C4CC.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_STRUCT_OV104_0223C4CC_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0209B75C_decl.h" @@ -21,6 +20,7 @@ #include "overlay104/struct_ov104_0223D5F0_decl.h" #include "bg_window.h" +#include "palette.h" #include "sys_task_manager.h" typedef struct UnkStruct_ov104_0223C4CC_t { diff --git a/include/overlay116/struct_ov116_022649E4.h b/include/overlay116/struct_ov116_022649E4.h index 3aaa679ee2..a1d353cd33 100644 --- a/include/overlay116/struct_ov116_022649E4.h +++ b/include/overlay116/struct_ov116_022649E4.h @@ -3,7 +3,6 @@ #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -13,6 +12,7 @@ #include "bg_window.h" #include "camera.h" +#include "palette.h" typedef struct { NARC *unk_00; diff --git a/include/overlay117/struct_ov117_02261280.h b/include/overlay117/struct_ov117_02261280.h index aa539247eb..47d9ea71d0 100644 --- a/include/overlay117/struct_ov117_02261280.h +++ b/include/overlay117/struct_ov117_02261280.h @@ -3,7 +3,6 @@ #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012744_decl.h" @@ -32,6 +31,7 @@ #include "bg_window.h" #include "camera.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" #include "sys_task_manager.h" diff --git a/include/overlay119/ov119_021D0D80.h b/include/overlay119/ov119_021D0D80.h index da6d23e7d0..92e051b33e 100644 --- a/include/overlay119/ov119_021D0D80.h +++ b/include/overlay119/ov119_021D0D80.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_OV119_021D0D80_H #define POKEPLATINUM_OV119_021D0D80_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02014014_decl.h" #include "struct_defs/struct_0207C690.h" @@ -11,6 +10,7 @@ #include "overlay119/struct_ov119_021D1930.h" #include "bg_window.h" +#include "palette.h" #include "pokemon.h" void ov119_021D0D80(void); diff --git a/include/overlay119/struct_ov119_021D17B8.h b/include/overlay119/struct_ov119_021D17B8.h index 83932b4625..99998b8e14 100644 --- a/include/overlay119/struct_ov119_021D17B8.h +++ b/include/overlay119/struct_ov119_021D17B8.h @@ -3,7 +3,6 @@ #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" @@ -14,6 +13,7 @@ #include "overlay119/struct_ov119_021D14DC.h" #include "bg_window.h" +#include "palette.h" typedef struct { BgConfig *unk_00; diff --git a/include/unk_02002F38.h b/include/palette.h similarity index 72% rename from include/unk_02002F38.h rename to include/palette.h index aeb10d65ad..0c48d7a1f2 100644 --- a/include/unk_02002F38.h +++ b/include/palette.h @@ -1,7 +1,42 @@ -#ifndef POKEPLATINUM_UNK_02002F38_H -#define POKEPLATINUM_UNK_02002F38_H +#ifndef POKEPLATINUM_PALETTE_H +#define POKEPLATINUM_PALETTE_H -#include "struct_decls/struct_02002F38_decl.h" +typedef struct { + u16 unk_00_0 : 5; + u16 unk_00_5 : 5; + u16 unk_00_10 : 5; + u16 unk_00_15 : 1; +} UnkStruct_0200393C; + +typedef struct { + u16 unk_00; + u16 unk_02_0 : 6; + u16 unk_02_6 : 5; + u16 unk_02_11 : 5; + u16 unk_04_0 : 15; + u16 unk_04_15 : 1; + u16 unk_06_0 : 4; + u16 unk_06_4 : 6; + u16 : 6; +} UnkStruct_0200330C; + +typedef struct { + u16 *unk_00; + u16 *unk_04; + u32 unk_08; + UnkStruct_0200330C unk_0C; +} UnkStruct_020032D0; + +typedef struct PaletteData { + UnkStruct_020032D0 unk_00[14]; + u16 unk_118_0 : 2; + u16 unk_118_2 : 14; + u16 unk_11A_0 : 14; + u16 unk_11A_14 : 1; + u16 unk_11A_15 : 1; + u8 unk_11C; + u8 unk_11D[3]; +} PaletteData; PaletteData *sub_02002F38(int param0); void sub_02002F54(PaletteData *param0); @@ -30,4 +65,4 @@ void sub_02003A2C(PaletteData *param0, int param1, u16 param2, u8 param3, u16 pa void sub_02003A8C(u16 *param0, int param1, int param2, int param3, int param4); void sub_02003B08(PaletteData *param0, u32 param1, u32 param2, u32 param3, int param4, u32 param5, u16 param6, int param7, int param8, int param9); -#endif // POKEPLATINUM_UNK_02002F38_H +#endif // POKEPLATINUM_PALETTE_H diff --git a/include/pokemon.h b/include/pokemon.h index 837f399af4..bdbe4aaa7a 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -10,7 +10,6 @@ #include "struct_decls/cell_actor_data.h" #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -22,6 +21,7 @@ #include "overlay005/struct_ov5_021DE5D0.h" +#include "palette.h" #include "string.h" #include "trainer_info.h" diff --git a/include/struct_decls/struct_02002F38_decl.h b/include/struct_decls/struct_02002F38_decl.h deleted file mode 100644 index da02ed0d28..0000000000 --- a/include/struct_decls/struct_02002F38_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_02002F38_DECL_H -#define POKEPLATINUM_STRUCT_02002F38_DECL_H - -typedef struct UnkStruct_02002F38_t PaletteData; - -#endif // POKEPLATINUM_STRUCT_02002F38_DECL_H diff --git a/include/struct_defs/battle_system.h b/include/struct_defs/battle_system.h index 5e490a1d8f..b02a94916f 100644 --- a/include/struct_defs/battle_system.h +++ b/include/struct_defs/battle_system.h @@ -8,7 +8,6 @@ #include "struct_decls/pokedexdata_decl.h" #include "struct_decls/pokemon_animation_sys_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" @@ -36,6 +35,7 @@ #include "bg_window.h" #include "game_options.h" #include "message.h" +#include "palette.h" #include "poketch_data.h" #include "strbuf.h" #include "string_template.h" diff --git a/include/struct_defs/struct_020032D0.h b/include/struct_defs/struct_020032D0.h deleted file mode 100644 index 9c52490785..0000000000 --- a/include/struct_defs/struct_020032D0.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_020032D0_H -#define POKEPLATINUM_STRUCT_020032D0_H - -#include "struct_defs/struct_0200330C.h" - -typedef struct { - u16 *unk_00; - u16 *unk_04; - u32 unk_08; - UnkStruct_0200330C unk_0C; -} UnkStruct_020032D0; - -#endif // POKEPLATINUM_STRUCT_020032D0_H diff --git a/include/struct_defs/struct_0200330C.h b/include/struct_defs/struct_0200330C.h deleted file mode 100644 index d3d4d70657..0000000000 --- a/include/struct_defs/struct_0200330C.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_0200330C_H -#define POKEPLATINUM_STRUCT_0200330C_H - -typedef struct { - u16 unk_00; - u16 unk_02_0 : 6; - u16 unk_02_6 : 5; - u16 unk_02_11 : 5; - u16 unk_04_0 : 15; - u16 unk_04_15 : 1; - u16 unk_06_0 : 4; - u16 unk_06_4 : 6; - u16 : 6; -} UnkStruct_0200330C; - -#endif // POKEPLATINUM_STRUCT_0200330C_H diff --git a/include/struct_defs/struct_0207A778.h b/include/struct_defs/struct_0207A778.h index 824e5943d4..0ce0dfcf3b 100644 --- a/include/struct_defs/struct_0207A778.h +++ b/include/struct_defs/struct_0207A778.h @@ -1,12 +1,12 @@ #ifndef POKEPLATINUM_STRUCT_0207A778_H #define POKEPLATINUM_STRUCT_0207A778_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02027F8C_decl.h" #include "overlay006/battle_params.h" #include "bg_window.h" +#include "palette.h" typedef struct { BattleParams *unk_00; diff --git a/include/struct_defs/struct_0207AE68_t.h b/include/struct_defs/struct_0207AE68_t.h index 83e511eadc..7cf4c5c361 100644 --- a/include/struct_defs/struct_0207AE68_t.h +++ b/include/struct_defs/struct_0207AE68_t.h @@ -4,7 +4,6 @@ #include "struct_decls/pokedexdata_decl.h" #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_party_decl.h" @@ -18,6 +17,7 @@ #include "game_records.h" #include "message.h" #include "overlay_manager.h" +#include "palette.h" #include "pokemon.h" #include "poketch_data.h" #include "strbuf.h" diff --git a/include/struct_defs/struct_02089688_sub1.h b/include/struct_defs/struct_02089688_sub1.h index 06ee30a1c5..0cbb4bc20c 100644 --- a/include/struct_defs/struct_02089688_sub1.h +++ b/include/struct_defs/struct_02089688_sub1.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_STRUCT_02089688_SUB1_H #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -11,6 +10,7 @@ #include "struct_defs/sprite_manager_allocation.h" #include "bg_window.h" +#include "palette.h" #include "touch_screen.h" typedef struct { diff --git a/include/struct_defs/struct_0208B878_sub1.h b/include/struct_defs/struct_0208B878_sub1.h index 46fe31f209..c5f5309820 100644 --- a/include/struct_defs/struct_0208B878_sub1.h +++ b/include/struct_defs/struct_0208B878_sub1.h @@ -1,11 +1,12 @@ #ifndef POKEPLATINUM_STRUCT_0208B878_SUB1_H #define POKEPLATINUM_STRUCT_0208B878_SUB1_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" +#include "palette.h" + typedef struct { NARC *unk_00; SpriteRenderer *unk_04; diff --git a/include/unk_0200C6E4.h b/include/unk_0200C6E4.h index 3932a93bef..1cd39590f4 100644 --- a/include/unk_0200C6E4.h +++ b/include/unk_0200C6E4.h @@ -7,7 +7,6 @@ #include "constants/palette.h" #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -21,6 +20,7 @@ #include "overlay104/struct_ov104_0224133C.h" #include "cell_actor.h" +#include "palette.h" SpriteRenderer *sub_0200C6E4(int param0); SpriteGfxHandler *sub_0200C704(SpriteRenderer *param0); diff --git a/include/unk_0201567C.h b/include/unk_0201567C.h index b5f94fef44..12e4bb15de 100644 --- a/include/unk_0201567C.h +++ b/include/unk_0201567C.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_UNK_0201567C_H #define POKEPLATINUM_UNK_0201567C_H -#include "struct_decls/struct_02002F38_decl.h" +#include "palette.h" void *sub_0201567C(PaletteData *param0, u16 param1, u16 param2, u32 param3); void sub_02015738(void *param0, u8 param1); diff --git a/include/unk_0207C908.h b/include/unk_0207C908.h index 6f882f5cdd..01ef934b76 100644 --- a/include/unk_0207C908.h +++ b/include/unk_0207C908.h @@ -4,11 +4,12 @@ #include #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" +#include "palette.h" + u32 sub_0207C908(int param0); u32 sub_0207C920(void); u32 sub_0207C924(void); diff --git a/include/unk_0208B284.h b/include/unk_0208B284.h index 77d16a5d91..b715ca211b 100644 --- a/include/unk_0208B284.h +++ b/include/unk_0208B284.h @@ -1,12 +1,13 @@ #ifndef POKEPLATINUM_UNK_0208B284_H #define POKEPLATINUM_UNK_0208B284_H -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/struct_0208B284.h" #include "struct_defs/struct_0208B878.h" +#include "palette.h" + UnkStruct_0208B878 *sub_0208B284(UnkStruct_0208B284 param0, SpriteRenderer *param1, SpriteGfxHandler *param2, PaletteData *param3); void sub_0208B63C(UnkStruct_0208B878 *param0, int param1); BOOL sub_0208B878(UnkStruct_0208B878 *param0, int param1); diff --git a/platinum.us/main.lsf b/platinum.us/main.lsf index 89c09f6d52..2517811c13 100644 --- a/platinum.us/main.lsf +++ b/platinum.us/main.lsf @@ -22,7 +22,7 @@ Static main Object main.nef.p/src_unk_020021B0.c.o Object main.nef.p/src_render_text.c.o Object main.nef.p/src_font.c.o - Object main.nef.p/src_unk_02002F38.c.o + Object main.nef.p/src_palette.c.o Object main.nef.p/src_unk_02003B60.c.o Object main.nef.p/src_unk_020041CC.c.o Object main.nef.p/src_unk_02005474.c.o diff --git a/src/battle/battle_display.c b/src/battle/battle_display.c index 6c39381d8f..4016054486 100644 --- a/src/battle/battle_display.c +++ b/src/battle/battle_display.c @@ -8,7 +8,6 @@ #include "struct_decls/battle_system.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" @@ -131,13 +130,13 @@ #include "message.h" #include "move_table.h" #include "narc.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_0200762C.h" diff --git a/src/battle/battle_io_command.c b/src/battle/battle_io_command.c index 6435ad10cf..35cbef74fb 100644 --- a/src/battle/battle_io_command.c +++ b/src/battle/battle_io_command.c @@ -6,7 +6,6 @@ #include "constants/battle/battle_io.h" #include "struct_decls/battle_system.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -75,6 +74,7 @@ #include "flags.h" #include "heap.h" #include "narc.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "unk_0200762C.h" diff --git a/src/battle/battle_script.c b/src/battle/battle_script.c index b8d1659d7e..212568b8e1 100644 --- a/src/battle/battle_script.c +++ b/src/battle/battle_script.c @@ -14,7 +14,6 @@ #include "struct_decls/battle_system.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -59,6 +58,7 @@ #include "message.h" #include "move_table.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "pokemon_icon.h" @@ -69,7 +69,6 @@ #include "touch_screen.h" #include "trainer_data.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006224.h" #include "unk_0200762C.h" diff --git a/src/battle/healthbar.c b/src/battle/healthbar.c index 2b9e2664b0..efb4acb664 100644 --- a/src/battle/healthbar.c +++ b/src/battle/healthbar.c @@ -6,7 +6,6 @@ #include "constants/heap.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -23,13 +22,13 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "pokemon.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" #include "unk_0201D15C.h" diff --git a/src/battle/ov16_0223B140.c b/src/battle/ov16_0223B140.c index ce981eb0b6..5869a6d175 100644 --- a/src/battle/ov16_0223B140.c +++ b/src/battle/ov16_0223B140.c @@ -52,6 +52,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "render_text.h" @@ -61,7 +62,6 @@ #include "sys_task_manager.h" #include "text.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/battle/ov16_0223DF00.c b/src/battle/ov16_0223DF00.c index 4e5c51703d..b77f81b82b 100644 --- a/src/battle/ov16_0223DF00.c +++ b/src/battle/ov16_0223DF00.c @@ -14,7 +14,6 @@ #include "struct_decls/pokedexdata_decl.h" #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" @@ -55,6 +54,7 @@ #include "heap.h" #include "item.h" #include "message.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "poketch_data.h" @@ -64,7 +64,6 @@ #include "text.h" #include "trainer_data.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_0200F174.h" diff --git a/src/battle/ov16_02268520.c b/src/battle/ov16_02268520.c index 57de02bbe9..d39efe87ed 100644 --- a/src/battle/ov16_02268520.c +++ b/src/battle/ov16_02268520.c @@ -14,7 +14,7 @@ #include "battle/struct_ov16_02268520.h" #include "narc.h" -#include "unk_02002F38.h" +#include "palette.h" #include "unk_0200C6E4.h" static const SpriteTemplate Unk_ov16_022700CC[] = { diff --git a/src/battle/ov16_0226871C.c b/src/battle/ov16_0226871C.c index da520c5818..72970062db 100644 --- a/src/battle/ov16_0226871C.c +++ b/src/battle/ov16_0226871C.c @@ -5,7 +5,6 @@ #include "struct_decls/battle_system.h" #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -42,6 +41,7 @@ #include "message.h" #include "message_util.h" #include "move_table.h" +#include "palette.h" #include "pokemon.h" #include "pokemon_icon.h" #include "render_text.h" @@ -51,7 +51,6 @@ #include "sys_task_manager.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" diff --git a/src/battle/ov16_0226DB7C.c b/src/battle/ov16_0226DB7C.c index 74a94be84c..d7b0c5f3ef 100644 --- a/src/battle/ov16_0226DB7C.c +++ b/src/battle/ov16_0226DB7C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -12,6 +11,7 @@ #include "heap.h" #include "narc.h" +#include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_0200C6E4.h" diff --git a/src/battle/ov16_0226DE44.c b/src/battle/ov16_0226DE44.c index 58f3d4aad3..0c92255b66 100644 --- a/src/battle/ov16_0226DE44.c +++ b/src/battle/ov16_0226DE44.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -12,6 +11,7 @@ #include "heap.h" #include "narc.h" +#include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_0200C6E4.h" diff --git a/src/battle/party_gauge.c b/src/battle/party_gauge.c index f53e8e9d87..0d30011104 100644 --- a/src/battle/party_gauge.c +++ b/src/battle/party_gauge.c @@ -7,7 +7,6 @@ #include "constants/palette.h" #include "consts/sdat.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -22,6 +21,7 @@ #include "enums.h" #include "heap.h" #include "narc.h" +#include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" diff --git a/src/meson.build b/src/meson.build index 9008d53889..be673eee96 100644 --- a/src/meson.build +++ b/src/meson.build @@ -20,7 +20,7 @@ pokeplatinum_c = files( 'unk_020021B0.c', 'render_text.c', 'font.c', - 'unk_02002F38.c', + 'palette.c', 'unk_02003B60.c', 'unk_020041CC.c', 'unk_02005474.c', diff --git a/src/overlay005/encounter_effect.c b/src/overlay005/encounter_effect.c index 212778f151..ad7e0a9716 100644 --- a/src/overlay005/encounter_effect.c +++ b/src/overlay005/encounter_effect.c @@ -33,11 +33,11 @@ #include "gx_layers.h" #include "heap.h" #include "narc.h" +#include "palette.h" #include "pokemon.h" #include "sprite_resource.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_0200679C.h" #include "unk_02006E3C.h" #include "unk_020093B4.h" diff --git a/src/overlay005/ov5_021F007C.c b/src/overlay005/ov5_021F007C.c index 03d6fec50f..2d4cc16460 100644 --- a/src/overlay005/ov5_021F007C.c +++ b/src/overlay005/ov5_021F007C.c @@ -17,9 +17,9 @@ #include "gx_layers.h" #include "heap.h" #include "map_header.h" +#include "palette.h" #include "player_avatar.h" #include "script_manager.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_020508D4.h" diff --git a/src/overlay010/ov10_0221F800.c b/src/overlay010/ov10_0221F800.c index 5ffcfbe289..9e183cb3be 100644 --- a/src/overlay010/ov10_0221F800.c +++ b/src/overlay010/ov10_0221F800.c @@ -5,7 +5,6 @@ #include "struct_decls/font_oam.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" @@ -40,6 +39,7 @@ #include "map_header.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "pokemon_icon.h" @@ -51,7 +51,6 @@ #include "trainer_data.h" #include "trainer_info.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200679C.h" #include "unk_02006E3C.h" diff --git a/src/overlay011/ov11_0221F800.c b/src/overlay011/ov11_0221F800.c index cc08affec7..182ef40bd7 100644 --- a/src/overlay011/ov11_0221F800.c +++ b/src/overlay011/ov11_0221F800.c @@ -3,9 +3,7 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" - -#include "unk_02002F38.h" +#include "palette.h" __attribute__((aligned(4))) const u16 Unk_ov11_0221F94C[] = { 0x75CD, diff --git a/src/overlay012/ov12_0221FC20.c b/src/overlay012/ov12_0221FC20.c index f9e7ea31ff..e2e4dcc3c7 100644 --- a/src/overlay012/ov12_0221FC20.c +++ b/src/overlay012/ov12_0221FC20.c @@ -5,7 +5,6 @@ #include "struct_decls/battle_system.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -42,11 +41,11 @@ #include "heap.h" #include "inlines.h" #include "narc.h" +#include "palette.h" #include "pokemon.h" #include "spl.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" diff --git a/src/overlay012/ov12_02225864.c b/src/overlay012/ov12_02225864.c index 955516fde9..56a4aac377 100644 --- a/src/overlay012/ov12_02225864.c +++ b/src/overlay012/ov12_02225864.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_defs/struct_0200D0F4.h" #include "overlay012/funcptr_ov12_02226274.h" @@ -20,10 +19,10 @@ #include "cell_actor.h" #include "heap.h" #include "inlines.h" +#include "palette.h" #include "screen_scroll_manager.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" #include "unk_0201F834.h" diff --git a/src/overlay012/ov12_02226B84.c b/src/overlay012/ov12_02226B84.c index bddfcf0148..369a715303 100644 --- a/src/overlay012/ov12_02226B84.c +++ b/src/overlay012/ov12_02226B84.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02014014_decl.h" @@ -28,9 +27,9 @@ #include "cell_actor.h" #include "heap.h" #include "inlines.h" +#include "palette.h" #include "spl.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay012/ov12_0222AC70.c b/src/overlay012/ov12_0222AC70.c index 80fd02856e..34e8ee7962 100644 --- a/src/overlay012/ov12_0222AC70.c +++ b/src/overlay012/ov12_0222AC70.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -26,8 +25,8 @@ #include "bg_window.h" #include "cell_actor.h" #include "heap.h" +#include "palette.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" #include "unk_0201F834.h" diff --git a/src/overlay012/ov12_0222E91C.c b/src/overlay012/ov12_0222E91C.c index 9382593be2..aee9302360 100644 --- a/src/overlay012/ov12_0222E91C.c +++ b/src/overlay012/ov12_0222E91C.c @@ -25,9 +25,9 @@ #include "bg_window.h" #include "cell_actor.h" #include "heap.h" +#include "palette.h" #include "pokemon.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" #include "unk_0201F834.h" diff --git a/src/overlay012/ov12_0222F700.c b/src/overlay012/ov12_0222F700.c index 90df1f3fb7..7288dc3ea7 100644 --- a/src/overlay012/ov12_0222F700.c +++ b/src/overlay012/ov12_0222F700.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -25,8 +24,8 @@ #include "cell_actor.h" #include "enums.h" #include "heap.h" +#include "palette.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_0200762C.h" #include "unk_0200A9DC.h" #include "unk_0200C6E4.h" diff --git a/src/overlay012/ov12_02234E44.c b/src/overlay012/ov12_02234E44.c index 4b3a3c49f1..ced38c68ee 100644 --- a/src/overlay012/ov12_02234E44.c +++ b/src/overlay012/ov12_02234E44.c @@ -11,8 +11,8 @@ #include "overlay012/struct_ov12_0223595C.h" #include "bg_window.h" +#include "palette.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay012/ov12_02235E94.c b/src/overlay012/ov12_02235E94.c index 052f1abe7e..1b820785f4 100644 --- a/src/overlay012/ov12_02235E94.c +++ b/src/overlay012/ov12_02235E94.c @@ -28,11 +28,11 @@ #include "heap.h" #include "narc.h" +#include "palette.h" #include "pokemon.h" #include "spl.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" diff --git a/src/overlay013/ov13_0221FC20.c b/src/overlay013/ov13_0221FC20.c index 3a906e8db4..20fa70a136 100644 --- a/src/overlay013/ov13_0221FC20.c +++ b/src/overlay013/ov13_0221FC20.c @@ -26,6 +26,7 @@ #include "message.h" #include "move_table.h" #include "narc.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "pokemon_summary_app.h" @@ -34,7 +35,6 @@ #include "sys_task_manager.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200679C.h" #include "unk_02006E3C.h" diff --git a/src/overlay013/ov13_02225710.c b/src/overlay013/ov13_02225710.c index a10f7a00fc..6bc8ec3f28 100644 --- a/src/overlay013/ov13_02225710.c +++ b/src/overlay013/ov13_02225710.c @@ -8,7 +8,7 @@ #include "bg_window.h" #include "heap.h" -#include "unk_02002F38.h" +#include "palette.h" #include "unk_0200C6E4.h" typedef struct { diff --git a/src/overlay013/ov13_022264F4.c b/src/overlay013/ov13_022264F4.c index e73de5c602..222e2a5982 100644 --- a/src/overlay013/ov13_022264F4.c +++ b/src/overlay013/ov13_022264F4.c @@ -28,6 +28,7 @@ #include "item.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "strbuf.h" @@ -35,7 +36,6 @@ #include "sys_task_manager.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200679C.h" #include "unk_02006E3C.h" diff --git a/src/overlay013/ov13_02227BDC.c b/src/overlay013/ov13_02227BDC.c index d3790cf042..6dc38c7aac 100644 --- a/src/overlay013/ov13_02227BDC.c +++ b/src/overlay013/ov13_02227BDC.c @@ -22,7 +22,7 @@ #include "gx_layers.h" #include "item.h" #include "narc.h" -#include "unk_02002F38.h" +#include "palette.h" #include "unk_0200C6E4.h" static void ov13_02227C08(UnkStruct_ov13_02227244 *param0); diff --git a/src/overlay017/ov17_0223B140.c b/src/overlay017/ov17_0223B140.c index a0b18105fb..b1024e677b 100644 --- a/src/overlay017/ov17_0223B140.c +++ b/src/overlay017/ov17_0223B140.c @@ -35,12 +35,12 @@ #include "move_table.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "pokemon.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" diff --git a/src/overlay017/ov17_0223CB1C.c b/src/overlay017/ov17_0223CB1C.c index d1a9eb995b..4d7aa6ca75 100644 --- a/src/overlay017/ov17_0223CB1C.c +++ b/src/overlay017/ov17_0223CB1C.c @@ -27,11 +27,11 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay017/ov17_0223DAD0.c b/src/overlay017/ov17_0223DAD0.c index 2478b3e27b..e4e5f740a7 100644 --- a/src/overlay017/ov17_0223DAD0.c +++ b/src/overlay017/ov17_0223DAD0.c @@ -34,12 +34,12 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "pokemon.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay017/ov17_0223F118.c b/src/overlay017/ov17_0223F118.c index 2beddc00f6..d1943d2bc8 100644 --- a/src/overlay017/ov17_0223F118.c +++ b/src/overlay017/ov17_0223F118.c @@ -5,7 +5,6 @@ #include #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012744_decl.h" @@ -27,6 +26,7 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "pokemon.h" #include "strbuf.h" #include "sys_task.h" diff --git a/src/overlay017/ov17_0223F7E4.c b/src/overlay017/ov17_0223F7E4.c index 17afc1ba06..96bc790ed5 100644 --- a/src/overlay017/ov17_0223F7E4.c +++ b/src/overlay017/ov17_0223F7E4.c @@ -4,7 +4,6 @@ #include #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -33,13 +32,13 @@ #include "message_util.h" #include "move_table.h" #include "narc.h" +#include "palette.h" #include "pokemon.h" #include "strbuf.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay017/ov17_022413D8.c b/src/overlay017/ov17_022413D8.c index 07a5490541..e422f66f54 100644 --- a/src/overlay017/ov17_022413D8.c +++ b/src/overlay017/ov17_022413D8.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -32,13 +31,13 @@ #include "heap.h" #include "inlines.h" #include "message.h" +#include "palette.h" #include "pokemon.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay017/ov17_02247A48.c b/src/overlay017/ov17_02247A48.c index b80eceea05..afb8d14ac5 100644 --- a/src/overlay017/ov17_02247A48.c +++ b/src/overlay017/ov17_02247A48.c @@ -37,11 +37,11 @@ #include "bg_window.h" #include "core_sys.h" #include "heap.h" +#include "palette.h" #include "pokemon.h" #include "spl.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" diff --git a/src/overlay017/ov17_022492DC.c b/src/overlay017/ov17_022492DC.c index 04907b9bac..eebfd34fef 100644 --- a/src/overlay017/ov17_022492DC.c +++ b/src/overlay017/ov17_022492DC.c @@ -19,12 +19,12 @@ #include "font.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" diff --git a/src/overlay017/ov17_0224A0FC.c b/src/overlay017/ov17_0224A0FC.c index 5297b5d6c0..16d9be0a3c 100644 --- a/src/overlay017/ov17_0224A0FC.c +++ b/src/overlay017/ov17_0224A0FC.c @@ -42,6 +42,7 @@ #include "heap.h" #include "inlines.h" #include "message.h" +#include "palette.h" #include "pokemon.h" #include "spl.h" #include "strbuf.h" @@ -49,7 +50,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay017/ov17_0224CFB8.c b/src/overlay017/ov17_0224CFB8.c index 8107183c9b..f85bb2a2df 100644 --- a/src/overlay017/ov17_0224CFB8.c +++ b/src/overlay017/ov17_0224CFB8.c @@ -37,10 +37,10 @@ #include "bg_window.h" #include "communication_system.h" #include "heap.h" +#include "palette.h" #include "pokemon.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200DA60.h" #include "unk_02094EDC.h" diff --git a/src/overlay017/ov17_0224F4D4.c b/src/overlay017/ov17_0224F4D4.c index 42e2c823d7..5bbe3c2149 100644 --- a/src/overlay017/ov17_0224F4D4.c +++ b/src/overlay017/ov17_0224F4D4.c @@ -23,11 +23,11 @@ #include "heap.h" #include "message.h" #include "overlay_manager.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay017/ov17_02250744.c b/src/overlay017/ov17_02250744.c index ff9edcd886..e853c5ebf5 100644 --- a/src/overlay017/ov17_02250744.c +++ b/src/overlay017/ov17_02250744.c @@ -22,6 +22,7 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "pokemon.h" #include "pokemon_icon.h" #include "strbuf.h" @@ -29,7 +30,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" diff --git a/src/overlay017/ov17_02252AB0.c b/src/overlay017/ov17_02252AB0.c index 302c614441..0833cba989 100644 --- a/src/overlay017/ov17_02252AB0.c +++ b/src/overlay017/ov17_02252AB0.c @@ -3,13 +3,13 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_0200D0F4.h" #include "heap.h" +#include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_0200C6E4.h" diff --git a/src/overlay021/ov21_021E737C.c b/src/overlay021/ov21_021E737C.c index 7a4acd1a14..e2de80599a 100644 --- a/src/overlay021/ov21_021E737C.c +++ b/src/overlay021/ov21_021E737C.c @@ -29,6 +29,7 @@ #include "message.h" #include "message_util.h" #include "narc.h" +#include "palette.h" #include "pokedex_data_index.h" #include "pokedex_heightweight.h" #include "pokemon_icon.h" @@ -37,7 +38,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_02015064.h" diff --git a/src/overlay021/ov21_021E8D48.c b/src/overlay021/ov21_021E8D48.c index 420bf47970..941f45a445 100644 --- a/src/overlay021/ov21_021E8D48.c +++ b/src/overlay021/ov21_021E8D48.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_defs/archived_sprite.h" @@ -29,6 +28,7 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "pokedex_data_index.h" #include "pokemon.h" #include "sprite_resource.h" @@ -36,7 +36,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" diff --git a/src/overlay062/ov62_0222F2C0.c b/src/overlay062/ov62_0222F2C0.c index 7dcc1beb99..a946dd0dce 100644 --- a/src/overlay062/ov62_0222F2C0.c +++ b/src/overlay062/ov62_0222F2C0.c @@ -22,10 +22,10 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "render_text.h" #include "savedata_misc.h" #include "sys_task.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200762C.h" #include "unk_020093B4.h" diff --git a/src/overlay062/ov62_022300D8.c b/src/overlay062/ov62_022300D8.c index 94464c5a52..32712f9330 100644 --- a/src/overlay062/ov62_022300D8.c +++ b/src/overlay062/ov62_022300D8.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -23,12 +22,12 @@ #include "bg_window.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" diff --git a/src/overlay062/ov62_02231690.c b/src/overlay062/ov62_02231690.c index 93e10a0411..beb85ff56b 100644 --- a/src/overlay062/ov62_02231690.c +++ b/src/overlay062/ov62_02231690.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -42,6 +41,7 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "pokemon_icon.h" #include "savedata_misc.h" #include "strbuf.h" @@ -50,7 +50,6 @@ #include "sys_task_manager.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" diff --git a/src/overlay062/ov62_02234A10.c b/src/overlay062/ov62_02234A10.c index db99ac437e..9cfe942db1 100644 --- a/src/overlay062/ov62_02234A10.c +++ b/src/overlay062/ov62_02234A10.c @@ -15,10 +15,10 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay062/ov62_02235278.c b/src/overlay062/ov62_02235278.c index d15a8e62f3..eb239d28b2 100644 --- a/src/overlay062/ov62_02235278.c +++ b/src/overlay062/ov62_02235278.c @@ -15,10 +15,10 @@ #include "gx_layers.h" #include "heap.h" +#include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" diff --git a/src/overlay062/ov62_02235E64.c b/src/overlay062/ov62_02235E64.c index 5401655d44..a121eebc41 100644 --- a/src/overlay062/ov62_02235E64.c +++ b/src/overlay062/ov62_02235E64.c @@ -17,11 +17,11 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "savedata.h" #include "strbuf.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" diff --git a/src/overlay062/ov62_02236CBC.c b/src/overlay062/ov62_02236CBC.c index 721ee30b97..6d6e89b535 100644 --- a/src/overlay062/ov62_02236CBC.c +++ b/src/overlay062/ov62_02236CBC.c @@ -1,7 +1,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -19,8 +18,8 @@ #include "bg_window.h" #include "gx_layers.h" #include "heap.h" +#include "palette.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay062/ov62_02237D24.c b/src/overlay062/ov62_02237D24.c index 11dfda6111..0dedcff1e5 100644 --- a/src/overlay062/ov62_02237D24.c +++ b/src/overlay062/ov62_02237D24.c @@ -35,11 +35,11 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay062/ov62_02239D60.c b/src/overlay062/ov62_02239D60.c index e5c7566a69..0806948c55 100644 --- a/src/overlay062/ov62_02239D60.c +++ b/src/overlay062/ov62_02239D60.c @@ -6,7 +6,6 @@ #include "constants/species.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02023FCC_decl.h" @@ -38,6 +37,7 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "pokemon.h" #include "pokemon_icon.h" #include "savedata.h" @@ -45,7 +45,6 @@ #include "string_template.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" diff --git a/src/overlay062/ov62_0223CAEC.c b/src/overlay062/ov62_0223CAEC.c index f046762e9c..50279a4fee 100644 --- a/src/overlay062/ov62_0223CAEC.c +++ b/src/overlay062/ov62_0223CAEC.c @@ -27,13 +27,13 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "play_time.h" #include "save_player.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay062/ov62_0223DFA8.c b/src/overlay062/ov62_0223DFA8.c index c803e574b1..460872207f 100644 --- a/src/overlay062/ov62_0223DFA8.c +++ b/src/overlay062/ov62_0223DFA8.c @@ -29,11 +29,11 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay062/ov62_02241204.c b/src/overlay062/ov62_02241204.c index b99536366f..563ed02e98 100644 --- a/src/overlay062/ov62_02241204.c +++ b/src/overlay062/ov62_02241204.c @@ -38,12 +38,12 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "save_player.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay062/ov62_02246B00.c b/src/overlay062/ov62_02246B00.c index f8e0dacc1f..2f17b247bf 100644 --- a/src/overlay062/ov62_02246B00.c +++ b/src/overlay062/ov62_02246B00.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -18,6 +17,7 @@ #include "game_options.h" #include "heap.h" #include "inlines.h" +#include "palette.h" #include "strbuf.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay062/ov62_02247D74.c b/src/overlay062/ov62_02247D74.c index 9f38009e3b..95860e4c12 100644 --- a/src/overlay062/ov62_02247D74.c +++ b/src/overlay062/ov62_02247D74.c @@ -13,11 +13,11 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_02030A80.h" diff --git a/src/overlay063/ov63_0222AE60.c b/src/overlay063/ov63_0222AE60.c index 8254c83948..462ebfd0e1 100644 --- a/src/overlay063/ov63_0222AE60.c +++ b/src/overlay063/ov63_0222AE60.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "overlay064/struct_ov64_022302EC.h" @@ -11,8 +10,8 @@ #include "cell_actor.h" #include "heap.h" #include "narc.h" +#include "palette.h" #include "sprite_resource.h" -#include "unk_02002F38.h" #include "unk_020093B4.h" #include "unk_0200A328.h" diff --git a/src/overlay063/ov63_0222CCE4.c b/src/overlay063/ov63_0222CCE4.c index 2c07a80c55..79265c958d 100644 --- a/src/overlay063/ov63_0222CCE4.c +++ b/src/overlay063/ov63_0222CCE4.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" - #include "overlay063/ov63_0222AE60.h" #include "overlay063/ov63_0222BE18.h" #include "overlay063/struct_ov63_0222BB38_decl.h" @@ -16,6 +14,7 @@ #include "cell_actor.h" #include "heap.h" +#include "palette.h" static BOOL ov63_0222D07C(const UnkStruct_ov63_0222CE44 *param0); static UnkStruct_ov63_0222CE44 *ov63_0222D08C(UnkStruct_ov63_0222CD2C *param0); diff --git a/src/overlay073/ov73_021D0D80.c b/src/overlay073/ov73_021D0D80.c index 1bdb6a2af0..21f2649511 100644 --- a/src/overlay073/ov73_021D0D80.c +++ b/src/overlay073/ov73_021D0D80.c @@ -22,6 +22,7 @@ #include "heap.h" #include "message.h" #include "overlay_manager.h" +#include "palette.h" #include "pokemon.h" #include "render_text.h" #include "save_player.h" @@ -34,7 +35,6 @@ #include "trainer_info.h" #include "unk_02000C88.h" #include "unk_0200112C.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay073/ov73_021D3250.c b/src/overlay073/ov73_021D3250.c index 0c2ab848ef..86848372fc 100644 --- a/src/overlay073/ov73_021D3250.c +++ b/src/overlay073/ov73_021D3250.c @@ -10,9 +10,9 @@ #include "heap.h" #include "message.h" #include "overlay_manager.h" +#include "palette.h" #include "strbuf.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02006E3C.h" #include "unk_0200F174.h" diff --git a/src/overlay075/ov75_021D0D80.c b/src/overlay075/ov75_021D0D80.c index 728893c604..fcf0a5897b 100644 --- a/src/overlay075/ov75_021D0D80.c +++ b/src/overlay075/ov75_021D0D80.c @@ -4,7 +4,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -27,6 +26,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "pokemon_icon.h" #include "render_text.h" #include "strbuf.h" @@ -34,7 +34,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200A784.h" #include "unk_0200C6E4.h" diff --git a/src/overlay076/ov76_0223B140.c b/src/overlay076/ov76_0223B140.c index 3f05b7bc20..591a29577a 100644 --- a/src/overlay076/ov76_0223B140.c +++ b/src/overlay076/ov76_0223B140.c @@ -4,7 +4,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -17,6 +16,7 @@ #include "core_sys.h" #include "game_overlay.h" +#include "palette.h" #include "touch_screen.h" #include "unk_0200C6E4.h" #include "unk_0202C9F4.h" diff --git a/src/overlay076/ov76_0223B870.c b/src/overlay076/ov76_0223B870.c index 5c6fad409d..1191c02622 100644 --- a/src/overlay076/ov76_0223B870.c +++ b/src/overlay076/ov76_0223B870.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -31,6 +30,7 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "pokemon.h" #include "pokemon_icon.h" #include "strbuf.h" @@ -39,7 +39,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay076/ov76_0223D338.c b/src/overlay076/ov76_0223D338.c index 83f24aeb61..ad3750ac38 100644 --- a/src/overlay076/ov76_0223D338.c +++ b/src/overlay076/ov76_0223D338.c @@ -31,12 +31,12 @@ #include "gx_layers.h" #include "heap.h" #include "narc.h" +#include "palette.h" #include "pokemon.h" #include "sys_task.h" #include "sys_task_manager.h" #include "touch_screen.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay099/ov99_021D0D80.c b/src/overlay099/ov99_021D0D80.c index 936c2f94b1..0db8638917 100644 --- a/src/overlay099/ov99_021D0D80.c +++ b/src/overlay099/ov99_021D0D80.c @@ -25,9 +25,9 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_020093B4.h" #include "unk_0200A9DC.h" diff --git a/src/overlay099/ov99_021D1A54.c b/src/overlay099/ov99_021D1A54.c index 4063be4f79..4ae564863d 100644 --- a/src/overlay099/ov99_021D1A54.c +++ b/src/overlay099/ov99_021D1A54.c @@ -26,9 +26,9 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200A9DC.h" #include "unk_0200C6E4.h" diff --git a/src/overlay099/ov99_021D2E28.c b/src/overlay099/ov99_021D2E28.c index 0272b2b815..b79b711552 100644 --- a/src/overlay099/ov99_021D2E28.c +++ b/src/overlay099/ov99_021D2E28.c @@ -12,7 +12,7 @@ #include "overlay099/struct_ov99_021D3A40.h" #include "bg_window.h" -#include "unk_02002F38.h" +#include "palette.h" #include "unk_0200A9DC.h" #include "unk_0200C6E4.h" #include "unk_0201D15C.h" diff --git a/src/overlay099/ov99_021D340C.c b/src/overlay099/ov99_021D340C.c index 7f8230e73f..fc90b0933f 100644 --- a/src/overlay099/ov99_021D340C.c +++ b/src/overlay099/ov99_021D340C.c @@ -12,7 +12,7 @@ #include "overlay099/struct_ov99_021D35E8.h" #include "overlay099/struct_ov99_021D3A40.h" -#include "unk_02002F38.h" +#include "palette.h" #include "unk_0200A9DC.h" #include "unk_0200C6E4.h" #include "unk_0201D15C.h" diff --git a/src/overlay099/ov99_021D4134.c b/src/overlay099/ov99_021D4134.c index 8ecc9627fa..9c8928a2e0 100644 --- a/src/overlay099/ov99_021D4134.c +++ b/src/overlay099/ov99_021D4134.c @@ -12,7 +12,7 @@ #include "cell_actor.h" #include "easy3d_object.h" #include "heap.h" -#include "unk_02002F38.h" +#include "palette.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0201D15C.h" diff --git a/src/overlay100/ov100_021D0D80.c b/src/overlay100/ov100_021D0D80.c index c9a8381f5f..3b7fb30980 100644 --- a/src/overlay100/ov100_021D0D80.c +++ b/src/overlay100/ov100_021D0D80.c @@ -24,7 +24,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" -#include "unk_02002F38.h" +#include "palette.h" #include "unk_020041CC.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay100/ov100_021D13E4.c b/src/overlay100/ov100_021D13E4.c index 4e680b6ea0..540e7c342c 100644 --- a/src/overlay100/ov100_021D13E4.c +++ b/src/overlay100/ov100_021D13E4.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -22,8 +21,8 @@ #include "easy3d_object.h" #include "gx_layers.h" #include "heap.h" +#include "palette.h" #include "sys_task.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay100/ov100_021D1C44.c b/src/overlay100/ov100_021D1C44.c index 93925ceef2..2c336bf80e 100644 --- a/src/overlay100/ov100_021D1C44.c +++ b/src/overlay100/ov100_021D1C44.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -22,10 +21,10 @@ #include "camera.h" #include "easy3d_object.h" #include "heap.h" +#include "palette.h" #include "sys_task.h" #include "text.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay100/ov100_021D2F0C.c b/src/overlay100/ov100_021D2F0C.c index ad6d0d7670..10e5857f18 100644 --- a/src/overlay100/ov100_021D2F0C.c +++ b/src/overlay100/ov100_021D2F0C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -21,11 +20,11 @@ #include "camera.h" #include "easy3d_object.h" #include "heap.h" +#include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay100/ov100_021D46C8.c b/src/overlay100/ov100_021D46C8.c index 79e6d64717..b6c33c3337 100644 --- a/src/overlay100/ov100_021D46C8.c +++ b/src/overlay100/ov100_021D46C8.c @@ -20,11 +20,11 @@ #include "game_options.h" #include "gx_layers.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_0200DA60.h" int ov100_021D46C8(UnkStruct_ov100_021D46C8 *param0, UnkStruct_020985E4 *param1, int param2) diff --git a/src/overlay104/ov104_0222FBE4.c b/src/overlay104/ov104_0222FBE4.c index 4bcac71d92..9ec90aa2d4 100644 --- a/src/overlay104/ov104_0222FBE4.c +++ b/src/overlay104/ov104_0222FBE4.c @@ -5,7 +5,6 @@ #include "consts/game_records.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -71,6 +70,7 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "save_player.h" @@ -82,7 +82,6 @@ #include "text.h" #include "trainer_info.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_0200A9DC.h" #include "unk_0200C6E4.h" diff --git a/src/overlay104/ov104_02231F74.c b/src/overlay104/ov104_02231F74.c index 3473d1a2f5..8fa16688a9 100644 --- a/src/overlay104/ov104_02231F74.c +++ b/src/overlay104/ov104_02231F74.c @@ -5,7 +5,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -44,6 +43,7 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "pokemon.h" #include "pokemon_icon.h" #include "render_text.h" @@ -55,7 +55,6 @@ #include "text.h" #include "unk_0200112C.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay104/ov104_02237378.c b/src/overlay104/ov104_02237378.c index eb21891e39..b638544b6e 100644 --- a/src/overlay104/ov104_02237378.c +++ b/src/overlay104/ov104_02237378.c @@ -32,6 +32,7 @@ #include "communication_information.h" #include "gx_layers.h" #include "heap.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "save_player.h" @@ -39,7 +40,6 @@ #include "strbuf.h" #include "string_template.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_02014000.h" #include "unk_02030494.h" #include "unk_02051D8C.h" diff --git a/src/overlay104/ov104_02237DD8.c b/src/overlay104/ov104_02237DD8.c index 6016818bb6..2447d6d822 100644 --- a/src/overlay104/ov104_02237DD8.c +++ b/src/overlay104/ov104_02237DD8.c @@ -25,10 +25,10 @@ #include "gx_layers.h" #include "heap.h" #include "narc.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "savedata.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0201D15C.h" #include "unk_02030494.h" diff --git a/src/overlay104/ov104_0223C2D4.c b/src/overlay104/ov104_0223C2D4.c index febecc2b87..e3bd1d9acd 100644 --- a/src/overlay104/ov104_0223C2D4.c +++ b/src/overlay104/ov104_0223C2D4.c @@ -43,12 +43,12 @@ #include "gx_layers.h" #include "heap.h" #include "narc.h" +#include "palette.h" #include "render_text.h" #include "save_player.h" #include "sys_task.h" #include "sys_task_manager.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02006E3C.h" #include "unk_020093B4.h" diff --git a/src/overlay104/ov104_0223D768.c b/src/overlay104/ov104_0223D768.c index 292dc76422..4eeb531e56 100644 --- a/src/overlay104/ov104_0223D768.c +++ b/src/overlay104/ov104_0223D768.c @@ -3,13 +3,13 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_0200D0F4.h" +#include "palette.h" #include "unk_0200C6E4.h" static const SpriteTemplate Unk_ov104_022417D8[] = { diff --git a/src/overlay104/ov104_0223D9E4.c b/src/overlay104/ov104_0223D9E4.c index 87166019d1..1b71d04b59 100644 --- a/src/overlay104/ov104_0223D9E4.c +++ b/src/overlay104/ov104_0223D9E4.c @@ -3,16 +3,15 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "bg_window.h" #include "enums.h" #include "heap.h" #include "narc.h" +#include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" typedef struct { diff --git a/src/overlay104/ov104_0223DC7C.c b/src/overlay104/ov104_0223DC7C.c index f1eae8b50c..95eace1d95 100644 --- a/src/overlay104/ov104_0223DC7C.c +++ b/src/overlay104/ov104_0223DC7C.c @@ -2,7 +2,6 @@ #include #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -18,11 +17,11 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "strbuf.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_0200679C.h" #include "unk_02006E3C.h" #include "unk_0200A9DC.h" diff --git a/src/overlay105/ov105_02241AE0.c b/src/overlay105/ov105_02241AE0.c index 5b304c8120..633f882a01 100644 --- a/src/overlay105/ov105_02241AE0.c +++ b/src/overlay105/ov105_02241AE0.c @@ -5,7 +5,6 @@ #include "struct_decls/sprite_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_02013A04_decl.h" @@ -44,6 +43,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "pokemon_summary_app.h" @@ -54,7 +54,6 @@ #include "text.h" #include "trainer_info.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" diff --git a/src/overlay106/ov106_02241AE0.c b/src/overlay106/ov106_02241AE0.c index 0708752821..b79e9c1d3c 100644 --- a/src/overlay106/ov106_02241AE0.c +++ b/src/overlay106/ov106_02241AE0.c @@ -4,7 +4,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02013A04_decl.h" @@ -36,6 +35,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "pokemon_summary_app.h" @@ -46,7 +46,6 @@ #include "text.h" #include "trainer_info.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_020093B4.h" diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index 0d754581f9..30bd686fa7 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -5,7 +5,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02013A04_decl.h" @@ -42,6 +41,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "save_player.h" @@ -52,7 +52,6 @@ #include "trainer_info.h" #include "unk_0200112C.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_020093B4.h" diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index a7bde6c66b..609c5fb99b 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -5,7 +5,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02013A04_decl.h" @@ -42,6 +41,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "save_player.h" @@ -52,7 +52,6 @@ #include "trainer_info.h" #include "unk_0200112C.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_020093B4.h" diff --git a/src/overlay108/ov108_02241AE0.c b/src/overlay108/ov108_02241AE0.c index c65a253bad..43418ac648 100644 --- a/src/overlay108/ov108_02241AE0.c +++ b/src/overlay108/ov108_02241AE0.c @@ -4,7 +4,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_020304A0_decl.h" @@ -36,6 +35,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "save_player.h" @@ -44,7 +44,6 @@ #include "string_template.h" #include "touch_screen.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_020093B4.h" diff --git a/src/overlay109/ov109_021D0D80.c b/src/overlay109/ov109_021D0D80.c index feab59b1a7..58e4bc8826 100644 --- a/src/overlay109/ov109_021D0D80.c +++ b/src/overlay109/ov109_021D0D80.c @@ -5,7 +5,6 @@ #include "consts/game_records.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -43,6 +42,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "strbuf.h" @@ -51,7 +51,6 @@ #include "sys_task_manager.h" #include "text.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_020093B4.h" diff --git a/src/overlay110/ov110_021D0D80.c b/src/overlay110/ov110_021D0D80.c index 6e8b3a5777..4dec40ce5b 100644 --- a/src/overlay110/ov110_021D0D80.c +++ b/src/overlay110/ov110_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0202D750_decl.h" #include "struct_decls/struct_0203068C_decl.h" @@ -22,12 +21,12 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" diff --git a/src/overlay111/ov111_021D0D80.c b/src/overlay111/ov111_021D0D80.c index 3ade770ce2..613161df5b 100644 --- a/src/overlay111/ov111_021D0D80.c +++ b/src/overlay111/ov111_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02015920_decl.h" @@ -29,13 +28,13 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay112/ov112_0225C700.c b/src/overlay112/ov112_0225C700.c index 37fedea6b1..c0f0286856 100644 --- a/src/overlay112/ov112_0225C700.c +++ b/src/overlay112/ov112_0225C700.c @@ -27,10 +27,10 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "sprite_resource.h" #include "strbuf.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_020093B4.h" diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index daf88c889f..c0888c3965 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -7,7 +7,6 @@ #include "constants/species.h" #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -52,6 +51,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "render_text.h" @@ -62,7 +62,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_020093B4.h" diff --git a/src/overlay116/ov116_022604C4.c b/src/overlay116/ov116_022604C4.c index 21ef2aad61..256edfc492 100644 --- a/src/overlay116/ov116_022604C4.c +++ b/src/overlay116/ov116_022604C4.c @@ -33,7 +33,7 @@ #include "heap.h" #include "narc.h" #include "overlay_manager.h" -#include "unk_02002F38.h" +#include "palette.h" #include "unk_02005474.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" diff --git a/src/overlay116/ov116_02261870.c b/src/overlay116/ov116_02261870.c index 7f6d742a50..32650ff709 100644 --- a/src/overlay116/ov116_02261870.c +++ b/src/overlay116/ov116_02261870.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -23,10 +22,10 @@ #include "inlines.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "strbuf.h" #include "text.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay116/ov116_0226432C.c b/src/overlay116/ov116_0226432C.c index 43317e7252..0808d4ecc5 100644 --- a/src/overlay116/ov116_0226432C.c +++ b/src/overlay116/ov116_0226432C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_defs/struct_0200D0F4.h" #include "overlay116/ov116_02261870.h" @@ -25,9 +24,9 @@ #include "easy3d_object.h" #include "heap.h" #include "inlines.h" +#include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" diff --git a/src/overlay117/ov117_02260668.c b/src/overlay117/ov117_02260668.c index 3caf4580a8..f83d6b8f1b 100644 --- a/src/overlay117/ov117_02260668.c +++ b/src/overlay117/ov117_02260668.c @@ -36,6 +36,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "render_text.h" #include "strbuf.h" #include "string_template.h" @@ -43,7 +44,6 @@ #include "sys_task_manager.h" #include "text.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_020093B4.h" diff --git a/src/overlay117/ov117_022626B0.c b/src/overlay117/ov117_022626B0.c index 1528cc215b..fae52b8919 100644 --- a/src/overlay117/ov117_022626B0.c +++ b/src/overlay117/ov117_022626B0.c @@ -17,7 +17,7 @@ #include "heap.h" #include "inlines.h" #include "narc.h" -#include "unk_02002F38.h" +#include "palette.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" diff --git a/src/overlay117/ov117_02263AF0.c b/src/overlay117/ov117_02263AF0.c index c6dcc4ec43..02b2bf2aa8 100644 --- a/src/overlay117/ov117_02263AF0.c +++ b/src/overlay117/ov117_02263AF0.c @@ -38,9 +38,9 @@ #include "font.h" #include "message.h" #include "narc.h" +#include "palette.h" #include "strbuf.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay119/ov119_021D0D80.c b/src/overlay119/ov119_021D0D80.c index b88f83a57f..f462a36ee0 100644 --- a/src/overlay119/ov119_021D0D80.c +++ b/src/overlay119/ov119_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02014014_decl.h" @@ -28,13 +27,13 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "palette.h" #include "pokemon.h" #include "spl.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" diff --git a/src/overlay119/ov119_021D191C.c b/src/overlay119/ov119_021D191C.c index 72e57f6bfd..f41e6ea38f 100644 --- a/src/overlay119/ov119_021D191C.c +++ b/src/overlay119/ov119_021D191C.c @@ -11,10 +11,10 @@ #include "cell_actor.h" #include "gx_layers.h" +#include "palette.h" #include "pokemon.h" #include "text.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_0200762C.h" diff --git a/src/unk_02002F38.c b/src/palette.c similarity index 97% rename from src/unk_02002F38.c rename to src/palette.c index 85b0c638c6..26ba76eb24 100644 --- a/src/unk_02002F38.c +++ b/src/palette.c @@ -1,35 +1,14 @@ -#include "unk_02002F38.h" +#include "palette.h" #include #include -#include "struct_defs/struct_020032D0.h" -#include "struct_defs/struct_0200330C.h" - #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02006E3C.h" #include "unk_020241F0.h" -typedef struct UnkStruct_02002F38_t { - UnkStruct_020032D0 unk_00[14]; - u16 unk_118_0 : 2; - u16 unk_118_2 : 14; - u16 unk_11A_0 : 14; - u16 unk_11A_14 : 1; - u16 unk_11A_15 : 1; - u8 unk_11C; - u8 unk_11D[3]; -} PaletteData; - -typedef struct { - u16 unk_00_0 : 5; - u16 unk_00_5 : 5; - u16 unk_00_10 : 5; - u16 unk_00_15 : 1; -} UnkStruct_0200393C; - static u8 sub_0200327C(u16 param0, u16 param1); static void sub_02003290(PaletteData *param0, u16 param1); static void sub_020032D0(int param0, UnkStruct_020032D0 *param1, u16 *param2); diff --git a/src/pokemon.c b/src/pokemon.c index 98bf07724c..ef802e54f8 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -15,7 +15,6 @@ #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -43,6 +42,7 @@ #include "message_util.h" #include "move_table.h" #include "narc.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "rtc.h" diff --git a/src/unk_0200762C.c b/src/unk_0200762C.c index 328cd5d078..6bbb76a296 100644 --- a/src/unk_0200762C.c +++ b/src/unk_0200762C.c @@ -14,7 +14,7 @@ #include "heap.h" #include "inlines.h" #include "narc.h" -#include "unk_02002F38.h" +#include "palette.h" typedef struct { u8 unk_00; diff --git a/src/unk_0200C6E4.c b/src/unk_0200C6E4.c index 1b90236705..ed897e43a2 100644 --- a/src/unk_0200C6E4.c +++ b/src/unk_0200C6E4.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_02009508.h" @@ -19,8 +18,8 @@ #include "cell_actor.h" #include "heap.h" +#include "palette.h" #include "sprite_resource.h" -#include "unk_02002F38.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/unk_0201567C.c b/src/unk_0201567C.c index 59a4511222..5659da1c70 100644 --- a/src/unk_0201567C.c +++ b/src/unk_0201567C.c @@ -3,11 +3,9 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" - #include "bg_window.h" +#include "palette.h" #include "sys_task_manager.h" -#include "unk_02002F38.h" #include "unk_0200679C.h" #include "unk_020241F0.h" diff --git a/src/unk_0207AE68.c b/src/unk_0207AE68.c index 58644b8ab3..c26afb1e57 100644 --- a/src/unk_0207AE68.c +++ b/src/unk_0207AE68.c @@ -27,6 +27,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "pokemon_summary_app.h" @@ -38,7 +39,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02001AF4.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_02006E3C.h" #include "unk_0200762C.h" diff --git a/src/unk_0207C908.c b/src/unk_0207C908.c index 4590adab7e..8588f4344e 100644 --- a/src/unk_0207C908.c +++ b/src/unk_0207C908.c @@ -3,12 +3,12 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_0200D0F4.h" +#include "palette.h" #include "unk_0200C6E4.h" __attribute__((aligned(4))) static const u32 Unk_020F0AF0[] = { diff --git a/src/unk_020890F4.c b/src/unk_020890F4.c index 06589c4420..43ac769efa 100644 --- a/src/unk_020890F4.c +++ b/src/unk_020890F4.c @@ -15,8 +15,8 @@ #include "heap.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "strbuf.h" -#include "unk_02002F38.h" #include "unk_0200C6E4.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" diff --git a/src/unk_02089604.c b/src/unk_02089604.c index 305039c9b7..a0d310e21e 100644 --- a/src/unk_02089604.c +++ b/src/unk_02089604.c @@ -7,9 +7,9 @@ #include "core_sys.h" #include "heap.h" +#include "palette.h" #include "strbuf.h" #include "touch_screen.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" diff --git a/src/unk_0208A3F4.c b/src/unk_0208A3F4.c index df45c17b93..8382f373c3 100644 --- a/src/unk_0208A3F4.c +++ b/src/unk_0208A3F4.c @@ -4,7 +4,6 @@ #include #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -23,9 +22,9 @@ #include "game_options.h" #include "inlines.h" #include "message.h" +#include "palette.h" #include "strbuf.h" #include "text.h" -#include "unk_02002F38.h" #include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/unk_0208B284.c b/src/unk_0208B284.c index c1a3297e0a..e73aca819d 100644 --- a/src/unk_0208B284.c +++ b/src/unk_0208B284.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -13,6 +12,7 @@ #include "heap.h" #include "narc.h" +#include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_0200C6E4.h" diff --git a/src/unk_02097B18.c b/src/unk_02097B18.c index dc2a34de68..7e08a36385 100644 --- a/src/unk_02097B18.c +++ b/src/unk_02097B18.c @@ -25,11 +25,11 @@ #include "heap.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "party.h" #include "pokemon.h" #include "save_player.h" #include "savedata.h" -#include "unk_02002F38.h" #include "unk_020041CC.h" #include "unk_0200762C.h" #include "unk_0200F174.h" diff --git a/src/unk_02098218.c b/src/unk_02098218.c index e4f9829b7a..639e99dc3d 100644 --- a/src/unk_02098218.c +++ b/src/unk_02098218.c @@ -24,10 +24,10 @@ #include "map_header.h" #include "narc.h" #include "overlay_manager.h" +#include "palette.h" #include "pokemon.h" #include "save_player.h" #include "trainer_info.h" -#include "unk_02002F38.h" #include "unk_02005474.h" #include "unk_0200762C.h" #include "unk_0200F174.h" From 803799e7bd88798d38ebd18c1ac3fb878988992e Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 07:23:06 -0700 Subject: [PATCH 02/11] Document structs declared in palette.h --- include/constants/palette.h | 2 +- include/palette.h | 61 +++++---- include/sprite_resource.h | 2 +- include/unk_0200C6E4.h | 2 +- src/overlay009/ov9_02249960.c | 2 +- src/overlay021/ov21_021E737C.c | 4 +- src/overlay063/ov63_0222AE60.c | 2 +- src/overlay070/ov70_0225D9A4.c | 2 +- src/overlay107/ov107_02241AE0.c | 2 +- src/overlay107/ov107_02245EB0.c | 2 +- src/overlay110/ov110_021D0D80.c | 2 +- src/palette.c | 232 ++++++++++++++++---------------- src/sprite_resource.c | 2 +- src/unk_0200A328.c | 6 +- src/unk_0200C6E4.c | 2 +- src/unk_0208A3F4.c | 6 +- 16 files changed, 165 insertions(+), 166 deletions(-) diff --git a/include/constants/palette.h b/include/constants/palette.h index 76e45af8e7..78ddcb70f0 100644 --- a/include/constants/palette.h +++ b/include/constants/palette.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_CONSTANTS_PALETTE_H #define POKEPLATINUM_CONSTANTS_PALETTE_H -enum PaletteBufferId { +enum PaletteFadeBufferId { PLTTBUF_MAIN_BG = 0, PLTTBUF_SUB_BG, PLTTBUF_MAIN_OBJ, diff --git a/include/palette.h b/include/palette.h index 0c48d7a1f2..d5160001b3 100644 --- a/include/palette.h +++ b/include/palette.h @@ -1,41 +1,40 @@ #ifndef POKEPLATINUM_PALETTE_H #define POKEPLATINUM_PALETTE_H -typedef struct { - u16 unk_00_0 : 5; - u16 unk_00_5 : 5; - u16 unk_00_10 : 5; - u16 unk_00_15 : 1; -} UnkStruct_0200393C; +typedef struct RgbColor { + u16 r : 5; + u16 g : 5; + u16 b : 5; + u16 unused : 1; +} RgbColor; -typedef struct { - u16 unk_00; - u16 unk_02_0 : 6; - u16 unk_02_6 : 5; - u16 unk_02_11 : 5; - u16 unk_04_0 : 15; - u16 unk_04_15 : 1; - u16 unk_06_0 : 4; - u16 unk_06_4 : 6; - u16 : 6; -} UnkStruct_0200330C; +typedef struct PaletteFadeControl { + u16 isOpaque; + u16 wait : 6; + u16 cur : 5; + u16 end : 5; + u16 nextRGB : 15; + u16 sign : 1; + u16 step : 4; + u16 waitStep : 6; + u16 unused : 6; +} PaletteFadeControl; -typedef struct { - u16 *unk_00; - u16 *unk_04; - u32 unk_08; - UnkStruct_0200330C unk_0C; -} UnkStruct_020032D0; +typedef struct PaletteBuffer { + u16 *unfaded; + u16 *faded; + u32 size; + PaletteFadeControl selected; +} PaletteBuffer; typedef struct PaletteData { - UnkStruct_020032D0 unk_00[14]; - u16 unk_118_0 : 2; - u16 unk_118_2 : 14; - u16 unk_11A_0 : 14; - u16 unk_11A_14 : 1; - u16 unk_11A_15 : 1; - u8 unk_11C; - u8 unk_11D[3]; + PaletteBuffer buffers[14]; + u16 selectedFlag : 2; + u16 selectedBuffers : 14; + u16 transparentBits : 14; + u16 callbackFlag : 1; + u16 autoTransparent : 1; + u8 forceExit; } PaletteData; PaletteData *sub_02002F38(int param0); diff --git a/include/sprite_resource.h b/include/sprite_resource.h index 49eb78b6fb..560418e346 100644 --- a/include/sprite_resource.h +++ b/include/sprite_resource.h @@ -87,7 +87,7 @@ void SpriteResourceCollection_Clear(SpriteResourceCollection *spriteResources); SpriteResource *SpriteResourceCollection_Find(const SpriteResourceCollection *spriteResources, int id); int SpriteResource_GetID(const SpriteResource *spriteRes); NNSG2dCharacterData *SpriteResource_GetTileData(const SpriteResource *spriteRes); -NNSG2dPaletteData *SpriteResource_GetPaletteData(const SpriteResource *spriteRes); +NNSG2dPaletteData *SpriteResource_GetPaletteFade(const SpriteResource *spriteRes); NNSG2dCellDataBank *SpriteResource_GetSpriteData(const SpriteResource *spriteRes); NNSG2dCellAnimBankData *SpriteResource_GetSpriteAnimData(const SpriteResource *spriteRes); NNSG2dMultiCellDataBank *SpriteResource_GetMultiSpriteData(const SpriteResource *spriteRes); diff --git a/include/unk_0200C6E4.h b/include/unk_0200C6E4.h index 1cd39590f4..16cecc9773 100644 --- a/include/unk_0200C6E4.h +++ b/include/unk_0200C6E4.h @@ -47,7 +47,7 @@ BOOL SpriteRenderer_LoadCharResObjFromOpenNarc(SpriteRenderer *renderer, SpriteG s8 sub_0200CC9C(SpriteRenderer *param0, SpriteGfxHandler *param1, int param2, int param3, int param4, int param5, int param6, int param7); s8 sub_0200CD0C(SpriteRenderer *param0, SpriteGfxHandler *param1, NARC *param2, int param3, int param4, int param5, int param6, int param7); u8 sub_0200CD7C(PaletteData *param0, int param1, SpriteRenderer *param2, SpriteGfxHandler *param3, int param4, int param5, int param6, int param7, int param8, int param9); -u8 SpriteRenderer_LoadPalette(PaletteData *palette, enum PaletteBufferId paletteBuffer, SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, NARC *narc, int fileID, BOOL compressed, int palID, int vram, int resID); +u8 SpriteRenderer_LoadPalette(PaletteData *palette, enum PaletteFadeBufferId paletteBuffer, SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, NARC *narc, int fileID, BOOL compressed, int palID, int vram, int resID); BOOL sub_0200CE0C(SpriteRenderer *param0, SpriteGfxHandler *param1, int param2, int param3, int param4, int param5); BOOL SpriteRenderer_LoadCellResObjFromOpenNarc(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, NARC *narc, int fileID, BOOL compressed, int resID); BOOL sub_0200CE3C(SpriteRenderer *param0, SpriteGfxHandler *param1, int param2, int param3, int param4, int param5); diff --git a/src/overlay009/ov9_02249960.c b/src/overlay009/ov9_02249960.c index 2be54d7611..2c4b17ab50 100644 --- a/src/overlay009/ov9_02249960.c +++ b/src/overlay009/ov9_02249960.c @@ -2661,7 +2661,7 @@ static void ov9_0224AEE4(UnkStruct_ov9_02249B04 *param0, UnkStruct_ov9_0224B064 { NNSG2dPaletteData *v1; - v1 = SpriteResource_GetPaletteData(param1->unk_1BC[0]); + v1 = SpriteResource_GetPaletteFade(param1->unk_1BC[0]); { int v2 = 0; UnkStruct_ov9_0224ADC0 *v3 = ¶m0->unk_1D00; diff --git a/src/overlay021/ov21_021E737C.c b/src/overlay021/ov21_021E737C.c index e2de80599a..39fe4adfde 100644 --- a/src/overlay021/ov21_021E737C.c +++ b/src/overlay021/ov21_021E737C.c @@ -1082,13 +1082,13 @@ static const UnkStruct_ov21_021E9DB0 *ov21_021E83D8(const UnkStruct_ov21_021E9DB static void ov21_021E8400(UnkStruct_ov21_021E7714 *param0, u8 param1, u16 param2) { - NNSG2dPaletteData *v0 = SpriteResource_GetPaletteData(param0->unk_14[1]); + NNSG2dPaletteData *v0 = SpriteResource_GetPaletteFade(param0->unk_14[1]); const NNSG2dImagePaletteProxy *v1 = sub_0200A72C(param0->unk_14[1], NULL); sub_0200393C(v0->pRawData, param0->unk_BC, 3 * 16, param1, param2); sub_0201DC68(NNS_GFD_DST_2D_OBJ_PLTT_MAIN, NNS_G2dGetImagePaletteLocation(v1, NNS_G2D_VRAM_TYPE_2DMAIN), param0->unk_BC, 3 * 32); - v0 = SpriteResource_GetPaletteData(param0->unk_24[1]); + v0 = SpriteResource_GetPaletteFade(param0->unk_24[1]); v1 = sub_0200A72C(param0->unk_24[1], NULL); sub_0200393C(v0->pRawData, param0->unk_C0, 5 * 16, param1, param2); diff --git a/src/overlay063/ov63_0222AE60.c b/src/overlay063/ov63_0222AE60.c index 462ebfd0e1..32c75c510f 100644 --- a/src/overlay063/ov63_0222AE60.c +++ b/src/overlay063/ov63_0222AE60.c @@ -1129,7 +1129,7 @@ static void ov63_0222BC80(UnkStruct_ov63_0222AE60 *param0, SpriteResource *param NNSG2dPaletteData *v0; u32 v1[2]; - v0 = SpriteResource_GetPaletteData(param1); + v0 = SpriteResource_GetPaletteFade(param1); v1[0] = sub_0200A760(param1, NNS_G2D_VRAM_TYPE_2DMAIN); v1[1] = sub_0200A760(param1, NNS_G2D_VRAM_TYPE_2DSUB); diff --git a/src/overlay070/ov70_0225D9A4.c b/src/overlay070/ov70_0225D9A4.c index 668ed71290..aca06b68f3 100644 --- a/src/overlay070/ov70_0225D9A4.c +++ b/src/overlay070/ov70_0225D9A4.c @@ -2773,7 +2773,7 @@ static void ov70_02260080(UnkStruct_ov70_0225FA84 *param0, UnkStruct_ov70_0225E4 GF_ASSERT(v5); param0->unk_6C[1] = SpriteResourceCollection_AddPalette(param1->unk_194[1], v4.unk_00, v4.unk_08, 0, 101, NNS_G2D_VRAM_TYPE_2DSUB, 1, param3); - ov70_02260268(SpriteResource_GetPaletteData(param0->unk_6C[1])); + ov70_02260268(SpriteResource_GetPaletteFade(param0->unk_6C[1])); v5 = sub_0200A640(param0->unk_6C[1]); GF_ASSERT(v5); diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index 30bd686fa7..9ee007036e 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -256,7 +256,7 @@ struct UnkStruct_ov107_02241D6C_t { BmpList * unk_198; ResourceMetadata * unk_19C; UnkStruct_ov84_02240FA8 unk_1A0; - PaletteData * unk_1C0; + PaletteData *unk_1C0; UnkStruct_0200C440 * unk_1C4; Options * unk_1C8; SaveData * unk_1CC; diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index 609c5fb99b..3c781e77b6 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -110,7 +110,7 @@ struct UnkStruct_ov107_02246170_t { ResourceMetadata unk_120[3]; BmpList * unk_138; ResourceMetadata * unk_13C; - PaletteData * unk_140; + PaletteData *unk_140; UnkStruct_0200C440 * unk_144; Options * unk_148; SaveData * unk_14C; diff --git a/src/overlay110/ov110_021D0D80.c b/src/overlay110/ov110_021D0D80.c index 4dec40ce5b..3d4df0cb79 100644 --- a/src/overlay110/ov110_021D0D80.c +++ b/src/overlay110/ov110_021D0D80.c @@ -52,7 +52,7 @@ typedef struct { StringTemplate * unk_114; Strbuf* unk_118; Strbuf* unk_11C; - PaletteData * unk_120; + PaletteData *unk_120; const Options * unk_124; SaveData * unk_128; UnkStruct_0203068C * unk_12C; diff --git a/src/palette.c b/src/palette.c index 26ba76eb24..f7c3ac3648 100644 --- a/src/palette.c +++ b/src/palette.c @@ -11,15 +11,15 @@ static u8 sub_0200327C(u16 param0, u16 param1); static void sub_02003290(PaletteData *param0, u16 param1); -static void sub_020032D0(int param0, UnkStruct_020032D0 *param1, u16 *param2); -static void sub_0200330C(UnkStruct_0200330C *param0, u16 param1, s8 param2, u8 param3, u8 param4, u16 param5); +static void sub_020032D0(int param0, PaletteBuffer *param1, u16 *param2); +static void sub_0200330C(PaletteFadeControl *param0, u16 param1, s8 param2, u8 param3, u8 param4, u16 param5); static void sub_020033CC(SysTask *param0, void *param1); static void sub_02003468(PaletteData *param0); static void sub_02003488(PaletteData *param0); static void sub_020034A8(PaletteData *param0, u16 param1, u16 param2); static void sub_02003504(PaletteData *param0, u16 param1, u16 param2); -static void sub_02003560(u16 *param0, u16 *param1, UnkStruct_0200330C *param2, u32 param3); -static void sub_020035EC(PaletteData *param0, u8 param1, UnkStruct_0200330C *param2); +static void sub_02003560(u16 *param0, u16 *param1, PaletteFadeControl *param2, u32 param3); +static void sub_020035EC(PaletteData *param0, u8 param1, PaletteFadeControl *param2); PaletteData *sub_02002F38(int param0) { @@ -38,9 +38,9 @@ void sub_02002F54(PaletteData *param0) void sub_02002F5C(PaletteData *param0, int param1, void *param2, void *param3, u32 param4) { - param0->unk_00[param1].unk_00 = (u16 *)param2; - param0->unk_00[param1].unk_04 = (u16 *)param3; - param0->unk_00[param1].unk_08 = param4; + param0->buffers[param1].unfaded = (u16 *)param2; + param0->buffers[param1].faded = (u16 *)param3; + param0->buffers[param1].size = param4; } void sub_02002F70(PaletteData *param0, int param1, u32 param2, u32 param3) @@ -56,14 +56,14 @@ void sub_02002F70(PaletteData *param0, int param1, u32 param2, u32 param3) void sub_02002FA0(PaletteData *param0, int param1) { - Heap_FreeToHeap(param0->unk_00[param1].unk_00); - Heap_FreeToHeap(param0->unk_00[param1].unk_04); + Heap_FreeToHeap(param0->buffers[param1].unfaded); + Heap_FreeToHeap(param0->buffers[param1].faded); } void sub_02002FBC(PaletteData *param0, const void *param1, int param2, u16 param3, u16 param4) { - MI_CpuCopy16(param1, (void *)¶m0->unk_00[param2].unk_00[param3], (u32)param4); - MI_CpuCopy16(param1, (void *)¶m0->unk_00[param2].unk_04[param3], (u32)param4); + MI_CpuCopy16(param1, (void *)¶m0->buffers[param2].unfaded[param3], (u32)param4); + MI_CpuCopy16(param1, (void *)¶m0->buffers[param2].faded[param3], (u32)param4); } void sub_02002FEC(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6, u16 param7) @@ -78,7 +78,7 @@ void sub_02002FEC(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, param5 = v0->szByte; } - GF_ASSERT(param6 * sizeof(param6) + param5 <= param0->unk_00[param4].unk_08); + GF_ASSERT(param6 * sizeof(param6) + param5 <= param0->buffers[param4].size); sub_02002FBC(param0, &(((u16 *)(v0->pRawData))[param7]), param4, param6, param5); Heap_FreeToHeap(v1); @@ -93,7 +93,7 @@ void sub_02003070(PaletteData *param0, int param1, u16 param2, u32 param3) { u16 *v0; - GF_ASSERT(param2 * sizeof(param2) + param3 <= param0->unk_00[param1].unk_08); + GF_ASSERT(param2 * sizeof(param2) + param3 <= param0->buffers[param1].size); switch (param1) { case 0: @@ -134,18 +134,18 @@ void sub_020030E4(u32 param0, u32 param1, u32 param2, u32 param3, u16 param4, vo void sub_02003120(PaletteData *param0, int param1, u16 param2, int param3, u16 param4, u16 param5) { - MI_CpuCopy16((void *)¶m0->unk_00[param1].unk_00[param2], (void *)¶m0->unk_00[param3].unk_00[param4], param5); - MI_CpuCopy16((void *)¶m0->unk_00[param1].unk_00[param2], (void *)¶m0->unk_00[param3].unk_04[param4], param5); + MI_CpuCopy16((void *)¶m0->buffers[param1].unfaded[param2], (void *)¶m0->buffers[param3].unfaded[param4], param5); + MI_CpuCopy16((void *)¶m0->buffers[param1].unfaded[param2], (void *)¶m0->buffers[param3].faded[param4], param5); } u16 *sub_02003164(PaletteData *param0, int param1) { - return param0->unk_00[param1].unk_00; + return param0->buffers[param1].unfaded; } u16 *sub_0200316C(PaletteData *param0, int param1) { - return param0->unk_00[param1].unk_04; + return param0->buffers[param1].faded; } u8 sub_02003178(PaletteData *param0, u16 param1, u16 param2, s8 param3, u8 param4, u8 param5, u16 param6) @@ -158,9 +158,9 @@ u8 sub_02003178(PaletteData *param0, u16 param1, u16 param2, s8 param3, u8 param v1 = 0; for (v2 = 0; v2 < (4 + 10); v2++) { - if ((sub_0200327C(param1, v2) == 1) && (sub_0200327C(param0->unk_118_2, v2) == 0)) { - sub_020032D0(v2, ¶m0->unk_00[v2], ¶m2); - sub_0200330C(¶m0->unk_00[v2].unk_0C, param2, param3, param4, param5, param6); + if ((sub_0200327C(param1, v2) == 1) && (sub_0200327C(param0->selectedBuffers, v2) == 0)) { + sub_020032D0(v2, ¶m0->buffers[v2], ¶m2); + sub_0200330C(¶m0->buffers[v2].selected, param2, param3, param4, param5, param6); sub_02003290(param0, v2); if (v2 >= 4) { @@ -175,12 +175,12 @@ u8 sub_02003178(PaletteData *param0, u16 param1, u16 param2, s8 param3, u8 param } if (v1 == 1) { - param0->unk_118_2 |= param1; + param0->selectedBuffers |= param1; - if (param0->unk_11A_14 == 0) { - param0->unk_11A_14 = 1; - param0->unk_118_0 = 1; - param0->unk_11C = 0; + if (param0->callbackFlag == 0) { + param0->callbackFlag = 1; + param0->selectedFlag = 1; + param0->forceExit = 0; SysTask_Start(sub_020033CC, param0, (0xffffffff - 1)); } @@ -200,22 +200,22 @@ static u8 sub_0200327C(u16 param0, u16 param1) static void sub_02003290(PaletteData *param0, u16 param1) { - if (sub_0200327C(param0->unk_11A_0, param1) == 1) { + if (sub_0200327C(param0->transparentBits, param1) == 1) { return; } - param0->unk_11A_0 |= (1 << param1); + param0->transparentBits |= (1 << param1); } -static void sub_020032D0(int param0, UnkStruct_020032D0 *param1, u16 *param2) +static void sub_020032D0(int param0, PaletteBuffer *param1, u16 *param2) { u16 v0; u8 v1, v2; if (param0 < 4) { - v2 = param1->unk_08 / 32; + v2 = param1->size / 32; } else { - v2 = param1->unk_08 / 512; + v2 = param1->size / 512; } v0 = 0; @@ -227,26 +227,26 @@ static void sub_020032D0(int param0, UnkStruct_020032D0 *param1, u16 *param2) *param2 &= v0; } -static void sub_0200330C(UnkStruct_0200330C *param0, u16 param1, s8 param2, u8 param3, u8 param4, u16 param5) +static void sub_0200330C(PaletteFadeControl *param0, u16 param1, s8 param2, u8 param3, u8 param4, u16 param5) { if (param2 < 0) { - param0->unk_06_0 = 2 + abs(param2); - param0->unk_02_0 = 0; + param0->step = 2 + abs(param2); + param0->wait = 0; } else { - param0->unk_06_0 = 2; - param0->unk_02_0 = param2; + param0->step = 2; + param0->wait = param2; } - param0->unk_00 = param1; - param0->unk_02_6 = param3; - param0->unk_02_11 = param4; - param0->unk_04_0 = param5; - param0->unk_06_4 = param0->unk_02_0; + param0->isOpaque = param1; + param0->cur = param3; + param0->end = param4; + param0->nextRGB = param5; + param0->waitStep = param0->wait; if (param3 < param4) { - param0->unk_04_15 = 0; + param0->sign = 0; } else { - param0->unk_04_15 = 1; + param0->sign = 1; } } @@ -254,26 +254,26 @@ static void sub_020033CC(SysTask *param0, void *param1) { PaletteData *v0 = param1; - if (v0->unk_11C == 1) { - v0->unk_11C = 0; - v0->unk_11A_0 = 0; - v0->unk_118_2 = 0; - v0->unk_11A_14 = 0; + if (v0->forceExit == 1) { + v0->forceExit = 0; + v0->transparentBits = 0; + v0->selectedBuffers = 0; + v0->callbackFlag = 0; SysTask_Done(param0); return; } - if (v0->unk_118_0 != 1) { + if (v0->selectedFlag != 1) { return; } - v0->unk_11A_0 = v0->unk_118_2; + v0->transparentBits = v0->selectedBuffers; sub_02003468(v0); sub_02003488(v0); - if (v0->unk_118_2 == 0) { - v0->unk_11A_14 = 0; + if (v0->selectedBuffers == 0) { + v0->callbackFlag = 0; SysTask_Done(param0); } } @@ -298,15 +298,15 @@ static void sub_02003488(PaletteData *param0) static void sub_020034A8(PaletteData *param0, u16 param1, u16 param2) { - if (sub_0200327C(param0->unk_118_2, param1) == 0) { + if (sub_0200327C(param0->selectedBuffers, param1) == 0) { return; } - if (param0->unk_00[param1].unk_0C.unk_06_4 < param0->unk_00[param1].unk_0C.unk_02_0) { - param0->unk_00[param1].unk_0C.unk_06_4++; + if (param0->buffers[param1].selected.waitStep < param0->buffers[param1].selected.wait) { + param0->buffers[param1].selected.waitStep++; return; } else { - param0->unk_00[param1].unk_0C.unk_06_4 = 0; + param0->buffers[param1].selected.waitStep = 0; } sub_02003504(param0, param1, param2); @@ -317,62 +317,62 @@ static void sub_02003504(PaletteData *param0, u16 param1, u16 param2) u32 v0; for (v0 = 0; v0 < 16; v0++) { - if (sub_0200327C(param0->unk_00[param1].unk_0C.unk_00, v0) == 0) { + if (sub_0200327C(param0->buffers[param1].selected.isOpaque, v0) == 0) { continue; } - sub_02003560(¶m0->unk_00[param1].unk_00[v0 * param2], ¶m0->unk_00[param1].unk_04[v0 * param2], ¶m0->unk_00[param1].unk_0C, param2); + sub_02003560(¶m0->buffers[param1].unfaded[v0 * param2], ¶m0->buffers[param1].faded[v0 * param2], ¶m0->buffers[param1].selected, param2); } - sub_020035EC(param0, param1, ¶m0->unk_00[param1].unk_0C); + sub_020035EC(param0, param1, ¶m0->buffers[param1].selected); } -static void sub_02003560(u16 *param0, u16 *param1, UnkStruct_0200330C *param2, u32 param3) +static void sub_02003560(u16 *param0, u16 *param1, PaletteFadeControl *param2, u32 param3) { u32 v0; u8 v1, v2, v3; for (v0 = 0; v0 < param3; v0++) { - v1 = ((param0[v0] & 0x1f) + (((param2->unk_04_0 & 0x1f) - (param0[v0] & 0x1f)) * param2->unk_02_6 >> 4)); - v2 = (((param0[v0] >> 5) & 0x1f) + ((((param2->unk_04_0 >> 5) & 0x1f) - ((param0[v0] >> 5) & 0x1f)) * param2->unk_02_6 >> 4)); - v3 = (((param0[v0] >> 10) & 0x1f) + ((((param2->unk_04_0 >> 10) & 0x1f) - ((param0[v0] >> 10) & 0x1f)) * param2->unk_02_6 >> 4)); + v1 = ((param0[v0] & 0x1f) + (((param2->nextRGB & 0x1f) - (param0[v0] & 0x1f)) * param2->cur >> 4)); + v2 = (((param0[v0] >> 5) & 0x1f) + ((((param2->nextRGB >> 5) & 0x1f) - ((param0[v0] >> 5) & 0x1f)) * param2->cur >> 4)); + v3 = (((param0[v0] >> 10) & 0x1f) + ((((param2->nextRGB >> 10) & 0x1f) - ((param0[v0] >> 10) & 0x1f)) * param2->cur >> 4)); param1[v0] = (v3 << 10) | (v2 << 5) | v1; } } -static void sub_020035EC(PaletteData *param0, u8 param1, UnkStruct_0200330C *param2) +static void sub_020035EC(PaletteData *param0, u8 param1, PaletteFadeControl *param2) { s16 v0; - if (param2->unk_02_6 == param2->unk_02_11) { - if ((param0->unk_118_2 & (1 << param1)) != 0) { - param0->unk_118_2 ^= (1 << param1); + if (param2->cur == param2->end) { + if ((param0->selectedBuffers & (1 << param1)) != 0) { + param0->selectedBuffers ^= (1 << param1); } - } else if (param2->unk_04_15 == 0) { - v0 = param2->unk_02_6; - v0 += param2->unk_06_0; + } else if (param2->sign == 0) { + v0 = param2->cur; + v0 += param2->step; - if (v0 > param2->unk_02_11) { - v0 = param2->unk_02_11; + if (v0 > param2->end) { + v0 = param2->end; } - param2->unk_02_6 = v0; + param2->cur = v0; } else { - v0 = param2->unk_02_6; - v0 -= param2->unk_06_0; + v0 = param2->cur; + v0 -= param2->step; - if (v0 < param2->unk_02_11) { - v0 = param2->unk_02_11; + if (v0 < param2->end) { + v0 = param2->end; } - param2->unk_02_6 = v0; + param2->cur = v0; } } void sub_02003694(PaletteData *param0) { - if ((param0->unk_11A_15 == 0) && (param0->unk_118_0 != 1)) { + if ((param0->autoTransparent == 0) && (param0->selectedFlag != 1)) { return; } @@ -380,124 +380,124 @@ void sub_02003694(PaletteData *param0) int v0; for (v0 = 0; v0 < (4 + 10); v0++) { - if (param0->unk_11A_15 == 0) { - if ((param0->unk_00[v0].unk_04 == NULL) || (sub_0200327C(param0->unk_11A_0, v0) == 0)) { + if (param0->autoTransparent == 0) { + if ((param0->buffers[v0].faded == NULL) || (sub_0200327C(param0->transparentBits, v0) == 0)) { continue; } } - DC_FlushRange((void *)param0->unk_00[v0].unk_04, param0->unk_00[v0].unk_08); + DC_FlushRange((void *)param0->buffers[v0].faded, param0->buffers[v0].size); switch (v0) { case 0: - GX_LoadBGPltt((const void *)param0->unk_00[v0].unk_04, 0, param0->unk_00[v0].unk_08); + GX_LoadBGPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); break; case 1: - GXS_LoadBGPltt((const void *)param0->unk_00[v0].unk_04, 0, param0->unk_00[v0].unk_08); + GXS_LoadBGPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); break; case 2: - GX_LoadOBJPltt((const void *)param0->unk_00[v0].unk_04, 0, param0->unk_00[v0].unk_08); + GX_LoadOBJPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); break; case 3: - GXS_LoadOBJPltt((const void *)param0->unk_00[v0].unk_04, 0, param0->unk_00[v0].unk_08); + GXS_LoadOBJPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); break; case 4: GX_BeginLoadBGExtPltt(); - GX_LoadBGExtPltt((const void *)param0->unk_00[v0].unk_04, 0x0, param0->unk_00[v0].unk_08); + GX_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x0, param0->buffers[v0].size); GX_EndLoadBGExtPltt(); break; case 5: GX_BeginLoadBGExtPltt(); - GX_LoadBGExtPltt((const void *)param0->unk_00[v0].unk_04, 0x2000, param0->unk_00[v0].unk_08); + GX_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x2000, param0->buffers[v0].size); GX_EndLoadBGExtPltt(); break; case 6: GX_BeginLoadBGExtPltt(); - GX_LoadBGExtPltt((const void *)param0->unk_00[v0].unk_04, 0x4000, param0->unk_00[v0].unk_08); + GX_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x4000, param0->buffers[v0].size); GX_EndLoadBGExtPltt(); break; case 7: GX_BeginLoadBGExtPltt(); - GX_LoadBGExtPltt((const void *)param0->unk_00[v0].unk_04, 0x6000, param0->unk_00[v0].unk_08); + GX_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x6000, param0->buffers[v0].size); GX_EndLoadBGExtPltt(); break; case 8: GXS_BeginLoadBGExtPltt(); - GXS_LoadBGExtPltt((const void *)param0->unk_00[v0].unk_04, 0x0, param0->unk_00[v0].unk_08); + GXS_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x0, param0->buffers[v0].size); GXS_EndLoadBGExtPltt(); break; case 9: GXS_BeginLoadBGExtPltt(); - GXS_LoadBGExtPltt((const void *)param0->unk_00[v0].unk_04, 0x2000, param0->unk_00[v0].unk_08); + GXS_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x2000, param0->buffers[v0].size); GXS_EndLoadBGExtPltt(); break; case 10: GXS_BeginLoadBGExtPltt(); - GXS_LoadBGExtPltt((const void *)param0->unk_00[v0].unk_04, 0x4000, param0->unk_00[v0].unk_08); + GXS_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x4000, param0->buffers[v0].size); GXS_EndLoadBGExtPltt(); break; case 11: GXS_BeginLoadBGExtPltt(); - GXS_LoadBGExtPltt((const void *)param0->unk_00[v0].unk_04, 0x6000, param0->unk_00[v0].unk_08); + GXS_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x6000, param0->buffers[v0].size); GXS_EndLoadBGExtPltt(); break; case 12: GX_BeginLoadOBJExtPltt(); - GX_LoadOBJExtPltt((const void *)param0->unk_00[v0].unk_04, 0, param0->unk_00[v0].unk_08); + GX_LoadOBJExtPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); GX_EndLoadOBJExtPltt(); break; case 13: GXS_BeginLoadOBJExtPltt(); - GXS_LoadOBJExtPltt((const void *)param0->unk_00[v0].unk_04, 0, param0->unk_00[v0].unk_08); + GXS_LoadOBJExtPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); GXS_EndLoadOBJExtPltt(); } } } - param0->unk_11A_0 = param0->unk_118_2; + param0->transparentBits = param0->selectedBuffers; - if (param0->unk_11A_0 == 0) { - param0->unk_118_0 = 0; + if (param0->transparentBits == 0) { + param0->selectedFlag = 0; } } u16 sub_0200384C(PaletteData *param0) { - return param0->unk_118_2; + return param0->selectedBuffers; } void sub_02003858(PaletteData *param0, int param1) { - param0->unk_11A_15 = param1; + param0->autoTransparent = param1; } void sub_0200387C(PaletteData *param0, u8 param1) { - param0->unk_118_0 = param1 & 0x1; - param0->unk_118_2 = 0xFFFFFFFF; + param0->selectedFlag = param1 & 0x1; + param0->selectedBuffers = 0xFFFFFFFF; } void sub_020038B0(PaletteData *param0, int param1, int param2, u16 param3, u16 param4, u16 param5) { - GF_ASSERT(param5 * sizeof(u16) <= param0->unk_00[param1].unk_08); + GF_ASSERT(param5 * sizeof(u16) <= param0->buffers[param1].size); if ((param2 == 1) || (param2 == 2)) { - MI_CpuFill16(¶m0->unk_00[param1].unk_00[param4], param3, (param5 - param4) * 2); + MI_CpuFill16(¶m0->buffers[param1].unfaded[param4], param3, (param5 - param4) * 2); } if ((param2 == 0) || (param2 == 2)) { - MI_CpuFill16(¶m0->unk_00[param1].unk_04[param4], param3, (param5 - param4) * 2); + MI_CpuFill16(¶m0->buffers[param1].faded[param4], param3, (param5 - param4) * 2); } } u16 sub_02003910(PaletteData *param0, int param1, int param2, u16 param3) { if (param2 == 1) { - return param0->unk_00[param1].unk_00[param3]; + return param0->buffers[param1].unfaded[param3]; } if (param2 == 0) { - return param0->unk_00[param1].unk_04[param3]; + return param0->buffers[param1].faded[param3]; } GF_ASSERT(FALSE); @@ -510,14 +510,14 @@ void sub_0200393C(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 par int v1, v2, v3; int v4, v5, v6; - v4 = ((UnkStruct_0200393C *)¶m4)->unk_00_0; - v5 = ((UnkStruct_0200393C *)¶m4)->unk_00_5; - v6 = ((UnkStruct_0200393C *)¶m4)->unk_00_10; + v4 = ((RgbColor *)¶m4)->r; + v5 = ((RgbColor *)¶m4)->g; + v6 = ((RgbColor *)¶m4)->b; for (v0 = 0; v0 < param2; v0++) { - v1 = ((UnkStruct_0200393C *)¶m0[v0])->unk_00_0; - v2 = ((UnkStruct_0200393C *)¶m0[v0])->unk_00_5; - v3 = ((UnkStruct_0200393C *)¶m0[v0])->unk_00_10; + v1 = ((RgbColor *)¶m0[v0])->r; + v2 = ((RgbColor *)¶m0[v0])->g; + v3 = ((RgbColor *)¶m0[v0])->b; param1[v0] = (v1 + ((v4 - v1) * param3 >> 4)) | ((v2 + ((v5 - v2) * param3 >> 4)) << 5) | ((v3 + ((v6 - v3) * param3 >> 4)) << 10); } @@ -525,8 +525,8 @@ void sub_0200393C(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 par void sub_020039B0(PaletteData *param0, int param1, u16 param2, u16 param3, u8 param4, u16 param5) { - GF_ASSERT(param0->unk_00[param1].unk_00 != NULL && param0->unk_00[param1].unk_04 != NULL); - sub_0200393C(¶m0->unk_00[param1].unk_00[param2], ¶m0->unk_00[param1].unk_04[param2], param3, param4, param5); + GF_ASSERT(param0->buffers[param1].unfaded != NULL && param0->buffers[param1].faded != NULL); + sub_0200393C(¶m0->buffers[param1].unfaded[param2], ¶m0->buffers[param1].faded[param2], param3, param4, param5); } void sub_020039F8(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4) @@ -547,7 +547,7 @@ void sub_02003A2C(PaletteData *param0, int param1, u16 param2, u8 param3, u16 pa { int v0 = 0; - GF_ASSERT(param0->unk_00[param1].unk_00 != NULL && param0->unk_00[param1].unk_04 != NULL); + GF_ASSERT(param0->buffers[param1].unfaded != NULL && param0->buffers[param1].faded != NULL); while (param2) { if (param2 & 1) { diff --git a/src/sprite_resource.c b/src/sprite_resource.c index bce837610a..26bf63c094 100644 --- a/src/sprite_resource.c +++ b/src/sprite_resource.c @@ -502,7 +502,7 @@ NNSG2dCharacterData *SpriteResource_GetTileData(const SpriteResource *spriteRes) return tileData->tileData; } -NNSG2dPaletteData *SpriteResource_GetPaletteData(const SpriteResource *spriteRes) +NNSG2dPaletteData *SpriteResource_GetPaletteFade(const SpriteResource *spriteRes) { GF_ASSERT(spriteRes->type == SPRITE_RESOURCE_PALETTE); diff --git a/src/unk_0200A328.c b/src/unk_0200A328.c index 95dc5c4d90..8bca01ba29 100644 --- a/src/unk_0200A328.c +++ b/src/unk_0200A328.c @@ -200,7 +200,7 @@ BOOL sub_0200A5C8(const SpriteResource *param0) GF_ASSERT(param0); GF_ASSERT(SpriteResource_GetType(param0) == 1); - v0.unk_00 = SpriteResource_GetPaletteData(param0); + v0.unk_00 = SpriteResource_GetPaletteFade(param0); v0.unk_04 = SpriteResource_GetVRAMType(param0); v0.unk_0C = SpriteResource_GetID(param0); v0.unk_08 = SpriteResource_GetPaletteIndex(param0); @@ -230,7 +230,7 @@ BOOL sub_0200A640(const SpriteResource *param0) GF_ASSERT(param0); GF_ASSERT(SpriteResource_GetType(param0) == 1); - v0.unk_00 = SpriteResource_GetPaletteData(param0); + v0.unk_00 = SpriteResource_GetPaletteFade(param0); v0.unk_04 = SpriteResource_GetVRAMType(param0); v0.unk_0C = SpriteResource_GetID(param0); v0.unk_08 = SpriteResource_GetPaletteIndex(param0); @@ -262,7 +262,7 @@ void sub_0200A6B8(const SpriteResource *param0) GF_ASSERT(param0); v1 = SpriteResource_GetID(param0); - v0 = SpriteResource_GetPaletteData(param0); + v0 = SpriteResource_GetPaletteFade(param0); sub_0201F990(v1, v0); } diff --git a/src/unk_0200C6E4.c b/src/unk_0200C6E4.c index ed897e43a2..a5c3025171 100644 --- a/src/unk_0200C6E4.c +++ b/src/unk_0200C6E4.c @@ -466,7 +466,7 @@ u8 sub_0200CD7C(PaletteData *param0, int param1, SpriteRenderer *param2, SpriteG return v0; } -u8 SpriteRenderer_LoadPalette(PaletteData *param0, enum PaletteBufferId param1, SpriteRenderer *param2, SpriteGfxHandler *param3, NARC *param4, int param5, BOOL param6, int param7, int param8, int param9) +u8 SpriteRenderer_LoadPalette(PaletteData *param0, enum PaletteFadeBufferId param1, SpriteRenderer *param2, SpriteGfxHandler *param3, NARC *param4, int param5, BOOL param6, int param7, int param8, int param9) { int v0; diff --git a/src/unk_0208A3F4.c b/src/unk_0208A3F4.c index 8382f373c3..3fdc3e1703 100644 --- a/src/unk_0208A3F4.c +++ b/src/unk_0208A3F4.c @@ -67,7 +67,7 @@ void sub_0208A490 (UnkStruct_02089688 * param0) BgConfig *v1; SpriteRenderer * v2; SpriteGfxHandler * v3; - PaletteData * v4; + PaletteData *v4; v2 = param0->unk_2C0.unk_04; v3 = param0->unk_2C0.unk_08; @@ -300,7 +300,7 @@ void sub_0208A8A0 (UnkStruct_02089688 * param0) SpriteTemplate v0; SpriteRenderer * v1; SpriteGfxHandler * v2; - PaletteData * v3; + PaletteData *v3; v1 = param0->unk_2C0.unk_04; v2 = param0->unk_2C0.unk_08; @@ -356,7 +356,7 @@ void sub_0208A9BC (UnkStruct_02089688 * param0) SpriteTemplate v0; SpriteRenderer * v1; SpriteGfxHandler * v2; - PaletteData * v3; + PaletteData *v3; v1 = param0->unk_2C0.unk_04; v2 = param0->unk_2C0.unk_08; From 5f3e1eb7a0e84c453ce138bfc7297201fbecd598 Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 07:51:38 -0700 Subject: [PATCH 03/11] Identify extern functions in palette.h --- include/inlines.h | 2 +- include/palette.h | 52 ++++++------- src/battle/battle_display.c | 76 +++++++++---------- src/battle/battle_script.c | 34 ++++----- src/battle/healthbar.c | 4 +- src/battle/ov16_0223B140.c | 80 ++++++++++---------- src/battle/ov16_0223DF00.c | 2 +- src/battle/ov16_02268520.c | 2 +- src/battle/ov16_0226871C.c | 34 ++++----- src/overlay005/encounter_effect.c | 2 +- src/overlay005/ov5_021F007C.c | 2 +- src/overlay010/ov10_0221F800.c | 28 +++---- src/overlay011/ov11_0221F800.c | 2 +- src/overlay012/ov12_0221FC20.c | 46 ++++++------ src/overlay012/ov12_02225864.c | 8 +- src/overlay012/ov12_02226B84.c | 8 +- src/overlay012/ov12_0222AC70.c | 28 +++---- src/overlay012/ov12_0222E91C.c | 4 +- src/overlay012/ov12_0222F700.c | 24 +++--- src/overlay012/ov12_02234E44.c | 2 +- src/overlay012/ov12_02235E94.c | 18 ++--- src/overlay013/ov13_0221FC20.c | 22 +++--- src/overlay013/ov13_02225710.c | 4 +- src/overlay013/ov13_022264F4.c | 16 ++-- src/overlay013/ov13_02227BDC.c | 2 +- src/overlay017/ov17_0223B140.c | 30 ++++---- src/overlay017/ov17_0223CB1C.c | 52 ++++++------- src/overlay017/ov17_0223DAD0.c | 36 ++++----- src/overlay017/ov17_0223F7E4.c | 16 ++-- src/overlay017/ov17_022413D8.c | 6 +- src/overlay017/ov17_02247A48.c | 8 +- src/overlay017/ov17_022492DC.c | 10 +-- src/overlay017/ov17_0224A0FC.c | 12 +-- src/overlay017/ov17_0224CFB8.c | 8 +- src/overlay017/ov17_0224F4D4.c | 26 +++---- src/overlay017/ov17_02250744.c | 16 ++-- src/overlay021/ov21_021E737C.c | 4 +- src/overlay021/ov21_021E8D48.c | 10 +-- src/overlay062/ov62_0222F2C0.c | 28 +++---- src/overlay062/ov62_022300D8.c | 20 ++--- src/overlay062/ov62_02231690.c | 16 ++-- src/overlay062/ov62_02234A10.c | 34 ++++----- src/overlay062/ov62_02235278.c | 60 +++++++-------- src/overlay062/ov62_02235E64.c | 24 +++--- src/overlay062/ov62_02236CBC.c | 30 ++++---- src/overlay062/ov62_02237D24.c | 52 ++++++------- src/overlay062/ov62_02239D60.c | 50 ++++++------- src/overlay062/ov62_0223CAEC.c | 26 +++---- src/overlay062/ov62_0223DFA8.c | 68 ++++++++--------- src/overlay062/ov62_02241204.c | 120 +++++++++++++++--------------- src/overlay062/ov62_02247D74.c | 16 ++-- src/overlay063/ov63_0222AE60.c | 4 +- src/overlay073/ov73_021D0D80.c | 4 +- src/overlay073/ov73_021D3250.c | 2 +- src/overlay075/ov75_021D0D80.c | 50 ++++++------- src/overlay076/ov76_0223B870.c | 22 +++--- src/overlay076/ov76_0223D338.c | 50 ++++++------- src/overlay099/ov99_021D0D80.c | 28 +++---- src/overlay099/ov99_021D1A54.c | 22 +++--- src/overlay099/ov99_021D2E28.c | 4 +- src/overlay099/ov99_021D340C.c | 8 +- src/overlay099/ov99_021D4134.c | 4 +- src/overlay100/ov100_021D0D80.c | 28 +++---- src/overlay100/ov100_021D13E4.c | 4 +- src/overlay100/ov100_021D1C44.c | 4 +- src/overlay100/ov100_021D2F0C.c | 2 +- src/overlay100/ov100_021D46C8.c | 6 +- src/overlay104/ov104_0222FBE4.c | 6 +- src/overlay104/ov104_02231F74.c | 4 +- src/overlay104/ov104_02237378.c | 4 +- src/overlay104/ov104_02237DD8.c | 2 +- src/overlay104/ov104_0223C2D4.c | 38 +++++----- src/overlay104/ov104_0223D9E4.c | 4 +- src/overlay104/ov104_0223DC7C.c | 10 +-- src/overlay105/ov105_02241AE0.c | 14 ++-- src/overlay106/ov106_02241AE0.c | 14 ++-- src/overlay107/ov107_02241AE0.c | 14 ++-- src/overlay107/ov107_02245EB0.c | 14 ++-- src/overlay108/ov108_02241AE0.c | 14 ++-- src/overlay109/ov109_021D0D80.c | 38 +++++----- src/overlay110/ov110_021D0D80.c | 14 ++-- src/overlay111/ov111_021D0D80.c | 14 ++-- src/overlay112/ov112_0225C700.c | 2 +- src/overlay113/ov113_0225C700.c | 66 ++++++++-------- src/overlay116/ov116_022604C4.c | 28 +++---- src/overlay116/ov116_02261870.c | 10 +-- src/overlay116/ov116_0226432C.c | 16 ++-- src/overlay117/ov117_02260668.c | 42 +++++------ src/overlay117/ov117_022626B0.c | 2 +- src/overlay117/ov117_02263AF0.c | 18 ++--- src/overlay119/ov119_021D0D80.c | 12 +-- src/overlay119/ov119_021D191C.c | 24 +++--- src/palette.c | 70 ++++++++--------- src/unk_0200762C.c | 4 +- src/unk_0200C6E4.c | 4 +- src/unk_0201567C.c | 8 +- src/unk_0207AE68.c | 72 +++++++++--------- src/unk_020890F4.c | 24 +++--- src/unk_02089604.c | 2 +- src/unk_0208A3F4.c | 8 +- src/unk_02097B18.c | 22 +++--- src/unk_02098218.c | 22 +++--- 102 files changed, 1091 insertions(+), 1091 deletions(-) diff --git a/include/inlines.h b/include/inlines.h index e10b68c947..b218b34368 100644 --- a/include/inlines.h +++ b/include/inlines.h @@ -81,7 +81,7 @@ static inline void inline_ov61_0222C3B0_sub_1(UnkStruct_ov61_0222C3B0 *param0) do { GF_ASSERT(v1 < (((16 << 8) / 0x300 + 2) * (4 - 1))); for (v4 = 1; v4 < 1 + 15; v4++) { - sub_0200393C(¶m0->unk_08[v0][v4], ¶m0->unk_88[v1][v4], 1, v3 >> 8, param0->unk_08[v2][v4]); + BlendPalette(¶m0->unk_08[v0][v4], ¶m0->unk_88[v1][v4], 1, v3 >> 8, param0->unk_08[v2][v4]); } v1++; if (v5 == 1) { diff --git a/include/palette.h b/include/palette.h index d5160001b3..122be45f7b 100644 --- a/include/palette.h +++ b/include/palette.h @@ -37,31 +37,31 @@ typedef struct PaletteData { u8 forceExit; } PaletteData; -PaletteData *sub_02002F38(int param0); -void sub_02002F54(PaletteData *param0); -void sub_02002F5C(PaletteData *param0, int param1, void *param2, void *param3, u32 param4); -void sub_02002F70(PaletteData *param0, int param1, u32 param2, u32 param3); -void sub_02002FA0(PaletteData *param0, int param1); -void sub_02002FBC(PaletteData *param0, const void *param1, int param2, u16 param3, u16 param4); -void sub_02002FEC(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6, u16 param7); -void PaletteSys_LoadPalette(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6); -void sub_02003070(PaletteData *param0, int param1, u16 param2, u32 param3); -void sub_020030E4(u32 param0, u32 param1, u32 param2, u32 param3, u16 param4, void *param5); -void sub_02003120(PaletteData *param0, int param1, u16 param2, int param3, u16 param4, u16 param5); -u16 *sub_02003164(PaletteData *param0, int param1); -u16 *sub_0200316C(PaletteData *param0, int param1); -u8 sub_02003178(PaletteData *param0, u16 param1, u16 param2, s8 param3, u8 param4, u8 param5, u16 param6); -void sub_02003694(PaletteData *param0); -u16 sub_0200384C(PaletteData *param0); -void sub_02003858(PaletteData *param0, int param1); -void sub_0200387C(PaletteData *param0, u8 param1); -void sub_020038B0(PaletteData *param0, int param1, int param2, u16 param3, u16 param4, u16 param5); -u16 sub_02003910(PaletteData *param0, int param1, int param2, u16 param3); -void sub_0200393C(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4); -void sub_020039B0(PaletteData *param0, int param1, u16 param2, u16 param3, u8 param4, u16 param5); -void sub_020039F8(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4); -void sub_02003A2C(PaletteData *param0, int param1, u16 param2, u8 param3, u16 param4); -void sub_02003A8C(u16 *param0, int param1, int param2, int param3, int param4); -void sub_02003B08(PaletteData *param0, u32 param1, u32 param2, u32 param3, int param4, u32 param5, u16 param6, int param7, int param8, int param9); +PaletteData *PaletteData_New(int param0); +void PaletteData_Free(PaletteData *param0); +void PaletteData_InitBuffer(PaletteData *param0, int param1, void *param2, void *param3, u32 param4); +void PaletteData_AllocBuffer(PaletteData *param0, int param1, u32 param2, u32 param3); +void PaletteData_FreeBuffer(PaletteData *param0, int param1); +void PaletteData_LoadBuffer(PaletteData *param0, const void *param1, int param2, u16 param3, u16 param4); +void PaletteData_LoadBufferFromFile(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6, u16 param7); +void PaletteData_LoadBufferFromFileStart(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6); +void PaletteData_LoadBufferFromHardware(PaletteData *param0, int param1, u16 param2, u32 param3); +void LoadPaletteFromFile(u32 param0, u32 param1, u32 param2, u32 param3, u16 param4, void *param5); +void PaletteData_CopyBuffer(PaletteData *param0, int param1, u16 param2, int param3, u16 param4, u16 param5); +u16 *PaletteData_GetUnfadedBuffer(PaletteData *param0, int param1); +u16 *PaletteData_GetFadedBuffer(PaletteData *param0, int param1); +u8 PaletteData_StartFade(PaletteData *param0, u16 param1, u16 param2, s8 param3, u8 param4, u8 param5, u16 param6); +void PaletteData_CommitFadedBuffers(PaletteData *param0); +u16 PaletteData_GetSelectedBuffersMask(PaletteData *param0); +void PaletteData_SetAutoTransparent(PaletteData *param0, int param1); +void PaletteData_SelectAll(PaletteData *param0, u8 param1); +void PaletteData_FillBufferRange(PaletteData *param0, int param1, int param2, u16 param3, u16 param4, u16 param5); +u16 PaletteData_GetBufferIndexColor(PaletteData *param0, int param1, int param2, u16 param3); +void BlendPalette(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4); +void PaletteData_Blend(PaletteData *param0, int param1, u16 param2, u16 param3, u8 param4, u16 param5); +void BlendPalettes(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4); +void PaletteData_BlendMulti(PaletteData *param0, int param1, u16 param2, u8 param3, u16 param4); +void TintPalette(u16 *param0, int param1, int param2, int param3, int param4); +void PaletteData_TintFromFile(PaletteData *param0, u32 param1, u32 param2, u32 param3, int param4, u32 param5, u16 param6, int param7, int param8, int param9); #endif // POKEPLATINUM_PALETTE_H diff --git a/src/battle/battle_display.c b/src/battle/battle_display.c index 4016054486..57cb471f90 100644 --- a/src/battle/battle_display.c +++ b/src/battle/battle_display.c @@ -3593,12 +3593,12 @@ static void ov16_022611DC(SysTask *param0, void *param1) case 0: v0->unk_10 = ov16_0226CD08(ov16_0223E02C(v0->unk_00)); sub_02015738(ov16_0223E220(v0->unk_00), 1); - sub_02003178(v1, (0x1 | 0x4), 0xc00, -8, 0, 7, 0x0); - sub_02003178(v1, (0x2 | 0x8), 0xffff, -8, 0, 16, 0x0); + PaletteData_StartFade(v1, (0x1 | 0x4), 0xc00, -8, 0, 7, 0x0); + PaletteData_StartFade(v1, (0x2 | 0x8), 0xffff, -8, 0, 16, 0x0); v0->unk_0E++; break; case 1: - if (sub_0200384C(v1) == 0) { + if (PaletteData_GetSelectedBuffersMask(v1) == 0) { { ov16_0223B384(v0->unk_00); @@ -3706,12 +3706,12 @@ static void ov16_022611DC(SysTask *param0, void *param1) case 6: ov16_0223B430(v0->unk_00); ov16_0226CD10(ov16_0223E02C(v0->unk_00), v0->unk_10); - sub_02003178(v1, (0x1 | 0x4), 0xc00, -8, 7, 0, 0x0); - sub_02003178(v1, (0x2 | 0x8), 0xffff, -8, 16, 0, 0x0); + PaletteData_StartFade(v1, (0x1 | 0x4), 0xc00, -8, 7, 0, 0x0); + PaletteData_StartFade(v1, (0x2 | 0x8), 0xffff, -8, 16, 0, 0x0); v0->unk_0E++; break; case 7: - if (sub_0200384C(v1) == 0) { + if (PaletteData_GetSelectedBuffersMask(v1) == 0) { sub_02015738(ov16_0223E220(v0->unk_00), 0); if (v0->unk_04->unk_1C) { @@ -4187,12 +4187,12 @@ static void ov16_02261E8C(SysTask *param0, void *param1) v0->unk_17 = ov16_0226CD08(ov16_0223E02C(v0->unk_00)); sub_02015738(ov16_0223E220(v0->unk_00), 1); - sub_02003178(v1, (0x1 | 0x4), 0xc00, -8, 0, 7, 0x0); - sub_02003178(v1, (0x2 | 0x8), 0xffff, -8, 0, 16, 0x0); + PaletteData_StartFade(v1, (0x1 | 0x4), 0xc00, -8, 0, 7, 0x0); + PaletteData_StartFade(v1, (0x2 | 0x8), 0xffff, -8, 0, 16, 0x0); v0->unk_0A++; break; case 1: - if (sub_0200384C(v1) == 0) { + if (PaletteData_GetSelectedBuffersMask(v1) == 0) { { int v3; int v4 = 0; @@ -4297,13 +4297,13 @@ static void ov16_02261E8C(SysTask *param0, void *param1) if (v0->unk_04->unk_36) { ov16_0223B430(v0->unk_00); ov16_0226CD10(ov16_0223E02C(v0->unk_00), v0->unk_04->unk_32); - sub_02003178(v1, (0x1 | 0x4), 0xc00, -8, 7, 0, 0x0); - sub_02003178(v1, (0x2 | 0x8), 0xffff, -8, 16, 0, 0x0); + PaletteData_StartFade(v1, (0x1 | 0x4), 0xc00, -8, 7, 0, 0x0); + PaletteData_StartFade(v1, (0x2 | 0x8), 0xffff, -8, 16, 0, 0x0); v0->unk_0A++; } break; case 3: - if (sub_0200384C(v1) == 0) { + if (PaletteData_GetSelectedBuffersMask(v1) == 0) { sub_02015738(ov16_0223E220(v0->unk_00), 0); if (v0->unk_04->unk_11 == 6) { @@ -4911,12 +4911,12 @@ static void ov16_02262D28(SysTask *param0, void *param1) switch (v0->unk_06) { case 0: sub_02015738(ov16_0223E220(v0->unk_00), 1); - sub_02003178(v1, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(v1, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); sub_0200872C(v2, 0, 16, 0, 0x0); sub_0200564C(0, 16); v0->unk_06++; case 1: - if (sub_0200384C(v1) == 0) { + if (PaletteData_GetSelectedBuffersMask(v1) == 0) { v0->unk_06++; } break; @@ -5144,8 +5144,8 @@ static void ov16_02263014(SysTask *param0, void *param1) case 1: if (v0->unk_15 == 10) { - sub_02003178(v2, 0x1, 0xf3ff, 0, 0, 16, v4); - sub_02003178(v2, 0x4, 0x3fff, 0, 0, 16, v4); + PaletteData_StartFade(v2, 0x1, 0xf3ff, 0, 0, 16, v4); + PaletteData_StartFade(v2, 0x4, 0x3fff, 0, 0, 16, v4); } if ((v0->unk_15 >= 10) && (v0->unk_16 < 16)) { @@ -5158,7 +5158,7 @@ static void ov16_02263014(SysTask *param0, void *param1) v0->unk_16 = 16; } - v8 = sub_0200316C(v2, 1); + v8 = PaletteData_GetFadedBuffer(v2, 1); for (v6 = 0; v6 < 256; v6++) { v7 = (0 + ((0x1f - 0) * v0->unk_16 >> 4)); @@ -5175,25 +5175,25 @@ static void ov16_02263014(SysTask *param0, void *param1) } if (v0->unk_15 == 28) { - MI_CpuCopy16(ov16_0223F204(v0->unk_00), sub_02003164(v2, 0), 0x20 * 7); + MI_CpuCopy16(ov16_0223F204(v0->unk_00), PaletteData_GetUnfadedBuffer(v2, 0), 0x20 * 7); if (BattleSystem_BattleType(v0->unk_00) == (0x2 | 0x8 | 0x40)) { - MI_CpuCopy16(ov16_0223F210(v0->unk_00), sub_02003164(v2, 2), 0x20 * 5); + MI_CpuCopy16(ov16_0223F210(v0->unk_00), PaletteData_GetUnfadedBuffer(v2, 2), 0x20 * 5); } else if (BattleSystem_BattleType(v0->unk_00) & 0x2) { - MI_CpuCopy16(ov16_0223F210(v0->unk_00), sub_02003164(v2, 2), 0x20 * 7); + MI_CpuCopy16(ov16_0223F210(v0->unk_00), PaletteData_GetUnfadedBuffer(v2, 2), 0x20 * 7); } else if (BattleSystem_BattleType(v0->unk_00) & 0x1) { - MI_CpuCopy16(ov16_0223F210(v0->unk_00), sub_02003164(v2, 2), 0x20 * 5); + MI_CpuCopy16(ov16_0223F210(v0->unk_00), PaletteData_GetUnfadedBuffer(v2, 2), 0x20 * 5); } else { - MI_CpuCopy16(ov16_0223F210(v0->unk_00), sub_02003164(v2, 2), 0x20 * 4); + MI_CpuCopy16(ov16_0223F210(v0->unk_00), PaletteData_GetUnfadedBuffer(v2, 2), 0x20 * 4); } - sub_02003178(v2, 0x1, 0xf3ff, 0, 16, 0, v4); - sub_02003178(v2, 0x4, 0x3fff, 0, 16, 0, v4); - sub_02003178(v2, (0x2 | 0x8), 0xffff, 0, 16, 0, v4); + PaletteData_StartFade(v2, 0x1, 0xf3ff, 0, 16, 0, v4); + PaletteData_StartFade(v2, 0x4, 0x3fff, 0, 16, 0, v4); + PaletteData_StartFade(v2, (0x2 | 0x8), 0xffff, 0, 16, 0, v4); } if (v0->unk_15 >= 50) { - sub_02003178(v2, 0x1, 0xc00, 0, 16, 0, 0x0); + PaletteData_StartFade(v2, 0x1, 0xc00, 0, 16, 0, 0x0); v0->unk_14++; } break; @@ -5213,21 +5213,21 @@ static void ov16_02263014(SysTask *param0, void *param1) ov12_02237F74(v0->unk_04); v0->unk_14++; case 5: - MI_CpuCopy16(ov16_0223F204(v0->unk_00), sub_02003164(v2, 0), 0x20 * 7); + MI_CpuCopy16(ov16_0223F204(v0->unk_00), PaletteData_GetUnfadedBuffer(v2, 0), 0x20 * 7); if (BattleSystem_BattleType(v0->unk_00) == (0x2 | 0x8 | 0x40)) { - MI_CpuCopy16(ov16_0223F210(v0->unk_00), sub_02003164(v2, 2), 0x20 * 5); + MI_CpuCopy16(ov16_0223F210(v0->unk_00), PaletteData_GetUnfadedBuffer(v2, 2), 0x20 * 5); } else if (BattleSystem_BattleType(v0->unk_00) & 0x2) { - MI_CpuCopy16(ov16_0223F210(v0->unk_00), sub_02003164(v2, 2), 0x20 * 7); + MI_CpuCopy16(ov16_0223F210(v0->unk_00), PaletteData_GetUnfadedBuffer(v2, 2), 0x20 * 7); } else if (BattleSystem_BattleType(v0->unk_00) & 0x1) { - MI_CpuCopy16(ov16_0223F210(v0->unk_00), sub_02003164(v2, 2), 0x20 * 5); + MI_CpuCopy16(ov16_0223F210(v0->unk_00), PaletteData_GetUnfadedBuffer(v2, 2), 0x20 * 5); } else { - MI_CpuCopy16(ov16_0223F210(v0->unk_00), sub_02003164(v2, 2), 0x20 * 4); + MI_CpuCopy16(ov16_0223F210(v0->unk_00), PaletteData_GetUnfadedBuffer(v2, 2), 0x20 * 4); } - sub_02003178(v2, 0x1, 0xffff, 0, 0, 0, 0x7fff); - sub_02003178(v2, 0x4, 0x3fff, 0, 0, 0, 0xffff); - sub_02003178(v2, (0x2 | 0x8), 0xffff, 0, 0, 0, 0x7fff); + PaletteData_StartFade(v2, 0x1, 0xffff, 0, 0, 0, 0x7fff); + PaletteData_StartFade(v2, 0x4, 0x3fff, 0, 0, 0, 0xffff); + PaletteData_StartFade(v2, (0x2 | 0x8), 0xffff, 0, 0, 0, 0x7fff); v0->unk_14 = 3; break; } @@ -5242,11 +5242,11 @@ static void ov16_022633A4(SysTask *param0, void *param1) switch (v0->unk_0A) { case 0: - sub_02003178(v1, (0x2 | 0x8), 0xffff, -8, 0, 16, 0x0); + PaletteData_StartFade(v1, (0x2 | 0x8), 0xffff, -8, 0, 16, 0x0); v0->unk_0A++; break; case 1: - if (sub_0200384C(v1) == 0) { + if (PaletteData_GetSelectedBuffersMask(v1) == 0) { ov16_0223B384(v0->unk_00); v0->unk_04 = Heap_AllocFromHeap(5, sizeof(UnkStruct_ov13_0221FC20)); @@ -5269,12 +5269,12 @@ static void ov16_022633A4(SysTask *param0, void *param1) case 2: if (v0->unk_04->unk_36) { ov16_0223B430(v0->unk_00); - sub_02003178(v1, (0x2 | 0x8), 0xffff, -8, 16, 0, 0x0); + PaletteData_StartFade(v1, (0x2 | 0x8), 0xffff, -8, 16, 0, 0x0); v0->unk_0A++; } break; case 3: - if (sub_0200384C(v1) == 0) { + if (PaletteData_GetSelectedBuffersMask(v1) == 0) { if (v0->unk_04->unk_34 == 4) { ov16_02265B10(v0->unk_00, v0->unk_09, 0xff); } else { diff --git a/src/battle/battle_script.c b/src/battle/battle_script.c index 212568b8e1..d0a6805685 100644 --- a/src/battle/battle_script.c +++ b/src/battle/battle_script.c @@ -10139,7 +10139,7 @@ static void BattleScript_GetExpTask(SysTask *task, void *inData) BattleSystem_SetGaugePriority(data->battleSys, 0 + 2); // gauge's default is 0 Window_SetFrame(bgl, 2, 1, 0, HEAP_ID_BATTLE); - PaletteSys_LoadPalette(paletteSys, NARC_INDEX_GRAPHIC__PL_WINFRAME, Window_FramePalette(), HEAP_ID_BATTLE, 0, 0x20, 8 * 0x10); + PaletteData_LoadBufferFromFileStart(paletteSys, NARC_INDEX_GRAPHIC__PL_WINFRAME, Window_FramePalette(), HEAP_ID_BATTLE, 0, 0x20, 8 * 0x10); Window_Add(bgl, window, 2, 0x11, 0x7, 14, 12, 11, (9 + 1)); Window_FillTilemap(window, 0xFF); Window_Show(window, 0, 1, 8); @@ -10725,12 +10725,12 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) v3 = BattleSystem_PartyPokemon(v2->battleSys, v1, v2->battleCtx->selectedPartySlot[v1]); BattleSystem_SetPokemonCatchData(v2->battleSys, v2->battleCtx, v3); sub_02015738(ov16_0223E220(v2->battleSys), 1); - sub_02003178(v4, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(v4, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); sub_0200872C(v5, 0, 16, 0, 0x0); v2->seqNum = 32; } else if (BattleSystem_CaughtSpecies(v2->battleSys, Pokemon_GetValue(v3, MON_DATA_SPECIES, NULL))) { sub_02015738(ov16_0223E220(v2->battleSys), 1); - sub_02003178(v4, (0x1 | 0x4), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(v4, (0x1 | 0x4), 0xffff, 1, 0, 16, 0x0); sub_0200872C(v5, 0, 16, 0, 0x0); v2->seqNum = 16; } else { @@ -10754,14 +10754,14 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) if (Text_IsPrinterActive(v2->tmpData[0]) == 0) { if (--v2->tmpData[1] == 0) { v2->seqNum = 12; - sub_02003178(v4, (0x1 | 0x4), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(v4, (0x1 | 0x4), 0xffff, 1, 0, 16, 0x0); sub_0200872C(v5, 0, 16, 0, 0x0); sub_02015738(ov16_0223E220(v2->battleSys), 1); } } break; case 12: - if (sub_0200384C(v4) == 0) { + if (PaletteData_GetSelectedBuffersMask(v4) == 0) { { UnkStruct_ov21_021E8E0C v12; @@ -10794,7 +10794,7 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) } if (v2->seqNum == 14) { - sub_02003178(v4, (0x1 | 0x4), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(v4, (0x1 | 0x4), 0xffff, 1, 0, 16, 0x0); ov21_021E8E04(v2->tmpPtr[0], 0); } } @@ -10814,11 +10814,11 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) ov21_021E8DD0(v2->tmpPtr[0]); sub_0201EEB8(v2->tmpPtr[1]); ov16_0223B578(v2->battleSys); - sub_02003178(v4, (0x1 | 0x4), 0xffff, 1, 16, 0, 0x0); + PaletteData_StartFade(v4, (0x1 | 0x4), 0xffff, 1, 16, 0, 0x0); v2->seqNum = 17; break; case 16: - if (sub_0200384C(v4) == 0) { + if (PaletteData_GetSelectedBuffersMask(v4) == 0) { { ArchivedSprite v14; @@ -10831,7 +10831,7 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) ov16_0223B578(v2->battleSys); Pokemon_BuildArchivedSprite(&v14, v3, 2); sub_02007C34(v5, &v14, 128, 72, 0, 0, NULL, NULL); - sub_02003178(v4, (0x1 | 0x4), 0xffff, 1, 16, 0, 0x0); + PaletteData_StartFade(v4, (0x1 | 0x4), 0xffff, 1, 16, 0, 0x0); sub_0200872C(v5, 16, 0, 0, 0x0); v2->seqNum = 17; @@ -10839,12 +10839,12 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) } break; case 17: - if (sub_0200384C(v4) == 0) { + if (PaletteData_GetSelectedBuffersMask(v4) == 0) { { v2->seqNum = 18; sub_02015738(ov16_0223E220(v2->battleSys), 0); - sub_02003858(v4, 1); + PaletteData_SetAutoTransparent(v4, 1); } } break; @@ -10861,14 +10861,14 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) v2->seqNum = 22; } else { sub_02015738(ov16_0223E220(v2->battleSys), 1); - sub_02003178(v4, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(v4, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); sub_0200872C(v5, 0, 16, 0, 0x0); v2->seqNum = 20; } } break; case 20: - if (sub_0200384C(v4) == 0) { + if (PaletteData_GetSelectedBuffersMask(v4) == 0) { { UnkStruct_0208737C *v16; @@ -10936,7 +10936,7 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) break; case 22: case 23: - if (sub_0200384C(v4) == 0) { + if (PaletteData_GetSelectedBuffersMask(v4) == 0) { { BattleMessage v21; Party *v22; @@ -10954,7 +10954,7 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) if (Party_AddPokemon(v22, v3) == 1) { if (v2->seqNum == 22) { sub_02015738(ov16_0223E220(v2->battleSys), 1); - sub_02003178(v4, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(v4, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); sub_0200872C(v5, 0, 16, 0, 0x0); } @@ -11015,7 +11015,7 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) if (--v2->tmpData[1] == 0) { { sub_02015738(ov16_0223E220(v2->battleSys), 1); - sub_02003178(v4, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(v4, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); sub_0200872C(v5, 0, 16, 0, 0x0); v2->seqNum = 32; @@ -11097,7 +11097,7 @@ static void BattleScript_CatchMonTask(SysTask *param0, void *param1) } break; case 32: - if (sub_0200384C(v4) == 0) { + if (PaletteData_GetSelectedBuffersMask(v4) == 0) { if (BattleSystem_BattleType(v2->battleSys) & (0x200 | 0x400)) { ov12_0223783C(v2->ballRotation); sub_02007DD4(v5); diff --git a/src/battle/healthbar.c b/src/battle/healthbar.c index efb4acb664..15a5e42f73 100644 --- a/src/battle/healthbar.c +++ b/src/battle/healthbar.c @@ -1789,7 +1789,7 @@ static void ov16_02268380(SysTask *param0, void *param1) v0->unk_08++; } - sub_020039B0(v3, 2, v0->unk_09 * 16 + 0, 16, v0->unk_0A, 0x73a5); + PaletteData_Blend(v3, 2, v0->unk_09 * 16 + 0, 16, v0->unk_0A, 0x73a5); break; case 2: v0->unk_0A -= 2; @@ -1799,7 +1799,7 @@ static void ov16_02268380(SysTask *param0, void *param1) v0->unk_08++; } - sub_020039B0(v3, 2, v0->unk_09 * 16 + 0, 16, v0->unk_0A, 0x73a5); + PaletteData_Blend(v3, 2, v0->unk_09 * 16 + 0, 16, v0->unk_0A, 0x73a5); break; default: v2 = sub_0200D05C(v1, 20006, NNS_G2D_VRAM_TYPE_2DMAIN); diff --git a/src/battle/ov16_0223B140.c b/src/battle/ov16_0223B140.c index 5869a6d175..06e51bfdec 100644 --- a/src/battle/ov16_0223B140.c +++ b/src/battle/ov16_0223B140.c @@ -448,9 +448,9 @@ void ov16_0223B578(BattleSystem *param0) sub_0200E218(param0->unk_04, 1, 1, 10, v1, 5); sub_02006E3C(7, 3 + param0->unk_2400, param0->unk_04, 3, 0, 0, 1, 5); - PaletteSys_LoadPalette(param0->unk_28, 7, 172 + (param0->unk_2400 * 3) + ov16_0223EC04(param0), 5, 0, 0, 0); - PaletteSys_LoadPalette(param0->unk_28, 38, sub_0200DD08(v1), 5, 0, 0x20, 10 * 0x10); - PaletteSys_LoadPalette(param0->unk_28, 14, 7, 5, 0, 0x20, 0xb * 0x10); + PaletteData_LoadBufferFromFileStart(param0->unk_28, 7, 172 + (param0->unk_2400 * 3) + ov16_0223EC04(param0), 5, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_28, 38, sub_0200DD08(v1), 5, 0, 0x20, 10 * 0x10); + PaletteData_LoadBufferFromFileStart(param0->unk_28, 14, 7, 5, 0, 0x20, 0xb * 0x10); sub_02006E60(7, 2, param0->unk_04, 3, 0, 0, 1, 5); } @@ -541,13 +541,13 @@ static void ov16_0223B790(OverlayManager *param0) } v0->unk_1A8 = v0->unk_1A4; - v0->unk_28 = sub_02002F38(5); + v0->unk_28 = PaletteData_New(5); - sub_02003858(v0->unk_28, 1); - sub_02002F70(v0->unk_28, 0, 0x200, 5); - sub_02002F70(v0->unk_28, 1, 0x200, 5); - sub_02002F70(v0->unk_28, 2, (((16 - 2) * 16) * sizeof(u16)), 5); - sub_02002F70(v0->unk_28, 3, 0x200, 5); + PaletteData_SetAutoTransparent(v0->unk_28, 1); + PaletteData_AllocBuffer(v0->unk_28, 0, 0x200, 5); + PaletteData_AllocBuffer(v0->unk_28, 1, 0x200, 5); + PaletteData_AllocBuffer(v0->unk_28, 2, (((16 - 2) * 16) * sizeof(u16)), 5); + PaletteData_AllocBuffer(v0->unk_28, 3, 0x200, 5); v0->unk_04 = BgConfig_New(5); v0->windows = Window_New(5, 3); @@ -620,21 +620,21 @@ static void ov16_0223B790(OverlayManager *param0) v0->strFormatter = StringTemplate_Default(5); v0->msgBuffer = Strbuf_Init((2 * 160), 5); - MI_CpuCopy16(sub_02003164(v0->unk_28, 0), &v0->unk_2224[0], 0x20 * 7); - MI_CpuCopy16(sub_02003164(v0->unk_28, 2), &v0->unk_2304[0], 0x20 * 7); + MI_CpuCopy16(PaletteData_GetUnfadedBuffer(v0->unk_28, 0), &v0->unk_2224[0], 0x20 * 7); + MI_CpuCopy16(PaletteData_GetUnfadedBuffer(v0->unk_28, 2), &v0->unk_2304[0], 0x20 * 7); { int v10; v10 = ov16_0223EC04(v0); - sub_020038B0(v0->unk_28, 0, 2, Unk_ov16_0226E44C[v0->unk_2400][v10], 0, 112); - sub_020038B0(v0->unk_28, 0, 2, Unk_ov16_0226E44C[v0->unk_2400][v10], 0xc * 16, 0xc * 16 + 4 * 16); - sub_020038B0(v0->unk_28, 2, 2, Unk_ov16_0226E44C[v0->unk_2400][v10], 0, ((16 - 2) * 16) - 1); + PaletteData_FillBufferRange(v0->unk_28, 0, 2, Unk_ov16_0226E44C[v0->unk_2400][v10], 0, 112); + PaletteData_FillBufferRange(v0->unk_28, 0, 2, Unk_ov16_0226E44C[v0->unk_2400][v10], 0xc * 16, 0xc * 16 + 4 * 16); + PaletteData_FillBufferRange(v0->unk_28, 2, 2, Unk_ov16_0226E44C[v0->unk_2400][v10], 0, ((16 - 2) * 16) - 1); } - sub_020038B0(v0->unk_28, 0, 0, 0x0, 0xa * 16, 0xa * 16 + 2 * 16); - sub_020038B0(v0->unk_28, 1, 0, 0x0, 0, 255); - sub_020038B0(v0->unk_28, 3, 0, 0xffff, 0, 255); + PaletteData_FillBufferRange(v0->unk_28, 0, 0, 0x0, 0xa * 16, 0xa * 16 + 2 * 16); + PaletteData_FillBufferRange(v0->unk_28, 1, 0, 0x0, 0, 255); + PaletteData_FillBufferRange(v0->unk_28, 3, 0, 0xffff, 0, 255); v0->unk_1AC = sub_0201567C(v0->unk_28, 0, 0xb, 5); sub_02015738(v0->unk_1AC, 1); @@ -755,11 +755,11 @@ static void ov16_0223BCB4(OverlayManager *param0) } Heap_FreeToHeap(v0->msgBuffer); - sub_02002FA0(v0->unk_28, 0); - sub_02002FA0(v0->unk_28, 1); - sub_02002FA0(v0->unk_28, 2); - sub_02002FA0(v0->unk_28, 3); - sub_02002F54(v0->unk_28); + PaletteData_FreeBuffer(v0->unk_28, 0); + PaletteData_FreeBuffer(v0->unk_28, 1); + PaletteData_FreeBuffer(v0->unk_28, 2); + PaletteData_FreeBuffer(v0->unk_28, 3); + PaletteData_Free(v0->unk_28); MessageLoader_Free(v0->unk_0C); MessageLoader_Free(v0->unk_10); StringTemplate_Free(v0->strFormatter); @@ -933,9 +933,9 @@ static void ov16_0223C004(BattleSystem *param0, BgConfig *param1) sub_0200E218(param1, 1, 1, 10, v3, 5); sub_02006E3C(7, 3 + param0->unk_2400, param1, 3, 0, 0, 1, 5); - PaletteSys_LoadPalette(param0->unk_28, 7, 172 + (param0->unk_2400 * 3) + ov16_0223EC04(param0), 5, 0, 0, 0); - PaletteSys_LoadPalette(param0->unk_28, 38, sub_0200DD08(v3), 5, 0, 0x20, 10 * 0x10); - PaletteSys_LoadPalette(param0->unk_28, 14, 7, 5, 0, 0x20, 0xb * 0x10); + PaletteData_LoadBufferFromFileStart(param0->unk_28, 7, 172 + (param0->unk_2400 * 3) + ov16_0223EC04(param0), 5, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_28, 38, sub_0200DD08(v3), 5, 0, 0x20, 10 * 0x10); + PaletteData_LoadBufferFromFileStart(param0->unk_28, 14, 7, 5, 0, 0x20, 0xb * 0x10); sub_02006E60(7, 2, param1, 3, 0, 0, 1, 5); } @@ -1524,7 +1524,7 @@ static void ov16_0223CE68(void *param0) sub_02008A94(v0->unk_88); sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_28); + PaletteData_CommitFadedBuffers(v0->unk_28); Bg_RunScheduledUpdates(v0->unk_04); OS_SetIrqCheckFlag(OS_IE_V_BLANK); @@ -1534,7 +1534,7 @@ static void ov16_0223CF1C(void *param0) { UnkStruct_0207A778 *v0 = param0; - sub_02003694(v0->unk_0C); + PaletteData_CommitFadedBuffers(v0->unk_0C); sub_0201DCAC(); Bg_RunScheduledUpdates(v0->unk_04); @@ -1651,11 +1651,11 @@ static void ov16_0223D10C(OverlayManager *param0, BattleParams *param1) v0->unk_1020 = 0; v0->unk_1021 = 0; v0->unk_1022 = 0; - v0->unk_0C = sub_02002F38(5); + v0->unk_0C = PaletteData_New(5); - sub_02003858(v0->unk_0C, 1); - sub_02002F70(v0->unk_0C, 0, 0x200, 5); - sub_020038B0(v0->unk_0C, 0, 2, 0x0, 0, 256); + PaletteData_SetAutoTransparent(v0->unk_0C, 1); + PaletteData_AllocBuffer(v0->unk_0C, 0, 0x200, 5); + PaletteData_FillBufferRange(v0->unk_0C, 0, 2, 0x0, 0, 256); v0->unk_04 = BgConfig_New(5); v0->unk_08 = Window_New(5, 1); @@ -1724,9 +1724,9 @@ static void ov16_0223D10C(OverlayManager *param0, BattleParams *param1) v4 = Options_Frame(param1->unk_108); sub_0200E218(v0->unk_04, 1, 1, 10, v4, 5); - PaletteSys_LoadPalette(v0->unk_0C, 14, 7, 5, 0, 0x20, 0xb * 0x10); - PaletteSys_LoadPalette(v0->unk_0C, 38, sub_0200DD08(v4), 5, 0, 0x20, 10 * 0x10); - sub_020038B0(v0->unk_0C, 0, 0, 0x0, 0, 256); + PaletteData_LoadBufferFromFileStart(v0->unk_0C, 14, 7, 5, 0, 0x20, 0xb * 0x10); + PaletteData_LoadBufferFromFileStart(v0->unk_0C, 38, sub_0200DD08(v4), 5, 0, 0x20, 10 * 0x10); + PaletteData_FillBufferRange(v0->unk_0C, 0, 0, 0x0, 0, 256); } GXLayers_TurnBothDispOn(); @@ -1750,7 +1750,7 @@ static void ov16_0223D10C(OverlayManager *param0, BattleParams *param1) } SetMainCallback(ov16_0223CF1C, v0); - sub_02003178(v0->unk_0C, (0x1 | 0x4), 0xffff, 0, 16, 0, 0x0); + PaletteData_StartFade(v0->unk_0C, (0x1 | 0x4), 0xffff, 0, 16, 0, 0x0); v0->unk_1024 = sub_0200E7FC(v0->unk_08, 1); @@ -1773,7 +1773,7 @@ static BOOL ov16_0223D354(OverlayManager *param0) v0->unk_1021++; break; case 1: - if (sub_0200384C(v0->unk_0C) == 0) { + if (PaletteData_GetSelectedBuffersMask(v0->unk_0C) == 0) { v0->unk_1021++; } break; @@ -1962,7 +1962,7 @@ static BOOL ov16_0223D354(OverlayManager *param0) v0->unk_1021++; if (v0->unk_1021 == 33) { - sub_02003178(v0->unk_0C, (0x1 | 0x4), 0xffff, 0, 0, 16, 0x0); + PaletteData_StartFade(v0->unk_0C, (0x1 | 0x4), 0xffff, 0, 0, 16, 0x0); } } else { v0->unk_1022++; @@ -1973,7 +1973,7 @@ static BOOL ov16_0223D354(OverlayManager *param0) } break; case 33: - if (sub_0200384C(v0->unk_0C) == 0) { + if (PaletteData_GetSelectedBuffersMask(v0->unk_0C) == 0) { v1 = 1; DeleteWaitDial(v0->unk_1024); sub_02036378(0); @@ -1990,8 +1990,8 @@ static void ov16_0223D7B4(OverlayManager *param0) SetMainCallback(NULL, NULL); sub_0200F344(0, 0x0); - sub_02002FA0(v0->unk_0C, 0); - sub_02002F54(v0->unk_0C); + PaletteData_FreeBuffer(v0->unk_0C, 0); + PaletteData_Free(v0->unk_0C); Windows_Delete(v0->unk_08, 1); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG1, 0); Bg_FreeTilemapBuffer(v0->unk_04, 1); diff --git a/src/battle/ov16_0223DF00.c b/src/battle/ov16_0223DF00.c index b77f81b82b..9c82d42f1b 100644 --- a/src/battle/ov16_0223DF00.c +++ b/src/battle/ov16_0223DF00.c @@ -1134,7 +1134,7 @@ void ov16_0223EF8C(BattleSystem *param0) param0->unk_220 = Heap_AllocFromHeap(5, 0x200); MI_CpuCopy32((void *)(HW_BG_VRAM + 0x10000), param0->unk_21C, 0x10000); - MI_CpuCopy32(sub_02003164(param0->unk_28, 0), param0->unk_220, HW_BG_PLTT_SIZE); + MI_CpuCopy32(PaletteData_GetUnfadedBuffer(param0->unk_28, 0), param0->unk_220, HW_BG_PLTT_SIZE); v7 = G2_GetOBJCharPtr(); v0 = SpriteActor_ImageProxy(param0->unk_17C[1].unk_00->unk_00); diff --git a/src/battle/ov16_02268520.c b/src/battle/ov16_02268520.c index d39efe87ed..3bd3382d00 100644 --- a/src/battle/ov16_02268520.c +++ b/src/battle/ov16_02268520.c @@ -206,7 +206,7 @@ void ov16_02268520(UnkStruct_ov16_02268520 *param0) SpriteRenderer_LoadCharResObjFromOpenNarc(v0, v1, v10, v3, 1, NNS_G2D_VRAM_TYPE_2DMAIN, v4); SpriteRenderer_LoadPalette(BattleSystem_PaletteSys(param0->unk_04), 2, v0, v1, v10, Unk_ov16_02270134[param0->unk_09][v9], 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 20009); - PaletteSys_LoadPalette(BattleSystem_PaletteSys(param0->unk_04), 27, Unk_ov16_02270134[param0->unk_09][v9], 5, 0, 0x20, 0x7 * 0x10); + PaletteData_LoadBufferFromFileStart(BattleSystem_PaletteSys(param0->unk_04), 27, Unk_ov16_02270134[param0->unk_09][v9], 5, 0, 0x20, 0x7 * 0x10); SpriteRenderer_LoadCellResObjFromOpenNarc(v0, v1, v10, v5, 1, v6); SpriteRenderer_LoadAnimResObjFromOpenNarc(v0, v1, v10, v7, 1, v8); NARC_dtor(v10); diff --git a/src/battle/ov16_0226871C.c b/src/battle/ov16_0226871C.c index 72970062db..7f4140b758 100644 --- a/src/battle/ov16_0226871C.c +++ b/src/battle/ov16_0226871C.c @@ -1107,13 +1107,13 @@ void *ov16_022687C8(NARC *param0, NARC *param1, BattleSystem *param2, int param3 v8 = (BattleSystem_BattleType(param2) & 0x80) ? 340 : 242; v0->unk_58 = Heap_AllocFromHeap(5, 0x200); - PaletteSys_LoadPalette(v1, 7, v8, 5, 1, 0, 0); + PaletteData_LoadBufferFromFileStart(v1, 7, v8, 5, 1, 0, 0); if (Unk_ov16_022704E4[v2].unk_00 != 0xffff) { - PaletteSys_LoadPalette(v1, 7, Unk_ov16_022704E4[v2].unk_00, 5, 1, 0x20, 0); + PaletteData_LoadBufferFromFileStart(v1, 7, Unk_ov16_022704E4[v2].unk_00, 5, 1, 0x20, 0); } - v7 = sub_02003164(v1, 1); + v7 = PaletteData_GetUnfadedBuffer(v1, 1); MI_CpuCopy16(v7, v0->unk_58, 0x200); } @@ -1305,7 +1305,7 @@ void ov16_02268C04(NARC *param0, NARC *param1, UnkStruct_ov16_02268A14 *param2, } if (1) { - sub_02002FBC(BattleSystem_PaletteSys(param2->unk_00), param2->unk_58, 1, 0, 0x200); + PaletteData_LoadBuffer(BattleSystem_PaletteSys(param2->unk_00), param2->unk_58, 1, 0, 0x200); } for (v2 = 0; v2 < 4; v2++) { @@ -2945,7 +2945,7 @@ static void ov16_0226B088(UnkStruct_ov16_02268A14 *param0, int param1) for (v1 = param1; v1 < 4; v1++) { ov16_0226B31C(param0, &Unk_ov16_0227022C[v1], &Unk_ov16_02270274[v1], 3, 0); - sub_02002FBC(v0, ¶m0->unk_58[0xe * 16], 1, (8 + v1) * 16, 0x20); + PaletteData_LoadBuffer(v0, ¶m0->unk_58[0xe * 16], 1, (8 + v1) * 16, 0x20); } } @@ -2961,7 +2961,7 @@ static void ov16_0226B0DC(UnkStruct_ov16_02268A14 *param0, int param1) ov16_0226B31C(param0, &Unk_ov16_022701FC[param1], &Unk_ov16_022702C4[param1], 4, 0); - sub_02002FBC(v0, ¶m0->unk_58[0xe * 16], 1, v2[param1] * 16, 0x20); + PaletteData_LoadBuffer(v0, ¶m0->unk_58[0xe * 16], 1, v2[param1] * 16, 0x20); Bg_ScheduleTilemapTransfer(v3, 4); Bg_FillTilemapRect(v3, 5, (0x6000 / 0x20 - 1), Unk_ov16_022702C4[param1].unk_02, Unk_ov16_022702C4[param1].unk_00, Unk_ov16_022702C4[param1].unk_03 - Unk_ov16_022702C4[param1].unk_02 + 1, Unk_ov16_022702C4[param1].unk_01 - Unk_ov16_022702C4[param1].unk_00 + 1, 17); Bg_ScheduleTilemapTransfer(v3, 5); @@ -3131,9 +3131,9 @@ static void inline_ov16_0226B318_1(SysTask *param0, void *param1) v5 = 1; } - sub_020039B0(v3, 1, v1->unk_09 * 16, 16, (v1->unk_04 >> 8) / 2, 0x7fff); - sub_020039B0(v3, 1, v1->unk_09 * 16 + 1, 1, v1->unk_04 >> 8, 0x7b1a); - sub_020039B0(v3, 1, v1->unk_09 * 16 + 0xa, 1, v1->unk_04 >> 8, 0x4634); + PaletteData_Blend(v3, 1, v1->unk_09 * 16, 16, (v1->unk_04 >> 8) / 2, 0x7fff); + PaletteData_Blend(v3, 1, v1->unk_09 * 16 + 1, 1, v1->unk_04 >> 8, 0x7b1a); + PaletteData_Blend(v3, 1, v1->unk_09 * 16 + 0xa, 1, v1->unk_04 >> 8, 0x4634); if (v5 == 1) { inline_ov16_0226B318_1_sub(v0); @@ -3178,9 +3178,9 @@ static void inline_ov16_0226B314_1(SysTask *param0, void *param1) for (v4 = 0; v4 < 4; v4++) { if (v6[v4] == 1) { - sub_020039B0(v3, 1, Unk_ov16_02270A0C[v4] * 16, 16, (v1->unk_04 >> 8) / 2, 0x7fff); - sub_020039B0(v3, 1, Unk_ov16_02270A0C[v4] * 16 + 1, 1, v1->unk_04 >> 8, 0x7b1a); - sub_020039B0(v3, 1, Unk_ov16_02270A0C[v4] * 16 + 0xa, 1, v1->unk_04 >> 8, 0x4634); + PaletteData_Blend(v3, 1, Unk_ov16_02270A0C[v4] * 16, 16, (v1->unk_04 >> 8) / 2, 0x7fff); + PaletteData_Blend(v3, 1, Unk_ov16_02270A0C[v4] * 16 + 1, 1, v1->unk_04 >> 8, 0x7b1a); + PaletteData_Blend(v3, 1, Unk_ov16_02270A0C[v4] * 16 + 0xa, 1, v1->unk_04 >> 8, 0x4634); } } @@ -3712,12 +3712,12 @@ static void ov16_0226BCE4(SysTask *param0, void *param1) v3 = BattleSystem_PaletteSys(v0->unk_00); - if (sub_0200384C(v3) != 0) { + if (PaletteData_GetSelectedBuffersMask(v3) != 0) { return; } { - sub_020039B0(v3, 1, 16 * 0 + 1, 1, v0->unk_676 >> 8, 0x7e37); + PaletteData_Blend(v3, 1, 16 * 0 + 1, 1, v0->unk_676 >> 8, 0x7e37); if (v0->unk_674 == 0) { v0->unk_676 += 0x200; @@ -3751,11 +3751,11 @@ static void ov16_0226BD74(SysTask *param0, void *param1) v1 = BattleSystem_PaletteSys(v0->unk_00); - if (sub_0200384C(v1) != 0) { + if (PaletteData_GetSelectedBuffersMask(v1) != 0) { return; } - v2 = sub_0200316C(v1, 1); + v2 = PaletteData_GetFadedBuffer(v1, 1); v3 = (16 - 8) * 2; if (gCoreSys.touchHeld && ((v4 == 1) || (v5 == 1))) { @@ -4583,7 +4583,7 @@ void ov16_0226CEB0(UnkStruct_ov16_02268A14 *param0, int param1) GF_ASSERT(param0->unk_66B == 18); sub_0200DAA4(v0, 5, 0x20, 1, 0, 5); - sub_02003070(v1, 1, 1 * 16, 0x20); + PaletteData_LoadBufferFromHardware(v1, 1, 1 * 16, 0x20); { int v2 = 0x20, v3 = 1; diff --git a/src/overlay005/encounter_effect.c b/src/overlay005/encounter_effect.c index ad7e0a9716..73d3542cea 100644 --- a/src/overlay005/encounter_effect.c +++ b/src/overlay005/encounter_effect.c @@ -783,7 +783,7 @@ void ov5_021DE5D0(CellActor *param0, u32 param1, u32 param2, u8 param3, u16 para sub_02076AAC(param2, 2, &v0); v3 = Heap_AllocFromHeap(param1, 32); v2 = sub_02006F88(v0.unk_00, v0.unk_08, &v1, param1); - sub_0200393C(v1->pRawData, v3, 16, param3, param4); + BlendPalette(v1->pRawData, v3, 16, param3, param4); ov5_021DE67C(param0, v3, 32); diff --git a/src/overlay005/ov5_021F007C.c b/src/overlay005/ov5_021F007C.c index 2d4cc16460..31a5cce95b 100644 --- a/src/overlay005/ov5_021F007C.c +++ b/src/overlay005/ov5_021F007C.c @@ -105,7 +105,7 @@ static void ov5_021F00F0(UnkStruct_ov5_021D1BEC *param0, FieldSystem *fieldSyste v1->unk_3C = 1; } - sub_020039F8(v1->unk_04->pRawData, v1->unk_08, 0x1, v1->unk_28.unk_00, (GX_RGB(31, 10, 23))); + BlendPalettes(v1->unk_04->pRawData, v1->unk_08, 0x1, v1->unk_28.unk_00, (GX_RGB(31, 10, 23))); Bg_LoadPalette(2, v1->unk_08, 32, 6 * 32); } diff --git a/src/overlay010/ov10_0221F800.c b/src/overlay010/ov10_0221F800.c index 9e183cb3be..7f8ee61f31 100644 --- a/src/overlay010/ov10_0221F800.c +++ b/src/overlay010/ov10_0221F800.c @@ -559,9 +559,9 @@ static u8 ov10_0221FB28(UnkStruct_ov10_0221FB28 *param0) ov10_0221F900(); param0->unk_0C = BgConfig_New(param0->unk_00->unk_24); - param0->unk_08 = sub_02002F38(param0->unk_00->unk_24); + param0->unk_08 = PaletteData_New(param0->unk_00->unk_24); - sub_02002F70(param0->unk_08, 0, 32 * 16, param0->unk_00->unk_24); + PaletteData_AllocBuffer(param0->unk_08, 0, 32 * 16, param0->unk_00->unk_24); Bg_MaskPalette(4, 0x0); param0->unk_B76 = 0; @@ -1098,19 +1098,19 @@ static u8 ov10_0222094C(UnkStruct_ov10_0221FB28 *param0) { if (ov10_02220AD0() == 1) { if (param0->unk_00->unk_2A == 1) { - sub_02003120(param0->unk_08, 0, 4 * 16, 0, 3 * 16, 0x20); + PaletteData_CopyBuffer(param0->unk_08, 0, 4 * 16, 0, 3 * 16, 0x20); } else { - sub_02003120(param0->unk_08, 0, 4 * 16, 0, 0 * 16, 0x20); + PaletteData_CopyBuffer(param0->unk_08, 0, 4 * 16, 0, 0 * 16, 0x20); } } else { if (param0->unk_00->unk_2A == 1) { - sub_02003120(param0->unk_08, 0, 4 * 16, 0, 0 * 16, 0x20); + PaletteData_CopyBuffer(param0->unk_08, 0, 4 * 16, 0, 0 * 16, 0x20); } else { - sub_02003120(param0->unk_08, 0, 4 * 16, 0, 3 * 16, 0x20); + PaletteData_CopyBuffer(param0->unk_08, 0, 4 * 16, 0, 3 * 16, 0x20); } } - sub_0200387C(param0->unk_08, 1); + PaletteData_SelectAll(param0->unk_08, 1); Sound_PlayEffect(1819); param0->unk_B75 = 64; return 1; @@ -1166,8 +1166,8 @@ static u8 ov10_02220A50(SysTask *param0, UnkStruct_ov10_0221FB28 *param1) ov10_02220BE8(param1); sub_0201DC3C(); - sub_02002FA0(param1->unk_08, 0); - sub_02002F54(param1->unk_08); + PaletteData_FreeBuffer(param1->unk_08, 0); + PaletteData_Free(param1->unk_08); param1->unk_00->unk_2B = 1; SysTask_FinishAndFreeParam(param0); @@ -1266,7 +1266,7 @@ static void ov10_02220C64(void *param0) UnkStruct_ov10_0221FB28 *v0 = param0; Bg_RunScheduledUpdates(v0->unk_0C); - sub_02003694(v0->unk_08); + PaletteData_CommitFadedBuffers(v0->unk_08); sub_0201DCAC(); sub_0200C800(); @@ -1438,7 +1438,7 @@ static void ov10_02220E70(UnkStruct_ov10_0221FB28 *param0) sub_0200710C(v0, 2, param0->unk_0C, 2, 0, 0, 0, param0->unk_00->unk_24); sub_0200710C(v0, 3, param0->unk_0C, 3, 0, 0, 0, param0->unk_00->unk_24); sub_02007130(v0, 1, 0, 0, 0, param0->unk_00->unk_24); - sub_02003070(param0->unk_08, 0, 0, 0x20 * 5); + PaletteData_LoadBufferFromHardware(param0->unk_08, 0, 0, 0x20 * 5); Bg_MaskPalette(1, 0x18c6); NARC_dtor(v0); } @@ -1451,11 +1451,11 @@ static void ov10_02220F1C(UnkStruct_ov10_0221FB28 *param0) v0 = Options_Frame(param0->unk_00->unk_00->unk_108); sub_0200DD0C(param0->unk_0C, 0, 1, 15, v0, param0->unk_00->unk_24); - sub_02003070(param0->unk_08, 0, 15 * 16, 0x20 * 1); + PaletteData_LoadBufferFromHardware(param0->unk_08, 0, 15 * 16, 0x20 * 1); sub_0200DAA4(param0->unk_0C, 0, (1 + (18 + 12)), 14, 0, param0->unk_00->unk_24); - sub_02003070(param0->unk_08, 0, 14 * 16, 0x20 * 1); + PaletteData_LoadBufferFromHardware(param0->unk_08, 0, 14 * 16, 0x20 * 1); Font_LoadTextPalette(0, 13 * 0x20, param0->unk_00->unk_24); - sub_02003070(param0->unk_08, 0, 13 * 16, 0x20 * 1); + PaletteData_LoadBufferFromHardware(param0->unk_08, 0, 13 * 16, 0x20 * 1); Window_Add(param0->unk_0C, ¶m0->unk_B7C, 0, 0x2, 0x13, 27, 4, 13, ((1 + (18 + 12)) + 9)); Window_Add(param0->unk_0C, ¶m0->unk_B8C, 0, 0x2, 0x13, 27, 4, 13, ((1 + (18 + 12)) + 9)); } diff --git a/src/overlay011/ov11_0221F800.c b/src/overlay011/ov11_0221F800.c index 182ef40bd7..285212dc7b 100644 --- a/src/overlay011/ov11_0221F800.c +++ b/src/overlay011/ov11_0221F800.c @@ -433,5 +433,5 @@ void ov11_0221F81C(PaletteData *param0, int param1, int param2, int param3, int const u16 *v0; v0 = ov11_0221F800(param1); - sub_02002FBC(param0, v0, param3, param4 * 16, 0x20); + PaletteData_LoadBuffer(param0, v0, param3, param4 * 16, 0x20); } diff --git a/src/overlay012/ov12_0221FC20.c b/src/overlay012/ov12_0221FC20.c index e2e4dcc3c7..591d7a96f5 100644 --- a/src/overlay012/ov12_0221FC20.c +++ b/src/overlay012/ov12_0221FC20.c @@ -2045,7 +2045,7 @@ static void ov12_0222128C(UnkStruct_ov12_0221FCDC *param0) Bg_ToggleLayer(2, 0); Bg_LoadTiles(param0->unk_C0, 2, v0, (10 * 10 * ((8 / 2) * 8)), 0); - PaletteSys_LoadPalette(param0->unk_C4, v4, v5, param0->unk_00, 0, 0, (8 * 16)); + PaletteData_LoadBufferFromFileStart(param0->unk_C4, v4, v5, param0->unk_00, 0, 0, (8 * 16)); sub_0200710C(param0->unk_1A0[0], v6, param0->unk_C0, 2, 0, 0, 0, param0->unk_00); if (v2 == 1) { @@ -2232,7 +2232,7 @@ static void ov12_02221580(UnkStruct_ov12_0221FCDC *param0) v19 = CellActor_GetPaletteProxy(v1->unk_00); v20 = sub_0201FAB4(v19, NNS_G2D_VRAM_TYPE_2DMAIN); - PaletteSys_LoadPalette(param0->unk_C4, v8, v9, param0->unk_00, 2, 0x20, v20 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_C4, v8, v9, param0->unk_00, 2, 0x20, v20 * 16); } GF_ASSERT(param0->unk_138[v5] == NULL); @@ -2518,7 +2518,7 @@ static BOOL ov12_02221A54(UnkStruct_ov12_02221BBC *param0, UnkStruct_ov12_0221FC static void ov12_02221AA8(UnkStruct_ov12_02221BBC *param0, UnkStruct_ov12_0221FCDC *param1, int param2, int param3) { sub_02006E3C(7, ov12_022234E4(param3, 0), param1->unk_C0, param2, 0, 0, 1, param1->unk_00); - PaletteSys_LoadPalette(param1->unk_C4, 7, ov12_022234E4(param3, 1), param1->unk_00, 0, 0x20, (9 * 16)); + PaletteData_LoadBufferFromFileStart(param1->unk_C4, 7, ov12_022234E4(param3, 1), param1->unk_00, 0, 0x20, (9 * 16)); Bg_ClearTilemap(param1->unk_C0, param2); { @@ -2751,7 +2751,7 @@ static BOOL ov12_02221D50(SysTask *param0, UnkStruct_ov12_02221BBC *param1) ov12_02223488(param1->unk_48); } else { sub_02006E3C(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_04, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); - PaletteSys_LoadPalette(param1->unk_48->unk_C4, param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_08, param1->unk_48->unk_00, 0, param1->unk_48->unk_180.unk_14 * 0x20, param1->unk_48->unk_180.unk_10); + PaletteData_LoadBufferFromFileStart(param1->unk_48->unk_C4, param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_08, param1->unk_48->unk_00, 0, param1->unk_48->unk_180.unk_14 * 0x20, param1->unk_48->unk_180.unk_10); } sub_02006E60(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_0C, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); @@ -2779,16 +2779,16 @@ static BOOL ov12_02221F44(SysTask *param0, UnkStruct_ov12_02221BBC *param1) switch (param1->unk_05) { case 0: if (param1->unk_0D == 0) { - sub_02003178(param1->unk_48->unk_C4, 0x1, param1->unk_48->unk_198, 0, 0, 16, 0); - sub_02003A2C(param1->unk_48->unk_C4, 0, 0x200, 16, 0); + PaletteData_StartFade(param1->unk_48->unk_C4, 0x1, param1->unk_48->unk_198, 0, 0, 16, 0); + PaletteData_BlendMulti(param1->unk_48->unk_C4, 0, 0x200, 16, 0); } else { - sub_02003178(param1->unk_48->unk_C4, 0x1, param1->unk_48->unk_198, 0, 0, 16, 0xFFFF); - sub_02003A2C(param1->unk_48->unk_C4, 0, 0x200, 16, 0xFFFF); + PaletteData_StartFade(param1->unk_48->unk_C4, 0x1, param1->unk_48->unk_198, 0, 0, 16, 0xFFFF); + PaletteData_BlendMulti(param1->unk_48->unk_C4, 0, 0x200, 16, 0xFFFF); } param1->unk_05++; case 1: - if (sub_0200384C(param1->unk_48->unk_C4) != 0) { + if (PaletteData_GetSelectedBuffersMask(param1->unk_48->unk_C4) != 0) { break; } @@ -2796,9 +2796,9 @@ static BOOL ov12_02221F44(SysTask *param0, UnkStruct_ov12_02221BBC *param1) ov12_02221AA8(param1, param1->unk_48, 3, param1->unk_10); if (param1->unk_0D == 0) { - sub_02003178(param1->unk_48->unk_C4, 0x1, (1 << 9), 0, 16, 0, 0); + PaletteData_StartFade(param1->unk_48->unk_C4, 0x1, (1 << 9), 0, 16, 0, 0); } else { - sub_02003178(param1->unk_48->unk_C4, 0x1, (1 << 9), 0, 16, 0, 0xFFFF); + PaletteData_StartFade(param1->unk_48->unk_C4, 0x1, (1 << 9), 0, 16, 0, 0xFFFF); } ov12_02221B64(param1); @@ -2807,7 +2807,7 @@ static BOOL ov12_02221F44(SysTask *param0, UnkStruct_ov12_02221BBC *param1) param1->unk_05++; break; default: - if (sub_0200384C(param1->unk_48->unk_C4) != 0) { + if (PaletteData_GetSelectedBuffersMask(param1->unk_48->unk_C4) != 0) { break; } @@ -2825,16 +2825,16 @@ static BOOL ov12_0222206C(SysTask *param0, UnkStruct_ov12_02221BBC *param1) param1->unk_05++; case 1: if (param1->unk_0D == 0) { - sub_02003178(param1->unk_48->unk_C4, 0x1, (1 << 9), 0, 0, 16, 0); - sub_02003A2C(param1->unk_48->unk_C4, 0, param1->unk_48->unk_198, 16, 0); + PaletteData_StartFade(param1->unk_48->unk_C4, 0x1, (1 << 9), 0, 0, 16, 0); + PaletteData_BlendMulti(param1->unk_48->unk_C4, 0, param1->unk_48->unk_198, 16, 0); } else { - sub_02003178(param1->unk_48->unk_C4, 0x1, (1 << 9), 0, 0, 16, 0xFFFF); - sub_02003A2C(param1->unk_48->unk_C4, 0, param1->unk_48->unk_198, 16, 0xFFFF); + PaletteData_StartFade(param1->unk_48->unk_C4, 0x1, (1 << 9), 0, 0, 16, 0xFFFF); + PaletteData_BlendMulti(param1->unk_48->unk_C4, 0, param1->unk_48->unk_198, 16, 0xFFFF); } param1->unk_05++; case 2: - if (sub_0200384C(param1->unk_48->unk_C4) != 0) { + if (PaletteData_GetSelectedBuffersMask(param1->unk_48->unk_C4) != 0) { break; } @@ -2855,7 +2855,7 @@ static BOOL ov12_0222206C(SysTask *param0, UnkStruct_ov12_02221BBC *param1) ov12_02223488(param1->unk_48); } else { sub_02006E3C(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_04, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); - PaletteSys_LoadPalette(param1->unk_48->unk_C4, param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_08, param1->unk_48->unk_00, 0, param1->unk_48->unk_180.unk_14 * 0x20, param1->unk_48->unk_180.unk_10); + PaletteData_LoadBufferFromFileStart(param1->unk_48->unk_C4, param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_08, param1->unk_48->unk_00, 0, param1->unk_48->unk_180.unk_14 * 0x20, param1->unk_48->unk_180.unk_10); } sub_02006E60(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_0C, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); @@ -2867,15 +2867,15 @@ static BOOL ov12_0222206C(SysTask *param0, UnkStruct_ov12_02221BBC *param1) Bg_SetOffset(param1->unk_48->unk_C0, 3, 3, 0); if (param1->unk_0D == 0) { - sub_02003178(param1->unk_48->unk_C4, 0x1, param1->unk_48->unk_198, 0, 16, 0, 0); + PaletteData_StartFade(param1->unk_48->unk_C4, 0x1, param1->unk_48->unk_198, 0, 16, 0, 0); } else { - sub_02003178(param1->unk_48->unk_C4, 0x1, param1->unk_48->unk_198, 0, 16, 0, 0xFFFF); + PaletteData_StartFade(param1->unk_48->unk_C4, 0x1, param1->unk_48->unk_198, 0, 16, 0, 0xFFFF); } param1->unk_05++; default: - if (sub_0200384C(param1->unk_48->unk_C4) != 0) { + if (PaletteData_GetSelectedBuffersMask(param1->unk_48->unk_C4) != 0) { break; } @@ -4093,7 +4093,7 @@ void ov12_02223460(UnkStruct_ov12_0221FCDC *param0, int param1) void ov12_02223488(UnkStruct_ov12_0221FCDC *param0) { - sub_02002FBC(param0->unk_C4, param0->unk_BC->unk_114, 0, 0, 0x200); + PaletteData_LoadBuffer(param0->unk_C4, param0->unk_BC->unk_114, 0, 0, 0x200); } BOOL ov12_022234A8(UnkStruct_ov12_0221FCDC *param0, int param1) @@ -4318,7 +4318,7 @@ UnkStruct_ov12_02223764 *ov12_022234F8(BattleSystem *param0, int param1, int par v18 = CellActor_GetPaletteProxy(v10->unk_00); v19 = sub_0201FAB4(v18, NNS_G2D_VRAM_TYPE_2DMAIN); - PaletteSys_LoadPalette(v2->unk_08.unk_08, v6, v7, v2->unk_00, 2, 0x20, v19 * 16); + PaletteData_LoadBufferFromFileStart(v2->unk_08.unk_08, v6, v7, v2->unk_00, 2, 0x20, v19 * 16); } } } diff --git a/src/overlay012/ov12_02225864.c b/src/overlay012/ov12_02225864.c index 56a4aac377..9e85b54079 100644 --- a/src/overlay012/ov12_02225864.c +++ b/src/overlay012/ov12_02225864.c @@ -1114,7 +1114,7 @@ static void ov12_022267D4(SysTask *param0, void *param1) if ((++v0->unk_17) >= v0->unk_16) { v0->unk_17 = 0; - sub_020039B0(v0->unk_18, v0->unk_08, v0->unk_0C, v0->unk_0E, v0->unk_14, v0->unk_10); + PaletteData_Blend(v0->unk_18, v0->unk_08, v0->unk_0C, v0->unk_0E, v0->unk_14, v0->unk_10); if (v0->unk_14 == v0->unk_13) { v0->unk_00 = 0; @@ -1205,7 +1205,7 @@ void ov12_02226924(UnkStruct_ov12_0221FCDC *param0) u16 *v1; v0 = ov12_0222332C(param0); - v1 = sub_0200316C(v0, 0); + v1 = PaletteData_GetFadedBuffer(v0, 0); if (ov12_0221FDD4(param0) == 1) { ov12_022268DC(v1, 16 * 3); @@ -1221,8 +1221,8 @@ void ov12_02226954(UnkStruct_ov12_0221FCDC *param0) v0 = ov12_0222332C(param0); if (ov12_0221FDD4(param0) == 1) { - sub_02003120(v0, 0, 0, 0, 0, 16 * 3 * 2); + PaletteData_CopyBuffer(v0, 0, 0, 0, 0, 16 * 3 * 2); } else { - sub_02003120(v0, 0, 0, 0, 0, 16 * 8 * 2); + PaletteData_CopyBuffer(v0, 0, 0, 0, 0, 16 * 8 * 2); } } diff --git a/src/overlay012/ov12_02226B84.c b/src/overlay012/ov12_02226B84.c index 369a715303..69e3be965c 100644 --- a/src/overlay012/ov12_02226B84.c +++ b/src/overlay012/ov12_02226B84.c @@ -645,7 +645,7 @@ void ov12_02226EB0(UnkStruct_ov12_0221FCDC *param0) int v2 = ov12_02220280(param0, 0); sub_02006E3C(7, ov12_022234E4(v2, 0), v0->unk_1C.unk_14, 2, 0, 0, 1, ov12_0221FDE4(param0)); - PaletteSys_LoadPalette(v0->unk_1C.unk_18, 7, ov12_022234E4(v2, 1), ov12_0221FDE4(param0), 0, 0x20, (9 * 16)); + PaletteData_LoadBufferFromFileStart(v0->unk_1C.unk_18, 7, ov12_022234E4(v2, 1), ov12_0221FDE4(param0), 0, 0x20, (9 * 16)); Bg_ClearTilemap(v0->unk_1C.unk_14, 2); { @@ -805,7 +805,7 @@ void ov12_022271D8(UnkStruct_ov12_0221FCDC *param0) int v2 = ov12_02220280(param0, 0); sub_02006E3C(7, ov12_022234E4(v2, 0), v0->unk_1C.unk_14, 2, 0, 0, 1, ov12_0221FDE4(param0)); - PaletteSys_LoadPalette(v0->unk_1C.unk_18, 7, ov12_022234E4(v2, 1), ov12_0221FDE4(param0), 0, 0x20, (9 * 16)); + PaletteData_LoadBufferFromFileStart(v0->unk_1C.unk_18, 7, ov12_022234E4(v2, 1), ov12_0221FDE4(param0), 0, 0x20, (9 * 16)); Bg_ClearTilemap(v0->unk_1C.unk_14, 2); { @@ -1059,7 +1059,7 @@ static void ov12_02227808(SysTask *param0, void *param1) { UnkStruct_ov12_02227808 *v0 = param1; - if (sub_0200384C(v0->unk_04) == 0) { + if (PaletteData_GetSelectedBuffersMask(v0->unk_04) == 0) { Heap_FreeToHeap(v0); ov12_02220220(v0->unk_00, param0); } @@ -1090,7 +1090,7 @@ void ov12_02227828(UnkStruct_ov12_0221FCDC *param0) break; } - sub_02003178(v0->unk_04, 0x1, v1, ov12_02220280(param0, 1), ov12_02220280(param0, 2), ov12_02220280(param0, 3), ov12_02220280(param0, 4)); + PaletteData_StartFade(v0->unk_04, 0x1, v1, ov12_02220280(param0, 1), ov12_02220280(param0, 2), ov12_02220280(param0, 3), ov12_02220280(param0, 4)); ov12_022201E8(v0->unk_00, ov12_02227808, v0); } diff --git a/src/overlay012/ov12_0222AC70.c b/src/overlay012/ov12_0222AC70.c index 34e8ee7962..410f9d7f5c 100644 --- a/src/overlay012/ov12_0222AC70.c +++ b/src/overlay012/ov12_0222AC70.c @@ -736,10 +736,10 @@ void ov12_0222B68C(UnkStruct_ov12_0221FCDC *param0) sub_0200D460(v0->unk_18[3], v4); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v0->unk_18[0]->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - sub_02003B08(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 128, 128, 128); + PaletteData_TintFromFile(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 128, 128, 128); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v0->unk_18[2]->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - sub_02003B08(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 196, 196, 196); + PaletteData_TintFromFile(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 196, 196, 196); } else { sub_0200D474(v0->unk_18[0], 20); sub_0200D474(v0->unk_18[1], 20); @@ -755,10 +755,10 @@ void ov12_0222B68C(UnkStruct_ov12_0221FCDC *param0) sub_0200D460(v0->unk_18[3], v4); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v0->unk_18[0]->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - sub_02003B08(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 196, 196, 196); + PaletteData_TintFromFile(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 196, 196, 196); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v0->unk_18[2]->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - sub_02003B08(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 128, 128, 128); + PaletteData_TintFromFile(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 128, 128, 128); } } @@ -961,12 +961,12 @@ static void ov12_0222BD48(SysTask *param0, void *param1) switch (v0->unk_00) { case 0: - sub_02003178(v0->unk_04, 0x1, ov12_02222354(v0->unk_08), -2, 0, 16, 0x7FFF); + PaletteData_StartFade(v0->unk_04, 0x1, ov12_02222354(v0->unk_08), -2, 0, 16, 0x7FFF); sub_020086FC(v0->unk_10, 0, 16, 0, 0x0); v0->unk_00++; break; case 1: - if ((sub_0200384C(v0->unk_04) == 0) && (sub_020087B4(v0->unk_10) == 0)) { + if ((PaletteData_GetSelectedBuffersMask(v0->unk_04) == 0) && (sub_020087B4(v0->unk_10) == 0)) { v0->unk_00++; } break; @@ -976,12 +976,12 @@ static void ov12_0222BD48(SysTask *param0, void *param1) } break; case 3: - sub_02003178(v0->unk_04, 0x1, ov12_02222354(v0->unk_08), -2, 16, 0, 0x7FFF); + PaletteData_StartFade(v0->unk_04, 0x1, ov12_02222354(v0->unk_08), -2, 16, 0, 0x7FFF); sub_020086FC(v0->unk_10, 16, 0, 0, 0x0); v0->unk_00++; break; case 4: - if ((sub_0200384C(v0->unk_04) == 0) && (sub_020087B4(v0->unk_10) == 0)) { + if ((PaletteData_GetSelectedBuffersMask(v0->unk_04) == 0) && (sub_020087B4(v0->unk_10) == 0)) { v0->unk_00++; } break; @@ -1139,7 +1139,7 @@ void ov12_0222C0C0(UnkStruct_ov12_0221FCDC *param0) int v3 = ov12_02223344(v0->unk_04, ov12_02220240(v0->unk_04)); v1 = sub_0201FAB4(CellActor_GetPaletteProxy(v0->unk_0C->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - sub_02003B08(ov12_0222332C(v0->unk_04), v3, v2, ov12_0221FDE4(param0), 2, 0x20, v1 * 16, 256, 256, 256); + PaletteData_TintFromFile(ov12_0222332C(v0->unk_04), v3, v2, ov12_0221FDE4(param0), 2, 0x20, v1 * 16, 256, 256, 256); } SpriteActor_EnableObject(v0->unk_0C, 0); @@ -1322,11 +1322,11 @@ static void ov12_0222C4A8(SysTask *param0, void *param1) switch (v1->unk_00) { case 0: - sub_02003178(ov12_0222332C(v1->unk_0C), 0x1, ov12_02222354(v1->unk_0C), 1, 0, 10, 0x0); + PaletteData_StartFade(ov12_0222332C(v1->unk_0C), 0x1, ov12_02222354(v1->unk_0C), 1, 0, 10, 0x0); v1->unk_00++; break; case 1: - if (sub_0200384C(ov12_0222332C(v1->unk_0C)) != 0) { + if (PaletteData_GetSelectedBuffersMask(ov12_0222332C(v1->unk_0C)) != 0) { break; } @@ -1335,9 +1335,9 @@ static void ov12_0222C4A8(SysTask *param0, void *param1) ov12_02226108(&v1->unk_B4, Unk_ov12_0223A0EE[v1->unk_01], 0, 0, 5); if (v1->unk_02 == 0) { - sub_02003A2C(ov12_0222332C(v1->unk_0C), 0, 0xFF, 10, 0x0); + PaletteData_BlendMulti(ov12_0222332C(v1->unk_0C), 0, 0xFF, 10, 0x0); } else { - sub_02003A2C(ov12_0222332C(v1->unk_0C), 0, 0xFF, 10, 0x7FFF); + PaletteData_BlendMulti(ov12_0222332C(v1->unk_0C), 0, 0xFF, 10, 0x7FFF); } v1->unk_03 = 3; @@ -1357,7 +1357,7 @@ static void ov12_0222C4A8(SysTask *param0, void *param1) v1->unk_03--; if (v1->unk_03 == 0) { - sub_02003A2C(ov12_0222332C(v1->unk_0C), 0, 0xFF, 0, 0); + PaletteData_BlendMulti(ov12_0222332C(v1->unk_0C), 0, 0xFF, 0, 0); } } diff --git a/src/overlay012/ov12_0222E91C.c b/src/overlay012/ov12_0222E91C.c index aee9302360..1bd8f4ca67 100644 --- a/src/overlay012/ov12_0222E91C.c +++ b/src/overlay012/ov12_0222E91C.c @@ -176,14 +176,14 @@ void ov12_0222EAA0(UnkStruct_ov12_0221FCDC *param0) sub_0200D460(v1, ov12_0222339C(v0->unk_00.unk_04) + 1); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v1->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - sub_02003B08(ov12_0222332C(v0->unk_00.unk_04), v4, v3, ov12_0221FDE4(v0->unk_00.unk_04), 2, 0x20, v2 * 16, 196, 196, 196); + PaletteData_TintFromFile(ov12_0222332C(v0->unk_00.unk_04), v4, v3, ov12_0221FDE4(v0->unk_00.unk_04), 2, 0x20, v2 * 16, 196, 196, 196); SpriteActor_SetOAMMode(v1, GX_OAM_MODE_XLU); v1 = v0->unk_30; sub_0200D460(v1, ov12_0222339C(v0->unk_00.unk_04) + 1); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v1->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - sub_02003B08(ov12_0222332C(v0->unk_00.unk_04), v4, v3, ov12_0221FDE4(v0->unk_00.unk_04), 2, 0x20, v2 * 16, 196, 196, 196); + PaletteData_TintFromFile(ov12_0222332C(v0->unk_00.unk_04), v4, v3, ov12_0221FDE4(v0->unk_00.unk_04), 2, 0x20, v2 * 16, 196, 196, 196); SpriteActor_SetOAMMode(v1, GX_OAM_MODE_XLU); } diff --git a/src/overlay012/ov12_0222F700.c b/src/overlay012/ov12_0222F700.c index 7288dc3ea7..b9c4b5ef1a 100644 --- a/src/overlay012/ov12_0222F700.c +++ b/src/overlay012/ov12_0222F700.c @@ -1163,7 +1163,7 @@ static void ov12_02230600(SysTask *param0, void *param1) int v2; v2 = 1 << ov12_02225950(v0->unk_0C); - sub_02003178(ov12_0222332C(v0->unk_00), 0x4, v2, 0, 16, 0, 0); + PaletteData_StartFade(ov12_0222332C(v0->unk_00), 0x4, v2, 0, 16, 0, 0); } v0->unk_04++; @@ -1262,7 +1262,7 @@ void ov12_02230804(UnkStruct_ov12_0221FCDC *param0) int v4; v4 = 1 << ov12_02225950(v0->unk_0C); - sub_02003178(ov12_0222332C(v0->unk_00), 0x4, v4, 0, 0, 16, 0); + PaletteData_StartFade(ov12_0222332C(v0->unk_00), 0x4, v4, 0, 0, 16, 0); v0->unk_10 = 1; if (ov12_0222337C(v0->unk_00, ov12_02220248(v0->unk_00)) == 0) { @@ -1387,7 +1387,7 @@ void ov12_02230A8C(UnkStruct_ov12_0221FCDC *param0) v0->unk_14 = ov12_0222662C(v3, v3 + 80, ((5 * 0xffff) / 360), (5 * FX32_ONE), 100, ov12_022233EC(param0, 1), 0, ov12_022266E8(-v2, -v3), ov12_0221FDE4(param0)); v4 = 1 << 8; - sub_02003A2C(v0->unk_18, 0, v4, 8, 0x0); + PaletteData_BlendMulti(v0->unk_18, 0, v4, 8, 0x0); ov12_022201E8(v0->unk_00, ov12_02230994, v0); } @@ -2124,7 +2124,7 @@ static void ov12_02231A38(SysTask *param0, void *param1) if (v0->unk_54 < 0) { v0->unk_0C++; - sub_02003178(ov12_0222332C(v0->unk_00), 0x1, ov12_02222354(v0->unk_00), -8, 0, 16, 0xffff); + PaletteData_StartFade(ov12_0222332C(v0->unk_00), 0x1, ov12_02222354(v0->unk_00), -8, 0, 16, 0xffff); for (v1 = 0; v1 < 4; v1++) { if (v0->unk_14[v1]) { @@ -2134,9 +2134,9 @@ static void ov12_02231A38(SysTask *param0, void *param1) } break; case 3: - if (sub_0200384C(ov12_0222332C(v0->unk_00)) == 0) { + if (PaletteData_GetSelectedBuffersMask(ov12_0222332C(v0->unk_00)) == 0) { v0->unk_0C++; - sub_02003178(ov12_0222332C(v0->unk_00), 0x1, ov12_02222354(v0->unk_00), -8, 16, 0, 0xffff); + PaletteData_StartFade(ov12_0222332C(v0->unk_00), 0x1, ov12_02222354(v0->unk_00), -8, 16, 0, 0xffff); for (v1 = 0; v1 < 4; v1++) { if (v0->unk_14[v1]) { @@ -2146,7 +2146,7 @@ static void ov12_02231A38(SysTask *param0, void *param1) } break; case 4: - if (sub_0200384C(ov12_0222332C(v0->unk_00)) == 0) { + if (PaletteData_GetSelectedBuffersMask(ov12_0222332C(v0->unk_00)) == 0) { v0->unk_0C++; v0->unk_54 = 4; v0->unk_50 = 4; @@ -3018,7 +3018,7 @@ static void ov12_02232D38(UnkStruct_ov12_02232D38 *param0, CellActorData *param1 int v0; v0 = 1 << ov12_02225950(param1); - sub_02003A2C(param0->unk_C4, 2, v0, 8, 0x0); + PaletteData_BlendMulti(param0->unk_C4, 2, v0, 8, 0x0); } static void ov12_02232D64(UnkStruct_ov12_02232D38 *param0) @@ -3780,7 +3780,7 @@ static void ov12_02233DCC(SysTask *param0, void *param1) v0->unk_08--; if (v0->unk_08 < 0) { - sub_02003178(ov12_0222332C(v0->unk_00), 0x1, ov12_02222354(v0->unk_00), 0, 0, 16, 0xffff); + PaletteData_StartFade(ov12_0222332C(v0->unk_00), 0x1, ov12_02222354(v0->unk_00), 0, 0, 16, 0xffff); v0->unk_04++; } break; @@ -3792,14 +3792,14 @@ static void ov12_02233DCC(SysTask *param0, void *param1) } break; case 3: - if (sub_0200384C(ov12_0222332C(v0->unk_00)) == 0) { + if (PaletteData_GetSelectedBuffersMask(ov12_0222332C(v0->unk_00)) == 0) { v0->unk_04++; GX_SetVisibleWnd(GX_WNDMASK_NONE); - sub_02003178(ov12_0222332C(v0->unk_00), 0x1, ov12_02222354(v0->unk_00), 0, 16, 0, 0xffff); + PaletteData_StartFade(ov12_0222332C(v0->unk_00), 0x1, ov12_02222354(v0->unk_00), 0, 16, 0, 0xffff); } break; case 4: - if (sub_0200384C(ov12_0222332C(v0->unk_00)) == 0) { + if (PaletteData_GetSelectedBuffersMask(ov12_0222332C(v0->unk_00)) == 0) { v0->unk_04++; } break; diff --git a/src/overlay012/ov12_02234E44.c b/src/overlay012/ov12_02234E44.c index ced38c68ee..b2b81e6d6b 100644 --- a/src/overlay012/ov12_02234E44.c +++ b/src/overlay012/ov12_02234E44.c @@ -66,7 +66,7 @@ static void ov12_02234E54(UnkStruct_ov12_02234E54 *param0, int param1) Bg_SetPriority(param1, v1); sub_02006E3C(param0->unk_00.unk_00, Unk_ov12_0223A1D8[param0->unk_00.unk_04][0], param0->unk_18.unk_14, param1, 0, 0, 1, v0); - PaletteSys_LoadPalette(param0->unk_18.unk_18, param0->unk_00.unk_00, Unk_ov12_0223A1D8[param0->unk_00.unk_04][1], v0, 0, 0x20, (8 * 16)); + PaletteData_LoadBufferFromFileStart(param0->unk_18.unk_18, param0->unk_00.unk_00, Unk_ov12_0223A1D8[param0->unk_00.unk_04][1], v0, 0, 0x20, (8 * 16)); Bg_ClearTilemap(param0->unk_18.unk_14, param1); sub_02006E60(param0->unk_00.unk_00, Unk_ov12_0223A1D8[param0->unk_00.unk_04][2], param0->unk_18.unk_14, param1, 0, 0, 1, v0); } diff --git a/src/overlay012/ov12_02235E94.c b/src/overlay012/ov12_02235E94.c index 1b820785f4..12b6a226f6 100644 --- a/src/overlay012/ov12_02235E94.c +++ b/src/overlay012/ov12_02235E94.c @@ -1224,12 +1224,12 @@ static BOOL ov12_02236A6C(BallRotation *param0) int v0; v0 = sub_0200D43C(param0->unk_30); - sub_02003178(param0->unk_90.paletteSys, 0x4, 1 << v0, -1, 0, 12, 0x37F); + PaletteData_StartFade(param0->unk_90.paletteSys, 0x4, 1 << v0, -1, 0, 12, 0x37F); param0->unk_08++; } break; case 1: - if (sub_0200384C(param0->unk_90.paletteSys) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_90.paletteSys) != 0) { break; } @@ -1237,13 +1237,13 @@ static BOOL ov12_02236A6C(BallRotation *param0) int v1; v1 = sub_0200D43C(param0->unk_30); - sub_02003178(param0->unk_90.paletteSys, 0x4, 1 << v1, -1, 12, 0, 0x37F); + PaletteData_StartFade(param0->unk_90.paletteSys, 0x4, 1 << v1, -1, 12, 0, 0x37F); } param0->unk_08++; break; default: - if (sub_0200384C(param0->unk_90.paletteSys) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_90.paletteSys) != 0) { break; } @@ -1461,12 +1461,12 @@ static BOOL ov12_02236D18(BallRotation *param0) int v0; v0 = sub_0200D43C(param0->unk_30); - sub_02003178(param0->unk_90.paletteSys, 0x4, 1 << v0, -5, 0, 10, 0x0); + PaletteData_StartFade(param0->unk_90.paletteSys, 0x4, 1 << v0, -5, 0, 10, 0x0); param0->unk_08++; } break; case 1: - if (sub_0200384C(param0->unk_90.paletteSys) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_90.paletteSys) != 0) { break; } @@ -1495,7 +1495,7 @@ static BOOL ov12_02236D18(BallRotation *param0) } } break; default: - if (sub_0200384C(param0->unk_90.paletteSys) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_90.paletteSys) != 0) { break; } @@ -1518,12 +1518,12 @@ static BOOL ov12_02236E0C(BallRotation *param0) int v0; v0 = sub_0200D43C(param0->unk_30); - sub_02003178(param0->unk_90.paletteSys, 0x4, 1 << v0, -5, 10, 0, 0x0); + PaletteData_StartFade(param0->unk_90.paletteSys, 0x4, 1 << v0, -5, 10, 0, 0x0); } param0->unk_08++; break; case 1: - if (sub_0200384C(param0->unk_90.paletteSys) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_90.paletteSys) != 0) { break; } diff --git a/src/overlay013/ov13_0221FC20.c b/src/overlay013/ov13_0221FC20.c index 20fa70a136..ae190bf7e3 100644 --- a/src/overlay013/ov13_0221FC20.c +++ b/src/overlay013/ov13_0221FC20.c @@ -330,14 +330,14 @@ static u8 ov13_0221FE5C(UnkStruct_ov13_022213F0 *param0) ov13_0222563C(param0, param0->unk_2076); ov13_022214E0(param0, param0->unk_2076); - sub_02003178(param0->unk_1E4, (0x2 | 0x8), 0xffff, -8, 16, 0, 0); + PaletteData_StartFade(param0->unk_1E4, (0x2 | 0x8), 0xffff, -8, 16, 0, 0); return v0; } static u8 ov13_0221FF60(UnkStruct_ov13_022213F0 *param0) { - if (sub_0200384C(param0->unk_1E4) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_1E4) != 0) { return 1; } @@ -985,13 +985,13 @@ static u8 ov13_02220A4C(UnkStruct_ov13_022213F0 *param0) static u8 ov13_02220B78(UnkStruct_ov13_022213F0 *param0) { - sub_02003178(param0->unk_1E4, (0x2 | 0x8), 0xffff, -8, 0, 16, 0); + PaletteData_StartFade(param0->unk_1E4, (0x2 | 0x8), 0xffff, -8, 0, 16, 0); return 26; } static u8 ov13_02220BA4(SysTask *param0, UnkStruct_ov13_022213F0 *param1) { - if (sub_0200384C(param1->unk_1E4) != 0) { + if (PaletteData_GetSelectedBuffersMask(param1->unk_1E4) != 0) { return 0; } @@ -1144,33 +1144,33 @@ static void ov13_02220D4C(UnkStruct_ov13_022213F0 *param0) Heap_FreeToHeap(v2); } - PaletteSys_LoadPalette(param0->unk_1E4, 72, 23, param0->unk_00->unk_0C, 1, 0x20 * 16, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_1E4, 72, 23, param0->unk_00->unk_0C, 1, 0x20 * 16, 0); NARC_dtor(v0); { - u16 *v3 = sub_02003164(param0->unk_1E4, 1); + u16 *v3 = PaletteData_GetUnfadedBuffer(param0->unk_1E4, 1); memcpy(param0->unk_1F5C, &v3[12 * 16], 0x20 * 2); } - PaletteSys_LoadPalette(param0->unk_1E4, 14, 6, param0->unk_00->unk_0C, 1, 0x20, 13 * 16); - PaletteSys_LoadPalette(param0->unk_1E4, 14, 7, param0->unk_00->unk_0C, 1, 0x20, 15 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_1E4, 14, 6, param0->unk_00->unk_0C, 1, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_1E4, 14, 7, param0->unk_00->unk_0C, 1, 0x20, 15 * 16); { int v4 = ov16_0223EDE0(param0->unk_00->unk_08); sub_02006E3C(38, sub_0200DD04(v4), param0->unk_1E0, 4, 1, 0, 0, param0->unk_00->unk_0C); - PaletteSys_LoadPalette(param0->unk_1E4, 38, sub_0200DD08(v4), param0->unk_00->unk_0C, 1, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_1E4, 38, sub_0200DD08(v4), param0->unk_00->unk_0C, 1, 0x20, 14 * 16); } { - u16 *v5 = sub_02003164(param0->unk_1E4, 1); + u16 *v5 = PaletteData_GetUnfadedBuffer(param0->unk_1E4, 1); u16 *v6 = Heap_AllocFromHeap(param0->unk_00->unk_0C, 0x20); memcpy(v6, &v5[13 * 16], 0x20); memcpy(&v6[7], &v5[9 * 16 + 10], 4); memcpy(&v6[3], &v5[9 * 16 + 12], 4); - sub_02002FBC(param0->unk_1E4, v6, 1, 13 * 16, 0x20); + PaletteData_LoadBuffer(param0->unk_1E4, v6, 1, 13 * 16, 0x20); Heap_FreeToHeap(v6); } } diff --git a/src/overlay013/ov13_02225710.c b/src/overlay013/ov13_02225710.c index 6bc8ec3f28..1a1dd25ac0 100644 --- a/src/overlay013/ov13_02225710.c +++ b/src/overlay013/ov13_02225710.c @@ -699,9 +699,9 @@ void ov13_022260EC(UnkStruct_ov13_022213F0 *param0, u8 param1) void ov13_02226444(UnkStruct_ov13_022213F0 *param0, u8 param1) { if (param1 == 3) { - sub_02002FBC(param0->unk_1E4, ¶m0->unk_1F5C[16], 1, 12 * 16, 0x20); + PaletteData_LoadBuffer(param0->unk_1E4, ¶m0->unk_1F5C[16], 1, 12 * 16, 0x20); } else { - sub_02002FBC(param0->unk_1E4, ¶m0->unk_1F5C[0], 1, 12 * 16, 0x20); + PaletteData_LoadBuffer(param0->unk_1E4, ¶m0->unk_1F5C[0], 1, 12 * 16, 0x20); } } diff --git a/src/overlay013/ov13_022264F4.c b/src/overlay013/ov13_022264F4.c index 222e2a5982..4bbc2cee57 100644 --- a/src/overlay013/ov13_022264F4.c +++ b/src/overlay013/ov13_022264F4.c @@ -216,7 +216,7 @@ static u8 ov13_0222668C(UnkStruct_ov13_02227244 *param0) ov13_02228008(param0, param0->unk_114C); ov13_022280F0(param0, param0->unk_114C); - sub_02003178(param0->unk_08, (0x2 | 0x8), 0xffff, -8, 16, 0, 0); + PaletteData_StartFade(param0->unk_08, (0x2 | 0x8), 0xffff, -8, 16, 0, 0); if (param0->unk_00->unk_14 == 1) { return 12; @@ -227,7 +227,7 @@ static u8 ov13_0222668C(UnkStruct_ov13_02227244 *param0) static u8 ov13_02226760(UnkStruct_ov13_02227244 *param0) { - if (sub_0200384C(param0->unk_08) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_08) != 0) { return 1; } @@ -535,13 +535,13 @@ static u8 ov13_02226CBC(UnkStruct_ov13_02227244 *param0) static u8 ov13_02226CD4(UnkStruct_ov13_02227244 *param0) { - sub_02003178(param0->unk_08, (0x2 | 0x8), 0xffff, -8, 0, 16, 0); + PaletteData_StartFade(param0->unk_08, (0x2 | 0x8), 0xffff, -8, 0, 16, 0); return 14; } static u8 ov13_02226CFC(SysTask *param0, UnkStruct_ov13_02227244 *param1) { - if (sub_0200384C(param1->unk_08) != 0) { + if (PaletteData_GetSelectedBuffersMask(param1->unk_08) != 0) { return 0; } @@ -576,7 +576,7 @@ static u8 ov13_02226CFC(SysTask *param0, UnkStruct_ov13_02227244 *param1) static u8 ov13_02226D94(UnkStruct_ov13_02227244 *param0) { - if (sub_0200384C(param0->unk_08) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_08) != 0) { return 12; } @@ -743,14 +743,14 @@ static void ov13_02226FC4(UnkStruct_ov13_02227244 *param0) } NARC_dtor(v0); - PaletteSys_LoadPalette(param0->unk_08, 77, 3, param0->unk_00->unk_0C, 1, 0x20 * 12, 0); - PaletteSys_LoadPalette(param0->unk_08, 14, 7, param0->unk_00->unk_0C, 1, 0x20, 15 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_08, 77, 3, param0->unk_00->unk_0C, 1, 0x20 * 12, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_08, 14, 7, param0->unk_00->unk_0C, 1, 0x20, 15 * 16); { int v4 = ov16_0223EDE0(param0->unk_00->unk_00); sub_02006E3C(38, sub_0200DD04(v4), param0->unk_04, 4, 1024 - (18 + 12), 0, 0, param0->unk_00->unk_0C); - PaletteSys_LoadPalette(param0->unk_08, 38, sub_0200DD08(v4), param0->unk_00->unk_0C, 1, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_08, 38, sub_0200DD08(v4), param0->unk_00->unk_0C, 1, 0x20, 14 * 16); } } diff --git a/src/overlay013/ov13_02227BDC.c b/src/overlay013/ov13_02227BDC.c index 6dc38c7aac..9d248f11ee 100644 --- a/src/overlay013/ov13_02227BDC.c +++ b/src/overlay013/ov13_02227BDC.c @@ -115,7 +115,7 @@ static void ov13_02227D10(UnkStruct_ov13_02227244 *param0, u16 param1, u32 param static void ov13_02227D48(UnkStruct_ov13_02227244 *param0, u16 param1, u16 param2, u32 param3) { - PaletteSys_LoadPalette(param0->unk_08, 16, Item_FileID(param1, 2), param0->unk_00->unk_0C, 3, 0x20, param2 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_08, 16, Item_FileID(param1, 2), param0->unk_00->unk_0C, 3, 0x20, param2 * 16); } static CellActorData *ov13_02227D78(UnkStruct_ov13_02227244 *param0, u32 param1) diff --git a/src/overlay017/ov17_0223B140.c b/src/overlay017/ov17_0223B140.c index b1024e677b..bd125e3300 100644 --- a/src/overlay017/ov17_0223B140.c +++ b/src/overlay017/ov17_0223B140.c @@ -169,13 +169,13 @@ int ov17_0223B140(OverlayManager *param0, int *param1) ov17_0223B8C4(v0); - v0->unk_0C.unk_50 = sub_02002F38(21); + v0->unk_0C.unk_50 = PaletteData_New(21); - sub_02003858(v0->unk_0C.unk_50, 1); - sub_02002F70(v0->unk_0C.unk_50, 0, 0x200, 21); - sub_02002F70(v0->unk_0C.unk_50, 1, 0x200, 21); - sub_02002F70(v0->unk_0C.unk_50, 2, (((16 - 2) * 16) * sizeof(u16)), 21); - sub_02002F70(v0->unk_0C.unk_50, 3, 0x200, 21); + PaletteData_SetAutoTransparent(v0->unk_0C.unk_50, 1); + PaletteData_AllocBuffer(v0->unk_0C.unk_50, 0, 0x200, 21); + PaletteData_AllocBuffer(v0->unk_0C.unk_50, 1, 0x200, 21); + PaletteData_AllocBuffer(v0->unk_0C.unk_50, 2, (((16 - 2) * 16) * sizeof(u16)), 21); + PaletteData_AllocBuffer(v0->unk_0C.unk_50, 3, 0x200, 21); v0->unk_0C.unk_24 = BgConfig_New(21); @@ -353,11 +353,11 @@ int ov17_0223B580(OverlayManager *param0, int *param1) Font_Free(FONT_SUBSCREEN); sub_020127BC(v0->unk_0C.unk_54); - sub_02002FA0(v0->unk_0C.unk_50, 0); - sub_02002FA0(v0->unk_0C.unk_50, 1); - sub_02002FA0(v0->unk_0C.unk_50, 2); - sub_02002FA0(v0->unk_0C.unk_50, 3); - sub_02002F54(v0->unk_0C.unk_50); + PaletteData_FreeBuffer(v0->unk_0C.unk_50, 0); + PaletteData_FreeBuffer(v0->unk_0C.unk_50, 1); + PaletteData_FreeBuffer(v0->unk_0C.unk_50, 2); + PaletteData_FreeBuffer(v0->unk_0C.unk_50, 3); + PaletteData_Free(v0->unk_0C.unk_50); Strbuf_Free(v0->unk_0C.unk_4C); StringTemplate_Free(v0->unk_0C.unk_48); @@ -392,7 +392,7 @@ static void ov17_0223B6BC(void *param0) sub_02008A94(v0->unk_0C.unk_04); sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_0C.unk_50); + PaletteData_CommitFadedBuffers(v0->unk_0C.unk_50); Bg_RunScheduledUpdates(v0->unk_0C.unk_24); OS_SetIrqCheckFlag(OS_IE_V_BLANK); @@ -665,15 +665,15 @@ static void ov17_0223BBA8(UnkStruct_ov17_02246F24 *param0, NARC *param1) ov17_0223BB14(param0, 0, 0); - PaletteSys_LoadPalette(param0->unk_0C.unk_50, 45, 30, 21, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_50, 45, 30, 21, 0, 0, 0); { u16 *v0, *v1, *v2, *v3; v0 = Heap_AllocFromHeap(21, 0x20); v1 = Heap_AllocFromHeap(21, 0x20); - v2 = sub_02003164(param0->unk_0C.unk_50, 0); - v3 = sub_0200316C(param0->unk_0C.unk_50, 0); + v2 = PaletteData_GetUnfadedBuffer(param0->unk_0C.unk_50, 0); + v3 = PaletteData_GetFadedBuffer(param0->unk_0C.unk_50, 0); MI_CpuCopy16(&v2[Unk_ov17_022536B4[0] * 16], v0, 0x20); MI_CpuCopy16(&v2[Unk_ov17_022536B4[param0->unk_00->unk_00.unk_113] * 16], v1, 0x20); diff --git a/src/overlay017/ov17_0223CB1C.c b/src/overlay017/ov17_0223CB1C.c index 4d7aa6ca75..ea8e814d95 100644 --- a/src/overlay017/ov17_0223CB1C.c +++ b/src/overlay017/ov17_0223CB1C.c @@ -149,13 +149,13 @@ int ov17_0223CB1C(OverlayManager *param0, int *param1) v0->unk_0C.unk_00 = &v0->unk_00->unk_00; ov17_0223D390(v0); - v0->unk_0C.unk_44 = sub_02002F38(22); + v0->unk_0C.unk_44 = PaletteData_New(22); - sub_02003858(v0->unk_0C.unk_44, 1); - sub_02002F70(v0->unk_0C.unk_44, 0, 0x200, 22); - sub_02002F70(v0->unk_0C.unk_44, 1, 0x200, 22); - sub_02002F70(v0->unk_0C.unk_44, 2, (((16 - 2) * 16) * sizeof(u16)), 22); - sub_02002F70(v0->unk_0C.unk_44, 3, 0x200, 22); + PaletteData_SetAutoTransparent(v0->unk_0C.unk_44, 1); + PaletteData_AllocBuffer(v0->unk_0C.unk_44, 0, 0x200, 22); + PaletteData_AllocBuffer(v0->unk_0C.unk_44, 1, 0x200, 22); + PaletteData_AllocBuffer(v0->unk_0C.unk_44, 2, (((16 - 2) * 16) * sizeof(u16)), 22); + PaletteData_AllocBuffer(v0->unk_0C.unk_44, 3, 0x200, 22); v0->unk_0C.unk_24 = BgConfig_New(22); @@ -204,10 +204,10 @@ int ov17_0223CB1C(OverlayManager *param0, int *param1) NARC_dtor(v2); } - sub_020038B0(v0->unk_0C.unk_44, 0, 0, 0x7fff, 1, 16 * 16); - sub_020038B0(v0->unk_0C.unk_44, 1, 0, 0x7fff, 1, 16 * 16); - sub_020038B0(v0->unk_0C.unk_44, 2, 0, 0x7fff, 0, ((16 - 2) * 16)); - sub_020038B0(v0->unk_0C.unk_44, 3, 0, 0x7fff, 0, 16 * 16); + PaletteData_FillBufferRange(v0->unk_0C.unk_44, 0, 0, 0x7fff, 1, 16 * 16); + PaletteData_FillBufferRange(v0->unk_0C.unk_44, 1, 0, 0x7fff, 1, 16 * 16); + PaletteData_FillBufferRange(v0->unk_0C.unk_44, 2, 0, 0x7fff, 0, ((16 - 2) * 16)); + PaletteData_FillBufferRange(v0->unk_0C.unk_44, 3, 0, 0x7fff, 0, 16 * 16); sub_02039734(); sub_0200F174(1, 27, 27, 0x0, 6, 1, 22); @@ -236,10 +236,10 @@ int ov17_0223CDDC(OverlayManager *param0, int *param1) switch (*param1) { case 0: if (ScreenWipe_Done() == 1) { - sub_02003178(v0->unk_0C.unk_44, 0x1, 0xffff, 6, 16, 0, 0x7fff); - sub_02003178(v0->unk_0C.unk_44, 0x2, 0xffff, 6, 16, 0, 0x7fff); - sub_02003178(v0->unk_0C.unk_44, 0x4, 0x3fff, 6, 16, 0, 0x7fff); - sub_02003178(v0->unk_0C.unk_44, 0x8, 0xffff, 6, 16, 0, 0x7fff); + PaletteData_StartFade(v0->unk_0C.unk_44, 0x1, 0xffff, 6, 16, 0, 0x7fff); + PaletteData_StartFade(v0->unk_0C.unk_44, 0x2, 0xffff, 6, 16, 0, 0x7fff); + PaletteData_StartFade(v0->unk_0C.unk_44, 0x4, 0x3fff, 6, 16, 0, 0x7fff); + PaletteData_StartFade(v0->unk_0C.unk_44, 0x8, 0xffff, 6, 16, 0, 0x7fff); Sound_PlayEffect(1765); *param1 = 1; } @@ -323,11 +323,11 @@ int ov17_0223CF8C(OverlayManager *param0, int *param1) sub_02007B6C(v0->unk_0C.unk_04); Font_Free(FONT_SUBSCREEN); - sub_02002FA0(v0->unk_0C.unk_44, 0); - sub_02002FA0(v0->unk_0C.unk_44, 1); - sub_02002FA0(v0->unk_0C.unk_44, 2); - sub_02002FA0(v0->unk_0C.unk_44, 3); - sub_02002F54(v0->unk_0C.unk_44); + PaletteData_FreeBuffer(v0->unk_0C.unk_44, 0); + PaletteData_FreeBuffer(v0->unk_0C.unk_44, 1); + PaletteData_FreeBuffer(v0->unk_0C.unk_44, 2); + PaletteData_FreeBuffer(v0->unk_0C.unk_44, 3); + PaletteData_Free(v0->unk_0C.unk_44); StringTemplate_Free(v0->unk_0C.unk_3C); Strbuf_Free(v0->unk_0C.unk_40); MessageLoader_Free(v0->unk_0C.unk_38); @@ -373,7 +373,7 @@ static void ov17_0223D0C8(void *param0) sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_0C.unk_44); + PaletteData_CommitFadedBuffers(v0->unk_0C.unk_44); Bg_RunScheduledUpdates(v0->unk_0C.unk_24); OS_SetIrqCheckFlag(OS_IE_V_BLANK); @@ -606,16 +606,16 @@ static void ov17_0223D4A8(UnkStruct_ov17_02247A48 *param0, NARC *param1) sub_020070E8(param1, 23, param0->unk_0C.unk_24, 3, 0, 0, 1, 22); sub_0200710C(param1, 22, param0->unk_0C.unk_24, 3, 0, 0, 1, 22); Bg_ClearTilemap(param0->unk_0C.unk_24, 1); - PaletteSys_LoadPalette(param0->unk_0C.unk_44, 45, 35, 22, 0, 0, 0); - PaletteSys_LoadPalette(param0->unk_0C.unk_44, 45, 36, 22, 0, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 45, 35, 22, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 45, 36, 22, 0, 0x20, 13 * 16); v0 = Options_Frame(param0->unk_00->unk_196C); sub_0200DD0C(param0->unk_0C.unk_24, 1, 1, 15, v0, 22); - PaletteSys_LoadPalette(param0->unk_0C.unk_44, 38, sub_0200DD08(v0), 22, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 38, sub_0200DD08(v0), 22, 0, 0x20, 14 * 16); sub_020070E8(param1, 24, param0->unk_0C.unk_24, 2, 0, 0, 1, 22); sub_0200710C(param1, 21, param0->unk_0C.unk_24, 2, 0, 0, 1, 22); - PaletteSys_LoadPalette(param0->unk_0C.unk_44, 45, 37, 22, 0, 0x20, 0xc * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 45, 37, 22, 0, 0x20, 0xc * 16); } static void ov17_0223D5AC(UnkStruct_ov17_02247A48 *param0) @@ -627,7 +627,7 @@ static void ov17_0223D5B0(UnkStruct_ov17_02247A48 *param0, NARC *param1) { sub_020070E8(param1, 19, param0->unk_0C.unk_24, 4, 0, 0, 1, 22); sub_0200710C(param1, 20, param0->unk_0C.unk_24, 4, 0, 0, 1, 22); - PaletteSys_LoadPalette(param0->unk_0C.unk_44, 45, 34, 22, 1, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 45, 34, 22, 1, 0, 0); } static void ov17_0223D608(UnkStruct_ov17_02247A48 *param0) @@ -639,7 +639,7 @@ static int ov17_0223D60C(UnkStruct_ov17_02247A48 *param0, UnkStruct_ov17_0223D60 { switch (param1->unk_00) { case 0: - if (sub_0200384C(param0->unk_0C.unk_44) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_0C.unk_44) != 0) { break; } diff --git a/src/overlay017/ov17_0223DAD0.c b/src/overlay017/ov17_0223DAD0.c index e4e5f740a7..a6be1bfff1 100644 --- a/src/overlay017/ov17_0223DAD0.c +++ b/src/overlay017/ov17_0223DAD0.c @@ -247,13 +247,13 @@ int ov17_0223DAD0(OverlayManager *param0, int *param1) v0->unk_14.unk_00 = &v0->unk_00->unk_00; ov17_0223E458(v0); - v0->unk_14.unk_90 = sub_02002F38(23); + v0->unk_14.unk_90 = PaletteData_New(23); - sub_02003858(v0->unk_14.unk_90, 1); - sub_02002F70(v0->unk_14.unk_90, 0, 0x200, 23); - sub_02002F70(v0->unk_14.unk_90, 1, 0x200, 23); - sub_02002F70(v0->unk_14.unk_90, 2, (((16 - 2) * 16) * sizeof(u16)), 23); - sub_02002F70(v0->unk_14.unk_90, 3, 0x200, 23); + PaletteData_SetAutoTransparent(v0->unk_14.unk_90, 1); + PaletteData_AllocBuffer(v0->unk_14.unk_90, 0, 0x200, 23); + PaletteData_AllocBuffer(v0->unk_14.unk_90, 1, 0x200, 23); + PaletteData_AllocBuffer(v0->unk_14.unk_90, 2, (((16 - 2) * 16) * sizeof(u16)), 23); + PaletteData_AllocBuffer(v0->unk_14.unk_90, 3, 0x200, 23); v0->unk_1050.unk_00 = Heap_AllocFromHeap(23, 0x200); ov17_0224CDB4(v0, 1); @@ -430,11 +430,11 @@ int ov17_0223DF0C(OverlayManager *param0, int *param1) sub_020127BC(v0->unk_14.unk_94); Font_Free(FONT_SUBSCREEN); Heap_FreeToHeap(v0->unk_1050.unk_00); - sub_02002FA0(v0->unk_14.unk_90, 0); - sub_02002FA0(v0->unk_14.unk_90, 1); - sub_02002FA0(v0->unk_14.unk_90, 2); - sub_02002FA0(v0->unk_14.unk_90, 3); - sub_02002F54(v0->unk_14.unk_90); + PaletteData_FreeBuffer(v0->unk_14.unk_90, 0); + PaletteData_FreeBuffer(v0->unk_14.unk_90, 1); + PaletteData_FreeBuffer(v0->unk_14.unk_90, 2); + PaletteData_FreeBuffer(v0->unk_14.unk_90, 3); + PaletteData_Free(v0->unk_14.unk_90); Strbuf_Free(v0->unk_14.unk_8C); StringTemplate_Free(v0->unk_14.unk_88); MessageLoader_Free(v0->unk_14.unk_84); @@ -498,7 +498,7 @@ static void ov17_0223E09C(void *param0) sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_14.unk_90); + PaletteData_CommitFadedBuffers(v0->unk_14.unk_90); Bg_RunScheduledUpdates(v0->unk_14.unk_60); OS_SetIrqCheckFlag(OS_IE_V_BLANK); @@ -516,12 +516,12 @@ static void ov17_0223E18C(UnkStruct_ov17_0224DF54 *param0) return; } - v0 = sub_0200316C(param0->unk_14.unk_90, 0); + v0 = PaletteData_GetFadedBuffer(param0->unk_14.unk_90, 0); MI_CpuCopy16(v1->unk_00, v0, 0x200); if (v1->unk_10 == 1) { - sub_020039F8(v1->unk_00, v0, v1->unk_06, v1->unk_08 >> 8, v1->unk_0E); + BlendPalettes(v1->unk_00, v0, v1->unk_06, v1->unk_08 >> 8, v1->unk_0E); if (v1->unk_08 == v1->unk_0A) { v1->unk_10 = 0; @@ -795,18 +795,18 @@ static void ov17_0223E67C(UnkStruct_ov17_0224DF54 *param0, NARC *param1) sub_0200710C(param1, v3, param0->unk_14.unk_60, 3, 0, 0, 1, 23); } - PaletteSys_LoadPalette(param0->unk_14.unk_90, 45, 32, 23, 0, 0, 0); - PaletteSys_LoadPalette(param0->unk_14.unk_90, 45, 36, 23, 0, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_14.unk_90, 45, 32, 23, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_14.unk_90, 45, 36, 23, 0, 0x20, 13 * 16); v0 = Options_Frame(param0->unk_00->unk_196C); sub_0200DD0C(param0->unk_14.unk_60, 1, 1, 15, v0, 23); - PaletteSys_LoadPalette(param0->unk_14.unk_90, 38, sub_0200DD08(v0), 23, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_14.unk_90, 38, sub_0200DD08(v0), 23, 0, 0x20, 14 * 16); ov17_0224C848(param0); { u16 *v4; - v4 = sub_02003164(param0->unk_14.unk_90, 0); + v4 = PaletteData_GetUnfadedBuffer(param0->unk_14.unk_90, 0); MI_CpuCopy16(v4, param0->unk_1050.unk_00, 0x200); } } diff --git a/src/overlay017/ov17_0223F7E4.c b/src/overlay017/ov17_0223F7E4.c index 96bc790ed5..ef78f87ccf 100644 --- a/src/overlay017/ov17_0223F7E4.c +++ b/src/overlay017/ov17_0223F7E4.c @@ -597,8 +597,8 @@ void *ov17_0223F88C(UnkStruct_02095C48 *param0, UnkStruct_ov17_0223F88C *param1, for (v7 = 0; v7 < 2; v7++) { v0->unk_34[v7] = Heap_AllocFromHeap(21, 0x200); - PaletteSys_LoadPalette(v6, 45, Unk_ov17_02253238[v7], 21, 1, 0, 0); - v5 = sub_02003164(v6, 1); + PaletteData_LoadBufferFromFileStart(v6, 45, Unk_ov17_02253238[v7], 21, 1, 0, 0); + v5 = PaletteData_GetUnfadedBuffer(v6, 1); MI_CpuCopy16(v5, v0->unk_34[v7], 0x200); } } @@ -659,7 +659,7 @@ void ov17_0223F9C4(UnkStruct_ov17_0223F7E4 *param0, int param1, int param2, void } if (1) { - sub_02002FBC(param0->unk_04->unk_50, param0->unk_34[v0->unk_02], 1, 0, 0x200); + PaletteData_LoadBuffer(param0->unk_04->unk_50, param0->unk_34[v0->unk_02], 1, 0, 0x200); } for (v2 = 0; v2 < 4; v2++) { @@ -762,7 +762,7 @@ static void ov17_0223FBD4(UnkStruct_ov17_0223F7E4 *param0, int param1, int param Strbuf_Free(v0); Strbuf_Free(v1); - sub_02002FEC(param0->unk_04->unk_50, 45, 38, 21, 1, 0x20, 2 * 16, 16 * param0->unk_04->unk_00->unk_10F); + PaletteData_LoadBufferFromFile(param0->unk_04->unk_50, 45, 38, 21, 1, 0x20, 2 * 16, 16 * param0->unk_04->unk_00->unk_10F); } static void ov17_0223FCAC(UnkStruct_ov17_0223F7E4 *param0, int param1, int param2) @@ -812,7 +812,7 @@ static void ov17_0223FCAC(UnkStruct_ov17_0223F7E4 *param0, int param1, int param for (v2 = 0; v2 < 4; v2++) { if ((v0[v2] != 0) && (ov17_02243A98(param0->unk_08, param0->unk_04->unk_00->unk_113, v0[v2]) == 0)) { - sub_02002FBC(param0->unk_04->unk_50, ¶m0->unk_34[1][0x8 * 16], 1, (4 + v2) * 16, 0x20); + PaletteData_LoadBuffer(param0->unk_04->unk_50, ¶m0->unk_34[1][0x8 * 16], 1, (4 + v2) * 16, 0x20); GF_ASSERT(param0->unk_2C9 == 0xff); param0->unk_2C9 = v2; @@ -1128,10 +1128,10 @@ static void ov17_02240424(UnkStruct_ov17_0223F7E4 *param0, int param1, int param }; if (param1 != -1) { - sub_02002FBC(param0->unk_04->unk_50, v0[param1], 1, (4 + param2) * 16, 0x20); + PaletteData_LoadBuffer(param0->unk_04->unk_50, v0[param1], 1, (4 + param2) * 16, 0x20); } else { ov17_022403B0(param0, &Unk_ov17_02253248[param2], &Unk_ov17_02253408[param2], 2, 0); - sub_02002FBC(param0->unk_04->unk_50, ¶m0->unk_34[1][0x8 * 16], 1, (4 + param2) * 16, 0x20); + PaletteData_LoadBuffer(param0->unk_04->unk_50, ¶m0->unk_34[1][0x8 * 16], 1, (4 + param2) * 16, 0x20); } } @@ -1410,7 +1410,7 @@ static void ov17_02240950(SysTask *param0, void *param1) v4 = 1; } - sub_020039B0(v2, 1, v1->unk_09 * 16, 16, v1->unk_04 >> 8, 0x7fff); + PaletteData_Blend(v2, 1, v1->unk_09 * 16, 16, v1->unk_04 >> 8, 0x7fff); if (v4 == 1) { ov17_02240910(v0); diff --git a/src/overlay017/ov17_022413D8.c b/src/overlay017/ov17_022413D8.c index e422f66f54..626b13bfcf 100644 --- a/src/overlay017/ov17_022413D8.c +++ b/src/overlay017/ov17_022413D8.c @@ -457,7 +457,7 @@ static void ov17_022414C0(SysTask *param0, void *param1) return; } - sub_020039B0(v0->unk_00, 0, Unk_ov17_022536B4[v0->unk_0A] * 16 + 1, 4, v0->unk_08 >> 8, 0x7fff); + PaletteData_Blend(v0->unk_00, 0, Unk_ov17_022536B4[v0->unk_0A] * 16 + 1, 4, v0->unk_08 >> 8, 0x7fff); if (v0->unk_08 == 0) { v0->unk_0B = 0; @@ -1789,7 +1789,7 @@ static void ov17_022431E8(SysTask *param0, void *param1) v0->unk_0F = v2; } - sub_020039B0(v0->unk_00->unk_0C.unk_50, 0, (0 * 16 + 1), 2, v0->unk_0F, 0x237e); + PaletteData_Blend(v0->unk_00->unk_0C.unk_50, 0, (0 * 16 + 1), 2, v0->unk_0F, 0x237e); } } break; @@ -1802,7 +1802,7 @@ static void ov17_022431E8(SysTask *param0, void *param1) v0->unk_0F = 0; } - sub_020039B0(v0->unk_00->unk_0C.unk_50, 0, (0 * 16 + 1), 2, v0->unk_0F, 0x237e); + PaletteData_Blend(v0->unk_00->unk_0C.unk_50, 0, (0 * 16 + 1), 2, v0->unk_0F, 0x237e); break; } } diff --git a/src/overlay017/ov17_02247A48.c b/src/overlay017/ov17_02247A48.c index afb8d14ac5..9606855623 100644 --- a/src/overlay017/ov17_02247A48.c +++ b/src/overlay017/ov17_02247A48.c @@ -284,8 +284,8 @@ static void ov17_02247C5C(SysTask *param0, void *param1) break; case 3: G2_SetWnd0InsidePlane(GX_WND_PLANEMASK_BG0 | GX_WND_PLANEMASK_BG1 | GX_WND_PLANEMASK_BG2 | GX_WND_PLANEMASK_BG3 | GX_WND_PLANEMASK_OBJ, 1); - sub_02003A2C(v0->unk_00->unk_0C.unk_44, 0, 0x1fff, 0, 0x0); - sub_02003A2C(v0->unk_00->unk_0C.unk_44, 2, 0x3fff, 0, 0x0); + PaletteData_BlendMulti(v0->unk_00->unk_0C.unk_44, 0, 0x1fff, 0, 0x0); + PaletteData_BlendMulti(v0->unk_00->unk_0C.unk_44, 2, 0x3fff, 0, 0x0); Sound_PlayEffect(1772); v0->unk_10++; break; @@ -1278,8 +1278,8 @@ static void ov17_02248EC4(SysTask *param0, void *param1) break; case 1: if (sub_0200AC1C(1) == 1) { - sub_020038B0(v0->unk_00->unk_0C.unk_44, 0, 0, 0x0, 0, (13 * 16)); - sub_020038B0(v0->unk_00->unk_0C.unk_44, 2, 0, 0x0, 0, ((16 - 2) * 16)); + PaletteData_FillBufferRange(v0->unk_00->unk_0C.unk_44, 0, 0, 0x0, 0, (13 * 16)); + PaletteData_FillBufferRange(v0->unk_00->unk_0C.unk_44, 2, 0, 0x0, 0, ((16 - 2) * 16)); v0->unk_10++; } break; diff --git a/src/overlay017/ov17_022492DC.c b/src/overlay017/ov17_022492DC.c index eebfd34fef..e98b4b2b9d 100644 --- a/src/overlay017/ov17_022492DC.c +++ b/src/overlay017/ov17_022492DC.c @@ -383,9 +383,9 @@ static void ov17_022493DC(UnkStruct_ov17_022492DC *param0) MI_CpuCopy32(v1->rawData, param0->unk_D0[3], 0x800); Heap_FreeToHeap(v2); - sub_020030E4(45, 31, 23, 0x200, 0, param0->unk_E0[0]); - sub_020030E4(45, 38, 23, 32, 16 * param0->unk_04->unk_00->unk_10F, ¶m0->unk_E0[0][2 * 16]); - sub_020030E4(45, 33, 23, 0x200, 0, param0->unk_E0[1]); + LoadPaletteFromFile(45, 31, 23, 0x200, 0, param0->unk_E0[0]); + LoadPaletteFromFile(45, 38, 23, 32, 16 * param0->unk_04->unk_00->unk_10F, ¶m0->unk_E0[0][2 * 16]); + LoadPaletteFromFile(45, 33, 23, 0x200, 0, param0->unk_E0[1]); } static void ov17_022495F8(UnkStruct_ov17_022492DC *param0) @@ -440,7 +440,7 @@ void ov17_02249640(UnkStruct_ov17_022492DC *param0, int param1, int param2, void } if ((v0->unk_02 != 0xffff) && ((param2 == 1) || (v0->unk_02 != v1->unk_02))) { - sub_02002FBC(param0->unk_04->unk_90, param0->unk_E0[v0->unk_02], 1, 0, 0x200); + PaletteData_LoadBuffer(param0->unk_04->unk_90, param0->unk_E0[v0->unk_02], 1, 0, 0x200); } for (v2 = 0; v2 < 4; v2++) { @@ -949,5 +949,5 @@ static void ov17_0224A0C8(SysTask *param0, void *param1) void ov17_0224A0E0(UnkStruct_ov17_022492DC *param0, u16 param1, u8 param2) { - sub_020039B0(param0->unk_04->unk_90, 1, (0 * 16), (16 * 4), param2, param1); + PaletteData_Blend(param0->unk_04->unk_90, 1, (0 * 16), (16 * 4), param2, param1); } diff --git a/src/overlay017/ov17_0224A0FC.c b/src/overlay017/ov17_0224A0FC.c index 16d9be0a3c..0a75702be1 100644 --- a/src/overlay017/ov17_0224A0FC.c +++ b/src/overlay017/ov17_0224A0FC.c @@ -2256,8 +2256,8 @@ void ov17_0224C864(UnkStruct_ov17_0224DF54 *param0, int param1) { u16 *v0; - v0 = sub_02003164(param0->unk_14.unk_90, 0); - sub_020039F8(v0, param0->unk_1050.unk_00, (0x1fff ^ ((1 << 4) | (1 << 3) | (1 << 2))), Unk_ov17_022546DC[param1].unk_02, Unk_ov17_022546DC[param1].unk_00); + v0 = PaletteData_GetUnfadedBuffer(param0->unk_14.unk_90, 0); + BlendPalettes(v0, param0->unk_1050.unk_00, (0x1fff ^ ((1 << 4) | (1 << 3) | (1 << 2))), Unk_ov17_022546DC[param1].unk_02, Unk_ov17_022546DC[param1].unk_00); } void ov17_0224C89C(UnkStruct_ov17_0224DF54 *param0, const UnkStruct_ov17_0224EDE0 *param1) @@ -2368,8 +2368,8 @@ static void ov17_0224CA28(SysTask *param0, void *param1) { u16 *v1; - v1 = sub_02003164(v0->unk_00->unk_14.unk_90, 0); - sub_0200393C(&v1[v0->unk_0A], &v0->unk_00->unk_1050.unk_00[v0->unk_0A], 16, v0->unk_08 >> 8, 0x7fff); + v1 = PaletteData_GetUnfadedBuffer(v0->unk_00->unk_14.unk_90, 0); + BlendPalette(&v1[v0->unk_0A], &v0->unk_00->unk_1050.unk_00[v0->unk_0A], 16, v0->unk_08 >> 8, 0x7fff); } if (v0->unk_08 == 0) { @@ -2448,7 +2448,7 @@ static void ov17_0224CB80(UnkStruct_ov17_0224DF54 *param0, int param1) } ov17_0224CD84(param0, (0x1fff ^ ((1 << 4) | (1 << 3) | (1 << 2))), 8, 16, 0, 0x7fff); - sub_02003178(param0->unk_14.unk_90, 0x4, 0x3fff, -1, 16, 0, 0x7fff); + PaletteData_StartFade(param0->unk_14.unk_90, 0x4, 0x3fff, -1, 16, 0, 0x7fff); G2_SetBlendBrightness(GX_BLEND_PLANEMASK_BG0 | GX_BLEND_PLANEMASK_BG1 | GX_BLEND_PLANEMASK_BG2 | GX_BLEND_PLANEMASK_BG3 | GX_BLEND_PLANEMASK_OBJ | GX_BLEND_PLANEMASK_BD, 16); @@ -2589,7 +2589,7 @@ static void ov17_0224CF4C(SysTask *param0, void *param1) v2 = v0->unk_10; } - sub_0200393C(&v0->unk_08, &v1, 1, v2, v0->unk_0A); + BlendPalette(&v0->unk_08, &v1, 1, v2, v0->unk_0A); ov22_0225B198(v0->unk_00, v1); if (v2 >= v0->unk_10) { diff --git a/src/overlay017/ov17_0224CFB8.c b/src/overlay017/ov17_0224CFB8.c index f85bb2a2df..59b7984c68 100644 --- a/src/overlay017/ov17_0224CFB8.c +++ b/src/overlay017/ov17_0224CFB8.c @@ -1058,7 +1058,7 @@ static void ov17_0224DFF8(SysTask *param0, void *param1) switch (v0->unk_10) { case 0: ov17_0224CDB4(v0->unk_00, 0); - sub_02003178(v0->unk_00->unk_14.unk_90, 0x1, (0x1fff ^ ((1 << 4) | (1 << 3) | (1 << 2))), -2, 0, 6, 0x0); + PaletteData_StartFade(v0->unk_00->unk_14.unk_90, 0x1, (0x1fff ^ ((1 << 4) | (1 << 3) | (1 << 2))), -2, 0, 6, 0x0); for (v2 = 0; v2 < 4; v2++) { ov17_0224CEE4(v0->unk_00, v2, 0x7fff, 0x254a, 16, 4, &v0->unk_11[v2]); @@ -1067,7 +1067,7 @@ static void ov17_0224DFF8(SysTask *param0, void *param1) v0->unk_10++; break; case 1: - if (sub_0200384C(v0->unk_00->unk_14.unk_90) == 0) { + if (PaletteData_GetSelectedBuffersMask(v0->unk_00->unk_14.unk_90) == 0) { for (v2 = 0; v2 < 4; v2++) { if (v0->unk_11[v2] == 0) { break; @@ -1124,11 +1124,11 @@ static void ov17_0224DFF8(SysTask *param0, void *param1) } break; case 4: - sub_02003178(v0->unk_00->unk_14.unk_90, 0x1, (0x1fff ^ ((1 << 4) | (1 << 3) | (1 << 2))), -2, 6, 0, 0x0); + PaletteData_StartFade(v0->unk_00->unk_14.unk_90, 0x1, (0x1fff ^ ((1 << 4) | (1 << 3) | (1 << 2))), -2, 6, 0, 0x0); v0->unk_10++; break; case 5: - if (sub_0200384C(v0->unk_00->unk_14.unk_90) == 0) { + if (PaletteData_GetSelectedBuffersMask(v0->unk_00->unk_14.unk_90) == 0) { ov17_0224CDB4(v0->unk_00, 1); v0->unk_10++; } diff --git a/src/overlay017/ov17_0224F4D4.c b/src/overlay017/ov17_0224F4D4.c index 5bbe3c2149..179d2ad6c9 100644 --- a/src/overlay017/ov17_0224F4D4.c +++ b/src/overlay017/ov17_0224F4D4.c @@ -160,13 +160,13 @@ int ov17_0224F4D4(OverlayManager *param0, int *param1) ov17_0224FE1C(v0); v0->unk_127B = 0; - v0->unk_10.unk_C0 = sub_02002F38(24); + v0->unk_10.unk_C0 = PaletteData_New(24); - sub_02003858(v0->unk_10.unk_C0, 1); - sub_02002F70(v0->unk_10.unk_C0, 0, 0x200, 24); - sub_02002F70(v0->unk_10.unk_C0, 1, 0x200, 24); - sub_02002F70(v0->unk_10.unk_C0, 2, (((16 - 2) * 16) * sizeof(u16)), 24); - sub_02002F70(v0->unk_10.unk_C0, 3, 0x200, 24); + PaletteData_SetAutoTransparent(v0->unk_10.unk_C0, 1); + PaletteData_AllocBuffer(v0->unk_10.unk_C0, 0, 0x200, 24); + PaletteData_AllocBuffer(v0->unk_10.unk_C0, 1, 0x200, 24); + PaletteData_AllocBuffer(v0->unk_10.unk_C0, 2, (((16 - 2) * 16) * sizeof(u16)), 24); + PaletteData_AllocBuffer(v0->unk_10.unk_C0, 3, 0x200, 24); v0->unk_10.unk_20 = BgConfig_New(24); @@ -308,11 +308,11 @@ int ov17_0224F86C(OverlayManager *param0, int *param1) sub_020127BC(v0->unk_10.unk_C4); Font_Free(FONT_SUBSCREEN); - sub_02002FA0(v0->unk_10.unk_C0, 0); - sub_02002FA0(v0->unk_10.unk_C0, 1); - sub_02002FA0(v0->unk_10.unk_C0, 2); - sub_02002FA0(v0->unk_10.unk_C0, 3); - sub_02002F54(v0->unk_10.unk_C0); + PaletteData_FreeBuffer(v0->unk_10.unk_C0, 0); + PaletteData_FreeBuffer(v0->unk_10.unk_C0, 1); + PaletteData_FreeBuffer(v0->unk_10.unk_C0, 2); + PaletteData_FreeBuffer(v0->unk_10.unk_C0, 3); + PaletteData_Free(v0->unk_10.unk_C0); Strbuf_Free(v0->unk_10.unk_BC); StringTemplate_Free(v0->unk_10.unk_B8); @@ -361,7 +361,7 @@ static void ov17_0224FA24(void *param0) sub_02008A94(v0->unk_10.unk_04); sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_10.unk_C0); + PaletteData_CommitFadedBuffers(v0->unk_10.unk_C0); Bg_RunScheduledUpdates(v0->unk_10.unk_20); OS_SetIrqCheckFlag(OS_IE_V_BLANK); @@ -614,7 +614,7 @@ static void ov17_0224FE70(UnkStruct_ov17_0224FCA0 *param0) { sub_02006E3C(45, 19, param0->unk_10.unk_20, 4, 0, 0, 1, 24); sub_02006E60(45, 20, param0->unk_10.unk_20, 4, 0, 0, 1, 24); - PaletteSys_LoadPalette(param0->unk_10.unk_C0, 45, 34, 24, 1, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 45, 34, 24, 1, 0, 0); } static void ov17_0224FEC8(UnkStruct_ov17_0224FCA0 *param0) diff --git a/src/overlay017/ov17_02250744.c b/src/overlay017/ov17_02250744.c index e853c5ebf5..8793226efe 100644 --- a/src/overlay017/ov17_02250744.c +++ b/src/overlay017/ov17_02250744.c @@ -286,13 +286,13 @@ void ov17_022509AC(UnkStruct_ov17_0224FCA0 *param0) sub_020070E8(v1, 23, param0->unk_10.unk_20, 3, 0, 0, 1, 24); sub_0200710C(v1, 22, param0->unk_10.unk_20, 3, 0, 0, 1, 24); Bg_ClearTilemap(param0->unk_10.unk_20, 1); - PaletteSys_LoadPalette(param0->unk_10.unk_C0, 45, 35, 24, 0, 0, 0); - PaletteSys_LoadPalette(param0->unk_10.unk_C0, 45, 36, 24, 0, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 45, 35, 24, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 45, 36, 24, 0, 0x20, 13 * 16); v0 = Options_Frame(param0->unk_00->unk_196C); sub_0200DD0C(param0->unk_10.unk_20, 1, 1, 15, v0, 24); - PaletteSys_LoadPalette(param0->unk_10.unk_C0, 38, sub_0200DD08(v0), 24, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 38, sub_0200DD08(v0), 24, 0, 0x20, 14 * 16); Bg_ClearTilemap(param0->unk_10.unk_20, 2); NARC_dtor(v1); } @@ -325,13 +325,13 @@ void ov17_02250B00(UnkStruct_ov17_0224FCA0 *param0) sub_0200710C(v1, 25, param0->unk_10.unk_20, 3, 0, 0, 1, 24); sub_0200710C(v1, 26, param0->unk_10.unk_20, 2, 0, 0, 1, 24); Bg_ClearTilemap(param0->unk_10.unk_20, 1); - PaletteSys_LoadPalette(param0->unk_10.unk_C0, 45, 39, 24, 0, 0, 0); - PaletteSys_LoadPalette(param0->unk_10.unk_C0, 45, 36, 24, 0, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 45, 39, 24, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 45, 36, 24, 0, 0x20, 13 * 16); v0 = Options_Frame(param0->unk_00->unk_196C); sub_0200DD0C(param0->unk_10.unk_20, 1, 1, 15, v0, 24); - PaletteSys_LoadPalette(param0->unk_10.unk_C0, 38, sub_0200DD08(v0), 24, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 38, sub_0200DD08(v0), 24, 0, 0x20, 14 * 16); { Strbuf *v2; @@ -363,8 +363,8 @@ void ov17_02250B00(UnkStruct_ov17_0224FCA0 *param0) void ov17_02250CEC(UnkStruct_ov17_0224FCA0 *param0) { - sub_020038B0(param0->unk_10.unk_C0, 1, 2, 0x0, 0, 16 * 16); - sub_020038B0(param0->unk_10.unk_C0, 3, 2, 0x0, 0, 16 * 16); + PaletteData_FillBufferRange(param0->unk_10.unk_C0, 1, 2, 0x0, 0, 16 * 16); + PaletteData_FillBufferRange(param0->unk_10.unk_C0, 3, 2, 0x0, 0, 16 * 16); } void ov17_02250D24(UnkStruct_ov17_0224FCA0 *param0) diff --git a/src/overlay021/ov21_021E737C.c b/src/overlay021/ov21_021E737C.c index 39fe4adfde..a466ed0d52 100644 --- a/src/overlay021/ov21_021E737C.c +++ b/src/overlay021/ov21_021E737C.c @@ -1085,12 +1085,12 @@ static void ov21_021E8400(UnkStruct_ov21_021E7714 *param0, u8 param1, u16 param2 NNSG2dPaletteData *v0 = SpriteResource_GetPaletteFade(param0->unk_14[1]); const NNSG2dImagePaletteProxy *v1 = sub_0200A72C(param0->unk_14[1], NULL); - sub_0200393C(v0->pRawData, param0->unk_BC, 3 * 16, param1, param2); + BlendPalette(v0->pRawData, param0->unk_BC, 3 * 16, param1, param2); sub_0201DC68(NNS_GFD_DST_2D_OBJ_PLTT_MAIN, NNS_G2dGetImagePaletteLocation(v1, NNS_G2D_VRAM_TYPE_2DMAIN), param0->unk_BC, 3 * 32); v0 = SpriteResource_GetPaletteFade(param0->unk_24[1]); v1 = sub_0200A72C(param0->unk_24[1], NULL); - sub_0200393C(v0->pRawData, param0->unk_C0, 5 * 16, param1, param2); + BlendPalette(v0->pRawData, param0->unk_C0, 5 * 16, param1, param2); sub_0201DC68(NNS_GFD_DST_2D_OBJ_PLTT_MAIN, NNS_G2dGetImagePaletteLocation(v1, NNS_G2D_VRAM_TYPE_2DMAIN), param0->unk_C0, 5 * 32); } diff --git a/src/overlay021/ov21_021E8D48.c b/src/overlay021/ov21_021E8D48.c index 941f45a445..f81dacb6c8 100644 --- a/src/overlay021/ov21_021E8D48.c +++ b/src/overlay021/ov21_021E8D48.c @@ -715,22 +715,22 @@ static void ov21_021E9828(SysTask *param0, void *param1) static void ov21_021E98D8(PaletteData *param0, Sprite *param1) { - sub_02003070(param0, 0, 0, 32 * 0x10); - sub_02003070(param0, 2, 0, (((16 - 2) * 16) * sizeof(u16))); + PaletteData_LoadBufferFromHardware(param0, 0, 0, 32 * 0x10); + PaletteData_LoadBufferFromHardware(param0, 2, 0, (((16 - 2) * 16) * sizeof(u16))); } static void ov21_021E98F8(PaletteData *param0, Sprite *param1, int param2, int param3, int param4, int param5, int param6) { sub_020086FC(param1, param2, param4, param5, param6); - sub_02003178(param0, 0x1 | 0x4, 0xffff, param5, param3, param4, param6); - sub_02003858(param0, 0); + PaletteData_StartFade(param0, 0x1 | 0x4, 0xffff, param5, param3, param4, param6); + PaletteData_SetAutoTransparent(param0, 0); } static BOOL ov21_021E9948(PaletteData *param0, Sprite *param1) { BOOL v0[2]; - v0[0] = sub_0200384C(param0); + v0[0] = PaletteData_GetSelectedBuffersMask(param0); v0[1] = sub_020087B4(param1); if ((v0[0] == 0) && (v0[1] == 0)) { diff --git a/src/overlay062/ov62_0222F2C0.c b/src/overlay062/ov62_0222F2C0.c index a946dd0dce..b1612bc24b 100644 --- a/src/overlay062/ov62_0222F2C0.c +++ b/src/overlay062/ov62_0222F2C0.c @@ -58,17 +58,17 @@ void ov62_0222F2C0(UnkStruct_0208C06C *param0) param0->unk_14.unk_00 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__BATT_REC__BATT_REC_GRA, 102); param0->unk_14.unk_10 = BgConfig_New(102); - param0->unk_14.unk_14 = sub_02002F38(102); + param0->unk_14.unk_14 = PaletteData_New(102); param0->unk_14.unk_4C = sub_02024220(102, 0, 1, 0, 4, NULL); param0->unk_14.unk_50 = sub_0200762C(102); NNS_G2dSetupSoftwareSpriteCamera(); - sub_02003858(param0->unk_14.unk_14, 1); - sub_02002F70(param0->unk_14.unk_14, 0, 0x200, 102); - sub_02002F70(param0->unk_14.unk_14, 1, 0x200, 102); - sub_02002F70(param0->unk_14.unk_14, 2, 0x200, 102); - sub_02002F70(param0->unk_14.unk_14, 3, 0x200, 102); + PaletteData_SetAutoTransparent(param0->unk_14.unk_14, 1); + PaletteData_AllocBuffer(param0->unk_14.unk_14, 0, 0x200, 102); + PaletteData_AllocBuffer(param0->unk_14.unk_14, 1, 0x200, 102); + PaletteData_AllocBuffer(param0->unk_14.unk_14, 2, 0x200, 102); + PaletteData_AllocBuffer(param0->unk_14.unk_14, 3, 0x200, 102); ov62_0222F670(param0->unk_14.unk_10); ov62_0222F848(param0); @@ -98,8 +98,8 @@ void ov62_0222F2C0(UnkStruct_0208C06C *param0) void *v1 = sub_020394A8(102); NNS_G2dGetUnpackedPaletteData(v1, &v0); - sub_02002FBC(param0->unk_14.unk_14, v0->pRawData, 2, 14 * 16, 32); - sub_02002FBC(param0->unk_14.unk_14, v0->pRawData, 3, 14 * 16, 32); + PaletteData_LoadBuffer(param0->unk_14.unk_14, v0->pRawData, 2, 14 * 16, 32); + PaletteData_LoadBuffer(param0->unk_14.unk_14, v0->pRawData, 3, 14 * 16, 32); Heap_FreeToHeap(v1); } } @@ -158,11 +158,11 @@ void ov62_0222F514(UnkStruct_0208C06C *param0) Bg_FreeTilemapBuffer(param0->unk_14.unk_10, 6); Bg_FreeTilemapBuffer(param0->unk_14.unk_10, 7); Heap_FreeToHeap(param0->unk_14.unk_10); - sub_02002FA0(param0->unk_14.unk_14, 0); - sub_02002FA0(param0->unk_14.unk_14, 1); - sub_02002FA0(param0->unk_14.unk_14, 2); - sub_02002FA0(param0->unk_14.unk_14, 3); - sub_02002F54(param0->unk_14.unk_14); + PaletteData_FreeBuffer(param0->unk_14.unk_14, 0); + PaletteData_FreeBuffer(param0->unk_14.unk_14, 1); + PaletteData_FreeBuffer(param0->unk_14.unk_14, 2); + PaletteData_FreeBuffer(param0->unk_14.unk_14, 3); + PaletteData_Free(param0->unk_14.unk_14); if (param0->unk_00 == 0) { MiscSaveBlock *v0 = SaveData_MiscSaveBlock(param0->unk_830); @@ -363,7 +363,7 @@ void ov62_0222F8E4(void *param0) UnkStruct_0208C06C *v0 = param0; sub_0201DCAC(); - sub_02003694(v0->unk_14.unk_14); + PaletteData_CommitFadedBuffers(v0->unk_14.unk_14); Bg_RunScheduledUpdates(v0->unk_14.unk_10); OS_SetIrqCheckFlag(OS_IE_V_BLANK); diff --git a/src/overlay062/ov62_022300D8.c b/src/overlay062/ov62_022300D8.c index 32712f9330..92d10d00ee 100644 --- a/src/overlay062/ov62_022300D8.c +++ b/src/overlay062/ov62_022300D8.c @@ -53,23 +53,23 @@ void ov62_022300D8(UnkStruct_0208C06C *param0) sub_020070E8(v0, 67, v1, 1, 0, 0, 0, 102); sub_020070E8(v0, 67, v1, 5, 0, 0, 0, 102); sub_0200710C(v0, 69, v1, 5, 0, 0, 0, 102); - PaletteSys_LoadPalette(v4, 162, ov62_02231710(param0, 3), 102, 0, 0x20 * (8 + 1), 0); - PaletteSys_LoadPalette(v4, 162, ov62_02231710(param0, 3), 102, 1, 0x20 * (8 + 1), 0); - PaletteSys_LoadPalette(v4, 162, ov62_02231710(param0, 0), 102, 0, 0x20, 14 * 16); - PaletteSys_LoadPalette(v4, 162, ov62_02231710(param0, 0), 102, 1, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(v4, 162, ov62_02231710(param0, 3), 102, 0, 0x20 * (8 + 1), 0); + PaletteData_LoadBufferFromFileStart(v4, 162, ov62_02231710(param0, 3), 102, 1, 0x20 * (8 + 1), 0); + PaletteData_LoadBufferFromFileStart(v4, 162, ov62_02231710(param0, 0), 102, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(v4, 162, ov62_02231710(param0, 0), 102, 1, 0x20, 14 * 16); } else { sub_020070E8(v0, 54, v1, 1, 0, 0, 0, 102); sub_020070E8(v0, 54, v1, 5, 0, 0, 0, 102); sub_0200710C(v0, 55, v1, 5, 0, 0, 0, 102); - PaletteSys_LoadPalette(v4, 162, 53, 102, 0, 0x20 * (8 + 1), 0); - PaletteSys_LoadPalette(v4, 162, 53, 102, 1, 0x20 * (8 + 1), 0); - PaletteSys_LoadPalette(v4, 162, 52, 102, 0, 0x20, 14 * 16); - PaletteSys_LoadPalette(v4, 162, 52, 102, 1, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(v4, 162, 53, 102, 0, 0x20 * (8 + 1), 0); + PaletteData_LoadBufferFromFileStart(v4, 162, 53, 102, 1, 0x20 * (8 + 1), 0); + PaletteData_LoadBufferFromFileStart(v4, 162, 52, 102, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(v4, 162, 52, 102, 1, 0x20, 14 * 16); } sub_0200710C(v0, 70, v1, 5, 0, 0, 0, 102); sub_0200710C(v0, 70, v1, 1, 0, 0, 0, 102); - sub_02003A2C(v4, 1, 0x2, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(v4, 1, 0x2, 16, param0->unk_14.unk_44); } void ov62_022302A8(UnkStruct_0208C06C *param0, int param1, BOOL param2) @@ -440,7 +440,7 @@ void ov62_0223088C(UnkStruct_0208C06C *param0) v0++; } while (v0 < param0->unk_534.unk_1A4); - sub_02003A2C(v5, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(v5, 2, 0xC, 16, param0->unk_14.unk_44); } void ov62_02230A5C(UnkStruct_0208C06C *param0) diff --git a/src/overlay062/ov62_02231690.c b/src/overlay062/ov62_02231690.c index beb85ff56b..1c14258434 100644 --- a/src/overlay062/ov62_02231690.c +++ b/src/overlay062/ov62_02231690.c @@ -168,10 +168,10 @@ void ov62_022317CC(UnkStruct_0208C06C *param0, int param1) SpriteGfxHandler *v2 = param0->unk_14.unk_08; NARC *v3 = param0->unk_14.unk_00; - PaletteSys_LoadPalette(v0, 162, ov62_02231710(param0, 3), 102, 0, 0x20 * (8 + 1), 0); - PaletteSys_LoadPalette(v0, 162, ov62_02231710(param0, 3), 102, 1, 0x20 * (8 + 1), 0); - PaletteSys_LoadPalette(v0, 162, ov62_02231710(param0, 0), 102, 0, 0x20, 14 * 16); - PaletteSys_LoadPalette(v0, 162, ov62_02231710(param0, 0), 102, 1, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(v0, 162, ov62_02231710(param0, 3), 102, 0, 0x20 * (8 + 1), 0); + PaletteData_LoadBufferFromFileStart(v0, 162, ov62_02231710(param0, 3), 102, 1, 0x20 * (8 + 1), 0); + PaletteData_LoadBufferFromFileStart(v0, 162, ov62_02231710(param0, 0), 102, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(v0, 162, ov62_02231710(param0, 0), 102, 1, 0x20, 14 * 16); sub_0208B63C(param0->unk_6F0, param0->unk_14.unk_48); sub_0208B63C(param0->unk_6F0, param0->unk_14.unk_48); SpriteGfxHandler_UnloadPlttObjById(v2, 9999); @@ -182,10 +182,10 @@ void ov62_022317CC(UnkStruct_0208C06C *param0, int param1) void ov62_022318E8(UnkStruct_0208C06C *param0) { - sub_02003A2C(param0->unk_14.unk_14, 2, 0xFFFF, 0, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 0, 0xFFFF, 0, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xFFFF, 0, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0xFFFF, 0, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xFFFF, 0, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xFFFF, 0, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xFFFF, 0, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0xFFFF, 0, param0->unk_14.unk_44); } u16 *ov62_Pokedex_Alphabetical(int heapID, int unused, int *pokedexLength) diff --git a/src/overlay062/ov62_02234A10.c b/src/overlay062/ov62_02234A10.c index 9cfe942db1..ed701bfb3d 100644 --- a/src/overlay062/ov62_02234A10.c +++ b/src/overlay062/ov62_02234A10.c @@ -71,10 +71,10 @@ static BOOL ov62_02234AB4(UnkStruct_0208C06C *param0) } sub_0200F174(0, 1, 1, 0x0, 6, 1, 102); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xFFFE, 16, ov62_022316D0(param0)); - sub_02003A2C(param0->unk_14.unk_14, 0, 0xBFFF, 16, ov62_022316D0(param0)); - sub_02003A2C(param0->unk_14.unk_14, 3, 0x3FFE, 16, ov62_022316D0(param0)); - sub_02003A2C(param0->unk_14.unk_14, 1, 0xFFFF, 16, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xFFFE, 16, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xBFFF, 16, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0x3FFE, 16, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0xFFFF, 16, ov62_022316D0(param0)); sub_0208BA30(param0->unk_6F4); sub_0208BA30(param0->unk_6F0); param0->unk_08++; @@ -117,7 +117,7 @@ static BOOL ov62_02234AB4(UnkStruct_0208C06C *param0) case 4: if (param0->unk_0C < 16) { param0->unk_0C += 4; - sub_02003A2C(param0->unk_14.unk_14, 0, 0xF000, param0->unk_0C, 0xFFFF); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xF000, param0->unk_0C, 0xFFFF); } else { param0->unk_08++; } @@ -125,7 +125,7 @@ static BOOL ov62_02234AB4(UnkStruct_0208C06C *param0) case 5: if (param0->unk_0C > 0) { param0->unk_0C -= 4; - sub_02003A2C(param0->unk_14.unk_14, 0, 0xF000, param0->unk_0C, 0xFFFF); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xF000, param0->unk_0C, 0xFFFF); } else { param0->unk_08++; } @@ -189,13 +189,13 @@ static BOOL ov62_02234CDC(UnkStruct_0208C06C *param0) } else { if (param0->unk_0C != 0) { param0->unk_0C -= 2; - sub_02003A2C(param0->unk_14.unk_14, 2, 0xFFFE, param0->unk_0C, ov62_022316D0(param0)); - sub_02003A2C(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_0C, ov62_022316D0(param0)); - sub_02003A2C(param0->unk_14.unk_14, 3, 0x3FFE, param0->unk_0C, ov62_022316D0(param0)); - sub_02003A2C(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_0C, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xFFFE, param0->unk_0C, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_0C, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0x3FFE, param0->unk_0C, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_0C, ov62_022316D0(param0)); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, 16, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); param0->unk_08++; } } @@ -230,7 +230,7 @@ static BOOL ov62_02234EF8(UnkStruct_0208C06C *param0) sub_0208B9E0(param0->unk_6F0, 1); sub_0208B8B0(param0->unk_6F0, 1); param0->unk_0C++; - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, 16 - param0->unk_0C, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, 16 - param0->unk_0C, param0->unk_14.unk_44); if (param0->unk_0C == 2) { param0->unk_0C = 15; @@ -238,12 +238,12 @@ static BOOL ov62_02234EF8(UnkStruct_0208C06C *param0) } break; case 1: - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, param0->unk_0C, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, param0->unk_0C, param0->unk_14.unk_44); param0->unk_08++; break; case 2: param0->unk_0C--; - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, param0->unk_0C, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, param0->unk_0C, param0->unk_14.unk_44); if (param0->unk_0C == 0) { param0->unk_08++; @@ -283,7 +283,7 @@ BOOL ov62_02235008(UnkStruct_0208C06C *param0) param0->unk_860 = v0; v0->unk_50 = 16; - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_50, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_50, param0->unk_14.unk_44); { int v1; @@ -309,7 +309,7 @@ BOOL ov62_02235008(UnkStruct_0208C06C *param0) if (v0->unk_50 != 0) { v0->unk_50 -= (1 * 1); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_50, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_50, param0->unk_14.unk_44); } { diff --git a/src/overlay062/ov62_02235278.c b/src/overlay062/ov62_02235278.c index eb239d28b2..fecd2edb6c 100644 --- a/src/overlay062/ov62_02235278.c +++ b/src/overlay062/ov62_02235278.c @@ -107,10 +107,10 @@ static BOOL ov62_02235324(UnkStruct_0208C06C *param0) case 1: if (param0->unk_0C != 16) { param0->unk_0C += 2; - sub_02003A2C(param0->unk_14.unk_14, 2, 0xFFFE, param0->unk_0C, ov62_022316D0(param0)); - sub_02003A2C(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_0C, ov62_022316D0(param0)); - sub_02003A2C(param0->unk_14.unk_14, 3, 0x3FFE, param0->unk_0C, ov62_022316D0(param0)); - sub_02003A2C(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_0C, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xFFFE, param0->unk_0C, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_0C, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0x3FFE, param0->unk_0C, ov62_022316D0(param0)); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_0C, ov62_022316D0(param0)); } else { param0->unk_0C = 16; param0->unk_08++; @@ -275,7 +275,7 @@ static BOOL ov62_02235580(UnkStruct_0208C06C *param0) if (v0->unk_00 != 16) { v0->unk_00 += 2; - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_00, param0->unk_14.unk_44); } { @@ -446,7 +446,7 @@ static BOOL ov62_02235854(UnkStruct_0208C06C *param0) if (v0->unk_00 != 16) { v0->unk_00 += 2; - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_00, param0->unk_14.unk_44); } if (v0->unk_04 == 0) { @@ -503,19 +503,19 @@ static BOOL ov62_02235A80(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); break; case 2: GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 0); GXLayers_EngineBToggleLayers(GX_PLANEMASK_OBJ, 0); ov62_022317CC(param0, param0->unk_14.unk_48); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); param0->unk_08++; break; case 3: @@ -528,10 +528,10 @@ static BOOL ov62_02235A80(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 0); @@ -556,19 +556,19 @@ static BOOL ov62_02235C70(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); break; case 2: GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 0); GXLayers_EngineBToggleLayers(GX_PLANEMASK_OBJ, 0); ov62_022317CC(param0, param0->unk_14.unk_48); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); param0->unk_08++; break; case 3: @@ -581,10 +581,10 @@ static BOOL ov62_02235C70(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 0, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0xFFFF, param0->unk_14.unk_40, param0->unk_14.unk_44); break; default: param0->unk_14.unk_40 = 0; diff --git a/src/overlay062/ov62_02235E64.c b/src/overlay062/ov62_02235E64.c index a121eebc41..1fd341a003 100644 --- a/src/overlay062/ov62_02235E64.c +++ b/src/overlay062/ov62_02235E64.c @@ -110,9 +110,9 @@ static BOOL ov62_02235EBC(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); break; case 1: ov62_02234540(param0, 1); @@ -199,7 +199,7 @@ static BOOL ov62_0223604C(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 3); @@ -358,7 +358,7 @@ static BOOL ov62_022363CC(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_022362B8(param0); @@ -377,7 +377,7 @@ static BOOL ov62_022363CC(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 4: if (TouchScreen_LocationPressed(&Unk_ov62_02248C14[0])) { @@ -415,7 +415,7 @@ static BOOL ov62_022363CC(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: if (v0->unk_198 == 1) { @@ -545,7 +545,7 @@ static BOOL ov62_022367B4(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_0223376C(param0, 1); @@ -566,13 +566,13 @@ static BOOL ov62_022367B4(UnkStruct_0208C06C *param0) if (ov62_02231664(&v0->unk_08, 0)) { ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); Heap_FreeToHeap(v0); } else { - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); } break; @@ -627,7 +627,7 @@ static BOOL ov62_02236920(UnkStruct_0208C06C *param0) v0->unk_198 = 0; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 4: sub_0200F174(0, 1, 1, 0x0, 6, 1, 102); diff --git a/src/overlay062/ov62_02236CBC.c b/src/overlay062/ov62_02236CBC.c index 6d6e89b535..0768ffc52c 100644 --- a/src/overlay062/ov62_02236CBC.c +++ b/src/overlay062/ov62_02236CBC.c @@ -245,13 +245,13 @@ static void ov62_0223712C(UnkStruct_0208C06C *param0) PaletteData *v9 = param0->unk_14.unk_14; u16 *v10; - v10 = sub_0200316C(v9, 2); + v10 = PaletteData_GetFadedBuffer(v9, 2); ov62_022370D4(v10, (4 + v8[v5]) * 16, 16); } } } - sub_02003858(v4, 1); + PaletteData_SetAutoTransparent(v4, 1); } static void ov62_022371CC(UnkStruct_0208C06C *param0) @@ -613,9 +613,9 @@ static BOOL ov62_02237884(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_00, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_00, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_00, param0->unk_14.unk_44); break; case 2: @@ -627,7 +627,7 @@ static BOOL ov62_02237884(UnkStruct_0208C06C *param0) ov62_02234314(); Bg_SetPriority(6, 2); ov62_02236E14(param0); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC | 0x10, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC | 0x10, v0->unk_00, param0->unk_14.unk_44); param0->unk_08++; break; case 3: @@ -655,7 +655,7 @@ static BOOL ov62_02237884(UnkStruct_0208C06C *param0) ov62_02237814(param0); } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC | 0x10, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC | 0x10, v0->unk_00, param0->unk_14.unk_44); } break; default: ov62_0222FB60(param0, 1); @@ -699,8 +699,8 @@ static BOOL ov62_02237B00(UnkStruct_0208C06C *param0) v0->unk_00 += 2; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC | 0x10, v0->unk_00, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x4018, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC | 0x10, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x4018, v0->unk_00, param0->unk_14.unk_44); if (ov62_022376C4(param0) == 0) { v0->unk_00 = 0; @@ -741,9 +741,9 @@ static BOOL ov62_02237B00(UnkStruct_0208C06C *param0) } else { param0->unk_08++; ov62_02231688(&v0->unk_00); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_00, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC | 0x10, v0->unk_00, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC | 0x10, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_00, param0->unk_14.unk_44); } break; @@ -754,12 +754,12 @@ static BOOL ov62_02237B00(UnkStruct_0208C06C *param0) Heap_FreeToHeap(v0); ov62_022318E8(param0); ov62_02231688(&v0->unk_00); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); } else { - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_00, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_00, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_00, param0->unk_14.unk_44); } break; diff --git a/src/overlay062/ov62_02237D24.c b/src/overlay062/ov62_02237D24.c index 0dedcff1e5..44780c72c8 100644 --- a/src/overlay062/ov62_02237D24.c +++ b/src/overlay062/ov62_02237D24.c @@ -243,9 +243,9 @@ static BOOL ov62_02237DB8(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); break; case 1: Bg_SetPriority(0, 0); @@ -310,7 +310,7 @@ static BOOL ov62_02237F08(UnkStruct_0208C06C *param0) param0->unk_08++; break; case 1: - sub_02003070(param0->unk_14.unk_14, 0, 0 * 16, 16 * 0x20); + PaletteData_LoadBufferFromHardware(param0->unk_14.unk_14, 0, 0 * 16, 16 * 0x20); param0->unk_08++; break; case 2: @@ -323,7 +323,7 @@ static BOOL ov62_02237F08(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 3); @@ -405,7 +405,7 @@ static BOOL ov62_022380B0(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02234358(param0, param0->unk_6F0, 128, 96); @@ -471,7 +471,7 @@ static BOOL ov62_022380B0(UnkStruct_0208C06C *param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -480,8 +480,8 @@ static BOOL ov62_022380B0(UnkStruct_0208C06C *param0) Overlay_UnloadByID(FS_OVERLAY_ID(overlay22)); SetMainCallback(ov62_0222F8E4, param0); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; @@ -527,7 +527,7 @@ static BOOL ov62_022383E4(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02231688(&v0->unk_08); @@ -560,7 +560,7 @@ static BOOL ov62_022383E4(UnkStruct_0208C06C *param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -569,8 +569,8 @@ static BOOL ov62_022383E4(UnkStruct_0208C06C *param0) Overlay_UnloadByID(FS_OVERLAY_ID(overlay22)); SetMainCallback(ov62_0222F8E4, param0); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; } @@ -618,7 +618,7 @@ static BOOL ov62_02238610(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: sub_0202404C(v0->unk_1D0[0]); @@ -646,7 +646,7 @@ static BOOL ov62_02238610(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; default: @@ -726,7 +726,7 @@ static BOOL ov62_02238794(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_02239B7C(param0); @@ -777,7 +777,7 @@ static BOOL ov62_0223896C(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02231688(&v0->unk_08); @@ -810,7 +810,7 @@ static BOOL ov62_0223896C(UnkStruct_0208C06C *param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -819,8 +819,8 @@ static BOOL ov62_0223896C(UnkStruct_0208C06C *param0) Overlay_UnloadByID(FS_OVERLAY_ID(overlay22)); SetMainCallback(ov62_0222F8E4, param0); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; @@ -924,7 +924,7 @@ static BOOL ov62_02238D04(UnkStruct_0208C06C *param0) param0->unk_08++; break; case 1: - sub_02003070(param0->unk_14.unk_14, 0, 0 * 16, 16 * 0x20); + PaletteData_LoadBufferFromHardware(param0->unk_14.unk_14, 0, 0 * 16, 16 * 0x20); param0->unk_08++; break; case 2: @@ -939,7 +939,7 @@ static BOOL ov62_02238D04(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 8); @@ -1034,7 +1034,7 @@ static BOOL ov62_02238F24(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 3); @@ -1106,7 +1106,7 @@ static BOOL ov62_0223900C(UnkStruct_0208C06C *param0) if (v0->unk_0C == 0) { (void)0; } else { - sub_02003070(param0->unk_14.unk_14, 0, 0 * 16, 16 * 0x20); + PaletteData_LoadBufferFromHardware(param0->unk_14.unk_14, 0, 0 * 16, 16 * 0x20); } param0->unk_08++; @@ -1198,7 +1198,7 @@ static BOOL ov62_0223921C(UnkStruct_0208C06C *param0) break; case 3: if (v0->unk_0C == 0) { - sub_02003070(param0->unk_14.unk_14, 0, 0 * 16, 16 * 0x20); + PaletteData_LoadBufferFromHardware(param0->unk_14.unk_14, 0, 0 * 16, 16 * 0x20); } else { (void)0; } @@ -1278,7 +1278,7 @@ static void ov62_022394D8(void *param0) } sub_0201DCAC(); - sub_02003694(v0->unk_14.unk_14); + PaletteData_CommitFadedBuffers(v0->unk_14.unk_14); Bg_RunScheduledUpdates(v0->unk_14.unk_10); OS_SetIrqCheckFlag(OS_IE_V_BLANK); diff --git a/src/overlay062/ov62_02239D60.c b/src/overlay062/ov62_02239D60.c index 0806948c55..6a390f09d6 100644 --- a/src/overlay062/ov62_02239D60.c +++ b/src/overlay062/ov62_02239D60.c @@ -490,9 +490,9 @@ static BOOL ov62_0223A2A8(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_1AC, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_1AC, param0->unk_14.unk_44); break; case 1: ov62_02234540(param0, 1); @@ -606,7 +606,7 @@ static BOOL ov62_0223A544(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; case 1: ov62_02231664(&v0->unk_1AC, 0); @@ -616,7 +616,7 @@ static BOOL ov62_0223A544(UnkStruct_0208C06C *param0) ov62_0223AC0C(param0, 272); } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; default: break; @@ -665,7 +665,7 @@ static BOOL ov62_0223A64C(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; case 3: param0->unk_08++; @@ -729,7 +729,7 @@ static BOOL ov62_0223A840(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; case 2: ov62_02231664(&v0->unk_1AC, 0); @@ -739,7 +739,7 @@ static BOOL ov62_0223A840(UnkStruct_0208C06C *param0) ov62_0222FB60(param0, 3); } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; default: break; @@ -769,7 +769,7 @@ static BOOL ov62_0223A93C(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; case 2: { ov62_0222FB60(param0, 10); @@ -798,7 +798,7 @@ static BOOL ov62_0223A9F4(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; case 2: { ov62_0222FB60(param0, 13); @@ -1250,7 +1250,7 @@ static void ov62_0223B158(UnkStruct_0208C06C *param0) sub_020070E8(param0->unk_14.unk_00, (138 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); sub_0200710C(param0->unk_14.unk_00, (140 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_02002FEC(param0->unk_14.unk_14, 162, (139 + (v0->unk_04.unk_176 * 3)), 102, 0, 0x40, 12 * 16, 12 * 16); + PaletteData_LoadBufferFromFile(param0->unk_14.unk_14, 162, (139 + (v0->unk_04.unk_176 * 3)), 102, 0, 0x40, 12 * 16, 12 * 16); ov62_0223B050(param0); ov62_0223AE60(param0); @@ -1279,7 +1279,7 @@ static void ov62_0223B230(UnkStruct_0208C06C *param0) sub_020070E8(param0->unk_14.unk_00, (138 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); sub_0200710C(param0->unk_14.unk_00, (140 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_02002FEC(param0->unk_14.unk_14, 162, (139 + (v0->unk_04.unk_176 * 3)), 102, 0, 0x40, 12 * 16, 12 * 16); + PaletteData_LoadBufferFromFile(param0->unk_14.unk_14, 162, (139 + (v0->unk_04.unk_176 * 3)), 102, 0, 0x40, 12 * 16, 12 * 16); ov62_0223B050(param0); ov62_0223AE60(param0); @@ -1324,7 +1324,7 @@ static BOOL ov62_0223B2E8(UnkStruct_0208C06C *param0) ov62_0222FB60(param0, 3); } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; default: break; @@ -1383,7 +1383,7 @@ static BOOL ov62_0223B424(UnkStruct_0208C06C *param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_1AC); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -1391,8 +1391,8 @@ static BOOL ov62_0223B424(UnkStruct_0208C06C *param0) sub_02030A98(v0->unk_380.unk_04); Heap_FreeToHeap(v0); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_1AC, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); } break; } @@ -1438,7 +1438,7 @@ static BOOL ov62_0223B564(UnkStruct_0208C06C *param0) ov62_0222FB60(param0, 3); } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; default: @@ -1646,7 +1646,7 @@ static BOOL ov62_0223B980(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; case 2: ov62_02234358(param0, param0->unk_6F0, 128, 96); @@ -1741,7 +1741,7 @@ static BOOL ov62_0223B980(UnkStruct_0208C06C *param0) ov62_0222FB60(param0, 3); } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; default: ov62_02231664(&v0->unk_1AC, 0); @@ -1779,8 +1779,8 @@ static BOOL ov62_0223B980(UnkStruct_0208C06C *param0) ov62_0222FB60(param0, 5); } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; } @@ -1981,7 +1981,7 @@ static BOOL ov62_0223C138(UnkStruct_0208C06C *param0) ov62_0222FB60(param0, 10); } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); break; } @@ -2219,7 +2219,7 @@ static BOOL ov62_0223C948(UnkStruct_0208C06C *param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_1AC); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -2227,8 +2227,8 @@ static BOOL ov62_0223C948(UnkStruct_0208C06C *param0) sub_02030A98(v0->unk_380.unk_04); Heap_FreeToHeap(v0); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_1AC, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_1AC, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_1AC, param0->unk_14.unk_44); } break; diff --git a/src/overlay062/ov62_0223CAEC.c b/src/overlay062/ov62_0223CAEC.c index 50279a4fee..42a357058b 100644 --- a/src/overlay062/ov62_0223CAEC.c +++ b/src/overlay062/ov62_0223CAEC.c @@ -926,9 +926,9 @@ static BOOL ov62_0223D644 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); break; case 1: ov62_02234540(param0, 1); @@ -1072,13 +1072,13 @@ static BOOL ov62_0223D744 (UnkStruct_0208C06C * param0) if (ov62_02231664(&v0->unk_08, 0)) { ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); Heap_FreeToHeap(v0); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; default: @@ -1125,8 +1125,8 @@ static BOOL ov62_0223DAE8 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 6); @@ -1177,8 +1177,8 @@ static BOOL ov62_0223DC6C (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 8); @@ -1222,13 +1222,13 @@ static BOOL ov62_0223DD44 (UnkStruct_0208C06C * param0) if (ov62_02231664(&v0->unk_08, 0)) { ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); Heap_FreeToHeap(v0); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; diff --git a/src/overlay062/ov62_0223DFA8.c b/src/overlay062/ov62_0223DFA8.c index 460872207f..af87592043 100644 --- a/src/overlay062/ov62_0223DFA8.c +++ b/src/overlay062/ov62_0223DFA8.c @@ -309,7 +309,7 @@ static BOOL ov62_0223E22C (UnkStruct_0208C06C * param0) if (ov62_022315E0(&v0->unk_00, &v0->unk_04, 1, 0)) { param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02231AAC(param0, 117); @@ -401,7 +401,7 @@ static BOOL ov62_0223E460 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 12); @@ -432,7 +432,7 @@ static BOOL ov62_0223E510 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ; @@ -515,7 +515,7 @@ static BOOL ov62_0223E510 (UnkStruct_0208C06C * param0) if (ov62_02231664(&v0->unk_08, 0)) { ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); Bg_ClearTilemap(param0->unk_14.unk_10, 2); @@ -528,8 +528,8 @@ static BOOL ov62_0223E510 (UnkStruct_0208C06C * param0) sub_0202F22C(); } } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; @@ -552,7 +552,7 @@ static BOOL ov62_0223E810 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 1: if (ov62_022315E0(&v0->unk_00, &v0->unk_04, 0, 2)) { @@ -588,7 +588,7 @@ static BOOL ov62_0223E8BC (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: if (param0->unk_86C == 210) { @@ -635,7 +635,7 @@ static BOOL ov62_0223E8BC (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: { @@ -682,7 +682,7 @@ static BOOL ov62_0223EB28 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_0223E01C(param0); @@ -729,7 +729,7 @@ static BOOL ov62_0223EB28 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: { @@ -780,7 +780,7 @@ static BOOL ov62_0223ED7C (UnkStruct_0208C06C * param0) ov62_0223F0A8(param0, 1); param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 3); @@ -978,9 +978,9 @@ static BOOL ov62_0223F218 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); break; case 1: Bg_SetPriority(0, 1); @@ -1112,7 +1112,7 @@ static BOOL ov62_0223F348 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 5: ov62_02234540(param0, 1); @@ -1131,7 +1131,7 @@ static BOOL ov62_0223F348 (UnkStruct_0208C06C * param0) if (ov62_02231664(&v0->unk_08, 0)) { ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); Bg_ClearTilemap(param0->unk_14.unk_10, 2); @@ -1140,8 +1140,8 @@ static BOOL ov62_0223F348 (UnkStruct_0208C06C * param0) Bg_ClearTilemap(param0->unk_14.unk_10, 7); Heap_FreeToHeap(v0); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; @@ -1259,8 +1259,8 @@ static BOOL ov62_0223F760 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 4); @@ -1334,8 +1334,8 @@ static BOOL ov62_0223F984 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, v0->unk_1FBC); @@ -1405,7 +1405,7 @@ asm static BOOL ov62_0223FB74 (UnkStruct_0208C06C * param0) lsl r3, r3, #0x18 mov r2, #0xc lsr r3, r3, #0x18 - bl sub_02003A2C + bl PaletteData_BlendMulti b _0223FCC0 _0223FBF6: add r4, #8 @@ -1446,7 +1446,7 @@ asm static BOOL ov62_0223FB74 (UnkStruct_0208C06C * param0) ldr r0, [r5, #0x28] mov r2, #0xc mov r3, #0x10 - bl sub_02003A2C + bl PaletteData_BlendMulti mov r1, #1 ldr r3, [r5, #0x10] add r0, r5, #0 @@ -1481,7 +1481,7 @@ asm static BOOL ov62_0223FB74 (UnkStruct_0208C06C * param0) lsl r3, r3, #0x18 mov r2, #2 lsr r3, r3, #0x18 - bl sub_02003A2C + bl PaletteData_BlendMulti ldr r0, [r5, #0x58] mov r1, #3 lsl r0, r0, #0x10 @@ -1492,7 +1492,7 @@ asm static BOOL ov62_0223FB74 (UnkStruct_0208C06C * param0) lsl r3, r3, #0x18 mov r2, #0xc lsr r3, r3, #0x18 - bl sub_02003A2C + bl PaletteData_BlendMulti _0223FCC0: mov r0, #0 pop {r3, r4, r5, pc} @@ -1537,7 +1537,7 @@ static BOOL ov62_0223FCC4 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 7); @@ -1731,7 +1731,7 @@ static BOOL ov62_02240084 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 4: sub_0200F174(0, 1, 1, 0, 6, 1, 102); @@ -1912,7 +1912,7 @@ asm static BOOL ov62_022403F8 (UnkStruct_0208C06C * param0) lsl r3, r3, #0x18 mov r2, #0xc lsr r3, r3, #0x18 - bl sub_02003A2C + bl PaletteData_BlendMulti b _02240884 _02240508: ldr r1, = 0x115 @@ -1980,7 +1980,7 @@ asm static BOOL ov62_022403F8 (UnkStruct_0208C06C * param0) lsl r3, r3, #0x18 mov r2, #0xc lsr r3, r3, #0x18 - bl sub_02003A2C + bl PaletteData_BlendMulti b _02240884 _022405A0: add r0, r4, #0 @@ -2158,7 +2158,7 @@ asm static BOOL ov62_022403F8 (UnkStruct_0208C06C * param0) lsl r3, r3, #0x18 mov r2, #0xc lsr r3, r3, #0x18 - bl sub_02003A2C + bl PaletteData_BlendMulti b _02240884 _0224072A: ldr r1, = 0x4138 @@ -2276,7 +2276,7 @@ asm static BOOL ov62_022403F8 (UnkStruct_0208C06C * param0) lsl r3, r3, #0x18 mov r2, #0xc lsr r3, r3, #0x18 - bl sub_02003A2C + bl PaletteData_BlendMulti b _02240884 _02240838: add r0, r5, #0 @@ -2308,7 +2308,7 @@ asm static BOOL ov62_022403F8 (UnkStruct_0208C06C * param0) lsl r3, r3, #0x18 mov r2, #0xc lsr r3, r3, #0x18 - bl sub_02003A2C + bl PaletteData_BlendMulti b _02240884 _0224087C: add r0, r4, #0 diff --git a/src/overlay062/ov62_02241204.c b/src/overlay062/ov62_02241204.c index 563ed02e98..63032d64c6 100644 --- a/src/overlay062/ov62_02241204.c +++ b/src/overlay062/ov62_02241204.c @@ -896,7 +896,7 @@ static BOOL ov62_02241D24 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 3); @@ -935,7 +935,7 @@ static BOOL ov62_02241ECC (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02234540(param0, 1); @@ -954,7 +954,7 @@ static BOOL ov62_02241ECC (UnkStruct_0208C06C * param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -965,8 +965,8 @@ static BOOL ov62_02241ECC (UnkStruct_0208C06C * param0) Bg_ClearTilemap(param0->unk_14.unk_10, 7); Heap_FreeToHeap(v0); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; @@ -990,7 +990,7 @@ static BOOL ov62_02242024 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ; @@ -1112,7 +1112,7 @@ static BOOL ov62_022420B0 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02233664(¶m0->unk_14.unk_46C); @@ -1148,7 +1148,7 @@ static BOOL ov62_022420B0 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 11); @@ -1361,7 +1361,7 @@ static BOOL ov62_02242400 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: sub_0202404C(v0->unk_608[1]); @@ -1388,7 +1388,7 @@ static BOOL ov62_02242400 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; @@ -1476,7 +1476,7 @@ static BOOL ov62_02242534 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } else { if (ov62_022315E0(&v0->unk_00, &v0->unk_04, 1, 2)) { param0->unk_08++; @@ -1663,7 +1663,7 @@ static BOOL ov62_02242970 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02233664(¶m0->unk_14.unk_46C); @@ -1698,7 +1698,7 @@ static BOOL ov62_02242970 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 11); @@ -1727,7 +1727,7 @@ static BOOL ov62_02242B34 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 3); @@ -1841,7 +1841,7 @@ static BOOL ov62_02242CFC (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 14); @@ -1909,8 +1909,8 @@ static BOOL ov62_02242D90 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 15); @@ -1981,8 +1981,8 @@ static BOOL ov62_02242F74 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, v0->unk_0C); @@ -2024,7 +2024,7 @@ static BOOL ov62_0224312C (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 3); @@ -2074,7 +2074,7 @@ static BOOL ov62_0224324C (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 18); @@ -2152,7 +2152,7 @@ static BOOL ov62_02243410 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 14); @@ -2196,7 +2196,7 @@ static BOOL ov62_02243514 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02231AAC(param0, 277); @@ -2262,7 +2262,7 @@ static BOOL ov62_02243514 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: { @@ -2384,7 +2384,7 @@ static BOOL ov62_0224391C (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02231AAC(param0, 117); @@ -2510,7 +2510,7 @@ static BOOL ov62_02243B1C (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 4: sub_0200F174(0, 1, 1, 0x0, 6, 1, 102); @@ -2626,9 +2626,9 @@ static BOOL ov62_02243E20 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); break; case 1: ov62_02234540(param0, 1); @@ -2727,7 +2727,7 @@ static BOOL ov62_02243FA8 (UnkStruct_0208C06C * param0) ov62_0223197C(param0, 112); param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 3); @@ -2772,7 +2772,7 @@ static BOOL ov62_022440D4 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: if (v1->unk_2C8) { @@ -2804,7 +2804,7 @@ static BOOL ov62_02244180 (UnkStruct_0208C06C * param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -2815,8 +2815,8 @@ static BOOL ov62_02244180 (UnkStruct_0208C06C * param0) Bg_ClearTilemap(param0->unk_14.unk_10, 7); Heap_FreeToHeap(v0); } else { - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); } break; @@ -2994,7 +2994,7 @@ static BOOL ov62_022444BC (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: ov62_0222FB60(param0, 8); @@ -3068,7 +3068,7 @@ static BOOL ov62_02244720 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02231688(&v0->unk_08); @@ -3086,7 +3086,7 @@ static BOOL ov62_02244720 (UnkStruct_0208C06C * param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -3101,8 +3101,8 @@ static BOOL ov62_02244720 (UnkStruct_0208C06C * param0) sub_0202F22C(); } } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; default: @@ -3303,7 +3303,7 @@ static BOOL ov62_02244CD4 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02231AAC(param0, 277); @@ -3328,7 +3328,7 @@ static BOOL ov62_02244CD4 (UnkStruct_0208C06C * param0) ov62_02244CA4(param0); param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 5: sub_02024034(v0->unk_608[0]); @@ -3351,7 +3351,7 @@ static BOOL ov62_02244CD4 (UnkStruct_0208C06C * param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -3366,8 +3366,8 @@ static BOOL ov62_02244CD4 (UnkStruct_0208C06C * param0) sub_0202F22C(); } } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; @@ -3540,7 +3540,7 @@ static BOOL ov62_02245018 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 4: sub_0200F174(0, 1, 1, 0x0, 6, 1, 102); @@ -3666,7 +3666,7 @@ static BOOL ov62_022454D8 (UnkStruct_0208C06C * param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -3677,8 +3677,8 @@ static BOOL ov62_022454D8 (UnkStruct_0208C06C * param0) Bg_ClearTilemap(param0->unk_14.unk_10, 3); Bg_ClearTilemap(param0->unk_14.unk_10, 7); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; @@ -4232,7 +4232,7 @@ static BOOL ov62_02245ECC (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02231664(&v0->unk_08, 0); @@ -4242,7 +4242,7 @@ static BOOL ov62_02245ECC (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: return 1; @@ -4266,7 +4266,7 @@ static BOOL ov62_02245FE4 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 1: if (ov62_022315E0(&v0->unk_00, &v0->unk_04, 0, 2)) { @@ -4308,7 +4308,7 @@ static BOOL ov62_02246090 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: return 1; @@ -4337,7 +4337,7 @@ static BOOL ov62_0224613C (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ; @@ -4422,7 +4422,7 @@ static BOOL ov62_0224613C (UnkStruct_0208C06C * param0) ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); @@ -4437,8 +4437,8 @@ static BOOL ov62_0224613C (UnkStruct_0208C06C * param0) sub_0202F22C(); } } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; @@ -4466,7 +4466,7 @@ static BOOL ov62_02246428 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: if (param0->unk_86C == 210) { @@ -4515,7 +4515,7 @@ static BOOL ov62_02246428 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: return 1; @@ -4545,7 +4545,7 @@ static BOOL ov62_02246640 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: ov62_02245C64(param0); @@ -4591,7 +4591,7 @@ static BOOL ov62_02246640 (UnkStruct_0208C06C * param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; default: return 1; diff --git a/src/overlay062/ov62_02247D74.c b/src/overlay062/ov62_02247D74.c index 95860e4c12..f1cfd318d0 100644 --- a/src/overlay062/ov62_02247D74.c +++ b/src/overlay062/ov62_02247D74.c @@ -161,9 +161,9 @@ static BOOL ov62_02247FFC(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); break; case 1: Bg_SetPriority(0, 0); @@ -220,7 +220,7 @@ static BOOL ov62_02248114(UnkStruct_0208C06C *param0) param0->unk_08++; } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 2: if (TouchScreen_LocationPressed(&Unk_ov62_02249788[0])) { @@ -263,7 +263,7 @@ static BOOL ov62_02248114(UnkStruct_0208C06C *param0) } } - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); break; case 6: if (ov62_022342CC(param0)) { @@ -314,13 +314,13 @@ static BOOL ov62_02248324(UnkStruct_0208C06C *param0) if (ov62_02231664(&v0->unk_08, 0)) { ov62_022318E8(param0); ov62_02231688(&v0->unk_08); - sub_02003A2C(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 2, 0xC, 16, param0->unk_14.unk_44); ov62_0222FB44(param0, 1, 1, param0->unk_10); ov62_0222FB60(param0, 5); Heap_FreeToHeap(v0); } else { - sub_02003A2C(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); - sub_02003A2C(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 1, 0x2, v0->unk_08, param0->unk_14.unk_44); + PaletteData_BlendMulti(param0->unk_14.unk_14, 3, 0xC, v0->unk_08, param0->unk_14.unk_44); } break; } diff --git a/src/overlay063/ov63_0222AE60.c b/src/overlay063/ov63_0222AE60.c index 32c75c510f..a97b4ed7d8 100644 --- a/src/overlay063/ov63_0222AE60.c +++ b/src/overlay063/ov63_0222AE60.c @@ -1134,10 +1134,10 @@ static void ov63_0222BC80(UnkStruct_ov63_0222AE60 *param0, SpriteResource *param v1[1] = sub_0200A760(param1, NNS_G2D_VRAM_TYPE_2DSUB); if (v1[0] != (NNS_G2D_VRAM_ADDR_NOT_INITIALIZED)) { - sub_02002FBC(param0->unk_04, v0->pRawData, 2, v1[0] * 16, param2 * 32); + PaletteData_LoadBuffer(param0->unk_04, v0->pRawData, 2, v1[0] * 16, param2 * 32); } if (v1[1] != (NNS_G2D_VRAM_ADDR_NOT_INITIALIZED)) { - sub_02002FBC(param0->unk_04, v0->pRawData, 3, v1[1] * 16, param2 * 32); + PaletteData_LoadBuffer(param0->unk_04, v0->pRawData, 3, v1[1] * 16, param2 * 32); } } diff --git a/src/overlay073/ov73_021D0D80.c b/src/overlay073/ov73_021D0D80.c index 21f2649511..fda41afa93 100644 --- a/src/overlay073/ov73_021D0D80.c +++ b/src/overlay073/ov73_021D0D80.c @@ -1125,7 +1125,7 @@ static void ov73_021D1B80(UnkStruct_ov73_021D1058 *param0) MI_CpuCopy32(v3, param0->unk_B8, 0x20); - sub_020039F8(param0->unk_B8, v3, 1, 16, 0x6a3c); + BlendPalettes(param0->unk_B8, v3, 1, 16, 0x6a3c); Bg_FillTilemapRect(param0->unk_18, v4, 0, 0, 0, 32, 24, v6); Bg_LoadToTilemapRect(param0->unk_18, v4, v1, 11, 9, 10, 10); @@ -1285,7 +1285,7 @@ static void ov73_021D1FA0(UnkStruct_ov73_021D1058 *param0) if (param0->unk_94[8] > 0) { param0->unk_94[8]--; - sub_020039F8(param0->unk_B8, param0->unk_BC, 1, param0->unk_94[8] / 3, 0x6a3c); + BlendPalettes(param0->unk_B8, param0->unk_BC, 1, param0->unk_94[8] / 3, 0x6a3c); Bg_LoadPalette(2, param0->unk_BC, (2 * 16), (2 * 16) * 8); Bg_LoadPalette(5, param0->unk_BC, (2 * 16), (2 * 16) * 10); } diff --git a/src/overlay073/ov73_021D3250.c b/src/overlay073/ov73_021D3250.c index 86848372fc..41aa01336a 100644 --- a/src/overlay073/ov73_021D3250.c +++ b/src/overlay073/ov73_021D3250.c @@ -85,7 +85,7 @@ int ov73_021D3280 (OverlayManager * param0, int * param1) { u16 * v2 = (u16 *)sub_020241F0(); - sub_020039F8(v2, v2, 0xFFFC, 7, 0x0); + BlendPalettes(v2, v2, 0xFFFC, 7, 0x0); GX_LoadBGPltt((const void *)v2, 0, 16 * 0x20); } diff --git a/src/overlay075/ov75_021D0D80.c b/src/overlay075/ov75_021D0D80.c index fcf0a5897b..18cace7249 100644 --- a/src/overlay075/ov75_021D0D80.c +++ b/src/overlay075/ov75_021D0D80.c @@ -333,7 +333,7 @@ static int ov75_021D108C(UnkStruct_ov75_021D1184 *param0) param0->unk_0F = Text_AddPrinterWithParamsAndColor(¶m0->unk_44[5], FONT_MESSAGE, v1, 0, 0, param0->unk_10, TEXT_COLOR(1, 2, 15), NULL); Strbuf_Free(v1); - sub_020039B0(param0->unk_30, 0, 34 + param0->unk_17, 1, 0, 0x7FFF); + PaletteData_Blend(param0->unk_30, 0, 34 + param0->unk_17, 1, 0, 0x7FFF); param0->unk_17 = param0->unk_16; param0->unk_15 = 0; @@ -399,14 +399,14 @@ static int ov75_021D1184(UnkStruct_ov75_021D1184 *param0) G2_SetBlendAlpha(GX_BLEND_PLANEMASK_BG2, GX_BLEND_PLANEMASK_BG3, 28, 4); - sub_02003178(param0->unk_30, (0x1 | 0x4), 0xFFFF, -1, 16, 0, 0x0); + PaletteData_StartFade(param0->unk_30, (0x1 | 0x4), 0xFFFF, -1, 16, 0, 0x0); break; case 2: if (param0->unk_AC != NULL) { sub_0200C7EC(param0->unk_AC); } - if (sub_0200384C(param0->unk_30)) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_30)) { return 0; } break; @@ -426,10 +426,10 @@ static int ov75_021D1184(UnkStruct_ov75_021D1184 *param0) return 0; } - sub_02003178(param0->unk_30, (0x1 | 0x4), 0xFFFF, -1, 0, 16, 0x0); + PaletteData_StartFade(param0->unk_30, (0x1 | 0x4), 0xFFFF, -1, 0, 16, 0x0); } break; case 4: - if (sub_0200384C(param0->unk_30)) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_30)) { if (param0->unk_AC != NULL) { sub_0200C7EC(param0->unk_AC); } @@ -463,7 +463,7 @@ static void ov75_021D131C(void *param0) UnkStruct_ov75_021D1184 *v0 = (UnkStruct_ov75_021D1184 *)param0; if (v0->unk_30 != NULL) { - sub_02003694(v0->unk_30); + PaletteData_CommitFadedBuffers(v0->unk_30); } if (v0->unk_A8 != NULL) { @@ -490,13 +490,13 @@ static void ov75_021D1358(SysTask *param0, void *param1) } if (v0->unk_17 != v0->unk_16) { - sub_020039B0(v0->unk_30, 0, 34 + v0->unk_17, 1, 0, 0x7FFF); + PaletteData_Blend(v0->unk_30, 0, 34 + v0->unk_17, 1, 0, 0x7FFF); v0->unk_17 = v0->unk_16; v0->unk_15 = 0; v0->unk_14 = 0; } - sub_020039B0(v0->unk_30, 0, 34 + v0->unk_16, 1, v0->unk_14, 0x7FFF); + PaletteData_Blend(v0->unk_30, 0, 34 + v0->unk_16, 1, v0->unk_14, 0x7FFF); if (v0->unk_15) { if (v0->unk_14-- == 1) { @@ -726,25 +726,25 @@ static void ov75_021D1598(UnkStruct_ov75_021D1184 *param0) NNS_G2dGetUnpackedPaletteData(v2, &v4); Bg_LoadPalette(4, v4->pRawData, v4->szByte, 0); - param0->unk_30 = sub_02002F38(param0->unk_00); + param0->unk_30 = PaletteData_New(param0->unk_00); - sub_02002F70(param0->unk_30, 0, 32 * UnkEnum_ov75_021D1598_07, param0->unk_00); - sub_02002F70(param0->unk_30, 2, 32 * 3, param0->unk_00); - sub_02002FBC(param0->unk_30, v4->pRawData, 0, 0, 32 * 3); + PaletteData_AllocBuffer(param0->unk_30, 0, 32 * UnkEnum_ov75_021D1598_07, param0->unk_00); + PaletteData_AllocBuffer(param0->unk_30, 2, 32 * 3, param0->unk_00); + PaletteData_LoadBuffer(param0->unk_30, v4->pRawData, 0, 0, 32 * 3); if (param0->unk_0C == 1) { - sub_02002FBC(param0->unk_30, &(((u16 *)v4->pRawData)[16 * 3]), 0, 16, 32); + PaletteData_LoadBuffer(param0->unk_30, &(((u16 *)v4->pRawData)[16 * 3]), 0, 16, 32); } - PaletteSys_LoadPalette(param0->unk_30, 19, 0, param0->unk_00, 2, 32 * 3, 0); - PaletteSys_LoadPalette(param0->unk_30, 14, 6, param0->unk_00, 0, 32, 16 * UnkEnum_ov75_021D1598_03); - PaletteSys_LoadPalette(param0->unk_30, 14, 7, param0->unk_00, 0, 32, 16 * UnkEnum_ov75_021D1598_04); - PaletteSys_LoadPalette(param0->unk_30, 38, 24, param0->unk_00, 0, 32, 16 * UnkEnum_ov75_021D1598_05); - PaletteSys_LoadPalette(param0->unk_30, 38, 25 + param0->unk_0A, param0->unk_00, 0, 32, 16 * UnkEnum_ov75_021D1598_06); - sub_020039B0(param0->unk_30, 0, 0, 16 * UnkEnum_ov75_021D1598_07, 16, 0x0); - sub_020039B0(param0->unk_30, 2, 0, 16 * 3, 16, 0x0); - sub_02003858(param0->unk_30, 1); - sub_02003694(param0->unk_30); + PaletteData_LoadBufferFromFileStart(param0->unk_30, 19, 0, param0->unk_00, 2, 32 * 3, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_30, 14, 6, param0->unk_00, 0, 32, 16 * UnkEnum_ov75_021D1598_03); + PaletteData_LoadBufferFromFileStart(param0->unk_30, 14, 7, param0->unk_00, 0, 32, 16 * UnkEnum_ov75_021D1598_04); + PaletteData_LoadBufferFromFileStart(param0->unk_30, 38, 24, param0->unk_00, 0, 32, 16 * UnkEnum_ov75_021D1598_05); + PaletteData_LoadBufferFromFileStart(param0->unk_30, 38, 25 + param0->unk_0A, param0->unk_00, 0, 32, 16 * UnkEnum_ov75_021D1598_06); + PaletteData_Blend(param0->unk_30, 0, 0, 16 * UnkEnum_ov75_021D1598_07, 16, 0x0); + PaletteData_Blend(param0->unk_30, 2, 0, 16 * 3, 16, 0x0); + PaletteData_SetAutoTransparent(param0->unk_30, 1); + PaletteData_CommitFadedBuffers(param0->unk_30); Heap_FreeToHeap(v2); v1 = NARC_GetMemberSize(v5, v7); @@ -778,9 +778,9 @@ static void ov75_021D1868(UnkStruct_ov75_021D1184 *param0) { Heap_FreeToHeap(param0->unk_38); Heap_FreeToHeap(param0->unk_34); - sub_02002FA0(param0->unk_30, 2); - sub_02002FA0(param0->unk_30, 0); - sub_02002F54(param0->unk_30); + PaletteData_FreeBuffer(param0->unk_30, 2); + PaletteData_FreeBuffer(param0->unk_30, 0); + PaletteData_Free(param0->unk_30); param0->unk_30 = NULL; diff --git a/src/overlay076/ov76_0223B870.c b/src/overlay076/ov76_0223B870.c index 1191c02622..87c2ad1fc8 100644 --- a/src/overlay076/ov76_0223B870.c +++ b/src/overlay076/ov76_0223B870.c @@ -924,21 +924,21 @@ void ov76_0223C8BC(UnkStruct_ov76_0223DE00 *param0) void ov76_0223C8EC(BgConfig *param0, PaletteData *param1, int param2) { sub_0200DD0C(param0, 1, 1, 15, param2, 53); - PaletteSys_LoadPalette(param1, 38, sub_0200DD08(param2), 53, 0, 0x20, 12 * 16); + PaletteData_LoadBufferFromFileStart(param1, 38, sub_0200DD08(param2), 53, 0, 0x20, 12 * 16); sub_0200DAA4(param0, 1, (1 + (18 + 12)), 13, 0, 53); - PaletteSys_LoadPalette(param1, 38, Window_FramePalette(), 53, 0, 0x20, 13 * 16); - PaletteSys_LoadPalette(param1, 14, 7, 53, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param1, 38, Window_FramePalette(), 53, 0, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param1, 14, 7, 53, 0, 0x20, 14 * 16); } void ov76_0223C974(BgConfig *param0, PaletteData *param1, int param2) { sub_0200DD0C(param0, 4, 1, 15, param2, 53); - PaletteSys_LoadPalette(param1, 38, sub_0200DD08(param2), 53, 1, 0x20, 12 * 16); + PaletteData_LoadBufferFromFileStart(param1, 38, sub_0200DD08(param2), 53, 1, 0x20, 12 * 16); sub_0200DAA4(param0, 4, (1 + (18 + 12)), 13, 0, 53); - PaletteSys_LoadPalette(param1, 38, Window_FramePalette(), 53, 1, 0x20, 13 * 16); - PaletteSys_LoadPalette(param1, 14, 7, 53, 1, 0x20, 14 * 16); - PaletteSys_LoadPalette(param1, 14, 7, 53, 1, 0x20, 3 * 16); - PaletteSys_LoadPalette(param1, 91, 294, 53, 1, 0x20, 11 * 16); + PaletteData_LoadBufferFromFileStart(param1, 38, Window_FramePalette(), 53, 1, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param1, 14, 7, 53, 1, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param1, 14, 7, 53, 1, 0x20, 3 * 16); + PaletteData_LoadBufferFromFileStart(param1, 91, 294, 53, 1, 0x20, 11 * 16); } void ov76_0223CA30(Window *param0, int param1) @@ -1111,7 +1111,7 @@ void ov76_0223CE84(UnkStruct_ov76_0223DE00 *param0, NARC *param1) sub_020070E8(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); sub_0200710C(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); - PaletteSys_LoadPalette(param0->unk_D4.unk_14, v0, v3, 53, 0, 0x20 * 2, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_D4.unk_14, v0, v3, 53, 0, 0x20 * 2, 0); v1 = 269; v2 = 285; @@ -1131,7 +1131,7 @@ void ov76_0223CF24(UnkStruct_ov76_0223DE00 *param0, NARC *param1) sub_020070E8(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); sub_0200710C(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); - PaletteSys_LoadPalette(param0->unk_D4.unk_14, v0, v3, 53, 1, 0x20 * 2, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_D4.unk_14, v0, v3, 53, 1, 0x20 * 2, 0); } void ov76_0223CF88(UnkStruct_ov76_0223DE00 *param0, NARC *param1) @@ -1144,7 +1144,7 @@ void ov76_0223CF88(UnkStruct_ov76_0223DE00 *param0, NARC *param1) sub_020070E8(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); sub_0200710C(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); - PaletteSys_LoadPalette(param0->unk_D4.unk_14, v0, v3, 53, 1, 0x20 * 2, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_D4.unk_14, v0, v3, 53, 1, 0x20 * 2, 0); } void ov76_0223CFEC(UnkStruct_ov76_0223DE00 *param0, NARC *param1) diff --git a/src/overlay076/ov76_0223D338.c b/src/overlay076/ov76_0223D338.c index ad3750ac38..c6d041c55c 100644 --- a/src/overlay076/ov76_0223D338.c +++ b/src/overlay076/ov76_0223D338.c @@ -793,8 +793,8 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) break; } - sub_02003178(param0->unk_D4.unk_14, 0x1, (1 << 0) | (1 << 1), 0, 0, 16, 0); - sub_02003178(param0->unk_D4.unk_14, 0x4, 0xFFFF, 0, 0, 16, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x1, (1 << 0) | (1 << 1), 0, 0, 16, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x4, 0xFFFF, 0, 0, 16, 0); GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 0); GXLayers_EngineBToggleLayers((GX_PLANEMASK_BG2), 1); Bg_SetPriority(7, 1); @@ -804,15 +804,15 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) param0->unk_3D4++; break; case 2: - if (sub_0200384C(param0->unk_D4.unk_14) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_D4.unk_14) != 0) { break; } Bg_SetPriority(3, 1); - sub_02003178(param0->unk_D4.unk_14, 0x1, (1 << 1), 0, 16, 0, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x1, (1 << 1), 0, 16, 0, 0); param0->unk_3D4++; break; case 3: - if (sub_0200384C(param0->unk_D4.unk_14) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_D4.unk_14) != 0) { break; } ov76_0223DCB8(param0, 1); @@ -824,8 +824,8 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) switch (param0->unk_3DC) { case 0: GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 1); - sub_02003178(param0->unk_D4.unk_14, 0x2, (1 << 0) | (1 << 1) | (1 << 3) | (1 << 11), 0, 0, 10, 0); - sub_02003178(param0->unk_D4.unk_14, 0x8, 0xFFFF, 0, 0, 10, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x2, (1 << 0) | (1 << 1) | (1 << 3) | (1 << 11), 0, 0, 10, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x8, 0xFFFF, 0, 0, 10, 0); ov76_0223DCB8(param0, 0); param0->unk_3E0 = 0; ov76_0223D3CC(param0); @@ -835,7 +835,7 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) param0->unk_3DC++; break; case 1: - if (sub_0200384C(param0->unk_D4.unk_14) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_D4.unk_14) != 0) { break; } @@ -951,8 +951,8 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) BOOL v6 = ov76_0223DEF4(param0); if ((ov12_022377F8(param0->unk_D4.unk_158) == 0) && (v6 == 0)) { - sub_02003178(param0->unk_D4.unk_14, 0x2, (1 << 0) | (1 << 1) | (1 << 3) | (1 << 11), 0, 10, 0, 0); - sub_02003178(param0->unk_D4.unk_14, 0x8, 0xFFFF, 0, 10, 0, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x2, (1 << 0) | (1 << 1) | (1 << 3) | (1 << 11), 0, 10, 0, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x8, 0xFFFF, 0, 10, 0, 0); ov76_0223DF70(param0, 1); ov76_0223DF84(param0); ov12_0223783C(param0->unk_D4.unk_158); @@ -960,7 +960,7 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) } } break; default: - if (sub_0200384C(param0->unk_D4.unk_14) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_D4.unk_14) != 0) { break; } @@ -1007,18 +1007,18 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) break; } - sub_02003178(param0->unk_D4.unk_14, 0x2, (1 << 0) | (1 << 1) | (1 << 3) | (1 << 11), 0, 0, 10, 0); - sub_02003178(param0->unk_D4.unk_14, 0x8, 0xFFFF, 0, 0, 10, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x2, (1 << 0) | (1 << 1) | (1 << 3) | (1 << 11), 0, 0, 10, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x8, 0xFFFF, 0, 0, 10, 0); ov76_0223DCB8(param0, 0); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG0, 0); param0->unk_3DC++; break; case 1: - if (sub_0200384C(param0->unk_D4.unk_14) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_D4.unk_14) != 0) { break; } - sub_02003858(param0->unk_D4.unk_14, 0); + PaletteData_SetAutoTransparent(param0->unk_D4.unk_14, 0); ov76_0223CA98(param0->unk_D4.unk_10, ¶m0->unk_D4.unk_18[2], 4, 2, 1, 27, 4, (0 + ((1 + (18 + 12)) + 9))); { @@ -1049,7 +1049,7 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) case 1: case 2: param0->unk_3E0 = v10; - sub_02003858(param0->unk_D4.unk_14, 1); + PaletteData_SetAutoTransparent(param0->unk_D4.unk_14, 1); sub_02015A54(param0->unk_D4.unk_150); sub_02015938(param0->unk_D4.unk_150); sub_0200E084(¶m0->unk_D4.unk_18[2], 1); @@ -1063,12 +1063,12 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) } } break; case 4: - sub_02003178(param0->unk_D4.unk_14, 0x2, (1 << 0) | (1 << 1) | (1 << 3) | (1 << 11), 0, 10, 0, 0); - sub_02003178(param0->unk_D4.unk_14, 0x8, 0xFFFF, 0, 10, 0, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x2, (1 << 0) | (1 << 1) | (1 << 3) | (1 << 11), 0, 10, 0, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x8, 0xFFFF, 0, 10, 0, 0); param0->unk_3DC++; break; case 5: - if (sub_0200384C(param0->unk_D4.unk_14) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_D4.unk_14) != 0) { break; } @@ -1096,17 +1096,17 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) } break; case 8: GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 1); - sub_02003178(param0->unk_D4.unk_14, 0x1, (1 << 1), 0, 0, 16, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x1, (1 << 1), 0, 0, 16, 0); param0->unk_3D4++; break; case 9: - if (sub_0200384C(param0->unk_D4.unk_14) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_D4.unk_14) != 0) { break; } - sub_02003178(param0->unk_D4.unk_14, 0x1, (1 << 0), 0, 16, 0, 0); - sub_02003178(param0->unk_D4.unk_14, 0x4, 0xFFFF, 0, 16, 0, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x1, (1 << 0), 0, 16, 0, 0); + PaletteData_StartFade(param0->unk_D4.unk_14, 0x4, 0xFFFF, 0, 16, 0, 0); Bg_SetPriority(3, 3); Bg_SetPriority(7, 3); GXLayers_EngineBToggleLayers((GX_PLANEMASK_BG2), 0); @@ -1118,7 +1118,7 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) param0->unk_3D4++; break; case 10: - if (sub_0200384C(param0->unk_D4.unk_14) != 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_D4.unk_14) != 0) { break; } @@ -1505,7 +1505,7 @@ void ov76_0223ECB0(void *param0) sub_02008A94(v0->unk_D4.unk_D0); sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_D4.unk_14); + PaletteData_CommitFadedBuffers(v0->unk_D4.unk_14); Bg_RunScheduledUpdates(v0->unk_D4.unk_10); OS_SetIrqCheckFlag(OS_IE_V_BLANK); diff --git a/src/overlay099/ov99_021D0D80.c b/src/overlay099/ov99_021D0D80.c index 0db8638917..69880ad7dd 100644 --- a/src/overlay099/ov99_021D0D80.c +++ b/src/overlay099/ov99_021D0D80.c @@ -110,13 +110,13 @@ int ov99_021D0D80(OverlayManager *param0, int *param1) v0->unk_00 = OverlayManager_Args(param0); v0->unk_10 = ov99_021D19AC(75); - v0->unk_0C = sub_02002F38(75); + v0->unk_0C = PaletteData_New(75); - sub_02002F70(v0->unk_0C, 0, 0x200, 75); - sub_02002F70(v0->unk_0C, 1, 0x200, 75); - sub_02002F70(v0->unk_0C, 2, 0x200 - 0x40, 75); - sub_02002F70(v0->unk_0C, 3, 0x200, 75); - sub_02003858(v0->unk_0C, 1); + PaletteData_AllocBuffer(v0->unk_0C, 0, 0x200, 75); + PaletteData_AllocBuffer(v0->unk_0C, 1, 0x200, 75); + PaletteData_AllocBuffer(v0->unk_0C, 2, 0x200 - 0x40, 75); + PaletteData_AllocBuffer(v0->unk_0C, 3, 0x200, 75); + PaletteData_SetAutoTransparent(v0->unk_0C, 1); v0->unk_08 = BgConfig_New(75); @@ -271,11 +271,11 @@ int ov99_021D11A8(OverlayManager *param0, int *param1) MessageLoader_Free(v0->unk_20); sub_0200D0B0(v0->unk_18, v0->unk_1C); sub_0200C8D4(v0->unk_18); - sub_02002FA0(v0->unk_0C, 0); - sub_02002FA0(v0->unk_0C, 1); - sub_02002FA0(v0->unk_0C, 2); - sub_02002FA0(v0->unk_0C, 3); - sub_02002F54(v0->unk_0C); + PaletteData_FreeBuffer(v0->unk_0C, 0); + PaletteData_FreeBuffer(v0->unk_0C, 1); + PaletteData_FreeBuffer(v0->unk_0C, 2); + PaletteData_FreeBuffer(v0->unk_0C, 3); + PaletteData_Free(v0->unk_0C); ov99_021D19A0(v0); @@ -355,7 +355,7 @@ static void ov99_021D1350(void *param0) sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_0C); + PaletteData_CommitFadedBuffers(v0->unk_0C); Bg_RunScheduledUpdates(v0->unk_08); OS_SetIrqCheckFlag(OS_IE_V_BLANK); @@ -673,8 +673,8 @@ static void ov99_021D1580(BgConfig *param0) static void ov99_021D16E4(UnkStruct_ov99_021D2CB0 *param0) { - PaletteSys_LoadPalette(param0->unk_0C, 127, 85, 75, 0, 0x20, 15 * 16); - PaletteSys_LoadPalette(param0->unk_0C, 127, 85, 75, 1, 0x20, 15 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 85, 75, 0, 0x20, 15 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 85, 75, 1, 0x20, 15 * 16); } static void ov99_021D1720(UnkStruct_ov99_021D2CB0 *param0) diff --git a/src/overlay099/ov99_021D1A54.c b/src/overlay099/ov99_021D1A54.c index 4ae564863d..5b81558892 100644 --- a/src/overlay099/ov99_021D1A54.c +++ b/src/overlay099/ov99_021D1A54.c @@ -334,12 +334,12 @@ static void ov99_021D1A54(UnkStruct_ov99_021D2CB0 *param0) switch (param0->unk_1101) { case 0: - sub_020039B0(param0->unk_0C, 2, v0 * 16, 16, 4, GX_RGB(28, 12, 6)); + PaletteData_Blend(param0->unk_0C, 2, v0 * 16, 16, 4, GX_RGB(28, 12, 6)); break; case 2: break; case 4: - sub_020039B0(param0->unk_0C, 2, v0 * 16, 16, 4, GX_RGB(11, 11, 16)); + PaletteData_Blend(param0->unk_0C, 2, v0 * 16, 16, 4, GX_RGB(11, 11, 16)); break; } } @@ -453,11 +453,11 @@ static void ov99_021D1D68(UnkStruct_ov99_021D2CB0 *param0) { BgConfig *v0 = param0->unk_08; - PaletteSys_LoadPalette(param0->unk_0C, 127, 18, 75, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 18, 75, 0, 0, 0); sub_020070E8(param0->unk_10F8, 9, param0->unk_08, 2, 0, 0, 0, 75); sub_0200710C(param0->unk_10F8, 3, param0->unk_08, 2, 0, 0, 0, 75); - PaletteSys_LoadPalette(param0->unk_0C, 127, 21, 75, 1, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 21, 75, 1, 0, 0); sub_020070E8(param0->unk_10F8, 12, param0->unk_08, 7, 0, 0, 0, 75); sub_0200710C(param0->unk_10F8, 6, param0->unk_08, 7, 0, 0, 0, 75); @@ -662,11 +662,11 @@ static void ov99_021D2180(UnkStruct_ov99_021D2CB0 *param0) { BgConfig *v0 = param0->unk_08; - PaletteSys_LoadPalette(param0->unk_0C, 127, 19, 75, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 19, 75, 0, 0, 0); sub_020070E8(param0->unk_10F8, 10, param0->unk_08, 2, 0, 0, 0, 75); sub_0200710C(param0->unk_10F8, 4, param0->unk_08, 2, 0, 0, 0, 75); - PaletteSys_LoadPalette(param0->unk_0C, 127, 22, 75, 1, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 22, 75, 1, 0, 0); sub_020070E8(param0->unk_10F8, 13, param0->unk_08, 7, 0, 0, 0, 75); sub_0200710C(param0->unk_10F8, 7, param0->unk_08, 7, 0, 0, 0, 75); @@ -802,11 +802,11 @@ static void ov99_021D24F0(UnkStruct_ov99_021D2CB0 *param0) { BgConfig *v0 = param0->unk_08; - PaletteSys_LoadPalette(param0->unk_0C, 127, 20, 75, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 20, 75, 0, 0, 0); sub_020070E8(param0->unk_10F8, 11, param0->unk_08, 2, 0, 0, 0, 75); sub_0200710C(param0->unk_10F8, 5, param0->unk_08, 2, 0, 0, 0, 75); - PaletteSys_LoadPalette(param0->unk_0C, 127, 23, 75, 1, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 23, 75, 1, 0, 0); sub_020070E8(param0->unk_10F8, 14, param0->unk_08, 7, 0, 0, 0, 75); sub_0200710C(param0->unk_10F8, 8, param0->unk_08, 7, 0, 0, 0, 75); @@ -818,8 +818,8 @@ static void ov99_021D24F0(UnkStruct_ov99_021D2CB0 *param0) MI_CpuCopy16(v1->pRawData, param0->unk_FA4.unk_08_val3.unk_08, 0x20 * 8); Heap_FreeToHeap(v2); - sub_02002FBC(param0->unk_0C, param0->unk_FA4.unk_08_val3.unk_08, 0, 16 * 1, 0x20); - sub_02002FBC(param0->unk_0C, param0->unk_FA4.unk_08_val3.unk_08, 1, 16 * 1, 0x20); + PaletteData_LoadBuffer(param0->unk_0C, param0->unk_FA4.unk_08_val3.unk_08, 0, 16 * 1, 0x20); + PaletteData_LoadBuffer(param0->unk_0C, param0->unk_FA4.unk_08_val3.unk_08, 1, 16 * 1, 0x20); } Bg_SetOffset(v0, 2, 0, 0); @@ -1064,7 +1064,7 @@ static void ov99_021D2AAC(UnkStruct_ov99_021D2CB0 *param0) gCoreSys.unk_65 = 0; GXLayers_SwapDisplay(); - sub_020038B0(param0->unk_0C, 0, 2, 0x0, 0, 1); + PaletteData_FillBufferRange(param0->unk_0C, 0, 2, 0x0, 0, 1); { Strbuf *v1; diff --git a/src/overlay099/ov99_021D2E28.c b/src/overlay099/ov99_021D2E28.c index b79b711552..99b0046e83 100644 --- a/src/overlay099/ov99_021D2E28.c +++ b/src/overlay099/ov99_021D2E28.c @@ -315,9 +315,9 @@ static void ov99_021D330C(UnkStruct_ov99_021D2CB0 *param0, UnkStruct_ov99_021D2E } } - v5 = sub_0200316C(param0->unk_0C, 1); + v5 = PaletteData_GetFadedBuffer(param0->unk_0C, 1); for (v1 = 0; v1 < 16; v1++) { - sub_0200393C(¶m1->unk_08[v2][v1], &v5[(2 * 16) + v1], 1, v3, param1->unk_08[v4][v1]); + BlendPalette(¶m1->unk_08[v2][v1], &v5[(2 * 16) + v1], 1, v3, param1->unk_08[v4][v1]); } } diff --git a/src/overlay099/ov99_021D340C.c b/src/overlay099/ov99_021D340C.c index fc90b0933f..9dfd39f02c 100644 --- a/src/overlay099/ov99_021D340C.c +++ b/src/overlay099/ov99_021D340C.c @@ -352,12 +352,12 @@ static void ov99_021D3930(UnkStruct_ov99_021D2CB0 *param0, UnkStruct_ov99_021D34 v4 = 8 - 1; } - v5 = sub_0200316C(param0->unk_0C, 0); - v6 = sub_0200316C(param0->unk_0C, 1); + v5 = PaletteData_GetFadedBuffer(param0->unk_0C, 0); + v6 = PaletteData_GetFadedBuffer(param0->unk_0C, 1); for (v1 = 0; v1 < 16; v1++) { - sub_0200393C(¶m1->unk_08[v2][v1], &v5[v1 + 16 * 1], 1, v3, param1->unk_08[v4][v1]); - sub_0200393C(¶m1->unk_08[v2][v1], &v6[v1 + 16 * 1], 1, v3, param1->unk_08[v4][v1]); + BlendPalette(¶m1->unk_08[v2][v1], &v5[v1 + 16 * 1], 1, v3, param1->unk_08[v4][v1]); + BlendPalette(¶m1->unk_08[v2][v1], &v6[v1 + 16 * 1], 1, v3, param1->unk_08[v4][v1]); } break; } diff --git a/src/overlay099/ov99_021D4134.c b/src/overlay099/ov99_021D4134.c index 9c8928a2e0..ae04e0e255 100644 --- a/src/overlay099/ov99_021D4134.c +++ b/src/overlay099/ov99_021D4134.c @@ -196,8 +196,8 @@ void ov99_021D439C(UnkStruct_ov99_021D2CB0 *param0, int param1, int param2, int GX_EndLoadBGExtPltt(); Heap_FreeToHeap(v2); - sub_020038B0(param0->unk_0C, 0, 2, 0x0, 0, 1); - sub_020038B0(param0->unk_0C, 1, 2, 0x0, 0, 1); + PaletteData_FillBufferRange(param0->unk_0C, 0, 2, 0x0, 0, 1); + PaletteData_FillBufferRange(param0->unk_0C, 1, 2, 0x0, 0, 1); sub_020070E8(param0->unk_10F8, v3->unk_00, param0->unk_08, param2, 0, 0, 0, 75); sub_0200710C(param0->unk_10F8, v3->unk_02, param0->unk_08, param2, 0, 0, 0, 75); Bg_SetOffset(v0, param2, 0, v3->unk_06); diff --git a/src/overlay100/ov100_021D0D80.c b/src/overlay100/ov100_021D0D80.c index 3b7fb30980..3a59d68427 100644 --- a/src/overlay100/ov100_021D0D80.c +++ b/src/overlay100/ov100_021D0D80.c @@ -76,8 +76,8 @@ int ov100_021D0D80(OverlayManager *param0, int *param1) Window_CopyToVRAM(v1); sub_0200DD0C(v0->unk_0C.unk_0C, 1, 500, 15, v2, 111); - PaletteSys_LoadPalette(v0->unk_0C.unk_10, 38, sub_0200DD08(v2), 111, 0, 0x20, 15 * 16); - PaletteSys_LoadPalette(v0->unk_0C.unk_10, 14, 7, 111, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(v0->unk_0C.unk_10, 38, sub_0200DD08(v2), 111, 0, 0x20, 15 * 16); + PaletteData_LoadBufferFromFileStart(v0->unk_0C.unk_10, 14, 7, 111, 0, 0x20, 14 * 16); sub_0200E060(v1, 0, 500, 15); ov100_021D4788(&v0->unk_0C); @@ -218,16 +218,16 @@ static void ov100_021D1034(UnkStruct_ov100_021D46C8 *param0) param0->unk_00 = NARC_ctor(NARC_INDEX_ARC__DEMO_TENGAN_GRA, 111); param0->unk_0C = BgConfig_New(111); - param0->unk_10 = sub_02002F38(111); + param0->unk_10 = PaletteData_New(111); param0->unk_14 = sub_02024220(111, 0, 1, 0, 4, NULL); param0->camera = Camera_Alloc(111); param0->unk_2C = MessageLoader_Init(0, 26, 234, 111); - sub_02003858(param0->unk_10, 1); - sub_02002F70(param0->unk_10, 0, 0x200, 111); - sub_02002F70(param0->unk_10, 1, 0x200, 111); - sub_02002F70(param0->unk_10, 2, 0x200, 111); - sub_02002F70(param0->unk_10, 3, 0x200, 111); + PaletteData_SetAutoTransparent(param0->unk_10, 1); + PaletteData_AllocBuffer(param0->unk_10, 0, 0x200, 111); + PaletteData_AllocBuffer(param0->unk_10, 1, 0x200, 111); + PaletteData_AllocBuffer(param0->unk_10, 2, 0x200, 111); + PaletteData_AllocBuffer(param0->unk_10, 3, 0x200, 111); ov100_021D1208(param0->unk_0C); ov100_021D0FA0(param0); @@ -256,11 +256,11 @@ static void ov100_021D111C(UnkStruct_ov100_021D46C8 *param0) Bg_FreeTilemapBuffer(param0->unk_0C, 7); Heap_FreeToHeap(param0->unk_0C); - sub_02002FA0(param0->unk_10, 0); - sub_02002FA0(param0->unk_10, 1); - sub_02002FA0(param0->unk_10, 2); - sub_02002FA0(param0->unk_10, 3); - sub_02002F54(param0->unk_10); + PaletteData_FreeBuffer(param0->unk_10, 0); + PaletteData_FreeBuffer(param0->unk_10, 1); + PaletteData_FreeBuffer(param0->unk_10, 2); + PaletteData_FreeBuffer(param0->unk_10, 3); + PaletteData_Free(param0->unk_10); NARC_dtor(param0->unk_00); sub_020242C4(param0->unk_14); @@ -448,7 +448,7 @@ static void ov100_021D13B4(void *param0) sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_0C.unk_10); + PaletteData_CommitFadedBuffers(v0->unk_0C.unk_10); Bg_RunScheduledUpdates(v0->unk_0C.unk_0C); OS_SetIrqCheckFlag(OS_IE_V_BLANK); diff --git a/src/overlay100/ov100_021D13E4.c b/src/overlay100/ov100_021D13E4.c index 540e7c342c..e31567ed2a 100644 --- a/src/overlay100/ov100_021D13E4.c +++ b/src/overlay100/ov100_021D13E4.c @@ -248,11 +248,11 @@ static void ov100_021D1808(UnkStruct_ov100_021D1808 *param0) sub_020070E8(v0, 70, v1, 5, 0, 0, 0, 111); sub_0200710C(v0, 72, v1, 5, 0, 0, 0, 111); sub_0200710C(v0, 73, v1, 4, 0, 0, 0, 111); - PaletteSys_LoadPalette(v4, 172, 71, 111, 1, 0x20 * 2, 0); + PaletteData_LoadBufferFromFileStart(v4, 172, 71, 111, 1, 0x20 * 2, 0); { const u16 v6[] = { 0x421 }; - sub_02002FBC(v4, &v6, 0, 0, 0x2); + PaletteData_LoadBuffer(v4, &v6, 0, 0, 0x2); } SpriteRenderer_LoadPalette(v4, 3, v2, v3, v0, 50, 0, 3, NNS_G2D_VRAM_TYPE_2DSUB, v5); diff --git a/src/overlay100/ov100_021D1C44.c b/src/overlay100/ov100_021D1C44.c index 2c336bf80e..579cd808c6 100644 --- a/src/overlay100/ov100_021D1C44.c +++ b/src/overlay100/ov100_021D1C44.c @@ -80,8 +80,8 @@ static void ov100_021D1C98(UnkStruct_ov100_021D1C98 *param0) sub_020070E8(v0, 18, v1, 5, 0, 0, 0, 111); sub_0200710C(v0, 20, v1, 5, 0, 0, 0, 111); - PaletteSys_LoadPalette(v4, 172, 19, 111, 1, 0x20 * 2, 0); - PaletteSys_LoadPalette(v4, 172, 19, 111, 0, 0x20 * 2, 0); + PaletteData_LoadBufferFromFileStart(v4, 172, 19, 111, 1, 0x20 * 2, 0); + PaletteData_LoadBufferFromFileStart(v4, 172, 19, 111, 0, 0x20 * 2, 0); SpriteRenderer_LoadPalette(v4, 3, v2, v3, v0, 50, 0, 3, NNS_G2D_VRAM_TYPE_2DSUB, v5); SpriteRenderer_LoadCellResObjFromOpenNarc(v2, v3, v0, 48, 0, v5); diff --git a/src/overlay100/ov100_021D2F0C.c b/src/overlay100/ov100_021D2F0C.c index 10e5857f18..8e75f781e4 100644 --- a/src/overlay100/ov100_021D2F0C.c +++ b/src/overlay100/ov100_021D2F0C.c @@ -51,7 +51,7 @@ static void ov100_021D2F0C(BgConfig *param0, PaletteData *param1) sub_02006E3C(v0, v1, param0, v4, 0, 0, 1, v5); sub_02006E60(v0, v2, param0, v4, 0, 0, 1, v5); - PaletteSys_LoadPalette(param1, v0, v3, v5, 1, 0x20 * 1, 0); + PaletteData_LoadBufferFromFileStart(param1, v0, v3, v5, 1, 0x20 * 1, 0); } static void ov100_021D2F64(UnkStruct_ov100_021D3084 *param0) diff --git a/src/overlay100/ov100_021D46C8.c b/src/overlay100/ov100_021D46C8.c index b6c33c3337..d9ff314ac9 100644 --- a/src/overlay100/ov100_021D46C8.c +++ b/src/overlay100/ov100_021D46C8.c @@ -272,8 +272,8 @@ void ov100_021D4BF0(UnkStruct_ov100_021D46C8 *param0) } } - sub_020039B0(param0->unk_10, 1, 0, 4, param0->unk_C1 / 8, 0xCCCC); - sub_020039B0(param0->unk_10, 1, 4, 6, param0->unk_C1 / 8, 0xCCCC); + PaletteData_Blend(param0->unk_10, 1, 0, 4, param0->unk_C1 / 8, 0xCCCC); + PaletteData_Blend(param0->unk_10, 1, 4, 6, param0->unk_C1 / 8, 0xCCCC); } void ov100_021D4C94(UnkStruct_ov100_021D46C8 *param0, int param1) @@ -331,7 +331,7 @@ void ov100_021D4C94(UnkStruct_ov100_021D46C8 *param0, int param1) } } - sub_020039B0(param0->unk_10, 1, v3[v0][0], v3[v0][1], param0->unk_C1 / v1[v0], v4[v0]); + PaletteData_Blend(param0->unk_10, 1, v3[v0][0], v3[v0][1], param0->unk_C1 / v1[v0], v4[v0]); } void ov100_021D4DC8(int param0) diff --git a/src/overlay104/ov104_0222FBE4.c b/src/overlay104/ov104_0222FBE4.c index 9ec90aa2d4..60279bcd3a 100644 --- a/src/overlay104/ov104_0222FBE4.c +++ b/src/overlay104/ov104_0222FBE4.c @@ -2124,7 +2124,7 @@ static BOOL ov104_022311BC(UnkStruct_ov104_02231148 *param0) param0->unk_28 = Window_New(11, 1); Window_Add(param0->unk_00->unk_00, param0->unk_28, 1, 0, 0, 32, 32, 0, 0); - sub_020038B0(param0->unk_00->unk_04, 0, 2, 0x0, 0, 16); + PaletteData_FillBufferRange(param0->unk_00->unk_04, 0, 2, 0x0, 0, 16); Window_FillTilemap(param0->unk_28, 0); Window_ScheduleCopyToVRAM(param0->unk_28); @@ -2178,7 +2178,7 @@ static BOOL ov104_022312D8(UnkStruct_ov104_02231148 *param0) param0->unk_28 = Window_New(11, 1); Window_Add(param0->unk_00->unk_00, param0->unk_28, 1, 0, 0, 32, 32, 0, 0); - sub_020038B0(param0->unk_00->unk_04, 0, 2, 0x0, 0, 16); + PaletteData_FillBufferRange(param0->unk_00->unk_04, 0, 2, 0x0, 0, 16); Window_FillTilemap(param0->unk_28, 0); Window_ScheduleCopyToVRAM(param0->unk_28); @@ -2529,7 +2529,7 @@ static BOOL ov104_02231A28(UnkStruct_ov104_0222E930 *param0) sub_0209B980(param0->unk_00->unk_00, v1); ov104_0222E974(param0, ov104_02231AA8); - sub_020038B0(v1->unk_00->unk_04, 0, 2, 0x0, 0, 1); + PaletteData_FillBufferRange(v1->unk_00->unk_04, 0, 2, 0x0, 0, 1); return 1; } diff --git a/src/overlay104/ov104_02231F74.c b/src/overlay104/ov104_02231F74.c index 8fa16688a9..ce179d1742 100644 --- a/src/overlay104/ov104_02231F74.c +++ b/src/overlay104/ov104_02231F74.c @@ -940,10 +940,10 @@ void ov104_02232CE0(UnkStruct_ov104_0223C4CC *param0, Pokemon *param1, int param v12 = CellActor_GetPaletteProxy(v5->unk_00); v13 = sub_0201FAB4(v12, NNS_G2D_VRAM_TYPE_2DMAIN); - PaletteSys_LoadPalette(v2, v3.archive, v3.palette, param2, 2, 0x20, v13 * 16); + PaletteData_LoadBufferFromFileStart(v2, v3.archive, v3.palette, param2, 2, 0x20, v13 * 16); if (param8 > 0) { - sub_020039B0(v2, 2, v13 * 16, 16, param8, param9); + PaletteData_Blend(v2, 2, v13 * 16, 16, param8, param9); } } diff --git a/src/overlay104/ov104_02237378.c b/src/overlay104/ov104_02237378.c index b638544b6e..9272aaa5e0 100644 --- a/src/overlay104/ov104_02237378.c +++ b/src/overlay104/ov104_02237378.c @@ -516,7 +516,7 @@ BOOL ov104_02237748(UnkStruct_ov104_0222E930 *param0) break; case 44: if (v18 == 0) { - sub_020039B0(v15->unk_04, 2, 0, 16 * 16, v18, 0x0); + PaletteData_Blend(v15->unk_04, 2, 0, 16 * 16, v18, 0x0); } else { { u32 v25; @@ -526,7 +526,7 @@ BOOL ov104_02237748(UnkStruct_ov104_0222E930 *param0) v26 = ov104_0223D5A8(param0->unk_00->unk_00, v19); v25 = ov63_0222D050(v26->unk_04); - sub_020039B0(v15->unk_04, 2, (v25 * 16), 16, v18, 0x0); + PaletteData_Blend(v15->unk_04, 2, (v25 * 16), 16, v18, 0x0); } } break; diff --git a/src/overlay104/ov104_02237DD8.c b/src/overlay104/ov104_02237DD8.c index 2447d6d822..7b66604673 100644 --- a/src/overlay104/ov104_02237DD8.c +++ b/src/overlay104/ov104_02237DD8.c @@ -903,7 +903,7 @@ void ov104_02238AB4(u8 param0, u8 param1) v4 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_BG, 94); v3 = sub_020071EC(v4, v0, &v2, 94); - sub_0200393C(v2->pRawData, v5, 0x1000, param0, 0x0); + BlendPalette(v2->pRawData, v5, 0x1000, param0, 0x0); DC_FlushRange(v5, 0x1000 * 2); GX_BeginLoadBGExtPltt(); diff --git a/src/overlay104/ov104_0223C2D4.c b/src/overlay104/ov104_0223C2D4.c index e3bd1d9acd..8b40781592 100644 --- a/src/overlay104/ov104_0223C2D4.c +++ b/src/overlay104/ov104_0223C2D4.c @@ -154,13 +154,13 @@ UnkStruct_ov104_0223C4CC *ov104_0223C2D4(UnkStruct_0209B75C *param0) } v0->unk_0C = ov104_0223CF4C(94); - v0->unk_04 = sub_02002F38(94); + v0->unk_04 = PaletteData_New(94); - sub_02003858(v0->unk_04, 1); - sub_02002F70(v0->unk_04, 0, 0x200, 94); - sub_02002F70(v0->unk_04, 1, 0x200, 94); - sub_02002F70(v0->unk_04, 2, 0x200 - 0x40, 94); - sub_02002F70(v0->unk_04, 3, 0x200, 94); + PaletteData_SetAutoTransparent(v0->unk_04, 1); + PaletteData_AllocBuffer(v0->unk_04, 0, 0x200, 94); + PaletteData_AllocBuffer(v0->unk_04, 1, 0x200, 94); + PaletteData_AllocBuffer(v0->unk_04, 2, 0x200 - 0x40, 94); + PaletteData_AllocBuffer(v0->unk_04, 3, 0x200, 94); v0->unk_00 = BgConfig_New(94); @@ -226,11 +226,11 @@ void ov104_0223C4CC(UnkStruct_ov104_0223C4CC *param0) sub_0201DC3C(); - sub_02002FA0(param0->unk_04, 0); - sub_02002FA0(param0->unk_04, 1); - sub_02002FA0(param0->unk_04, 2); - sub_02002FA0(param0->unk_04, 3); - sub_02002F54(param0->unk_04); + PaletteData_FreeBuffer(param0->unk_04, 0); + PaletteData_FreeBuffer(param0->unk_04, 1); + PaletteData_FreeBuffer(param0->unk_04, 2); + PaletteData_FreeBuffer(param0->unk_04, 3); + PaletteData_Free(param0->unk_04); Heap_FreeToHeap(param0->unk_00); SysTask_Done(param0->unk_94); SysTask_Done(param0->unk_98); @@ -326,7 +326,7 @@ static void ov104_0223C6EC(void *param0) sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_04); + PaletteData_CommitFadedBuffers(v0->unk_04); Bg_RunScheduledUpdates(v0->unk_00); OS_SetIrqCheckFlag(OS_IE_V_BLANK); @@ -614,8 +614,8 @@ static void ov104_0223C948(BgConfig *param0, int param1) static void ov104_0223CB80(UnkStruct_ov104_0223C4CC *param0) { - PaletteSys_LoadPalette(param0->unk_04, 14, 6, 94, 0, 0x20, 14 * 16); - PaletteSys_LoadPalette(param0->unk_04, 14, 7, 94, 0, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_04, 14, 6, 94, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_04, 14, 7, 94, 0, 0x20, 13 * 16); { UnkStruct_ov104_02230BE4 *v0; @@ -623,11 +623,11 @@ static void ov104_0223CB80(UnkStruct_ov104_0223C4CC *param0) v0 = sub_0209B970(param0->unk_08); sub_0200DD0C(param0->unk_00, 1, (1024 - (18 + 12)), 11, Options_Frame(v0->unk_04), 94); - sub_02003070(param0->unk_04, 0, 11 * 16, 0x20); + PaletteData_LoadBufferFromHardware(param0->unk_04, 0, 11 * 16, 0x20); } sub_0200DAA4(param0->unk_00, 1, ((1024 - (18 + 12)) - 9), 12, 0, 94); - sub_02003070(param0->unk_04, 0, 12 * 16, 0x20); + PaletteData_LoadBufferFromHardware(param0->unk_04, 0, 12 * 16, 0x20); } static void ov104_0223CC10(UnkStruct_ov104_0223C4CC *param0) @@ -638,7 +638,7 @@ static void ov104_0223CC10(UnkStruct_ov104_0223C4CC *param0) sub_020070E8(v0, 125, param0->unk_00, 4, 0, 0, 1, 94); sub_0200710C(v0, 126, param0->unk_00, 4, 0, 0, 1, 94); - PaletteSys_LoadPalette(param0->unk_04, 150, 171, 94, 1, 0x20, 0 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_04, 150, 171, 94, 1, 0x20, 0 * 16); NARC_dtor(v0); } @@ -705,7 +705,7 @@ static void ov104_0223CC74(UnkStruct_ov104_0223C4CC *param0, int param1, const T sub_020070E8(v3, ov104_0222EA90(param1, 7), param0->unk_00, 3, 0, 0, 1, 94); if (v4 == GX_BGMODE_0) { - PaletteSys_LoadPalette(param0->unk_04, v2, ov104_0222EA90(param1, 8), 94, 0, ((10 - 0 + 1) * 0x20), 0 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_04, v2, ov104_0222EA90(param1, 8), 94, 0, ((10 - 0 + 1) * 0x20), 0 * 16); } else { NNSG2dPaletteData *v5; void *v6; @@ -720,7 +720,7 @@ static void ov104_0223CC74(UnkStruct_ov104_0223C4CC *param0, int param1, const T Heap_FreeToHeap(v6); } - sub_020038B0(param0->unk_04, 0, 2, 0x0, 0, 1); + PaletteData_FillBufferRange(param0->unk_04, 0, 2, 0x0, 0, 1); sub_0200710C(v3, ov104_0222EA90(param1, 6), param0->unk_00, 3, 0, 0, 1, 94); if (ov104_0222EA90(param1, 9) != 0xffff) { diff --git a/src/overlay104/ov104_0223D9E4.c b/src/overlay104/ov104_0223D9E4.c index 1b71d04b59..6976928be0 100644 --- a/src/overlay104/ov104_0223D9E4.c +++ b/src/overlay104/ov104_0223D9E4.c @@ -175,7 +175,7 @@ static UnkStruct_ov104_0223DC04 *ov104_0223DBB8(PaletteData *param0) { u16 *v1; - v1 = sub_02003164(param0, 0); + v1 = PaletteData_GetUnfadedBuffer(param0, 0); MI_CpuCopy16(&v1[16 * 5], v0->unk_08, 3 * 16 * sizeof(u16)); } @@ -200,7 +200,7 @@ static void ov104_0223DC18(SysTask *param0, void *param1) } v0->unk_69 = 0; - sub_02002FBC(v0->unk_04, v0->unk_08[v0->unk_68], 0, 6 * 16, 0x20); + PaletteData_LoadBuffer(v0->unk_04, v0->unk_08[v0->unk_68], 0, 6 * 16, 0x20); v0->unk_68++; if (v0->unk_68 >= 3) { diff --git a/src/overlay104/ov104_0223DC7C.c b/src/overlay104/ov104_0223DC7C.c index 95eace1d95..5e00ac1053 100644 --- a/src/overlay104/ov104_0223DC7C.c +++ b/src/overlay104/ov104_0223DC7C.c @@ -284,7 +284,7 @@ static BOOL ov104_0223DDE4(UnkStruct_ov104_0223DD30 *param0, u32 param1, const U SpriteRenderer_LoadCharResObjFromOpenNarc(param0->unk_14, param0->unk_18, param0->unk_24, param2->unk_05, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 2010); SpriteRenderer_LoadCellResObjFromOpenNarc(param0->unk_14, param0->unk_18, param0->unk_24, param2->unk_06, 0, 2002); SpriteRenderer_LoadAnimResObjFromOpenNarc(param0->unk_14, param0->unk_18, param0->unk_24, param2->unk_07, 0, 2002); - sub_020039B0(param0->unk_1C, 2, param0->unk_160 * 16, 16, 14, (GX_RGB(0, 0, 0))); + PaletteData_Blend(param0->unk_1C, 2, param0->unk_160 * 16, 16, 14, (GX_RGB(0, 0, 0))); v7 = SpriteRenderer_LoadPalette(param0->unk_1C, 2, param0->unk_14, param0->unk_18, param0->unk_24, 51, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 2003); param0->unk_164 |= 1 << v7; @@ -368,8 +368,8 @@ static BOOL ov104_0223DDE4(UnkStruct_ov104_0223DD30 *param0, u32 param1, const U break; case 12: if (ScreenWipe_Done()) { - sub_02003A2C(param0->unk_1C, 2, param0->unk_164 ^ 0x3fff, 14, 0x0); - sub_020039B0(param0->unk_1C, 2, param0->unk_160 * 16, 16, 0, (GX_RGB(0, 0, 0))); + PaletteData_BlendMulti(param0->unk_1C, 2, param0->unk_164 ^ 0x3fff, 14, 0x0); + PaletteData_Blend(param0->unk_1C, 2, param0->unk_160 * 16, 16, 0, (GX_RGB(0, 0, 0))); sub_0200AB4C(-14, GX_BLEND_PLANEMASK_BG2 | GX_BLEND_PLANEMASK_BG3 | GX_BLEND_PLANEMASK_BD, 1); sub_020129D0(v0->unk_7C.unk_00, 1); param0->unk_00++; @@ -621,7 +621,7 @@ static void ov104_0223E5A8(UnkStruct_ov104_0223DD30 *param0, const UnkStruct_ov1 G2_SetWnd0Position(0, 0, 0, 0); G2_SetWnd1Position(0, 0, 0, 0); - PaletteSys_LoadPalette(param0->unk_1C, 112, param1->unk_08, 94, 0, 0x20, 12 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_1C, 112, param1->unk_08, 94, 0, 0x20, 12 * 16); sub_020070E8(param0->unk_24, param1->unk_09, param0->unk_10, 1, 0, 0, 0, 94); sub_0200710C(param0->unk_24, param1->unk_0A, param0->unk_10, 1, 0, 0, 0, 94); Bg_ChangeTilemapRectPalette(param0->unk_10, 1, 0, 0, 32, 32, 12); @@ -657,7 +657,7 @@ static void ov104_0223E6BC(SysTask *param0, void *param1) v0->unk_3C = 0; } - sub_02002FBC(v0->unk_1C, &v0->unk_40[v0->unk_3C * 16], 0, 12 * 16, 0x20); + PaletteData_LoadBuffer(v0->unk_1C, &v0->unk_40[v0->unk_3C * 16], 0, 12 * 16, 0x20); } static void ov104_0223E6F0(UnkStruct_ov104_0223DD30 *param0, int param1) diff --git a/src/overlay105/ov105_02241AE0.c b/src/overlay105/ov105_02241AE0.c index 633f882a01..9f20653cee 100644 --- a/src/overlay105/ov105_02241AE0.c +++ b/src/overlay105/ov105_02241AE0.c @@ -2134,7 +2134,7 @@ static void ov105_0224451C(void *param0) sub_02008A94(v0->unk_128); if (v0->unk_120 != NULL) { - sub_02003694(v0->unk_120); + PaletteData_CommitFadedBuffers(v0->unk_120); } Bg_RunScheduledUpdates(v0->unk_4C); @@ -2272,10 +2272,10 @@ static void ov105_02244678(UnkStruct_ov105_02241FF4 *param0) ov105_02244564(); ov105_02244584(param0->unk_4C); - param0->unk_120 = sub_02002F38(93); + param0->unk_120 = PaletteData_New(93); - sub_02002F70(param0->unk_120, 2, (32 * 16), 93); - sub_02002F70(param0->unk_120, 0, (32 * 16), 93); + PaletteData_AllocBuffer(param0->unk_120, 2, (32 * 16), 93); + PaletteData_AllocBuffer(param0->unk_120, 0, (32 * 16), 93); ov105_02244AF8(); @@ -2775,9 +2775,9 @@ static void ov105_022451B4(UnkStruct_ov105_02241FF4 *param0) sub_02039794(); - sub_02002FA0(param0->unk_120, 2); - sub_02002FA0(param0->unk_120, 0); - sub_02002F54(param0->unk_120); + PaletteData_FreeBuffer(param0->unk_120, 2); + PaletteData_FreeBuffer(param0->unk_120, 0); + PaletteData_Free(param0->unk_120); param0->unk_120 = NULL; diff --git a/src/overlay106/ov106_02241AE0.c b/src/overlay106/ov106_02241AE0.c index b79e9c1d3c..7987835f6e 100644 --- a/src/overlay106/ov106_02241AE0.c +++ b/src/overlay106/ov106_02241AE0.c @@ -745,9 +745,9 @@ static void ov106_022423E8(UnkStruct_ov106_02243118 *param0) } sub_02039794(); - sub_02002FA0(param0->unk_AC, 2); - sub_02002FA0(param0->unk_AC, 0); - sub_02002F54(param0->unk_AC); + PaletteData_FreeBuffer(param0->unk_AC, 2); + PaletteData_FreeBuffer(param0->unk_AC, 0); + PaletteData_Free(param0->unk_AC); param0->unk_AC = NULL; @@ -848,10 +848,10 @@ static void ov106_0224262C(UnkStruct_ov106_02243118 *param0) ov106_0224271C(); ov106_0224273C(param0->unk_48); - param0->unk_AC = sub_02002F38(98); + param0->unk_AC = PaletteData_New(98); - sub_02002F70(param0->unk_AC, 2, (32 * 16), 98); - sub_02002F70(param0->unk_AC, 0, (32 * 16), 98); + PaletteData_AllocBuffer(param0->unk_AC, 2, (32 * 16), 98); + PaletteData_AllocBuffer(param0->unk_AC, 0, (32 * 16), 98); ov106_0224283C(param0, 3); ov106_02242884(); @@ -891,7 +891,7 @@ static void ov106_022426E0(void *param0) } if (v0->unk_AC != NULL) { - sub_02003694(v0->unk_AC); + PaletteData_CommitFadedBuffers(v0->unk_AC); } Bg_RunScheduledUpdates(v0->unk_48); diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index 9ee007036e..6fefaaabc3 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -1393,9 +1393,9 @@ static void ov107_02242E14 (UnkStruct_ov107_02241D6C * param0) sub_02039794(); - sub_02002FA0(param0->unk_1C0, 2); - sub_02002FA0(param0->unk_1C0, 0); - sub_02002F54(param0->unk_1C0); + PaletteData_FreeBuffer(param0->unk_1C0, 2); + PaletteData_FreeBuffer(param0->unk_1C0, 0); + PaletteData_Free(param0->unk_1C0); param0->unk_1C0 = NULL; @@ -1536,10 +1536,10 @@ static void ov107_02243324 (UnkStruct_ov107_02241D6C * param0) ov107_02243424(); ov107_02243444(param0->unk_4C); - param0->unk_1C0 = sub_02002F38(100); + param0->unk_1C0 = PaletteData_New(100); - sub_02002F70(param0->unk_1C0, 2, (32 * 16), 100); - sub_02002F70(param0->unk_1C0, 0, (32 * 16), 100); + PaletteData_AllocBuffer(param0->unk_1C0, 2, (32 * 16), 100); + PaletteData_AllocBuffer(param0->unk_1C0, 0, (32 * 16), 100); ov107_02243588(param0, 3); ov107_022435FC(); @@ -1578,7 +1578,7 @@ static void ov107_022433EC (void * param0) UnkStruct_ov107_02241D6C * v0 = param0; if (v0->unk_1C0 != NULL) { - sub_02003694(v0->unk_1C0); + PaletteData_CommitFadedBuffers(v0->unk_1C0); } Bg_RunScheduledUpdates(v0->unk_4C); diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index 3c781e77b6..d72514123c 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -1070,9 +1070,9 @@ static void ov107_02246D84 (UnkStruct_ov107_02246170 * param0) sub_02039794(); - sub_02002FA0(param0->unk_140, 2); - sub_02002FA0(param0->unk_140, 0); - sub_02002F54(param0->unk_140); + PaletteData_FreeBuffer(param0->unk_140, 2); + PaletteData_FreeBuffer(param0->unk_140, 0); + PaletteData_Free(param0->unk_140); param0->unk_140 = NULL; @@ -1203,10 +1203,10 @@ static void ov107_02247220 (UnkStruct_ov107_02246170 * param0) ov107_02247320(); ov107_02247340(param0->unk_4C); - param0->unk_140 = sub_02002F38(100); + param0->unk_140 = PaletteData_New(100); - sub_02002F70(param0->unk_140, 2, (32 * 16), 100); - sub_02002F70(param0->unk_140, 0, (32 * 16), 100); + PaletteData_AllocBuffer(param0->unk_140, 2, (32 * 16), 100); + PaletteData_AllocBuffer(param0->unk_140, 0, (32 * 16), 100); ov107_02247484(param0, 3); ov107_022474F8(); @@ -1245,7 +1245,7 @@ static void ov107_022472E8 (void * param0) UnkStruct_ov107_02246170 * v0 = param0; if (v0->unk_140 != NULL) { - sub_02003694(v0->unk_140); + PaletteData_CommitFadedBuffers(v0->unk_140); } Bg_RunScheduledUpdates(v0->unk_4C); diff --git a/src/overlay108/ov108_02241AE0.c b/src/overlay108/ov108_02241AE0.c index 43418ac648..49980d9f7e 100644 --- a/src/overlay108/ov108_02241AE0.c +++ b/src/overlay108/ov108_02241AE0.c @@ -764,9 +764,9 @@ static void ov108_02242238(UnkStruct_ov108_02241DB0 *param0) } sub_02039794(); - sub_02002FA0(param0->unk_D4, 2); - sub_02002FA0(param0->unk_D4, 0); - sub_02002F54(param0->unk_D4); + PaletteData_FreeBuffer(param0->unk_D4, 2); + PaletteData_FreeBuffer(param0->unk_D4, 0); + PaletteData_Free(param0->unk_D4); param0->unk_D4 = NULL; ov108_02243194(¶m0->unk_E8); @@ -876,10 +876,10 @@ static void ov108_02242658(UnkStruct_ov108_02241DB0 *param0) ov108_02242740(); ov108_02242760(param0->unk_90); - param0->unk_D4 = sub_02002F38(103); + param0->unk_D4 = PaletteData_New(103); - sub_02002F70(param0->unk_D4, 2, (32 * 16), 103); - sub_02002F70(param0->unk_D4, 0, (32 * 16), 103); + PaletteData_AllocBuffer(param0->unk_D4, 2, (32 * 16), 103); + PaletteData_AllocBuffer(param0->unk_D4, 0, (32 * 16), 103); ov108_02242828(param0, 3); ov108_022428C0(); @@ -912,7 +912,7 @@ static void ov108_02242708(void *param0) UnkStruct_ov108_02241DB0 *v0 = param0; if (v0->unk_D4 != NULL) { - sub_02003694(v0->unk_D4); + PaletteData_CommitFadedBuffers(v0->unk_D4); } Bg_RunScheduledUpdates(v0->unk_90); diff --git a/src/overlay109/ov109_021D0D80.c b/src/overlay109/ov109_021D0D80.c index 58e4bc8826..82604b5fbb 100644 --- a/src/overlay109/ov109_021D0D80.c +++ b/src/overlay109/ov109_021D0D80.c @@ -1555,7 +1555,7 @@ static void ov109_021D1C00(void *param0) sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_D9C); + PaletteData_CommitFadedBuffers(v0->unk_D9C); Bg_RunScheduledUpdates(v0->unk_D84); } @@ -1814,15 +1814,15 @@ static void ov109_021D2004(UnkStruct_ov109_021D0F70 *param0) v0 = ov109_021D3A2C(param0, 17, 0); NNS_G2dGetUnpackedPaletteData(v0, ¶m0->unk_D90); - sub_02002FBC(param0->unk_D9C, param0->unk_D90->pRawData, 0, (32 * 0), (32 * 2)); + PaletteData_LoadBuffer(param0->unk_D9C, param0->unk_D90->pRawData, 0, (32 * 0), (32 * 2)); Heap_FreeToHeap(v0); v0 = ov109_021D3A2C(param0, 20, 0); NNS_G2dGetUnpackedPaletteData(v0, ¶m0->unk_D90); - sub_02002FBC(param0->unk_D9C, param0->unk_D90->pRawData, 1, (32 * 0), (32 * 2)); + PaletteData_LoadBuffer(param0->unk_D9C, param0->unk_D90->pRawData, 1, (32 * 0), (32 * 2)); Heap_FreeToHeap(v0); - sub_02003A2C(param0->unk_D9C, 1, 0xffff, 8, 0); + PaletteData_BlendMulti(param0->unk_D9C, 1, 0xffff, 8, 0); v0 = ov109_021D3A2C(param0, 16, 0); NNS_G2dGetUnpackedCharacterData(v0, ¶m0->unk_D8C); @@ -1903,27 +1903,27 @@ static void ov109_021D22A4(UnkStruct_ov109_021D0F70 *param0) static void ov109_021D22B0(UnkStruct_ov109_021D0F70 *param0) { - param0->unk_D9C = sub_02002F38(95); + param0->unk_D9C = PaletteData_New(95); - sub_02003858(param0->unk_D9C, 1); - sub_02002F70(param0->unk_D9C, 0, 0x200, 95); - sub_02002F70(param0->unk_D9C, 2, 0x200, 95); - sub_02002F70(param0->unk_D9C, 1, 0x200, 95); - sub_02002F70(param0->unk_D9C, 3, 0x200, 95); + PaletteData_SetAutoTransparent(param0->unk_D9C, 1); + PaletteData_AllocBuffer(param0->unk_D9C, 0, 0x200, 95); + PaletteData_AllocBuffer(param0->unk_D9C, 2, 0x200, 95); + PaletteData_AllocBuffer(param0->unk_D9C, 1, 0x200, 95); + PaletteData_AllocBuffer(param0->unk_D9C, 3, 0x200, 95); } static void ov109_021D2308(UnkStruct_ov109_021D0F70 *param0) { - sub_02002FA0(param0->unk_D9C, 0); - sub_02002FA0(param0->unk_D9C, 2); - sub_02002FA0(param0->unk_D9C, 1); - sub_02002FA0(param0->unk_D9C, 3); - sub_02002F54(param0->unk_D9C); + PaletteData_FreeBuffer(param0->unk_D9C, 0); + PaletteData_FreeBuffer(param0->unk_D9C, 2); + PaletteData_FreeBuffer(param0->unk_D9C, 1); + PaletteData_FreeBuffer(param0->unk_D9C, 3); + PaletteData_Free(param0->unk_D9C); } static void ov109_021D2344(UnkStruct_ov109_021D0F70 *param0, u32 param1) { - sub_02003A2C(param0->unk_D9C, 1, 0xffff, param1, 0); + PaletteData_BlendMulti(param0->unk_D9C, 1, 0xffff, param1, 0); } static void ov109_021D2368(UnkStruct_ov109_021D0F70 *param0) @@ -1998,7 +1998,7 @@ static void ov109_021D2408(UnkStruct_ov109_021D0F70 *param0) void *v6 = sub_020394A8(95); NNS_G2dGetUnpackedPaletteData(v6, &v5); - sub_02002FBC(v2, v5->pRawData, 2, 14 * 16, 32); + PaletteData_LoadBuffer(v2, v5->pRawData, 2, 14 * 16, 32); Heap_FreeToHeap(v6); } } @@ -2022,8 +2022,8 @@ static void ov109_021D24F8(UnkStruct_ov109_021D0F70 *param0) sub_0200DAA4(param0->unk_D84, 1, 1, 15, 0, 95); sub_0200DD0C(param0->unk_D84, 1, (1 + 9), 14, param0->unk_CC->unk_14.unk_04, 95); - PaletteSys_LoadPalette(param0->unk_D9C, 38, sub_0200DD08(param0->unk_CC->unk_14.unk_04), 95, 0, 0x20, 14 * 16); - PaletteSys_LoadPalette(param0->unk_D9C, 14, 7, 95, 0, 0x20, 15 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_D9C, 38, sub_0200DD08(param0->unk_CC->unk_14.unk_04), 95, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_D9C, 14, 7, 95, 0, 0x20, 15 * 16); v1->unk_04 = MessageLoader_Init(0, 26, 376, 95); v1->unk_08 = StringTemplate_Default(95); diff --git a/src/overlay110/ov110_021D0D80.c b/src/overlay110/ov110_021D0D80.c index 3d4df0cb79..a9648f417a 100644 --- a/src/overlay110/ov110_021D0D80.c +++ b/src/overlay110/ov110_021D0D80.c @@ -167,9 +167,9 @@ int ov110_021D0EF0 (OverlayManager * param0, int * param1) int v0; UnkStruct_ov110_021D0F78 * v1 = OverlayManager_Data(param0); - sub_02002FA0(v1->unk_120, 2); - sub_02002FA0(v1->unk_120, 0); - sub_02002F54(v1->unk_120); + PaletteData_FreeBuffer(v1->unk_120, 2); + PaletteData_FreeBuffer(v1->unk_120, 0); + PaletteData_Free(v1->unk_120); v1->unk_120 = NULL; @@ -253,7 +253,7 @@ static void ov110_021D1048 (void * param0) UnkStruct_ov110_021D0F78 * v0 = param0; if (v0->unk_120 != NULL) { - sub_02003694(v0->unk_120); + PaletteData_CommitFadedBuffers(v0->unk_120); } Bg_RunScheduledUpdates(v0->unk_0C); @@ -372,10 +372,10 @@ static void ov110_021D1180 (UnkStruct_ov110_021D0F78 * param0) ov110_021D1078(); ov110_021D1098(param0->unk_0C); - param0->unk_120 = sub_02002F38(114); + param0->unk_120 = PaletteData_New(114); - sub_02002F70(param0->unk_120, 2, (32 * 16), 114); - sub_02002F70(param0->unk_120, 0, (32 * 16), 114); + PaletteData_AllocBuffer(param0->unk_120, 2, (32 * 16), 114); + PaletteData_AllocBuffer(param0->unk_120, 0, (32 * 16), 114); ov110_021D123C(param0, 2); ov110_021D128C(); diff --git a/src/overlay111/ov111_021D0D80.c b/src/overlay111/ov111_021D0D80.c index 613161df5b..16de4fa4ae 100644 --- a/src/overlay111/ov111_021D0D80.c +++ b/src/overlay111/ov111_021D0D80.c @@ -1103,9 +1103,9 @@ static void ov111_021D1C0C(UnkStruct_ov111_021D0F7C *param0) } Font_Free(FONT_SUBSCREEN); - sub_02002FA0(param0->unk_15C, 2); - sub_02002FA0(param0->unk_15C, 0); - sub_02002F54(param0->unk_15C); + PaletteData_FreeBuffer(param0->unk_15C, 2); + PaletteData_FreeBuffer(param0->unk_15C, 0); + PaletteData_Free(param0->unk_15C); param0->unk_15C = NULL; @@ -1234,10 +1234,10 @@ static void ov111_021D1FC4(UnkStruct_ov111_021D0F7C *param0) ov111_021D20CC(); ov111_021D20EC(param0->unk_58); - param0->unk_15C = sub_02002F38(115); + param0->unk_15C = PaletteData_New(115); - sub_02002F70(param0->unk_15C, 2, (32 * 16), 115); - sub_02002F70(param0->unk_15C, 0, (32 * 16), 115); + PaletteData_AllocBuffer(param0->unk_15C, 2, (32 * 16), 115); + PaletteData_AllocBuffer(param0->unk_15C, 0, (32 * 16), 115); ov111_021D2248(param0, 7); ov111_021D22D0(); @@ -1282,7 +1282,7 @@ static void ov111_021D2090(void *param0) } if (v0->unk_15C != NULL) { - sub_02003694(v0->unk_15C); + PaletteData_CommitFadedBuffers(v0->unk_15C); } Bg_RunScheduledUpdates(v0->unk_58); diff --git a/src/overlay112/ov112_0225C700.c b/src/overlay112/ov112_0225C700.c index c0f0286856..10e9fe2ee0 100644 --- a/src/overlay112/ov112_0225C700.c +++ b/src/overlay112/ov112_0225C700.c @@ -1237,7 +1237,7 @@ static void ov112_0225D784(UnkStruct_ov112_0225D73C *param0) v1 = 0xe; - sub_0200393C(&v1, ¶m0->unk_04, 1, v0, 0x19); + BlendPalette(&v1, ¶m0->unk_04, 1, v0, 0x19); DC_FlushRange(¶m0->unk_04, 2); GX_LoadBGPltt(¶m0->unk_04, param0->unk_06, 2); diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index c0888c3965..9016d0793f 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -370,14 +370,14 @@ int ov113_0225C700(OverlayManager *param0, int *param1) v0->unk_19D4 = (32 << 8); v0->unk_19D8 = v0->unk_19D4; v0->unk_14 = ov113_0225DC6C(118); - v0->unk_0C = sub_02002F38(118); + v0->unk_0C = PaletteData_New(118); - sub_02003858(v0->unk_0C, 1); - sub_02002F70(v0->unk_0C, 0, 0x200, 118); - sub_02002F70(v0->unk_0C, 1, 0x200, 118); - sub_02002F70(v0->unk_0C, 2, 0x200 - 0x40, 118); - sub_02002F70(v0->unk_0C, 3, 0x200, 118); - sub_02003858(v0->unk_0C, 1); + PaletteData_SetAutoTransparent(v0->unk_0C, 1); + PaletteData_AllocBuffer(v0->unk_0C, 0, 0x200, 118); + PaletteData_AllocBuffer(v0->unk_0C, 1, 0x200, 118); + PaletteData_AllocBuffer(v0->unk_0C, 2, 0x200 - 0x40, 118); + PaletteData_AllocBuffer(v0->unk_0C, 3, 0x200, 118); + PaletteData_SetAutoTransparent(v0->unk_0C, 1); v0->unk_08 = BgConfig_New(118); @@ -499,8 +499,8 @@ int ov113_0225CA04(OverlayManager *param0, int *param1) ov113_0225E068(v0, v2); } else if (((*param1) == 2) && (v2 == 0xfe)) { Sound_PlayEffect(1509); - sub_020039B0(v0->unk_0C, 0, (0 * 16 + 9), 1, 8, 0x0); - sub_020039B0(v0->unk_0C, 2, v0->unk_921 * 16, 16, 8, 0x0); + PaletteData_Blend(v0->unk_0C, 0, (0 * 16 + 9), 1, 8, 0x0); + PaletteData_Blend(v0->unk_0C, 2, v0->unk_921 * 16, 16, 8, 0x0); *param1 = 3; } } @@ -531,7 +531,7 @@ int ov113_0225CA04(OverlayManager *param0, int *param1) break; case 5: - sub_02003070(v0->unk_0C, 0, 11 * 16, 0x20 * 2); + PaletteData_LoadBufferFromHardware(v0->unk_0C, 0, 11 * 16, 0x20 * 2); { u32 v4 = sub_020159FC(v0->unk_24); @@ -548,8 +548,8 @@ int ov113_0225CA04(OverlayManager *param0, int *param1) sub_02015A54(v0->unk_24); v0->unk_28 = 0; sub_0200E084(&v0->unk_B4, 0); - sub_020039B0(v0->unk_0C, 0, (0 * 16 + 9), 1, 0, 0x0); - sub_020039B0(v0->unk_0C, 2, v0->unk_921 * 16, 16, 0, 0x0); + PaletteData_Blend(v0->unk_0C, 0, (0 * 16 + 9), 1, 0, 0x0); + PaletteData_Blend(v0->unk_0C, 2, v0->unk_921 * 16, 16, 0, 0x0); *param1 = 2; break; } @@ -648,11 +648,11 @@ int ov113_0225CDFC(OverlayManager *param0, int *param1) Heap_FreeToHeap(v0->unk_08); sub_0200D0B0(v0->unk_1C, v0->unk_20); sub_0200C8D4(v0->unk_1C); - sub_02002FA0(v0->unk_0C, 0); - sub_02002FA0(v0->unk_0C, 1); - sub_02002FA0(v0->unk_0C, 2); - sub_02002FA0(v0->unk_0C, 3); - sub_02002F54(v0->unk_0C); + PaletteData_FreeBuffer(v0->unk_0C, 0); + PaletteData_FreeBuffer(v0->unk_0C, 1); + PaletteData_FreeBuffer(v0->unk_0C, 2); + PaletteData_FreeBuffer(v0->unk_0C, 3); + PaletteData_Free(v0->unk_0C); ov113_0225DAFC(v0); ov113_0225DA9C(v0); @@ -694,7 +694,7 @@ static void ov113_0225CF18(void *param0) sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_0C); + PaletteData_CommitFadedBuffers(v0->unk_0C); Bg_RunScheduledUpdates(v0->unk_08); OS_SetIrqCheckFlag(OS_IE_V_BLANK); @@ -889,14 +889,14 @@ static void ov113_0225D160(UnkStruct_ov113_0225DBCC *param0, NARC *param1) BgConfig *v0 = param0->unk_08; u16 *v1; - PaletteSys_LoadPalette(param0->unk_0C, 187, 19, 118, 0, 0x200 - 0x40, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 187, 19, 118, 0, 0x200 - 0x40, 0); sub_020070E8(param1, 18, param0->unk_08, 2, 0, 0, 0, 118); sub_0200710C(param1, 17, param0->unk_08, 2, 0, 0, 0, 118); sub_0200710C(param1, 20, param0->unk_08, 3, 0, 0, 0, 118); - PaletteSys_LoadPalette(param0->unk_0C, 187, 23, 118, 1, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 187, 23, 118, 1, 0, 0); if (param0->unk_00->unk_04 == 0) { - sub_02003120(param0->unk_0C, 1, 16 * 1, 1, 16 * 0, 0x20); + PaletteData_CopyBuffer(param0->unk_0C, 1, 16 * 1, 1, 16 * 0, 0x20); } sub_020070E8(param1, 22, param0->unk_08, 6, 0, 0, 0, 118); @@ -912,14 +912,14 @@ static void ov113_0225D160(UnkStruct_ov113_0225DBCC *param0, NARC *param1) int v2; v2 = Options_Frame(SaveData_Options(param0->unk_04)); - PaletteSys_LoadPalette(param0->unk_0C, 38, sub_0200DD08(v2), 118, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 38, sub_0200DD08(v2), 118, 0, 0x20, 14 * 16); sub_0200DD0C(param0->unk_08, 1, 1, 14, v2, 118); - PaletteSys_LoadPalette(param0->unk_0C, 14, 6, 118, 0, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 14, 6, 118, 0, 0x20, 13 * 16); if (param0->unk_00->unk_04 == 0) { - PaletteSys_LoadPalette(param0->unk_0C, 14, 6, 118, 1, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 14, 6, 118, 1, 0x20, 13 * 16); } else { - PaletteSys_LoadPalette(param0->unk_0C, 187, 25, 118, 1, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 187, 25, 118, 1, 0x20, 13 * 16); } } @@ -951,7 +951,7 @@ static void ov113_0225D304(UnkStruct_ov113_0225DBCC *param0, NARC *param1) v2 = 0x7fff; } - sub_020038B0(param0->unk_0C, 2, 2, v2, v1 * 16, v1 * 16 + 16); + PaletteData_FillBufferRange(param0->unk_0C, 2, 2, v2, v1 * 16, v1 * 16 + 16); SpriteRenderer_LoadCharResObjFromOpenNarc(param0->unk_1C, param0->unk_20, param1, 2, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 10008); SpriteRenderer_LoadCellResObjFromOpenNarc(param0->unk_1C, param0->unk_20, param1, 1, 0, 10003); SpriteRenderer_LoadAnimResObjFromOpenNarc(param0->unk_1C, param0->unk_20, param1, 0, 0, 10003); @@ -1084,8 +1084,8 @@ static void ov113_0225D7CC(UnkStruct_ov113_0225DBCC *param0) u16 *v2, *v3; int v4 = 0; - v2 = sub_02003164(param0->unk_0C, 2); - v3 = sub_0200316C(param0->unk_0C, 2); + v2 = PaletteData_GetUnfadedBuffer(param0->unk_0C, 2); + v3 = PaletteData_GetFadedBuffer(param0->unk_0C, 2); for (v0 = 0; v0 < 6; v0++) { if ((param0->unk_8D8[v0].unk_02 == 0) || (param0->unk_8D8[v0].unk_02 > NATIONAL_DEX_COUNT)) { @@ -1102,7 +1102,7 @@ static void ov113_0225D7CC(UnkStruct_ov113_0225DBCC *param0) v2[1 * 16 + 1 + v0] = param0->unk_8D8[v0].unk_00; v3[1 * 16 + 1 + v0] = param0->unk_8D8[v0].unk_00; - sub_0200393C(&v2[1 * 16 + 1 + v0], &v2[2 * 16 + 1 + v0], 1, 12, 0x0); + BlendPalette(&v2[1 * 16 + 1 + v0], &v2[2 * 16 + 1 + v0], 1, 12, 0x0); v3[2 * 16 + 1 + v0] = v2[2 * 16 + 1 + v0]; if (v4 == 0) { @@ -1363,7 +1363,7 @@ BOOL ov113_0225DDC0(UnkStruct_ov113_0225DBCC *param0, const UnkStruct_ov113_0226 param0->unk_9AC[v1] = param1->unk_00; ov113_0225D938(param1->unk_02, param1->unk_08, param0->unk_970[v1], param0->unk_160, param0->unk_164, NNS_G2D_VRAM_TYPE_2DSUB, param0->unk_19E0); SpriteActor_EnableObject(param0->unk_970[v1], 1); - sub_020038B0(param0->unk_0C, 1, 2, param1->unk_00, (2 * 16 + 1) + v1, (2 * 16 + 1) + v1 + 1); + PaletteData_FillBufferRange(param0->unk_0C, 1, 2, param1->unk_00, (2 * 16 + 1) + v1, (2 * 16 + 1) + v1 + 1); } } @@ -1479,11 +1479,11 @@ static void ov113_0225E0D4(UnkStruct_ov113_0225DBCC *param0, int param1) { u16 *v0, *v1; - v0 = sub_02003164(param0->unk_0C, 2); - v1 = sub_0200316C(param0->unk_0C, 2); + v0 = PaletteData_GetUnfadedBuffer(param0->unk_0C, 2); + v1 = PaletteData_GetFadedBuffer(param0->unk_0C, 2); MI_CpuCopy16(&v0[1 * 16 + 1], &v1[1 * 16 + 1], 6 * 2); - sub_0200393C(&v0[1 * 16 + 1 + param1], &v1[1 * 16 + 1 + param1], 1, 6, 0x0); + BlendPalette(&v0[1 * 16 + 1 + param1], &v1[1 * 16 + 1 + param1], 1, 6, 0x0); } static void ov113_0225E118(UnkStruct_ov113_0225DBCC *param0) diff --git a/src/overlay116/ov116_022604C4.c b/src/overlay116/ov116_022604C4.c index 256edfc492..9f53161123 100644 --- a/src/overlay116/ov116_022604C4.c +++ b/src/overlay116/ov116_022604C4.c @@ -74,7 +74,7 @@ static void ov116_022604C4(UnkStruct_ov116_0226139C *param0) void *v1 = sub_020394A8(106); NNS_G2dGetUnpackedPaletteData(v1, &v0); - sub_02002FBC(param0->unk_48.unk_14, v0->pRawData, 2, 14 * 16, 32); + PaletteData_LoadBuffer(param0->unk_48.unk_14, v0->pRawData, 2, 14 * 16, 32); Heap_FreeToHeap(v1); } @@ -227,7 +227,7 @@ static void ov116_022604C4(UnkStruct_ov116_0226139C *param0) } param0->unk_7C = ov114_0225CAD4(sub_0200D9B0(param0->unk_48.unk_0C), 106); - sub_02003070(param0->unk_48.unk_14, 2, 0 * 16, 16 * 0x20); + PaletteData_LoadBufferFromHardware(param0->unk_48.unk_14, 2, 0 * 16, 16 * 0x20); if (param0->unk_80->unk_3C) { ov4_021D1E74(106); @@ -763,17 +763,17 @@ static void ov116_022612CC(UnkStruct_ov116_0226139C *param0) param0->unk_48.unk_00 = NARC_ctor(NARC_INDEX_ARC__MANENE, 106); param0->unk_48.unk_04 = NARC_ctor(NARC_INDEX_GRAPHIC__BUCKET, 106); param0->unk_48.unk_10 = BgConfig_New(106); - param0->unk_48.unk_14 = sub_02002F38(106); + param0->unk_48.unk_14 = PaletteData_New(106); param0->unk_48.unk_18 = sub_02024220(106, 0, 1, 0, 4, NULL); param0->unk_48.camera = Camera_Alloc(106); ov116_02261C88(param0); - sub_02003858(param0->unk_48.unk_14, 1); - sub_02002F70(param0->unk_48.unk_14, 0, 0x200, 106); - sub_02002F70(param0->unk_48.unk_14, 1, 0x200, 106); - sub_02002F70(param0->unk_48.unk_14, 2, 0x200, 106); - sub_02002F70(param0->unk_48.unk_14, 3, 0x200, 106); + PaletteData_SetAutoTransparent(param0->unk_48.unk_14, 1); + PaletteData_AllocBuffer(param0->unk_48.unk_14, 0, 0x200, 106); + PaletteData_AllocBuffer(param0->unk_48.unk_14, 1, 0x200, 106); + PaletteData_AllocBuffer(param0->unk_48.unk_14, 2, 0x200, 106); + PaletteData_AllocBuffer(param0->unk_48.unk_14, 3, 0x200, 106); ov116_02261494(param0->unk_48.unk_10); ov116_022616CC(param0); @@ -818,11 +818,11 @@ void ov116_0226139C(UnkStruct_ov116_0226139C *param0) Bg_FreeTilemapBuffer(param0->unk_48.unk_10, 6); Bg_FreeTilemapBuffer(param0->unk_48.unk_10, 7); Heap_FreeToHeap(param0->unk_48.unk_10); - sub_02002FA0(param0->unk_48.unk_14, 0); - sub_02002FA0(param0->unk_48.unk_14, 1); - sub_02002FA0(param0->unk_48.unk_14, 2); - sub_02002FA0(param0->unk_48.unk_14, 3); - sub_02002F54(param0->unk_48.unk_14); + PaletteData_FreeBuffer(param0->unk_48.unk_14, 0); + PaletteData_FreeBuffer(param0->unk_48.unk_14, 1); + PaletteData_FreeBuffer(param0->unk_48.unk_14, 2); + PaletteData_FreeBuffer(param0->unk_48.unk_14, 3); + PaletteData_Free(param0->unk_48.unk_14); NARC_dtor(param0->unk_48.unk_00); NARC_dtor(param0->unk_48.unk_04); sub_020242C4(param0->unk_48.unk_18); @@ -1109,7 +1109,7 @@ static void ov116_02261794(void *param0) sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_48.unk_14); + PaletteData_CommitFadedBuffers(v0->unk_48.unk_14); Bg_RunScheduledUpdates(v0->unk_48.unk_10); OS_SetIrqCheckFlag(OS_IE_V_BLANK); diff --git a/src/overlay116/ov116_02261870.c b/src/overlay116/ov116_02261870.c index 32650ff709..e02e50e68b 100644 --- a/src/overlay116/ov116_02261870.c +++ b/src/overlay116/ov116_02261870.c @@ -456,7 +456,7 @@ void ov116_02262034(UnkStruct_ov116_0226139C *param0, int param1) int v2; for (v2 = 0; v2 < 4; v2++) { - sub_02002FEC(v0, 164, 73, 106, 1, 0x20, (v2 + 1) * 16, v1[param0->unk_04->unk_04 - 1][param1][v2 + 1] * 16); + PaletteData_LoadBufferFromFile(v0, 164, 73, 106, 1, 0x20, (v2 + 1) * 16, v1[param0->unk_04->unk_04 - 1][param1][v2 + 1] * 16); } } } @@ -828,14 +828,14 @@ void ov116_022628B8(UnkStruct_ov116_0226139C *param0) sub_0200710C(v6, 76, v2, 5, 0, 0, 0, 106); sub_0200710C(v6, 77, v2, 6, 0, 0, 0, 106); sub_0200710C(v6, 78, v2, 7, 0, 0, 0, 106); - PaletteSys_LoadPalette(v5, 164, 73, 106, 1, 0x20 * 5, 0); + PaletteData_LoadBufferFromFileStart(v5, 164, 73, 106, 1, 0x20 * 5, 0); sub_020070E8(v6, 5, v2, 3, 0, 0, 0, 106); sub_020070E8(v6, 8, v2, 1, 0, 0, 0, 106); sub_0200710C(v6, 7, v2, 3, 0, 0, 0, 106); sub_0200710C(v6, 9, v2, 1, 0, 0, 0, 106); sub_0200710C(v6, 10, v2, 2, 0, 0, 0, 106); - PaletteSys_LoadPalette(v5, 164, 6, 106, 0, 0x20, 0); - PaletteSys_LoadPalette(v5, 14, 7, 106, 1, 0x20, 14 * 16); - PaletteSys_LoadPalette(v5, 38, Window_FramePalette(), 106, 1, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(v5, 164, 6, 106, 0, 0x20, 0); + PaletteData_LoadBufferFromFileStart(v5, 14, 7, 106, 1, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(v5, 38, Window_FramePalette(), 106, 1, 0x20, 13 * 16); sub_0200DAA4(v2, 7, 180, 13, 0, 106); } diff --git a/src/overlay116/ov116_0226432C.c b/src/overlay116/ov116_0226432C.c index 0808d4ecc5..1c76ae456d 100644 --- a/src/overlay116/ov116_0226432C.c +++ b/src/overlay116/ov116_0226432C.c @@ -628,8 +628,8 @@ static void ov116_0226501C(UnkStruct_ov116_02265470 *param0) param0->unk_00++; } - sub_02003A2C(v3, 0, 0x1, *v1 + *v2, 0x0); - sub_02003A2C(v3, 1, 0x1, *v1 + *v2, 0x0); + PaletteData_BlendMulti(v3, 0, 0x1, *v1 + *v2, 0x0); + PaletteData_BlendMulti(v3, 1, 0x1, *v1 + *v2, 0x0); break; case 1: @@ -655,8 +655,8 @@ static void ov116_0226501C(UnkStruct_ov116_02265470 *param0) param0->unk_00++; } - sub_02003A2C(v3, 0, 0x1, *v1 + *v2, 0x0); - sub_02003A2C(v3, 1, 0x1, *v1 + *v2, 0x0); + PaletteData_BlendMulti(v3, 0, 0x1, *v1 + *v2, 0x0); + PaletteData_BlendMulti(v3, 1, 0x1, *v1 + *v2, 0x0); break; default: @@ -993,8 +993,8 @@ static void ov116_022655DC(UnkStruct_ov116_022660A8 *param0) *v1 = 6; } - sub_02003A2C(param0->unk_30->unk_14, 0, 0x1, *v0 + *v1, 0x0); - sub_02003A2C(param0->unk_30->unk_14, 1, 0x1, *v0 + *v1, 0x0); + PaletteData_BlendMulti(param0->unk_30->unk_14, 0, 0x1, *v0 + *v1, 0x0); + PaletteData_BlendMulti(param0->unk_30->unk_14, 1, 0x1, *v0 + *v1, 0x0); } static void ov116_02265754(UnkStruct_ov116_022660A8 *param0) @@ -1039,8 +1039,8 @@ static void ov116_02265754(UnkStruct_ov116_022660A8 *param0) *v1 = 0; } - sub_02003A2C(param0->unk_30->unk_14, 0, 0x1, *v0 + *v1, 0x0); - sub_02003A2C(param0->unk_30->unk_14, 1, 0x1, *v0 + *v1, 0x0); + PaletteData_BlendMulti(param0->unk_30->unk_14, 0, 0x1, *v0 + *v1, 0x0); + PaletteData_BlendMulti(param0->unk_30->unk_14, 1, 0x1, *v0 + *v1, 0x0); } static int ov116_022658C8(int param0) diff --git a/src/overlay117/ov117_02260668.c b/src/overlay117/ov117_02260668.c index f83d6b8f1b..a05bf96acc 100644 --- a/src/overlay117/ov117_02260668.c +++ b/src/overlay117/ov117_02260668.c @@ -201,13 +201,13 @@ int ov117_02260668(OverlayManager *param0, int *param1) v0->unk_98 = ov117_02260E14(110); v0->unk_00 = OverlayManager_Args(param0); ov117_022665FC(v0); - v0->unk_8C = sub_02002F38(110); + v0->unk_8C = PaletteData_New(110); - sub_02003858(v0->unk_8C, 1); - sub_02002F70(v0->unk_8C, 0, 0x200, 110); - sub_02002F70(v0->unk_8C, 1, 0x200, 110); - sub_02002F70(v0->unk_8C, 2, (((16 - 2) * 16) * sizeof(u16)), 110); - sub_02002F70(v0->unk_8C, 3, 0x200, 110); + PaletteData_SetAutoTransparent(v0->unk_8C, 1); + PaletteData_AllocBuffer(v0->unk_8C, 0, 0x200, 110); + PaletteData_AllocBuffer(v0->unk_8C, 1, 0x200, 110); + PaletteData_AllocBuffer(v0->unk_8C, 2, (((16 - 2) * 16) * sizeof(u16)), 110); + PaletteData_AllocBuffer(v0->unk_8C, 3, 0x200, 110); v0->unk_2C = BgConfig_New(110); @@ -251,8 +251,8 @@ int ov117_02260668(OverlayManager *param0, int *param1) NARC_dtor(v1); } - PaletteSys_LoadPalette(v0->unk_8C, 14, 6, 110, 0, 0x20, 0xe * 16); - PaletteSys_LoadPalette(v0->unk_8C, 14, 6, 110, 1, 0x20, 5 * 16); + PaletteData_LoadBufferFromFileStart(v0->unk_8C, 14, 6, 110, 0, 0x20, 0xe * 16); + PaletteData_LoadBufferFromFileStart(v0->unk_8C, 14, 6, 110, 1, 0x20, 5 * 16); ov117_022613EC(v0); ov117_022614AC(v0, 0); ov117_02261368(v0); @@ -281,7 +281,7 @@ int ov117_02260668(OverlayManager *param0, int *param1) int v2; v2 = ov114_0225CB74(v0->unk_1C); - sub_02003070(v0->unk_8C, 2, v2 * 16, 3 * 0x20); + PaletteData_LoadBufferFromHardware(v0->unk_8C, 2, v2 * 16, 3 * 0x20); } SetMainCallback(ov117_02260DA0, v0); @@ -464,11 +464,11 @@ int ov117_02260C10(OverlayManager *param0, int *param1) sub_0200D0B0(v0->unk_24, v0->unk_28); sub_0200C8D4(v0->unk_24); sub_0201DC3C(); - sub_02002FA0(v0->unk_8C, 0); - sub_02002FA0(v0->unk_8C, 1); - sub_02002FA0(v0->unk_8C, 2); - sub_02002FA0(v0->unk_8C, 3); - sub_02002F54(v0->unk_8C); + PaletteData_FreeBuffer(v0->unk_8C, 0); + PaletteData_FreeBuffer(v0->unk_8C, 1); + PaletteData_FreeBuffer(v0->unk_8C, 2); + PaletteData_FreeBuffer(v0->unk_8C, 3); + PaletteData_Free(v0->unk_8C); Strbuf_Free(v0->unk_88); StringTemplate_Free(v0->unk_84); MessageLoader_Free(v0->unk_80); @@ -498,7 +498,7 @@ static void ov117_02260DA0(void *param0) sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_8C); + PaletteData_CommitFadedBuffers(v0->unk_8C); if (v0->unk_1428.unk_2C == 1) { Bg_ToggleLayer(7, 1); @@ -1048,12 +1048,12 @@ static void ov117_022619F8(UnkStruct_ov117_02261280 *param0) static void ov117_02261A2C(UnkStruct_ov117_02261280 *param0, NARC *param1) { - PaletteSys_LoadPalette(param0->unk_8C, 173, 4, 110, 0, 0, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_8C, 173, 4, 110, 0, 0, 0); sub_020070E8(param1, 2, param0->unk_2C, 3, 0, 0, 0, 110); sub_0200710C(param1, 3, param0->unk_2C, 3, 0, 0, 0, 110); sub_020070E8(param1, 0, param0->unk_2C, 2, 0, 0, 0, 110); sub_0200710C(param1, 1, param0->unk_2C, 2, 0, 0, 0, 110); - sub_020038B0(param0->unk_8C, 0, 2, 0x0, 0, 1); + PaletteData_FillBufferRange(param0->unk_8C, 0, 2, 0x0, 0, 1); } static void ov117_02261AC4(UnkStruct_ov117_02261280 *param0) @@ -1063,8 +1063,8 @@ static void ov117_02261AC4(UnkStruct_ov117_02261280 *param0) static void ov117_02261AC8(UnkStruct_ov117_02261280 *param0, NARC *param1) { - PaletteSys_LoadPalette(param0->unk_8C, 173, 5, 110, 1, 5 * 0x20, 0); - sub_02002FEC(param0->unk_8C, 173, 6, 110, 1, (0x20 * 10), 6 * 16, 6 * 16); + PaletteData_LoadBufferFromFileStart(param0->unk_8C, 173, 5, 110, 1, 5 * 0x20, 0); + PaletteData_LoadBufferFromFile(param0->unk_8C, 173, 6, 110, 1, (0x20 * 10), 6 * 16, 6 * 16); sub_020070E8(param1, 13, param0->unk_2C, 6, 0, 0, 0, 110); sub_0200710C(param1, 14, param0->unk_2C, 6, 0, 0, 0, 110); sub_020070E8(param1, 18, param0->unk_2C, 5, 0, 0, 0, 110); @@ -1088,8 +1088,8 @@ static void ov117_02261AC8(UnkStruct_ov117_02261280 *param0, NARC *param1) ov117_02264AB0(param0); sub_0200DAA4(param0->unk_2C, 4, ((((((0x8000 - 0x2000) / 32) + (10 * 2)) + (10 * 2)) + (10 * 2)) + (10 * 2)), 6, 0, 110); - sub_02003070(param0->unk_8C, 1, 6 * 16, 0x20); - sub_020038B0(param0->unk_8C, 1, 2, 0x0, 0, 1); + PaletteData_LoadBufferFromHardware(param0->unk_8C, 1, 6 * 16, 0x20); + PaletteData_FillBufferRange(param0->unk_8C, 1, 2, 0x0, 0, 1); } static void ov117_02261C28(UnkStruct_ov117_02261280 *param0) diff --git a/src/overlay117/ov117_022626B0.c b/src/overlay117/ov117_022626B0.c index fae52b8919..4baa60ef4e 100644 --- a/src/overlay117/ov117_022626B0.c +++ b/src/overlay117/ov117_022626B0.c @@ -465,7 +465,7 @@ static void ov117_02262C60(UnkStruct_ov117_022626B0 *param0, int param1) v0 = 16; } - sub_0200393C(param0->unk_24C, param0->unk_250, param0->unk_254 / 2, v0, 0x1f); + BlendPalette(param0->unk_24C, param0->unk_250, param0->unk_254 / 2, v0, 0x1f); DC_FlushRange(param0->unk_250, param0->unk_254); param0->unk_276 = 1; diff --git a/src/overlay117/ov117_02263AF0.c b/src/overlay117/ov117_02263AF0.c index 02b2bf2aa8..be19b2e0d8 100644 --- a/src/overlay117/ov117_02263AF0.c +++ b/src/overlay117/ov117_02263AF0.c @@ -1241,7 +1241,7 @@ void ov117_02264AF0(UnkStruct_ov117_02261280 *param0) v4 = Unk_ov117_02266B72[v2]; for (v1 = 0; v1 < 3; v1++) { - v0[v2][v1] = sub_02003910(param0->unk_8C, 1, 1, v4 + v1); + v0[v2][v1] = PaletteData_GetBufferIndexColor(param0->unk_8C, 1, 1, v4 + v1); } } @@ -1253,8 +1253,8 @@ void ov117_02264AF0(UnkStruct_ov117_02261280 *param0) } } - v8 = sub_02003164(param0->unk_8C, 1); - v9 = sub_0200316C(param0->unk_8C, 1); + v8 = PaletteData_GetUnfadedBuffer(param0->unk_8C, 1); + v9 = PaletteData_GetFadedBuffer(param0->unk_8C, 1); for (v1 = 0; v1 < param0->unk_00->unk_30; v1++) { v4 = v1; @@ -1282,7 +1282,7 @@ void ov117_02264BF8(UnkStruct_ov117_02261280 *param0) v4 = Unk_ov117_02266B8A[v2]; for (v1 = 0; v1 < 16; v1++) { - v0[v2][v1] = sub_02003910(param0->unk_8C, 3, 1, v10 * 16 + v4 + v1); + v0[v2][v1] = PaletteData_GetBufferIndexColor(param0->unk_8C, 3, 1, v10 * 16 + v4 + v1); } } @@ -1294,8 +1294,8 @@ void ov117_02264BF8(UnkStruct_ov117_02261280 *param0) } } - v8 = sub_02003164(param0->unk_8C, 3); - v9 = sub_0200316C(param0->unk_8C, 3); + v8 = PaletteData_GetUnfadedBuffer(param0->unk_8C, 3); + v9 = PaletteData_GetFadedBuffer(param0->unk_8C, 3); for (v1 = 0; v1 < param0->unk_00->unk_30; v1++) { v4 = v1; @@ -1323,7 +1323,7 @@ void ov117_02264D1C(UnkStruct_ov117_02261280 *param0) v4 = Unk_ov117_02266B82[v2]; for (v1 = 0; v1 < 1; v1++) { - v0[v2][v1] = sub_02003910(param0->unk_8C, 3, 1, v10 * 16 + v4 + v1); + v0[v2][v1] = PaletteData_GetBufferIndexColor(param0->unk_8C, 3, 1, v10 * 16 + v4 + v1); } } @@ -1335,8 +1335,8 @@ void ov117_02264D1C(UnkStruct_ov117_02261280 *param0) } } - v8 = sub_02003164(param0->unk_8C, 3); - v9 = sub_0200316C(param0->unk_8C, 3); + v8 = PaletteData_GetUnfadedBuffer(param0->unk_8C, 3); + v9 = PaletteData_GetFadedBuffer(param0->unk_8C, 3); for (v1 = 0; v1 < param0->unk_00->unk_30; v1++) { v4 = v1; diff --git a/src/overlay119/ov119_021D0D80.c b/src/overlay119/ov119_021D0D80.c index f462a36ee0..f8f6c88f38 100644 --- a/src/overlay119/ov119_021D0D80.c +++ b/src/overlay119/ov119_021D0D80.c @@ -243,7 +243,7 @@ void ov119_021D0FD0(void *param0) sub_02008A94(v0->unk_04.unk_38); sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_04.unk_04); + PaletteData_CommitFadedBuffers(v0->unk_04.unk_04); Bg_RunScheduledUpdates(v0->unk_04.unk_00); OS_SetIrqCheckFlag(OS_IE_V_BLANK); @@ -282,10 +282,10 @@ void ov119_021D1068(BgConfig *param0, PaletteData *param1, int param2) int v0 = 71; sub_0200DD0C(param0, 1, 20, 15, param2, v0); - PaletteSys_LoadPalette(param1, 38, sub_0200DD08(param2), v0, 0, 0x20, 12 * 16); + PaletteData_LoadBufferFromFileStart(param1, 38, sub_0200DD08(param2), v0, 0, 0x20, 12 * 16); sub_0200DAA4(param0, 1, (20 + (18 + 12)), 13, 0, v0); - PaletteSys_LoadPalette(param1, 38, Window_FramePalette(), v0, 0, 0x20, 13 * 16); - PaletteSys_LoadPalette(param1, 14, 7, v0, 0, 0x20, 14 * 16); + PaletteData_LoadBufferFromFileStart(param1, 38, Window_FramePalette(), v0, 0, 0x20, 13 * 16); + PaletteData_LoadBufferFromFileStart(param1, 14, 7, v0, 0, 0x20, 14 * 16); } void ov119_021D10F0(BgConfig *param0, Window *param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8) @@ -389,7 +389,7 @@ void ov119_021D1308(BgConfig *param0, PaletteData *param1) sub_02006E3C(v0, v1, param0, v4, 0, 0, 1, v5); sub_02006E60(v0, v2, param0, v4, 0, 0, 1, v5); - PaletteSys_LoadPalette(param1, v0, v3, v5, 0, 0x20 * 2, 0); + PaletteData_LoadBufferFromFileStart(param1, v0, v3, v5, 0, 0x20 * 2, 0); } void ov119_021D135C(BgConfig *param0, PaletteData *param1) @@ -403,7 +403,7 @@ void ov119_021D135C(BgConfig *param0, PaletteData *param1) sub_02006E3C(v0, v1, param0, v4, 0, 0, 1, v5); sub_02006E60(v0, v2, param0, v4, 0, 0, 1, v5); - PaletteSys_LoadPalette(param1, v0, v3, v5, 1, 0x20 * 1, 0); + PaletteData_LoadBufferFromFileStart(param1, v0, v3, v5, 1, 0x20 * 1, 0); } static u32 ov119_021D13B4(u32 param0, BOOL param1) diff --git a/src/overlay119/ov119_021D191C.c b/src/overlay119/ov119_021D191C.c index f41e6ea38f..740251dd6e 100644 --- a/src/overlay119/ov119_021D191C.c +++ b/src/overlay119/ov119_021D191C.c @@ -545,7 +545,7 @@ static BOOL ov119_021D1FAC(UnkStruct_ov119_021D0FD0 *param0) if ((++param0->unk_64) >= 10) { param0->unk_64 = 0; - sub_02003178(param0->unk_04.unk_04, 0x1, 0xFFFF, 0, 0, 16, 0xFFFF); + PaletteData_StartFade(param0->unk_04.unk_04, 0x1, 0xFFFF, 0, 0, 16, 0xFFFF); { NNSG2dImagePaletteProxy *v1; @@ -554,7 +554,7 @@ static BOOL ov119_021D1FAC(UnkStruct_ov119_021D0FD0 *param0) v1 = CellActor_GetPaletteProxy(param0->unk_78->unk_00); v2 = sub_0201FAB4(v1, NNS_G2D_VRAM_TYPE_2DMAIN); - sub_02003178(param0->unk_04.unk_04, 0x4, 0xFFFF ^ (1 << v2), 0, 0, 16, 0xFFFF); + PaletteData_StartFade(param0->unk_04.unk_04, 0x4, 0xFFFF ^ (1 << v2), 0, 0, 16, 0xFFFF); } sub_020086FC(param0->unk_70, 0, 16, 0, 0xFFFF); @@ -581,7 +581,7 @@ static BOOL ov119_021D1FAC(UnkStruct_ov119_021D0FD0 *param0) v5++; } - if ((sub_0200384C(param0->unk_04.unk_04) != 0) || (v5 != 2) || (sub_020087B4(param0->unk_70) != 0)) { + if ((PaletteData_GetSelectedBuffersMask(param0->unk_04.unk_04) != 0) || (v5 != 2) || (sub_020087B4(param0->unk_70) != 0)) { break; } @@ -598,14 +598,14 @@ static BOOL ov119_021D1FAC(UnkStruct_ov119_021D0FD0 *param0) param0->unk_64 = 0; sub_020086FC(param0->unk_70, 16, 0, 0, 0xFFFF); - sub_02003178(param0->unk_04.unk_04, 0x1, 0xFFFF, 0, 16, 0, 0xFFFF); - sub_02003178(param0->unk_04.unk_04, 0x4, 0xFFFF, 0, 16, 0, 0xFFFF); + PaletteData_StartFade(param0->unk_04.unk_04, 0x1, 0xFFFF, 0, 16, 0, 0xFFFF); + PaletteData_StartFade(param0->unk_04.unk_04, 0x4, 0xFFFF, 0, 16, 0, 0xFFFF); param0->unk_68++; } break; case 5: - if ((sub_0200384C(param0->unk_04.unk_04) != 0) || (sub_020087B4(param0->unk_70) != 0)) { + if ((PaletteData_GetSelectedBuffersMask(param0->unk_04.unk_04) != 0) || (sub_020087B4(param0->unk_70) != 0)) { break; } @@ -651,7 +651,7 @@ static BOOL ov119_021D21BC(UnkStruct_ov119_021D0FD0 *param0) if ((++param0->unk_64) >= 160) { param0->unk_64 = 0; - sub_02003178(param0->unk_04.unk_04, 0x1, 0xFFFF, 0, 0, 16, 0xFFFF); + PaletteData_StartFade(param0->unk_04.unk_04, 0x1, 0xFFFF, 0, 0, 16, 0xFFFF); { NNSG2dImagePaletteProxy *v0; @@ -660,7 +660,7 @@ static BOOL ov119_021D21BC(UnkStruct_ov119_021D0FD0 *param0) v0 = CellActor_GetPaletteProxy(param0->unk_78->unk_00); v1 = sub_0201FAB4(v0, NNS_G2D_VRAM_TYPE_2DMAIN); - sub_02003178(param0->unk_04.unk_04, 0x4, 0xFFFF ^ (1 << v1), 0, 0, 16, 0xFFFF); + PaletteData_StartFade(param0->unk_04.unk_04, 0x4, 0xFFFF ^ (1 << v1), 0, 0, 16, 0xFFFF); } sub_020086FC(param0->unk_70, 0, 16, 0, 0xFFFF); @@ -687,7 +687,7 @@ static BOOL ov119_021D21BC(UnkStruct_ov119_021D0FD0 *param0) v4++; } - if ((sub_0200384C(param0->unk_04.unk_04) != 0) || (v4 != 2) || (sub_020087B4(param0->unk_70) != 0)) { + if ((PaletteData_GetSelectedBuffersMask(param0->unk_04.unk_04) != 0) || (v4 != 2) || (sub_020087B4(param0->unk_70) != 0)) { break; } @@ -705,14 +705,14 @@ static BOOL ov119_021D21BC(UnkStruct_ov119_021D0FD0 *param0) param0->unk_64 = 0; sub_020086FC(param0->unk_70, 16, 0, 0, 0xFFFF); - sub_02003178(param0->unk_04.unk_04, 0x1, 0xFFFF, 0, 16, 0, 0xFFFF); - sub_02003178(param0->unk_04.unk_04, 0x4, 0xFFFF, 0, 16, 0, 0xFFFF); + PaletteData_StartFade(param0->unk_04.unk_04, 0x1, 0xFFFF, 0, 16, 0, 0xFFFF); + PaletteData_StartFade(param0->unk_04.unk_04, 0x4, 0xFFFF, 0, 16, 0, 0xFFFF); param0->unk_68++; } break; case 4: - if ((sub_0200384C(param0->unk_04.unk_04) != 0) || (sub_020087B4(param0->unk_70) != 0)) { + if ((PaletteData_GetSelectedBuffersMask(param0->unk_04.unk_04) != 0) || (sub_020087B4(param0->unk_70) != 0)) { break; } diff --git a/src/palette.c b/src/palette.c index f7c3ac3648..758f9b1aba 100644 --- a/src/palette.c +++ b/src/palette.c @@ -21,7 +21,7 @@ static void sub_02003504(PaletteData *param0, u16 param1, u16 param2); static void sub_02003560(u16 *param0, u16 *param1, PaletteFadeControl *param2, u32 param3); static void sub_020035EC(PaletteData *param0, u8 param1, PaletteFadeControl *param2); -PaletteData *sub_02002F38(int param0) +PaletteData *PaletteData_New(int param0) { PaletteData *v0; @@ -31,19 +31,19 @@ PaletteData *sub_02002F38(int param0) return v0; } -void sub_02002F54(PaletteData *param0) +void PaletteData_Free(PaletteData *param0) { Heap_FreeToHeap(param0); } -void sub_02002F5C(PaletteData *param0, int param1, void *param2, void *param3, u32 param4) +void PaletteData_InitBuffer(PaletteData *param0, int param1, void *param2, void *param3, u32 param4) { param0->buffers[param1].unfaded = (u16 *)param2; param0->buffers[param1].faded = (u16 *)param3; param0->buffers[param1].size = param4; } -void sub_02002F70(PaletteData *param0, int param1, u32 param2, u32 param3) +void PaletteData_AllocBuffer(PaletteData *param0, int param1, u32 param2, u32 param3) { void *v0; void *v1; @@ -51,22 +51,22 @@ void sub_02002F70(PaletteData *param0, int param1, u32 param2, u32 param3) v0 = Heap_AllocFromHeap(param3, param2); v1 = Heap_AllocFromHeap(param3, param2); - sub_02002F5C(param0, param1, v0, v1, param2); + PaletteData_InitBuffer(param0, param1, v0, v1, param2); } -void sub_02002FA0(PaletteData *param0, int param1) +void PaletteData_FreeBuffer(PaletteData *param0, int param1) { Heap_FreeToHeap(param0->buffers[param1].unfaded); Heap_FreeToHeap(param0->buffers[param1].faded); } -void sub_02002FBC(PaletteData *param0, const void *param1, int param2, u16 param3, u16 param4) +void PaletteData_LoadBuffer(PaletteData *param0, const void *param1, int param2, u16 param3, u16 param4) { MI_CpuCopy16(param1, (void *)¶m0->buffers[param2].unfaded[param3], (u32)param4); MI_CpuCopy16(param1, (void *)¶m0->buffers[param2].faded[param3], (u32)param4); } -void sub_02002FEC(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6, u16 param7) +void PaletteData_LoadBufferFromFile(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6, u16 param7) { NNSG2dPaletteData *v0; void *v1; @@ -80,16 +80,16 @@ void sub_02002FEC(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, GF_ASSERT(param6 * sizeof(param6) + param5 <= param0->buffers[param4].size); - sub_02002FBC(param0, &(((u16 *)(v0->pRawData))[param7]), param4, param6, param5); + PaletteData_LoadBuffer(param0, &(((u16 *)(v0->pRawData))[param7]), param4, param6, param5); Heap_FreeToHeap(v1); } -void PaletteSys_LoadPalette(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6) +void PaletteData_LoadBufferFromFileStart(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6) { - sub_02002FEC(param0, bankID, memberIndex, param3, param4, param5, param6, 0); + PaletteData_LoadBufferFromFile(param0, bankID, memberIndex, param3, param4, param5, param6, 0); } -void sub_02003070(PaletteData *param0, int param1, u16 param2, u32 param3) +void PaletteData_LoadBufferFromHardware(PaletteData *param0, int param1, u16 param2, u32 param3) { u16 *v0; @@ -113,10 +113,10 @@ void sub_02003070(PaletteData *param0, int param1, u16 param2, u32 param3) return; } - sub_02002FBC(param0, &v0[param2], param1, param2, param3); + PaletteData_LoadBuffer(param0, &v0[param2], param1, param2, param3); } -void sub_020030E4(u32 param0, u32 param1, u32 param2, u32 param3, u16 param4, void *param5) +void LoadPaletteFromFile(u32 param0, u32 param1, u32 param2, u32 param3, u16 param4, void *param5) { NNSG2dPaletteData *v0; void *v1; @@ -132,23 +132,23 @@ void sub_020030E4(u32 param0, u32 param1, u32 param2, u32 param3, u16 param4, vo Heap_FreeToHeap(v1); } -void sub_02003120(PaletteData *param0, int param1, u16 param2, int param3, u16 param4, u16 param5) +void PaletteData_CopyBuffer(PaletteData *param0, int param1, u16 param2, int param3, u16 param4, u16 param5) { MI_CpuCopy16((void *)¶m0->buffers[param1].unfaded[param2], (void *)¶m0->buffers[param3].unfaded[param4], param5); MI_CpuCopy16((void *)¶m0->buffers[param1].unfaded[param2], (void *)¶m0->buffers[param3].faded[param4], param5); } -u16 *sub_02003164(PaletteData *param0, int param1) +u16 *PaletteData_GetUnfadedBuffer(PaletteData *param0, int param1) { return param0->buffers[param1].unfaded; } -u16 *sub_0200316C(PaletteData *param0, int param1) +u16 *PaletteData_GetFadedBuffer(PaletteData *param0, int param1) { return param0->buffers[param1].faded; } -u8 sub_02003178(PaletteData *param0, u16 param1, u16 param2, s8 param3, u8 param4, u8 param5, u16 param6) +u8 PaletteData_StartFade(PaletteData *param0, u16 param1, u16 param2, s8 param3, u8 param4, u8 param5, u16 param6) { u16 v0; u8 v1; @@ -370,7 +370,7 @@ static void sub_020035EC(PaletteData *param0, u8 param1, PaletteFadeControl *par } } -void sub_02003694(PaletteData *param0) +void PaletteData_CommitFadedBuffers(PaletteData *param0) { if ((param0->autoTransparent == 0) && (param0->selectedFlag != 1)) { return; @@ -461,23 +461,23 @@ void sub_02003694(PaletteData *param0) } } -u16 sub_0200384C(PaletteData *param0) +u16 PaletteData_GetSelectedBuffersMask(PaletteData *param0) { return param0->selectedBuffers; } -void sub_02003858(PaletteData *param0, int param1) +void PaletteData_SetAutoTransparent(PaletteData *param0, int param1) { param0->autoTransparent = param1; } -void sub_0200387C(PaletteData *param0, u8 param1) +void PaletteData_SelectAll(PaletteData *param0, u8 param1) { param0->selectedFlag = param1 & 0x1; param0->selectedBuffers = 0xFFFFFFFF; } -void sub_020038B0(PaletteData *param0, int param1, int param2, u16 param3, u16 param4, u16 param5) +void PaletteData_FillBufferRange(PaletteData *param0, int param1, int param2, u16 param3, u16 param4, u16 param5) { GF_ASSERT(param5 * sizeof(u16) <= param0->buffers[param1].size); @@ -490,7 +490,7 @@ void sub_020038B0(PaletteData *param0, int param1, int param2, u16 param3, u16 p } } -u16 sub_02003910(PaletteData *param0, int param1, int param2, u16 param3) +u16 PaletteData_GetBufferIndexColor(PaletteData *param0, int param1, int param2, u16 param3) { if (param2 == 1) { return param0->buffers[param1].unfaded[param3]; @@ -504,7 +504,7 @@ u16 sub_02003910(PaletteData *param0, int param1, int param2, u16 param3) return 0; } -void sub_0200393C(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4) +void BlendPalette(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4) { u16 v0; int v1, v2, v3; @@ -523,19 +523,19 @@ void sub_0200393C(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 par } } -void sub_020039B0(PaletteData *param0, int param1, u16 param2, u16 param3, u8 param4, u16 param5) +void PaletteData_Blend(PaletteData *param0, int param1, u16 param2, u16 param3, u8 param4, u16 param5) { GF_ASSERT(param0->buffers[param1].unfaded != NULL && param0->buffers[param1].faded != NULL); - sub_0200393C(¶m0->buffers[param1].unfaded[param2], ¶m0->buffers[param1].faded[param2], param3, param4, param5); + BlendPalette(¶m0->buffers[param1].unfaded[param2], ¶m0->buffers[param1].faded[param2], param3, param4, param5); } -void sub_020039F8(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4) +void BlendPalettes(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4) { int v0 = 0; while (param2) { if (param2 & 1) { - sub_0200393C(¶m0[v0], ¶m1[v0], 16, param3, param4); + BlendPalette(¶m0[v0], ¶m1[v0], 16, param3, param4); } param2 >>= 1; @@ -543,7 +543,7 @@ void sub_020039F8(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 par } } -void sub_02003A2C(PaletteData *param0, int param1, u16 param2, u8 param3, u16 param4) +void PaletteData_BlendMulti(PaletteData *param0, int param1, u16 param2, u8 param3, u16 param4) { int v0 = 0; @@ -551,7 +551,7 @@ void sub_02003A2C(PaletteData *param0, int param1, u16 param2, u8 param3, u16 pa while (param2) { if (param2 & 1) { - sub_020039B0(param0, param1, v0, 16, param3, param4); + PaletteData_Blend(param0, param1, v0, 16, param3, param4); } param2 >>= 1; @@ -559,7 +559,7 @@ void sub_02003A2C(PaletteData *param0, int param1, u16 param2, u8 param3, u16 pa } } -void sub_02003A8C(u16 *param0, int param1, int param2, int param3, int param4) +void TintPalette(u16 *param0, int param1, int param2, int param3, int param4) { int v0, v1, v2, v3; u32 v4; @@ -592,7 +592,7 @@ void sub_02003A8C(u16 *param0, int param1, int param2, int param3, int param4) } } -void sub_02003B08(PaletteData *param0, u32 param1, u32 param2, u32 param3, int param4, u32 param5, u16 param6, int param7, int param8, int param9) +void PaletteData_TintFromFile(PaletteData *param0, u32 param1, u32 param2, u32 param3, int param4, u32 param5, u16 param6, int param7, int param8, int param9) { NNSG2dPaletteData *v0; void *v1; @@ -604,7 +604,7 @@ void sub_02003B08(PaletteData *param0, u32 param1, u32 param2, u32 param3, int p param5 = v0->szByte; } - sub_02003A8C(v0->pRawData, 16, param7, param8, param9); - sub_02002FBC(param0, v0->pRawData, param4, param6, param5); + TintPalette(v0->pRawData, 16, param7, param8, param9); + PaletteData_LoadBuffer(param0, v0->pRawData, param4, param6, param5); Heap_FreeToHeap(v1); } diff --git a/src/unk_0200762C.c b/src/unk_0200762C.c index 6bbb76a296..79e7f729fb 100644 --- a/src/unk_0200762C.c +++ b/src/unk_0200762C.c @@ -1394,10 +1394,10 @@ static void sub_02008FC8(UnkStruct_02007768 *param0) v6 = 1; param0->unk_00[v1].unk_24.unk_26 = param0->unk_00[v1].unk_24.unk_27; - sub_0200393C((void *)¶m0->unk_304[0x10 * v1], (void *)¶m0->unk_300[0x10 * v1], 16, param0->unk_00[v1].unk_24.unk_24, param0->unk_00[v1].unk_24.unk_28); + BlendPalette((void *)¶m0->unk_304[0x10 * v1], (void *)¶m0->unk_300[0x10 * v1], 16, param0->unk_00[v1].unk_24.unk_24, param0->unk_00[v1].unk_24.unk_28); if (param0->unk_00[v1].unk_6C.unk_00_0) { - sub_0200393C((void *)¶m0->unk_304[0x10 * (3 + param0->unk_00[v1].unk_6C.unk_00_0)], (void *)¶m0->unk_300[0x10 * (3 + param0->unk_00[v1].unk_6C.unk_00_0)], 16, param0->unk_00[v1].unk_24.unk_24, param0->unk_00[v1].unk_24.unk_28); + BlendPalette((void *)¶m0->unk_304[0x10 * (3 + param0->unk_00[v1].unk_6C.unk_00_0)], (void *)¶m0->unk_300[0x10 * (3 + param0->unk_00[v1].unk_6C.unk_00_0)], 16, param0->unk_00[v1].unk_24.unk_24, param0->unk_00[v1].unk_24.unk_28); } if (param0->unk_00[v1].unk_24.unk_24 == param0->unk_00[v1].unk_24.unk_25) { diff --git a/src/unk_0200C6E4.c b/src/unk_0200C6E4.c index a5c3025171..5173c99073 100644 --- a/src/unk_0200C6E4.c +++ b/src/unk_0200C6E4.c @@ -460,7 +460,7 @@ u8 sub_0200CD7C(PaletteData *param0, int param1, SpriteRenderer *param2, SpriteG v0 = sub_0200CC9C(param2, param3, param4, param5, param6, param7, param8, param9); if (v0 != -1) { - sub_02003070(param0, param1, v0 * 16, param7 * 0x20); + PaletteData_LoadBufferFromHardware(param0, param1, v0 * 16, param7 * 0x20); } return v0; @@ -473,7 +473,7 @@ u8 SpriteRenderer_LoadPalette(PaletteData *param0, enum PaletteFadeBufferId para v0 = sub_0200CD0C(param2, param3, param4, param5, param6, param7, param8, param9); if (v0 != -1) { - sub_02003070(param0, param1, v0 * 16, param7 * 0x20); + PaletteData_LoadBufferFromHardware(param0, param1, v0 * 16, param7 * 0x20); } return v0; diff --git a/src/unk_0201567C.c b/src/unk_0201567C.c index 5659da1c70..0d43b59262 100644 --- a/src/unk_0201567C.c +++ b/src/unk_0201567C.c @@ -41,10 +41,10 @@ void *sub_0201567C(PaletteData *param0, u16 param1, u16 param2, u32 param3) if (param0 != NULL) { if (param1 == 0) { - v2 = sub_02003164(param0, 0); + v2 = PaletteData_GetUnfadedBuffer(param0, 0); v0->unk_04 = sub_02015870; } else { - v2 = sub_02003164(param0, 1); + v2 = PaletteData_GetUnfadedBuffer(param0, 1); v0->unk_04 = sub_0201588C; } } else { @@ -164,11 +164,11 @@ static void sub_02015858(void *param0, u16 *param1) static void sub_02015870(void *param0, u16 *param1) { UnkStruct_020157E4 *v0 = (UnkStruct_020157E4 *)param0; - sub_02002FBC(v0->unk_08, param1, 0, v0->unk_4D * 16, 0x20); + PaletteData_LoadBuffer(v0->unk_08, param1, 0, v0->unk_4D * 16, 0x20); } static void sub_0201588C(void *param0, u16 *param1) { UnkStruct_020157E4 *v0 = (UnkStruct_020157E4 *)param0; - sub_02002FBC(v0->unk_08, param1, 1, v0->unk_4D * 16, 0x20); + PaletteData_LoadBuffer(v0->unk_08, param1, 1, v0->unk_4D * 16, 0x20); } diff --git a/src/unk_0207AE68.c b/src/unk_0207AE68.c index c26afb1e57..91db480af7 100644 --- a/src/unk_0207AE68.c +++ b/src/unk_0207AE68.c @@ -111,13 +111,13 @@ UnkStruct_0207AE68 *sub_0207AE68(Party *param0, Pokemon *param1, int param2, Opt PokeSprite_LoadCryDelay(v0->unk_80, &(v0->unk_84), v0->unk_60, 1); PokeSprite_LoadCryDelay(v0->unk_80, &(v0->unk_85), v0->unk_62, 1); - v0->unk_14 = sub_02002F38(param11); + v0->unk_14 = PaletteData_New(param11); - sub_02003858(v0->unk_14, 1); - sub_02002F70(v0->unk_14, 0, 0x200, param11); - sub_02002F70(v0->unk_14, 1, 0x200, param11); - sub_02002F70(v0->unk_14, 2, (((16 - 2) * 16) * sizeof(u16)), param11); - sub_02002F70(v0->unk_14, 3, 0x200, param11); + PaletteData_SetAutoTransparent(v0->unk_14, 1); + PaletteData_AllocBuffer(v0->unk_14, 0, 0x200, param11); + PaletteData_AllocBuffer(v0->unk_14, 1, 0x200, param11); + PaletteData_AllocBuffer(v0->unk_14, 2, (((16 - 2) * 16) * sizeof(u16)), param11); + PaletteData_AllocBuffer(v0->unk_14, 3, 0x200, param11); v0->unk_00 = BgConfig_New(param11); v0->unk_04 = Window_New(param11, 1); @@ -152,7 +152,7 @@ UnkStruct_0207AE68 *sub_0207AE68(Party *param0, Pokemon *param1, int param2, Opt v0->unk_7C = param10; sub_0207C498(v0); - sub_02003178(v0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 16, 0, 0x0); + PaletteData_StartFade(v0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 16, 0, 0x0); sub_0200872C(v0->unk_18, 16, 0, 0, 0x0); v0->unk_58 = sub_0201567C(v0->unk_14, 0, 0xb, param11); @@ -192,11 +192,11 @@ void sub_0207B0E0(UnkStruct_0207AE68 *param0) sub_0200F344(1, 0x0); SetMainCallback(NULL, NULL); Windows_Delete(param0->unk_04, 1); - sub_02002FA0(param0->unk_14, 0); - sub_02002FA0(param0->unk_14, 1); - sub_02002FA0(param0->unk_14, 2); - sub_02002FA0(param0->unk_14, 3); - sub_02002F54(param0->unk_14); + PaletteData_FreeBuffer(param0->unk_14, 0); + PaletteData_FreeBuffer(param0->unk_14, 1); + PaletteData_FreeBuffer(param0->unk_14, 2); + PaletteData_FreeBuffer(param0->unk_14, 3); + PaletteData_Free(param0->unk_14); sub_02007B6C(param0->unk_18); sub_02015FB8(param0->unk_44); sub_020242C4(param0->unk_34); @@ -241,7 +241,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) } if ((param0->unk_7C & 0x1) && (param0->unk_64 == 8) && (gCoreSys.pressedKeys & PAD_BUTTON_B)) { - sub_02003178(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), (0xc00 ^ 0xffff), 0, 0, 16, 0x7fff); + PaletteData_StartFade(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), (0xc00 ^ 0xffff), 0, 0, 16, 0x7fff); param0->unk_64 = 41; } @@ -263,7 +263,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) } break; case 2: - if (sub_0200384C(param0->unk_14) == 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) { param0->unk_65 = sub_0207C584(param0, 916); param0->unk_64++; } @@ -274,7 +274,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) } break; case 4: - if (sub_0200384C(param0->unk_14) == 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) { { SpriteAnimationFrame v0[10]; @@ -350,7 +350,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) sub_0207C8C4(param0->unk_30, 5); sub_0207C8C4(param0->unk_30, 6); sub_0207C8C4(param0->unk_30, 10); - sub_02003178(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), (0xc00 ^ 0xffff), 2, 0, 16, 0x7fff); + PaletteData_StartFade(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), (0xc00 ^ 0xffff), 2, 0, 16, 0x7fff); sub_02007DEC(param0->unk_1C[0], 12, 0x0); sub_02007DEC(param0->unk_1C[0], 13, 0x0); sub_02007DEC(param0->unk_1C[1], 12, 0x100); @@ -367,10 +367,10 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) param0->unk_75 += 2; } - if (sub_0200384C(param0->unk_14) == 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) { if (--param0->unk_66 == 0) { sub_0207C8C4(param0->unk_30, 12); - sub_02003178(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), (0xc00 ^ 0xffff), 4, 16, 0, 0x7fff); + PaletteData_StartFade(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), (0xc00 ^ 0xffff), 4, 16, 0, 0x7fff); sub_0200872C(param0->unk_18, 16, 0, 3, 0x7fff); Sound_PlayEffect(1532); param0->unk_64++; @@ -378,7 +378,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) } break; case 10: - if ((sub_0200384C(param0->unk_14) == 0) && (sub_0207C8E0(param0->unk_30) == 0)) { + if ((PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) && (sub_0207C8E0(param0->unk_30) == 0)) { { SpriteAnimationFrame v2[10]; @@ -481,7 +481,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) switch (sub_02002114(param0->unk_40, param0->unk_5C)) { case 0: param0->unk_64 = 22; - sub_02003178(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); sub_0200872C(param0->unk_18, 0, 16, 0, 0x0); break; case 0xfffffffe: @@ -490,7 +490,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) } break; case 22: - if (sub_0200384C(param0->unk_14) == 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) { sub_0200F344(0, 0x0); sub_0200F344(1, 0x0); sub_0207C460(param0->unk_00); @@ -518,7 +518,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) sub_02007DEC(param0->unk_1C[1], 6, 0); sub_020089A0(param0->unk_1C[0]); sub_020089A0(param0->unk_1C[1]); - sub_02003178(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 16, 0, 0x0); + PaletteData_StartFade(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 16, 0, 0x0); sub_0200872C(param0->unk_18, 16, 0, 0, 0x0); sub_02039734(); param0->unk_64++; @@ -528,7 +528,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) sub_0200F338(0); sub_0200F338(1); - if (sub_0200384C(param0->unk_14) == 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) { if (param0->unk_3C->selectedSlot == 4) { param0->unk_64 = 32; } else { @@ -609,25 +609,25 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) } break; case 39: - sub_02003178(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); sub_0200872C(param0->unk_18, 0, 16, 0, 0x0); param0->unk_64++; break; case 40: - if (sub_0200384C(param0->unk_14) == 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) { sub_0207C8F4(param0->unk_30); sub_0207C028(param0); param0->unk_67 = 1; } break; case 41: - if (sub_0200384C(param0->unk_14) == 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) { sub_02007DEC(param0->unk_1C[0], 12, 0x100); sub_02007DEC(param0->unk_1C[0], 13, 0x100); sub_02007DEC(param0->unk_1C[1], 12, 0x0); sub_02007DEC(param0->unk_1C[1], 13, 0x0); sub_02007DEC(param0->unk_1C[1], 6, 1); - sub_02003178(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), (0xc00 ^ 0xffff), 0, 16, 0, 0x7fff); + PaletteData_StartFade(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), (0xc00 ^ 0xffff), 0, 16, 0, 0x7fff); sub_0200872C(param0->unk_18, 16, 0, 0, 0x7fff); param0->unk_72 = 0; param0->unk_73 = 0; @@ -640,7 +640,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) } break; case 42: - if (sub_0200384C(param0->unk_14) == 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) { { SpriteAnimationFrame v4[10]; @@ -665,14 +665,14 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) case 44: if (Text_IsPrinterActive(param0->unk_65) == 0) { if (--param0->unk_66 == 0) { - sub_02003178(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); + PaletteData_StartFade(param0->unk_14, (0x1 | 0x2 | 0x4 | 0x8), 0xffff, 1, 0, 16, 0x0); sub_0200872C(param0->unk_18, 0, 16, 0, 0x0); param0->unk_64++; } } break; case 45: - if (sub_0200384C(param0->unk_14) == 0) { + if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) { param0->unk_67 = 1; } break; @@ -888,11 +888,11 @@ static void sub_0207C1CC(UnkStruct_0207AE68 *param0, BgConfig *param1) sub_0200E218(param1, 1, 1, 10, v4, param0->unk_5C); sub_02006E3C(v5, v6, param1, v9, 0, 0, 1, param0->unk_5C); sub_02006E60(v5, v7, param1, v9, 0, 0, 1, param0->unk_5C); - PaletteSys_LoadPalette(param0->unk_14, v5, v8, param0->unk_5C, 0, 0x20 * 2, 0); - PaletteSys_LoadPalette(param0->unk_14, 38, sub_0200DD08(v4), param0->unk_5C, 0, 0x20, 10 * 0x10); - PaletteSys_LoadPalette(param0->unk_14, 14, 7, param0->unk_5C, 0, 0x20, 0xb * 0x10); + PaletteData_LoadBufferFromFileStart(param0->unk_14, v5, v8, param0->unk_5C, 0, 0x20 * 2, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_14, 38, sub_0200DD08(v4), param0->unk_5C, 0, 0x20, 10 * 0x10); + PaletteData_LoadBufferFromFileStart(param0->unk_14, 14, 7, param0->unk_5C, 0, 0x20, 0xb * 0x10); Window_SetFrame(param0->unk_00, 2, 1, 0, param0->unk_5C); - PaletteSys_LoadPalette(param0->unk_14, 38, Window_FramePalette(), param0->unk_5C, 0, 0x20, 8 * 0x10); + PaletteData_LoadBufferFromFileStart(param0->unk_14, 38, Window_FramePalette(), param0->unk_5C, 0, 0x20, 8 * 0x10); } { @@ -904,7 +904,7 @@ static void sub_0207C1CC(UnkStruct_0207AE68 *param0, BgConfig *param1) sub_02006E3C(v10, v11, param1, v14, 0, 0, 1, param0->unk_5C); sub_02006E60(v10, v12, param1, v14, 0, 0, 1, param0->unk_5C); - PaletteSys_LoadPalette(param0->unk_14, v10, v13, param0->unk_5C, 1, 0x20 * 1, 0); + PaletteData_LoadBufferFromFileStart(param0->unk_14, v10, v13, param0->unk_5C, 1, 0x20 * 1, 0); } GX_SetVisibleWnd(GX_WNDMASK_W0); @@ -962,7 +962,7 @@ static void sub_0207C520(void *param0) sub_02008A94(v0->unk_18); sub_0201DCAC(); - sub_02003694(v0->unk_14); + PaletteData_CommitFadedBuffers(v0->unk_14); Bg_RunScheduledUpdates(v0->unk_00); OS_SetIrqCheckFlag(OS_IE_V_BLANK); diff --git a/src/unk_020890F4.c b/src/unk_020890F4.c index 43ac769efa..92d05fd45d 100644 --- a/src/unk_020890F4.c +++ b/src/unk_020890F4.c @@ -61,13 +61,13 @@ static int sub_020890F4(OverlayManager *param0, int *param1) v0->unk_2C0.unk_00 = NARC_ctor(NARC_INDEX_ARC__CODEIN_GRA, 101); v0->unk_2C0.unk_0C = BgConfig_New(101); - v0->unk_2C0.unk_10 = sub_02002F38(101); + v0->unk_2C0.unk_10 = PaletteData_New(101); - sub_02003858(v0->unk_2C0.unk_10, 1); - sub_02002F70(v0->unk_2C0.unk_10, 0, 0x200, 101); - sub_02002F70(v0->unk_2C0.unk_10, 1, 0x200, 101); - sub_02002F70(v0->unk_2C0.unk_10, 2, 0x200, 101); - sub_02002F70(v0->unk_2C0.unk_10, 3, 0x200, 101); + PaletteData_SetAutoTransparent(v0->unk_2C0.unk_10, 1); + PaletteData_AllocBuffer(v0->unk_2C0.unk_10, 0, 0x200, 101); + PaletteData_AllocBuffer(v0->unk_2C0.unk_10, 1, 0x200, 101); + PaletteData_AllocBuffer(v0->unk_2C0.unk_10, 2, 0x200, 101); + PaletteData_AllocBuffer(v0->unk_2C0.unk_10, 3, 0x200, 101); sub_0208945C(v0->unk_2C0.unk_0C); sub_0208A3F4(v0); sub_02089688(v0); @@ -133,11 +133,11 @@ static int sub_0208927C(OverlayManager *param0, int *param1) Bg_FreeTilemapBuffer(v0->unk_2C0.unk_0C, 6); Bg_FreeTilemapBuffer(v0->unk_2C0.unk_0C, 7); Heap_FreeToHeap(v0->unk_2C0.unk_0C); - sub_02002FA0(v0->unk_2C0.unk_10, 0); - sub_02002FA0(v0->unk_2C0.unk_10, 1); - sub_02002FA0(v0->unk_2C0.unk_10, 2); - sub_02002FA0(v0->unk_2C0.unk_10, 3); - sub_02002F54(v0->unk_2C0.unk_10); + PaletteData_FreeBuffer(v0->unk_2C0.unk_10, 0); + PaletteData_FreeBuffer(v0->unk_2C0.unk_10, 1); + PaletteData_FreeBuffer(v0->unk_2C0.unk_10, 2); + PaletteData_FreeBuffer(v0->unk_2C0.unk_10, 3); + PaletteData_Free(v0->unk_2C0.unk_10); NARC_dtor(v0->unk_2C0.unk_00); { @@ -353,7 +353,7 @@ static void sub_020895CC(void *param0) sub_0201DCAC(); sub_0200C800(); - sub_02003694(v0->unk_2C0.unk_10); + PaletteData_CommitFadedBuffers(v0->unk_2C0.unk_10); Bg_RunScheduledUpdates(v0->unk_2C0.unk_0C); OS_SetIrqCheckFlag(OS_IE_V_BLANK); diff --git a/src/unk_02089604.c b/src/unk_02089604.c index a0d310e21e..15d80ab143 100644 --- a/src/unk_02089604.c +++ b/src/unk_02089604.c @@ -123,7 +123,7 @@ BOOL sub_02089820(UnkStruct_02089688 *param0) void *v1 = sub_020394A8(101); NNS_G2dGetUnpackedPaletteData(v1, &v0); - sub_02002FBC(param0->unk_2C0.unk_10, v0->pRawData, 0x1 | 0x2, 0xe0, 0x20); + PaletteData_LoadBuffer(param0->unk_2C0.unk_10, v0->pRawData, 0x1 | 0x2, 0xe0, 0x20); Heap_FreeToHeap(v1); } diff --git a/src/unk_0208A3F4.c b/src/unk_0208A3F4.c index 3fdc3e1703..098cb4848f 100644 --- a/src/unk_0208A3F4.c +++ b/src/unk_0208A3F4.c @@ -77,11 +77,11 @@ void sub_0208A490 (UnkStruct_02089688 * param0) sub_020070E8(v0, 12, v1, 1, 0, 0, 0, 101); sub_0200710C(v0, 14, v1, 1, 0, 0, 0, 101); - PaletteSys_LoadPalette(v4, 159, 13, 101, 0, 0x20 * 1, 0); + PaletteData_LoadBufferFromFileStart(v4, 159, 13, 101, 0, 0x20 * 1, 0); sub_020070E8(v0, 15, v1, 5, 0, 0, 0, 101); sub_0200710C(v0, 17, v1, 5, 0, 0, 0, 101); - PaletteSys_LoadPalette(v4, 159, 16, 101, 1, 0x20 * 1, 0); + PaletteData_LoadBufferFromFileStart(v4, 159, 16, 101, 1, 0x20 * 1, 0); SpriteRenderer_LoadPalette(v4, 2, v2, v3, v0, 1, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 1000); SpriteRenderer_LoadCharResObjFromOpenNarc(v2, v3, v0, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 1000); @@ -102,8 +102,8 @@ void sub_0208A490 (UnkStruct_02089688 * param0) int v5 = Options_Frame(param0->unk_38C.unk_20); sub_0200DD0C(v1, 4, 1, 10, v5, 101); - PaletteSys_LoadPalette(v4, 38, sub_0200DD08(v5), 101, 1, 0x20, 11 * 16); - PaletteSys_LoadPalette(v4, 14, 7, 101, 1, 0x20, 12 * 16); + PaletteData_LoadBufferFromFileStart(v4, 38, sub_0200DD08(v5), 101, 1, 0x20, 11 * 16); + PaletteData_LoadBufferFromFileStart(v4, 14, 7, 101, 1, 0x20, 12 * 16); } } diff --git a/src/unk_02097B18.c b/src/unk_02097B18.c index 7e08a36385..4f552d7f44 100644 --- a/src/unk_02097B18.c +++ b/src/unk_02097B18.c @@ -144,12 +144,12 @@ static int sub_02097B18(OverlayManager *param0, int *param1) v0->unk_D4.unk_10 = BgConfig_New(53); sub_0201DBEC(64, 53); - v0->unk_D4.unk_14 = sub_02002F38(53); - sub_02003858(v0->unk_D4.unk_14, 1); - sub_02002F70(v0->unk_D4.unk_14, 0, 0x200, 53); - sub_02002F70(v0->unk_D4.unk_14, 1, 0x200, 53); - sub_02002F70(v0->unk_D4.unk_14, 2, 0x200, 53); - sub_02002F70(v0->unk_D4.unk_14, 3, 0x200, 53); + v0->unk_D4.unk_14 = PaletteData_New(53); + PaletteData_SetAutoTransparent(v0->unk_D4.unk_14, 1); + PaletteData_AllocBuffer(v0->unk_D4.unk_14, 0, 0x200, 53); + PaletteData_AllocBuffer(v0->unk_D4.unk_14, 1, 0x200, 53); + PaletteData_AllocBuffer(v0->unk_D4.unk_14, 2, 0x200, 53); + PaletteData_AllocBuffer(v0->unk_D4.unk_14, 3, 0x200, 53); ov76_0223EB64(v0->unk_D4.unk_10); ov76_0223BF10(); @@ -241,11 +241,11 @@ static int sub_02097D88(OverlayManager *param0, int *param1) Bg_FreeTilemapBuffer(v0->unk_D4.unk_10, 6); Bg_FreeTilemapBuffer(v0->unk_D4.unk_10, 7); Heap_FreeToHeap(v0->unk_D4.unk_10); - sub_02002FA0(v0->unk_D4.unk_14, 0); - sub_02002FA0(v0->unk_D4.unk_14, 1); - sub_02002FA0(v0->unk_D4.unk_14, 2); - sub_02002FA0(v0->unk_D4.unk_14, 3); - sub_02002F54(v0->unk_D4.unk_14); + PaletteData_FreeBuffer(v0->unk_D4.unk_14, 0); + PaletteData_FreeBuffer(v0->unk_D4.unk_14, 1); + PaletteData_FreeBuffer(v0->unk_D4.unk_14, 2); + PaletteData_FreeBuffer(v0->unk_D4.unk_14, 3); + PaletteData_Free(v0->unk_D4.unk_14); sub_02097F20(v0->unk_00, v0->unk_3C4[0]); Heap_FreeToHeap(v0->unk_428); ov76_0223B678(v0); diff --git a/src/unk_02098218.c b/src/unk_02098218.c index 639e99dc3d..727a31ff5c 100644 --- a/src/unk_02098218.c +++ b/src/unk_02098218.c @@ -82,13 +82,13 @@ static int sub_02098218(OverlayManager *param0, int *param1) sub_0201DBEC(64, 71); v1->unk_04.unk_54 = sub_02015F84(71, 1, 0); - v1->unk_04.unk_04 = sub_02002F38(71); + v1->unk_04.unk_04 = PaletteData_New(71); - sub_02003858(v1->unk_04.unk_04, 1); - sub_02002F70(v1->unk_04.unk_04, 0, 0x200, 71); - sub_02002F70(v1->unk_04.unk_04, 2, 0x200, 71); - sub_02002F70(v1->unk_04.unk_04, 1, 0x200, 71); - sub_02002F70(v1->unk_04.unk_04, 3, 0x200, 71); + PaletteData_SetAutoTransparent(v1->unk_04.unk_04, 1); + PaletteData_AllocBuffer(v1->unk_04.unk_04, 0, 0x200, 71); + PaletteData_AllocBuffer(v1->unk_04.unk_04, 2, 0x200, 71); + PaletteData_AllocBuffer(v1->unk_04.unk_04, 1, 0x200, 71); + PaletteData_AllocBuffer(v1->unk_04.unk_04, 3, 0x200, 71); ov119_021D0D80(); ov119_021D0DA8(); @@ -166,11 +166,11 @@ static int sub_02098388(OverlayManager *param0, int *param1) GXLayers_EngineAToggleLayers(3, 0); GXLayers_EngineBToggleLayers(4, 0); - sub_02002FA0(v0->unk_04.unk_04, 0); - sub_02002FA0(v0->unk_04.unk_04, 2); - sub_02002FA0(v0->unk_04.unk_04, 1); - sub_02002FA0(v0->unk_04.unk_04, 3); - sub_02002F54(v0->unk_04.unk_04); + PaletteData_FreeBuffer(v0->unk_04.unk_04, 0); + PaletteData_FreeBuffer(v0->unk_04.unk_04, 2); + PaletteData_FreeBuffer(v0->unk_04.unk_04, 1); + PaletteData_FreeBuffer(v0->unk_04.unk_04, 3); + PaletteData_Free(v0->unk_04.unk_04); Bg_FreeTilemapBuffer(v0->unk_04.unk_00, 1); Bg_FreeTilemapBuffer(v0->unk_04.unk_00, 2); From 642baf1c7fe2ccb1b96c360a7c879b1e4ce3e9bc Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 10:13:38 -0700 Subject: [PATCH 04/11] Identify + document hardware_palette.c --- include/hardware_palette.h | 11 +++++++++++ include/unk_020241F0.h | 11 ----------- platinum.us/main.lsf | 2 +- src/battle/ov16_0223B140.c | 8 ++++---- src/hardware_palette.c | 34 ++++++++++++++++++++++++++++++++++ src/meson.build | 2 +- src/overlay073/ov73_021D3250.c | 4 ++-- src/palette.c | 10 +++++----- src/unk_0201567C.c | 6 +++--- src/unk_020241F0.c | 34 ---------------------------------- src/unk_0207AE68.c | 6 +++--- 11 files changed, 64 insertions(+), 64 deletions(-) create mode 100644 include/hardware_palette.h delete mode 100644 include/unk_020241F0.h create mode 100644 src/hardware_palette.c delete mode 100644 src/unk_020241F0.c diff --git a/include/hardware_palette.h b/include/hardware_palette.h new file mode 100644 index 0000000000..428b82d612 --- /dev/null +++ b/include/hardware_palette.h @@ -0,0 +1,11 @@ +#ifndef POKEPLATINUM_HARDWARE_PALETTE_H +#define POKEPLATINUM_HARDWARE_PALETTE_H + +u16 *GetHardwareMainBgPaletteAddress(void); +u32 GetHardwareMainBgPaletteSize(void); +u16 *GetHardwareSubBgPaletteAddress(void); +u32 GetHardwareSubBgPaletteSize(void); +u16 *GetHardwareMainObjPaletteAddress(void); +u16 *GetHardwareSubObjPaletteAddress(void); + +#endif // POKEPLATINUM_HARDWARE_PALETTE_H diff --git a/include/unk_020241F0.h b/include/unk_020241F0.h deleted file mode 100644 index 93388c7ee1..0000000000 --- a/include/unk_020241F0.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef POKEPLATINUM_UNK_020241F0_H -#define POKEPLATINUM_UNK_020241F0_H - -u32 sub_020241F0(void); -u32 sub_020241F8(void); -u32 sub_02024200(void); -u32 sub_02024208(void); -u32 sub_02024210(void); -u32 sub_02024218(void); - -#endif // POKEPLATINUM_UNK_020241F0_H diff --git a/platinum.us/main.lsf b/platinum.us/main.lsf index 2517811c13..4b44e26480 100644 --- a/platinum.us/main.lsf +++ b/platinum.us/main.lsf @@ -98,7 +98,7 @@ Static main Object main.nef.p/src_unk_02023FCC.c.o Object main.nef.p/src_unk_0202414C.c.o Object main.nef.p/src_unk_0202419C.c.o - Object main.nef.p/src_unk_020241F0.c.o + Object main.nef.p/src_hardware_palette.c.o Object main.nef.p/src_unk_02024220.c.o Object main.nef.p/src_unk_02024358.c.o Object main.nef.p/src_savedata_save_table.c.o diff --git a/src/battle/ov16_0223B140.c b/src/battle/ov16_0223B140.c index 06e51bfdec..055223874d 100644 --- a/src/battle/ov16_0223B140.c +++ b/src/battle/ov16_0223B140.c @@ -48,6 +48,7 @@ #include "game_overlay.h" #include "game_records.h" #include "gx_layers.h" +#include "hardware_palette.h" #include "heap.h" #include "message.h" #include "narc.h" @@ -79,7 +80,6 @@ #include "unk_0201DBEC.h" #include "unk_0201E3D8.h" #include "unk_0202419C.h" -#include "unk_020241F0.h" #include "unk_02024220.h" #include "unk_0202631C.h" #include "unk_0202F1D4.h" @@ -339,7 +339,7 @@ void ov16_0223B430(BattleSystem *param0) } ov16_0223F314(param0, 0); - MI_CpuFill16((void *)sub_02024200(), 0x0, sub_02024208()); + MI_CpuFill16((void *)GetHardwareSubBgPaletteAddress(), 0x0, GetHardwareSubBgPaletteSize()); v0 = NARC_ctor(NARC_INDEX_BATTLE__GRAPHIC__PL_BATT_BG, 5); v1 = NARC_ctor(NARC_INDEX_BATTLE__GRAPHIC__PL_BATT_OBJ, 5); @@ -526,8 +526,8 @@ static void ov16_0223B790(OverlayManager *param0) RTCDate v4; RTCTime v5; - MI_CpuFill16((void *)sub_020241F0(), 0x0, sub_020241F8()); - MI_CpuFill16((void *)sub_02024200(), 0x0, sub_02024208()); + MI_CpuFill16((void *)GetHardwareMainBgPaletteAddress(), 0x0, GetHardwareMainBgPaletteSize()); + MI_CpuFill16((void *)GetHardwareSubBgPaletteAddress(), 0x0, GetHardwareSubBgPaletteSize()); v0->unk_00 = ov16_0223CD7C(); diff --git a/src/hardware_palette.c b/src/hardware_palette.c new file mode 100644 index 0000000000..9951c66679 --- /dev/null +++ b/src/hardware_palette.c @@ -0,0 +1,34 @@ +#include "hardware_palette.h" + +#include +#include + +u16 *GetHardwareMainBgPaletteAddress(void) +{ + return (u16 *)HW_BG_PLTT; +} + +u32 GetHardwareMainBgPaletteSize(void) +{ + return HW_BG_PLTT_SIZE; +} + +u16 *GetHardwareSubBgPaletteAddress(void) +{ + return (u16 *)HW_DB_BG_PLTT; +} + +u32 GetHardwareSubBgPaletteSize(void) +{ + return HW_DB_BG_PLTT_SIZE; +} + +u16 *GetHardwareMainObjPaletteAddress(void) +{ + return (u16 *)HW_OBJ_PLTT; +} + +u16 *GetHardwareSubObjPaletteAddress(void) +{ + return (u16 *)HW_DB_OBJ_PLTT; +} diff --git a/src/meson.build b/src/meson.build index be673eee96..4c033a74e7 100644 --- a/src/meson.build +++ b/src/meson.build @@ -90,7 +90,7 @@ pokeplatinum_c = files( 'unk_02023FCC.c', 'unk_0202414C.c', 'unk_0202419C.c', - 'unk_020241F0.c', + 'hardware_palette.c', 'unk_02024220.c', 'unk_02024358.c', 'savedata/save_table.c', diff --git a/src/overlay073/ov73_021D3250.c b/src/overlay073/ov73_021D3250.c index 41aa01336a..e93de2dfb2 100644 --- a/src/overlay073/ov73_021D3250.c +++ b/src/overlay073/ov73_021D3250.c @@ -7,6 +7,7 @@ #include "core_sys.h" #include "font.h" #include "gx_layers.h" +#include "hardware_palette.h" #include "heap.h" #include "message.h" #include "overlay_manager.h" @@ -17,7 +18,6 @@ #include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" -#include "unk_020241F0.h" typedef struct { int unk_00; @@ -83,7 +83,7 @@ int ov73_021D3280 (OverlayManager * param0, int * param1) GXLayers_TurnBothDispOn(); { - u16 * v2 = (u16 *)sub_020241F0(); + u16 *v2 = (u16 *)GetHardwareMainBgPaletteAddress(); BlendPalettes(v2, v2, 0xFFFC, 7, 0x0); GX_LoadBGPltt((const void *)v2, 0, 16 * 0x20); diff --git a/src/palette.c b/src/palette.c index 758f9b1aba..11e408252e 100644 --- a/src/palette.c +++ b/src/palette.c @@ -3,11 +3,11 @@ #include #include +#include "hardware_palette.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02006E3C.h" -#include "unk_020241F0.h" static u8 sub_0200327C(u16 param0, u16 param1); static void sub_02003290(PaletteData *param0, u16 param1); @@ -97,16 +97,16 @@ void PaletteData_LoadBufferFromHardware(PaletteData *param0, int param1, u16 par switch (param1) { case 0: - v0 = (u16 *)sub_020241F0(); + v0 = (u16 *)GetHardwareMainBgPaletteAddress(); break; case 1: - v0 = (u16 *)sub_02024200(); + v0 = (u16 *)GetHardwareSubBgPaletteAddress(); break; case 2: - v0 = (u16 *)sub_02024210(); + v0 = (u16 *)GetHardwareMainObjPaletteAddress(); break; case 3: - v0 = (u16 *)sub_02024218(); + v0 = (u16 *)GetHardwareSubObjPaletteAddress(); break; default: GF_ASSERT(FALSE); diff --git a/src/unk_0201567C.c b/src/unk_0201567C.c index 0d43b59262..6f47491ef3 100644 --- a/src/unk_0201567C.c +++ b/src/unk_0201567C.c @@ -4,10 +4,10 @@ #include #include "bg_window.h" +#include "hardware_palette.h" #include "palette.h" #include "sys_task_manager.h" #include "unk_0200679C.h" -#include "unk_020241F0.h" typedef void (*UnkFuncPtr_020157E4)(void *, u16 *); @@ -49,10 +49,10 @@ void *sub_0201567C(PaletteData *param0, u16 param1, u16 param2, u32 param3) } } else { if (param1 == 0) { - v2 = (u16 *)sub_020241F0(); + v2 = (u16 *)GetHardwareMainBgPaletteAddress(); v0->unk_04 = sub_02015840; } else { - v2 = (u16 *)sub_02024200(); + v2 = (u16 *)GetHardwareSubBgPaletteAddress(); v0->unk_04 = sub_02015858; } } diff --git a/src/unk_020241F0.c b/src/unk_020241F0.c deleted file mode 100644 index 64a01b2198..0000000000 --- a/src/unk_020241F0.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "unk_020241F0.h" - -#include -#include - -u32 sub_020241F0(void) -{ - return HW_BG_PLTT; -} - -u32 sub_020241F8(void) -{ - return HW_BG_PLTT_SIZE; -} - -u32 sub_02024200(void) -{ - return HW_DB_BG_PLTT; -} - -u32 sub_02024208(void) -{ - return HW_DB_BG_PLTT_SIZE; -} - -u32 sub_02024210(void) -{ - return HW_OBJ_PLTT; -} - -u32 sub_02024218(void) -{ - return HW_DB_OBJ_PLTT; -} diff --git a/src/unk_0207AE68.c b/src/unk_0207AE68.c index 91db480af7..49a16c67b2 100644 --- a/src/unk_0207AE68.c +++ b/src/unk_0207AE68.c @@ -23,6 +23,7 @@ #include "game_options.h" #include "game_records.h" #include "gx_layers.h" +#include "hardware_palette.h" #include "heap.h" #include "message.h" #include "narc.h" @@ -49,7 +50,6 @@ #include "unk_02017728.h" #include "unk_0201DBEC.h" #include "unk_0202419C.h" -#include "unk_020241F0.h" #include "unk_02024220.h" #include "unk_0202631C.h" #include "unk_02028124.h" @@ -97,8 +97,8 @@ UnkStruct_0207AE68 *sub_0207AE68(Party *param0, Pokemon *param1, int param2, Opt v0 = (UnkStruct_0207AE68 *)Heap_AllocFromHeap(param11, sizeof(UnkStruct_0207AE68)); MI_CpuClearFast(v0, sizeof(UnkStruct_0207AE68)); - MI_CpuFill16((void *)sub_020241F0(), 0x0, sub_020241F8()); - MI_CpuFill16((void *)sub_02024200(), 0x0, sub_02024208()); + MI_CpuFill16((void *)GetHardwareMainBgPaletteAddress(), 0x0, GetHardwareMainBgPaletteSize()); + MI_CpuFill16((void *)GetHardwareSubBgPaletteAddress(), 0x0, GetHardwareSubBgPaletteSize()); v0->unk_24 = param0; v0->unk_28 = param1; From 6a5db635960cb0548a4c5e6a945cf8f62935ae14 Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 13:23:20 -0700 Subject: [PATCH 05/11] Clean up + document palette.c --- include/constants/palette.h | 43 -- include/palette.h | 106 +++-- include/unk_0200C6E4.h | 4 +- src/battle/party_gauge.c | 1 - src/overlay012/ov12_0222AC70.c | 10 +- src/overlay012/ov12_0222E91C.c | 4 +- src/palette.c | 718 ++++++++++++++++----------------- src/unk_0200C6E4.c | 2 +- 8 files changed, 443 insertions(+), 445 deletions(-) diff --git a/include/constants/palette.h b/include/constants/palette.h index 78ddcb70f0..50de0afc2f 100644 --- a/include/constants/palette.h +++ b/include/constants/palette.h @@ -1,47 +1,4 @@ #ifndef POKEPLATINUM_CONSTANTS_PALETTE_H #define POKEPLATINUM_CONSTANTS_PALETTE_H -enum PaletteFadeBufferId { - PLTTBUF_MAIN_BG = 0, - PLTTBUF_SUB_BG, - PLTTBUF_MAIN_OBJ, - PLTTBUF_SUB_OBJ, - PLTTBUF_EX_BEGIN, - - PLTTBUF_MAIN_EX_BG_0 = PLTTBUF_EX_BEGIN, - PLTTBUF_MAIN_EX_BG_1, - PLTTBUF_MAIN_EX_BG_2, - PLTTBUF_MAIN_EX_BG_3, - PLTTBUF_SUB_EX_BG_0, - PLTTBUF_SUB_EX_BG_1, - PLTTBUF_SUB_EX_BG_2, - PLTTBUF_SUB_EX_BG_3, - PLTTBUF_MAIN_EX_OBJ, - PLTTBUF_SUB_EX_OBJ, - - PLTTBUF_MAX, -}; - -#define PLTTBUF_MAIN_BG_F (1 << PLTTBUF_MAIN_BG) -#define PLTTBUF_SUB_BG_F (1 << PLTTBUF_SUB_BG) -#define PLTTBUF_MAIN_OBJ_F (1 << PLTTBUF_MAIN_OBJ) -#define PLTTBUF_SUB_OBJ_F (1 << PLTTBUF_SUB_OBJ) -#define PLTTBUF_MAIN_EX_BG_0_F (1 << PLTTBUF_MAIN_EX_BG_0) -#define PLTTBUF_MAIN_EX_BG_1_F (1 << PLTTBUF_MAIN_EX_BG_1) -#define PLTTBUF_MAIN_EX_BG_2_F (1 << PLTTBUF_MAIN_EX_BG_2) -#define PLTTBUF_MAIN_EX_BG_3_F (1 << PLTTBUF_MAIN_EX_BG_3) -#define PLTTBUF_SUB_EX_BG_0_F (1 << PLTTBUF_SUB_EX_BG_0) -#define PLTTBUF_SUB_EX_BG_1_F (1 << PLTTBUF_SUB_EX_BG_1) -#define PLTTBUF_SUB_EX_BG_2_F (1 << PLTTBUF_SUB_EX_BG_2) -#define PLTTBUF_SUB_EX_BG_3_F (1 << PLTTBUF_SUB_EX_BG_3) -#define PLTTBUF_MAIN_EX_OBJ_F (1 << PLTTBUF_MAIN_EX_OBJ) -#define PLTTBUF_SUB_EX_OBJ_F (1 << PLTTBUF_SUB_EX_OBJ) -#define PLTTBUF_ALL_F ((1 << PLTTBUF_MAX) - 1) - -enum PaletteSelector { - PLTTSEL_TRANSPARENT, - PLTTSEL_OPAQUE, - PLTTSEL_BOTH, -}; - #endif // POKEPLATINUM_CONSTANTS_PALETTE_H diff --git a/include/palette.h b/include/palette.h index 122be45f7b..89616dcacc 100644 --- a/include/palette.h +++ b/include/palette.h @@ -1,6 +1,51 @@ #ifndef POKEPLATINUM_PALETTE_H #define POKEPLATINUM_PALETTE_H +#include "constants/heap.h" + +enum PaletteBufferID { + PLTTBUF_MAIN_BG = 0, + PLTTBUF_SUB_BG, + PLTTBUF_MAIN_OBJ, + PLTTBUF_SUB_OBJ, + PLTTBUF_EX_BEGIN, + + PLTTBUF_MAIN_EX_BG_0 = PLTTBUF_EX_BEGIN, + PLTTBUF_MAIN_EX_BG_1, + PLTTBUF_MAIN_EX_BG_2, + PLTTBUF_MAIN_EX_BG_3, + PLTTBUF_SUB_EX_BG_0, + PLTTBUF_SUB_EX_BG_1, + PLTTBUF_SUB_EX_BG_2, + PLTTBUF_SUB_EX_BG_3, + PLTTBUF_MAIN_EX_OBJ, + PLTTBUF_SUB_EX_OBJ, + + PLTTBUF_MAX, +}; + +#define PLTTBUF_MAIN_BG_F (1 << PLTTBUF_MAIN_BG) +#define PLTTBUF_SUB_BG_F (1 << PLTTBUF_SUB_BG) +#define PLTTBUF_MAIN_OBJ_F (1 << PLTTBUF_MAIN_OBJ) +#define PLTTBUF_SUB_OBJ_F (1 << PLTTBUF_SUB_OBJ) +#define PLTTBUF_MAIN_EX_BG_0_F (1 << PLTTBUF_MAIN_EX_BG_0) +#define PLTTBUF_MAIN_EX_BG_1_F (1 << PLTTBUF_MAIN_EX_BG_1) +#define PLTTBUF_MAIN_EX_BG_2_F (1 << PLTTBUF_MAIN_EX_BG_2) +#define PLTTBUF_MAIN_EX_BG_3_F (1 << PLTTBUF_MAIN_EX_BG_3) +#define PLTTBUF_SUB_EX_BG_0_F (1 << PLTTBUF_SUB_EX_BG_0) +#define PLTTBUF_SUB_EX_BG_1_F (1 << PLTTBUF_SUB_EX_BG_1) +#define PLTTBUF_SUB_EX_BG_2_F (1 << PLTTBUF_SUB_EX_BG_2) +#define PLTTBUF_SUB_EX_BG_3_F (1 << PLTTBUF_SUB_EX_BG_3) +#define PLTTBUF_MAIN_EX_OBJ_F (1 << PLTTBUF_MAIN_EX_OBJ) +#define PLTTBUF_SUB_EX_OBJ_F (1 << PLTTBUF_SUB_EX_OBJ) +#define PLTTBUF_ALL_F ((1 << PLTTBUF_MAX) - 1) + +enum PaletteSelector { + PLTTSEL_FADED, + PLTTSEL_UNFADED, + PLTTSEL_BOTH, +}; + typedef struct RgbColor { u16 r : 5; u16 g : 5; @@ -9,11 +54,11 @@ typedef struct RgbColor { } RgbColor; typedef struct PaletteFadeControl { - u16 isOpaque; + u16 unfadedMask; u16 wait : 6; u16 cur : 5; u16 end : 5; - u16 nextRGB : 15; + u16 target : 15; u16 sign : 1; u16 step : 4; u16 waitStep : 6; @@ -31,37 +76,38 @@ typedef struct PaletteData { PaletteBuffer buffers[14]; u16 selectedFlag : 2; u16 selectedBuffers : 14; - u16 transparentBits : 14; - u16 callbackFlag : 1; + u16 fadedBuffers : 14; + u16 fadeInProgress : 1; u16 autoTransparent : 1; u8 forceExit; } PaletteData; -PaletteData *PaletteData_New(int param0); -void PaletteData_Free(PaletteData *param0); -void PaletteData_InitBuffer(PaletteData *param0, int param1, void *param2, void *param3, u32 param4); -void PaletteData_AllocBuffer(PaletteData *param0, int param1, u32 param2, u32 param3); -void PaletteData_FreeBuffer(PaletteData *param0, int param1); -void PaletteData_LoadBuffer(PaletteData *param0, const void *param1, int param2, u16 param3, u16 param4); -void PaletteData_LoadBufferFromFile(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6, u16 param7); -void PaletteData_LoadBufferFromFileStart(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6); -void PaletteData_LoadBufferFromHardware(PaletteData *param0, int param1, u16 param2, u32 param3); -void LoadPaletteFromFile(u32 param0, u32 param1, u32 param2, u32 param3, u16 param4, void *param5); -void PaletteData_CopyBuffer(PaletteData *param0, int param1, u16 param2, int param3, u16 param4, u16 param5); -u16 *PaletteData_GetUnfadedBuffer(PaletteData *param0, int param1); -u16 *PaletteData_GetFadedBuffer(PaletteData *param0, int param1); -u8 PaletteData_StartFade(PaletteData *param0, u16 param1, u16 param2, s8 param3, u8 param4, u8 param5, u16 param6); -void PaletteData_CommitFadedBuffers(PaletteData *param0); -u16 PaletteData_GetSelectedBuffersMask(PaletteData *param0); -void PaletteData_SetAutoTransparent(PaletteData *param0, int param1); -void PaletteData_SelectAll(PaletteData *param0, u8 param1); -void PaletteData_FillBufferRange(PaletteData *param0, int param1, int param2, u16 param3, u16 param4, u16 param5); -u16 PaletteData_GetBufferIndexColor(PaletteData *param0, int param1, int param2, u16 param3); -void BlendPalette(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4); -void PaletteData_Blend(PaletteData *param0, int param1, u16 param2, u16 param3, u8 param4, u16 param5); -void BlendPalettes(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4); -void PaletteData_BlendMulti(PaletteData *param0, int param1, u16 param2, u8 param3, u16 param4); -void TintPalette(u16 *param0, int param1, int param2, int param3, int param4); -void PaletteData_TintFromFile(PaletteData *param0, u32 param1, u32 param2, u32 param3, int param4, u32 param5, u16 param6, int param7, int param8, int param9); +void LoadPaletteFromFile(u32 narcID, u32 narcMemberIdx, u32 heapID, u32 size, u16 start, void *dest); +void BlendPalette(const u16 *src, u16 *dest, u16 size, u8 fraction, u16 target); +void BlendPalettes(const u16 *sources, u16 *dests, u16 toBlend, u8 fraction, u16 target); +void TintPalette(u16 *palette, int numColorsToTint, int tintR, int tintG, int tintB); + +PaletteData *PaletteData_New(enum HeapId heapID); +void PaletteData_Free(PaletteData *paletteData); +void PaletteData_InitBuffer(PaletteData *paletteData, enum PaletteBufferID bufferID, void *unfaded, void *faded, u32 size); +void PaletteData_AllocBuffer(PaletteData *paletteData, enum PaletteBufferID bufferID, u32 size, u32 heapID); +void PaletteData_FreeBuffer(PaletteData *paletteData, enum PaletteBufferID bufferID); +void PaletteData_LoadBuffer(PaletteData *paletteData, const void *src, enum PaletteBufferID bufferID, u16 destStart, u16 srcSize); +void PaletteData_LoadBufferFromFile(PaletteData *paletteData, u32 narcID, u32 narcMemberIdx, u32 heapID, enum PaletteBufferID bufferID, u32 srcSize, u16 destStart, u16 srcStart); +void PaletteData_LoadBufferFromFileStart(PaletteData *paletteData, u32 narcID, u32 narcMemberIdx, u32 heapID, enum PaletteBufferID bufferID, u32 srcSize, u16 destStart); +void PaletteData_LoadBufferFromFileStartWithTint(PaletteData *paletteData, u32 narcID, u32 narcMemberIdx, u32 heapID, enum PaletteBufferID bufferID, u32 size, u16 start, int r, int g, int b); +void PaletteData_LoadBufferFromHardware(PaletteData *paletteData, enum PaletteBufferID bufferID, u16 start, u32 size); +void PaletteData_CopyBuffer(PaletteData *palette, enum PaletteBufferID srcBufferID, u16 srcStart, enum PaletteBufferID destBufferID, u16 destStart, u16 size); +u16 *PaletteData_GetUnfadedBuffer(PaletteData *palette, enum PaletteBufferID bufferID); +u16 *PaletteData_GetFadedBuffer(PaletteData *palette, enum PaletteBufferID bufferID); +u8 PaletteData_StartFade(PaletteData *paletteData, u16 buffersToFade, u16 palettesToFade, s8 wait, u8 cur, u8 end, u16 target); +void PaletteData_CommitFadedBuffers(PaletteData *paletteData); +u16 PaletteData_GetSelectedBuffersMask(PaletteData *paletteData); +void PaletteData_SetAutoTransparent(PaletteData *paletteData, int val); +void PaletteData_SelectAll(PaletteData *paletteData, u8 val); +void PaletteData_FillBufferRange(PaletteData *paletteData, enum PaletteBufferID bufferID, enum PaletteSelector selector, u16 fillVal, u16 start, u16 end); +u16 PaletteData_GetBufferIndexColor(PaletteData *paletteData, enum PaletteBufferID bufferID, enum PaletteSelector selector, u16 index); +void PaletteData_Blend(PaletteData *paletteData, enum PaletteBufferID bufferID, u16 index, u16 size, u8 fraction, u16 target); +void PaletteData_BlendMulti(PaletteData *paletteData, enum PaletteBufferID bufferID, u16 toBlend, u8 fraction, u16 target); #endif // POKEPLATINUM_PALETTE_H diff --git a/include/unk_0200C6E4.h b/include/unk_0200C6E4.h index 16cecc9773..fc1c0ce2b3 100644 --- a/include/unk_0200C6E4.h +++ b/include/unk_0200C6E4.h @@ -4,8 +4,6 @@ #include #include -#include "constants/palette.h" - #include "struct_decls/cell_actor_data.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" @@ -47,7 +45,7 @@ BOOL SpriteRenderer_LoadCharResObjFromOpenNarc(SpriteRenderer *renderer, SpriteG s8 sub_0200CC9C(SpriteRenderer *param0, SpriteGfxHandler *param1, int param2, int param3, int param4, int param5, int param6, int param7); s8 sub_0200CD0C(SpriteRenderer *param0, SpriteGfxHandler *param1, NARC *param2, int param3, int param4, int param5, int param6, int param7); u8 sub_0200CD7C(PaletteData *param0, int param1, SpriteRenderer *param2, SpriteGfxHandler *param3, int param4, int param5, int param6, int param7, int param8, int param9); -u8 SpriteRenderer_LoadPalette(PaletteData *palette, enum PaletteFadeBufferId paletteBuffer, SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, NARC *narc, int fileID, BOOL compressed, int palID, int vram, int resID); +u8 SpriteRenderer_LoadPalette(PaletteData *palette, enum PaletteBufferID paletteBuffer, SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, NARC *narc, int fileID, BOOL compressed, int palID, int vram, int resID); BOOL sub_0200CE0C(SpriteRenderer *param0, SpriteGfxHandler *param1, int param2, int param3, int param4, int param5); BOOL SpriteRenderer_LoadCellResObjFromOpenNarc(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, NARC *narc, int fileID, BOOL compressed, int resID); BOOL sub_0200CE3C(SpriteRenderer *param0, SpriteGfxHandler *param1, int param2, int param3, int param4, int param5); diff --git a/src/battle/party_gauge.c b/src/battle/party_gauge.c index 0d30011104..591412f937 100644 --- a/src/battle/party_gauge.c +++ b/src/battle/party_gauge.c @@ -4,7 +4,6 @@ #include #include "constants/heap.h" -#include "constants/palette.h" #include "consts/sdat.h" #include "struct_decls/struct_02006C24_decl.h" diff --git a/src/overlay012/ov12_0222AC70.c b/src/overlay012/ov12_0222AC70.c index 410f9d7f5c..c7a40bf67c 100644 --- a/src/overlay012/ov12_0222AC70.c +++ b/src/overlay012/ov12_0222AC70.c @@ -736,10 +736,10 @@ void ov12_0222B68C(UnkStruct_ov12_0221FCDC *param0) sub_0200D460(v0->unk_18[3], v4); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v0->unk_18[0]->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - PaletteData_TintFromFile(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 128, 128, 128); + PaletteData_LoadBufferFromFileStartWithTint(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 128, 128, 128); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v0->unk_18[2]->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - PaletteData_TintFromFile(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 196, 196, 196); + PaletteData_LoadBufferFromFileStartWithTint(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 196, 196, 196); } else { sub_0200D474(v0->unk_18[0], 20); sub_0200D474(v0->unk_18[1], 20); @@ -755,10 +755,10 @@ void ov12_0222B68C(UnkStruct_ov12_0221FCDC *param0) sub_0200D460(v0->unk_18[3], v4); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v0->unk_18[0]->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - PaletteData_TintFromFile(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 196, 196, 196); + PaletteData_LoadBufferFromFileStartWithTint(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 196, 196, 196); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v0->unk_18[2]->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - PaletteData_TintFromFile(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 128, 128, 128); + PaletteData_LoadBufferFromFileStartWithTint(ov12_0222332C(v0->unk_0C), v5, v3, ov12_0221FDE4(param0), 2, 0x20, v2 * 16, 128, 128, 128); } } @@ -1139,7 +1139,7 @@ void ov12_0222C0C0(UnkStruct_ov12_0221FCDC *param0) int v3 = ov12_02223344(v0->unk_04, ov12_02220240(v0->unk_04)); v1 = sub_0201FAB4(CellActor_GetPaletteProxy(v0->unk_0C->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - PaletteData_TintFromFile(ov12_0222332C(v0->unk_04), v3, v2, ov12_0221FDE4(param0), 2, 0x20, v1 * 16, 256, 256, 256); + PaletteData_LoadBufferFromFileStartWithTint(ov12_0222332C(v0->unk_04), v3, v2, ov12_0221FDE4(param0), 2, 0x20, v1 * 16, 256, 256, 256); } SpriteActor_EnableObject(v0->unk_0C, 0); diff --git a/src/overlay012/ov12_0222E91C.c b/src/overlay012/ov12_0222E91C.c index 1bd8f4ca67..feac995da4 100644 --- a/src/overlay012/ov12_0222E91C.c +++ b/src/overlay012/ov12_0222E91C.c @@ -176,14 +176,14 @@ void ov12_0222EAA0(UnkStruct_ov12_0221FCDC *param0) sub_0200D460(v1, ov12_0222339C(v0->unk_00.unk_04) + 1); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v1->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - PaletteData_TintFromFile(ov12_0222332C(v0->unk_00.unk_04), v4, v3, ov12_0221FDE4(v0->unk_00.unk_04), 2, 0x20, v2 * 16, 196, 196, 196); + PaletteData_LoadBufferFromFileStartWithTint(ov12_0222332C(v0->unk_00.unk_04), v4, v3, ov12_0221FDE4(v0->unk_00.unk_04), 2, 0x20, v2 * 16, 196, 196, 196); SpriteActor_SetOAMMode(v1, GX_OAM_MODE_XLU); v1 = v0->unk_30; sub_0200D460(v1, ov12_0222339C(v0->unk_00.unk_04) + 1); v2 = sub_0201FAB4(CellActor_GetPaletteProxy(v1->unk_00), NNS_G2D_VRAM_TYPE_2DMAIN); - PaletteData_TintFromFile(ov12_0222332C(v0->unk_00.unk_04), v4, v3, ov12_0221FDE4(v0->unk_00.unk_04), 2, 0x20, v2 * 16, 196, 196, 196); + PaletteData_LoadBufferFromFileStartWithTint(ov12_0222332C(v0->unk_00.unk_04), v4, v3, ov12_0221FDE4(v0->unk_00.unk_04), 2, 0x20, v2 * 16, 196, 196, 196); SpriteActor_SetOAMMode(v1, GX_OAM_MODE_XLU); } diff --git a/src/palette.c b/src/palette.c index 11e408252e..7a5ba73757 100644 --- a/src/palette.c +++ b/src/palette.c @@ -3,608 +3,606 @@ #include #include +#include "constants/heap.h" + #include "hardware_palette.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02006E3C.h" -static u8 sub_0200327C(u16 param0, u16 param1); -static void sub_02003290(PaletteData *param0, u16 param1); -static void sub_020032D0(int param0, PaletteBuffer *param1, u16 *param2); -static void sub_0200330C(PaletteFadeControl *param0, u16 param1, s8 param2, u8 param3, u8 param4, u16 param5); -static void sub_020033CC(SysTask *param0, void *param1); -static void sub_02003468(PaletteData *param0); -static void sub_02003488(PaletteData *param0); -static void sub_020034A8(PaletteData *param0, u16 param1, u16 param2); -static void sub_02003504(PaletteData *param0, u16 param1, u16 param2); -static void sub_02003560(u16 *param0, u16 *param1, PaletteFadeControl *param2, u32 param3); -static void sub_020035EC(PaletteData *param0, u8 param1, PaletteFadeControl *param2); +#define SLOTS_PER_PALETTE 16 +#define PALETTE_SIZE (SLOTS_PER_PALETTE) +#define PALETTE_SIZE_EXT (SLOTS_PER_PALETTE * 16) -PaletteData *PaletteData_New(int param0) -{ - PaletteData *v0; +static u8 IsMaskedOn(u16 mask, u16 bit); +static void FlagFadedPaletteBuffer(PaletteData *paletteData, u16 bufferID); +static void FilterMaskToValidPalettes(int bufferID, PaletteBuffer *buffer, u16 *outMask); +static void SetTimedFadeParams(PaletteFadeControl *fade, u16 unfadedMask, s8 wait, u8 cur, u8 end, u16 target); +static void WaitAndApplyBlendStepToStdPaletteBuffers(PaletteData *paletteData); +static void WaitAndApplyBlendStepToExtPaletteBuffers(PaletteData *paletteData); +static void WaitAndApplyBlendStepToPaletteBuffer(PaletteData *paletteData, u16 bufferID, u16 paletteSize); +static void ApplyBlendStepToPaletteBuffer(PaletteData *paletteData, u16 bufferID, u16 paletteSize); +static void ApplyBlendStepToSinglePalette(u16 *unfaded, u16 *faded, PaletteFadeControl *fade, u32 paletteSize); +static void UpdateFadeBlendStep(PaletteData *paletteData, u8 bufferID, PaletteFadeControl *fade); - v0 = Heap_AllocFromHeap(param0, sizeof(PaletteData)); - MI_CpuClear8(v0, sizeof(PaletteData)); +static void SysTask_FadePalette(SysTask *task, void *data); + +PaletteData *PaletteData_New(enum HeapId heapID) +{ + PaletteData *paletteData = Heap_AllocFromHeap(heapID, sizeof(PaletteData)); + MI_CpuClear8(paletteData, sizeof(PaletteData)); - return v0; + return paletteData; } -void PaletteData_Free(PaletteData *param0) +void PaletteData_Free(PaletteData *paletteData) { - Heap_FreeToHeap(param0); + Heap_FreeToHeap(paletteData); } -void PaletteData_InitBuffer(PaletteData *param0, int param1, void *param2, void *param3, u32 param4) +void PaletteData_InitBuffer(PaletteData *paletteData, enum PaletteBufferID bufferID, void *unfaded, void *faded, u32 size) { - param0->buffers[param1].unfaded = (u16 *)param2; - param0->buffers[param1].faded = (u16 *)param3; - param0->buffers[param1].size = param4; + paletteData->buffers[bufferID].unfaded = (u16 *)unfaded; + paletteData->buffers[bufferID].faded = (u16 *)faded; + paletteData->buffers[bufferID].size = size; } -void PaletteData_AllocBuffer(PaletteData *param0, int param1, u32 param2, u32 param3) +void PaletteData_AllocBuffer(PaletteData *paletteData, enum PaletteBufferID bufferID, u32 size, u32 heapID) { - void *v0; - void *v1; - - v0 = Heap_AllocFromHeap(param3, param2); - v1 = Heap_AllocFromHeap(param3, param2); - - PaletteData_InitBuffer(param0, param1, v0, v1, param2); + void *unfaded = Heap_AllocFromHeap(heapID, size); + void *faded = Heap_AllocFromHeap(heapID, size); + PaletteData_InitBuffer(paletteData, bufferID, unfaded, faded, size); } -void PaletteData_FreeBuffer(PaletteData *param0, int param1) +void PaletteData_FreeBuffer(PaletteData *paletteData, enum PaletteBufferID bufferID) { - Heap_FreeToHeap(param0->buffers[param1].unfaded); - Heap_FreeToHeap(param0->buffers[param1].faded); + Heap_FreeToHeap(paletteData->buffers[bufferID].unfaded); + Heap_FreeToHeap(paletteData->buffers[bufferID].faded); } -void PaletteData_LoadBuffer(PaletteData *param0, const void *param1, int param2, u16 param3, u16 param4) +void PaletteData_LoadBuffer(PaletteData *paletteData, const void *src, enum PaletteBufferID bufferID, u16 destStart, u16 srcSize) { - MI_CpuCopy16(param1, (void *)¶m0->buffers[param2].unfaded[param3], (u32)param4); - MI_CpuCopy16(param1, (void *)¶m0->buffers[param2].faded[param3], (u32)param4); + MI_CpuCopy16(src, paletteData->buffers[bufferID].unfaded + destStart, srcSize); + MI_CpuCopy16(src, paletteData->buffers[bufferID].faded + destStart, srcSize); } -void PaletteData_LoadBufferFromFile(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6, u16 param7) +void PaletteData_LoadBufferFromFile(PaletteData *paletteData, u32 narcID, u32 narcMemberIdx, u32 heapID, enum PaletteBufferID bufferID, u32 srcSize, u16 destStart, u16 srcStart) { - NNSG2dPaletteData *v0; - void *v1; + NNSG2dPaletteData *palette; + void *ptr = sub_02006F88(narcID, narcMemberIdx, &palette, heapID); - v1 = sub_02006F88(bankID, memberIndex, &v0, param3); - GF_ASSERT(v1 != NULL); + GF_ASSERT(ptr != NULL); - if (param5 == 0) { - param5 = v0->szByte; + if (srcSize == 0) { + srcSize = palette->szByte; } - GF_ASSERT(param6 * sizeof(param6) + param5 <= param0->buffers[param4].size); + GF_ASSERT(destStart * sizeof(destStart) + srcSize <= paletteData->buffers[bufferID].size); - PaletteData_LoadBuffer(param0, &(((u16 *)(v0->pRawData))[param7]), param4, param6, param5); - Heap_FreeToHeap(v1); + PaletteData_LoadBuffer(paletteData, (u16 *)palette->pRawData + srcStart, bufferID, destStart, srcSize); + Heap_FreeToHeap(ptr); } -void PaletteData_LoadBufferFromFileStart(PaletteData *param0, u32 bankID, u32 memberIndex, u32 param3, int param4, u32 param5, u16 param6) +void PaletteData_LoadBufferFromFileStart(PaletteData *paletteData, u32 narcID, u32 narcMemberIdx, u32 heapID, enum PaletteBufferID bufferID, u32 srcSize, u16 destStart) { - PaletteData_LoadBufferFromFile(param0, bankID, memberIndex, param3, param4, param5, param6, 0); + PaletteData_LoadBufferFromFile(paletteData, narcID, narcMemberIdx, heapID, bufferID, srcSize, destStart, 0); } -void PaletteData_LoadBufferFromHardware(PaletteData *param0, int param1, u16 param2, u32 param3) +void PaletteData_LoadBufferFromHardware(PaletteData *paletteData, enum PaletteBufferID bufferID, u16 start, u32 size) { - u16 *v0; + GF_ASSERT(start * sizeof(start) + size <= paletteData->buffers[bufferID].size); - GF_ASSERT(param2 * sizeof(param2) + param3 <= param0->buffers[param1].size); - - switch (param1) { - case 0: - v0 = (u16 *)GetHardwareMainBgPaletteAddress(); + u16 *ptr; + switch (bufferID) { + case PLTTBUF_MAIN_BG: + ptr = GetHardwareMainBgPaletteAddress(); break; - case 1: - v0 = (u16 *)GetHardwareSubBgPaletteAddress(); + + case PLTTBUF_SUB_BG: + ptr = GetHardwareSubBgPaletteAddress(); break; - case 2: - v0 = (u16 *)GetHardwareMainObjPaletteAddress(); + + case PLTTBUF_MAIN_OBJ: + ptr = GetHardwareMainObjPaletteAddress(); break; - case 3: - v0 = (u16 *)GetHardwareSubObjPaletteAddress(); + + case PLTTBUF_SUB_OBJ: + ptr = GetHardwareSubObjPaletteAddress(); break; + default: GF_ASSERT(FALSE); return; } - PaletteData_LoadBuffer(param0, &v0[param2], param1, param2, param3); + PaletteData_LoadBuffer(paletteData, ptr + start, bufferID, start, size); } -void LoadPaletteFromFile(u32 param0, u32 param1, u32 param2, u32 param3, u16 param4, void *param5) +void LoadPaletteFromFile(u32 narcID, u32 narcMemberIdx, u32 heapID, u32 size, u16 start, void *dest) { - NNSG2dPaletteData *v0; - void *v1; + NNSG2dPaletteData *palette; + void *ptr = sub_02006F88(narcID, narcMemberIdx, &palette, heapID); - v1 = sub_02006F88(param0, param1, &v0, param2); - GF_ASSERT(v1 != NULL); + GF_ASSERT(ptr != NULL); - if (param3 == 0) { - param3 = v0->szByte; + if (size == 0) { + size = palette->szByte; } - MI_CpuCopy16(&(((u16 *)(v0->pRawData))[param4]), param5, param3); - Heap_FreeToHeap(v1); + MI_CpuCopy16((u16 *)palette->pRawData + start, dest, size); + Heap_FreeToHeap(ptr); } -void PaletteData_CopyBuffer(PaletteData *param0, int param1, u16 param2, int param3, u16 param4, u16 param5) +void PaletteData_CopyBuffer(PaletteData *palette, enum PaletteBufferID srcBufferID, u16 srcStart, enum PaletteBufferID destBufferID, u16 destStart, u16 size) { - MI_CpuCopy16((void *)¶m0->buffers[param1].unfaded[param2], (void *)¶m0->buffers[param3].unfaded[param4], param5); - MI_CpuCopy16((void *)¶m0->buffers[param1].unfaded[param2], (void *)¶m0->buffers[param3].faded[param4], param5); + MI_CpuCopy16(palette->buffers[srcBufferID].unfaded + srcStart, palette->buffers[destBufferID].unfaded + destStart, size); + MI_CpuCopy16(palette->buffers[srcBufferID].unfaded + srcStart, palette->buffers[destBufferID].faded + destStart, size); } -u16 *PaletteData_GetUnfadedBuffer(PaletteData *param0, int param1) +u16 *PaletteData_GetUnfadedBuffer(PaletteData *palette, enum PaletteBufferID bufferID) { - return param0->buffers[param1].unfaded; + return palette->buffers[bufferID].unfaded; } -u16 *PaletteData_GetFadedBuffer(PaletteData *param0, int param1) +u16 *PaletteData_GetFadedBuffer(PaletteData *palette, enum PaletteBufferID bufferID) { - return param0->buffers[param1].faded; + return palette->buffers[bufferID].faded; } -u8 PaletteData_StartFade(PaletteData *param0, u16 param1, u16 param2, s8 param3, u8 param4, u8 param5, u16 param6) +u8 PaletteData_StartFade(PaletteData *paletteData, u16 buffersToFade, u16 palettesToFade, s8 wait, u8 cur, u8 end, u16 target) { - u16 v0; - u8 v1; - u8 v2; - - v0 = param2; - v1 = 0; + u16 inPalettesToFade = palettesToFade; + u8 palettesFaded = FALSE; + u8 bufferID; - for (v2 = 0; v2 < (4 + 10); v2++) { - if ((sub_0200327C(param1, v2) == 1) && (sub_0200327C(param0->selectedBuffers, v2) == 0)) { - sub_020032D0(v2, ¶m0->buffers[v2], ¶m2); - sub_0200330C(¶m0->buffers[v2].selected, param2, param3, param4, param5, param6); - sub_02003290(param0, v2); + for (bufferID = PLTTBUF_MAIN_BG; bufferID < PLTTBUF_MAX; bufferID++) { + if (IsMaskedOn(buffersToFade, bufferID) == TRUE && !IsMaskedOn(paletteData->selectedBuffers, bufferID)) { + FilterMaskToValidPalettes(bufferID, &paletteData->buffers[bufferID], &palettesToFade); + SetTimedFadeParams(&paletteData->buffers[bufferID].selected, palettesToFade, wait, cur, end, target); + FlagFadedPaletteBuffer(paletteData, bufferID); - if (v2 >= 4) { - sub_02003504(param0, v2, 256); + if (bufferID >= PLTTBUF_EX_BEGIN) { + ApplyBlendStepToPaletteBuffer(paletteData, bufferID, PALETTE_SIZE_EXT); } else { - sub_02003504(param0, v2, 16); + ApplyBlendStepToPaletteBuffer(paletteData, bufferID, PALETTE_SIZE); } - param2 = v0; - v1 = 1; + palettesToFade = inPalettesToFade; + palettesFaded = TRUE; } } - if (v1 == 1) { - param0->selectedBuffers |= param1; + if (palettesFaded == TRUE) { + paletteData->selectedBuffers |= buffersToFade; - if (param0->callbackFlag == 0) { - param0->callbackFlag = 1; - param0->selectedFlag = 1; - param0->forceExit = 0; + if (paletteData->fadeInProgress == FALSE) { + paletteData->fadeInProgress = TRUE; + paletteData->selectedFlag = TRUE; + paletteData->forceExit = FALSE; - SysTask_Start(sub_020033CC, param0, (0xffffffff - 1)); + SysTask_Start(SysTask_FadePalette, paletteData, 0xFFFFFFFE); } } - return v1; + return palettesFaded; } -static u8 sub_0200327C(u16 param0, u16 param1) +static u8 IsMaskedOn(u16 mask, u16 bit) { - if ((param0 & (1 << param1)) != 0) { - return 1; - } - - return 0; + return (mask & (1 << bit)) != 0; } -static void sub_02003290(PaletteData *param0, u16 param1) +static void FlagFadedPaletteBuffer(PaletteData *paletteData, u16 bufferID) { - if (sub_0200327C(param0->transparentBits, param1) == 1) { - return; + if (IsMaskedOn(paletteData->fadedBuffers, bufferID) != TRUE) { + paletteData->fadedBuffers |= (1 << bufferID); } - - param0->transparentBits |= (1 << param1); } -static void sub_020032D0(int param0, PaletteBuffer *param1, u16 *param2) +static void FilterMaskToValidPalettes(int bufferID, PaletteBuffer *buffer, u16 *outMask) { - u16 v0; - u8 v1, v2; - - if (param0 < 4) { - v2 = param1->size / 32; + u8 singlePaletteSize; + if (bufferID < PLTTBUF_EX_BEGIN) { + singlePaletteSize = buffer->size / (PALETTE_SIZE * 2); } else { - v2 = param1->size / 512; + singlePaletteSize = buffer->size / (PALETTE_SIZE_EXT * 2); } - v0 = 0; - - for (v1 = 0; v1 < v2; v1++) { - v0 += (1 << v1); + u16 validPalettesMask = 0; + for (u8 i = 0; i < singlePaletteSize; i++) { + validPalettesMask += (1 << i); } - *param2 &= v0; + *outMask &= validPalettesMask; } -static void sub_0200330C(PaletteFadeControl *param0, u16 param1, s8 param2, u8 param3, u8 param4, u16 param5) +static void SetTimedFadeParams(PaletteFadeControl *fade, u16 unfadedMask, s8 wait, u8 cur, u8 end, u16 target) { - if (param2 < 0) { - param0->step = 2 + abs(param2); - param0->wait = 0; + if (wait < 0) { + fade->step = 2 + abs(wait); + fade->wait = 0; } else { - param0->step = 2; - param0->wait = param2; + fade->step = 2; + fade->wait = wait; } - param0->isOpaque = param1; - param0->cur = param3; - param0->end = param4; - param0->nextRGB = param5; - param0->waitStep = param0->wait; + fade->unfadedMask = unfadedMask; + fade->cur = cur; + fade->end = end; + fade->target = target; + fade->waitStep = fade->wait; - if (param3 < param4) { - param0->sign = 0; + if (cur < end) { + fade->sign = 0; } else { - param0->sign = 1; + fade->sign = 1; } } -static void sub_020033CC(SysTask *param0, void *param1) +static void SysTask_FadePalette(SysTask *task, void *data) { - PaletteData *v0 = param1; + PaletteData *paletteData = data; - if (v0->forceExit == 1) { - v0->forceExit = 0; - v0->transparentBits = 0; - v0->selectedBuffers = 0; - v0->callbackFlag = 0; - SysTask_Done(param0); + if (paletteData->forceExit == TRUE) { + paletteData->forceExit = FALSE; + paletteData->fadedBuffers = 0; + paletteData->selectedBuffers = 0; + paletteData->fadeInProgress = FALSE; + SysTask_Done(task); return; } - if (v0->selectedFlag != 1) { + if (paletteData->selectedFlag != TRUE) { return; } - v0->transparentBits = v0->selectedBuffers; + paletteData->fadedBuffers = paletteData->selectedBuffers; - sub_02003468(v0); - sub_02003488(v0); + WaitAndApplyBlendStepToStdPaletteBuffers(paletteData); + WaitAndApplyBlendStepToExtPaletteBuffers(paletteData); - if (v0->selectedBuffers == 0) { - v0->callbackFlag = 0; - SysTask_Done(param0); + if (paletteData->selectedBuffers == 0) { + paletteData->fadeInProgress = FALSE; + SysTask_Done(task); } } -static void sub_02003468(PaletteData *param0) +static void WaitAndApplyBlendStepToStdPaletteBuffers(PaletteData *paletteData) { - u8 v0, v1; - - for (v0 = 0; v0 < 4; v0++) { - sub_020034A8(param0, v0, 16); + for (u8 i = PLTTBUF_MAIN_BG; i < PLTTBUF_EX_BEGIN; i++) { + WaitAndApplyBlendStepToPaletteBuffer(paletteData, i, PALETTE_SIZE); } } -static void sub_02003488(PaletteData *param0) +static void WaitAndApplyBlendStepToExtPaletteBuffers(PaletteData *paletteData) { - u8 v0, v1; - - for (v0 = 4; v0 < (4 + 10); v0++) { - sub_020034A8(param0, v0, 256); + for (u8 i = PLTTBUF_EX_BEGIN; i < PLTTBUF_MAX; i++) { + WaitAndApplyBlendStepToPaletteBuffer(paletteData, i, PALETTE_SIZE_EXT); } } -static void sub_020034A8(PaletteData *param0, u16 param1, u16 param2) +static void WaitAndApplyBlendStepToPaletteBuffer(PaletteData *paletteData, u16 bufferID, u16 paletteSize) { - if (sub_0200327C(param0->selectedBuffers, param1) == 0) { + if (!IsMaskedOn(paletteData->selectedBuffers, bufferID)) { return; } - if (param0->buffers[param1].selected.waitStep < param0->buffers[param1].selected.wait) { - param0->buffers[param1].selected.waitStep++; + if (paletteData->buffers[bufferID].selected.waitStep < paletteData->buffers[bufferID].selected.wait) { + paletteData->buffers[bufferID].selected.waitStep++; return; - } else { - param0->buffers[param1].selected.waitStep = 0; } - sub_02003504(param0, param1, param2); + paletteData->buffers[bufferID].selected.waitStep = 0; + ApplyBlendStepToPaletteBuffer(paletteData, bufferID, paletteSize); } -static void sub_02003504(PaletteData *param0, u16 param1, u16 param2) -{ - u32 v0; +#define BlendColor(source, target, fraction) ((source) + (((target) - (source)) * (fraction) >> 4)) + +#define ColorR(source) ((source) & 0x1F) +#define ColorG(source) (((source) >> 5) & 0x1F) +#define ColorB(source) (((source) >> 10) & 0x1F) +#define RGB(r, g, b) (((b) << 10) | ((g) << 5) | (r)) - for (v0 = 0; v0 < 16; v0++) { - if (sub_0200327C(param0->buffers[param1].selected.isOpaque, v0) == 0) { +static void ApplyBlendStepToPaletteBuffer(PaletteData *paletteData, u16 bufferID, u16 paletteSize) +{ + for (u32 i = 0; i < SLOTS_PER_PALETTE; i++) { + if (!IsMaskedOn(paletteData->buffers[bufferID].selected.unfadedMask, i)) { continue; } - sub_02003560(¶m0->buffers[param1].unfaded[v0 * param2], ¶m0->buffers[param1].faded[v0 * param2], ¶m0->buffers[param1].selected, param2); + ApplyBlendStepToSinglePalette(&paletteData->buffers[bufferID].unfaded[i * paletteSize], &paletteData->buffers[bufferID].faded[i * paletteSize], &paletteData->buffers[bufferID].selected, paletteSize); } - sub_020035EC(param0, param1, ¶m0->buffers[param1].selected); + UpdateFadeBlendStep(paletteData, bufferID, &paletteData->buffers[bufferID].selected); } -static void sub_02003560(u16 *param0, u16 *param1, PaletteFadeControl *param2, u32 param3) +static void ApplyBlendStepToSinglePalette(u16 *unfaded, u16 *faded, PaletteFadeControl *fade, u32 paletteSize) { - u32 v0; - u8 v1, v2, v3; + u32 i; + u8 r, g, b; - for (v0 = 0; v0 < param3; v0++) { - v1 = ((param0[v0] & 0x1f) + (((param2->nextRGB & 0x1f) - (param0[v0] & 0x1f)) * param2->cur >> 4)); - v2 = (((param0[v0] >> 5) & 0x1f) + ((((param2->nextRGB >> 5) & 0x1f) - ((param0[v0] >> 5) & 0x1f)) * param2->cur >> 4)); - v3 = (((param0[v0] >> 10) & 0x1f) + ((((param2->nextRGB >> 10) & 0x1f) - ((param0[v0] >> 10) & 0x1f)) * param2->cur >> 4)); + for (i = 0; i < paletteSize; i++) { + r = BlendColor(ColorR(unfaded[i]), ColorR(fade->target), fade->cur); + g = BlendColor(ColorG(unfaded[i]), ColorG(fade->target), fade->cur); + b = BlendColor(ColorB(unfaded[i]), ColorB(fade->target), fade->cur); - param1[v0] = (v3 << 10) | (v2 << 5) | v1; + faded[i] = RGB(r, g, b); } } -static void sub_020035EC(PaletteData *param0, u8 param1, PaletteFadeControl *param2) +static void UpdateFadeBlendStep(PaletteData *paletteData, u8 bufferID, PaletteFadeControl *fade) { - s16 v0; + s16 next; - if (param2->cur == param2->end) { - if ((param0->selectedBuffers & (1 << param1)) != 0) { - param0->selectedBuffers ^= (1 << param1); + if (fade->cur == fade->end) { + if (paletteData->selectedBuffers & (1 << bufferID)) { + paletteData->selectedBuffers ^= (1 << bufferID); } - } else if (param2->sign == 0) { - v0 = param2->cur; - v0 += param2->step; + } else if (fade->sign == 0) { + next = fade->cur; + next += fade->step; - if (v0 > param2->end) { - v0 = param2->end; + if (next > fade->end) { + next = fade->end; } - param2->cur = v0; + fade->cur = next; } else { - v0 = param2->cur; - v0 -= param2->step; + next = fade->cur; + next -= fade->step; - if (v0 < param2->end) { - v0 = param2->end; + if (next < fade->end) { + next = fade->end; } - param2->cur = v0; + fade->cur = next; } } -void PaletteData_CommitFadedBuffers(PaletteData *param0) +void PaletteData_CommitFadedBuffers(PaletteData *paletteData) { - if ((param0->autoTransparent == 0) && (param0->selectedFlag != 1)) { + if (paletteData->autoTransparent == FALSE && paletteData->selectedFlag != TRUE) { return; } - { - int v0; - - for (v0 = 0; v0 < (4 + 10); v0++) { - if (param0->autoTransparent == 0) { - if ((param0->buffers[v0].faded == NULL) || (sub_0200327C(param0->transparentBits, v0) == 0)) { - continue; - } + for (int bufferID = PLTTBUF_MAIN_BG; bufferID < PLTTBUF_MAX; bufferID++) { + if (paletteData->autoTransparent == 0) { + if ((paletteData->buffers[bufferID].faded == NULL) || (IsMaskedOn(paletteData->fadedBuffers, bufferID) == 0)) { + continue; } + } - DC_FlushRange((void *)param0->buffers[v0].faded, param0->buffers[v0].size); - - switch (v0) { - case 0: - GX_LoadBGPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); - break; - case 1: - GXS_LoadBGPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); - break; - case 2: - GX_LoadOBJPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); - break; - case 3: - GXS_LoadOBJPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); - break; - case 4: - GX_BeginLoadBGExtPltt(); - GX_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x0, param0->buffers[v0].size); - GX_EndLoadBGExtPltt(); - break; - case 5: - GX_BeginLoadBGExtPltt(); - GX_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x2000, param0->buffers[v0].size); - GX_EndLoadBGExtPltt(); - break; - case 6: - GX_BeginLoadBGExtPltt(); - GX_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x4000, param0->buffers[v0].size); - GX_EndLoadBGExtPltt(); - break; - case 7: - GX_BeginLoadBGExtPltt(); - GX_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x6000, param0->buffers[v0].size); - GX_EndLoadBGExtPltt(); - break; - case 8: - GXS_BeginLoadBGExtPltt(); - GXS_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x0, param0->buffers[v0].size); - GXS_EndLoadBGExtPltt(); - break; - case 9: - GXS_BeginLoadBGExtPltt(); - GXS_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x2000, param0->buffers[v0].size); - GXS_EndLoadBGExtPltt(); - break; - case 10: - GXS_BeginLoadBGExtPltt(); - GXS_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x4000, param0->buffers[v0].size); - GXS_EndLoadBGExtPltt(); - break; - case 11: - GXS_BeginLoadBGExtPltt(); - GXS_LoadBGExtPltt((const void *)param0->buffers[v0].faded, 0x6000, param0->buffers[v0].size); - GXS_EndLoadBGExtPltt(); - break; - case 12: - GX_BeginLoadOBJExtPltt(); - GX_LoadOBJExtPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); - GX_EndLoadOBJExtPltt(); - break; - case 13: - GXS_BeginLoadOBJExtPltt(); - GXS_LoadOBJExtPltt((const void *)param0->buffers[v0].faded, 0, param0->buffers[v0].size); - GXS_EndLoadOBJExtPltt(); - } + DC_FlushRange(paletteData->buffers[bufferID].faded, paletteData->buffers[bufferID].size); + + switch (bufferID) { + case PLTTBUF_MAIN_BG: + GX_LoadBGPltt(paletteData->buffers[bufferID].faded, 0, paletteData->buffers[bufferID].size); + break; + + case PLTTBUF_SUB_BG: + GXS_LoadBGPltt(paletteData->buffers[bufferID].faded, 0, paletteData->buffers[bufferID].size); + break; + + case PLTTBUF_MAIN_OBJ: + GX_LoadOBJPltt(paletteData->buffers[bufferID].faded, 0, paletteData->buffers[bufferID].size); + break; + + case PLTTBUF_SUB_OBJ: + GXS_LoadOBJPltt(paletteData->buffers[bufferID].faded, 0, paletteData->buffers[bufferID].size); + break; + + case PLTTBUF_MAIN_EX_BG_0: + GX_BeginLoadBGExtPltt(); + GX_LoadBGExtPltt(paletteData->buffers[bufferID].faded, 0x0, paletteData->buffers[bufferID].size); + GX_EndLoadBGExtPltt(); + break; + + case PLTTBUF_MAIN_EX_BG_1: + GX_BeginLoadBGExtPltt(); + GX_LoadBGExtPltt(paletteData->buffers[bufferID].faded, 0x2000, paletteData->buffers[bufferID].size); + GX_EndLoadBGExtPltt(); + break; + + case PLTTBUF_MAIN_EX_BG_2: + GX_BeginLoadBGExtPltt(); + GX_LoadBGExtPltt(paletteData->buffers[bufferID].faded, 0x4000, paletteData->buffers[bufferID].size); + GX_EndLoadBGExtPltt(); + break; + + case PLTTBUF_MAIN_EX_BG_3: + GX_BeginLoadBGExtPltt(); + GX_LoadBGExtPltt((const void *)paletteData->buffers[bufferID].faded, 0x6000, paletteData->buffers[bufferID].size); + GX_EndLoadBGExtPltt(); + break; + + case PLTTBUF_SUB_EX_BG_0: + GXS_BeginLoadBGExtPltt(); + GXS_LoadBGExtPltt((const void *)paletteData->buffers[bufferID].faded, 0x0, paletteData->buffers[bufferID].size); + GXS_EndLoadBGExtPltt(); + break; + + case PLTTBUF_SUB_EX_BG_1: + GXS_BeginLoadBGExtPltt(); + GXS_LoadBGExtPltt((const void *)paletteData->buffers[bufferID].faded, 0x2000, paletteData->buffers[bufferID].size); + GXS_EndLoadBGExtPltt(); + break; + + case PLTTBUF_SUB_EX_BG_2: + GXS_BeginLoadBGExtPltt(); + GXS_LoadBGExtPltt((const void *)paletteData->buffers[bufferID].faded, 0x4000, paletteData->buffers[bufferID].size); + GXS_EndLoadBGExtPltt(); + break; + + case PLTTBUF_SUB_EX_BG_3: + GXS_BeginLoadBGExtPltt(); + GXS_LoadBGExtPltt((const void *)paletteData->buffers[bufferID].faded, 0x6000, paletteData->buffers[bufferID].size); + GXS_EndLoadBGExtPltt(); + break; + + case PLTTBUF_MAIN_EX_OBJ: + GX_BeginLoadOBJExtPltt(); + GX_LoadOBJExtPltt((const void *)paletteData->buffers[bufferID].faded, 0, paletteData->buffers[bufferID].size); + GX_EndLoadOBJExtPltt(); + break; + + case PLTTBUF_SUB_EX_OBJ: + GXS_BeginLoadOBJExtPltt(); + GXS_LoadOBJExtPltt((const void *)paletteData->buffers[bufferID].faded, 0, paletteData->buffers[bufferID].size); + GXS_EndLoadOBJExtPltt(); } } - param0->transparentBits = param0->selectedBuffers; + paletteData->fadedBuffers = paletteData->selectedBuffers; - if (param0->transparentBits == 0) { - param0->selectedFlag = 0; + if (paletteData->fadedBuffers == 0) { + paletteData->selectedFlag = 0; } } -u16 PaletteData_GetSelectedBuffersMask(PaletteData *param0) +u16 PaletteData_GetSelectedBuffersMask(PaletteData *paletteData) { - return param0->selectedBuffers; + return paletteData->selectedBuffers; } -void PaletteData_SetAutoTransparent(PaletteData *param0, int param1) +void PaletteData_SetAutoTransparent(PaletteData *paletteData, int val) { - param0->autoTransparent = param1; + paletteData->autoTransparent = val; } -void PaletteData_SelectAll(PaletteData *param0, u8 param1) +void PaletteData_SelectAll(PaletteData *paletteData, u8 val) { - param0->selectedFlag = param1 & 0x1; - param0->selectedBuffers = 0xFFFFFFFF; + paletteData->selectedFlag = val & 1; + paletteData->selectedBuffers = PLTTBUF_ALL_F; } -void PaletteData_FillBufferRange(PaletteData *param0, int param1, int param2, u16 param3, u16 param4, u16 param5) +void PaletteData_FillBufferRange(PaletteData *paletteData, enum PaletteBufferID bufferID, enum PaletteSelector selector, u16 fillVal, u16 start, u16 end) { - GF_ASSERT(param5 * sizeof(u16) <= param0->buffers[param1].size); + GF_ASSERT(end * sizeof(u16) <= paletteData->buffers[bufferID].size); - if ((param2 == 1) || (param2 == 2)) { - MI_CpuFill16(¶m0->buffers[param1].unfaded[param4], param3, (param5 - param4) * 2); + if (selector == PLTTSEL_UNFADED || selector == PLTTSEL_BOTH) { + MI_CpuFill16(&paletteData->buffers[bufferID].unfaded[start], fillVal, (end - start) * 2); } - if ((param2 == 0) || (param2 == 2)) { - MI_CpuFill16(¶m0->buffers[param1].faded[param4], param3, (param5 - param4) * 2); + if (selector == PLTTSEL_FADED || selector == PLTTSEL_BOTH) { + MI_CpuFill16(&paletteData->buffers[bufferID].faded[start], fillVal, (end - start) * 2); } } -u16 PaletteData_GetBufferIndexColor(PaletteData *param0, int param1, int param2, u16 param3) +u16 PaletteData_GetBufferIndexColor(PaletteData *paletteData, enum PaletteBufferID bufferID, enum PaletteSelector selector, u16 index) { - if (param2 == 1) { - return param0->buffers[param1].unfaded[param3]; + if (selector == PLTTSEL_UNFADED) { + return paletteData->buffers[bufferID].unfaded[index]; } - if (param2 == 0) { - return param0->buffers[param1].faded[param3]; + if (selector == PLTTSEL_FADED) { + return paletteData->buffers[bufferID].faded[index]; } GF_ASSERT(FALSE); return 0; } -void BlendPalette(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4) +void BlendPalette(const u16 *src, u16 *dest, u16 size, u8 fraction, u16 target) { - u16 v0; - int v1, v2, v3; - int v4, v5, v6; + u16 i; + int srcR, srcG, srcB; + int targetR, targetG, targetB; - v4 = ((RgbColor *)¶m4)->r; - v5 = ((RgbColor *)¶m4)->g; - v6 = ((RgbColor *)¶m4)->b; + targetR = ((RgbColor *)&target)->r; + targetG = ((RgbColor *)&target)->g; + targetB = ((RgbColor *)&target)->b; - for (v0 = 0; v0 < param2; v0++) { - v1 = ((RgbColor *)¶m0[v0])->r; - v2 = ((RgbColor *)¶m0[v0])->g; - v3 = ((RgbColor *)¶m0[v0])->b; + for (i = 0; i < size; i++) { + srcR = ((RgbColor *)&src[i])->r; + srcG = ((RgbColor *)&src[i])->g; + srcB = ((RgbColor *)&src[i])->b; - param1[v0] = (v1 + ((v4 - v1) * param3 >> 4)) | ((v2 + ((v5 - v2) * param3 >> 4)) << 5) | ((v3 + ((v6 - v3) * param3 >> 4)) << 10); + dest[i] = BlendColor(srcR, targetR, fraction) | (BlendColor(srcG, targetG, fraction) << 5) | (BlendColor(srcB, targetB, fraction) << 10); } } -void PaletteData_Blend(PaletteData *param0, int param1, u16 param2, u16 param3, u8 param4, u16 param5) +void PaletteData_Blend(PaletteData *paletteData, enum PaletteBufferID bufferID, u16 index, u16 size, u8 fraction, u16 target) { - GF_ASSERT(param0->buffers[param1].unfaded != NULL && param0->buffers[param1].faded != NULL); - BlendPalette(¶m0->buffers[param1].unfaded[param2], ¶m0->buffers[param1].faded[param2], param3, param4, param5); + GF_ASSERT(paletteData->buffers[bufferID].unfaded != NULL && paletteData->buffers[bufferID].faded != NULL); + BlendPalette(&paletteData->buffers[bufferID].unfaded[index], &paletteData->buffers[bufferID].faded[index], size, fraction, target); } -void BlendPalettes(const u16 *param0, u16 *param1, u16 param2, u8 param3, u16 param4) +void BlendPalettes(const u16 *sources, u16 *dests, u16 toBlend, u8 fraction, u16 target) { - int v0 = 0; - - while (param2) { - if (param2 & 1) { - BlendPalette(¶m0[v0], ¶m1[v0], 16, param3, param4); + int index = 0; + while (toBlend) { + if (toBlend & 1) { + BlendPalette(&sources[index], &dests[index], SLOTS_PER_PALETTE, fraction, target); } - param2 >>= 1; - v0 += 16; + toBlend >>= 1; + index += SLOTS_PER_PALETTE; } } -void PaletteData_BlendMulti(PaletteData *param0, int param1, u16 param2, u8 param3, u16 param4) +void PaletteData_BlendMulti(PaletteData *paletteData, enum PaletteBufferID bufferID, u16 toBlend, u8 fraction, u16 target) { - int v0 = 0; + int index = 0; - GF_ASSERT(param0->buffers[param1].unfaded != NULL && param0->buffers[param1].faded != NULL); + GF_ASSERT(paletteData->buffers[bufferID].unfaded != NULL && paletteData->buffers[bufferID].faded != NULL); - while (param2) { - if (param2 & 1) { - PaletteData_Blend(param0, param1, v0, 16, param3, param4); + while (toBlend) { + if (toBlend & 1) { + PaletteData_Blend(paletteData, bufferID, index, SLOTS_PER_PALETTE, fraction, target); } - param2 >>= 1; - v0 += 16; + toBlend >>= 1; + index += SLOTS_PER_PALETTE; } } -void TintPalette(u16 *param0, int param1, int param2, int param3, int param4) +void TintPalette(u16 *palette, int numColorsToTint, int tintR, int tintG, int tintB) { - int v0, v1, v2, v3; - u32 v4; + int i, r, g, b; + u32 gray; - for (v0 = 0; v0 < param1; v0++) { - v1 = ((*param0) & 0x1f); - v2 = (((*param0) >> 5) & 0x1f); - v3 = (((*param0) >> 10) & 0x1f); + for (i = 0; i < numColorsToTint; i++) { + r = ColorR(*palette); + g = ColorG(*palette); + b = ColorB(*palette); - v4 = (((v1) * 76 + (v2) * 151 + (v3) * 29) >> 8); + // 0.3 red + 0.59 g + 0.1133 b + gray = (76 * r + 151 * g + 29 * b) >> 8; - v1 = ((u16)((param2) * (v4)) >> 8); - v2 = ((u16)((param3) * (v4)) >> 8); - v3 = ((u16)((param4) * (v4)) >> 8); + r = (u16)(tintR * gray) >> 8; + g = (u16)(tintG * gray) >> 8; + b = (u16)(tintB * gray) >> 8; - if (v1 > 31) { - v1 = 31; + if (r > 31) { + r = 31; } - if (v2 > 31) { - v2 = 31; + if (g > 31) { + g = 31; } - if (v3 > 31) { - v3 = 31; + if (b > 31) { + b = 31; } - *param0 = (u16)((v3 << 10) | (v2 << 5) | v1); - param0++; + *palette = RGB(r, g, b); + palette++; } } -void PaletteData_TintFromFile(PaletteData *param0, u32 param1, u32 param2, u32 param3, int param4, u32 param5, u16 param6, int param7, int param8, int param9) +void PaletteData_LoadBufferFromFileStartWithTint(PaletteData *paletteData, u32 narcID, u32 narcMemberIdx, u32 heapID, enum PaletteBufferID bufferID, u32 size, u16 start, int r, int g, int b) { - NNSG2dPaletteData *v0; - void *v1; + NNSG2dPaletteData *palette; + void *ptr = sub_02006F88(narcID, narcMemberIdx, &palette, heapID); - v1 = sub_02006F88(param1, param2, &v0, param3); - GF_ASSERT(v1 != NULL); + GF_ASSERT(ptr != NULL); - if (param5 == 0) { - param5 = v0->szByte; + if (size == 0) { + size = palette->szByte; } - TintPalette(v0->pRawData, 16, param7, param8, param9); - PaletteData_LoadBuffer(param0, v0->pRawData, param4, param6, param5); - Heap_FreeToHeap(v1); + TintPalette(palette->pRawData, SLOTS_PER_PALETTE, r, g, b); + PaletteData_LoadBuffer(paletteData, palette->pRawData, bufferID, start, size); + Heap_FreeToHeap(ptr); } diff --git a/src/unk_0200C6E4.c b/src/unk_0200C6E4.c index 5173c99073..ed93a0d749 100644 --- a/src/unk_0200C6E4.c +++ b/src/unk_0200C6E4.c @@ -466,7 +466,7 @@ u8 sub_0200CD7C(PaletteData *param0, int param1, SpriteRenderer *param2, SpriteG return v0; } -u8 SpriteRenderer_LoadPalette(PaletteData *param0, enum PaletteFadeBufferId param1, SpriteRenderer *param2, SpriteGfxHandler *param3, NARC *param4, int param5, BOOL param6, int param7, int param8, int param9) +u8 SpriteRenderer_LoadPalette(PaletteData *param0, enum PaletteBufferID param1, SpriteRenderer *param2, SpriteGfxHandler *param3, NARC *param4, int param5, BOOL param6, int param7, int param8, int param9) { int v0; From 97d1986ee13d15459eb2335e2d53e764b6ddc603 Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 13:48:18 -0700 Subject: [PATCH 06/11] Collapse NARC struct decl into narc.h, clean up narc.c --- include/battle/healthbar.h | 2 +- include/battle/ov16_0226871C.h | 2 +- include/battle/struct_ov16_0225BFFC_t.h | 2 +- include/berry_data.h | 2 +- include/easy3d_object.h | 2 +- include/inlines.h | 2 +- include/map_object.h | 2 +- include/message.h | 3 +- include/narc.h | 22 +- include/overlay005/encounter_effect.h | 3 +- include/overlay005/ov5_021D2F14.h | 2 +- include/overlay005/ov5_021E15F4.h | 4 +- include/overlay005/ov5_021E779C.h | 3 +- include/overlay005/ov5_021EEF34.h | 3 +- include/overlay005/ov5_021F067C.h | 4 +- include/overlay012/ov12_022237EC.h | 2 +- include/overlay017/ov17_02241270.h | 3 +- include/overlay017/ov17_022413D8.h | 2 +- include/overlay017/ov17_022476F8.h | 3 +- include/overlay017/ov17_0224A0FC.h | 3 +- include/overlay017/ov17_02250744.h | 3 +- include/overlay019/ov19_021D8B54.h | 3 +- include/overlay019/ov19_021DA270.h | 3 +- include/overlay019/ov19_021DA814.h | 3 +- include/overlay019/ov19_021DA92C.h | 3 +- include/overlay019/ov19_021DB2FC.h | 3 +- include/overlay019/ov19_021DB8E4.h | 3 +- include/overlay019/ov19_021DC5F0.h | 3 +- include/overlay019/ov19_021DCF88.h | 3 +- include/overlay019/ov19_021DEC04.h | 3 +- include/overlay019/struct_ov19_021DA384.h | 3 +- include/overlay020/ov20_021D2EA4.h | 3 +- include/overlay020/ov20_021D3864.h | 3 +- include/overlay020/ov20_021D3A54.h | 3 +- include/overlay020/ov20_021D4728.h | 3 +- include/overlay021/ov21_021D1FA4.h | 2 +- include/overlay021/struct_ov21_021D13FC.h | 2 +- include/overlay022/ov22_02255094.h | 3 +- include/overlay022/struct_ov22_02256BAC.h | 2 +- include/overlay022/struct_ov22_0225A0E4.h | 2 +- include/overlay062/ov62_02231690.h | 2 +- include/overlay062/struct_ov62_0223118C.h | 2 +- .../overlay062/struct_ov62_0223E01C_sub2.h | 4 +- .../overlay062/struct_ov62_02246BF4_sub2.h | 2 +- include/overlay065/ov65_02235060.h | 3 +- include/overlay070/ov70_0225C700.h | 3 +- include/overlay071/ov71_0223CF0C.h | 4 +- include/overlay076/ov76_0223B870.h | 2 +- include/overlay076/struct_ov76_0223DE00.h | 2 +- include/overlay083/ov83_0223D6A8.h | 2 +- include/overlay084/struct_ov84_0223B5A0.h | 2 +- include/overlay099/struct_ov99_021D2CB0.h | 2 +- include/overlay100/ov100_021D46C8.h | 3 +- include/overlay100/struct_ov100_021D46C8.h | 2 +- include/overlay101/ov101_021D7E48.h | 3 +- include/overlay101/struct_ov101_021D13C8.h | 2 +- include/overlay104/ov104_0223D768.h | 2 +- include/overlay113/ov113_0225E368.h | 3 +- include/overlay116/ov116_02261870.h | 2 +- include/overlay116/struct_ov116_022649E4.h | 2 +- include/overlay119/struct_ov119_021D17B8.h | 2 +- include/pokemon.h | 2 +- include/sprite_resource.h | 3 +- include/struct_decls/struct_02006C24_decl.h | 6 - include/struct_defs/pokemon_summary_app.h | 2 +- include/struct_defs/struct_0207AE68_t.h | 2 +- include/struct_defs/struct_02089688_sub1.h | 2 +- include/struct_defs/struct_0208B878_sub1.h | 2 +- include/unk_02006E3C.h | 3 +- include/unk_0200C6E4.h | 2 +- include/unk_02073838.h | 3 +- include/unk_02082C2C.h | 3 +- include/unk_0208C098.h | 3 +- src/battle/battle_display.c | 1 - src/battle/battle_io_command.c | 1 - src/battle/healthbar.c | 1 - src/battle/ov16_0223B140.c | 1 - src/battle/ov16_02268520.c | 1 - src/battle/ov16_0226871C.c | 2 +- src/battle/ov16_0226DB7C.c | 1 - src/battle/ov16_0226DE44.c | 1 - src/battle/ov16_0226E148.c | 1 - src/battle/party_gauge.c | 1 - src/berry_data.c | 2 - src/dw_warp/dw_warp.c | 1 - src/easy3d_object.c | 3 +- src/field_menu.c | 1 - src/map_object.c | 2 +- src/message.c | 2 - src/narc.c | 466 +++++++++--------- src/overlay005/encounter_effect.c | 1 - src/overlay005/ov5_021D2F14.c | 2 +- src/overlay005/ov5_021D37AC.c | 2 - src/overlay005/ov5_021D5CB0.c | 2 - src/overlay005/ov5_021D5EB8.c | 2 - src/overlay005/ov5_021DF440.c | 1 - src/overlay005/ov5_021E15F4.c | 2 - src/overlay005/ov5_021E779C.c | 9 +- src/overlay005/ov5_021ECC20.c | 1 - src/overlay005/ov5_021ECE40.c | 2 +- src/overlay005/ov5_021EEF34.c | 2 - src/overlay005/ov5_021EF75C.c | 2 - src/overlay005/ov5_021F067C.c | 2 - src/overlay006/ov6_0223E140.c | 1 - src/overlay006/ov6_022426AC.c | 1 - src/overlay006/ov6_02243258.c | 1 - src/overlay006/ov6_02248050.c | 1 - src/overlay007/ov7_0224BE9C.c | 1 - src/overlay007/ov7_0224CD28.c | 1 - src/overlay009/ov9_02249960.c | 1 - src/overlay010/ov10_0221F800.c | 1 - src/overlay012/ov12_0221FC20.c | 1 - src/overlay012/ov12_022237EC.c | 1 - src/overlay012/ov12_02235E94.c | 1 - src/overlay012/ov12_022380BC.c | 1 - src/overlay013/ov13_0221FC20.c | 1 - src/overlay013/ov13_02224500.c | 1 - src/overlay013/ov13_022264F4.c | 1 - src/overlay013/ov13_02227BDC.c | 1 - src/overlay017/ov17_0223B140.c | 1 - src/overlay017/ov17_0223CB1C.c | 1 - src/overlay017/ov17_0223DAD0.c | 1 - src/overlay017/ov17_0223F7E4.c | 1 - src/overlay017/ov17_02241270.c | 2 +- src/overlay017/ov17_022413D8.c | 2 +- src/overlay017/ov17_022476F8.c | 2 +- src/overlay017/ov17_0224A0FC.c | 2 +- src/overlay017/ov17_02250744.c | 1 - src/overlay019/ov19_021D61B0.c | 1 - src/overlay019/ov19_021D8B54.c | 3 +- src/overlay019/ov19_021DA270.c | 2 - src/overlay019/ov19_021DA814.c | 3 +- src/overlay019/ov19_021DA92C.c | 2 +- src/overlay019/ov19_021DB2FC.c | 3 +- src/overlay019/ov19_021DB8E4.c | 2 +- src/overlay019/ov19_021DC5F0.c | 3 +- src/overlay019/ov19_021DCF88.c | 3 +- src/overlay019/ov19_021DEC04.c | 3 +- src/overlay020/ov20_021D2098.c | 1 - src/overlay020/ov20_021D2EA4.c | 2 +- src/overlay020/ov20_021D3864.c | 2 +- src/overlay020/ov20_021D3A54.c | 2 +- src/overlay020/ov20_021D4728.c | 2 +- src/overlay021/ov21_021D1FA4.c | 1 - src/overlay021/ov21_021D5AEC.c | 2 +- src/overlay021/ov21_021D76B0.c | 2 +- src/overlay021/ov21_021D85B0.c | 2 +- src/overlay021/ov21_021D94BC.c | 2 +- src/overlay021/ov21_021DC9BC.c | 2 +- src/overlay021/ov21_021DDD2C.c | 2 +- src/overlay021/ov21_021DE668.c | 2 +- src/overlay021/ov21_021DF734.c | 3 +- src/overlay021/ov21_021E0C68.c | 2 +- src/overlay021/ov21_021E1924.c | 2 +- src/overlay021/ov21_021E29DC.c | 2 +- src/overlay021/ov21_021E3FFC.c | 2 +- src/overlay021/ov21_021E4CA4.c | 2 +- src/overlay021/ov21_021E6014.c | 2 +- src/overlay021/ov21_021E68F4.c | 2 +- src/overlay021/ov21_021E737C.c | 1 - src/overlay021/ov21_021E8484.c | 2 +- src/overlay021/ov21_021E8D48.c | 1 - src/overlay022/ov22_02255094.c | 1 - src/overlay022/ov22_0225A428.c | 2 +- src/overlay023/ov23_0223E140.c | 1 - src/overlay023/ov23_0224340C.c | 1 - src/overlay023/ov23_02248F1C.c | 1 - src/overlay023/ov23_0224F294.c | 1 - src/overlay024/ov24_02253CE0.c | 2 - src/overlay025/ov25_02255090.c | 2 - src/overlay032/ov32_02256470.c | 2 - src/overlay033/ov33_02256474.c | 2 - src/overlay058/ov58_021D0D80.c | 1 - src/overlay059/ov59_021D0D80.c | 1 - src/overlay061/ov61_0222BF44.c | 1 - src/overlay062/ov62_022300D8.c | 2 +- src/overlay062/ov62_02231690.c | 1 - src/overlay062/ov62_02236CBC.c | 2 +- src/overlay062/ov62_02246B00.c | 2 +- src/overlay063/ov63_0222AE60.c | 2 - src/overlay064/ov64_0222DCE0.c | 1 - src/overlay065/ov65_0222DCE0.c | 1 - src/overlay065/ov65_02235060.c | 3 +- src/overlay065/ov65_0223648C.c | 1 - src/overlay066/ov66_022343A8.c | 1 - src/overlay066/ov66_02234EA8.c | 2 - src/overlay067/ov67_0225C700.c | 1 - src/overlay068/ov68_0225C700.c | 1 - src/overlay069/ov69_0225C700.c | 1 - src/overlay070/ov70_0225C700.c | 3 +- src/overlay070/ov70_0225D9A4.c | 1 - src/overlay070/ov70_02260B44.c | 2 - src/overlay070/ov70_02269190.c | 2 - src/overlay071/ov71_0223B140.c | 1 - src/overlay071/ov71_0223CF0C.c | 2 - src/overlay072/ov72_0223D7A0.c | 1 - src/overlay074/ov74_021D0D80.c | 1 - src/overlay075/ov75_021D0D80.c | 1 - src/overlay076/ov76_0223B870.c | 2 +- src/overlay076/ov76_0223D338.c | 1 - src/overlay077/ov77_021D0D80.c | 1 - src/overlay077/ov77_021D25B0.c | 1 - src/overlay079/ov79_021D0D80.c | 1 - src/overlay079/ov79_021D2268.c | 1 - src/overlay080/ov80_021D0D80.c | 1 - src/overlay081/ov81_021D0D80.c | 1 - src/overlay083/ov83_0223C958.c | 1 - src/overlay083/ov83_0223D6A8.c | 1 - src/overlay085/ov85_02241440.c | 1 - src/overlay086/ov86_0223B140.c | 1 - src/overlay088/ov88_0223B140.c | 1 - src/overlay090/ov90_021D0D80.c | 1 - src/overlay091/ov91_021D0D80.c | 1 - src/overlay092/ov92_021D0D80.c | 1 - src/overlay093/ov93_021D0D80.c | 1 - src/overlay093/ov93_021D111C.c | 1 - src/overlay094/ov94_0223BCB0.c | 1 - src/overlay094/ov94_0223C610.c | 2 - src/overlay094/ov94_0223D0C4.c | 1 - src/overlay094/ov94_0223E46C.c | 2 - src/overlay094/ov94_0223FB48.c | 1 - src/overlay094/ov94_02244950.c | 2 - src/overlay095/ov95_02247B6C.c | 1 - src/overlay095/ov95_0224B3D8.c | 1 - src/overlay096/ov96_0223B6A0.c | 1 - src/overlay096/ov96_0223BCE0.c | 1 - src/overlay097/ov97_02233B18.c | 1 - src/overlay098/ov98_022471C8.c | 1 - src/overlay100/ov100_021D13E4.c | 2 +- src/overlay100/ov100_021D1C44.c | 2 +- src/overlay100/ov100_021D2F0C.c | 2 +- src/overlay100/ov100_021D46C8.c | 2 +- src/overlay101/ov101_021D7E48.c | 2 +- src/overlay104/ov104_0222FBE4.c | 1 - src/overlay104/ov104_02231F74.c | 1 - src/overlay104/ov104_02237DD8.c | 1 - src/overlay104/ov104_0223C2D4.c | 1 - src/overlay104/ov104_0223D768.c | 2 +- src/overlay104/ov104_0223D9E4.c | 2 - src/overlay104/ov104_0223DC7C.c | 1 - src/overlay105/ov105_02241AE0.c | 1 - src/overlay106/ov106_02241AE0.c | 1 - src/overlay106/ov106_02243310.c | 2 - src/overlay107/ov107_02241AE0.c | 1 - src/overlay107/ov107_02245EB0.c | 1 - src/overlay107/ov107_02249604.c | 1 - src/overlay108/ov108_02241AE0.c | 1 - src/overlay108/ov108_02243030.c | 1 - src/overlay109/ov109_021D0D80.c | 1 - src/overlay109/ov109_021D3D50.c | 1 - src/overlay110/ov110_021D0D80.c | 1 - src/overlay111/ov111_021D0D80.c | 1 - src/overlay111/ov111_021D2F80.c | 3 +- src/overlay112/ov112_0225C700.c | 1 - src/overlay113/ov113_0225C700.c | 1 - src/overlay113/ov113_0225E368.c | 3 +- src/overlay114/ov114_0225C700.c | 1 - src/overlay115/ov115_02260CEC.c | 1 - src/overlay116/ov116_02261870.c | 1 - src/overlay117/ov117_02260668.c | 1 - src/overlay117/ov117_022626B0.c | 1 - src/overlay117/ov117_02263AF0.c | 1 - src/pokedex_heightweight.c | 2 - src/pokemon.c | 1 - src/pokemon_summary_app.c | 1 - src/sprite_resource.c | 2 - src/trainer_data.c | 2 - src/unk_02006E3C.c | 2 - src/unk_0200C6E4.c | 2 +- src/unk_02027B70.c | 2 +- src/unk_02054BD0.c | 1 - src/unk_0206A780.c | 1 - src/unk_0206F314.c | 1 - src/unk_02073838.c | 2 +- src/unk_0207E0B8.c | 1 - src/unk_02082C2C.c | 1 - src/unk_0208694C.c | 1 - src/unk_0208A3F4.c | 2 +- src/unk_0208B284.c | 1 - src/unk_0208C098.c | 2 - src/unk_02098FFC.c | 1 - 281 files changed, 390 insertions(+), 599 deletions(-) delete mode 100644 include/struct_decls/struct_02006C24_decl.h diff --git a/include/battle/healthbar.h b/include/battle/healthbar.h index f7490b116f..2fefc44a21 100644 --- a/include/battle/healthbar.h +++ b/include/battle/healthbar.h @@ -2,12 +2,12 @@ #define POKEPLATINUM_OV16_02266F1C_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "battle/struct_ov16_022674C4.h" +#include "narc.h" #include "palette.h" #define HEALTHBAR_INFO_NONE 0 diff --git a/include/battle/ov16_0226871C.h b/include/battle/ov16_0226871C.h index 50b25c8a07..7b2a3fbd1d 100644 --- a/include/battle/ov16_0226871C.h +++ b/include/battle/ov16_0226871C.h @@ -2,13 +2,13 @@ #define POKEPLATINUM_OV16_0226871C_H #include "struct_decls/battle_system.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0209C370.h" #include "battle/struct_ov16_02268A14_decl.h" #include "battle/struct_ov16_0226AC98.h" #include "bg_window.h" +#include "narc.h" void ov16_02268744(BgConfig *param0); void ov16_022687A0(BgConfig *param0); diff --git a/include/battle/struct_ov16_0225BFFC_t.h b/include/battle/struct_ov16_0225BFFC_t.h index f92fd63eea..33426da4d9 100644 --- a/include/battle/struct_ov16_0225BFFC_t.h +++ b/include/battle/struct_ov16_0225BFFC_t.h @@ -3,7 +3,6 @@ #include "struct_decls/cell_actor_data.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "battle/struct_ov16_0225BFFC_sub1.h" #include "battle/struct_ov16_022674C4.h" @@ -12,6 +11,7 @@ #include "overlay012/struct_ov12_02223764.h" #include "bg_window.h" +#include "narc.h" #include "sys_task_manager.h" #define DATA_BUF_SIZE 256 diff --git a/include/berry_data.h b/include/berry_data.h index f9df94d1fb..2fd189da76 100644 --- a/include/berry_data.h +++ b/include/berry_data.h @@ -1,9 +1,9 @@ #ifndef POKEPLATINUM_BERRY_DATA_H #define POKEPLATINUM_BERRY_DATA_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_berry_data_decl.h" +#include "narc.h" #include "strbuf.h" #define FIRMNESS_VERY_SOFT 1 diff --git a/include/easy3d_object.h b/include/easy3d_object.h index 58c54f071a..811bfc47fa 100644 --- a/include/easy3d_object.h +++ b/include/easy3d_object.h @@ -6,7 +6,7 @@ #include "constants/heap.h" -#include "struct_decls/struct_02006C24_decl.h" +#include "narc.h" enum RotationAxis { ROTATION_AXIS_X = 0, diff --git a/include/inlines.h b/include/inlines.h index b218b34368..89738a1971 100644 --- a/include/inlines.h +++ b/include/inlines.h @@ -3,7 +3,6 @@ #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0203A790_decl.h" #include "struct_defs/struct_02049FA8.h" @@ -15,6 +14,7 @@ #include "field_script_context.h" #include "heap.h" #include "map_header.h" +#include "narc.h" #include "palette.h" #include "script_manager.h" #include "sys_task.h" diff --git a/include/map_object.h b/include/map_object.h index f926a7fc7f..cd03585ff7 100644 --- a/include/map_object.h +++ b/include/map_object.h @@ -5,7 +5,6 @@ #include "constants/map_object.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02061830_decl.h" #include "struct_decls/struct_02061AB4_decl.h" #include "struct_defs/struct_02061D3C.h" @@ -22,6 +21,7 @@ #include "overlay005/struct_ov5_021ED0A4.h" #include "map_header_data.h" +#include "narc.h" #include "sys_task_manager.h" MapObjectManager *MapObjectMan_New(FieldSystem *fieldSystem, int param1, int param2); diff --git a/include/message.h b/include/message.h index eddcfb69d6..bff08a31cb 100644 --- a/include/message.h +++ b/include/message.h @@ -1,8 +1,7 @@ #ifndef POKEPLATINUM_MESSAGE_H #define POKEPLATINUM_MESSAGE_H -#include "struct_decls/struct_02006C24_decl.h" - +#include "narc.h" #include "strbuf.h" typedef struct MessageBankEntry { diff --git a/include/narc.h b/include/narc.h index a8059d2e9c..21dcd44037 100644 --- a/include/narc.h +++ b/include/narc.h @@ -1,22 +1,20 @@ -#ifndef POKEPLATINUM_UNK_020068C8_H -#define POKEPLATINUM_UNK_020068C8_H +#ifndef POKEPLATINUM_NARC_H +#define POKEPLATINUM_NARC_H #include "constants/narc.h" -#include "struct_decls/struct_02006C24_decl.h" - /* * The NARC struct wraps NitroSDK type FSFile and manages the important * offsets to the FATB and the FIMG chunks within the file. * * FATB defines the regions within the FIMG to which the data are allocated. */ -struct NARC { - FSFile unk_00; - u32 unk_AC; - u32 unk_B0; - u16 unk_B4; -}; +typedef struct NARC { + FSFile file; + u32 fatbStart; + u32 fimgStart; + u16 numFiles; +} NARC; /* * Reads the entire content of an archive member into an existing buffer @@ -146,7 +144,7 @@ void NARC_ReadFromMember(NARC *narc, u32 memberIndex, u32 offset, u32 bytesToRea */ void NARC_ReadFile(NARC *narc, u32 bytesToRead, void *dest); -void sub_02006E28(NARC *param0, u32 param1); +void NARC_Seek(NARC *narc, u32 offset); /* * Gets the total number of archive members @@ -157,4 +155,4 @@ void sub_02006E28(NARC *param0, u32 param1); */ u16 NARC_GetFileCount(NARC *narc); -#endif // POKEPLATINUM_UNK_020068C8_H +#endif // POKEPLATINUM_NARC_H diff --git a/include/overlay005/encounter_effect.h b/include/overlay005/encounter_effect.h index aa9f939e99..4d8e245184 100644 --- a/include/overlay005/encounter_effect.h +++ b/include/overlay005/encounter_effect.h @@ -3,8 +3,6 @@ #include -#include "struct_decls/struct_02006C24_decl.h" - #include "field/field_system_decl.h" #include "overlay005/encounter_effect.h" #include "overlay005/hblank_system.h" @@ -19,6 +17,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "enc_effects.h" +#include "narc.h" #include "sys_task_manager.h" typedef struct EncounterEffect { diff --git a/include/overlay005/ov5_021D2F14.h b/include/overlay005/ov5_021D2F14.h index 02a226c01e..4e49a3849a 100644 --- a/include/overlay005/ov5_021D2F14.h +++ b/include/overlay005/ov5_021D2F14.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_OV5_021D2F14_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/sprite_template.h" #include "overlay005/struct_ov5_021D30A8.h" @@ -11,6 +10,7 @@ #include "overlay104/struct_ov104_02241308.h" #include "cell_actor.h" +#include "narc.h" void ov5_021D2F14(UnkStruct_ov5_021D30A8 *param0, const UnkStruct_ov7_0224F2EC *param1, u32 param2, u32 param3); void ov5_021D30A8(UnkStruct_ov5_021D30A8 *param0); diff --git a/include/overlay005/ov5_021E15F4.h b/include/overlay005/ov5_021E15F4.h index 02e4070540..6d330dbe6a 100644 --- a/include/overlay005/ov5_021E15F4.h +++ b/include/overlay005/ov5_021E15F4.h @@ -4,14 +4,14 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay005/struct_ov5_021D3CAC_decl.h" #include "overlay005/struct_ov5_021D5894.h" #include "overlay005/struct_ov5_021E1608_decl.h" #include "overlay005/struct_ov5_021E1890_decl.h" #include "overlay005/struct_ov5_021EF76C_decl.h" +#include "narc.h" + UnkStruct_ov5_021E1608 *ov5_021E15F4(const u8 param0); void ov5_021E1608(UnkStruct_ov5_021E1608 *param0); void ov5_021E1610(UnkStruct_ov5_021E1608 *param0); diff --git a/include/overlay005/ov5_021E779C.h b/include/overlay005/ov5_021E779C.h index 10d15c1101..388aef5ba1 100644 --- a/include/overlay005/ov5_021E779C.h +++ b/include/overlay005/ov5_021E779C.h @@ -3,7 +3,6 @@ #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02039E30_decl.h" #include "field/field_system_decl.h" @@ -15,6 +14,8 @@ #include "overlay005/struct_ov5_021EF13C_decl.h" #include "overlay005/struct_ov5_021EF76C_decl.h" +#include "narc.h" + void ov5_021E7A54(UnkStruct_ov5_021E8F60 *param0); void ov5_021E8188(FieldSystem *fieldSystem, UnkStruct_ov5_021E8F60 *param1); UnkStruct_ov5_021E8F60 *ov5_021E9084(UnkStruct_02039E30 *param0, UnkStruct_ov5_021EF76C *param1, UnkStruct_ov5_021D3CAC *param2, const int param3); diff --git a/include/overlay005/ov5_021EEF34.h b/include/overlay005/ov5_021EEF34.h index 823787dc69..0f03c05d0b 100644 --- a/include/overlay005/ov5_021EEF34.h +++ b/include/overlay005/ov5_021EEF34.h @@ -1,10 +1,9 @@ #ifndef POKEPLATINUM_OV5_021EEF34_H #define POKEPLATINUM_OV5_021EEF34_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay005/struct_ov5_021EF13C_decl.h" +#include "narc.h" #include "sys_task_manager.h" UnkStruct_ov5_021EF13C *ov5_021EF13C(void); diff --git a/include/overlay005/ov5_021F067C.h b/include/overlay005/ov5_021F067C.h index 260a8dc6f7..ed9d4173d9 100644 --- a/include/overlay005/ov5_021F067C.h +++ b/include/overlay005/ov5_021F067C.h @@ -1,10 +1,10 @@ #ifndef POKEPLATINUM_OV5_021F067C_H #define POKEPLATINUM_OV5_021F067C_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay005/struct_ov5_021F06D8_decl.h" +#include "narc.h" + UnkStruct_ov5_021F06D8 *ov5_021F067C(u32 param0, u32 param1, u32 param2, u32 param3); void ov5_021F06D8(UnkStruct_ov5_021F06D8 *param0); void *ov5_021F070C(UnkStruct_ov5_021F06D8 *param0, u32 param1, u32 param2, int param3); diff --git a/include/overlay012/ov12_022237EC.h b/include/overlay012/ov12_022237EC.h index b747de2f78..5b79b76404 100644 --- a/include/overlay012/ov12_022237EC.h +++ b/include/overlay012/ov12_022237EC.h @@ -1,9 +1,9 @@ #ifndef POKEPLATINUM_OV12_022237EC_H #define POKEPLATINUM_OV12_022237EC_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02014014_decl.h" +#include "narc.h" #include "spl.h" UnkStruct_02014014 *ov12_022237F0(int param0, int param1, int param2); diff --git a/include/overlay017/ov17_02241270.h b/include/overlay017/ov17_02241270.h index 3fbc832ce2..a26ecafcf1 100644 --- a/include/overlay017/ov17_02241270.h +++ b/include/overlay017/ov17_02241270.h @@ -2,10 +2,11 @@ #define POKEPLATINUM_OV17_02241270_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" +#include "narc.h" + void ov17_02241270(SpriteRenderer *param0, SpriteGfxHandler *param1, NARC *param2); CellActorData *ov17_022412C0(SpriteRenderer *param0, SpriteGfxHandler *param1, int param2); void ov17_022412F0(SpriteGfxHandler *param0); diff --git a/include/overlay017/ov17_022413D8.h b/include/overlay017/ov17_022413D8.h index be9090b67d..3e1ade2452 100644 --- a/include/overlay017/ov17_022413D8.h +++ b/include/overlay017/ov17_022413D8.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_OV17_022413D8_H #define POKEPLATINUM_OV17_022413D8_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/struct_02095C48.h" @@ -14,6 +13,7 @@ #include "overlay017/struct_ov17_02246F24.h" #include "overlay017/struct_ov17_022472F8.h" +#include "narc.h" #include "palette.h" void ov17_022413D8(void); diff --git a/include/overlay017/ov17_022476F8.h b/include/overlay017/ov17_022476F8.h index 3e33e35389..83adbcf89d 100644 --- a/include/overlay017/ov17_022476F8.h +++ b/include/overlay017/ov17_022476F8.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_OV17_022476F8_H #define POKEPLATINUM_OV17_022476F8_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -9,6 +8,8 @@ #include "overlay017/struct_ov17_0224792C.h" #include "overlay017/struct_ov17_02247A48.h" +#include "narc.h" + void ov17_022476F8(UnkStruct_ov17_022476F8 *param0, int param1); void ov17_02247734(UnkStruct_ov17_022476F8 *param0); void ov17_0224774C(SpriteRenderer *param0, SpriteGfxHandler *param1, NARC *param2); diff --git a/include/overlay017/ov17_0224A0FC.h b/include/overlay017/ov17_0224A0FC.h index b25663f8d5..a86c5d0d2d 100644 --- a/include/overlay017/ov17_0224A0FC.h +++ b/include/overlay017/ov17_0224A0FC.h @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -18,6 +17,8 @@ #include "overlay017/struct_ov17_0224EDE0.h" #include "overlay017/struct_ov17_02253084.h" +#include "narc.h" + s16 ov17_0224A0FC(int param0); s16 ov17_0224A10C(int param0); s16 ov17_0224A120(int param0); diff --git a/include/overlay017/ov17_02250744.h b/include/overlay017/ov17_02250744.h index 2938e5aea7..2ee56f30ea 100644 --- a/include/overlay017/ov17_02250744.h +++ b/include/overlay017/ov17_02250744.h @@ -1,13 +1,14 @@ #ifndef POKEPLATINUM_OV17_02250744_H #define POKEPLATINUM_OV17_02250744_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02095C48.h" #include "overlay017/struct_ov17_0224FCA0.h" #include "overlay017/struct_ov17_022507C4.h" #include "overlay017/struct_ov17_022508E4.h" +#include "narc.h" + void ov17_02250744(UnkStruct_ov17_0224FCA0 *param0); void ov17_022507C4(UnkStruct_ov17_022507C4 *param0); void ov17_02250968(UnkStruct_ov17_0224FCA0 *param0, u32 param1, const UnkStruct_ov17_022508E4 *param2); diff --git a/include/overlay019/ov19_021D8B54.h b/include/overlay019/ov19_021D8B54.h index bc1c748a00..060e9f0e77 100644 --- a/include/overlay019/ov19_021D8B54.h +++ b/include/overlay019/ov19_021D8B54.h @@ -3,13 +3,12 @@ #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021D8E00.h" #include "cell_actor.h" +#include "narc.h" BOOL ov19_021D8B54(UnkStruct_ov19_021D8E00 *param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, CellActorCollection *param3, NARC *param4); void ov19_021D8C1C(UnkStruct_ov19_021D8E00 *param0, NARC *param1); diff --git a/include/overlay019/ov19_021DA270.h b/include/overlay019/ov19_021DA270.h index d69e8fb59e..b8a9c12a75 100644 --- a/include/overlay019/ov19_021DA270.h +++ b/include/overlay019/ov19_021DA270.h @@ -3,14 +3,13 @@ #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DA384.h" #include "overlay019/struct_ov19_021DCD18.h" #include "cell_actor.h" +#include "narc.h" #include "pokemon.h" BOOL ov19_021DA270(UnkStruct_ov19_021DA384 *param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, CellActorCollection *param3, NARC *param4); diff --git a/include/overlay019/ov19_021DA814.h b/include/overlay019/ov19_021DA814.h index 169043937e..480b8eaea2 100644 --- a/include/overlay019/ov19_021DA814.h +++ b/include/overlay019/ov19_021DA814.h @@ -1,13 +1,12 @@ #ifndef POKEPLATINUM_OV19_021DA814_H #define POKEPLATINUM_OV19_021DA814_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DA8D8.h" #include "cell_actor.h" +#include "narc.h" BOOL ov19_021DA814(UnkStruct_ov19_021DA8D8 *param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, CellActorCollection *param3, NARC *param4); void ov19_021DA864(UnkStruct_ov19_021DA8D8 *param0, NARC *param1); diff --git a/include/overlay019/ov19_021DA92C.h b/include/overlay019/ov19_021DA92C.h index db6574e564..e887a6d4dc 100644 --- a/include/overlay019/ov19_021DA92C.h +++ b/include/overlay019/ov19_021DA92C.h @@ -1,8 +1,6 @@ #ifndef POKEPLATINUM_OV19_021DA92C_H #define POKEPLATINUM_OV19_021DA92C_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DA9E0.h" @@ -10,6 +8,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "message.h" +#include "narc.h" BOOL ov19_021DA92C(UnkStruct_ov19_021DA9E0 *param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, BgConfig *param3, CellActorCollection *param4, const MessageLoader *param5, NARC *param6); void ov19_021DA9E0(UnkStruct_ov19_021DA9E0 *param0); diff --git a/include/overlay019/ov19_021DB2FC.h b/include/overlay019/ov19_021DB2FC.h index 04dfef95b6..8a17a684dd 100644 --- a/include/overlay019/ov19_021DB2FC.h +++ b/include/overlay019/ov19_021DB2FC.h @@ -1,8 +1,6 @@ #ifndef POKEPLATINUM_OV19_021DB2FC_H #define POKEPLATINUM_OV19_021DB2FC_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DB6F0.h" @@ -11,6 +9,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "message.h" +#include "narc.h" BOOL ov19_021DB2FC(UnkStruct_ov19_021DB6F0 *param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, BgConfig *param3, CellActorCollection *param4, MessageLoader *param5, const StringTemplate *param6, int param7, NARC *param8); void ov19_021DB370(UnkStruct_ov19_021DB6F0 *param0); diff --git a/include/overlay019/ov19_021DB8E4.h b/include/overlay019/ov19_021DB8E4.h index fdd37fcec8..ab7dfedea4 100644 --- a/include/overlay019/ov19_021DB8E4.h +++ b/include/overlay019/ov19_021DB8E4.h @@ -3,14 +3,13 @@ #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DBA9C.h" #include "bg_window.h" #include "cell_actor.h" +#include "narc.h" BOOL ov19_021DB8E4(UnkStruct_ov19_021DBA9C *param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, BgConfig *param3, CellActorCollection *param4, NARC *param5); void ov19_021DBA9C(UnkStruct_ov19_021DBA9C *param0); diff --git a/include/overlay019/ov19_021DC5F0.h b/include/overlay019/ov19_021DC5F0.h index d3be527d9d..ab21fbce25 100644 --- a/include/overlay019/ov19_021DC5F0.h +++ b/include/overlay019/ov19_021DC5F0.h @@ -1,8 +1,6 @@ #ifndef POKEPLATINUM_OV19_021DC5F0_H #define POKEPLATINUM_OV19_021DC5F0_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DC680.h" @@ -10,6 +8,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "narc.h" BOOL ov19_021DC5F0(UnkStruct_ov19_021DC680 *param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, BgConfig *param3, CellActorCollection *param4, NARC *param5); void ov19_021DC680(UnkStruct_ov19_021DC680 *param0); diff --git a/include/overlay019/ov19_021DCF88.h b/include/overlay019/ov19_021DCF88.h index 32b14c07ed..8ecf969136 100644 --- a/include/overlay019/ov19_021DCF88.h +++ b/include/overlay019/ov19_021DCF88.h @@ -1,14 +1,13 @@ #ifndef POKEPLATINUM_OV19_021DCF88_H #define POKEPLATINUM_OV19_021DCF88_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DCF88_decl.h" #include "bg_window.h" #include "cell_actor.h" +#include "narc.h" BOOL ov19_021DCF88(UnkStruct_ov19_021DCF88 **param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, BgConfig *param3, CellActorCollection *param4); void ov19_021DD078(UnkStruct_ov19_021DCF88 *param0); diff --git a/include/overlay019/ov19_021DEC04.h b/include/overlay019/ov19_021DEC04.h index 658cdfe026..85c5c8a2fd 100644 --- a/include/overlay019/ov19_021DEC04.h +++ b/include/overlay019/ov19_021DEC04.h @@ -1,8 +1,6 @@ #ifndef POKEPLATINUM_OV19_021DEC04_H #define POKEPLATINUM_OV19_021DEC04_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DEC04_decl.h" @@ -10,6 +8,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "message.h" +#include "narc.h" BOOL ov19_021DEC04(UnkStruct_ov19_021DEC04 **param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, BgConfig *param3, CellActorCollection *param4, MessageLoader *param5, NARC *param6); void ov19_021DECAC(UnkStruct_ov19_021DEC04 *param0); diff --git a/include/overlay019/struct_ov19_021DA384.h b/include/overlay019/struct_ov19_021DA384.h index a9f853df98..d13daf5e88 100644 --- a/include/overlay019/struct_ov19_021DA384.h +++ b/include/overlay019/struct_ov19_021DA384.h @@ -3,12 +3,11 @@ #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "cell_actor.h" +#include "narc.h" typedef struct { void *unk_00; diff --git a/include/overlay020/ov20_021D2EA4.h b/include/overlay020/ov20_021D2EA4.h index af7a75ff10..42b8c6d646 100644 --- a/include/overlay020/ov20_021D2EA4.h +++ b/include/overlay020/ov20_021D2EA4.h @@ -1,13 +1,14 @@ #ifndef POKEPLATINUM_OV20_021D2EA4_H #define POKEPLATINUM_OV20_021D2EA4_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/struct_ov20_021D16E8_decl.h" #include "overlay020/struct_ov20_021D2128_decl.h" #include "overlay020/struct_ov20_021D30F8_decl.h" +#include "narc.h" + UnkStruct_ov20_021D30F8 *ov20_021D2EA4(UnkStruct_ov20_021D2128 *param0, const UnkStruct_ov20_021D16E8 *param1, const UnkStruct_020998EC *param2); void ov20_021D2EF0(UnkStruct_ov20_021D30F8 *param0); void ov20_021D2F50(UnkStruct_ov20_021D30F8 *param0, NARC *param1); diff --git a/include/overlay020/ov20_021D3864.h b/include/overlay020/ov20_021D3864.h index 2499a56582..7a36e636d4 100644 --- a/include/overlay020/ov20_021D3864.h +++ b/include/overlay020/ov20_021D3864.h @@ -1,13 +1,14 @@ #ifndef POKEPLATINUM_OV20_021D3864_H #define POKEPLATINUM_OV20_021D3864_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/struct_ov20_021D16E8_decl.h" #include "overlay020/struct_ov20_021D2128_decl.h" #include "overlay020/struct_ov20_021D3980_decl.h" +#include "narc.h" + UnkStruct_ov20_021D3980 *ov20_021D3864(UnkStruct_ov20_021D2128 *param0, const UnkStruct_ov20_021D16E8 *param1, const UnkStruct_020998EC *param2); void ov20_021D3880(UnkStruct_ov20_021D3980 *param0); void ov20_021D3898(UnkStruct_ov20_021D3980 *param0, NARC *param1); diff --git a/include/overlay020/ov20_021D3A54.h b/include/overlay020/ov20_021D3A54.h index 373e74cce8..d15e825f84 100644 --- a/include/overlay020/ov20_021D3A54.h +++ b/include/overlay020/ov20_021D3A54.h @@ -1,13 +1,14 @@ #ifndef POKEPLATINUM_OV20_021D3A54_H #define POKEPLATINUM_OV20_021D3A54_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/struct_ov20_021D16E8_decl.h" #include "overlay020/struct_ov20_021D2128_decl.h" #include "overlay020/struct_ov20_021D3E0C_decl.h" +#include "narc.h" + UnkStruct_ov20_021D3E0C *ov20_021D3A54(UnkStruct_ov20_021D2128 *param0, const UnkStruct_ov20_021D16E8 *param1, const UnkStruct_020998EC *param2); void ov20_021D3A80(UnkStruct_ov20_021D3E0C *param0); void ov20_021D3A98(UnkStruct_ov20_021D3E0C *param0, NARC *param1); diff --git a/include/overlay020/ov20_021D4728.h b/include/overlay020/ov20_021D4728.h index 964b4e1297..b123073735 100644 --- a/include/overlay020/ov20_021D4728.h +++ b/include/overlay020/ov20_021D4728.h @@ -1,13 +1,14 @@ #ifndef POKEPLATINUM_OV20_021D4728_H #define POKEPLATINUM_OV20_021D4728_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/struct_ov20_021D16E8_decl.h" #include "overlay020/struct_ov20_021D2128_decl.h" #include "overlay020/struct_ov20_021D4AD4_decl.h" +#include "narc.h" + UnkStruct_ov20_021D4AD4 *ov20_021D4728(UnkStruct_ov20_021D2128 *param0, const UnkStruct_ov20_021D16E8 *param1, const UnkStruct_020998EC *param2); void ov20_021D4764(UnkStruct_ov20_021D4AD4 *param0); void ov20_021D4774(UnkStruct_ov20_021D4AD4 *param0, NARC *param1); diff --git a/include/overlay021/ov21_021D1FA4.h b/include/overlay021/ov21_021D1FA4.h index 5875e98e93..2b15e6cd66 100644 --- a/include/overlay021/ov21_021D1FA4.h +++ b/include/overlay021/ov21_021D1FA4.h @@ -5,7 +5,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "overlay021/struct_ov21_021D13FC.h" #include "overlay021/struct_ov21_021D22F8.h" @@ -17,6 +16,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "narc.h" #include "sprite_resource.h" void ov21_021D1FA4(UnkStruct_ov21_021D13FC *param0, int param1); diff --git a/include/overlay021/struct_ov21_021D13FC.h b/include/overlay021/struct_ov21_021D13FC.h index 14d12f007d..4d5d7e4624 100644 --- a/include/overlay021/struct_ov21_021D13FC.h +++ b/include/overlay021/struct_ov21_021D13FC.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_STRUCT_OV21_021D13FC_H #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_02015064_decl.h" #include "struct_defs/struct_0200C738.h" @@ -15,6 +14,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "narc.h" #include "sprite_resource.h" #include "sys_task_manager.h" diff --git a/include/overlay022/ov22_02255094.h b/include/overlay022/ov22_02255094.h index bb5fe89e0c..627a640a9d 100644 --- a/include/overlay022/ov22_02255094.h +++ b/include/overlay022/ov22_02255094.h @@ -4,14 +4,13 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay022/struct_ov22_022550D4.h" #include "overlay022/struct_ov22_02255CB8.h" #include "overlay022/struct_ov22_0225A0E4.h" #include "bg_window.h" #include "cell_actor.h" +#include "narc.h" void ov22_02255094(void); void ov22_022550B4(void); diff --git a/include/overlay022/struct_ov22_02256BAC.h b/include/overlay022/struct_ov22_02256BAC.h index 121cb05d36..6ee4b954ad 100644 --- a/include/overlay022/struct_ov22_02256BAC.h +++ b/include/overlay022/struct_ov22_02256BAC.h @@ -1,12 +1,12 @@ #ifndef POKEPLATINUM_STRUCT_OV22_02256BAC_H #define POKEPLATINUM_STRUCT_OV22_02256BAC_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02095C60.h" #include "bg_window.h" #include "cell_actor.h" #include "game_options.h" +#include "narc.h" #include "sprite_resource.h" typedef struct { diff --git a/include/overlay022/struct_ov22_0225A0E4.h b/include/overlay022/struct_ov22_0225A0E4.h index 17ee7d3f70..11be52c474 100644 --- a/include/overlay022/struct_ov22_0225A0E4.h +++ b/include/overlay022/struct_ov22_0225A0E4.h @@ -3,7 +3,6 @@ #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_02015064_decl.h" #include "struct_decls/struct_02015128_decl.h" @@ -12,6 +11,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "narc.h" #include "resource_collection.h" #include "sprite_resource.h" diff --git a/include/overlay062/ov62_02231690.h b/include/overlay062/ov62_02231690.h index 6cb59e42c3..c69fff6380 100644 --- a/include/overlay062/ov62_02231690.h +++ b/include/overlay062/ov62_02231690.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_OV62_02231690_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0202F41C_decl.h" #include "struct_defs/struct_0208B878.h" #include "struct_defs/struct_0208C06C.h" @@ -17,6 +16,7 @@ #include "bg_window.h" #include "message.h" +#include "narc.h" #include "strbuf.h" StringTemplate *ov62_02231690(u32 param0); diff --git a/include/overlay062/struct_ov62_0223118C.h b/include/overlay062/struct_ov62_0223118C.h index c4cad25cfb..e7eb4c2815 100644 --- a/include/overlay062/struct_ov62_0223118C.h +++ b/include/overlay062/struct_ov62_0223118C.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_OV62_0223118C_H #define POKEPLATINUM_STRUCT_OV62_0223118C_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -16,6 +15,7 @@ #include "bg_window.h" #include "message.h" +#include "narc.h" #include "palette.h" #include "touch_screen.h" diff --git a/include/overlay062/struct_ov62_0223E01C_sub2.h b/include/overlay062/struct_ov62_0223E01C_sub2.h index 35eaaf903c..0c4ebd21a4 100644 --- a/include/overlay062/struct_ov62_0223E01C_sub2.h +++ b/include/overlay062/struct_ov62_0223E01C_sub2.h @@ -1,10 +1,10 @@ #ifndef POKEPLATINUM_STRUCT_OV62_0223E01C_SUB2_H #define POKEPLATINUM_STRUCT_OV62_0223E01C_SUB2_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay062/struct_ov62_0223E01C_sub1_sub1.h" +#include "narc.h" + typedef struct { NARC *unk_00; int unk_04; diff --git a/include/overlay062/struct_ov62_02246BF4_sub2.h b/include/overlay062/struct_ov62_02246BF4_sub2.h index 349ee7505a..0cc794c480 100644 --- a/include/overlay062/struct_ov62_02246BF4_sub2.h +++ b/include/overlay062/struct_ov62_02246BF4_sub2.h @@ -1,12 +1,12 @@ #ifndef POKEPLATINUM_STRUCT_OV62_02246BF4_SUB2_H #define POKEPLATINUM_STRUCT_OV62_02246BF4_SUB2_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "bg_window.h" +#include "narc.h" #include "palette.h" #include "touch_screen.h" diff --git a/include/overlay065/ov65_02235060.h b/include/overlay065/ov65_02235060.h index 129ff4a72e..4e6099527c 100644 --- a/include/overlay065/ov65_02235060.h +++ b/include/overlay065/ov65_02235060.h @@ -1,12 +1,11 @@ #ifndef POKEPLATINUM_OV65_02235060_H #define POKEPLATINUM_OV65_02235060_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay065/struct_ov65_02235130_decl.h" #include "overlay065/struct_ov65_022354D8.h" #include "bg_window.h" +#include "narc.h" void ov65_02235060(UnkStruct_ov65_02235130 *param0, u32 param1, NARC *param2, BgConfig *param3, u32 param4, u32 param5); void ov65_02235130(UnkStruct_ov65_02235130 *param0); diff --git a/include/overlay070/ov70_0225C700.h b/include/overlay070/ov70_0225C700.h index 525b2db706..0c07aa4f60 100644 --- a/include/overlay070/ov70_0225C700.h +++ b/include/overlay070/ov70_0225C700.h @@ -3,11 +3,10 @@ #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay063/struct_ov63_0222CC3C.h" #include "easy3d_object.h" +#include "narc.h" void ov70_0225C700(const UnkStruct_ov63_0222CC3C *param0, VecFx32 *param1); void ov70_0225C714(const VecFx32 *param0, UnkStruct_ov63_0222CC3C *param1); diff --git a/include/overlay071/ov71_0223CF0C.h b/include/overlay071/ov71_0223CF0C.h index 95c73daab0..8819053286 100644 --- a/include/overlay071/ov71_0223CF0C.h +++ b/include/overlay071/ov71_0223CF0C.h @@ -1,10 +1,10 @@ #ifndef POKEPLATINUM_OV71_0223CF0C_H #define POKEPLATINUM_OV71_0223CF0C_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay071/struct_ov71_0223D238.h" +#include "narc.h" + void ov71_0223CF0C(UnkStruct_ov71_0223D238 *param0, NARC *param1); void ov71_0223D070(UnkStruct_ov71_0223D238 *param0, const u8 *param1); void ov71_0223D238(UnkStruct_ov71_0223D238 *param0); diff --git a/include/overlay076/ov76_0223B870.h b/include/overlay076/ov76_0223B870.h index 7fb8553367..8dfb049830 100644 --- a/include/overlay076/ov76_0223B870.h +++ b/include/overlay076/ov76_0223B870.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_OV76_0223B870_H #define POKEPLATINUM_OV76_0223B870_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/struct_0207C690.h" @@ -10,6 +9,7 @@ #include "overlay076/struct_ov76_0223DE00.h" #include "bg_window.h" +#include "narc.h" #include "palette.h" void ov76_0223B8A8(UnkStruct_ov76_0223DE00 *param0); diff --git a/include/overlay076/struct_ov76_0223DE00.h b/include/overlay076/struct_ov76_0223DE00.h index 0c8773d886..3a91f46112 100644 --- a/include/overlay076/struct_ov76_0223DE00.h +++ b/include/overlay076/struct_ov76_0223DE00.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_STRUCT_OV76_0223DE00_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0202CA88_decl.h" #include "struct_defs/struct_0202CA28.h" #include "struct_defs/struct_02097F18.h" @@ -14,6 +13,7 @@ #include "overlay076/struct_ov76_0223DD88_sub2.h" #include "overlay076/struct_ov76_0223DD88_sub3.h" +#include "narc.h" #include "pokemon.h" typedef struct { diff --git a/include/overlay083/ov83_0223D6A8.h b/include/overlay083/ov83_0223D6A8.h index abaac793dc..8746715006 100644 --- a/include/overlay083/ov83_0223D6A8.h +++ b/include/overlay083/ov83_0223D6A8.h @@ -3,7 +3,6 @@ #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02015064_decl.h" #include "overlay083/struct_ov83_0223D4CC_decl.h" @@ -28,6 +27,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "narc.h" #include "sprite_resource.h" void ov83_0223D754(UnkStruct_ov83_0223D784 *param0, int param1, int param2, int param3); diff --git a/include/overlay084/struct_ov84_0223B5A0.h b/include/overlay084/struct_ov84_0223B5A0.h index 5af3d5c54e..50f3b638dd 100644 --- a/include/overlay084/struct_ov84_0223B5A0.h +++ b/include/overlay084/struct_ov84_0223B5A0.h @@ -4,7 +4,6 @@ #include "struct_decls/cell_actor_data.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -18,6 +17,7 @@ #include "bg_window.h" #include "game_options.h" #include "message.h" +#include "narc.h" #include "strbuf.h" #include "string_template.h" #include "trainer_info.h" diff --git a/include/overlay099/struct_ov99_021D2CB0.h b/include/overlay099/struct_ov99_021D2CB0.h index eb514c3fce..632246194e 100644 --- a/include/overlay099/struct_ov99_021D2CB0.h +++ b/include/overlay099/struct_ov99_021D2CB0.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_STRUCT_OV99_021D2CB0_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/struct_0203E274.h" @@ -17,6 +16,7 @@ #include "camera.h" #include "easy3d_object.h" #include "message.h" +#include "narc.h" #include "palette.h" #include "sys_task_manager.h" diff --git a/include/overlay100/ov100_021D46C8.h b/include/overlay100/ov100_021D46C8.h index 69a971a8ff..5eb755394f 100644 --- a/include/overlay100/ov100_021D46C8.h +++ b/include/overlay100/ov100_021D46C8.h @@ -3,7 +3,6 @@ #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_020985E4.h" #include "overlay100/struct_ov100_021D46C8.h" @@ -11,6 +10,8 @@ #include "overlay100/struct_ov100_021D49B4.h" #include "overlay100/struct_ov100_021D4DD8.h" +#include "narc.h" + int ov100_021D46C8(UnkStruct_ov100_021D46C8 *param0, UnkStruct_020985E4 *param1, int param2); void ov100_021D4788(UnkStruct_ov100_021D46C8 *param0); void ov100_021D47A0(UnkStruct_ov100_021D46C8 *param0); diff --git a/include/overlay100/struct_ov100_021D46C8.h b/include/overlay100/struct_ov100_021D46C8.h index 59d9dca53f..954a1e3031 100644 --- a/include/overlay100/struct_ov100_021D46C8.h +++ b/include/overlay100/struct_ov100_021D46C8.h @@ -4,7 +4,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/struct_0207C690.h" @@ -17,6 +16,7 @@ #include "bg_window.h" #include "camera.h" #include "message.h" +#include "narc.h" #include "palette.h" typedef struct { diff --git a/include/overlay101/ov101_021D7E48.h b/include/overlay101/ov101_021D7E48.h index 01097f56bb..c8f37ba333 100644 --- a/include/overlay101/ov101_021D7E48.h +++ b/include/overlay101/ov101_021D7E48.h @@ -3,12 +3,11 @@ #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay101/struct_ov101_021D7E48_decl.h" #include "overlay101/struct_ov101_021D8544.h" #include "cell_actor.h" +#include "narc.h" UnkStruct_ov101_021D7E48 *ov101_021D7E48(u32 param0, u32 param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, u32 param9, u32 param10); void ov101_021D7FB4(UnkStruct_ov101_021D7E48 *param0); diff --git a/include/overlay101/struct_ov101_021D13C8.h b/include/overlay101/struct_ov101_021D13C8.h index 4b4467beeb..b84ebe886c 100644 --- a/include/overlay101/struct_ov101_021D13C8.h +++ b/include/overlay101/struct_ov101_021D13C8.h @@ -3,7 +3,6 @@ #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020711EC_decl.h" #include "overlay101/struct_ov101_021D148C.h" @@ -17,6 +16,7 @@ #include "bg_window.h" #include "enums.h" +#include "narc.h" typedef struct UnkStruct_ov101_021D13C8_t { u32 unk_00; diff --git a/include/overlay104/ov104_0223D768.h b/include/overlay104/ov104_0223D768.h index 84d93604cd..782bd4999c 100644 --- a/include/overlay104/ov104_0223D768.h +++ b/include/overlay104/ov104_0223D768.h @@ -2,10 +2,10 @@ #define POKEPLATINUM_OV104_0223D768_H #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" +#include "narc.h" #include "palette.h" void ov104_0223D768(SpriteRenderer *param0, SpriteGfxHandler *param1, NARC *param2, PaletteData *param3, u16 param4); diff --git a/include/overlay113/ov113_0225E368.h b/include/overlay113/ov113_0225E368.h index 730e5f2c85..1616712758 100644 --- a/include/overlay113/ov113_0225E368.h +++ b/include/overlay113/ov113_0225E368.h @@ -1,13 +1,12 @@ #ifndef POKEPLATINUM_OV113_0225E368_H #define POKEPLATINUM_OV113_0225E368_H -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay113/struct_ov113_0225DBCC_decl.h" #include "overlay113/struct_ov113_0225EB20.h" #include "overlay113/struct_ov113_02260818.h" #include "camera.h" +#include "narc.h" void ov113_0225E368(UnkStruct_ov113_0225EB20 *param0, BOOL param1); void ov113_0225E378(UnkStruct_ov113_0225EB20 *param0); diff --git a/include/overlay116/ov116_02261870.h b/include/overlay116/ov116_02261870.h index 01a72f1592..c3190382de 100644 --- a/include/overlay116/ov116_02261870.h +++ b/include/overlay116/ov116_02261870.h @@ -4,13 +4,13 @@ #include #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02006C24_decl.h" #include "overlay116/struct_ov116_0226139C.h" #include "overlay116/struct_ov116_02262A8C.h" #include "overlay116/struct_ov116_0226501C.h" #include "easy3d_object.h" +#include "narc.h" void ov116_02261870(Easy3DObject *param0, MtxFx43 *param1, VecFx32 *param2); void ov116_022618A8(UnkStruct_ov116_0226501C *param0, NARC *param1, int param2); diff --git a/include/overlay116/struct_ov116_022649E4.h b/include/overlay116/struct_ov116_022649E4.h index a1d353cd33..ddff33275c 100644 --- a/include/overlay116/struct_ov116_022649E4.h +++ b/include/overlay116/struct_ov116_022649E4.h @@ -3,7 +3,6 @@ #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/struct_0207C690.h" @@ -12,6 +11,7 @@ #include "bg_window.h" #include "camera.h" +#include "narc.h" #include "palette.h" typedef struct { diff --git a/include/overlay119/struct_ov119_021D17B8.h b/include/overlay119/struct_ov119_021D17B8.h index 99998b8e14..8e7fdea9e5 100644 --- a/include/overlay119/struct_ov119_021D17B8.h +++ b/include/overlay119/struct_ov119_021D17B8.h @@ -3,7 +3,6 @@ #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -13,6 +12,7 @@ #include "overlay119/struct_ov119_021D14DC.h" #include "bg_window.h" +#include "narc.h" #include "palette.h" typedef struct { diff --git a/include/pokemon.h b/include/pokemon.h index bdbe4aaa7a..305db7a518 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -10,7 +10,6 @@ #include "struct_decls/cell_actor_data.h" #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02078B40_decl.h" @@ -21,6 +20,7 @@ #include "overlay005/struct_ov5_021DE5D0.h" +#include "narc.h" #include "palette.h" #include "string.h" #include "trainer_info.h" diff --git a/include/sprite_resource.h b/include/sprite_resource.h index 560418e346..72f38872a8 100644 --- a/include/sprite_resource.h +++ b/include/sprite_resource.h @@ -5,8 +5,7 @@ #include "constants/heap.h" -#include "struct_decls/struct_02006C24_decl.h" - +#include "narc.h" #include "resource_collection.h" enum SpriteResourceType { diff --git a/include/struct_decls/struct_02006C24_decl.h b/include/struct_decls/struct_02006C24_decl.h deleted file mode 100644 index 75c7725c6e..0000000000 --- a/include/struct_decls/struct_02006C24_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_02006C24_DECL_H -#define POKEPLATINUM_STRUCT_02006C24_DECL_H - -typedef struct NARC NARC; - -#endif // POKEPLATINUM_STRUCT_02006C24_DECL_H diff --git a/include/struct_defs/pokemon_summary_app.h b/include/struct_defs/pokemon_summary_app.h index b9f417a4d4..f0e468a39e 100644 --- a/include/struct_defs/pokemon_summary_app.h +++ b/include/struct_defs/pokemon_summary_app.h @@ -6,7 +6,6 @@ #include "struct_decls/cell_actor_data.h" #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -19,6 +18,7 @@ #include "camera.h" #include "cell_actor.h" #include "message.h" +#include "narc.h" #include "strbuf.h" #include "string_template.h" diff --git a/include/struct_defs/struct_0207AE68_t.h b/include/struct_defs/struct_0207AE68_t.h index 7cf4c5c361..f64c5ea9e0 100644 --- a/include/struct_defs/struct_0207AE68_t.h +++ b/include/struct_defs/struct_0207AE68_t.h @@ -4,7 +4,6 @@ #include "struct_decls/pokedexdata_decl.h" #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_party_decl.h" #include "struct_defs/pokemon_summary.h" @@ -16,6 +15,7 @@ #include "game_options.h" #include "game_records.h" #include "message.h" +#include "narc.h" #include "overlay_manager.h" #include "palette.h" #include "pokemon.h" diff --git a/include/struct_defs/struct_02089688_sub1.h b/include/struct_defs/struct_02089688_sub1.h index 0cbb4bc20c..1e1fbe00d0 100644 --- a/include/struct_defs/struct_02089688_sub1.h +++ b/include/struct_defs/struct_02089688_sub1.h @@ -2,7 +2,6 @@ #define POKEPLATINUM_STRUCT_02089688_SUB1_H #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012744_decl.h" @@ -10,6 +9,7 @@ #include "struct_defs/sprite_manager_allocation.h" #include "bg_window.h" +#include "narc.h" #include "palette.h" #include "touch_screen.h" diff --git a/include/struct_defs/struct_0208B878_sub1.h b/include/struct_defs/struct_0208B878_sub1.h index c5f5309820..bcbaa47571 100644 --- a/include/struct_defs/struct_0208B878_sub1.h +++ b/include/struct_defs/struct_0208B878_sub1.h @@ -1,10 +1,10 @@ #ifndef POKEPLATINUM_STRUCT_0208B878_SUB1_H #define POKEPLATINUM_STRUCT_0208B878_SUB1_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" +#include "narc.h" #include "palette.h" typedef struct { diff --git a/include/unk_02006E3C.h b/include/unk_02006E3C.h index 40f50b0843..fe2e01bb8d 100644 --- a/include/unk_02006E3C.h +++ b/include/unk_02006E3C.h @@ -3,9 +3,8 @@ #include -#include "struct_decls/struct_02006C24_decl.h" - #include "bg_window.h" +#include "narc.h" u32 sub_02006E3C(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); void sub_02006E60(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); diff --git a/include/unk_0200C6E4.h b/include/unk_0200C6E4.h index fc1c0ce2b3..e40b90568a 100644 --- a/include/unk_0200C6E4.h +++ b/include/unk_0200C6E4.h @@ -5,7 +5,6 @@ #include #include "struct_decls/cell_actor_data.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -18,6 +17,7 @@ #include "overlay104/struct_ov104_0224133C.h" #include "cell_actor.h" +#include "narc.h" #include "palette.h" SpriteRenderer *sub_0200C6E4(int param0); diff --git a/include/unk_02073838.h b/include/unk_02073838.h index 24830ad097..91329fda2f 100644 --- a/include/unk_02073838.h +++ b/include/unk_02073838.h @@ -4,13 +4,14 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02073838.h" #include "struct_defs/struct_02073974.h" #include "struct_defs/struct_02073B50.h" #include "overlay005/struct_ov5_02201C58.h" +#include "narc.h" + void sub_02073838(UnkStruct_02073838 *param0); void sub_02073848(UnkStruct_02073838 *param0, NNSG3dResFileHeader *param1, u32 param2); void sub_0207389C(UnkStruct_02073838 *param0, u32 param1, NARC *param2, u32 param3, u32 param4, int param5); diff --git a/include/unk_02082C2C.h b/include/unk_02082C2C.h index 6dd6da9cbe..f8ccf35f79 100644 --- a/include/unk_02082C2C.h +++ b/include/unk_02082C2C.h @@ -1,9 +1,10 @@ #ifndef POKEPLATINUM_UNK_02082C2C_H #define POKEPLATINUM_UNK_02082C2C_H -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0207F248.h" +#include "narc.h" + void sub_02082C2C(GameWindowLayout *param0); void sub_02082CEC(GameWindowLayout *param0, u8 param1, u16 param2, u16 param3, NARC *param4); void sub_02082DA8(GameWindowLayout *param0, u8 param1); diff --git a/include/unk_0208C098.h b/include/unk_0208C098.h index 4020804814..a60c80959b 100644 --- a/include/unk_0208C098.h +++ b/include/unk_0208C098.h @@ -3,9 +3,8 @@ #include -#include "struct_decls/struct_02006C24_decl.h" - #include "bg_window.h" +#include "narc.h" enum BarColor { BARCOLOR_EMPTY = 0, diff --git a/src/battle/battle_display.c b/src/battle/battle_display.c index 57cb471f90..4957a5812e 100644 --- a/src/battle/battle_display.c +++ b/src/battle/battle_display.c @@ -8,7 +8,6 @@ #include "struct_decls/battle_system.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" diff --git a/src/battle/battle_io_command.c b/src/battle/battle_io_command.c index 35cbef74fb..086a8d443e 100644 --- a/src/battle/battle_io_command.c +++ b/src/battle/battle_io_command.c @@ -6,7 +6,6 @@ #include "constants/battle/battle_io.h" #include "struct_decls/battle_system.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/battle/healthbar.c b/src/battle/healthbar.c index 15a5e42f73..b0cb63b39d 100644 --- a/src/battle/healthbar.c +++ b/src/battle/healthbar.c @@ -6,7 +6,6 @@ #include "constants/heap.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" diff --git a/src/battle/ov16_0223B140.c b/src/battle/ov16_0223B140.c index 055223874d..02ce63e32a 100644 --- a/src/battle/ov16_0223B140.c +++ b/src/battle/ov16_0223B140.c @@ -9,7 +9,6 @@ #include "consts/game_records.h" #include "struct_decls/battle_system.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0207AE68_decl.h" #include "struct_defs/archived_sprite.h" #include "struct_defs/battle_system.h" diff --git a/src/battle/ov16_02268520.c b/src/battle/ov16_02268520.c index 3bd3382d00..40838eac57 100644 --- a/src/battle/ov16_02268520.c +++ b/src/battle/ov16_02268520.c @@ -4,7 +4,6 @@ #include #include "struct_decls/battle_system.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" diff --git a/src/battle/ov16_0226871C.c b/src/battle/ov16_0226871C.c index 7f4140b758..5920a03f42 100644 --- a/src/battle/ov16_0226871C.c +++ b/src/battle/ov16_0226871C.c @@ -5,7 +5,6 @@ #include "struct_decls/battle_system.h" #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012744_decl.h" @@ -41,6 +40,7 @@ #include "message.h" #include "message_util.h" #include "move_table.h" +#include "narc.h" #include "palette.h" #include "pokemon.h" #include "pokemon_icon.h" diff --git a/src/battle/ov16_0226DB7C.c b/src/battle/ov16_0226DB7C.c index d7b0c5f3ef..2cc54a0c4f 100644 --- a/src/battle/ov16_0226DB7C.c +++ b/src/battle/ov16_0226DB7C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" diff --git a/src/battle/ov16_0226DE44.c b/src/battle/ov16_0226DE44.c index 0c92255b66..58d33b8a8d 100644 --- a/src/battle/ov16_0226DE44.c +++ b/src/battle/ov16_0226DE44.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" diff --git a/src/battle/ov16_0226E148.c b/src/battle/ov16_0226E148.c index df664833b1..b8cd210294 100644 --- a/src/battle/ov16_0226E148.c +++ b/src/battle/ov16_0226E148.c @@ -4,7 +4,6 @@ #include #include "struct_decls/battle_system.h" -#include "struct_decls/struct_02006C24_decl.h" #include "battle/ov16_0223DF00.h" #include "battle/ov16_0226871C.h" diff --git a/src/battle/party_gauge.c b/src/battle/party_gauge.c index 591412f937..e8a1a7bef6 100644 --- a/src/battle/party_gauge.c +++ b/src/battle/party_gauge.c @@ -6,7 +6,6 @@ #include "constants/heap.h" #include "consts/sdat.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/battle_io.h" diff --git a/src/berry_data.c b/src/berry_data.c index a62a4cc023..6c6268a0c6 100644 --- a/src/berry_data.c +++ b/src/berry_data.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "message.h" #include "narc.h" #include "strbuf.h" diff --git a/src/dw_warp/dw_warp.c b/src/dw_warp/dw_warp.c index a34b526fd1..8ff02e2cb6 100644 --- a/src/dw_warp/dw_warp.c +++ b/src/dw_warp/dw_warp.c @@ -5,7 +5,6 @@ #include "consts/sdat.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0207C690.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/easy3d_object.c b/src/easy3d_object.c index da06d67687..6bfa09f052 100644 --- a/src/easy3d_object.c +++ b/src/easy3d_object.c @@ -3,10 +3,9 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "easy3d.h" #include "heap.h" +#include "narc.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02006E3C.h" diff --git a/src/field_menu.c b/src/field_menu.c index b2f0392a31..3da66fff62 100644 --- a/src/field_menu.c +++ b/src/field_menu.c @@ -6,7 +6,6 @@ #include "constants/field/map_load.h" #include "struct_decls/pokedexdata_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_0207AE68_decl.h" #include "struct_decls/struct_0207CB08_decl.h" diff --git a/src/map_object.c b/src/map_object.c index 455bdd237f..8e090c246d 100644 --- a/src/map_object.c +++ b/src/map_object.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02061830_sub1_decl.h" #include "struct_defs/struct_02061D3C.h" #include "struct_defs/struct_020EDF0C.h" @@ -28,6 +27,7 @@ #include "heap.h" #include "map_header_data.h" #include "map_object_move.h" +#include "narc.h" #include "script_manager.h" #include "sys_task.h" #include "sys_task_manager.h" diff --git a/src/message.c b/src/message.c index 41aacca1e2..81a78b336d 100644 --- a/src/message.c +++ b/src/message.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "text/pl_msg.naix" #include "heap.h" diff --git a/src/narc.c b/src/narc.c index a352e63442..56c56afeed 100644 --- a/src/narc.c +++ b/src/narc.c @@ -7,201 +7,201 @@ // Mapping of NARC indices to filesystem paths. static const char *sNarcPaths[] = { - [NARC_INDEX_BATTLE__SKILL__WAZA_SEQ] = { "battle/skill/waza_seq.narc" }, - [NARC_INDEX_BATTLE__SKILL__SUB_SEQ] = { "battle/skill/sub_seq.narc" }, - [NARC_INDEX_POKETOOL__PERSONAL__PL_PERSONAL] = { "poketool/personal/pl_personal.narc" }, - [NARC_INDEX_POKETOOL__PERSONAL__PL_GROWTBL] = { "poketool/personal/pl_growtbl.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__PL_POKEGRA] = { "poketool/pokegra/pl_pokegra.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__HEIGHT] = { "poketool/pokegra/height.narc" }, - [NARC_INDEX_POKETOOL__TRGRA__TRBGRA] = { "poketool/trgra/trbgra.narc" }, - [NARC_INDEX_BATTLE__GRAPHIC__PL_BATT_BG] = { "battle/graphic/pl_batt_bg.narc" }, - [NARC_INDEX_WAZAEFFECT__WE] = { "wazaeffect/we.arc" }, - [NARC_INDEX_POKETOOL__WAZA__PL_WAZA_TBL] = { "poketool/waza/pl_waza_tbl.narc" }, - [NARC_INDEX_FIELDDATA__SCRIPT__SCR_SEQ] = { "fielddata/script/scr_seq.narc" }, - [NARC_INDEX_MSGDATA__SCENARIO__SCR_MSG] = { "msgdata/scenario/scr_msg.narc" }, - [NARC_INDEX_GRAPHIC__POKETCH] = { "graphic/poketch.narc" }, - [NARC_INDEX_GRAPHIC__PL_BAG_GRA] = { "graphic/pl_bag_gra.narc" }, - [NARC_INDEX_GRAPHIC__PL_FONT] = { "graphic/pl_font.narc" }, - [NARC_INDEX_ITEMTOOL__ITEMDATA__PL_ITEM_DATA] = { "itemtool/itemdata/pl_item_data.narc" }, - [NARC_INDEX_ITEMTOOL__ITEMDATA__ITEM_ICON] = { "itemtool/itemdata/item_icon.narc" }, - [NARC_INDEX_GRAPHIC__TMAP_GRA] = { "graphic/tmap_gra.narc" }, - [NARC_INDEX_GRAPHIC__BOX] = { "graphic/box.narc" }, - [NARC_INDEX_POKETOOL__ICONGRA__PL_POKE_ICON] = { "poketool/icongra/pl_poke_icon.narc" }, - [NARC_INDEX_GRAPHIC__PL_PLIST_GRA] = { "graphic/pl_plist_gra.narc" }, - [NARC_INDEX_WAZAEFFECT__EFFECTCLACT__WECHAR] = { "wazaeffect/effectclact/wechar.narc" }, - [NARC_INDEX_WAZAEFFECT__EFFECTCLACT__WEPLTT] = { "wazaeffect/effectclact/wepltt.narc" }, - [NARC_INDEX_WAZAEFFECT__EFFECTCLACT__WECELL] = { "wazaeffect/effectclact/wecell.narc" }, - [NARC_INDEX_WAZAEFFECT__EFFECTCLACT__WECELLANM] = { "wazaeffect/effectclact/wecellanm.narc" }, - [NARC_INDEX_GRAPHIC__IMAGECLIP] = { "graphic/imageclip.narc" }, - [NARC_INDEX_MSGDATA__PL_MSG] = { "msgdata/pl_msg.narc" }, - [NARC_INDEX_BATTLE__GRAPHIC__PL_BATT_OBJ] = { "battle/graphic/pl_batt_obj.narc" }, - [NARC_INDEX_DATA__UNDERG_RADAR] = { "data/underg_radar.narc" }, - [NARC_INDEX_WAZAEFFECT__EFFECTDATA__WAZA_PARTICLE] = { "wazaeffect/effectdata/waza_particle.narc" }, - [NARC_INDEX_BATTLE__SKILL__BE_SEQ] = { "battle/skill/be_seq.narc" }, - [NARC_INDEX_DATA__NAMEIN] = { "data/namein.narc" }, - [NARC_INDEX_FIELDDATA__EVENTDATA__ZONE_EVENT] = { "fielddata/eventdata/zone_event.narc" }, - [NARC_INDEX_POKETOOL__PERSONAL__WOTBL] = { "poketool/personal/wotbl.narc" }, - [NARC_INDEX_POKETOOL__PERSONAL__EVO] = { "poketool/personal/evo.narc" }, - [NARC_INDEX_GRAPHIC__FONTOAM] = { "graphic/fontoam.narc" }, - [NARC_INDEX_GRAPHIC__FIELD_BOARD] = { "graphic/field_board.narc" }, - [NARC_INDEX_FIELDDATA__ENCOUNTDATA__D_ENC_DATA] = { "fielddata/encountdata/d_enc_data.narc" }, - [NARC_INDEX_GRAPHIC__PL_WINFRAME] = { "graphic/pl_winframe.narc" }, - [NARC_INDEX_GRAPHIC__PL_PST_GRA] = { "graphic/pl_pst_gra.narc" }, - [NARC_INDEX_FIELDDATA__BUILD_MODEL__BUILD_MODEL] = { "fielddata/build_model/build_model.narc" }, - [NARC_INDEX_FIELDDATA__MAPMATRIX__MAP_MATRIX] = { "fielddata/mapmatrix/map_matrix.narc" }, - [NARC_INDEX_FIELDDATA__AREADATA__AREA_DATA] = { "fielddata/areadata/area_data.narc" }, - [NARC_INDEX_FIELDDATA__AREADATA__AREA_BUILD_MODEL__AREA_BUILD] = { "fielddata/areadata/area_build_model/area_build.narc" }, - [NARC_INDEX_FIELDDATA__AREADATA__AREA_MAP_TEX__MAP_TEX_SET] = { "fielddata/areadata/area_map_tex/map_tex_set.narc" }, - [NARC_INDEX_CONTEST__GRAPHIC__CONTEST_BG] = { "contest/graphic/contest_bg.narc" }, - [NARC_INDEX_CONTEST__GRAPHIC__CONTEST_OBJ] = { "contest/graphic/contest_obj.narc" }, - [NARC_INDEX_DATA__UGEFFECT_OBJ_GRAPHIC] = { "data/ugeffect_obj_graphic.narc" }, - [NARC_INDEX_DEMO__TITLE__TITLEDEMO] = { "demo/title/titledemo.narc" }, - [NARC_INDEX_FIELDDATA__AREADATA__AREA_MOVE_MODEL__MOVE_MODEL_LIST] = { "fielddata/areadata/area_move_model/move_model_list.narc" }, - [NARC_INDEX_DATA__UG_TRAP] = { "data/ug_trap.narc" }, - [NARC_INDEX_GRAPHIC__TRAINER_CASE] = { "graphic/trainer_case.narc" }, - [NARC_INDEX_DATA__UG_FOSSIL] = { "data/ug_fossil.narc" }, - [NARC_INDEX_GRAPHIC__NTAG_GRA] = { "graphic/ntag_gra.narc" }, - [NARC_INDEX_DATA__TRADELIST] = { "data/tradelist.narc" }, - [NARC_INDEX_DATA__UG_PARTS] = { "data/ug_parts.narc" }, - [NARC_INDEX_GRAPHIC__OPENING] = { "graphic/opening.narc" }, - [NARC_INDEX_POKETOOL__TRAINER__TRDATA] = { "poketool/trainer/trdata.narc" }, - [NARC_INDEX_POKETOOL__TRAINER__TRPOKE] = { "poketool/trainer/trpoke.narc" }, - [NARC_INDEX_POKETOOL__TRMSG__TRTBL] = { "poketool/trmsg/trtbl.narc" }, - [NARC_INDEX_POKETOOL__TRGRA__TRFGRA] = { "poketool/trgra/trfgra.narc" }, - [NARC_INDEX_PARTICLEDATA__PARTICLEDATA] = { "particledata/particledata.narc" }, - [NARC_INDEX_GRAPHIC__SHOP_GRA] = { "graphic/shop_gra.narc" }, - [NARC_INDEX_WAZAEFFECT__WE_SUB] = { "wazaeffect/we_sub.narc" }, - [NARC_INDEX_DATA__UG_ANIM] = { "data/ug_anim.narc" }, - [NARC_INDEX_DATA__WEATHER_SYS] = { "data/weather_sys.narc" }, - [NARC_INDEX_GRAPHIC__MENU_GRA] = { "graphic/menu_gra.narc" }, - [NARC_INDEX_FIELDDATA__LAND_DATA__LAND_DATA] = { "fielddata/land_data/land_data.narc" }, - [NARC_INDEX_ITEMTOOL__ITEMDATA__NUTS_DATA] = { "itemtool/itemdata/nuts_data.narc" }, - [NARC_INDEX_RESOURCE__ENG__ZUKAN__ZUKAN] = { "resource/eng/zukan/zukan.narc" }, - [NARC_INDEX_POKETOOL__POKEFOOT__POKEFOOT] = { "poketool/pokefoot/pokefoot.narc" }, - [NARC_INDEX_FIELDDATA__AREADATA__AREA_BUILD_MODEL__AREABM_TEXSET] = { "fielddata/areadata/area_build_model/areabm_texset.narc" }, - [NARC_INDEX_BATTLE__GRAPHIC__PL_B_PLIST_GRA] = { "battle/graphic/pl_b_plist_gra.narc" }, - [NARC_INDEX_GRAPHIC__CONFIG_GRA] = { "graphic/config_gra.narc" }, - [NARC_INDEX_GRAPHIC__UNIONROOM] = { "graphic/unionroom.narc" }, - [NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA] = { "application/zukanlist/zkn_data/zukan_data.narc" }, - [NARC_INDEX_GRAPHIC__PMSI] = { "graphic/pmsi.narc" }, - [NARC_INDEX_BATTLE__GRAPHIC__B_BAG_GRA] = { "battle/graphic/b_bag_gra.narc" }, - [NARC_INDEX_GRAPHIC__OEKAKI] = { "graphic/oekaki.narc" }, - [NARC_INDEX_GRAPHIC__MAIL_GRA] = { "graphic/mail_gra.narc" }, - [NARC_INDEX_GRAPHIC__F_NOTE_GRA] = { "graphic/f_note_gra.narc" }, - [NARC_INDEX_DATA__MMODEL__MMODEL] = { "data/mmodel/mmodel.narc" }, - [NARC_INDEX_GRAPHIC__EV_POKESELECT] = { "graphic/ev_pokeselect.narc" }, - [NARC_INDEX_GRAPHIC__PORU_GRA] = { "graphic/poru_gra.narc" }, - [NARC_INDEX_GRAPHIC__TOUCH_SUBWINDOW] = { "graphic/touch_subwindow.narc" }, - [NARC_INDEX_GRAPHIC__FLD_COMACT] = { "graphic/fld_comact.narc" }, - [NARC_INDEX_GRAPHIC__RECORD] = { "graphic/record.narc" }, - [NARC_INDEX_GRAPHIC__PORUDEMO] = { "graphic/porudemo.narc" }, - [NARC_INDEX_GRAPHIC__PORUACT] = { "graphic/poruact.narc" }, - [NARC_INDEX_GRAPHIC__PL_WIFINOTE] = { "graphic/pl_wifinote.narc" }, - [NARC_INDEX_CONTEST__DATA__CONTEST_DATA] = { "contest/data/contest_data.narc" }, - [NARC_INDEX_APPLICATION__CUSTOM_BALL__DATA__CB_DATA] = { "application/custom_ball/data/cb_data.narc" }, - [NARC_INDEX_DATA__WIFIP2PMATCH] = { "data/wifip2pmatch.narc" }, - [NARC_INDEX_GRAPHIC__DEMO_TRADE] = { "graphic/demo_trade.narc" }, - [NARC_INDEX_POKEANIME__PL_POKE_ANM] = { "pokeanime/pl_poke_anm.narc" }, - [NARC_INDEX_GRAPHIC__MYSIGN] = { "graphic/mysign.narc" }, - [NARC_INDEX_FIELDDATA__MM_LIST__MOVE_MODEL_LIST] = { "fielddata/mm_list/move_model_list.narc" }, - [NARC_INDEX_DATA__FIELD_CUTIN] = { "data/field_cutin.narc" }, - [NARC_INDEX_DATA__DEMO_CLIMAX] = { "data/demo_climax.narc" }, - [NARC_INDEX_WAZAEFFECT__EFFECTDATA__BALL_PARTICLE] = { "wazaeffect/effectdata/ball_particle.narc" }, - [NARC_INDEX_WAZAEFFECT__PT_DEBUG__DEBUG_PARTICLE] = { "wazaeffect/pt_debug/debug_particle.narc" }, - [NARC_INDEX_GRAPHIC__DENDOU_PC] = { "graphic/dendou_pc.narc" }, - [NARC_INDEX_APPLICATION__WIFI_EARTH__WIFI_EARTH_PLACE] = { "application/wifi_earth/wifi_earth_place.narc" }, - [NARC_INDEX_BATTLE__TR_AI__TR_AI_SEQ] = { "battle/tr_ai/tr_ai_seq.narc" }, - [NARC_INDEX_GRAPHIC__WORLDTRADE] = { "graphic/worldtrade.narc" }, - [NARC_INDEX_GRAPHIC__DENDOU_DEMO] = { "graphic/dendou_demo.narc" }, - [NARC_INDEX_ARC__ENCDATA_EX] = { "arc/encdata_ex.narc" }, - [NARC_INDEX_DATA__MMODEL__FLDEFF] = { "data/mmodel/fldeff.narc" }, - [NARC_INDEX_BATTLE__GRAPHIC__VS_DEMO_GRA] = { "battle/graphic/vs_demo_gra.narc" }, - [NARC_INDEX_POKETOOL__PL_POKEZUKAN] = { "poketool/pl_pokezukan.narc" }, - [NARC_INDEX_ARC__BM_ANIME] = { "arc/bm_anime.narc" }, - [NARC_INDEX_ARC__BM_ANIME_LIST] = { "arc/bm_anime_list.narc" }, - [NARC_INDEX_GRAPHIC__FIELD_ENCOUNTEFFECT] = { "graphic/field_encounteffect.narc" }, - [NARC_INDEX_GRAPHIC__WAZA_OSHIE_GRA] = { "graphic/waza_oshie_gra.narc" }, - [NARC_INDEX_POKETOOL__POKEANM__PL_POKEANM] = { "poketool/pokeanm/pl_pokeanm.narc" }, - [NARC_INDEX_FIELDDATA__POKEMON_TRADE__FLD_TRADE] = { "fielddata/pokemon_trade/fld_trade.narc" }, - [NARC_INDEX_GRAPHIC__MYSTERY] = { "graphic/mystery.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__PL_OTHERPOKE] = { "poketool/pokegra/pl_otherpoke.narc" }, - [NARC_INDEX_DEMO__EGG__DATA__EGG_DATA] = { "demo/egg/data/egg_data.narc" }, - [NARC_INDEX_DEMO__EGG__DATA__PARTICLE__EGG_DEMO_PARTICLE] = { "demo/egg/data/particle/egg_demo_particle.narc" }, - [NARC_INDEX_ARC__SHIP_DEMO] = { "arc/ship_demo.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__HEIGHT_O] = { "poketool/pokegra/height_o.narc" }, - [NARC_INDEX_GRAPHIC__NUTMIXER] = { "graphic/nutmixer.narc" }, - [NARC_INDEX_GRAPHIC__BTOWER] = { "graphic/btower.narc" }, - [NARC_INDEX_DEMO__SHINKA__DATA__PARTICLE__SHINKA_DEMO_PARTICLE] = { "demo/shinka/data/particle/shinka_demo_particle.narc" }, - [NARC_INDEX_DEMO__INTRO__INTRO] = { "demo/intro/intro.narc" }, - [NARC_INDEX_ARC__TV] = { "arc/tv.narc" }, - [NARC_INDEX_GRAPHIC__ENDING] = { "graphic/ending.narc" }, - [NARC_INDEX_DEMO__TITLE__OP_DEMO] = { "demo/title/op_demo.narc" }, - [NARC_INDEX_APPLICATION__WIFI_EARTH__WIFI_EARTH] = { "application/wifi_earth/wifi_earth.narc" }, - [NARC_INDEX_GRAPHIC__RANKING] = { "graphic/ranking.narc" }, - [NARC_INDEX_ARC__PPARK] = { "arc/ppark.narc" }, - [NARC_INDEX_DEMO__SYOUJYOU__SYOUJYOU] = { "demo/syoujyou/syoujyou.narc" }, - [NARC_INDEX_DATA__SLOT] = { "data/slot.narc" }, - [NARC_INDEX_BATTLE__B_TOWER__BTDTR] = { "battle/b_tower/btdtr.narc" }, - [NARC_INDEX_BATTLE__B_TOWER__BTDPM] = { "battle/b_tower/btdpm.narc" }, - [NARC_INDEX_DEMO__INTRO__INTRO_TV] = { "demo/intro/intro_tv.narc" }, - [NARC_INDEX_POKETOOL__TRMSG__TRTBLOFS] = { "poketool/trmsg/trtblofs.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__POKE_YOFS] = { "poketool/pokegra/poke_yofs.narc" }, - [NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_DIAMOND] = { "application/zukanlist/zkn_data/zukan_enc_diamond.narc" }, - [NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_PEARL] = { "application/zukanlist/zkn_data/zukan_enc_pearl.narc" }, - [NARC_INDEX_GRAPHIC__HIDEN_EFFECT] = { "graphic/hiden_effect.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__POKE_SHADOW] = { "poketool/pokegra/poke_shadow.narc" }, - [NARC_INDEX_FIELDDATA__ENCOUNTDATA__P_ENC_DATA] = { "fielddata/encountdata/p_enc_data.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__POKE_SHADOW_OFX] = { "poketool/pokegra/poke_shadow_ofx.narc" }, - [NARC_INDEX_POKETOOL__SHINZUKAN] = { "poketool/shinzukan.narc" }, - [NARC_INDEX_GRAPHIC__WIFI2DCHAR] = { "graphic/wifi2dchar.narc" }, - [NARC_INDEX_POKETOOL__POKE_EDIT__PL_POKE_DATA] = { "poketool/poke_edit/pl_poke_data.narc" }, - [NARC_INDEX_DEBUG__CB_EDIT__D_TEST] = { "debug/cb_edit/d_test.narc" }, - [NARC_INDEX_FRONTIER__SCRIPT__FR_SCRIPT] = { "frontier/script/fr_script.narc" }, - [NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_BG] = { "resource/eng/frontier_graphic/frontier_bg.narc" }, - [NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_OBJ] = { "resource/eng/frontier_graphic/frontier_obj.narc" }, - [NARC_INDEX_APPLICATION__CUSTOM_BALL__EDIT__PL_CB_DATA] = { "application/custom_ball/edit/pl_cb_data.narc" }, - [NARC_INDEX_GRAPHIC__WIFI_UNIONOBJ] = { "graphic/wifi_unionobj.narc" }, - [NARC_INDEX_DATA__GURU2] = { "data/guru2.narc" }, - [NARC_INDEX_DATA__FLDTANIME] = { "data/fldtanime.narc" }, - [NARC_INDEX_ARC__SHIP_DEMO_PL] = { "arc/ship_demo_pl.narc" }, - [NARC_INDEX_PARTICLEDATA__PL_FRONTIER__FRONTIER_PARTICLE] = { "particledata/pl_frontier/frontier_particle.narc" }, - [NARC_INDEX_GRAPHIC__BUCKET] = { "graphic/bucket.narc" }, - [NARC_INDEX_ARC__CODEIN_GRA] = { "arc/codein_gra.narc" }, - [NARC_INDEX_ARC__AREA_WIN_GRA] = { "arc/area_win_gra.narc" }, - [NARC_INDEX_FIELDDATA__ENCOUNTDATA__PL_ENC_DATA] = { "fielddata/encountdata/pl_enc_data.narc" }, - [NARC_INDEX_RESOURCE__ENG__BATT_REC__BATT_REC_GRA] = { "resource/eng/batt_rec/batt_rec_gra.narc" }, - [NARC_INDEX_GRAPHIC__WORLDTIMER] = { "graphic/worldtimer.narc" }, - [NARC_INDEX_ARC__MANENE] = { "arc/manene.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__POKEGRA] = { "poketool/pokegra/pokegra.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__OTHERPOKE] = { "poketool/pokegra/otherpoke.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__DP_HEIGHT] = { "poketool/pokegra/dp_height.narc" }, - [NARC_INDEX_POKETOOL__POKEGRA__DP_HEIGHT_O] = { "poketool/pokegra/dp_height_o.narc" }, - [NARC_INDEX_GRAPHIC__LOBBY_NEWS] = { "graphic/lobby_news.narc" }, - [NARC_INDEX_ARC__EMAIL_GRA] = { "arc/email_gra.narc" }, - [NARC_INDEX_RESOURCE__ENG__WIFI_LOBBY_MINIGAME__WLMNGM_TOOL] = { "resource/eng/wifi_lobby_minigame/wlmngm_tool.narc" }, - [NARC_INDEX_ARC__DEMO_TENGAN_GRA] = { "arc/demo_tengan_gra.narc" }, - [NARC_INDEX_APPLICATION__BALLOON__GRAPHIC__BALLOON_GRA] = { "application/balloon/graphic/balloon_gra.narc" }, - [NARC_INDEX_APPLICATION__WIFI_LOBBY__MAP_CONV__WFLBY_MAP] = { "application/wifi_lobby/map_conv/wflby_map.narc" }, - [NARC_INDEX_GRAPHIC__WIFI_LOBBY] = { "graphic/wifi_lobby.narc" }, - [NARC_INDEX_DATA__AREALIGHT] = { "data/arealight.narc" }, - [NARC_INDEX_DATA__UGROUNDEFFECT] = { "data/ugroundeffect.narc" }, - [NARC_INDEX_BATTLE__B_PL_TOWER__PL_BTDTR] = { "battle/b_pl_tower/pl_btdtr.narc" }, - [NARC_INDEX_BATTLE__B_PL_TOWER__PL_BTDPM] = { "battle/b_pl_tower/pl_btdpm.narc" }, - [NARC_INDEX_BATTLE__B_PL_STAGE__PL_BSDPM] = { "battle/b_pl_stage/pl_bsdpm.narc" }, - [NARC_INDEX_FIELDDATA__TORNWORLD__TW_ARC] = { "fielddata/tornworld/tw_arc.narc" }, - [NARC_INDEX_FIELDDATA__TORNWORLD__TW_ARC_ATTR] = { "fielddata/tornworld/tw_arc_attr.narc" }, - [NARC_INDEX_DATA__TW_ARC_ETC] = { "data/tw_arc_etc.narc" }, - [NARC_INDEX_RESOURCE__ENG__SCRATCH__SCRATCH] = { "resource/eng/scratch/scratch.narc" }, - [NARC_INDEX_PARTICLEDATA__PL_POKELIST__POKELIST_PARTICLE] = { "particledata/pl_pokelist/pokelist_particle.narc" }, - [NARC_INDEX_GRAPHIC__WIFI_LOBBY_OTHER] = { "graphic/wifi_lobby_other.narc" }, - [NARC_INDEX_GRAPHIC__FOOTPRINT_BOARD] = { "graphic/footprint_board.narc" }, - [NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_PLATINUM] = { "application/zukanlist/zkn_data/zukan_enc_platinum.narc" }, - [NARC_INDEX_APPLICATION__BUCKET__BALLSLOW_DATA] = { "application/bucket/ballslow_data.narc" }, - [NARC_INDEX_PARTICLEDATA__PL_ETC__PL_ETC_PARTICLE] = { "particledata/pl_etc/pl_etc_particle.narc" }, - [NARC_INDEX_RESOURCE__ENG__PMS_AIKOTOBA__PMS_AIKOTOBA] = { "resource/eng/pms_aikotoba/pms_aikotoba.narc" }, - [NARC_INDEX_GRAPHIC__UNIONOBJ2D_ONLYFRONT] = { "graphic/unionobj2d_onlyfront.narc" }, - [NARC_INDEX_GRAPHIC__LIBRARY_TV] = { "graphic/library_tv.narc" }, - [NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA_GIRA] = { "application/zukanlist/zkn_data/zukan_data_gira.narc" }, + [NARC_INDEX_BATTLE__SKILL__WAZA_SEQ] = "battle/skill/waza_seq.narc", + [NARC_INDEX_BATTLE__SKILL__SUB_SEQ] = "battle/skill/sub_seq.narc", + [NARC_INDEX_POKETOOL__PERSONAL__PL_PERSONAL] = "poketool/personal/pl_personal.narc", + [NARC_INDEX_POKETOOL__PERSONAL__PL_GROWTBL] = "poketool/personal/pl_growtbl.narc", + [NARC_INDEX_POKETOOL__POKEGRA__PL_POKEGRA] = "poketool/pokegra/pl_pokegra.narc", + [NARC_INDEX_POKETOOL__POKEGRA__HEIGHT] = "poketool/pokegra/height.narc", + [NARC_INDEX_POKETOOL__TRGRA__TRBGRA] = "poketool/trgra/trbgra.narc", + [NARC_INDEX_BATTLE__GRAPHIC__PL_BATT_BG] = "battle/graphic/pl_batt_bg.narc", + [NARC_INDEX_WAZAEFFECT__WE] = "wazaeffect/we.arc", + [NARC_INDEX_POKETOOL__WAZA__PL_WAZA_TBL] = "poketool/waza/pl_waza_tbl.narc", + [NARC_INDEX_FIELDDATA__SCRIPT__SCR_SEQ] = "fielddata/script/scr_seq.narc", + [NARC_INDEX_MSGDATA__SCENARIO__SCR_MSG] = "msgdata/scenario/scr_msg.narc", + [NARC_INDEX_GRAPHIC__POKETCH] = "graphic/poketch.narc", + [NARC_INDEX_GRAPHIC__PL_BAG_GRA] = "graphic/pl_bag_gra.narc", + [NARC_INDEX_GRAPHIC__PL_FONT] = "graphic/pl_font.narc", + [NARC_INDEX_ITEMTOOL__ITEMDATA__PL_ITEM_DATA] = "itemtool/itemdata/pl_item_data.narc", + [NARC_INDEX_ITEMTOOL__ITEMDATA__ITEM_ICON] = "itemtool/itemdata/item_icon.narc", + [NARC_INDEX_GRAPHIC__TMAP_GRA] = "graphic/tmap_gra.narc", + [NARC_INDEX_GRAPHIC__BOX] = "graphic/box.narc", + [NARC_INDEX_POKETOOL__ICONGRA__PL_POKE_ICON] = "poketool/icongra/pl_poke_icon.narc", + [NARC_INDEX_GRAPHIC__PL_PLIST_GRA] = "graphic/pl_plist_gra.narc", + [NARC_INDEX_WAZAEFFECT__EFFECTCLACT__WECHAR] = "wazaeffect/effectclact/wechar.narc", + [NARC_INDEX_WAZAEFFECT__EFFECTCLACT__WEPLTT] = "wazaeffect/effectclact/wepltt.narc", + [NARC_INDEX_WAZAEFFECT__EFFECTCLACT__WECELL] = "wazaeffect/effectclact/wecell.narc", + [NARC_INDEX_WAZAEFFECT__EFFECTCLACT__WECELLANM] = "wazaeffect/effectclact/wecellanm.narc", + [NARC_INDEX_GRAPHIC__IMAGECLIP] = "graphic/imageclip.narc", + [NARC_INDEX_MSGDATA__PL_MSG] = "msgdata/pl_msg.narc", + [NARC_INDEX_BATTLE__GRAPHIC__PL_BATT_OBJ] = "battle/graphic/pl_batt_obj.narc", + [NARC_INDEX_DATA__UNDERG_RADAR] = "data/underg_radar.narc", + [NARC_INDEX_WAZAEFFECT__EFFECTDATA__WAZA_PARTICLE] = "wazaeffect/effectdata/waza_particle.narc", + [NARC_INDEX_BATTLE__SKILL__BE_SEQ] = "battle/skill/be_seq.narc", + [NARC_INDEX_DATA__NAMEIN] = "data/namein.narc", + [NARC_INDEX_FIELDDATA__EVENTDATA__ZONE_EVENT] = "fielddata/eventdata/zone_event.narc", + [NARC_INDEX_POKETOOL__PERSONAL__WOTBL] = "poketool/personal/wotbl.narc", + [NARC_INDEX_POKETOOL__PERSONAL__EVO] = "poketool/personal/evo.narc", + [NARC_INDEX_GRAPHIC__FONTOAM] = "graphic/fontoam.narc", + [NARC_INDEX_GRAPHIC__FIELD_BOARD] = "graphic/field_board.narc", + [NARC_INDEX_FIELDDATA__ENCOUNTDATA__D_ENC_DATA] = "fielddata/encountdata/d_enc_data.narc", + [NARC_INDEX_GRAPHIC__PL_WINFRAME] = "graphic/pl_winframe.narc", + [NARC_INDEX_GRAPHIC__PL_PST_GRA] = "graphic/pl_pst_gra.narc", + [NARC_INDEX_FIELDDATA__BUILD_MODEL__BUILD_MODEL] = "fielddata/build_model/build_model.narc", + [NARC_INDEX_FIELDDATA__MAPMATRIX__MAP_MATRIX] = "fielddata/mapmatrix/map_matrix.narc", + [NARC_INDEX_FIELDDATA__AREADATA__AREA_DATA] = "fielddata/areadata/area_data.narc", + [NARC_INDEX_FIELDDATA__AREADATA__AREA_BUILD_MODEL__AREA_BUILD] = "fielddata/areadata/area_build_model/area_build.narc", + [NARC_INDEX_FIELDDATA__AREADATA__AREA_MAP_TEX__MAP_TEX_SET] = "fielddata/areadata/area_map_tex/map_tex_set.narc", + [NARC_INDEX_CONTEST__GRAPHIC__CONTEST_BG] = "contest/graphic/contest_bg.narc", + [NARC_INDEX_CONTEST__GRAPHIC__CONTEST_OBJ] = "contest/graphic/contest_obj.narc", + [NARC_INDEX_DATA__UGEFFECT_OBJ_GRAPHIC] = "data/ugeffect_obj_graphic.narc", + [NARC_INDEX_DEMO__TITLE__TITLEDEMO] = "demo/title/titledemo.narc", + [NARC_INDEX_FIELDDATA__AREADATA__AREA_MOVE_MODEL__MOVE_MODEL_LIST] = "fielddata/areadata/area_move_model/move_model_list.narc", + [NARC_INDEX_DATA__UG_TRAP] = "data/ug_trap.narc", + [NARC_INDEX_GRAPHIC__TRAINER_CASE] = "graphic/trainer_case.narc", + [NARC_INDEX_DATA__UG_FOSSIL] = "data/ug_fossil.narc", + [NARC_INDEX_GRAPHIC__NTAG_GRA] = "graphic/ntag_gra.narc", + [NARC_INDEX_DATA__TRADELIST] = "data/tradelist.narc", + [NARC_INDEX_DATA__UG_PARTS] = "data/ug_parts.narc", + [NARC_INDEX_GRAPHIC__OPENING] = "graphic/opening.narc", + [NARC_INDEX_POKETOOL__TRAINER__TRDATA] = "poketool/trainer/trdata.narc", + [NARC_INDEX_POKETOOL__TRAINER__TRPOKE] = "poketool/trainer/trpoke.narc", + [NARC_INDEX_POKETOOL__TRMSG__TRTBL] = "poketool/trmsg/trtbl.narc", + [NARC_INDEX_POKETOOL__TRGRA__TRFGRA] = "poketool/trgra/trfgra.narc", + [NARC_INDEX_PARTICLEDATA__PARTICLEDATA] = "particledata/particledata.narc", + [NARC_INDEX_GRAPHIC__SHOP_GRA] = "graphic/shop_gra.narc", + [NARC_INDEX_WAZAEFFECT__WE_SUB] = "wazaeffect/we_sub.narc", + [NARC_INDEX_DATA__UG_ANIM] = "data/ug_anim.narc", + [NARC_INDEX_DATA__WEATHER_SYS] = "data/weather_sys.narc", + [NARC_INDEX_GRAPHIC__MENU_GRA] = "graphic/menu_gra.narc", + [NARC_INDEX_FIELDDATA__LAND_DATA__LAND_DATA] = "fielddata/land_data/land_data.narc", + [NARC_INDEX_ITEMTOOL__ITEMDATA__NUTS_DATA] = "itemtool/itemdata/nuts_data.narc", + [NARC_INDEX_RESOURCE__ENG__ZUKAN__ZUKAN] = "resource/eng/zukan/zukan.narc", + [NARC_INDEX_POKETOOL__POKEFOOT__POKEFOOT] = "poketool/pokefoot/pokefoot.narc", + [NARC_INDEX_FIELDDATA__AREADATA__AREA_BUILD_MODEL__AREABM_TEXSET] = "fielddata/areadata/area_build_model/areabm_texset.narc", + [NARC_INDEX_BATTLE__GRAPHIC__PL_B_PLIST_GRA] = "battle/graphic/pl_b_plist_gra.narc", + [NARC_INDEX_GRAPHIC__CONFIG_GRA] = "graphic/config_gra.narc", + [NARC_INDEX_GRAPHIC__UNIONROOM] = "graphic/unionroom.narc", + [NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA] = "application/zukanlist/zkn_data/zukan_data.narc", + [NARC_INDEX_GRAPHIC__PMSI] = "graphic/pmsi.narc", + [NARC_INDEX_BATTLE__GRAPHIC__B_BAG_GRA] = "battle/graphic/b_bag_gra.narc", + [NARC_INDEX_GRAPHIC__OEKAKI] = "graphic/oekaki.narc", + [NARC_INDEX_GRAPHIC__MAIL_GRA] = "graphic/mail_gra.narc", + [NARC_INDEX_GRAPHIC__F_NOTE_GRA] = "graphic/f_note_gra.narc", + [NARC_INDEX_DATA__MMODEL__MMODEL] = "data/mmodel/mmodel.narc", + [NARC_INDEX_GRAPHIC__EV_POKESELECT] = "graphic/ev_pokeselect.narc", + [NARC_INDEX_GRAPHIC__PORU_GRA] = "graphic/poru_gra.narc", + [NARC_INDEX_GRAPHIC__TOUCH_SUBWINDOW] = "graphic/touch_subwindow.narc", + [NARC_INDEX_GRAPHIC__FLD_COMACT] = "graphic/fld_comact.narc", + [NARC_INDEX_GRAPHIC__RECORD] = "graphic/record.narc", + [NARC_INDEX_GRAPHIC__PORUDEMO] = "graphic/porudemo.narc", + [NARC_INDEX_GRAPHIC__PORUACT] = "graphic/poruact.narc", + [NARC_INDEX_GRAPHIC__PL_WIFINOTE] = "graphic/pl_wifinote.narc", + [NARC_INDEX_CONTEST__DATA__CONTEST_DATA] = "contest/data/contest_data.narc", + [NARC_INDEX_APPLICATION__CUSTOM_BALL__DATA__CB_DATA] = "application/custom_ball/data/cb_data.narc", + [NARC_INDEX_DATA__WIFIP2PMATCH] = "data/wifip2pmatch.narc", + [NARC_INDEX_GRAPHIC__DEMO_TRADE] = "graphic/demo_trade.narc", + [NARC_INDEX_POKEANIME__PL_POKE_ANM] = "pokeanime/pl_poke_anm.narc", + [NARC_INDEX_GRAPHIC__MYSIGN] = "graphic/mysign.narc", + [NARC_INDEX_FIELDDATA__MM_LIST__MOVE_MODEL_LIST] = "fielddata/mm_list/move_model_list.narc", + [NARC_INDEX_DATA__FIELD_CUTIN] = "data/field_cutin.narc", + [NARC_INDEX_DATA__DEMO_CLIMAX] = "data/demo_climax.narc", + [NARC_INDEX_WAZAEFFECT__EFFECTDATA__BALL_PARTICLE] = "wazaeffect/effectdata/ball_particle.narc", + [NARC_INDEX_WAZAEFFECT__PT_DEBUG__DEBUG_PARTICLE] = "wazaeffect/pt_debug/debug_particle.narc", + [NARC_INDEX_GRAPHIC__DENDOU_PC] = "graphic/dendou_pc.narc", + [NARC_INDEX_APPLICATION__WIFI_EARTH__WIFI_EARTH_PLACE] = "application/wifi_earth/wifi_earth_place.narc", + [NARC_INDEX_BATTLE__TR_AI__TR_AI_SEQ] = "battle/tr_ai/tr_ai_seq.narc", + [NARC_INDEX_GRAPHIC__WORLDTRADE] = "graphic/worldtrade.narc", + [NARC_INDEX_GRAPHIC__DENDOU_DEMO] = "graphic/dendou_demo.narc", + [NARC_INDEX_ARC__ENCDATA_EX] = "arc/encdata_ex.narc", + [NARC_INDEX_DATA__MMODEL__FLDEFF] = "data/mmodel/fldeff.narc", + [NARC_INDEX_BATTLE__GRAPHIC__VS_DEMO_GRA] = "battle/graphic/vs_demo_gra.narc", + [NARC_INDEX_POKETOOL__PL_POKEZUKAN] = "poketool/pl_pokezukan.narc", + [NARC_INDEX_ARC__BM_ANIME] = "arc/bm_anime.narc", + [NARC_INDEX_ARC__BM_ANIME_LIST] = "arc/bm_anime_list.narc", + [NARC_INDEX_GRAPHIC__FIELD_ENCOUNTEFFECT] = "graphic/field_encounteffect.narc", + [NARC_INDEX_GRAPHIC__WAZA_OSHIE_GRA] = "graphic/waza_oshie_gra.narc", + [NARC_INDEX_POKETOOL__POKEANM__PL_POKEANM] = "poketool/pokeanm/pl_pokeanm.narc", + [NARC_INDEX_FIELDDATA__POKEMON_TRADE__FLD_TRADE] = "fielddata/pokemon_trade/fld_trade.narc", + [NARC_INDEX_GRAPHIC__MYSTERY] = "graphic/mystery.narc", + [NARC_INDEX_POKETOOL__POKEGRA__PL_OTHERPOKE] = "poketool/pokegra/pl_otherpoke.narc", + [NARC_INDEX_DEMO__EGG__DATA__EGG_DATA] = "demo/egg/data/egg_data.narc", + [NARC_INDEX_DEMO__EGG__DATA__PARTICLE__EGG_DEMO_PARTICLE] = "demo/egg/data/particle/egg_demo_particle.narc", + [NARC_INDEX_ARC__SHIP_DEMO] = "arc/ship_demo.narc", + [NARC_INDEX_POKETOOL__POKEGRA__HEIGHT_O] = "poketool/pokegra/height_o.narc", + [NARC_INDEX_GRAPHIC__NUTMIXER] = "graphic/nutmixer.narc", + [NARC_INDEX_GRAPHIC__BTOWER] = "graphic/btower.narc", + [NARC_INDEX_DEMO__SHINKA__DATA__PARTICLE__SHINKA_DEMO_PARTICLE] = "demo/shinka/data/particle/shinka_demo_particle.narc", + [NARC_INDEX_DEMO__INTRO__INTRO] = "demo/intro/intro.narc", + [NARC_INDEX_ARC__TV] = "arc/tv.narc", + [NARC_INDEX_GRAPHIC__ENDING] = "graphic/ending.narc", + [NARC_INDEX_DEMO__TITLE__OP_DEMO] = "demo/title/op_demo.narc", + [NARC_INDEX_APPLICATION__WIFI_EARTH__WIFI_EARTH] = "application/wifi_earth/wifi_earth.narc", + [NARC_INDEX_GRAPHIC__RANKING] = "graphic/ranking.narc", + [NARC_INDEX_ARC__PPARK] = "arc/ppark.narc", + [NARC_INDEX_DEMO__SYOUJYOU__SYOUJYOU] = "demo/syoujyou/syoujyou.narc", + [NARC_INDEX_DATA__SLOT] = "data/slot.narc", + [NARC_INDEX_BATTLE__B_TOWER__BTDTR] = "battle/b_tower/btdtr.narc", + [NARC_INDEX_BATTLE__B_TOWER__BTDPM] = "battle/b_tower/btdpm.narc", + [NARC_INDEX_DEMO__INTRO__INTRO_TV] = "demo/intro/intro_tv.narc", + [NARC_INDEX_POKETOOL__TRMSG__TRTBLOFS] = "poketool/trmsg/trtblofs.narc", + [NARC_INDEX_POKETOOL__POKEGRA__POKE_YOFS] = "poketool/pokegra/poke_yofs.narc", + [NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_DIAMOND] = "application/zukanlist/zkn_data/zukan_enc_diamond.narc", + [NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_PEARL] = "application/zukanlist/zkn_data/zukan_enc_pearl.narc", + [NARC_INDEX_GRAPHIC__HIDEN_EFFECT] = "graphic/hiden_effect.narc", + [NARC_INDEX_POKETOOL__POKEGRA__POKE_SHADOW] = "poketool/pokegra/poke_shadow.narc", + [NARC_INDEX_FIELDDATA__ENCOUNTDATA__P_ENC_DATA] = "fielddata/encountdata/p_enc_data.narc", + [NARC_INDEX_POKETOOL__POKEGRA__POKE_SHADOW_OFX] = "poketool/pokegra/poke_shadow_ofx.narc", + [NARC_INDEX_POKETOOL__SHINZUKAN] = "poketool/shinzukan.narc", + [NARC_INDEX_GRAPHIC__WIFI2DCHAR] = "graphic/wifi2dchar.narc", + [NARC_INDEX_POKETOOL__POKE_EDIT__PL_POKE_DATA] = "poketool/poke_edit/pl_poke_data.narc", + [NARC_INDEX_DEBUG__CB_EDIT__D_TEST] = "debug/cb_edit/d_test.narc", + [NARC_INDEX_FRONTIER__SCRIPT__FR_SCRIPT] = "frontier/script/fr_script.narc", + [NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_BG] = "resource/eng/frontier_graphic/frontier_bg.narc", + [NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_OBJ] = "resource/eng/frontier_graphic/frontier_obj.narc", + [NARC_INDEX_APPLICATION__CUSTOM_BALL__EDIT__PL_CB_DATA] = "application/custom_ball/edit/pl_cb_data.narc", + [NARC_INDEX_GRAPHIC__WIFI_UNIONOBJ] = "graphic/wifi_unionobj.narc", + [NARC_INDEX_DATA__GURU2] = "data/guru2.narc", + [NARC_INDEX_DATA__FLDTANIME] = "data/fldtanime.narc", + [NARC_INDEX_ARC__SHIP_DEMO_PL] = "arc/ship_demo_pl.narc", + [NARC_INDEX_PARTICLEDATA__PL_FRONTIER__FRONTIER_PARTICLE] = "particledata/pl_frontier/frontier_particle.narc", + [NARC_INDEX_GRAPHIC__BUCKET] = "graphic/bucket.narc", + [NARC_INDEX_ARC__CODEIN_GRA] = "arc/codein_gra.narc", + [NARC_INDEX_ARC__AREA_WIN_GRA] = "arc/area_win_gra.narc", + [NARC_INDEX_FIELDDATA__ENCOUNTDATA__PL_ENC_DATA] = "fielddata/encountdata/pl_enc_data.narc", + [NARC_INDEX_RESOURCE__ENG__BATT_REC__BATT_REC_GRA] = "resource/eng/batt_rec/batt_rec_gra.narc", + [NARC_INDEX_GRAPHIC__WORLDTIMER] = "graphic/worldtimer.narc", + [NARC_INDEX_ARC__MANENE] = "arc/manene.narc", + [NARC_INDEX_POKETOOL__POKEGRA__POKEGRA] = "poketool/pokegra/pokegra.narc", + [NARC_INDEX_POKETOOL__POKEGRA__OTHERPOKE] = "poketool/pokegra/otherpoke.narc", + [NARC_INDEX_POKETOOL__POKEGRA__DP_HEIGHT] = "poketool/pokegra/dp_height.narc", + [NARC_INDEX_POKETOOL__POKEGRA__DP_HEIGHT_O] = "poketool/pokegra/dp_height_o.narc", + [NARC_INDEX_GRAPHIC__LOBBY_NEWS] = "graphic/lobby_news.narc", + [NARC_INDEX_ARC__EMAIL_GRA] = "arc/email_gra.narc", + [NARC_INDEX_RESOURCE__ENG__WIFI_LOBBY_MINIGAME__WLMNGM_TOOL] = "resource/eng/wifi_lobby_minigame/wlmngm_tool.narc", + [NARC_INDEX_ARC__DEMO_TENGAN_GRA] = "arc/demo_tengan_gra.narc", + [NARC_INDEX_APPLICATION__BALLOON__GRAPHIC__BALLOON_GRA] = "application/balloon/graphic/balloon_gra.narc", + [NARC_INDEX_APPLICATION__WIFI_LOBBY__MAP_CONV__WFLBY_MAP] = "application/wifi_lobby/map_conv/wflby_map.narc", + [NARC_INDEX_GRAPHIC__WIFI_LOBBY] = "graphic/wifi_lobby.narc", + [NARC_INDEX_DATA__AREALIGHT] = "data/arealight.narc", + [NARC_INDEX_DATA__UGROUNDEFFECT] = "data/ugroundeffect.narc", + [NARC_INDEX_BATTLE__B_PL_TOWER__PL_BTDTR] = "battle/b_pl_tower/pl_btdtr.narc", + [NARC_INDEX_BATTLE__B_PL_TOWER__PL_BTDPM] = "battle/b_pl_tower/pl_btdpm.narc", + [NARC_INDEX_BATTLE__B_PL_STAGE__PL_BSDPM] = "battle/b_pl_stage/pl_bsdpm.narc", + [NARC_INDEX_FIELDDATA__TORNWORLD__TW_ARC] = "fielddata/tornworld/tw_arc.narc", + [NARC_INDEX_FIELDDATA__TORNWORLD__TW_ARC_ATTR] = "fielddata/tornworld/tw_arc_attr.narc", + [NARC_INDEX_DATA__TW_ARC_ETC] = "data/tw_arc_etc.narc", + [NARC_INDEX_RESOURCE__ENG__SCRATCH__SCRATCH] = "resource/eng/scratch/scratch.narc", + [NARC_INDEX_PARTICLEDATA__PL_POKELIST__POKELIST_PARTICLE] = "particledata/pl_pokelist/pokelist_particle.narc", + [NARC_INDEX_GRAPHIC__WIFI_LOBBY_OTHER] = "graphic/wifi_lobby_other.narc", + [NARC_INDEX_GRAPHIC__FOOTPRINT_BOARD] = "graphic/footprint_board.narc", + [NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_PLATINUM] = "application/zukanlist/zkn_data/zukan_enc_platinum.narc", + [NARC_INDEX_APPLICATION__BUCKET__BALLSLOW_DATA] = "application/bucket/ballslow_data.narc", + [NARC_INDEX_PARTICLEDATA__PL_ETC__PL_ETC_PARTICLE] = "particledata/pl_etc/pl_etc_particle.narc", + [NARC_INDEX_RESOURCE__ENG__PMS_AIKOTOBA__PMS_AIKOTOBA] = "resource/eng/pms_aikotoba/pms_aikotoba.narc", + [NARC_INDEX_GRAPHIC__UNIONOBJ2D_ONLYFRONT] = "graphic/unionobj2d_onlyfront.narc", + [NARC_INDEX_GRAPHIC__LIBRARY_TV] = "graphic/library_tv.narc", + [NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA_GIRA] = "application/zukanlist/zkn_data/zukan_data_gira.narc", }; static void ReadFromNarcMemberByPathAndIndex(void *dest, const char *path, int memberIndex, int offset, int bytesToRead); @@ -394,22 +394,22 @@ NARC *NARC_ctor(u32 narcIndex, u32 heapID) u32 btnfStart; u32 chunkSize; - narc->unk_AC = 0; + narc->fatbStart = 0; - FS_InitFile(&(narc->unk_00)); - FS_OpenFile(&(narc->unk_00), sNarcPaths[narcIndex]); - FS_SeekFile(&(narc->unk_00), 12, FS_SEEK_SET); - FS_ReadFile(&(narc->unk_00), &(narc->unk_AC), 2); - FS_SeekFile(&(narc->unk_00), narc->unk_AC + 4, FS_SEEK_SET); - FS_ReadFile(&(narc->unk_00), &chunkSize, 4); - FS_ReadFile(&(narc->unk_00), &(narc->unk_B4), 2); + FS_InitFile(&narc->file); + FS_OpenFile(&narc->file, sNarcPaths[narcIndex]); + FS_SeekFile(&narc->file, 12, FS_SEEK_SET); + FS_ReadFile(&narc->file, &(narc->fatbStart), 2); + FS_SeekFile(&narc->file, narc->fatbStart + 4, FS_SEEK_SET); + FS_ReadFile(&narc->file, &chunkSize, 4); + FS_ReadFile(&narc->file, &(narc->numFiles), 2); - btnfStart = narc->unk_AC + chunkSize; + btnfStart = narc->fatbStart + chunkSize; - FS_SeekFile(&(narc->unk_00), btnfStart + 4, FS_SEEK_SET); - FS_ReadFile(&(narc->unk_00), &chunkSize, 4); + FS_SeekFile(&narc->file, btnfStart + 4, FS_SEEK_SET); + FS_ReadFile(&narc->file, &chunkSize, 4); - narc->unk_B0 = btnfStart + chunkSize; + narc->fimgStart = btnfStart + chunkSize; } return narc; @@ -417,7 +417,7 @@ NARC *NARC_ctor(u32 narcIndex, u32 heapID) void NARC_dtor(NARC *param0) { - FS_CloseFile(&(param0->unk_00)); + FS_CloseFile(&(param0->file)); Heap_FreeToHeap(param0); } @@ -427,17 +427,17 @@ void *NARC_AllocAndReadWholeMember(NARC *narc, u32 memberIndex, u32 heapID) u32 fileEnd; void *dest; - GF_ASSERT(narc->unk_B4 > memberIndex); + GF_ASSERT(narc->numFiles > memberIndex); - FS_SeekFile(&(narc->unk_00), narc->unk_AC + 12 + memberIndex * 8, FS_SEEK_SET); - FS_ReadFile(&(narc->unk_00), &fileStart, 4); - FS_ReadFile(&(narc->unk_00), &fileEnd, 4); - FS_SeekFile(&(narc->unk_00), narc->unk_B0 + 8 + fileStart, FS_SEEK_SET); + FS_SeekFile(&narc->file, narc->fatbStart + 12 + memberIndex * 8, FS_SEEK_SET); + FS_ReadFile(&narc->file, &fileStart, 4); + FS_ReadFile(&narc->file, &fileEnd, 4); + FS_SeekFile(&narc->file, narc->fimgStart + 8 + fileStart, FS_SEEK_SET); dest = Heap_AllocFromHeap(heapID, fileEnd - fileStart); if (dest) { - FS_ReadFile(&(narc->unk_00), dest, fileEnd - fileStart); + FS_ReadFile(&narc->file, dest, fileEnd - fileStart); } return dest; @@ -448,13 +448,13 @@ void NARC_ReadWholeMember(NARC *narc, u32 memberIndex, void *dest) u32 fileStart; u32 fileEnd; - GF_ASSERT(narc->unk_B4 > memberIndex); + GF_ASSERT(narc->numFiles > memberIndex); - FS_SeekFile(&(narc->unk_00), narc->unk_AC + 12 + memberIndex * 8, FS_SEEK_SET); - FS_ReadFile(&(narc->unk_00), &fileStart, 4); - FS_ReadFile(&(narc->unk_00), &fileEnd, 4); - FS_SeekFile(&(narc->unk_00), narc->unk_B0 + 8 + fileStart, FS_SEEK_SET); - FS_ReadFile(&(narc->unk_00), dest, fileEnd - fileStart); + FS_SeekFile(&narc->file, narc->fatbStart + 12 + memberIndex * 8, FS_SEEK_SET); + FS_ReadFile(&narc->file, &fileStart, 4); + FS_ReadFile(&narc->file, &fileEnd, 4); + FS_SeekFile(&narc->file, narc->fimgStart + 8 + fileStart, FS_SEEK_SET); + FS_ReadFile(&narc->file, dest, fileEnd - fileStart); } u32 NARC_GetMemberSize(NARC *narc, u32 memberIndex) @@ -462,11 +462,11 @@ u32 NARC_GetMemberSize(NARC *narc, u32 memberIndex) u32 fileStart; u32 fileEnd; - GF_ASSERT(narc->unk_B4 > memberIndex); + GF_ASSERT(narc->numFiles > memberIndex); - FS_SeekFile(&(narc->unk_00), narc->unk_AC + 12 + memberIndex * 8, FS_SEEK_SET); - FS_ReadFile(&(narc->unk_00), &fileStart, 4); - FS_ReadFile(&(narc->unk_00), &fileEnd, 4); + FS_SeekFile(&narc->file, narc->fatbStart + 12 + memberIndex * 8, FS_SEEK_SET); + FS_ReadFile(&narc->file, &fileStart, 4); + FS_ReadFile(&narc->file, &fileEnd, 4); return fileEnd - fileStart; } @@ -475,25 +475,25 @@ void NARC_ReadFromMember(NARC *narc, u32 memberIndex, u32 offset, u32 bytesToRea { u32 fileStart; - GF_ASSERT(narc->unk_B4 > memberIndex); + GF_ASSERT(narc->numFiles > memberIndex); - FS_SeekFile(&(narc->unk_00), narc->unk_AC + 12 + memberIndex * 8, FS_SEEK_SET); - FS_ReadFile(&(narc->unk_00), &fileStart, 4); - FS_SeekFile(&(narc->unk_00), narc->unk_B0 + 8 + fileStart + offset, FS_SEEK_SET); - FS_ReadFile(&(narc->unk_00), dest, bytesToRead); + FS_SeekFile(&narc->file, narc->fatbStart + 12 + memberIndex * 8, FS_SEEK_SET); + FS_ReadFile(&narc->file, &fileStart, 4); + FS_SeekFile(&narc->file, narc->fimgStart + 8 + fileStart + offset, FS_SEEK_SET); + FS_ReadFile(&narc->file, dest, bytesToRead); } void NARC_ReadFile(NARC *narc, u32 bytesToRead, void *dest) { - FS_ReadFile(&(narc->unk_00), dest, bytesToRead); + FS_ReadFile(&narc->file, dest, bytesToRead); } -void sub_02006E28(NARC *param0, u32 param1) +void NARC_Seek(NARC *narc, u32 offset) { - FS_SeekFile(&(param0->unk_00), param1, FS_SEEK_CUR); + FS_SeekFile(&narc->file, offset, FS_SEEK_CUR); } u16 NARC_GetFileCount(NARC *narc) { - return narc->unk_B4; + return narc->numFiles; } diff --git a/src/overlay005/encounter_effect.c b/src/overlay005/encounter_effect.c index 73d3542cea..219e71f31e 100644 --- a/src/overlay005/encounter_effect.c +++ b/src/overlay005/encounter_effect.c @@ -7,7 +7,6 @@ #include "constants/battle.h" #include "constants/heap.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02014014_decl.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay005/ov5_021D2F14.c b/src/overlay005/ov5_021D2F14.c index b1fcb509fb..2ec4432072 100644 --- a/src/overlay005/ov5_021D2F14.c +++ b/src/overlay005/ov5_021D2F14.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_02009508.h" #include "struct_defs/struct_0200D0F4.h" @@ -15,6 +14,7 @@ #include "cell_actor.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "unk_020093B4.h" #include "unk_0200A328.h" diff --git a/src/overlay005/ov5_021D37AC.c b/src/overlay005/ov5_021D37AC.c index b61c4730e5..34d761e93e 100644 --- a/src/overlay005/ov5_021D37AC.c +++ b/src/overlay005/ov5_021D37AC.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "heap.h" #include "narc.h" #include "unk_02005474.h" diff --git a/src/overlay005/ov5_021D5CB0.c b/src/overlay005/ov5_021D5CB0.c index 23b6396bc7..1c7873023c 100644 --- a/src/overlay005/ov5_021D5CB0.c +++ b/src/overlay005/ov5_021D5CB0.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "heap.h" #include "narc.h" #include "unk_0201DBEC.h" diff --git a/src/overlay005/ov5_021D5EB8.c b/src/overlay005/ov5_021D5EB8.c index e609bbbb44..788201907d 100644 --- a/src/overlay005/ov5_021D5EB8.c +++ b/src/overlay005/ov5_021D5EB8.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "field/field_system.h" #include "field/field_system_sub2_t.h" #include "overlay005/hblank_system.h" diff --git a/src/overlay005/ov5_021DF440.c b/src/overlay005/ov5_021DF440.c index c5405999d7..e7135c46c5 100644 --- a/src/overlay005/ov5_021DF440.c +++ b/src/overlay005/ov5_021DF440.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02020C44_decl.h" #include "struct_decls/struct_020216E0_decl.h" #include "struct_decls/struct_02061AB4_decl.h" diff --git a/src/overlay005/ov5_021E15F4.c b/src/overlay005/ov5_021E15F4.c index 9652088b98..f052aa3787 100644 --- a/src/overlay005/ov5_021E15F4.c +++ b/src/overlay005/ov5_021E15F4.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay005/ov5_021D37AC.h" #include "overlay005/ov5_021D56BC.h" #include "overlay005/ov5_021D5878.h" diff --git a/src/overlay005/ov5_021E779C.c b/src/overlay005/ov5_021E779C.c index c7210238b6..50829980c1 100644 --- a/src/overlay005/ov5_021E779C.c +++ b/src/overlay005/ov5_021E779C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02039E30_decl.h" #include "field/field_system.h" @@ -564,8 +563,8 @@ static void ov5_021E7D98(const u8 param0, const UnkStruct_ov5_021EF76C *param1, ov5_021E7BAC(param5->unk_EC, v2, &v3); - sub_02006E28(param5->unk_EC, 0x800); - sub_02006E28(param5->unk_EC, v3.unk_0C); + NARC_Seek(param5->unk_EC, 0x800); + NARC_Seek(param5->unk_EC, v3.unk_0C); { param6->unk_10.unk_00++; @@ -691,7 +690,7 @@ static void ov5_021E7FF0(const int param0, const u8 param1, UnkStruct_ov5_021EF7 ov5_021E16CC(param7->unk_EC, v1.unk_0C, param2, param7->unk_84[param1]->unk_868, param7->unk_E4); } - sub_02006E28(param7->unk_EC, v1.unk_04); + NARC_Seek(param7->unk_EC, v1.unk_04); { ov5_021EF158(param7->unk_EC, v1.unk_08, param7->unk_84[param1]->unk_85C, param7->unk_84[param1]->unk_858); @@ -2126,7 +2125,7 @@ static void ov5_021E9B70(const int param0, const u8 param1, const UnkStruct_ov5_ ov5_021E7BAC(param7->unk_EC, v0, &v2); v1 = 0x800 + v2.unk_0C; - sub_02006E28(param7->unk_EC, v1); + NARC_Seek(param7->unk_EC, v1); DC_FlushRange((void *)param7->unk_84[param1]->unk_854, v2.unk_04); v3 = ov5_021E97AC(param7->unk_EC, v2.unk_04, ¶m7->unk_84[param1]->unk_800, &(param7->unk_84[param1]->unk_854), ov5_021EFA8C(param2)); diff --git a/src/overlay005/ov5_021ECC20.c b/src/overlay005/ov5_021ECC20.c index d24ea3fe75..244982c74f 100644 --- a/src/overlay005/ov5_021ECC20.c +++ b/src/overlay005/ov5_021ECC20.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02061830_decl.h" #include "struct_decls/struct_02061AB4_decl.h" diff --git a/src/overlay005/ov5_021ECE40.c b/src/overlay005/ov5_021ECE40.c index 7ebe16be3a..07f4753cab 100644 --- a/src/overlay005/ov5_021ECE40.c +++ b/src/overlay005/ov5_021ECE40.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02020C44_decl.h" #include "struct_decls/struct_020216E0_decl.h" #include "struct_decls/struct_02061830_decl.h" @@ -45,6 +44,7 @@ #include "heap.h" #include "map_object.h" #include "map_object_move.h" +#include "narc.h" #include "resource_collection.h" #include "sys_task.h" #include "sys_task_manager.h" diff --git a/src/overlay005/ov5_021EEF34.c b/src/overlay005/ov5_021EEF34.c index df2ce64624..9d040ae8c1 100644 --- a/src/overlay005/ov5_021EEF34.c +++ b/src/overlay005/ov5_021EEF34.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay005/struct_ov5_021EEC68.h" #include "overlay005/struct_ov5_021EED38.h" #include "overlay005/struct_ov5_021EF13C.h" diff --git a/src/overlay005/ov5_021EF75C.c b/src/overlay005/ov5_021EF75C.c index 9f12cc04c7..7a3cf07c0c 100644 --- a/src/overlay005/ov5_021EF75C.c +++ b/src/overlay005/ov5_021EF75C.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay005/ov5_021D37AC.h" #include "overlay005/ov5_021D56BC.h" #include "overlay005/struct_ov5_021D3CAC_decl.h" diff --git a/src/overlay005/ov5_021F067C.c b/src/overlay005/ov5_021F067C.c index 30133f2565..c45055d444 100644 --- a/src/overlay005/ov5_021F067C.c +++ b/src/overlay005/ov5_021F067C.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "heap.h" #include "narc.h" diff --git a/src/overlay006/ov6_0223E140.c b/src/overlay006/ov6_0223E140.c index 5d3ea3c1a4..1d81f26260 100644 --- a/src/overlay006/ov6_0223E140.c +++ b/src/overlay006/ov6_0223E140.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_0205E884_decl.h" #include "struct_decls/struct_02061AB4_decl.h" diff --git a/src/overlay006/ov6_022426AC.c b/src/overlay006/ov6_022426AC.c index 5691cde20c..7029ec6c24 100644 --- a/src/overlay006/ov6_022426AC.c +++ b/src/overlay006/ov6_022426AC.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/archived_sprite.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay006/ov6_02243258.c b/src/overlay006/ov6_02243258.c index d18e006226..f1d97d1d14 100644 --- a/src/overlay006/ov6_02243258.c +++ b/src/overlay006/ov6_02243258.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02061AB4_decl.h" #include "struct_decls/struct_020711EC_decl.h" #include "struct_defs/archived_sprite.h" diff --git a/src/overlay006/ov6_02248050.c b/src/overlay006/ov6_02248050.c index f36105d085..580a6a0ca1 100644 --- a/src/overlay006/ov6_02248050.c +++ b/src/overlay006/ov6_02248050.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0205E884_decl.h" #include "struct_decls/struct_02061830_decl.h" #include "struct_decls/struct_02061AB4_decl.h" diff --git a/src/overlay007/ov7_0224BE9C.c b/src/overlay007/ov7_0224BE9C.c index f5169d72d6..d5414667db 100644 --- a/src/overlay007/ov7_0224BE9C.c +++ b/src/overlay007/ov7_0224BE9C.c @@ -5,7 +5,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02029D04_decl.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay007/ov7_0224CD28.c b/src/overlay007/ov7_0224CD28.c index 3a63af93f3..dbbfdd7687 100644 --- a/src/overlay007/ov7_0224CD28.c +++ b/src/overlay007/ov7_0224CD28.c @@ -6,7 +6,6 @@ #include "consts/game_records.h" #include "struct_decls/struct_0200112C_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020508D4_decl.h" #include "struct_defs/struct_02081CF4.h" diff --git a/src/overlay009/ov9_02249960.c b/src/overlay009/ov9_02249960.c index 2c4b17ab50..e74f26092b 100644 --- a/src/overlay009/ov9_02249960.c +++ b/src/overlay009/ov9_02249960.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020216E0_decl.h" #include "struct_decls/struct_02027860_decl.h" #include "struct_decls/struct_02039E30_decl.h" diff --git a/src/overlay010/ov10_0221F800.c b/src/overlay010/ov10_0221F800.c index 7f8ee61f31..bbe1e779ab 100644 --- a/src/overlay010/ov10_0221F800.c +++ b/src/overlay010/ov10_0221F800.c @@ -5,7 +5,6 @@ #include "struct_decls/font_oam.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" diff --git a/src/overlay012/ov12_0221FC20.c b/src/overlay012/ov12_0221FC20.c index 591d7a96f5..bbaed1fed5 100644 --- a/src/overlay012/ov12_0221FC20.c +++ b/src/overlay012/ov12_0221FC20.c @@ -5,7 +5,6 @@ #include "struct_decls/battle_system.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02014014_decl.h" diff --git a/src/overlay012/ov12_022237EC.c b/src/overlay012/ov12_022237EC.c index 8e0685b3c5..9bcf75e1b2 100644 --- a/src/overlay012/ov12_022237EC.c +++ b/src/overlay012/ov12_022237EC.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02014014_decl.h" #include "functypes/funcptr_020146F4.h" diff --git a/src/overlay012/ov12_02235E94.c b/src/overlay012/ov12_02235E94.c index 12b6a226f6..a965da98fe 100644 --- a/src/overlay012/ov12_02235E94.c +++ b/src/overlay012/ov12_02235E94.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02014014_decl.h" #include "struct_defs/sprite_template.h" diff --git a/src/overlay012/ov12_022380BC.c b/src/overlay012/ov12_022380BC.c index 7410a3b462..9689495afa 100644 --- a/src/overlay012/ov12_022380BC.c +++ b/src/overlay012/ov12_022380BC.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/archived_sprite.h" #include "overlay012/const_ov12_0223B0A0.h" diff --git a/src/overlay013/ov13_0221FC20.c b/src/overlay013/ov13_0221FC20.c index ae190bf7e3..9e953e4ebd 100644 --- a/src/overlay013/ov13_0221FC20.c +++ b/src/overlay013/ov13_0221FC20.c @@ -4,7 +4,6 @@ #include #include "struct_decls/battle_system.h" -#include "struct_decls/struct_02006C24_decl.h" #include "battle/ov16_0223DF00.h" #include "overlay013/ov13_02221A88.h" diff --git a/src/overlay013/ov13_02224500.c b/src/overlay013/ov13_02224500.c index 693bb23403..8bf73f9afe 100644 --- a/src/overlay013/ov13_02224500.c +++ b/src/overlay013/ov13_02224500.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_0200D0F4.h" diff --git a/src/overlay013/ov13_022264F4.c b/src/overlay013/ov13_022264F4.c index 4bbc2cee57..c5e0b2e052 100644 --- a/src/overlay013/ov13_022264F4.c +++ b/src/overlay013/ov13_022264F4.c @@ -4,7 +4,6 @@ #include #include "struct_decls/battle_system.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020797DC_decl.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay013/ov13_02227BDC.c b/src/overlay013/ov13_02227BDC.c index 9d248f11ee..17c79f7e61 100644 --- a/src/overlay013/ov13_02227BDC.c +++ b/src/overlay013/ov13_02227BDC.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_0200D0F4.h" diff --git a/src/overlay017/ov17_0223B140.c b/src/overlay017/ov17_0223B140.c index bd125e3300..f61fb2eaa7 100644 --- a/src/overlay017/ov17_0223B140.c +++ b/src/overlay017/ov17_0223B140.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02099F80.h" #include "overlay011/ov11_0221F840.h" diff --git a/src/overlay017/ov17_0223CB1C.c b/src/overlay017/ov17_0223CB1C.c index ea8e814d95..ebcc17b263 100644 --- a/src/overlay017/ov17_0223CB1C.c +++ b/src/overlay017/ov17_0223CB1C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02099F80.h" #include "overlay011/ov11_0221F840.h" diff --git a/src/overlay017/ov17_0223DAD0.c b/src/overlay017/ov17_0223DAD0.c index a6be1bfff1..3f32ec389a 100644 --- a/src/overlay017/ov17_0223DAD0.c +++ b/src/overlay017/ov17_0223DAD0.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02099F80.h" #include "overlay011/ov11_0221F840.h" diff --git a/src/overlay017/ov17_0223F7E4.c b/src/overlay017/ov17_0223F7E4.c index ef78f87ccf..1ac1be04fd 100644 --- a/src/overlay017/ov17_0223F7E4.c +++ b/src/overlay017/ov17_0223F7E4.c @@ -4,7 +4,6 @@ #include #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012744_decl.h" diff --git a/src/overlay017/ov17_02241270.c b/src/overlay017/ov17_02241270.c index 5fe930d664..7b3332647c 100644 --- a/src/overlay017/ov17_02241270.c +++ b/src/overlay017/ov17_02241270.c @@ -3,12 +3,12 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_0200D0F4.h" +#include "narc.h" #include "unk_0200C6E4.h" static const SpriteTemplate Unk_ov17_0225364C = { diff --git a/src/overlay017/ov17_022413D8.c b/src/overlay017/ov17_022413D8.c index 626b13bfcf..118a99059e 100644 --- a/src/overlay017/ov17_022413D8.c +++ b/src/overlay017/ov17_022413D8.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -31,6 +30,7 @@ #include "heap.h" #include "inlines.h" #include "message.h" +#include "narc.h" #include "palette.h" #include "pokemon.h" #include "strbuf.h" diff --git a/src/overlay017/ov17_022476F8.c b/src/overlay017/ov17_022476F8.c index e26f627e8f..4781aa921a 100644 --- a/src/overlay017/ov17_022476F8.c +++ b/src/overlay017/ov17_022476F8.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/archived_sprite.h" @@ -19,6 +18,7 @@ #include "game_options.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "pokemon.h" #include "strbuf.h" #include "string_template.h" diff --git a/src/overlay017/ov17_0224A0FC.c b/src/overlay017/ov17_0224A0FC.c index 0a75702be1..885a3a3ccd 100644 --- a/src/overlay017/ov17_0224A0FC.c +++ b/src/overlay017/ov17_0224A0FC.c @@ -5,7 +5,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -42,6 +41,7 @@ #include "heap.h" #include "inlines.h" #include "message.h" +#include "narc.h" #include "palette.h" #include "pokemon.h" #include "spl.h" diff --git a/src/overlay017/ov17_02250744.c b/src/overlay017/ov17_02250744.c index 8793226efe..f8d0ff5953 100644 --- a/src/overlay017/ov17_02250744.c +++ b/src/overlay017/ov17_02250744.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_02095C48.h" diff --git a/src/overlay019/ov19_021D61B0.c b/src/overlay019/ov19_021D61B0.c index 2e59916e02..ea051fcbdd 100644 --- a/src/overlay019/ov19_021D61B0.c +++ b/src/overlay019/ov19_021D61B0.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_defs/struct_0200C738.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay019/ov19_021D8B54.c b/src/overlay019/ov19_021D8B54.c index 83512fbadf..74c03b36d6 100644 --- a/src/overlay019/ov19_021D8B54.c +++ b/src/overlay019/ov19_021D8B54.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/ov19_021D0D80.h" #include "overlay019/ov19_021D61B0.h" #include "overlay019/ov19_021D79F8.h" @@ -19,6 +17,7 @@ #include "cell_actor.h" #include "heap.h" +#include "narc.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02006E3C.h" diff --git a/src/overlay019/ov19_021DA270.c b/src/overlay019/ov19_021DA270.c index e20a6dc389..9e93d69078 100644 --- a/src/overlay019/ov19_021DA270.c +++ b/src/overlay019/ov19_021DA270.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/ov19_021D0D80.h" #include "overlay019/ov19_021D61B0.h" #include "overlay019/struct_ov19_021D4DF0.h" diff --git a/src/overlay019/ov19_021DA814.c b/src/overlay019/ov19_021DA814.c index 99119b5181..c841510f40 100644 --- a/src/overlay019/ov19_021DA814.c +++ b/src/overlay019/ov19_021DA814.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/ov19_021D61B0.h" #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" @@ -12,6 +10,7 @@ #include "cell_actor.h" #include "heap.h" +#include "narc.h" #include "unk_02006E3C.h" BOOL ov19_021DA814(UnkStruct_ov19_021DA8D8 *param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, CellActorCollection *param3, NARC *param4) diff --git a/src/overlay019/ov19_021DA92C.c b/src/overlay019/ov19_021DA92C.c index f236f3d2e4..41ab1c2825 100644 --- a/src/overlay019/ov19_021DA92C.c +++ b/src/overlay019/ov19_021DA92C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/archived_sprite.h" #include "overlay019/ov19_021D0D80.h" @@ -17,6 +16,7 @@ #include "cell_actor.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "pokemon.h" #include "strbuf.h" #include "sys_task.h" diff --git a/src/overlay019/ov19_021DB2FC.c b/src/overlay019/ov19_021DB2FC.c index de5354360a..7509e9c536 100644 --- a/src/overlay019/ov19_021DB2FC.c +++ b/src/overlay019/ov19_021DB2FC.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/struct_ov19_021D4DF0.h" #include "overlay019/struct_ov19_021D61B0_decl.h" #include "overlay019/struct_ov19_021DB6F0.h" @@ -15,6 +13,7 @@ #include "enums.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "strbuf.h" #include "string_template.h" #include "text.h" diff --git a/src/overlay019/ov19_021DB8E4.c b/src/overlay019/ov19_021DB8E4.c index b47278d070..9ea036594a 100644 --- a/src/overlay019/ov19_021DB8E4.c +++ b/src/overlay019/ov19_021DB8E4.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020797DC_decl.h" #include "overlay019/ov19_021D0D80.h" @@ -19,6 +18,7 @@ #include "heap.h" #include "item.h" #include "message.h" +#include "narc.h" #include "pokemon.h" #include "strbuf.h" #include "sys_task.h" diff --git a/src/overlay019/ov19_021DC5F0.c b/src/overlay019/ov19_021DC5F0.c index 7c263513d2..3d5b93aad8 100644 --- a/src/overlay019/ov19_021DC5F0.c +++ b/src/overlay019/ov19_021DC5F0.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/ov19_021D0D80.h" #include "overlay019/ov19_021D61B0.h" #include "overlay019/ov19_021D79F8.h" @@ -18,6 +16,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "heap.h" +#include "narc.h" #include "party.h" #include "pokemon.h" #include "sys_task.h" diff --git a/src/overlay019/ov19_021DCF88.c b/src/overlay019/ov19_021DCF88.c index 409aac84eb..9ff10a4226 100644 --- a/src/overlay019/ov19_021DCF88.c +++ b/src/overlay019/ov19_021DCF88.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/ov19_021D0D80.h" #include "overlay019/ov19_021D61B0.h" #include "overlay019/ov19_021DB8E4.h" @@ -17,6 +15,7 @@ #include "cell_actor.h" #include "enums.h" #include "heap.h" +#include "narc.h" #include "strbuf.h" #include "sys_task.h" #include "sys_task_manager.h" diff --git a/src/overlay019/ov19_021DEC04.c b/src/overlay019/ov19_021DEC04.c index 2bfa6a0f5e..ae4bc58b72 100644 --- a/src/overlay019/ov19_021DEC04.c +++ b/src/overlay019/ov19_021DEC04.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay019/ov19_021D0D80.h" #include "overlay019/ov19_021D61B0.h" #include "overlay019/ov19_021DA270.h" @@ -20,6 +18,7 @@ #include "heap.h" #include "inlines.h" #include "message.h" +#include "narc.h" #include "pokemon.h" #include "pokemon_icon.h" #include "strbuf.h" diff --git a/src/overlay020/ov20_021D2098.c b/src/overlay020/ov20_021D2098.c index 8b26af17d6..c09f2c0ccb 100644 --- a/src/overlay020/ov20_021D2098.c +++ b/src/overlay020/ov20_021D2098.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020998EC_decl.h" #include "struct_defs/struct_0200C738.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay020/ov20_021D2EA4.c b/src/overlay020/ov20_021D2EA4.c index d752e129b5..79903e59e0 100644 --- a/src/overlay020/ov20_021D2EA4.c +++ b/src/overlay020/ov20_021D2EA4.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/ov20_021D0D80.h" @@ -18,6 +17,7 @@ #include "font.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "strbuf.h" #include "string_template.h" #include "text.h" diff --git a/src/overlay020/ov20_021D3864.c b/src/overlay020/ov20_021D3864.c index c6e4538d27..f53d620aa2 100644 --- a/src/overlay020/ov20_021D3864.c +++ b/src/overlay020/ov20_021D3864.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/ov20_021D2098.h" @@ -15,6 +14,7 @@ #include "font.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "strbuf.h" #include "text.h" #include "unk_02006E3C.h" diff --git a/src/overlay020/ov20_021D3A54.c b/src/overlay020/ov20_021D3A54.c index 2596fad2b7..5572a633b4 100644 --- a/src/overlay020/ov20_021D3A54.c +++ b/src/overlay020/ov20_021D3A54.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/ov20_021D0D80.h" @@ -21,6 +20,7 @@ #include "font.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "strbuf.h" #include "sys_task_manager.h" #include "text.h" diff --git a/src/overlay020/ov20_021D4728.c b/src/overlay020/ov20_021D4728.c index 7e56adf532..3aff5f36d5 100644 --- a/src/overlay020/ov20_021D4728.c +++ b/src/overlay020/ov20_021D4728.c @@ -5,7 +5,6 @@ #include "constants/heap.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020998EC_decl.h" #include "overlay020/ov20_021D0D80.h" @@ -18,6 +17,7 @@ #include "font.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "strbuf.h" #include "sys_task.h" #include "sys_task_manager.h" diff --git a/src/overlay021/ov21_021D1FA4.c b/src/overlay021/ov21_021D1FA4.c index 2277d4d015..a2868ab558 100644 --- a/src/overlay021/ov21_021D1FA4.c +++ b/src/overlay021/ov21_021D1FA4.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/archived_sprite.h" #include "overlay021/ov21_021D4C0C.h" diff --git a/src/overlay021/ov21_021D5AEC.c b/src/overlay021/ov21_021D5AEC.c index 8d7cd10e55..ff34115289 100644 --- a/src/overlay021/ov21_021D5AEC.c +++ b/src/overlay021/ov21_021D5AEC.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "overlay021/ov21_021D0D80.h" #include "overlay021/ov21_021D1FA4.h" @@ -29,6 +28,7 @@ #include "core_sys.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "sprite_resource.h" #include "strbuf.h" #include "text.h" diff --git a/src/overlay021/ov21_021D76B0.c b/src/overlay021/ov21_021D76B0.c index 21e3db2eac..5802b6b2b0 100644 --- a/src/overlay021/ov21_021D76B0.c +++ b/src/overlay021/ov21_021D76B0.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "overlay021/ov21_021D0D80.h" @@ -27,6 +26,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "touch_screen.h" #include "unk_02005474.h" diff --git a/src/overlay021/ov21_021D85B0.c b/src/overlay021/ov21_021D85B0.c index 534fa56152..0c35798ae2 100644 --- a/src/overlay021/ov21_021D85B0.c +++ b/src/overlay021/ov21_021D85B0.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "overlay021/ov21_021D0D80.h" #include "overlay021/ov21_021D1FA4.h" @@ -24,6 +23,7 @@ #include "cell_actor.h" #include "font.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "strbuf.h" #include "text.h" diff --git a/src/overlay021/ov21_021D94BC.c b/src/overlay021/ov21_021D94BC.c index 7b5435e4f9..5556eadd9b 100644 --- a/src/overlay021/ov21_021D94BC.c +++ b/src/overlay021/ov21_021D94BC.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "overlay021/ov21_021D0D80.h" @@ -30,6 +29,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "touch_screen.h" #include "unk_02005474.h" diff --git a/src/overlay021/ov21_021DC9BC.c b/src/overlay021/ov21_021DC9BC.c index accc7005f9..c93744b9bb 100644 --- a/src/overlay021/ov21_021DC9BC.c +++ b/src/overlay021/ov21_021DC9BC.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "overlay021/ov21_021D0D80.h" #include "overlay021/ov21_021D1FA4.h" @@ -30,6 +29,7 @@ #include "cell_actor.h" #include "gx_layers.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "unk_0200762C.h" #include "unk_020093B4.h" diff --git a/src/overlay021/ov21_021DDD2C.c b/src/overlay021/ov21_021DDD2C.c index 555ec3b21d..c56859f08d 100644 --- a/src/overlay021/ov21_021DDD2C.c +++ b/src/overlay021/ov21_021DDD2C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "overlay021/ov21_021D0D80.h" @@ -23,6 +22,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "touch_screen.h" #include "unk_02005474.h" diff --git a/src/overlay021/ov21_021DE668.c b/src/overlay021/ov21_021DE668.c index 30173debef..9a61250f3a 100644 --- a/src/overlay021/ov21_021DE668.c +++ b/src/overlay021/ov21_021DE668.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "overlay021/ov21_021D0D80.h" #include "overlay021/ov21_021D1F90.h" @@ -29,6 +28,7 @@ #include "font.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "pokedex_data_index.h" #include "pokemon.h" #include "sprite_resource.h" diff --git a/src/overlay021/ov21_021DF734.c b/src/overlay021/ov21_021DF734.c index 426655153a..d28211d26b 100644 --- a/src/overlay021/ov21_021DF734.c +++ b/src/overlay021/ov21_021DF734.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay021/ov21_021D0D80.h" #include "overlay021/ov21_021D1FA4.h" #include "overlay021/ov21_021D3208.h" @@ -24,6 +22,7 @@ #include "cell_actor.h" #include "heap.h" #include "inlines.h" +#include "narc.h" #include "pokemon.h" #include "sprite_resource.h" #include "unk_02005474.h" diff --git a/src/overlay021/ov21_021E0C68.c b/src/overlay021/ov21_021E0C68.c index 3b7a78a657..3473d0635a 100644 --- a/src/overlay021/ov21_021E0C68.c +++ b/src/overlay021/ov21_021E0C68.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "overlay021/ov21_021D0D80.h" #include "overlay021/ov21_021D1FA4.h" @@ -27,6 +26,7 @@ #include "font.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "sprite_resource.h" #include "strbuf.h" #include "text.h" diff --git a/src/overlay021/ov21_021E1924.c b/src/overlay021/ov21_021E1924.c index 222e70fdb1..72b6579539 100644 --- a/src/overlay021/ov21_021E1924.c +++ b/src/overlay021/ov21_021E1924.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "overlay021/ov21_021D0D80.h" @@ -30,6 +29,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "touch_screen.h" #include "unk_02005474.h" diff --git a/src/overlay021/ov21_021E29DC.c b/src/overlay021/ov21_021E29DC.c index ffe37b3f2a..9e0b691590 100644 --- a/src/overlay021/ov21_021E29DC.c +++ b/src/overlay021/ov21_021E29DC.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "overlay021/ov21_021D0D80.h" @@ -33,6 +32,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "touch_screen.h" #include "unk_02005474.h" diff --git a/src/overlay021/ov21_021E3FFC.c b/src/overlay021/ov21_021E3FFC.c index 685fddf1c8..0fc6d443e2 100644 --- a/src/overlay021/ov21_021E3FFC.c +++ b/src/overlay021/ov21_021E3FFC.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "overlay021/ov21_021D0D80.h" #include "overlay021/ov21_021D1FA4.h" @@ -22,6 +21,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "unk_020041CC.h" #include "unk_02005474.h" diff --git a/src/overlay021/ov21_021E4CA4.c b/src/overlay021/ov21_021E4CA4.c index 6fdecd67fb..8862b3e4c9 100644 --- a/src/overlay021/ov21_021E4CA4.c +++ b/src/overlay021/ov21_021E4CA4.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "overlay021/ov21_021D0D80.h" @@ -25,6 +24,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "touch_screen.h" #include "unk_020041CC.h" diff --git a/src/overlay021/ov21_021E6014.c b/src/overlay021/ov21_021E6014.c index 40dada1f14..6637ab30ef 100644 --- a/src/overlay021/ov21_021E6014.c +++ b/src/overlay021/ov21_021E6014.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "overlay021/ov21_021D0D80.h" #include "overlay021/ov21_021D1FA4.h" @@ -24,6 +23,7 @@ #include "heap.h" #include "message.h" #include "message_util.h" +#include "narc.h" #include "pokedex_data_index.h" #include "pokedex_heightweight.h" #include "sprite_resource.h" diff --git a/src/overlay021/ov21_021E68F4.c b/src/overlay021/ov21_021E68F4.c index e6e0a26574..739a74be61 100644 --- a/src/overlay021/ov21_021E68F4.c +++ b/src/overlay021/ov21_021E68F4.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "overlay021/ov21_021D0D80.h" @@ -26,6 +25,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "touch_screen.h" #include "unk_02005474.h" diff --git a/src/overlay021/ov21_021E737C.c b/src/overlay021/ov21_021E737C.c index a466ed0d52..4cb51a0fe4 100644 --- a/src/overlay021/ov21_021E737C.c +++ b/src/overlay021/ov21_021E737C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02015128_decl.h" #include "struct_decls/struct_020151A4_decl.h" #include "struct_decls/struct_02015214_decl.h" diff --git a/src/overlay021/ov21_021E8484.c b/src/overlay021/ov21_021E8484.c index 965f40a98c..da0ed3d7d6 100644 --- a/src/overlay021/ov21_021E8484.c +++ b/src/overlay021/ov21_021E8484.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "overlay021/ov21_021D0D80.h" @@ -26,6 +25,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "touch_screen.h" #include "unk_020093B4.h" diff --git a/src/overlay021/ov21_021E8D48.c b/src/overlay021/ov21_021E8D48.c index f81dacb6c8..0eb9562e86 100644 --- a/src/overlay021/ov21_021E8D48.c +++ b/src/overlay021/ov21_021E8D48.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_defs/archived_sprite.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay022/ov22_02255094.c b/src/overlay022/ov22_02255094.c index 626c9ebc53..675033ab09 100644 --- a/src/overlay022/ov22_02255094.c +++ b/src/overlay022/ov22_02255094.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02015128_decl.h" #include "struct_decls/struct_020151A4_decl.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay022/ov22_0225A428.c b/src/overlay022/ov22_0225A428.c index c316e0dbf0..5683991f76 100644 --- a/src/overlay022/ov22_0225A428.c +++ b/src/overlay022/ov22_0225A428.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02095C60.h" #include "overlay022/ov22_022597BC.h" @@ -21,6 +20,7 @@ #include "font.h" #include "game_options.h" #include "message.h" +#include "narc.h" #include "sprite_resource.h" #include "strbuf.h" #include "sys_task.h" diff --git a/src/overlay023/ov23_0223E140.c b/src/overlay023/ov23_0223E140.c index ca794b9727..d4a2a49ac6 100644 --- a/src/overlay023/ov23_0223E140.c +++ b/src/overlay023/ov23_0223E140.c @@ -6,7 +6,6 @@ #include "consts/game_records.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0202855C_decl.h" #include "struct_decls/struct_020298B0_decl.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay023/ov23_0224340C.c b/src/overlay023/ov23_0224340C.c index 1fe419a139..a83f5de783 100644 --- a/src/overlay023/ov23_0224340C.c +++ b/src/overlay023/ov23_0224340C.c @@ -5,7 +5,6 @@ #include "consts/game_records.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0202855C_decl.h" #include "struct_decls/struct_020298B0_decl.h" #include "struct_decls/struct_020508D4_decl.h" diff --git a/src/overlay023/ov23_02248F1C.c b/src/overlay023/ov23_02248F1C.c index 2cbef333ea..a9d1f4c8a4 100644 --- a/src/overlay023/ov23_02248F1C.c +++ b/src/overlay023/ov23_02248F1C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0205E884_decl.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay023/ov23_0224F294.c b/src/overlay023/ov23_0224F294.c index df6610498c..2acc6f03b6 100644 --- a/src/overlay023/ov23_0224F294.c +++ b/src/overlay023/ov23_0224F294.c @@ -4,7 +4,6 @@ #include #include "struct_decls/struct_0200112C_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020298B0_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_02081CF4.h" diff --git a/src/overlay024/ov24_02253CE0.c b/src/overlay024/ov24_02253CE0.c index 3828d6782f..a9dd7952a7 100644 --- a/src/overlay024/ov24_02253CE0.c +++ b/src/overlay024/ov24_02253CE0.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "bg_window.h" #include "heap.h" #include "narc.h" diff --git a/src/overlay025/ov25_02255090.c b/src/overlay025/ov25_02255090.c index 34992c263c..194dccedea 100644 --- a/src/overlay025/ov25_02255090.c +++ b/src/overlay025/ov25_02255090.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay025/ov25_02254560.h" #include "overlay025/struct_ov25_0225517C.h" #include "overlay025/struct_ov25_02255224_decl.h" diff --git a/src/overlay032/ov32_02256470.c b/src/overlay032/ov32_02256470.c index c961f1c6be..5100a74a38 100644 --- a/src/overlay032/ov32_02256470.c +++ b/src/overlay032/ov32_02256470.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay025/ov25_02254560.h" #include "overlay025/ov25_02255090.h" #include "overlay025/ov25_02255540.h" diff --git a/src/overlay033/ov33_02256474.c b/src/overlay033/ov33_02256474.c index 4767768b63..5ebbf303e2 100644 --- a/src/overlay033/ov33_02256474.c +++ b/src/overlay033/ov33_02256474.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay025/ov25_02254560.h" #include "overlay025/ov25_02255090.h" #include "overlay025/ov25_02255540.h" diff --git a/src/overlay058/ov58_021D0D80.c b/src/overlay058/ov58_021D0D80.c index fe06f580e2..f53c50a849 100644 --- a/src/overlay058/ov58_021D0D80.c +++ b/src/overlay058/ov58_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02095EAC_decl.h" #include "struct_defs/struct_02015958.h" #include "struct_defs/struct_0203DDFC.h" diff --git a/src/overlay059/ov59_021D0D80.c b/src/overlay059/ov59_021D0D80.c index 7bebd625d4..32bb8c0c3f 100644 --- a/src/overlay059/ov59_021D0D80.c +++ b/src/overlay059/ov59_021D0D80.c @@ -5,7 +5,6 @@ #include "consts/game_records.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020961E8_decl.h" #include "struct_defs/struct_0203DE34.h" #include "struct_defs/struct_020961E8_t.h" diff --git a/src/overlay061/ov61_0222BF44.c b/src/overlay061/ov61_0222BF44.c index eaf3b7a22a..55b59cf338 100644 --- a/src/overlay061/ov61_0222BF44.c +++ b/src/overlay061/ov61_0222BF44.c @@ -6,7 +6,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02025CCC_decl.h" #include "struct_decls/struct_0202B370_decl.h" diff --git a/src/overlay062/ov62_022300D8.c b/src/overlay062/ov62_022300D8.c index 92d10d00ee..c8641bfc3c 100644 --- a/src/overlay062/ov62_022300D8.c +++ b/src/overlay062/ov62_022300D8.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -22,6 +21,7 @@ #include "bg_window.h" #include "message.h" +#include "narc.h" #include "palette.h" #include "strbuf.h" #include "string_template.h" diff --git a/src/overlay062/ov62_02231690.c b/src/overlay062/ov62_02231690.c index 1c14258434..6ad80147b8 100644 --- a/src/overlay062/ov62_02231690.c +++ b/src/overlay062/ov62_02231690.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0202F298_decl.h" diff --git a/src/overlay062/ov62_02236CBC.c b/src/overlay062/ov62_02236CBC.c index 0768ffc52c..4b8b3cc17d 100644 --- a/src/overlay062/ov62_02236CBC.c +++ b/src/overlay062/ov62_02236CBC.c @@ -1,7 +1,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0202D750_decl.h" @@ -18,6 +17,7 @@ #include "bg_window.h" #include "gx_layers.h" #include "heap.h" +#include "narc.h" #include "palette.h" #include "touch_screen.h" #include "unk_02005474.h" diff --git a/src/overlay062/ov62_02246B00.c b/src/overlay062/ov62_02246B00.c index 2f17b247bf..ae54ddcc3c 100644 --- a/src/overlay062/ov62_02246B00.c +++ b/src/overlay062/ov62_02246B00.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -17,6 +16,7 @@ #include "game_options.h" #include "heap.h" #include "inlines.h" +#include "narc.h" #include "palette.h" #include "strbuf.h" #include "unk_02005474.h" diff --git a/src/overlay063/ov63_0222AE60.c b/src/overlay063/ov63_0222AE60.c index a97b4ed7d8..10e9039907 100644 --- a/src/overlay063/ov63_0222AE60.c +++ b/src/overlay063/ov63_0222AE60.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay064/struct_ov64_022302EC.h" #include "cell_actor.h" diff --git a/src/overlay064/ov64_0222DCE0.c b/src/overlay064/ov64_0222DCE0.c index aa120e9da2..16e3658a4a 100644 --- a/src/overlay064/ov64_0222DCE0.c +++ b/src/overlay064/ov64_0222DCE0.c @@ -6,7 +6,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_decls/struct_0203068C_decl.h" diff --git a/src/overlay065/ov65_0222DCE0.c b/src/overlay065/ov65_0222DCE0.c index f74f8d3f40..60dc4cf1e1 100644 --- a/src/overlay065/ov65_0222DCE0.c +++ b/src/overlay065/ov65_0222DCE0.c @@ -6,7 +6,6 @@ #include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_0200112C_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02012B20_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_decls/struct_0202C878_decl.h" diff --git a/src/overlay065/ov65_02235060.c b/src/overlay065/ov65_02235060.c index 33da31d812..e08e3b928c 100644 --- a/src/overlay065/ov65_02235060.c +++ b/src/overlay065/ov65_02235060.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay063/ov63_0222BCE8.h" #include "overlay063/ov63_0222BE18.h" #include "overlay063/ov63_0222CA88.h" @@ -28,6 +26,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "unk_02006E3C.h" #include "unk_020093B4.h" diff --git a/src/overlay065/ov65_0223648C.c b/src/overlay065/ov65_0223648C.c index d348282283..f7fd3bb5b9 100644 --- a/src/overlay065/ov65_0223648C.c +++ b/src/overlay065/ov65_0223648C.c @@ -4,7 +4,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0200C738.h" #include "struct_defs/struct_0207DE04.h" #include "struct_defs/struct_0207DFAC.h" diff --git a/src/overlay066/ov66_022343A8.c b/src/overlay066/ov66_022343A8.c index 5a3401be81..6594720386 100644 --- a/src/overlay066/ov66_022343A8.c +++ b/src/overlay066/ov66_022343A8.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02020C44_decl.h" #include "struct_decls/struct_020216E0_decl.h" #include "struct_defs/struct_0201CFEC.h" diff --git a/src/overlay066/ov66_02234EA8.c b/src/overlay066/ov66_02234EA8.c index 5200108329..1ea5a960df 100644 --- a/src/overlay066/ov66_02234EA8.c +++ b/src/overlay066/ov66_02234EA8.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay066/ov66_02231428.h" #include "overlay066/struct_ov66_02231428.h" #include "overlay069/struct_ov69_0225C980.h" diff --git a/src/overlay067/ov67_0225C700.c b/src/overlay067/ov67_0225C700.c index 857dfae0a5..3d7df0c989 100644 --- a/src/overlay067/ov67_0225C700.c +++ b/src/overlay067/ov67_0225C700.c @@ -6,7 +6,6 @@ #include "consts/game_records.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02099F80.h" #include "overlay061/struct_ov61_0222C3B0.h" diff --git a/src/overlay068/ov68_0225C700.c b/src/overlay068/ov68_0225C700.c index 36ad28c69c..6df423a879 100644 --- a/src/overlay068/ov68_0225C700.c +++ b/src/overlay068/ov68_0225C700.c @@ -6,7 +6,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02030EC4_decl.h" #include "struct_defs/struct_0200C738.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay069/ov69_0225C700.c b/src/overlay069/ov69_0225C700.c index c923f574ec..5ba2a6f025 100644 --- a/src/overlay069/ov69_0225C700.c +++ b/src/overlay069/ov69_0225C700.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02015920_decl.h" #include "struct_decls/struct_0202C878_decl.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay070/ov70_0225C700.c b/src/overlay070/ov70_0225C700.c index 97a4d9bf73..5013d2af4d 100644 --- a/src/overlay070/ov70_0225C700.c +++ b/src/overlay070/ov70_0225C700.c @@ -3,13 +3,12 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay063/struct_ov63_0222CC3C.h" #include "easy3d.h" #include "easy3d_object.h" #include "heap.h" +#include "narc.h" #include "resource_collection.h" #include "unk_02006E3C.h" #include "unk_0201CED8.h" diff --git a/src/overlay070/ov70_0225D9A4.c b/src/overlay070/ov70_0225D9A4.c index aca06b68f3..4655777186 100644 --- a/src/overlay070/ov70_0225D9A4.c +++ b/src/overlay070/ov70_0225D9A4.c @@ -5,7 +5,6 @@ #include #include "struct_decls/struct_0200112C_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02023FCC_decl.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay070/ov70_02260B44.c b/src/overlay070/ov70_02260B44.c index ce23e60d18..49a219996c 100644 --- a/src/overlay070/ov70_02260B44.c +++ b/src/overlay070/ov70_02260B44.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay063/struct_ov63_0222CC3C.h" #include "overlay066/ov66_02231428.h" #include "overlay070/funcptr_ov70_02261C60.h" diff --git a/src/overlay070/ov70_02269190.c b/src/overlay070/ov70_02269190.c index 6870966ad9..29fc328131 100644 --- a/src/overlay070/ov70_02269190.c +++ b/src/overlay070/ov70_02269190.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay063/struct_ov63_0222CC3C.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" #include "overlay070/ov70_0225C700.h" diff --git a/src/overlay071/ov71_0223B140.c b/src/overlay071/ov71_0223B140.c index 722e906a6e..bbe271c79c 100644 --- a/src/overlay071/ov71_0223B140.c +++ b/src/overlay071/ov71_0223B140.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02099F80.h" #include "overlay071/ov71_0223C69C.h" diff --git a/src/overlay071/ov71_0223CF0C.c b/src/overlay071/ov71_0223CF0C.c index f267598429..3a7a112f0d 100644 --- a/src/overlay071/ov71_0223CF0C.c +++ b/src/overlay071/ov71_0223CF0C.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay022/struct_ov22_022559F8.h" #include "overlay071/struct_ov71_0223D238.h" diff --git a/src/overlay072/ov72_0223D7A0.c b/src/overlay072/ov72_0223D7A0.c index 81b2e0fc5e..3979810e61 100644 --- a/src/overlay072/ov72_0223D7A0.c +++ b/src/overlay072/ov72_0223D7A0.c @@ -5,7 +5,6 @@ #include "consts/game_records.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02015920_decl.h" #include "struct_defs/struct_02015958.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay074/ov74_021D0D80.c b/src/overlay074/ov74_021D0D80.c index 14bf05bea1..403a5f2da8 100644 --- a/src/overlay074/ov74_021D0D80.c +++ b/src/overlay074/ov74_021D0D80.c @@ -4,7 +4,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/struct_0200D0F4.h" diff --git a/src/overlay075/ov75_021D0D80.c b/src/overlay075/ov75_021D0D80.c index 18cace7249..750b1d767b 100644 --- a/src/overlay075/ov75_021D0D80.c +++ b/src/overlay075/ov75_021D0D80.c @@ -4,7 +4,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" diff --git a/src/overlay076/ov76_0223B870.c b/src/overlay076/ov76_0223B870.c index 87c2ad1fc8..0e1003f35c 100644 --- a/src/overlay076/ov76_0223B870.c +++ b/src/overlay076/ov76_0223B870.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -30,6 +29,7 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "narc.h" #include "palette.h" #include "pokemon.h" #include "pokemon_icon.h" diff --git a/src/overlay076/ov76_0223D338.c b/src/overlay076/ov76_0223D338.c index c6d041c55c..a2a8519087 100644 --- a/src/overlay076/ov76_0223D338.c +++ b/src/overlay076/ov76_0223D338.c @@ -6,7 +6,6 @@ #include "consts/game_records.h" #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/archived_sprite.h" #include "struct_defs/sprite_animation_frame.h" #include "struct_defs/struct_0200D0F4.h" diff --git a/src/overlay077/ov77_021D0D80.c b/src/overlay077/ov77_021D0D80.c index 8b4a8014ea..da960e8266 100644 --- a/src/overlay077/ov77_021D0D80.c +++ b/src/overlay077/ov77_021D0D80.c @@ -1,7 +1,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0207C690.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay077/ov77_021D25B0.c b/src/overlay077/ov77_021D25B0.c index 34ae6409ab..d7e8640273 100644 --- a/src/overlay077/ov77_021D25B0.c +++ b/src/overlay077/ov77_021D25B0.c @@ -1,7 +1,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0207C690.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay079/ov79_021D0D80.c b/src/overlay079/ov79_021D0D80.c index b853fb89dc..52d6cc5b44 100644 --- a/src/overlay079/ov79_021D0D80.c +++ b/src/overlay079/ov79_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0203D9B8.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay079/ov79_021D2268.c b/src/overlay079/ov79_021D2268.c index e969502b0e..e71d95e1b4 100644 --- a/src/overlay079/ov79_021D2268.c +++ b/src/overlay079/ov79_021D2268.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_020158A8.h" diff --git a/src/overlay080/ov80_021D0D80.c b/src/overlay080/ov80_021D0D80.c index 342c883b0c..2ae18132cb 100644 --- a/src/overlay080/ov80_021D0D80.c +++ b/src/overlay080/ov80_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0203D8AC.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay081/ov81_021D0D80.c b/src/overlay081/ov81_021D0D80.c index 58f20248c8..602c7b2528 100644 --- a/src/overlay081/ov81_021D0D80.c +++ b/src/overlay081/ov81_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0202BC58.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay083/ov83_0223C958.c b/src/overlay083/ov83_0223C958.c index 31886d4202..c030b823f1 100644 --- a/src/overlay083/ov83_0223C958.c +++ b/src/overlay083/ov83_0223C958.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02099F80.h" #include "overlay022/struct_ov22_022550D4.h" diff --git a/src/overlay083/ov83_0223D6A8.c b/src/overlay083/ov83_0223D6A8.c index 7e18772426..087fbbaa84 100644 --- a/src/overlay083/ov83_0223D6A8.c +++ b/src/overlay083/ov83_0223D6A8.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02015064_decl.h" #include "struct_decls/struct_02015128_decl.h" #include "struct_decls/struct_020151A4_decl.h" diff --git a/src/overlay085/ov85_02241440.c b/src/overlay085/ov85_02241440.c index 21de8396a1..a99cc5a7f8 100644 --- a/src/overlay085/ov85_02241440.c +++ b/src/overlay085/ov85_02241440.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_berry_data_decl.h" #include "struct_defs/struct_020972FC.h" diff --git a/src/overlay086/ov86_0223B140.c b/src/overlay086/ov86_0223B140.c index 9f8b064fb7..8b1f702a3a 100644 --- a/src/overlay086/ov86_0223B140.c +++ b/src/overlay086/ov86_0223B140.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/archived_sprite.h" #include "struct_defs/sprite_animation_frame.h" #include "struct_defs/struct_02008900.h" diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index f2b742f564..0154320ca3 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -6,7 +6,6 @@ #include "constants/species.h" #include "consts/game_records.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_decls/struct_02095E80_decl.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay090/ov90_021D0D80.c b/src/overlay090/ov90_021D0D80.c index 663b2ab4d5..977ce7b293 100644 --- a/src/overlay090/ov90_021D0D80.c +++ b/src/overlay090/ov90_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_0202D750_decl.h" diff --git a/src/overlay091/ov91_021D0D80.c b/src/overlay091/ov91_021D0D80.c index 49d08f978d..c83b39648b 100644 --- a/src/overlay091/ov91_021D0D80.c +++ b/src/overlay091/ov91_021D0D80.c @@ -5,7 +5,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02013A04_decl.h" diff --git a/src/overlay092/ov92_021D0D80.c b/src/overlay092/ov92_021D0D80.c index 9aa5187b7a..7bb5d52eb8 100644 --- a/src/overlay092/ov92_021D0D80.c +++ b/src/overlay092/ov92_021D0D80.c @@ -5,7 +5,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_0202C878_decl.h" #include "struct_defs/struct_02013A04_t.h" diff --git a/src/overlay093/ov93_021D0D80.c b/src/overlay093/ov93_021D0D80.c index f91054f73f..f70d1c886c 100644 --- a/src/overlay093/ov93_021D0D80.c +++ b/src/overlay093/ov93_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0206C8D4.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay093/ov93_021D111C.c b/src/overlay093/ov93_021D111C.c index c769cd390e..fad93a8882 100644 --- a/src/overlay093/ov93_021D111C.c +++ b/src/overlay093/ov93_021D111C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0206C8D4.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay094/ov94_0223BCB0.c b/src/overlay094/ov94_0223BCB0.c index d31ee760f7..2a54583ef4 100644 --- a/src/overlay094/ov94_0223BCB0.c +++ b/src/overlay094/ov94_0223BCB0.c @@ -5,7 +5,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0203E0FC.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay094/ov94_0223C610.c b/src/overlay094/ov94_0223C610.c index 77e8efe032..e1bbf36dbc 100644 --- a/src/overlay094/ov94_0223C610.c +++ b/src/overlay094/ov94_0223C610.c @@ -4,8 +4,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay094/ov94_0223BCB0.h" #include "overlay094/ov94_02243EF8.h" #include "overlay094/ov94_02244950.h" diff --git a/src/overlay094/ov94_0223D0C4.c b/src/overlay094/ov94_0223D0C4.c index 019daa2c15..993882b7e9 100644 --- a/src/overlay094/ov94_0223D0C4.c +++ b/src/overlay094/ov94_0223D0C4.c @@ -4,7 +4,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/archived_sprite.h" #include "struct_defs/struct_02081CF4.h" diff --git a/src/overlay094/ov94_0223E46C.c b/src/overlay094/ov94_0223E46C.c index 3089968fef..07cc27db46 100644 --- a/src/overlay094/ov94_0223E46C.c +++ b/src/overlay094/ov94_0223E46C.c @@ -4,8 +4,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay094/const_ov94_02245FD4.h" #include "overlay094/ov94_0223B140.h" #include "overlay094/ov94_0223BCB0.h" diff --git a/src/overlay094/ov94_0223FB48.c b/src/overlay094/ov94_0223FB48.c index a7c24b0373..ca12de1dd8 100644 --- a/src/overlay094/ov94_0223FB48.c +++ b/src/overlay094/ov94_0223FB48.c @@ -4,7 +4,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020797DC_decl.h" #include "struct_decls/struct_party_decl.h" #include "struct_defs/struct_02081CF4.h" diff --git a/src/overlay094/ov94_02244950.c b/src/overlay094/ov94_02244950.c index cf75020579..825b4dca8e 100644 --- a/src/overlay094/ov94_02244950.c +++ b/src/overlay094/ov94_02244950.c @@ -4,8 +4,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay004/ov4_021D0D80.h" #include "overlay094/ov94_0223B140.h" #include "overlay094/ov94_0223BCB0.h" diff --git a/src/overlay095/ov95_02247B6C.c b/src/overlay095/ov95_02247B6C.c index 9db0db36c6..76e5c9fcec 100644 --- a/src/overlay095/ov95_02247B6C.c +++ b/src/overlay095/ov95_02247B6C.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_defs/archived_sprite.h" #include "struct_defs/sprite_animation_frame.h" diff --git a/src/overlay095/ov95_0224B3D8.c b/src/overlay095/ov95_0224B3D8.c index 46524c361c..e0df536ba5 100644 --- a/src/overlay095/ov95_0224B3D8.c +++ b/src/overlay095/ov95_0224B3D8.c @@ -4,7 +4,6 @@ #include #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_defs/archived_sprite.h" #include "struct_defs/sprite_animation_frame.h" diff --git a/src/overlay096/ov96_0223B6A0.c b/src/overlay096/ov96_0223B6A0.c index e62eb45089..633bc684e3 100644 --- a/src/overlay096/ov96_0223B6A0.c +++ b/src/overlay096/ov96_0223B6A0.c @@ -5,7 +5,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0206BC70.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay096/ov96_0223BCE0.c b/src/overlay096/ov96_0223BCE0.c index e7552990b1..f7d17b720b 100644 --- a/src/overlay096/ov96_0223BCE0.c +++ b/src/overlay096/ov96_0223BCE0.c @@ -4,7 +4,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02049A68.h" #include "overlay004/ov4_021D0D80.h" diff --git a/src/overlay097/ov97_02233B18.c b/src/overlay097/ov97_02233B18.c index 0b65813487..d32ab6f047 100644 --- a/src/overlay097/ov97_02233B18.c +++ b/src/overlay097/ov97_02233B18.c @@ -4,7 +4,6 @@ #include "constants/gba/species.h" #include "constants/species.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02015920_decl.h" #include "struct_decls/struct_02024440_decl.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay098/ov98_022471C8.c b/src/overlay098/ov98_022471C8.c index f32f85b40a..68d55954de 100644 --- a/src/overlay098/ov98_022471C8.c +++ b/src/overlay098/ov98_022471C8.c @@ -6,7 +6,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_02025CCC_decl.h" #include "struct_decls/struct_0202B370_decl.h" diff --git a/src/overlay100/ov100_021D13E4.c b/src/overlay100/ov100_021D13E4.c index e31567ed2a..154a8b54ce 100644 --- a/src/overlay100/ov100_021D13E4.c +++ b/src/overlay100/ov100_021D13E4.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -21,6 +20,7 @@ #include "easy3d_object.h" #include "gx_layers.h" #include "heap.h" +#include "narc.h" #include "palette.h" #include "sys_task.h" #include "unk_020041CC.h" diff --git a/src/overlay100/ov100_021D1C44.c b/src/overlay100/ov100_021D1C44.c index 579cd808c6..c59daa1514 100644 --- a/src/overlay100/ov100_021D1C44.c +++ b/src/overlay100/ov100_021D1C44.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -21,6 +20,7 @@ #include "camera.h" #include "easy3d_object.h" #include "heap.h" +#include "narc.h" #include "palette.h" #include "sys_task.h" #include "text.h" diff --git a/src/overlay100/ov100_021D2F0C.c b/src/overlay100/ov100_021D2F0C.c index 8e75f781e4..3552232ae3 100644 --- a/src/overlay100/ov100_021D2F0C.c +++ b/src/overlay100/ov100_021D2F0C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" @@ -20,6 +19,7 @@ #include "camera.h" #include "easy3d_object.h" #include "heap.h" +#include "narc.h" #include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" diff --git a/src/overlay100/ov100_021D46C8.c b/src/overlay100/ov100_021D46C8.c index d9ff314ac9..7856a5845b 100644 --- a/src/overlay100/ov100_021D46C8.c +++ b/src/overlay100/ov100_021D46C8.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_020985E4.h" #include "overlay100/ov100_021D44C0.h" @@ -20,6 +19,7 @@ #include "game_options.h" #include "gx_layers.h" #include "message.h" +#include "narc.h" #include "palette.h" #include "strbuf.h" #include "string_template.h" diff --git a/src/overlay101/ov101_021D7E48.c b/src/overlay101/ov101_021D7E48.c index e29b61d103..6483b04096 100644 --- a/src/overlay101/ov101_021D7E48.c +++ b/src/overlay101/ov101_021D7E48.c @@ -3,13 +3,13 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0200C738.h" #include "overlay101/struct_ov101_021D8544.h" #include "cell_actor.h" #include "heap.h" +#include "narc.h" #include "sprite_resource.h" #include "unk_020093B4.h" #include "unk_0200A328.h" diff --git a/src/overlay104/ov104_0222FBE4.c b/src/overlay104/ov104_0222FBE4.c index 60279bcd3a..50583524d9 100644 --- a/src/overlay104/ov104_0222FBE4.c +++ b/src/overlay104/ov104_0222FBE4.c @@ -5,7 +5,6 @@ #include "consts/game_records.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02014014_decl.h" diff --git a/src/overlay104/ov104_02231F74.c b/src/overlay104/ov104_02231F74.c index ce179d1742..1c8bf75c5b 100644 --- a/src/overlay104/ov104_02231F74.c +++ b/src/overlay104/ov104_02231F74.c @@ -5,7 +5,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02013A04_decl.h" diff --git a/src/overlay104/ov104_02237DD8.c b/src/overlay104/ov104_02237DD8.c index 7b66604673..bab79bec3d 100644 --- a/src/overlay104/ov104_02237DD8.c +++ b/src/overlay104/ov104_02237DD8.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_020304A0_decl.h" #include "struct_decls/struct_020305B8_decl.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay104/ov104_0223C2D4.c b/src/overlay104/ov104_0223C2D4.c index 8b40781592..becdc9e08a 100644 --- a/src/overlay104/ov104_0223C2D4.c +++ b/src/overlay104/ov104_0223C2D4.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0209B75C_decl.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_0207C690.h" diff --git a/src/overlay104/ov104_0223D768.c b/src/overlay104/ov104_0223D768.c index 4eeb531e56..7b2b01e24d 100644 --- a/src/overlay104/ov104_0223D768.c +++ b/src/overlay104/ov104_0223D768.c @@ -3,12 +3,12 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_0200D0F4.h" +#include "narc.h" #include "palette.h" #include "unk_0200C6E4.h" diff --git a/src/overlay104/ov104_0223D9E4.c b/src/overlay104/ov104_0223D9E4.c index 6976928be0..aaf95cea7d 100644 --- a/src/overlay104/ov104_0223D9E4.c +++ b/src/overlay104/ov104_0223D9E4.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "bg_window.h" #include "enums.h" #include "heap.h" diff --git a/src/overlay104/ov104_0223DC7C.c b/src/overlay104/ov104_0223DC7C.c index 5e00ac1053..f73fcde7b6 100644 --- a/src/overlay104/ov104_0223DC7C.c +++ b/src/overlay104/ov104_0223DC7C.c @@ -2,7 +2,6 @@ #include #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012744_decl.h" diff --git a/src/overlay105/ov105_02241AE0.c b/src/overlay105/ov105_02241AE0.c index 9f20653cee..17d8f0cd80 100644 --- a/src/overlay105/ov105_02241AE0.c +++ b/src/overlay105/ov105_02241AE0.c @@ -5,7 +5,6 @@ #include "struct_decls/sprite_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007768_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay106/ov106_02241AE0.c b/src/overlay106/ov106_02241AE0.c index 7987835f6e..4b060177a1 100644 --- a/src/overlay106/ov106_02241AE0.c +++ b/src/overlay106/ov106_02241AE0.c @@ -4,7 +4,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay106/ov106_02243310.c b/src/overlay106/ov106_02243310.c index 8146843ea3..7ae008836d 100644 --- a/src/overlay106/ov106_02243310.c +++ b/src/overlay106/ov106_02243310.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay022/struct_ov22_022559F8.h" #include "overlay106/struct_ov106_02243310.h" diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index 6fefaaabc3..ef07221c7d 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -5,7 +5,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_020302DC_decl.h" diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index d72514123c..6ce249b703 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -5,7 +5,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_020302DC_decl.h" diff --git a/src/overlay107/ov107_02249604.c b/src/overlay107/ov107_02249604.c index b271ef2ace..839f1f9d5d 100644 --- a/src/overlay107/ov107_02249604.c +++ b/src/overlay107/ov107_02249604.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_party_decl.h" #include "overlay022/struct_ov22_022559F8.h" diff --git a/src/overlay108/ov108_02241AE0.c b/src/overlay108/ov108_02241AE0.c index 49980d9f7e..95be6cc8e3 100644 --- a/src/overlay108/ov108_02241AE0.c +++ b/src/overlay108/ov108_02241AE0.c @@ -4,7 +4,6 @@ #include #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_020304A0_decl.h" #include "struct_decls/struct_020305B8_decl.h" diff --git a/src/overlay108/ov108_02243030.c b/src/overlay108/ov108_02243030.c index 92ef64c8bd..2a3d39df23 100644 --- a/src/overlay108/ov108_02243030.c +++ b/src/overlay108/ov108_02243030.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_party_decl.h" #include "overlay022/struct_ov22_022559F8.h" diff --git a/src/overlay109/ov109_021D0D80.c b/src/overlay109/ov109_021D0D80.c index 82604b5fbb..e6cbc9da2b 100644 --- a/src/overlay109/ov109_021D0D80.c +++ b/src/overlay109/ov109_021D0D80.c @@ -5,7 +5,6 @@ #include "consts/game_records.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_party_decl.h" diff --git a/src/overlay109/ov109_021D3D50.c b/src/overlay109/ov109_021D3D50.c index 736e99b0fa..80ad99d96f 100644 --- a/src/overlay109/ov109_021D3D50.c +++ b/src/overlay109/ov109_021D3D50.c @@ -5,7 +5,6 @@ #include "consts/game_records.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02099F80.h" #include "struct_defs/struct_0209BF64.h" #include "struct_defs/struct_0209C194.h" diff --git a/src/overlay110/ov110_021D0D80.c b/src/overlay110/ov110_021D0D80.c index a9648f417a..41fde9f545 100644 --- a/src/overlay110/ov110_021D0D80.c +++ b/src/overlay110/ov110_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0202D750_decl.h" #include "struct_decls/struct_0203068C_decl.h" #include "struct_decls/struct_020308A0_decl.h" diff --git a/src/overlay111/ov111_021D0D80.c b/src/overlay111/ov111_021D0D80.c index 16de4fa4ae..6f2c408dfa 100644 --- a/src/overlay111/ov111_021D0D80.c +++ b/src/overlay111/ov111_021D0D80.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C440_decl.h" #include "struct_decls/struct_02015920_decl.h" #include "struct_defs/struct_02015958.h" diff --git a/src/overlay111/ov111_021D2F80.c b/src/overlay111/ov111_021D2F80.c index 32f227ea79..15381a43b8 100644 --- a/src/overlay111/ov111_021D2F80.c +++ b/src/overlay111/ov111_021D2F80.c @@ -3,13 +3,12 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay022/struct_ov22_022559F8.h" #include "overlay111/struct_ov111_021D2F80.h" #include "cell_actor.h" #include "gx_layers.h" +#include "narc.h" #include "sprite_resource.h" #include "unk_020093B4.h" #include "unk_0200A328.h" diff --git a/src/overlay112/ov112_0225C700.c b/src/overlay112/ov112_0225C700.c index 10e9fe2ee0..a443802bc4 100644 --- a/src/overlay112/ov112_0225C700.c +++ b/src/overlay112/ov112_0225C700.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0200C738.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index 9016d0793f..cbdfbb1c61 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -7,7 +7,6 @@ #include "constants/species.h" #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012744_decl.h" diff --git a/src/overlay113/ov113_0225E368.c b/src/overlay113/ov113_0225E368.c index 1777b9ba86..21a9f50afe 100644 --- a/src/overlay113/ov113_0225E368.c +++ b/src/overlay113/ov113_0225E368.c @@ -5,8 +5,6 @@ #include "constants/species.h" -#include "struct_decls/struct_02006C24_decl.h" - #include "overlay113/ov113_02260620.h" #include "overlay113/struct_ov113_0225DBCC_decl.h" #include "overlay113/struct_ov113_0225EB20.h" @@ -30,6 +28,7 @@ #include "easy3d.h" #include "easy3d_object.h" #include "heap.h" +#include "narc.h" #include "pokemon.h" #include "unk_02005474.h" #include "unk_02006E3C.h" diff --git a/src/overlay114/ov114_0225C700.c b/src/overlay114/ov114_0225C700.c index a10fd92bea..d3e018c7f9 100644 --- a/src/overlay114/ov114_0225C700.c +++ b/src/overlay114/ov114_0225C700.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02015920_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_defs/struct_0200C738.h" diff --git a/src/overlay115/ov115_02260CEC.c b/src/overlay115/ov115_02260CEC.c index b2a29e4588..6cc129342b 100644 --- a/src/overlay115/ov115_02260CEC.c +++ b/src/overlay115/ov115_02260CEC.c @@ -5,7 +5,6 @@ #include #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02012744_decl.h" #include "struct_decls/struct_02012B20_decl.h" #include "struct_defs/sprite_manager_allocation.h" diff --git a/src/overlay116/ov116_02261870.c b/src/overlay116/ov116_02261870.c index e02e50e68b..8c0c1820c4 100644 --- a/src/overlay116/ov116_02261870.c +++ b/src/overlay116/ov116_02261870.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" diff --git a/src/overlay117/ov117_02260668.c b/src/overlay117/ov117_02260668.c index a05bf96acc..3b8ad750be 100644 --- a/src/overlay117/ov117_02260668.c +++ b/src/overlay117/ov117_02260668.c @@ -4,7 +4,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0207C690.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/overlay117/ov117_022626B0.c b/src/overlay117/ov117_022626B0.c index 4baa60ef4e..0cac071727 100644 --- a/src/overlay117/ov117_022626B0.c +++ b/src/overlay117/ov117_022626B0.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_0200D0F4.h" diff --git a/src/overlay117/ov117_02263AF0.c b/src/overlay117/ov117_02263AF0.c index be19b2e0d8..e06ea0c4f0 100644 --- a/src/overlay117/ov117_02263AF0.c +++ b/src/overlay117/ov117_02263AF0.c @@ -4,7 +4,6 @@ #include #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02012744_decl.h" #include "struct_defs/sprite_manager_allocation.h" diff --git a/src/pokedex_heightweight.c b/src/pokedex_heightweight.c index e72f0a8c64..095c656214 100644 --- a/src/pokedex_heightweight.c +++ b/src/pokedex_heightweight.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "heap.h" #include "narc.h" #include "pokedex_data_index.h" diff --git a/src/pokemon.c b/src/pokemon.c index ef802e54f8..bf44123e14 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -15,7 +15,6 @@ #include "struct_decls/pokemon_animation_sys_decl.h" #include "struct_decls/sprite_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_decls/struct_02023790_decl.h" diff --git a/src/pokemon_summary_app.c b/src/pokemon_summary_app.c index fe41ff7369..80eeb67cc7 100644 --- a/src/pokemon_summary_app.c +++ b/src/pokemon_summary_app.c @@ -5,7 +5,6 @@ #include "constants/pokemon.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/pokemon_summary.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/sprite_resource.c b/src/sprite_resource.c index 26bf63c094..26702edbd9 100644 --- a/src/sprite_resource.c +++ b/src/sprite_resource.c @@ -5,8 +5,6 @@ #include "constants/heap.h" -#include "struct_decls/struct_02006C24_decl.h" - #include "nnsys/g2d/g2d_Image.h" #include "heap.h" diff --git a/src/trainer_data.c b/src/trainer_data.c index c91a9b50c8..020ec2490e 100644 --- a/src/trainer_data.c +++ b/src/trainer_data.c @@ -7,8 +7,6 @@ #include "constants/pokemon.h" #include "constants/trainer.h" -#include "struct_decls/struct_02006C24_decl.h" - #include "data/trainer_class_genders.h" #include "overlay006/battle_params.h" diff --git a/src/unk_02006E3C.c b/src/unk_02006E3C.c index 9d06a190e6..c1a858739c 100644 --- a/src/unk_02006E3C.c +++ b/src/unk_02006E3C.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "bg_window.h" #include "heap.h" #include "narc.h" diff --git a/src/unk_0200C6E4.c b/src/unk_0200C6E4.c index ed93a0d749..3608675c9f 100644 --- a/src/unk_0200C6E4.c +++ b/src/unk_0200C6E4.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_02009508.h" #include "struct_defs/struct_0200C738.h" @@ -18,6 +17,7 @@ #include "cell_actor.h" #include "heap.h" +#include "narc.h" #include "palette.h" #include "sprite_resource.h" #include "unk_020093B4.h" diff --git a/src/unk_02027B70.c b/src/unk_02027B70.c index e05464f108..6aee557f83 100644 --- a/src/unk_02027B70.c +++ b/src/unk_02027B70.c @@ -3,13 +3,13 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_berry_data_decl.h" #include "struct_defs/struct_02027854.h" #include "struct_defs/struct_02027BF4.h" #include "berry_data.h" #include "heap.h" +#include "narc.h" static void sub_02027C50(UnkStruct_02027854 *param0); static int sub_02027C7C(const UnkStruct_02027BF4 *param0, int param1, int param2); diff --git a/src/unk_02054BD0.c b/src/unk_02054BD0.c index f5d981a7c8..9b18291209 100644 --- a/src/unk_02054BD0.c +++ b/src/unk_02054BD0.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02039E30_decl.h" #include "field/field_system.h" diff --git a/src/unk_0206A780.c b/src/unk_0206A780.c index 52fa26993b..9248b86844 100644 --- a/src/unk_0206A780.c +++ b/src/unk_0206A780.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/sprite_template.h" #include "struct_defs/struct_0206A844.h" diff --git a/src/unk_0206F314.c b/src/unk_0206F314.c index 2e21af7925..c7ef135d54 100644 --- a/src/unk_0206F314.c +++ b/src/unk_0206F314.c @@ -5,7 +5,6 @@ #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_0202E8C0_decl.h" #include "struct_decls/struct_020508D4_decl.h" diff --git a/src/unk_02073838.c b/src/unk_02073838.c index 23909ceae6..b58eb27265 100644 --- a/src/unk_02073838.c +++ b/src/unk_02073838.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02073838.h" #include "struct_defs/struct_02073974.h" #include "struct_defs/struct_02073B50.h" @@ -12,6 +11,7 @@ #include "easy3d.h" #include "heap.h" +#include "narc.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02006E3C.h" diff --git a/src/unk_0207E0B8.c b/src/unk_0207E0B8.c index 27aedca240..d65598f830 100644 --- a/src/unk_0207E0B8.c +++ b/src/unk_0207E0B8.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0207C690.h" #include "struct_defs/struct_0207F248.h" #include "struct_defs/struct_02099F80.h" diff --git a/src/unk_02082C2C.c b/src/unk_02082C2C.c index 3617a440dc..b14380bc22 100644 --- a/src/unk_02082C2C.c +++ b/src/unk_02082C2C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_0200C738.h" #include "struct_defs/struct_0207F248.h" #include "struct_defs/struct_020831B4.h" diff --git a/src/unk_0208694C.c b/src/unk_0208694C.c index 027a1c55aa..772c568022 100644 --- a/src/unk_0208694C.c +++ b/src/unk_0208694C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02087A10_decl.h" #include "struct_defs/struct_0200C738.h" #include "struct_defs/struct_0208737C.h" diff --git a/src/unk_0208A3F4.c b/src/unk_0208A3F4.c index 098cb4848f..9243d3d1a5 100644 --- a/src/unk_0208A3F4.c +++ b/src/unk_0208A3F4.c @@ -4,7 +4,6 @@ #include #include "struct_decls/font_oam.h" -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" @@ -22,6 +21,7 @@ #include "game_options.h" #include "inlines.h" #include "message.h" +#include "narc.h" #include "palette.h" #include "strbuf.h" #include "text.h" diff --git a/src/unk_0208B284.c b/src/unk_0208B284.c index e73aca819d..ce8a84d600 100644 --- a/src/unk_0208B284.c +++ b/src/unk_0208B284.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" #include "struct_decls/struct_0200C704_decl.h" #include "struct_defs/sprite_template.h" diff --git a/src/unk_0208C098.c b/src/unk_0208C098.c index 9b209d5091..96de17dea7 100644 --- a/src/unk_0208C098.c +++ b/src/unk_0208C098.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" - #include "bg_window.h" #include "core_sys.h" #include "heap.h" diff --git a/src/unk_02098FFC.c b/src/unk_02098FFC.c index 38c1872d7e..628b72bdd1 100644 --- a/src/unk_02098FFC.c +++ b/src/unk_02098FFC.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/struct_02006C24_decl.h" #include "struct_defs/struct_02009508.h" #include "struct_defs/struct_0200D0F4.h" #include "struct_defs/struct_0209903C.h" From a96c89a1248ec81699a7ed01ac55176eaa568eb0 Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 13:52:26 -0700 Subject: [PATCH 07/11] Identify unk_02006E3C -> graphics --- include/{unk_02006E3C.h => graphics.h} | 6 +++--- include/inlines.h | 2 +- platinum.us/main.lsf | 2 +- src/battle/ov16_0223B140.c | 2 +- src/battle/ov16_0226871C.c | 2 +- src/choose_starter/choose_starter_app.c | 2 +- src/easy3d_object.c | 2 +- src/font.c | 2 +- src/{unk_02006E3C.c => graphics.c} | 2 +- src/library_tv/library_tv.c | 2 +- src/meson.build | 2 +- src/overlay005/encounter_effect.c | 2 +- src/overlay005/encounter_effect_core.c | 2 +- src/overlay005/ov5_021D521C.c | 2 +- src/overlay005/ov5_021D5EB8.c | 2 +- src/overlay005/ov5_021DD6FC.c | 2 +- src/overlay005/ov5_021F007C.c | 2 +- src/overlay005/ov5_021F6454.c | 2 +- src/overlay006/ov6_0223E140.c | 2 +- src/overlay006/ov6_02246184.c | 2 +- src/overlay006/ov6_02248050.c | 2 +- src/overlay007/ov7_0224CD28.c | 2 +- src/overlay010/ov10_0221F800.c | 2 +- src/overlay012/ov12_0221FC20.c | 2 +- src/overlay012/ov12_02226B84.c | 2 +- src/overlay012/ov12_02234E44.c | 2 +- src/overlay013/ov13_0221FC20.c | 2 +- src/overlay013/ov13_022264F4.c | 2 +- src/overlay017/ov17_0223B140.c | 2 +- src/overlay017/ov17_0223CB1C.c | 2 +- src/overlay017/ov17_0223DAD0.c | 2 +- src/overlay017/ov17_0223F7E4.c | 2 +- src/overlay017/ov17_022413D8.c | 2 +- src/overlay017/ov17_02247A48.c | 2 +- src/overlay017/ov17_022492DC.c | 2 +- src/overlay017/ov17_0224F4D4.c | 2 +- src/overlay017/ov17_02250744.c | 2 +- src/overlay017/ov17_02252A70.c | 2 +- src/overlay019/ov19_021D61B0.c | 2 +- src/overlay019/ov19_021D79F8.c | 2 +- src/overlay019/ov19_021D8B54.c | 2 +- src/overlay019/ov19_021DA270.c | 2 +- src/overlay019/ov19_021DA814.c | 2 +- src/overlay019/ov19_021DA92C.c | 2 +- src/overlay019/ov19_021DB2FC.c | 2 +- src/overlay019/ov19_021DB8E4.c | 2 +- src/overlay019/ov19_021DC5F0.c | 2 +- src/overlay019/ov19_021DCF88.c | 2 +- src/overlay019/ov19_021DE3E8.c | 2 +- src/overlay019/ov19_021DEC04.c | 2 +- src/overlay020/ov20_021D2098.c | 2 +- src/overlay020/ov20_021D2EA4.c | 2 +- src/overlay020/ov20_021D3864.c | 2 +- src/overlay020/ov20_021D3A54.c | 2 +- src/overlay020/ov20_021D4728.c | 2 +- src/overlay021/ov21_021D3208.c | 2 +- src/overlay021/ov21_021D57B4.c | 2 +- src/overlay021/ov21_021E8D48.c | 2 +- src/overlay022/ov22_02255094.c | 2 +- src/overlay022/ov22_02259098.c | 2 +- src/overlay022/ov22_022597BC.c | 2 +- src/overlay022/ov22_0225AF8C.c | 2 +- src/overlay022/ov22_0225B660.c | 2 +- src/overlay023/ov23_0223E140.c | 2 +- src/overlay023/ov23_02241F74.c | 2 +- src/overlay023/ov23_0224340C.c | 2 +- src/overlay023/ov23_02248F1C.c | 2 +- src/overlay023/ov23_0224B05C.c | 2 +- src/overlay024/ov24_02253CE0.c | 2 +- src/overlay025/ov25_02254560.c | 2 +- src/overlay025/ov25_02255090.c | 2 +- src/overlay025/ov25_02255540.c | 2 +- src/overlay026/ov26_02256404.c | 2 +- src/overlay027/ov27_0225680C.c | 2 +- src/overlay028/ov28_0225697C.c | 2 +- src/overlay029/ov29_022566C8.c | 2 +- src/overlay030/ov30_022563EC.c | 2 +- src/overlay032/ov32_02256470.c | 2 +- src/overlay033/ov33_02256474.c | 2 +- src/overlay034/ov34_02256540.c | 2 +- src/overlay035/ov35_02256410.c | 2 +- src/overlay036/ov36_02256404.c | 2 +- src/overlay037/ov37_022563D4.c | 2 +- src/overlay038/ov38_0225632C.c | 2 +- src/overlay039/ov39_022563DC.c | 2 +- src/overlay040/ov40_0225645C.c | 2 +- src/overlay041/ov41_022567B0.c | 2 +- src/overlay042/ov42_022563D4.c | 2 +- src/overlay043/ov43_02256544.c | 2 +- src/overlay044/ov44_022565BC.c | 2 +- src/overlay045/ov45_022566EC.c | 2 +- src/overlay046/ov46_02256BCC.c | 2 +- src/overlay047/ov47_02256634.c | 2 +- src/overlay048/ov48_0225650C.c | 2 +- src/overlay049/ov49_022563D4.c | 2 +- src/overlay050/ov50_02256510.c | 2 +- src/overlay051/ov51_0225632C.c | 2 +- src/overlay052/ov52_02256694.c | 2 +- src/overlay053/ov53_02256420.c | 2 +- src/overlay055/ov55_0225632C.c | 2 +- src/overlay056/ov56_022561C0.c | 2 +- src/overlay058/ov58_021D0D80.c | 2 +- src/overlay059/ov59_021D0D80.c | 2 +- src/overlay061/ov61_0222BF44.c | 2 +- src/overlay062/ov62_022300D8.c | 2 +- src/overlay062/ov62_02231690.c | 2 +- src/overlay062/ov62_02234A10.c | 2 +- src/overlay062/ov62_02235E64.c | 2 +- src/overlay062/ov62_02236CBC.c | 2 +- src/overlay062/ov62_02237D24.c | 2 +- src/overlay062/ov62_02239D60.c | 2 +- src/overlay062/ov62_0223CAEC.c | 2 +- src/overlay062/ov62_0223DFA8.c | 2 +- src/overlay062/ov62_02241204.c | 2 +- src/overlay062/ov62_02246B00.c | 2 +- src/overlay062/ov62_02247D74.c | 2 +- src/overlay063/ov63_0222D1C0.c | 2 +- src/overlay064/ov64_0222DCE0.c | 2 +- src/overlay065/ov65_0222DCE0.c | 2 +- src/overlay065/ov65_02235060.c | 2 +- src/overlay065/ov65_0223648C.c | 2 +- src/overlay066/ov66_022343A8.c | 2 +- src/overlay066/ov66_02234EA8.c | 2 +- src/overlay067/ov67_0225C700.c | 2 +- src/overlay068/ov68_0225C700.c | 2 +- src/overlay069/ov69_0225C700.c | 2 +- src/overlay070/ov70_0225C700.c | 2 +- src/overlay070/ov70_0225C858.c | 2 +- src/overlay070/ov70_0225D9A4.c | 2 +- src/overlay070/ov70_02260B44.c | 2 +- src/overlay070/ov70_02269190.c | 2 +- src/overlay071/ov71_0223B140.c | 2 +- src/overlay072/ov72_0223D7A0.c | 2 +- src/overlay073/ov73_021D0D80.c | 2 +- src/overlay073/ov73_021D3250.c | 2 +- src/overlay076/ov76_0223B870.c | 2 +- src/overlay077/ov77_021D0D80.c | 2 +- src/overlay077/ov77_021D25B0.c | 2 +- src/overlay081/ov81_021D0D80.c | 2 +- src/overlay083/ov83_0223D6A8.c | 2 +- src/overlay084/ov84_0223B5A0.c | 2 +- src/overlay085/ov85_02241440.c | 2 +- src/overlay086/ov86_0223B140.c | 2 +- src/overlay087/ov87_021D106C.c | 2 +- src/overlay088/ov88_0223B140.c | 2 +- src/overlay091/ov91_021D0D80.c | 2 +- src/overlay092/ov92_021D0D80.c | 2 +- src/overlay094/ov94_0223BCB0.c | 2 +- src/overlay094/ov94_0223C610.c | 2 +- src/overlay094/ov94_0223D0C4.c | 2 +- src/overlay094/ov94_0223DC04.c | 2 +- src/overlay094/ov94_0223E46C.c | 2 +- src/overlay094/ov94_0223FB48.c | 2 +- src/overlay094/ov94_022414B8.c | 2 +- src/overlay094/ov94_02242AD0.c | 2 +- src/overlay094/ov94_02243EF8.c | 2 +- src/overlay094/ov94_02244950.c | 2 +- src/overlay095/ov95_02246C20.c | 2 +- src/overlay095/ov95_022476F0.c | 2 +- src/overlay095/ov95_02247B6C.c | 2 +- src/overlay095/ov95_02248590.c | 2 +- src/overlay095/ov95_02249740.c | 2 +- src/overlay095/ov95_02249F90.c | 2 +- src/overlay095/ov95_0224A390.c | 2 +- src/overlay095/ov95_0224ABC0.c | 2 +- src/overlay095/ov95_0224B3D8.c | 2 +- src/overlay096/ov96_0223BCE0.c | 2 +- src/overlay097/ov97_0222AE60.c | 2 +- src/overlay097/ov97_0222C174.c | 2 +- src/overlay097/ov97_0222D30C.c | 2 +- src/overlay097/ov97_02230410.c | 2 +- src/overlay097/ov97_02233B18.c | 2 +- src/overlay097/ov97_02237694.c | 2 +- src/overlay098/ov98_022471C8.c | 2 +- src/overlay099/ov99_021D1A54.c | 2 +- src/overlay099/ov99_021D4134.c | 2 +- src/overlay100/ov100_021D13E4.c | 2 +- src/overlay100/ov100_021D1C44.c | 2 +- src/overlay100/ov100_021D2F0C.c | 2 +- src/overlay102/ov102_021D0D80.c | 2 +- src/overlay104/ov104_02237DD8.c | 2 +- src/overlay104/ov104_0223C2D4.c | 2 +- src/overlay104/ov104_0223D9E4.c | 2 +- src/overlay104/ov104_0223DC7C.c | 2 +- src/overlay105/ov105_02241AE0.c | 2 +- src/overlay106/ov106_02241AE0.c | 2 +- src/overlay107/ov107_02241AE0.c | 2 +- src/overlay107/ov107_02245EB0.c | 2 +- src/overlay108/ov108_02241AE0.c | 2 +- src/overlay109/ov109_021D3D50.c | 2 +- src/overlay110/ov110_021D0D80.c | 2 +- src/overlay111/ov111_021D0D80.c | 2 +- src/overlay112/ov112_0225C700.c | 2 +- src/overlay113/ov113_0225C700.c | 2 +- src/overlay113/ov113_0225E368.c | 2 +- src/overlay114/ov114_0225C700.c | 2 +- src/overlay115/ov115_02260440.c | 2 +- src/overlay115/ov115_02260CEC.c | 2 +- src/overlay116/ov116_02261870.c | 2 +- src/overlay117/ov117_02260668.c | 2 +- src/overlay117/ov117_02263AF0.c | 2 +- src/overlay119/ov119_021D0D80.c | 2 +- src/palette.c | 2 +- src/pokedex_heightweight.c | 2 +- src/pokemon_summary_app.c | 2 +- src/sprite_resource.c | 2 +- src/text.c | 2 +- src/unk_0200C440.c | 2 +- src/unk_0200DA60.c | 2 +- src/unk_02012744.c | 2 +- src/unk_02014D38.c | 2 +- src/unk_02015920.c | 2 +- src/unk_020528D0.c | 2 +- src/unk_0205C980.c | 2 +- src/unk_0205CA94.c | 2 +- src/unk_02073838.c | 2 +- src/unk_0207AE68.c | 2 +- src/unk_0207E0B8.c | 2 +- src/unk_02082C2C.c | 2 +- src/unk_0208694C.c | 2 +- src/unk_0208A3F4.c | 2 +- src/unk_02094EDC.c | 2 +- 222 files changed, 224 insertions(+), 224 deletions(-) rename include/{unk_02006E3C.h => graphics.h} (96%) rename src/{unk_02006E3C.c => graphics.c} (99%) diff --git a/include/unk_02006E3C.h b/include/graphics.h similarity index 96% rename from include/unk_02006E3C.h rename to include/graphics.h index fe2e01bb8d..94b5f73eaa 100644 --- a/include/unk_02006E3C.h +++ b/include/graphics.h @@ -1,5 +1,5 @@ -#ifndef POKEPLATINUM_UNK_02006E3C_H -#define POKEPLATINUM_UNK_02006E3C_H +#ifndef POKEPLATINUM_GRAPHICS_H +#define POKEPLATINUM_GRAPHICS_H #include @@ -36,4 +36,4 @@ void *sub_02007220(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **p void *sub_0200723C(NARC *param0, u32 param1, BOOL param2, u32 param3, int param4); void *sub_02007250(NARC *param0, u32 param1, BOOL param2, u32 param3, int param4, u32 *param5); -#endif // POKEPLATINUM_UNK_02006E3C_H +#endif // POKEPLATINUM_GRAPHICS_H diff --git a/include/inlines.h b/include/inlines.h index 89738a1971..34a8275c07 100644 --- a/include/inlines.h +++ b/include/inlines.h @@ -12,6 +12,7 @@ #include "assert.h" #include "field_overworld_state.h" #include "field_script_context.h" +#include "graphics.h" #include "heap.h" #include "map_header.h" #include "narc.h" @@ -19,7 +20,6 @@ #include "script_manager.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_0201D15C.h" #include "unk_0206A8DC.h" #include "vars_flags.h" diff --git a/platinum.us/main.lsf b/platinum.us/main.lsf index 4b44e26480..81824aefbb 100644 --- a/platinum.us/main.lsf +++ b/platinum.us/main.lsf @@ -31,7 +31,7 @@ Static main Object main.nef.p/src_unk_0200679C.c.o Object main.nef.p/src_overlay_manager.c.o Object main.nef.p/src_narc.c.o - Object main.nef.p/src_unk_02006E3C.c.o + Object main.nef.p/src_graphics.c.o Object main.nef.p/src_unk_0200762C.c.o Object main.nef.p/src_unk_020093B4.c.o Object main.nef.p/src_sprite_resource.c.o diff --git a/src/battle/ov16_0223B140.c b/src/battle/ov16_0223B140.c index 02ce63e32a..fc75329842 100644 --- a/src/battle/ov16_0223B140.c +++ b/src/battle/ov16_0223B140.c @@ -46,6 +46,7 @@ #include "game_options.h" #include "game_overlay.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "hardware_palette.h" #include "heap.h" @@ -64,7 +65,6 @@ #include "trainer_info.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200C440.h" diff --git a/src/battle/ov16_0226871C.c b/src/battle/ov16_0226871C.c index 5920a03f42..281e84574b 100644 --- a/src/battle/ov16_0226871C.c +++ b/src/battle/ov16_0226871C.c @@ -35,6 +35,7 @@ #include "core_sys.h" #include "enums.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "inlines.h" #include "message.h" @@ -52,7 +53,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" #include "unk_02012744.h" diff --git a/src/choose_starter/choose_starter_app.c b/src/choose_starter/choose_starter_app.c index 234de5b0f7..1674550de0 100644 --- a/src/choose_starter/choose_starter_app.c +++ b/src/choose_starter/choose_starter_app.c @@ -34,6 +34,7 @@ #include "easy3d.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -48,7 +49,6 @@ #include "unk_02001AF4.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" diff --git a/src/easy3d_object.c b/src/easy3d_object.c index 6bfa09f052..2814c418af 100644 --- a/src/easy3d_object.c +++ b/src/easy3d_object.c @@ -4,11 +4,11 @@ #include #include "easy3d.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" static void Easy3DModel_BindTexture(SysTask *task, void *param); static void Easy3DModel_LoadInternal(Easy3DModel *model); diff --git a/src/font.c b/src/font.c index 4fa4044da6..ad32372961 100644 --- a/src/font.c +++ b/src/font.c @@ -7,11 +7,11 @@ #include "charcode.h" #include "font_manager.h" +#include "graphics.h" #include "heap.h" #include "render_text.h" #include "strbuf.h" #include "text.h" -#include "unk_02006E3C.h" typedef struct { TextGlyph curGlyph; diff --git a/src/unk_02006E3C.c b/src/graphics.c similarity index 99% rename from src/unk_02006E3C.c rename to src/graphics.c index c1a858739c..65fdbf2cf3 100644 --- a/src/unk_02006E3C.c +++ b/src/graphics.c @@ -1,4 +1,4 @@ -#include "unk_02006E3C.h" +#include "graphics.h" #include #include diff --git a/src/library_tv/library_tv.c b/src/library_tv/library_tv.c index d8cf98e0a7..45867d4430 100644 --- a/src/library_tv/library_tv.c +++ b/src/library_tv/library_tv.c @@ -9,12 +9,12 @@ #include "bg_window.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" #include "overlay_manager.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" diff --git a/src/meson.build b/src/meson.build index 4c033a74e7..1e6448fcad 100644 --- a/src/meson.build +++ b/src/meson.build @@ -27,7 +27,7 @@ pokeplatinum_c = files( 'unk_02006224.c', 'unk_0200679C.c', 'overlay_manager.c', - 'unk_02006E3C.c', + 'graphics.c', 'unk_0200762C.c', 'unk_020093B4.c', 'sprite_resource.c', diff --git a/src/overlay005/encounter_effect.c b/src/overlay005/encounter_effect.c index 219e71f31e..d2d15fe783 100644 --- a/src/overlay005/encounter_effect.c +++ b/src/overlay005/encounter_effect.c @@ -29,6 +29,7 @@ #include "camera.h" #include "cell_actor.h" #include "enc_effects.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" @@ -38,7 +39,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_02014000.h" diff --git a/src/overlay005/encounter_effect_core.c b/src/overlay005/encounter_effect_core.c index 4031dd196d..548bef4d3f 100644 --- a/src/overlay005/encounter_effect_core.c +++ b/src/overlay005/encounter_effect_core.c @@ -23,6 +23,7 @@ #include "bg_window.h" #include "camera.h" #include "cell_actor.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -34,7 +35,6 @@ #include "sys_task_manager.h" #include "text.h" #include "trainer_info.h" -#include "unk_02006E3C.h" #include "unk_0200A9DC.h" #include "unk_0200F174.h" #include "unk_0202419C.h" diff --git a/src/overlay005/ov5_021D521C.c b/src/overlay005/ov5_021D521C.c index ef5bb4e641..a11041da2b 100644 --- a/src/overlay005/ov5_021D521C.c +++ b/src/overlay005/ov5_021D521C.c @@ -8,9 +8,9 @@ #include "overlay005/struct_ov5_021D5894.h" #include "ascii_util.h" +#include "graphics.h" #include "heap.h" #include "rtc.h" -#include "unk_02006E3C.h" typedef struct UnkStruct_ov5_021D538C_t { u32 unk_00; diff --git a/src/overlay005/ov5_021D5EB8.c b/src/overlay005/ov5_021D5EB8.c index 788201907d..bc3fd33b5a 100644 --- a/src/overlay005/ov5_021D5EB8.c +++ b/src/overlay005/ov5_021D5EB8.c @@ -14,6 +14,7 @@ #include "camera.h" #include "cell_actor.h" #include "enums.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" @@ -21,7 +22,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay005/ov5_021DD6FC.c b/src/overlay005/ov5_021DD6FC.c index b1d8e8736c..f50d127688 100644 --- a/src/overlay005/ov5_021DD6FC.c +++ b/src/overlay005/ov5_021DD6FC.c @@ -7,6 +7,7 @@ #include "field/field_system_sub2_t.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "map_header.h" #include "message.h" @@ -14,7 +15,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_02071CFC.h" typedef struct UnkStruct_ov5_021DD9C8_t { diff --git a/src/overlay005/ov5_021F007C.c b/src/overlay005/ov5_021F007C.c index 31a5cce95b..f94069ac1d 100644 --- a/src/overlay005/ov5_021F007C.c +++ b/src/overlay005/ov5_021F007C.c @@ -14,6 +14,7 @@ #include "overlay006/struct_ov6_0223E6EC.h" #include "bg_window.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "map_header.h" @@ -21,7 +22,6 @@ #include "player_avatar.h" #include "script_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020508D4.h" #include "unk_02054D00.h" diff --git a/src/overlay005/ov5_021F6454.c b/src/overlay005/ov5_021F6454.c index 38fe0f7ec5..163c482ed4 100644 --- a/src/overlay005/ov5_021F6454.c +++ b/src/overlay005/ov5_021F6454.c @@ -25,6 +25,7 @@ #include "bg_window.h" #include "field_script_context.h" #include "game_records.h" +#include "graphics.h" #include "heap.h" #include "inlines.h" #include "map_object.h" @@ -42,7 +43,6 @@ #include "unk_0200112C.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0201D15C.h" diff --git a/src/overlay006/ov6_0223E140.c b/src/overlay006/ov6_0223E140.c index 1d81f26260..c00e1458a2 100644 --- a/src/overlay006/ov6_0223E140.c +++ b/src/overlay006/ov6_0223E140.c @@ -26,6 +26,7 @@ #include "core_sys.h" #include "easy3d_object.h" #include "field_system.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "map_object.h" @@ -34,7 +35,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0201D15C.h" #include "unk_020508D4.h" #include "unk_020655F4.h" diff --git a/src/overlay006/ov6_02246184.c b/src/overlay006/ov6_02246184.c index b26926b2bf..efaf960850 100644 --- a/src/overlay006/ov6_02246184.c +++ b/src/overlay006/ov6_02246184.c @@ -9,6 +9,7 @@ #include "overlay006/struct_ov6_02246204_decl.h" #include "overlay006/struct_ov6_02246254.h" +#include "graphics.h" #include "heap.h" #include "map_header.h" #include "message.h" @@ -17,7 +18,6 @@ #include "save_player.h" #include "strbuf.h" #include "trainer_info.h" -#include "unk_02006E3C.h" #include "unk_0202F180.h" #include "unk_020559DC.h" #include "unk_02092494.h" diff --git a/src/overlay006/ov6_02248050.c b/src/overlay006/ov6_02248050.c index 580a6a0ca1..fea72c0512 100644 --- a/src/overlay006/ov6_02248050.c +++ b/src/overlay006/ov6_02248050.c @@ -14,12 +14,12 @@ #include "overlay006/struct_ov6_0223E6EC.h" #include "easy3d_object.h" +#include "graphics.h" #include "heap.h" #include "map_object.h" #include "narc.h" #include "player_avatar.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" typedef struct { Easy3DObject unk_00; diff --git a/src/overlay007/ov7_0224CD28.c b/src/overlay007/ov7_0224CD28.c index dbbfdd7687..3573a484ae 100644 --- a/src/overlay007/ov7_0224CD28.c +++ b/src/overlay007/ov7_0224CD28.c @@ -25,6 +25,7 @@ #include "font.h" #include "game_options.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -42,7 +43,6 @@ #include "unk_0200112C.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200A328.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" diff --git a/src/overlay010/ov10_0221F800.c b/src/overlay010/ov10_0221F800.c index bbe1e779ab..4eb31ea539 100644 --- a/src/overlay010/ov10_0221F800.c +++ b/src/overlay010/ov10_0221F800.c @@ -31,6 +31,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -52,7 +53,6 @@ #include "unk_02001AF4.h" #include "unk_02005474.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay012/ov12_0221FC20.c b/src/overlay012/ov12_0221FC20.c index bbaed1fed5..601fc61f2d 100644 --- a/src/overlay012/ov12_0221FC20.c +++ b/src/overlay012/ov12_0221FC20.c @@ -37,6 +37,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "core_sys.h" +#include "graphics.h" #include "heap.h" #include "inlines.h" #include "narc.h" @@ -46,7 +47,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" diff --git a/src/overlay012/ov12_02226B84.c b/src/overlay012/ov12_02226B84.c index 69e3be965c..e7d900ff9d 100644 --- a/src/overlay012/ov12_02226B84.c +++ b/src/overlay012/ov12_02226B84.c @@ -25,12 +25,12 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "heap.h" #include "inlines.h" #include "palette.h" #include "spl.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" #include "unk_02014000.h" diff --git a/src/overlay012/ov12_02234E44.c b/src/overlay012/ov12_02234E44.c index b2b81e6d6b..cf80c2f8f1 100644 --- a/src/overlay012/ov12_02234E44.c +++ b/src/overlay012/ov12_02234E44.c @@ -11,9 +11,9 @@ #include "overlay012/struct_ov12_0223595C.h" #include "bg_window.h" +#include "graphics.h" #include "palette.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" typedef struct { diff --git a/src/overlay013/ov13_0221FC20.c b/src/overlay013/ov13_0221FC20.c index 9e953e4ebd..c98bdedf54 100644 --- a/src/overlay013/ov13_0221FC20.c +++ b/src/overlay013/ov13_0221FC20.c @@ -19,6 +19,7 @@ #include "bg_window.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -36,7 +37,6 @@ #include "touch_screen.h" #include "unk_02005474.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay013/ov13_022264F4.c b/src/overlay013/ov13_022264F4.c index c5e0b2e052..5e5a1059ec 100644 --- a/src/overlay013/ov13_022264F4.c +++ b/src/overlay013/ov13_022264F4.c @@ -22,6 +22,7 @@ #include "bg_window.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -37,7 +38,6 @@ #include "touch_screen.h" #include "unk_02005474.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay017/ov17_0223B140.c b/src/overlay017/ov17_0223B140.c index f61fb2eaa7..02c8f99e61 100644 --- a/src/overlay017/ov17_0223B140.c +++ b/src/overlay017/ov17_0223B140.c @@ -28,6 +28,7 @@ #include "bg_window.h" #include "font.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -41,7 +42,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "unk_020041CC.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" diff --git a/src/overlay017/ov17_0223CB1C.c b/src/overlay017/ov17_0223CB1C.c index ebcc17b263..19e9a7d980 100644 --- a/src/overlay017/ov17_0223CB1C.c +++ b/src/overlay017/ov17_0223CB1C.c @@ -21,6 +21,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -33,7 +34,6 @@ #include "sys_task_manager.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" diff --git a/src/overlay017/ov17_0223DAD0.c b/src/overlay017/ov17_0223DAD0.c index 3f32ec389a..47050f950f 100644 --- a/src/overlay017/ov17_0223DAD0.c +++ b/src/overlay017/ov17_0223DAD0.c @@ -28,6 +28,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -41,7 +42,6 @@ #include "sys_task_manager.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" diff --git a/src/overlay017/ov17_0223F7E4.c b/src/overlay017/ov17_0223F7E4.c index 1ac1be04fd..337a03901d 100644 --- a/src/overlay017/ov17_0223F7E4.c +++ b/src/overlay017/ov17_0223F7E4.c @@ -26,6 +26,7 @@ #include "bg_window.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "message_util.h" @@ -39,7 +40,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" #include "unk_0201E86C.h" diff --git a/src/overlay017/ov17_022413D8.c b/src/overlay017/ov17_022413D8.c index 118a99059e..f0b6315f63 100644 --- a/src/overlay017/ov17_022413D8.c +++ b/src/overlay017/ov17_022413D8.c @@ -27,6 +27,7 @@ #include "assert.h" #include "bg_window.h" #include "game_options.h" +#include "graphics.h" #include "heap.h" #include "inlines.h" #include "message.h" @@ -40,7 +41,6 @@ #include "text.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" diff --git a/src/overlay017/ov17_02247A48.c b/src/overlay017/ov17_02247A48.c index 9606855623..b56af29229 100644 --- a/src/overlay017/ov17_02247A48.c +++ b/src/overlay017/ov17_02247A48.c @@ -36,6 +36,7 @@ #include "assert.h" #include "bg_window.h" #include "core_sys.h" +#include "graphics.h" #include "heap.h" #include "palette.h" #include "pokemon.h" @@ -43,7 +44,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200A9DC.h" #include "unk_0200DA60.h" diff --git a/src/overlay017/ov17_022492DC.c b/src/overlay017/ov17_022492DC.c index e98b4b2b9d..41e114e34b 100644 --- a/src/overlay017/ov17_022492DC.c +++ b/src/overlay017/ov17_022492DC.c @@ -17,6 +17,7 @@ #include "bg_window.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "palette.h" @@ -25,7 +26,6 @@ #include "sys_task_manager.h" #include "text.h" #include "touch_screen.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" #include "unk_0201E86C.h" diff --git a/src/overlay017/ov17_0224F4D4.c b/src/overlay017/ov17_0224F4D4.c index 179d2ad6c9..ede9bbf8bb 100644 --- a/src/overlay017/ov17_0224F4D4.c +++ b/src/overlay017/ov17_0224F4D4.c @@ -19,6 +19,7 @@ #include "bg_window.h" #include "font.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -30,7 +31,6 @@ #include "sys_task_manager.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" diff --git a/src/overlay017/ov17_02250744.c b/src/overlay017/ov17_02250744.c index f8d0ff5953..7e31ecdad4 100644 --- a/src/overlay017/ov17_02250744.c +++ b/src/overlay017/ov17_02250744.c @@ -18,6 +18,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "game_options.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "narc.h" @@ -30,7 +31,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay017/ov17_02252A70.c b/src/overlay017/ov17_02252A70.c index 3a7b14b123..d159b2fecf 100644 --- a/src/overlay017/ov17_02252A70.c +++ b/src/overlay017/ov17_02252A70.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_02029C88_decl.h" -#include "unk_02006E3C.h" +#include "graphics.h" #include "unk_020298BC.h" u32 ov17_02252A70(const UnkStruct_02029C88 *param0, const u8 *param1) diff --git a/src/overlay019/ov19_021D61B0.c b/src/overlay019/ov19_021D61B0.c index ea051fcbdd..1de0f6c308 100644 --- a/src/overlay019/ov19_021D61B0.c +++ b/src/overlay019/ov19_021D61B0.c @@ -39,13 +39,13 @@ #include "cell_actor.h" #include "enums.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" diff --git a/src/overlay019/ov19_021D79F8.c b/src/overlay019/ov19_021D79F8.c index c23ccc6353..dede472f87 100644 --- a/src/overlay019/ov19_021D79F8.c +++ b/src/overlay019/ov19_021D79F8.c @@ -19,13 +19,13 @@ #include "bg_window.h" #include "cell_actor.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "pokemon.h" #include "pokemon_icon.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_020797C8.h" static const struct { diff --git a/src/overlay019/ov19_021D8B54.c b/src/overlay019/ov19_021D8B54.c index 74c03b36d6..4b63b5787e 100644 --- a/src/overlay019/ov19_021D8B54.c +++ b/src/overlay019/ov19_021D8B54.c @@ -16,11 +16,11 @@ #include "overlay019/struct_ov19_021DCD18.h" #include "cell_actor.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_0201D15C.h" typedef struct { diff --git a/src/overlay019/ov19_021DA270.c b/src/overlay019/ov19_021DA270.c index 9e93d69078..e9ce531021 100644 --- a/src/overlay019/ov19_021DA270.c +++ b/src/overlay019/ov19_021DA270.c @@ -11,11 +11,11 @@ #include "overlay019/struct_ov19_021DCD18.h" #include "cell_actor.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "pokemon.h" #include "pokemon_icon.h" -#include "unk_02006E3C.h" BOOL ov19_021DA270(UnkStruct_ov19_021DA384 *param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, CellActorCollection *param3, NARC *param4) { diff --git a/src/overlay019/ov19_021DA814.c b/src/overlay019/ov19_021DA814.c index c841510f40..3f81fad84d 100644 --- a/src/overlay019/ov19_021DA814.c +++ b/src/overlay019/ov19_021DA814.c @@ -9,9 +9,9 @@ #include "overlay019/struct_ov19_021DA8D8.h" #include "cell_actor.h" +#include "graphics.h" #include "heap.h" #include "narc.h" -#include "unk_02006E3C.h" BOOL ov19_021DA814(UnkStruct_ov19_021DA8D8 *param0, UnkStruct_ov19_021D61B0 *param1, const UnkStruct_ov19_021D4DF0 *param2, CellActorCollection *param3, NARC *param4) { diff --git a/src/overlay019/ov19_021DA92C.c b/src/overlay019/ov19_021DA92C.c index 41ab1c2825..a69774490c 100644 --- a/src/overlay019/ov19_021DA92C.c +++ b/src/overlay019/ov19_021DA92C.c @@ -14,6 +14,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "narc.h" @@ -22,7 +23,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200C440.h" #include "unk_0207C908.h" diff --git a/src/overlay019/ov19_021DB2FC.c b/src/overlay019/ov19_021DB2FC.c index 7509e9c536..3f93b5672f 100644 --- a/src/overlay019/ov19_021DB2FC.c +++ b/src/overlay019/ov19_021DB2FC.c @@ -11,6 +11,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "enums.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "narc.h" @@ -18,7 +19,6 @@ #include "string_template.h" #include "text.h" #include "unk_02001AF4.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" static void ov19_021DB4B4(BgConfig *param0, u32 param1, u32 param2, u32 param3, u32 param4, u32 param5); diff --git a/src/overlay019/ov19_021DB8E4.c b/src/overlay019/ov19_021DB8E4.c index 9ea036594a..a2d61c519e 100644 --- a/src/overlay019/ov19_021DB8E4.c +++ b/src/overlay019/ov19_021DB8E4.c @@ -15,6 +15,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "item.h" #include "message.h" @@ -24,7 +25,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200C440.h" #include "unk_020797C8.h" diff --git a/src/overlay019/ov19_021DC5F0.c b/src/overlay019/ov19_021DC5F0.c index 3d5b93aad8..3df4bccba8 100644 --- a/src/overlay019/ov19_021DC5F0.c +++ b/src/overlay019/ov19_021DC5F0.c @@ -15,13 +15,13 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "party.h" #include "pokemon.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" static const struct { u16 unk_00; diff --git a/src/overlay019/ov19_021DCF88.c b/src/overlay019/ov19_021DCF88.c index 9ff10a4226..2cecf113ff 100644 --- a/src/overlay019/ov19_021DCF88.c +++ b/src/overlay019/ov19_021DCF88.c @@ -14,13 +14,13 @@ #include "bg_window.h" #include "cell_actor.h" #include "enums.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "strbuf.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0201D15C.h" #include "unk_020797C8.h" diff --git a/src/overlay019/ov19_021DE3E8.c b/src/overlay019/ov19_021DE3E8.c index fd5f23d543..b0e022f017 100644 --- a/src/overlay019/ov19_021DE3E8.c +++ b/src/overlay019/ov19_021DE3E8.c @@ -15,11 +15,11 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "heap.h" #include "item.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" static const struct { u32 unk_00; diff --git a/src/overlay019/ov19_021DEC04.c b/src/overlay019/ov19_021DEC04.c index ae4bc58b72..16ace07dae 100644 --- a/src/overlay019/ov19_021DEC04.c +++ b/src/overlay019/ov19_021DEC04.c @@ -15,6 +15,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "inlines.h" #include "message.h" @@ -25,7 +26,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" struct UnkStruct_ov19_021DEC04_t { BOOL unk_00; diff --git a/src/overlay020/ov20_021D2098.c b/src/overlay020/ov20_021D2098.c index c09f2c0ccb..2c9e97f2a1 100644 --- a/src/overlay020/ov20_021D2098.c +++ b/src/overlay020/ov20_021D2098.c @@ -22,12 +22,12 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200F174.h" diff --git a/src/overlay020/ov20_021D2EA4.c b/src/overlay020/ov20_021D2EA4.c index 79903e59e0..e588cc8be9 100644 --- a/src/overlay020/ov20_021D2EA4.c +++ b/src/overlay020/ov20_021D2EA4.c @@ -15,13 +15,13 @@ #include "charcode.h" #include "colored_arrow.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "narc.h" #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_02014D38.h" diff --git a/src/overlay020/ov20_021D3864.c b/src/overlay020/ov20_021D3864.c index f53d620aa2..b6e014f9e1 100644 --- a/src/overlay020/ov20_021D3864.c +++ b/src/overlay020/ov20_021D3864.c @@ -12,12 +12,12 @@ #include "bg_window.h" #include "cell_actor.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "narc.h" #include "strbuf.h" #include "text.h" -#include "unk_02006E3C.h" typedef struct UnkStruct_ov20_021D3980_t { UnkStruct_ov20_021D2128 *unk_00; diff --git a/src/overlay020/ov20_021D3A54.c b/src/overlay020/ov20_021D3A54.c index 5572a633b4..678f7fa573 100644 --- a/src/overlay020/ov20_021D3A54.c +++ b/src/overlay020/ov20_021D3A54.c @@ -18,13 +18,13 @@ #include "cell_actor.h" #include "enums.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "narc.h" #include "strbuf.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_020998EC.h" typedef struct UnkStruct_ov20_021D3E0C_t { diff --git a/src/overlay020/ov20_021D4728.c b/src/overlay020/ov20_021D4728.c index 3aff5f36d5..18303de705 100644 --- a/src/overlay020/ov20_021D4728.c +++ b/src/overlay020/ov20_021D4728.c @@ -15,6 +15,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "narc.h" @@ -22,7 +23,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" typedef struct { void *unk_00; diff --git a/src/overlay021/ov21_021D3208.c b/src/overlay021/ov21_021D3208.c index 95f82daddc..00c0e196fa 100644 --- a/src/overlay021/ov21_021D3208.c +++ b/src/overlay021/ov21_021D3208.c @@ -11,13 +11,13 @@ #include "overlay021/struct_ov21_021D3A60.h" #include "core_sys.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "pokedex_data_index.h" #include "pokedex_heightweight.h" #include "strbuf.h" #include "trainer_info.h" -#include "unk_02006E3C.h" #include "unk_0202631C.h" static void ov21_021D39A4(u16 *param0, int *param1, const PokedexData *param2, const u16 *param3, int param4); diff --git a/src/overlay021/ov21_021D57B4.c b/src/overlay021/ov21_021D57B4.c index 182ec51ad3..e93a8eebdf 100644 --- a/src/overlay021/ov21_021D57B4.c +++ b/src/overlay021/ov21_021D57B4.c @@ -8,9 +8,9 @@ #include "overlay021/struct_ov21_021D5890.h" #include "cell_actor.h" +#include "graphics.h" #include "heap.h" #include "narc.h" -#include "unk_02006E3C.h" void ov21_021D57B4(UnkStruct_ov21_021D5844 *param0, int param1, int param2, int param3) { diff --git a/src/overlay021/ov21_021E8D48.c b/src/overlay021/ov21_021E8D48.c index 0eb9562e86..8c167d4540 100644 --- a/src/overlay021/ov21_021E8D48.c +++ b/src/overlay021/ov21_021E8D48.c @@ -23,6 +23,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -36,7 +37,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" diff --git a/src/overlay022/ov22_02255094.c b/src/overlay022/ov22_02255094.c index 675033ab09..c36d0e83a2 100644 --- a/src/overlay022/ov22_02255094.c +++ b/src/overlay022/ov22_02255094.c @@ -17,12 +17,12 @@ #include "bg_window.h" #include "cell_actor.h" #include "core_sys.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" #include "resource_collection.h" #include "sprite_resource.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" diff --git a/src/overlay022/ov22_02259098.c b/src/overlay022/ov22_02259098.c index 2f761332a7..d61a23d8ca 100644 --- a/src/overlay022/ov22_02259098.c +++ b/src/overlay022/ov22_02259098.c @@ -12,10 +12,10 @@ #include "overlay022/struct_ov22_0225A0E4.h" #include "core_sys.h" +#include "graphics.h" #include "heap.h" #include "pokemon.h" #include "touch_screen.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" static int ov22_0225936C(char *param0, int param1); diff --git a/src/overlay022/ov22_022597BC.c b/src/overlay022/ov22_022597BC.c index 1fbfe1d6c1..d91c2102be 100644 --- a/src/overlay022/ov22_022597BC.c +++ b/src/overlay022/ov22_022597BC.c @@ -9,11 +9,11 @@ #include "overlay022/struct_ov22_0225AF44.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" typedef struct { UnkStruct_ov22_022597BC *unk_00; diff --git a/src/overlay022/ov22_0225AF8C.c b/src/overlay022/ov22_0225AF8C.c index 499ef5c191..95aea268f1 100644 --- a/src/overlay022/ov22_0225AF8C.c +++ b/src/overlay022/ov22_0225AF8C.c @@ -26,11 +26,11 @@ #include "overlay022/struct_ov22_0225B388.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "pokemon.h" #include "resource_collection.h" -#include "unk_02006E3C.h" #include "unk_020298BC.h" typedef struct UnkStruct_ov22_0225B1BC_t { diff --git a/src/overlay022/ov22_0225B660.c b/src/overlay022/ov22_0225B660.c index 6a0d52de3f..7befffe0ca 100644 --- a/src/overlay022/ov22_0225B660.c +++ b/src/overlay022/ov22_0225B660.c @@ -17,6 +17,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -25,7 +26,6 @@ #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0202419C.h" diff --git a/src/overlay023/ov23_0223E140.c b/src/overlay023/ov23_0223E140.c index d4a2a49ac6..082cc10f93 100644 --- a/src/overlay023/ov23_0223E140.c +++ b/src/overlay023/ov23_0223E140.c @@ -34,6 +34,7 @@ #include "core_sys.h" #include "field_system.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "journal.h" @@ -49,7 +50,6 @@ #include "unk_02001AF4.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay023/ov23_02241F74.c b/src/overlay023/ov23_02241F74.c index 8e7175043c..6187e50537 100644 --- a/src/overlay023/ov23_02241F74.c +++ b/src/overlay023/ov23_02241F74.c @@ -34,6 +34,7 @@ #include "core_sys.h" #include "field_system.h" #include "game_options.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "save_player.h" @@ -43,7 +44,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "trainer_info.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0202854C.h" #include "unk_02030EE0.h" diff --git a/src/overlay023/ov23_0224340C.c b/src/overlay023/ov23_0224340C.c index a83f5de783..eb6159926b 100644 --- a/src/overlay023/ov23_0224340C.c +++ b/src/overlay023/ov23_0224340C.c @@ -32,6 +32,7 @@ #include "core_sys.h" #include "field_system.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "map_object_move.h" @@ -44,7 +45,6 @@ #include "trainer_info.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A9DC.h" diff --git a/src/overlay023/ov23_02248F1C.c b/src/overlay023/ov23_02248F1C.c index a9d1f4c8a4..bf8b91b91b 100644 --- a/src/overlay023/ov23_02248F1C.c +++ b/src/overlay023/ov23_02248F1C.c @@ -14,6 +14,7 @@ #include "cell_actor.h" #include "comm_player_manager.h" #include "communication_system.h" +#include "graphics.h" #include "gx_layers.h" #include "narc.h" #include "player_avatar.h" @@ -22,7 +23,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200DA60.h" diff --git a/src/overlay023/ov23_0224B05C.c b/src/overlay023/ov23_0224B05C.c index c1ea9ec359..da8813e1ed 100644 --- a/src/overlay023/ov23_0224B05C.c +++ b/src/overlay023/ov23_0224B05C.c @@ -40,6 +40,7 @@ #include "field_map_change.h" #include "field_system.h" #include "game_records.h" +#include "graphics.h" #include "heap.h" #include "journal.h" #include "map_object_move.h" @@ -52,7 +53,6 @@ #include "trainer_info.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02013A04.h" diff --git a/src/overlay024/ov24_02253CE0.c b/src/overlay024/ov24_02253CE0.c index a9dd7952a7..137c3e0f9b 100644 --- a/src/overlay024/ov24_02253CE0.c +++ b/src/overlay024/ov24_02253CE0.c @@ -4,9 +4,9 @@ #include #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "narc.h" -#include "unk_02006E3C.h" void ov24_02253CE0(BgConfig *param0) { diff --git a/src/overlay025/ov25_02254560.c b/src/overlay025/ov25_02254560.c index 95875c2bc6..4763a0d393 100644 --- a/src/overlay025/ov25_02254560.c +++ b/src/overlay025/ov25_02254560.c @@ -16,13 +16,13 @@ #include "overlay025/struct_ov25_02255958.h" #include "bg_window.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "poketch_data.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" typedef struct { BOOL unk_00; diff --git a/src/overlay025/ov25_02255090.c b/src/overlay025/ov25_02255090.c index 194dccedea..8c1a7d0d47 100644 --- a/src/overlay025/ov25_02255090.c +++ b/src/overlay025/ov25_02255090.c @@ -8,12 +8,12 @@ #include "overlay025/struct_ov25_02255224_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "pokemon_icon.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov25_02255224_t { u32 unk_00; diff --git a/src/overlay025/ov25_02255540.c b/src/overlay025/ov25_02255540.c index 201888a6ca..3503733a96 100644 --- a/src/overlay025/ov25_02255540.c +++ b/src/overlay025/ov25_02255540.c @@ -8,8 +8,8 @@ #include "overlay025/struct_ov25_022558C4_decl.h" #include "overlay025/struct_ov25_02255958.h" +#include "graphics.h" #include "heap.h" -#include "unk_02006E3C.h" struct UnkStruct_ov25_022558C4_t { const NNSG2dCellDataBank *unk_00; diff --git a/src/overlay026/ov26_02256404.c b/src/overlay026/ov26_02256404.c index 04cff76c43..b0e8b06f85 100644 --- a/src/overlay026/ov26_02256404.c +++ b/src/overlay026/ov26_02256404.c @@ -11,9 +11,9 @@ #include "overlay026/struct_ov26_02256404_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov26_02256404_t { const UnkStruct_ov26_02256404_1 *unk_00; diff --git a/src/overlay027/ov27_0225680C.c b/src/overlay027/ov27_0225680C.c index 11482b34c6..81bccd4981 100644 --- a/src/overlay027/ov27_0225680C.c +++ b/src/overlay027/ov27_0225680C.c @@ -17,10 +17,10 @@ #include "overlay027/struct_ov27_0225680C_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" typedef struct { u16 unk_00; diff --git a/src/overlay028/ov28_0225697C.c b/src/overlay028/ov28_0225697C.c index 00b2b076b9..f070ee9408 100644 --- a/src/overlay028/ov28_0225697C.c +++ b/src/overlay028/ov28_0225697C.c @@ -13,9 +13,9 @@ #include "overlay028/struct_ov28_0225697C_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov28_0225697C_t { const UnkStruct_ov28_0225697C_1 *unk_00; diff --git a/src/overlay029/ov29_022566C8.c b/src/overlay029/ov29_022566C8.c index 8ab4dbf203..9210903648 100644 --- a/src/overlay029/ov29_022566C8.c +++ b/src/overlay029/ov29_022566C8.c @@ -17,9 +17,9 @@ #include "overlay029/struct_ov29_022566C8_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_02099D44.h" struct UnkStruct_ov29_022566C8_t { diff --git a/src/overlay030/ov30_022563EC.c b/src/overlay030/ov30_022563EC.c index 3886362098..03adfbfa7f 100644 --- a/src/overlay030/ov30_022563EC.c +++ b/src/overlay030/ov30_022563EC.c @@ -16,10 +16,10 @@ #include "overlay030/struct_ov30_022563EC_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov30_022563EC_t { const UnkStruct_ov30_022563EC_1 *unk_00; diff --git a/src/overlay032/ov32_02256470.c b/src/overlay032/ov32_02256470.c index 5100a74a38..4b6745524f 100644 --- a/src/overlay032/ov32_02256470.c +++ b/src/overlay032/ov32_02256470.c @@ -17,13 +17,13 @@ #include "overlay032/struct_ov32_02256470_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "item.h" #include "narc.h" #include "pokemon_icon.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" typedef struct { UnkStruct_ov32_02256470 *unk_00; diff --git a/src/overlay033/ov33_02256474.c b/src/overlay033/ov33_02256474.c index 5ebbf303e2..f3172a3a8c 100644 --- a/src/overlay033/ov33_02256474.c +++ b/src/overlay033/ov33_02256474.c @@ -18,6 +18,7 @@ #include "bg_window.h" #include "core_sys.h" +#include "graphics.h" #include "heap.h" #include "inlines.h" #include "narc.h" @@ -25,7 +26,6 @@ #include "pokemon_icon.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_0201D15C.h" typedef struct { diff --git a/src/overlay034/ov34_02256540.c b/src/overlay034/ov34_02256540.c index bd32b04283..6b0762f012 100644 --- a/src/overlay034/ov34_02256540.c +++ b/src/overlay034/ov34_02256540.c @@ -16,9 +16,9 @@ #include "overlay034/struct_ov34_02256540_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov34_02256540_t { const UnkStruct_ov34_02256540_1 *unk_00; diff --git a/src/overlay035/ov35_02256410.c b/src/overlay035/ov35_02256410.c index 976cc10725..9c5b172b58 100644 --- a/src/overlay035/ov35_02256410.c +++ b/src/overlay035/ov35_02256410.c @@ -17,9 +17,9 @@ #include "overlay035/struct_ov35_02256410_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov35_02256410_t { const UnkStruct_ov35_02256410_1 *unk_00; diff --git a/src/overlay036/ov36_02256404.c b/src/overlay036/ov36_02256404.c index ffe2b8d196..f0196a0691 100644 --- a/src/overlay036/ov36_02256404.c +++ b/src/overlay036/ov36_02256404.c @@ -14,9 +14,9 @@ #include "overlay036/poketch_app_pedometer.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov36_02256404_t { const UnkStruct_ov36_02256404_1 *unk_00; diff --git a/src/overlay037/ov37_022563D4.c b/src/overlay037/ov37_022563D4.c index 81b2f7208f..4371eb006d 100644 --- a/src/overlay037/ov37_022563D4.c +++ b/src/overlay037/ov37_022563D4.c @@ -17,9 +17,9 @@ #include "overlay037/struct_ov37_022563D4_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov37_022563D4_t { const UnkStruct_ov37_022563D4_1 *unk_00; diff --git a/src/overlay038/ov38_0225632C.c b/src/overlay038/ov38_0225632C.c index 6e79320a9d..fd191e8cab 100644 --- a/src/overlay038/ov38_0225632C.c +++ b/src/overlay038/ov38_0225632C.c @@ -11,9 +11,9 @@ #include "overlay038/struct_ov38_0225632C_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov38_0225632C_t { const UnkStruct_ov38_0225632C_1 *unk_00; diff --git a/src/overlay039/ov39_022563DC.c b/src/overlay039/ov39_022563DC.c index f0f6d648d3..c252d1ac91 100644 --- a/src/overlay039/ov39_022563DC.c +++ b/src/overlay039/ov39_022563DC.c @@ -11,9 +11,9 @@ #include "overlay039/struct_ov39_022563DC_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov39_022563DC_t { const UnkStruct_ov39_022563DC_1 *unk_00; diff --git a/src/overlay040/ov40_0225645C.c b/src/overlay040/ov40_0225645C.c index 25f8aaba45..54265fb3d3 100644 --- a/src/overlay040/ov40_0225645C.c +++ b/src/overlay040/ov40_0225645C.c @@ -17,12 +17,12 @@ #include "overlay040/struct_ov40_0225645C_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "pokemon.h" #include "pokemon_icon.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov40_0225645C_t { const UnkStruct_ov40_0225645C_1 *unk_00; diff --git a/src/overlay041/ov41_022567B0.c b/src/overlay041/ov41_022567B0.c index 143ab829f6..d7b57da119 100644 --- a/src/overlay041/ov41_022567B0.c +++ b/src/overlay041/ov41_022567B0.c @@ -17,9 +17,9 @@ #include "overlay041/struct_ov41_022567B0_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_0201D15C.h" #include "unk_02099D44.h" diff --git a/src/overlay042/ov42_022563D4.c b/src/overlay042/ov42_022563D4.c index 177fdfa846..4d05e581d2 100644 --- a/src/overlay042/ov42_022563D4.c +++ b/src/overlay042/ov42_022563D4.c @@ -17,9 +17,9 @@ #include "overlay042/struct_ov42_022563D4_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" static fx32 Unk_ov42_02256720 = 0; static fx32 Unk_ov42_02256724 = 0; diff --git a/src/overlay043/ov43_02256544.c b/src/overlay043/ov43_02256544.c index ecb55e80f7..2157ff421a 100644 --- a/src/overlay043/ov43_02256544.c +++ b/src/overlay043/ov43_02256544.c @@ -18,12 +18,12 @@ #include "bg_window.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "strbuf.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" struct UnkStruct_ov43_02256544_t { const UnkStruct_ov43_02256544_1 *unk_00; diff --git a/src/overlay044/ov44_022565BC.c b/src/overlay044/ov44_022565BC.c index 062b01f047..b84694b456 100644 --- a/src/overlay044/ov44_022565BC.c +++ b/src/overlay044/ov44_022565BC.c @@ -17,11 +17,11 @@ #include "overlay044/struct_ov44_022565BC_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "pokemon.h" #include "pokemon_icon.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov44_022565BC_t { const UnkStruct_ov44_022565BC_1 *unk_00; diff --git a/src/overlay045/ov45_022566EC.c b/src/overlay045/ov45_022566EC.c index 61f42b0085..40914e0e50 100644 --- a/src/overlay045/ov45_022566EC.c +++ b/src/overlay045/ov45_022566EC.c @@ -17,10 +17,10 @@ #include "overlay045/struct_ov45_022566EC_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" struct UnkStruct_ov45_022566EC_t { const UnkStruct_ov45_022566EC_1 *unk_00; diff --git a/src/overlay046/ov46_02256BCC.c b/src/overlay046/ov46_02256BCC.c index 838092acaf..6ffb28123e 100644 --- a/src/overlay046/ov46_02256BCC.c +++ b/src/overlay046/ov46_02256BCC.c @@ -17,9 +17,9 @@ #include "overlay046/struct_ov46_02256BCC_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov46_02256BCC_t { const UnkStruct_ov46_02256BCC_1 *unk_00; diff --git a/src/overlay047/ov47_02256634.c b/src/overlay047/ov47_02256634.c index 8057a43a1e..326ea29b11 100644 --- a/src/overlay047/ov47_02256634.c +++ b/src/overlay047/ov47_02256634.c @@ -17,10 +17,10 @@ #include "overlay047/struct_ov47_02256634_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov47_02256634_t { const UnkStruct_ov47_02256634_1 *unk_00; diff --git a/src/overlay048/ov48_0225650C.c b/src/overlay048/ov48_0225650C.c index eec8f3b902..5e84db3729 100644 --- a/src/overlay048/ov48_0225650C.c +++ b/src/overlay048/ov48_0225650C.c @@ -18,13 +18,13 @@ #include "overlay048/struct_ov48_0225650C_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "strbuf.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" struct UnkStruct_ov48_0225650C_t { const UnkStruct_ov48_0225650C_1 *unk_00; diff --git a/src/overlay049/ov49_022563D4.c b/src/overlay049/ov49_022563D4.c index 37aa778ba8..0da542333c 100644 --- a/src/overlay049/ov49_022563D4.c +++ b/src/overlay049/ov49_022563D4.c @@ -17,9 +17,9 @@ #include "overlay049/struct_ov49_022563D4_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov49_022563D4_t { const UnkStruct_ov49_022563D4_1 *unk_00; diff --git a/src/overlay050/ov50_02256510.c b/src/overlay050/ov50_02256510.c index 910fad3d55..c0825a043d 100644 --- a/src/overlay050/ov50_02256510.c +++ b/src/overlay050/ov50_02256510.c @@ -16,9 +16,9 @@ #include "overlay050/struct_ov50_02256510_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov50_02256510_t { const UnkStruct_ov50_02256510_1 *unk_00; diff --git a/src/overlay051/ov51_0225632C.c b/src/overlay051/ov51_0225632C.c index dc75572f34..ce465d5ee1 100644 --- a/src/overlay051/ov51_0225632C.c +++ b/src/overlay051/ov51_0225632C.c @@ -11,9 +11,9 @@ #include "overlay051/struct_ov51_0225632C_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov51_0225632C_t { const UnkStruct_ov51_0225632C_1 *unk_00; diff --git a/src/overlay052/ov52_02256694.c b/src/overlay052/ov52_02256694.c index 976ff7cdde..0910cbad09 100644 --- a/src/overlay052/ov52_02256694.c +++ b/src/overlay052/ov52_02256694.c @@ -18,12 +18,12 @@ #include "bg_window.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "strbuf.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" struct UnkStruct_ov52_02256694_t { const UnkStruct_ov52_02256694_1 *unk_00; diff --git a/src/overlay053/ov53_02256420.c b/src/overlay053/ov53_02256420.c index 5d96c08028..eec22fe405 100644 --- a/src/overlay053/ov53_02256420.c +++ b/src/overlay053/ov53_02256420.c @@ -17,10 +17,10 @@ #include "overlay053/struct_ov53_02256420_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "pokemon_icon.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_0201D15C.h" struct UnkStruct_ov53_02256420_t { diff --git a/src/overlay055/ov55_0225632C.c b/src/overlay055/ov55_0225632C.c index 15d10b11d3..97a748dfd8 100644 --- a/src/overlay055/ov55_0225632C.c +++ b/src/overlay055/ov55_0225632C.c @@ -10,9 +10,9 @@ #include "overlay055/struct_ov55_0225632C_decl.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" struct UnkStruct_ov55_0225632C_t { const UnkStruct_ov55_0225632C_1 *unk_00; diff --git a/src/overlay056/ov56_022561C0.c b/src/overlay056/ov56_022561C0.c index d784ef5913..2663b4d5f5 100644 --- a/src/overlay056/ov56_022561C0.c +++ b/src/overlay056/ov56_022561C0.c @@ -19,6 +19,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -33,7 +34,6 @@ #include "trainer_info.h" #include "unk_02005474.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_02014A84.h" diff --git a/src/overlay058/ov58_021D0D80.c b/src/overlay058/ov58_021D0D80.c index f53c50a849..53450e29e8 100644 --- a/src/overlay058/ov58_021D0D80.c +++ b/src/overlay058/ov58_021D0D80.c @@ -22,6 +22,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "journal.h" @@ -36,7 +37,6 @@ #include "trainer_info.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay059/ov59_021D0D80.c b/src/overlay059/ov59_021D0D80.c index 32bb8c0c3f..cf300bd20c 100644 --- a/src/overlay059/ov59_021D0D80.c +++ b/src/overlay059/ov59_021D0D80.c @@ -23,6 +23,7 @@ #include "font.h" #include "game_options.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "journal.h" @@ -40,7 +41,6 @@ #include "unk_02001AF4.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay061/ov61_0222BF44.c b/src/overlay061/ov61_0222BF44.c index 55b59cf338..39409ba3dc 100644 --- a/src/overlay061/ov61_0222BF44.c +++ b/src/overlay061/ov61_0222BF44.c @@ -20,6 +20,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "inlines.h" @@ -32,7 +33,6 @@ #include "string_template.h" #include "text.h" #include "unk_02001AF4.h" -#include "unk_02006E3C.h" #include "unk_0200A784.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" diff --git a/src/overlay062/ov62_022300D8.c b/src/overlay062/ov62_022300D8.c index c8641bfc3c..bee32b7512 100644 --- a/src/overlay062/ov62_022300D8.c +++ b/src/overlay062/ov62_022300D8.c @@ -20,6 +20,7 @@ #include "overlay062/struct_ov62_022312B0.h" #include "bg_window.h" +#include "graphics.h" #include "message.h" #include "narc.h" #include "palette.h" @@ -28,7 +29,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" #include "unk_0201D15C.h" diff --git a/src/overlay062/ov62_02231690.c b/src/overlay062/ov62_02231690.c index 6ad80147b8..3298b2792b 100644 --- a/src/overlay062/ov62_02231690.c +++ b/src/overlay062/ov62_02231690.c @@ -36,6 +36,7 @@ #include "enums.h" #include "font.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -50,7 +51,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" diff --git a/src/overlay062/ov62_02234A10.c b/src/overlay062/ov62_02234A10.c index ed701bfb3d..4ffeecc9e9 100644 --- a/src/overlay062/ov62_02234A10.c +++ b/src/overlay062/ov62_02234A10.c @@ -12,6 +12,7 @@ #include "overlay062/struct_ov62_02235008.h" #include "bg_window.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -20,7 +21,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" #include "unk_02012744.h" diff --git a/src/overlay062/ov62_02235E64.c b/src/overlay062/ov62_02235E64.c index 1fd341a003..8bee644d7b 100644 --- a/src/overlay062/ov62_02235E64.c +++ b/src/overlay062/ov62_02235E64.c @@ -14,6 +14,7 @@ #include "overlay062/struct_ov62_02233F74.h" #include "bg_window.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -22,7 +23,6 @@ #include "strbuf.h" #include "text.h" #include "touch_screen.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" #include "unk_02012744.h" diff --git a/src/overlay062/ov62_02236CBC.c b/src/overlay062/ov62_02236CBC.c index 4b8b3cc17d..a43b122e25 100644 --- a/src/overlay062/ov62_02236CBC.c +++ b/src/overlay062/ov62_02236CBC.c @@ -15,13 +15,13 @@ #include "overlay062/struct_ov62_022312B0.h" #include "bg_window.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" #include "palette.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" #include "unk_0201D15C.h" diff --git a/src/overlay062/ov62_02237D24.c b/src/overlay062/ov62_02237D24.c index 44780c72c8..22ca7a3297 100644 --- a/src/overlay062/ov62_02237D24.c +++ b/src/overlay062/ov62_02237D24.c @@ -32,6 +32,7 @@ #include "bg_window.h" #include "font.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -41,7 +42,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" #include "unk_02017728.h" diff --git a/src/overlay062/ov62_02239D60.c b/src/overlay062/ov62_02239D60.c index 6a390f09d6..df6664d695 100644 --- a/src/overlay062/ov62_02239D60.c +++ b/src/overlay062/ov62_02239D60.c @@ -34,6 +34,7 @@ #include "bg_window.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -46,7 +47,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" diff --git a/src/overlay062/ov62_0223CAEC.c b/src/overlay062/ov62_0223CAEC.c index 42a357058b..5edafe6af4 100644 --- a/src/overlay062/ov62_0223CAEC.c +++ b/src/overlay062/ov62_0223CAEC.c @@ -24,6 +24,7 @@ #include "bg_window.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -35,7 +36,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" #include "unk_02023FCC.h" diff --git a/src/overlay062/ov62_0223DFA8.c b/src/overlay062/ov62_0223DFA8.c index af87592043..4a0fccc9b7 100644 --- a/src/overlay062/ov62_0223DFA8.c +++ b/src/overlay062/ov62_0223DFA8.c @@ -26,6 +26,7 @@ #include "bg_window.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -35,7 +36,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" #include "unk_02012744.h" diff --git a/src/overlay062/ov62_02241204.c b/src/overlay062/ov62_02241204.c index 63032d64c6..181ddb7892 100644 --- a/src/overlay062/ov62_02241204.c +++ b/src/overlay062/ov62_02241204.c @@ -35,6 +35,7 @@ #include "bg_window.h" #include "enums.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -45,7 +46,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" #include "unk_02012744.h" diff --git a/src/overlay062/ov62_02246B00.c b/src/overlay062/ov62_02246B00.c index ae54ddcc3c..388d1e522f 100644 --- a/src/overlay062/ov62_02246B00.c +++ b/src/overlay062/ov62_02246B00.c @@ -14,13 +14,13 @@ #include "bg_window.h" #include "game_options.h" +#include "graphics.h" #include "heap.h" #include "inlines.h" #include "narc.h" #include "palette.h" #include "strbuf.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_02023FCC.h" diff --git a/src/overlay062/ov62_02247D74.c b/src/overlay062/ov62_02247D74.c index f1cfd318d0..ee2b8a89e3 100644 --- a/src/overlay062/ov62_02247D74.c +++ b/src/overlay062/ov62_02247D74.c @@ -10,6 +10,7 @@ #include "overlay062/ov62_const_funcptr_tables.h" #include "bg_window.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -18,7 +19,6 @@ #include "string_template.h" #include "text.h" #include "touch_screen.h" -#include "unk_02006E3C.h" #include "unk_02030A80.h" typedef struct { diff --git a/src/overlay063/ov63_0222D1C0.c b/src/overlay063/ov63_0222D1C0.c index 0b86d242f4..a78fe6cde4 100644 --- a/src/overlay063/ov63_0222D1C0.c +++ b/src/overlay063/ov63_0222D1C0.c @@ -11,8 +11,8 @@ #include "overlay065/struct_ov65_0223582C.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" typedef struct UnkStruct_ov63_0222D1C0_t { diff --git a/src/overlay064/ov64_0222DCE0.c b/src/overlay064/ov64_0222DCE0.c index 16e3658a4a..b0db8c99cc 100644 --- a/src/overlay064/ov64_0222DCE0.c +++ b/src/overlay064/ov64_0222DCE0.c @@ -31,6 +31,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "inlines.h" @@ -50,7 +51,6 @@ #include "unk_0200112C.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay065/ov65_0222DCE0.c b/src/overlay065/ov65_0222DCE0.c index 60dc4cf1e1..94e308fc36 100644 --- a/src/overlay065/ov65_0222DCE0.c +++ b/src/overlay065/ov65_0222DCE0.c @@ -40,6 +40,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "inlines.h" @@ -65,7 +66,6 @@ #include "unk_02001AF4.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay065/ov65_02235060.c b/src/overlay065/ov65_02235060.c index e08e3b928c..3995ab4e06 100644 --- a/src/overlay065/ov65_02235060.c +++ b/src/overlay065/ov65_02235060.c @@ -25,10 +25,10 @@ #include "bg_window.h" #include "cell_actor.h" #include "core_sys.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "sprite_resource.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0201D15C.h" diff --git a/src/overlay065/ov65_0223648C.c b/src/overlay065/ov65_0223648C.c index f7fd3bb5b9..957de17553 100644 --- a/src/overlay065/ov65_0223648C.c +++ b/src/overlay065/ov65_0223648C.c @@ -32,6 +32,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "journal.h" @@ -47,7 +48,6 @@ #include "unk_02001AF4.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200DA60.h" diff --git a/src/overlay066/ov66_022343A8.c b/src/overlay066/ov66_022343A8.c index 6594720386..bd82b8ac7e 100644 --- a/src/overlay066/ov66_022343A8.c +++ b/src/overlay066/ov66_022343A8.c @@ -20,10 +20,10 @@ #include "easy3d.h" #include "easy3d_object.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "resource_collection.h" -#include "unk_02006E3C.h" #include "unk_0201CED8.h" #include "unk_02020AEC.h" #include "unk_0202414C.h" diff --git a/src/overlay066/ov66_02234EA8.c b/src/overlay066/ov66_02234EA8.c index 1ea5a960df..bcfa694a18 100644 --- a/src/overlay066/ov66_02234EA8.c +++ b/src/overlay066/ov66_02234EA8.c @@ -8,9 +8,9 @@ #include "overlay069/struct_ov69_0225C980.h" #include "overlay092/struct_ov92_021D1530.h" +#include "graphics.h" #include "heap.h" #include "narc.h" -#include "unk_02006E3C.h" #include "unk_020996D0.h" static void ov66_02234F2C(NARC *param0, u32 param1, u16 param2, u8 param3, fx32 *param4); diff --git a/src/overlay067/ov67_0225C700.c b/src/overlay067/ov67_0225C700.c index 3d7df0c989..a45156997e 100644 --- a/src/overlay067/ov67_0225C700.c +++ b/src/overlay067/ov67_0225C700.c @@ -22,6 +22,7 @@ #include "font.h" #include "game_options.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "inlines.h" @@ -36,7 +37,6 @@ #include "text.h" #include "unk_02001AF4.h" #include "unk_020041CC.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" diff --git a/src/overlay068/ov68_0225C700.c b/src/overlay068/ov68_0225C700.c index 6df423a879..a19f213c35 100644 --- a/src/overlay068/ov68_0225C700.c +++ b/src/overlay068/ov68_0225C700.c @@ -25,6 +25,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -39,7 +40,6 @@ #include "trainer_info.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay069/ov69_0225C700.c b/src/overlay069/ov69_0225C700.c index 5ba2a6f025..3d2f48a9ef 100644 --- a/src/overlay069/ov69_0225C700.c +++ b/src/overlay069/ov69_0225C700.c @@ -27,6 +27,7 @@ #include "easy3d_object.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -41,7 +42,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay070/ov70_0225C700.c b/src/overlay070/ov70_0225C700.c index 5013d2af4d..6c786df91a 100644 --- a/src/overlay070/ov70_0225C700.c +++ b/src/overlay070/ov70_0225C700.c @@ -7,10 +7,10 @@ #include "easy3d.h" #include "easy3d_object.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "resource_collection.h" -#include "unk_02006E3C.h" #include "unk_0201CED8.h" void ov70_0225C700(const UnkStruct_ov63_0222CC3C *param0, VecFx32 *param1) diff --git a/src/overlay070/ov70_0225C858.c b/src/overlay070/ov70_0225C858.c index 6f3f08e6d5..f06e517b1b 100644 --- a/src/overlay070/ov70_0225C858.c +++ b/src/overlay070/ov70_0225C858.c @@ -6,8 +6,8 @@ #include "overlay063/ov63_0222BCE8.h" #include "overlay063/struct_ov63_0222BCE8_decl.h" +#include "graphics.h" #include "heap.h" -#include "unk_02006E3C.h" typedef struct UnkStruct_ov70_0225C894_t { UnkStruct_ov63_0222BCE8 *unk_00; diff --git a/src/overlay070/ov70_0225D9A4.c b/src/overlay070/ov70_0225D9A4.c index 4655777186..0b8f1c05bf 100644 --- a/src/overlay070/ov70_0225D9A4.c +++ b/src/overlay070/ov70_0225D9A4.c @@ -47,6 +47,7 @@ #include "error_handling.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -66,7 +67,6 @@ #include "trainer_info.h" #include "unk_0200112C.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay070/ov70_02260B44.c b/src/overlay070/ov70_02260B44.c index 49a219996c..654a630767 100644 --- a/src/overlay070/ov70_02260B44.c +++ b/src/overlay070/ov70_02260B44.c @@ -11,9 +11,9 @@ #include "easy3d.h" #include "easy3d_object.h" +#include "graphics.h" #include "heap.h" #include "narc.h" -#include "unk_02006E3C.h" #include "unk_0201D15C.h" typedef struct { diff --git a/src/overlay070/ov70_02269190.c b/src/overlay070/ov70_02269190.c index 29fc328131..f86613848e 100644 --- a/src/overlay070/ov70_02269190.c +++ b/src/overlay070/ov70_02269190.c @@ -16,10 +16,10 @@ #include "core_sys.h" #include "easy3d_object.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" typedef struct { u16 unk_00; diff --git a/src/overlay071/ov71_0223B140.c b/src/overlay071/ov71_0223B140.c index bbe271c79c..0cf3573672 100644 --- a/src/overlay071/ov71_0223B140.c +++ b/src/overlay071/ov71_0223B140.c @@ -14,6 +14,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "core_sys.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -23,7 +24,6 @@ #include "touch_screen.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200A784.h" #include "unk_0200F174.h" #include "unk_02017728.h" diff --git a/src/overlay072/ov72_0223D7A0.c b/src/overlay072/ov72_0223D7A0.c index 3979810e61..af0aa35fae 100644 --- a/src/overlay072/ov72_0223D7A0.c +++ b/src/overlay072/ov72_0223D7A0.c @@ -24,6 +24,7 @@ #include "font.h" #include "game_options.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "inlines.h" @@ -39,7 +40,6 @@ #include "touch_screen.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay073/ov73_021D0D80.c b/src/overlay073/ov73_021D0D80.c index fda41afa93..bccd5fd790 100644 --- a/src/overlay073/ov73_021D0D80.c +++ b/src/overlay073/ov73_021D0D80.c @@ -18,6 +18,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -37,7 +38,6 @@ #include "unk_0200112C.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200A9DC.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" diff --git a/src/overlay073/ov73_021D3250.c b/src/overlay073/ov73_021D3250.c index e93de2dfb2..26fd07f72c 100644 --- a/src/overlay073/ov73_021D3250.c +++ b/src/overlay073/ov73_021D3250.c @@ -6,6 +6,7 @@ #include "bg_window.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "hardware_palette.h" #include "heap.h" @@ -15,7 +16,6 @@ #include "strbuf.h" #include "text.h" #include "unk_020041CC.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" diff --git a/src/overlay076/ov76_0223B870.c b/src/overlay076/ov76_0223B870.c index 0e1003f35c..dd9c993617 100644 --- a/src/overlay076/ov76_0223B870.c +++ b/src/overlay076/ov76_0223B870.c @@ -26,6 +26,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -39,7 +40,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_02001AF4.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" diff --git a/src/overlay077/ov77_021D0D80.c b/src/overlay077/ov77_021D0D80.c index da960e8266..c41e3da837 100644 --- a/src/overlay077/ov77_021D0D80.c +++ b/src/overlay077/ov77_021D0D80.c @@ -13,6 +13,7 @@ #include "easy3d.h" #include "easy3d_object.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -23,7 +24,6 @@ #include "unk_02000C88.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200A9DC.h" #include "unk_0200F174.h" #include "unk_02017728.h" diff --git a/src/overlay077/ov77_021D25B0.c b/src/overlay077/ov77_021D25B0.c index d7e8640273..a7bd436e79 100644 --- a/src/overlay077/ov77_021D25B0.c +++ b/src/overlay077/ov77_021D25B0.c @@ -18,6 +18,7 @@ #include "camera.h" #include "core_sys.h" #include "easy3d.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" @@ -26,7 +27,6 @@ #include "sys_task_manager.h" #include "unk_02000C88.h" #include "unk_020041CC.h" -#include "unk_02006E3C.h" #include "unk_0200A784.h" #include "unk_0200A9DC.h" #include "unk_0200F174.h" diff --git a/src/overlay081/ov81_021D0D80.c b/src/overlay081/ov81_021D0D80.c index 602c7b2528..a88c10d49e 100644 --- a/src/overlay081/ov81_021D0D80.c +++ b/src/overlay081/ov81_021D0D80.c @@ -12,6 +12,7 @@ #include "bg_window.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "journal.h" @@ -25,7 +26,6 @@ #include "trainer_info.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_020393C8.h" diff --git a/src/overlay083/ov83_0223D6A8.c b/src/overlay083/ov83_0223D6A8.c index 087fbbaa84..cfe68ba9c0 100644 --- a/src/overlay083/ov83_0223D6A8.c +++ b/src/overlay083/ov83_0223D6A8.c @@ -40,6 +40,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" @@ -50,7 +51,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200DA60.h" diff --git a/src/overlay084/ov84_0223B5A0.c b/src/overlay084/ov84_0223B5A0.c index 66a087d433..ab6f9a7e11 100644 --- a/src/overlay084/ov84_0223B5A0.c +++ b/src/overlay084/ov84_0223B5A0.c @@ -25,6 +25,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -42,7 +43,6 @@ #include "unk_02001AF4.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay085/ov85_02241440.c b/src/overlay085/ov85_02241440.c index a99cc5a7f8..f0983af222 100644 --- a/src/overlay085/ov85_02241440.c +++ b/src/overlay085/ov85_02241440.c @@ -15,6 +15,7 @@ #include "camera.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -23,7 +24,6 @@ #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200C440.h" #include "unk_0200F174.h" #include "unk_02017728.h" diff --git a/src/overlay086/ov86_0223B140.c b/src/overlay086/ov86_0223B140.c index 8b1f702a3a..12e1ab6148 100644 --- a/src/overlay086/ov86_0223B140.c +++ b/src/overlay086/ov86_0223B140.c @@ -20,6 +20,7 @@ #include "core_sys.h" #include "enums.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "inlines.h" @@ -37,7 +38,6 @@ #include "trainer_info.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" diff --git a/src/overlay087/ov87_021D106C.c b/src/overlay087/ov87_021D106C.c index d9e4088720..c5a0303694 100644 --- a/src/overlay087/ov87_021D106C.c +++ b/src/overlay087/ov87_021D106C.c @@ -16,6 +16,7 @@ #include "cell_actor.h" #include "enums.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -25,7 +26,6 @@ #include "text.h" #include "unk_02005474.h" #include "unk_02006224.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200DA60.h" diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index 0154320ca3..a48f26e732 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -31,6 +31,7 @@ #include "font.h" #include "game_options.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "inlines.h" @@ -58,7 +59,6 @@ #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006224.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay091/ov91_021D0D80.c b/src/overlay091/ov91_021D0D80.c index c83b39648b..03032e265c 100644 --- a/src/overlay091/ov91_021D0D80.c +++ b/src/overlay091/ov91_021D0D80.c @@ -25,6 +25,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -40,7 +41,6 @@ #include "unk_0200112C.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" diff --git a/src/overlay092/ov92_021D0D80.c b/src/overlay092/ov92_021D0D80.c index 7bb5d52eb8..9b61dcd206 100644 --- a/src/overlay092/ov92_021D0D80.c +++ b/src/overlay092/ov92_021D0D80.c @@ -20,6 +20,7 @@ #include "easy3d.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -34,7 +35,6 @@ #include "unk_0200112C.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02013A04.h" diff --git a/src/overlay094/ov94_0223BCB0.c b/src/overlay094/ov94_0223BCB0.c index 2a54583ef4..3e17485241 100644 --- a/src/overlay094/ov94_0223BCB0.c +++ b/src/overlay094/ov94_0223BCB0.c @@ -26,6 +26,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "inlines.h" @@ -38,7 +39,6 @@ #include "trainer_info.h" #include "unk_02001AF4.h" #include "unk_020041CC.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay094/ov94_0223C610.c b/src/overlay094/ov94_0223C610.c index e1bbf36dbc..e7df6e126a 100644 --- a/src/overlay094/ov94_0223C610.c +++ b/src/overlay094/ov94_0223C610.c @@ -14,6 +14,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "message.h" #include "narc.h" @@ -23,7 +24,6 @@ #include "unk_02001AF4.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020393C8.h" diff --git a/src/overlay094/ov94_0223D0C4.c b/src/overlay094/ov94_0223D0C4.c index 993882b7e9..2af712a611 100644 --- a/src/overlay094/ov94_0223D0C4.c +++ b/src/overlay094/ov94_0223D0C4.c @@ -20,6 +20,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "heap.h" #include "item.h" #include "message.h" @@ -32,7 +33,6 @@ #include "text.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020131EC.h" diff --git a/src/overlay094/ov94_0223DC04.c b/src/overlay094/ov94_0223DC04.c index 57ebbe905d..dc1a1d61ab 100644 --- a/src/overlay094/ov94_0223DC04.c +++ b/src/overlay094/ov94_0223DC04.c @@ -18,6 +18,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "message.h" #include "message_util.h" #include "pokemon.h" @@ -26,7 +27,6 @@ #include "text.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020393C8.h" diff --git a/src/overlay094/ov94_0223E46C.c b/src/overlay094/ov94_0223E46C.c index 07cc27db46..4f3b03d439 100644 --- a/src/overlay094/ov94_0223E46C.c +++ b/src/overlay094/ov94_0223E46C.c @@ -20,6 +20,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "heap.h" #include "inlines.h" #include "message.h" @@ -30,7 +31,6 @@ #include "unk_0200112C.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02013A04.h" diff --git a/src/overlay094/ov94_0223FB48.c b/src/overlay094/ov94_0223FB48.c index ca12de1dd8..2107bce8f2 100644 --- a/src/overlay094/ov94_0223FB48.c +++ b/src/overlay094/ov94_0223FB48.c @@ -22,6 +22,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -35,7 +36,6 @@ #include "text.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02013A04.h" diff --git a/src/overlay094/ov94_022414B8.c b/src/overlay094/ov94_022414B8.c index fe60e8abc3..daa2721e18 100644 --- a/src/overlay094/ov94_022414B8.c +++ b/src/overlay094/ov94_022414B8.c @@ -28,6 +28,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "message_util.h" @@ -41,7 +42,6 @@ #include "unk_02001AF4.h" #include "unk_020021B0.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02013A04.h" diff --git a/src/overlay094/ov94_02242AD0.c b/src/overlay094/ov94_02242AD0.c index 60df3cc2a1..e4d1f2d222 100644 --- a/src/overlay094/ov94_02242AD0.c +++ b/src/overlay094/ov94_02242AD0.c @@ -26,6 +26,7 @@ #include "font.h" #include "game_options.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "inlines.h" @@ -36,7 +37,6 @@ #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202CC64.h" diff --git a/src/overlay094/ov94_02243EF8.c b/src/overlay094/ov94_02243EF8.c index 0362ae8668..bb74ac0de2 100644 --- a/src/overlay094/ov94_02243EF8.c +++ b/src/overlay094/ov94_02243EF8.c @@ -8,12 +8,12 @@ #include "overlay094/struct_ov94_0223FD4C.h" #include "cell_actor.h" +#include "graphics.h" #include "heap.h" #include "sys_task_manager.h" #include "touch_screen.h" #include "unk_02005474.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_0205C980.h" typedef struct { diff --git a/src/overlay094/ov94_02244950.c b/src/overlay094/ov94_02244950.c index 825b4dca8e..2fdeb6b16c 100644 --- a/src/overlay094/ov94_02244950.c +++ b/src/overlay094/ov94_02244950.c @@ -13,6 +13,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "inlines.h" #include "message.h" @@ -21,7 +22,6 @@ #include "string_template.h" #include "text.h" #include "unk_02001AF4.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02025CB0.h" diff --git a/src/overlay095/ov95_02246C20.c b/src/overlay095/ov95_02246C20.c index 2c17fc00d6..6567871d3f 100644 --- a/src/overlay095/ov95_02246C20.c +++ b/src/overlay095/ov95_02246C20.c @@ -23,6 +23,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -34,7 +35,6 @@ #include "sys_task_manager.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200F174.h" diff --git a/src/overlay095/ov95_022476F0.c b/src/overlay095/ov95_022476F0.c index 1835bae588..219a2de5a5 100644 --- a/src/overlay095/ov95_022476F0.c +++ b/src/overlay095/ov95_022476F0.c @@ -9,10 +9,10 @@ #include "camera.h" #include "easy3d.h" +#include "graphics.h" #include "heap.h" #include "inlines.h" #include "narc.h" -#include "unk_02006E3C.h" #include "unk_0201CED8.h" struct UnkStruct_ov95_02247958_t { diff --git a/src/overlay095/ov95_02247B6C.c b/src/overlay095/ov95_02247B6C.c index 76e5c9fcec..57e363d80b 100644 --- a/src/overlay095/ov95_02247B6C.c +++ b/src/overlay095/ov95_02247B6C.c @@ -18,6 +18,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -29,7 +30,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" diff --git a/src/overlay095/ov95_02248590.c b/src/overlay095/ov95_02248590.c index 750a84c960..ee171b308e 100644 --- a/src/overlay095/ov95_02248590.c +++ b/src/overlay095/ov95_02248590.c @@ -18,12 +18,12 @@ #include "bg_window.h" #include "cell_actor.h" #include "enums.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_0201D15C.h" #include "unk_0202419C.h" diff --git a/src/overlay095/ov95_02249740.c b/src/overlay095/ov95_02249740.c index 6b15d2b1ca..f8a89aa454 100644 --- a/src/overlay095/ov95_02249740.c +++ b/src/overlay095/ov95_02249740.c @@ -16,12 +16,12 @@ #include "bg_window.h" #include "cell_actor.h" #include "enums.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201D15C.h" diff --git a/src/overlay095/ov95_02249F90.c b/src/overlay095/ov95_02249F90.c index 905dc5feaf..63ce336c3c 100644 --- a/src/overlay095/ov95_02249F90.c +++ b/src/overlay095/ov95_02249F90.c @@ -10,12 +10,12 @@ #include "bg_window.h" #include "enums.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" enum { diff --git a/src/overlay095/ov95_0224A390.c b/src/overlay095/ov95_0224A390.c index 46d8df5bb1..ecdee0fab7 100644 --- a/src/overlay095/ov95_0224A390.c +++ b/src/overlay095/ov95_0224A390.c @@ -16,12 +16,12 @@ #include "bg_window.h" #include "cell_actor.h" #include "enums.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201D15C.h" diff --git a/src/overlay095/ov95_0224ABC0.c b/src/overlay095/ov95_0224ABC0.c index c16223c6a7..c63e3958ef 100644 --- a/src/overlay095/ov95_0224ABC0.c +++ b/src/overlay095/ov95_0224ABC0.c @@ -16,11 +16,11 @@ #include "bg_window.h" #include "enums.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_0202419C.h" diff --git a/src/overlay095/ov95_0224B3D8.c b/src/overlay095/ov95_0224B3D8.c index e0df536ba5..370b29b33d 100644 --- a/src/overlay095/ov95_0224B3D8.c +++ b/src/overlay095/ov95_0224B3D8.c @@ -19,6 +19,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "enums.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -30,7 +31,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" diff --git a/src/overlay096/ov96_0223BCE0.c b/src/overlay096/ov96_0223BCE0.c index f7d17b720b..dcabf62995 100644 --- a/src/overlay096/ov96_0223BCE0.c +++ b/src/overlay096/ov96_0223BCE0.c @@ -20,6 +20,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "inlines.h" #include "message.h" @@ -30,7 +31,6 @@ #include "text.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02025CB0.h" diff --git a/src/overlay097/ov97_0222AE60.c b/src/overlay097/ov97_0222AE60.c index 3e198bc98c..edd9b02ffb 100644 --- a/src/overlay097/ov97_0222AE60.c +++ b/src/overlay097/ov97_0222AE60.c @@ -20,6 +20,7 @@ #include "cell_actor.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -35,7 +36,6 @@ #include "unk_02000C88.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200A784.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" diff --git a/src/overlay097/ov97_0222C174.c b/src/overlay097/ov97_0222C174.c index 1b25de200d..0159f0661b 100644 --- a/src/overlay097/ov97_0222C174.c +++ b/src/overlay097/ov97_0222C174.c @@ -23,6 +23,7 @@ #include "enums.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -38,7 +39,6 @@ #include "unk_02000C88.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0202631C.h" #include "unk_0202DAB4.h" diff --git a/src/overlay097/ov97_0222D30C.c b/src/overlay097/ov97_0222D30C.c index 92829ea6eb..31fc547032 100644 --- a/src/overlay097/ov97_0222D30C.c +++ b/src/overlay097/ov97_0222D30C.c @@ -29,6 +29,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -48,7 +49,6 @@ #include "unk_0200112C.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200DA60.h" diff --git a/src/overlay097/ov97_02230410.c b/src/overlay097/ov97_02230410.c index ed0fbac916..eed7b4033f 100644 --- a/src/overlay097/ov97_02230410.c +++ b/src/overlay097/ov97_02230410.c @@ -26,6 +26,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -44,7 +45,6 @@ #include "unk_02000C88.h" #include "unk_0200112C.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02013A04.h" diff --git a/src/overlay097/ov97_02233B18.c b/src/overlay097/ov97_02233B18.c index d32ab6f047..2ee11641c6 100644 --- a/src/overlay097/ov97_02233B18.c +++ b/src/overlay097/ov97_02233B18.c @@ -27,6 +27,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -47,7 +48,6 @@ #include "unk_02000C88.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay097/ov97_02237694.c b/src/overlay097/ov97_02237694.c index 0d7fe690ac..4567a709a7 100644 --- a/src/overlay097/ov97_02237694.c +++ b/src/overlay097/ov97_02237694.c @@ -21,6 +21,7 @@ #include "cell_actor.h" #include "crypto.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -34,7 +35,6 @@ #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay098/ov98_022471C8.c b/src/overlay098/ov98_022471C8.c index 68d55954de..7d5e3f5876 100644 --- a/src/overlay098/ov98_022471C8.c +++ b/src/overlay098/ov98_022471C8.c @@ -25,6 +25,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "inlines.h" @@ -40,7 +41,6 @@ #include "unk_0200112C.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200A784.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" diff --git a/src/overlay099/ov99_021D1A54.c b/src/overlay099/ov99_021D1A54.c index 5b81558892..2673b4efea 100644 --- a/src/overlay099/ov99_021D1A54.c +++ b/src/overlay099/ov99_021D1A54.c @@ -23,13 +23,13 @@ #include "core_sys.h" #include "easy3d_object.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" #include "palette.h" #include "strbuf.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200A9DC.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" diff --git a/src/overlay099/ov99_021D4134.c b/src/overlay099/ov99_021D4134.c index ae04e0e255..b589c37e58 100644 --- a/src/overlay099/ov99_021D4134.c +++ b/src/overlay099/ov99_021D4134.c @@ -11,9 +11,9 @@ #include "bg_window.h" #include "cell_actor.h" #include "easy3d_object.h" +#include "graphics.h" #include "heap.h" #include "palette.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0201D15C.h" diff --git a/src/overlay100/ov100_021D13E4.c b/src/overlay100/ov100_021D13E4.c index 154a8b54ce..7a01205a04 100644 --- a/src/overlay100/ov100_021D13E4.c +++ b/src/overlay100/ov100_021D13E4.c @@ -18,6 +18,7 @@ #include "bg_window.h" #include "camera.h" #include "easy3d_object.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" @@ -25,7 +26,6 @@ #include "sys_task.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" #include "unk_0201D15C.h" diff --git a/src/overlay100/ov100_021D1C44.c b/src/overlay100/ov100_021D1C44.c index c59daa1514..f855c409b0 100644 --- a/src/overlay100/ov100_021D1C44.c +++ b/src/overlay100/ov100_021D1C44.c @@ -19,6 +19,7 @@ #include "bg_window.h" #include "camera.h" #include "easy3d_object.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "palette.h" @@ -27,7 +28,6 @@ #include "trainer_info.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" #include "unk_0201D15C.h" diff --git a/src/overlay100/ov100_021D2F0C.c b/src/overlay100/ov100_021D2F0C.c index 3552232ae3..b3eefe061b 100644 --- a/src/overlay100/ov100_021D2F0C.c +++ b/src/overlay100/ov100_021D2F0C.c @@ -18,6 +18,7 @@ #include "bg_window.h" #include "camera.h" #include "easy3d_object.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "palette.h" @@ -27,7 +28,6 @@ #include "trainer_info.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_0202419C.h" diff --git a/src/overlay102/ov102_021D0D80.c b/src/overlay102/ov102_021D0D80.c index 447d54bb58..83ec58ec44 100644 --- a/src/overlay102/ov102_021D0D80.c +++ b/src/overlay102/ov102_021D0D80.c @@ -9,6 +9,7 @@ #include "bg_window.h" #include "core_sys.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -19,7 +20,6 @@ #include "string_template.h" #include "text.h" #include "trainer_info.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" diff --git a/src/overlay104/ov104_02237DD8.c b/src/overlay104/ov104_02237DD8.c index bab79bec3d..a43690dad0 100644 --- a/src/overlay104/ov104_02237DD8.c +++ b/src/overlay104/ov104_02237DD8.c @@ -21,6 +21,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" @@ -28,7 +29,6 @@ #include "party.h" #include "pokemon.h" #include "savedata.h" -#include "unk_02006E3C.h" #include "unk_0201D15C.h" #include "unk_02030494.h" #include "unk_0203061C.h" diff --git a/src/overlay104/ov104_0223C2D4.c b/src/overlay104/ov104_0223C2D4.c index becdc9e08a..1e57cb62a3 100644 --- a/src/overlay104/ov104_0223C2D4.c +++ b/src/overlay104/ov104_0223C2D4.c @@ -39,6 +39,7 @@ #include "bg_window.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" @@ -49,7 +50,6 @@ #include "sys_task_manager.h" #include "trainer_info.h" #include "unk_020041CC.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay104/ov104_0223D9E4.c b/src/overlay104/ov104_0223D9E4.c index aaf95cea7d..223b9536e6 100644 --- a/src/overlay104/ov104_0223D9E4.c +++ b/src/overlay104/ov104_0223D9E4.c @@ -5,12 +5,12 @@ #include "bg_window.h" #include "enums.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "palette.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" typedef struct { SysTask *unk_00; diff --git a/src/overlay104/ov104_0223DC7C.c b/src/overlay104/ov104_0223DC7C.c index f73fcde7b6..efe431620a 100644 --- a/src/overlay104/ov104_0223DC7C.c +++ b/src/overlay104/ov104_0223DC7C.c @@ -13,6 +13,7 @@ #include "bg_window.h" #include "cell_actor.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "narc.h" @@ -22,7 +23,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_0200A9DC.h" #include "unk_0200C6E4.h" #include "unk_0200F174.h" diff --git a/src/overlay105/ov105_02241AE0.c b/src/overlay105/ov105_02241AE0.c index 17d8f0cd80..59e7a8c1d3 100644 --- a/src/overlay105/ov105_02241AE0.c +++ b/src/overlay105/ov105_02241AE0.c @@ -37,6 +37,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -54,7 +55,6 @@ #include "trainer_info.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" diff --git a/src/overlay106/ov106_02241AE0.c b/src/overlay106/ov106_02241AE0.c index 4b060177a1..d4500a2d15 100644 --- a/src/overlay106/ov106_02241AE0.c +++ b/src/overlay106/ov106_02241AE0.c @@ -29,6 +29,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -46,7 +47,6 @@ #include "trainer_info.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200C440.h" diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index ef07221c7d..19b29ea494 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -35,6 +35,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -52,7 +53,6 @@ #include "unk_0200112C.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200C440.h" diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index 6ce249b703..5a58a075ad 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -35,6 +35,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -52,7 +53,6 @@ #include "unk_0200112C.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200C440.h" diff --git a/src/overlay108/ov108_02241AE0.c b/src/overlay108/ov108_02241AE0.c index 95be6cc8e3..9a4d72913c 100644 --- a/src/overlay108/ov108_02241AE0.c +++ b/src/overlay108/ov108_02241AE0.c @@ -29,6 +29,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -44,7 +45,6 @@ #include "touch_screen.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200F174.h" diff --git a/src/overlay109/ov109_021D3D50.c b/src/overlay109/ov109_021D3D50.c index 80ad99d96f..31c2a19666 100644 --- a/src/overlay109/ov109_021D3D50.c +++ b/src/overlay109/ov109_021D3D50.c @@ -22,6 +22,7 @@ #include "font.h" #include "game_options.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "journal.h" @@ -40,7 +41,6 @@ #include "unk_02001AF4.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay110/ov110_021D0D80.c b/src/overlay110/ov110_021D0D80.c index 41fde9f545..13d5a0a32c 100644 --- a/src/overlay110/ov110_021D0D80.c +++ b/src/overlay110/ov110_021D0D80.c @@ -15,6 +15,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -26,7 +27,6 @@ #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0202D05C.h" diff --git a/src/overlay111/ov111_021D0D80.c b/src/overlay111/ov111_021D0D80.c index 6f2c408dfa..48bea07e82 100644 --- a/src/overlay111/ov111_021D0D80.c +++ b/src/overlay111/ov111_021D0D80.c @@ -22,6 +22,7 @@ #include "cell_actor.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -36,7 +37,6 @@ #include "touch_screen.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200A784.h" #include "unk_0200C440.h" #include "unk_0200DA60.h" diff --git a/src/overlay112/ov112_0225C700.c b/src/overlay112/ov112_0225C700.c index a443802bc4..2a23940e6f 100644 --- a/src/overlay112/ov112_0225C700.c +++ b/src/overlay112/ov112_0225C700.c @@ -21,6 +21,7 @@ #include "core_sys.h" #include "enums.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -31,7 +32,6 @@ #include "strbuf.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200F174.h" diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index cbdfbb1c61..cb1f3f87e5 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -45,6 +45,7 @@ #include "easy3d_object.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -62,7 +63,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay113/ov113_0225E368.c b/src/overlay113/ov113_0225E368.c index 21a9f50afe..9c7b53b404 100644 --- a/src/overlay113/ov113_0225E368.c +++ b/src/overlay113/ov113_0225E368.c @@ -27,11 +27,11 @@ #include "camera.h" #include "easy3d.h" #include "easy3d_object.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "pokemon.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_0201D15C.h" diff --git a/src/overlay114/ov114_0225C700.c b/src/overlay114/ov114_0225C700.c index d3e018c7f9..2acd15f3e7 100644 --- a/src/overlay114/ov114_0225C700.c +++ b/src/overlay114/ov114_0225C700.c @@ -26,6 +26,7 @@ #include "enums.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -41,7 +42,6 @@ #include "trainer_info.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay115/ov115_02260440.c b/src/overlay115/ov115_02260440.c index bbd7e9ee15..d0eb1543ab 100644 --- a/src/overlay115/ov115_02260440.c +++ b/src/overlay115/ov115_02260440.c @@ -24,10 +24,10 @@ #include "communication_information.h" #include "communication_system.h" #include "core_sys.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "overlay_manager.h" -#include "unk_02006E3C.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" diff --git a/src/overlay115/ov115_02260CEC.c b/src/overlay115/ov115_02260CEC.c index 6cc129342b..076c106f75 100644 --- a/src/overlay115/ov115_02260CEC.c +++ b/src/overlay115/ov115_02260CEC.c @@ -31,6 +31,7 @@ #include "core_sys.h" #include "easy3d_object.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -42,7 +43,6 @@ #include "trainer_info.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/overlay116/ov116_02261870.c b/src/overlay116/ov116_02261870.c index 8c0c1820c4..daab0de656 100644 --- a/src/overlay116/ov116_02261870.c +++ b/src/overlay116/ov116_02261870.c @@ -18,6 +18,7 @@ #include "camera.h" #include "easy3d_object.h" #include "font.h" +#include "graphics.h" #include "inlines.h" #include "message.h" #include "narc.h" @@ -25,7 +26,6 @@ #include "strbuf.h" #include "text.h" #include "trainer_info.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" #include "unk_0202419C.h" diff --git a/src/overlay117/ov117_02260668.c b/src/overlay117/ov117_02260668.c index 3b8ad750be..d59ac21818 100644 --- a/src/overlay117/ov117_02260668.c +++ b/src/overlay117/ov117_02260668.c @@ -30,6 +30,7 @@ #include "easy3d_object.h" #include "enums.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -44,7 +45,6 @@ #include "text.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/overlay117/ov117_02263AF0.c b/src/overlay117/ov117_02263AF0.c index e06ea0c4f0..c3b623a230 100644 --- a/src/overlay117/ov117_02263AF0.c +++ b/src/overlay117/ov117_02263AF0.c @@ -35,13 +35,13 @@ #include "communication_system.h" #include "error_handling.h" #include "font.h" +#include "graphics.h" #include "message.h" #include "narc.h" #include "palette.h" #include "strbuf.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_02012744.h" #include "unk_0201D15C.h" diff --git a/src/overlay119/ov119_021D0D80.c b/src/overlay119/ov119_021D0D80.c index f8f6c88f38..2be2eb80a7 100644 --- a/src/overlay119/ov119_021D0D80.c +++ b/src/overlay119/ov119_021D0D80.c @@ -24,6 +24,7 @@ #include "bg_window.h" #include "camera.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -34,7 +35,6 @@ #include "string_template.h" #include "text.h" #include "unk_02001AF4.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/palette.c b/src/palette.c index 7a5ba73757..72a2d1d97c 100644 --- a/src/palette.c +++ b/src/palette.c @@ -5,11 +5,11 @@ #include "constants/heap.h" +#include "graphics.h" #include "hardware_palette.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #define SLOTS_PER_PALETTE 16 #define PALETTE_SIZE (SLOTS_PER_PALETTE) diff --git a/src/pokedex_heightweight.c b/src/pokedex_heightweight.c index 095c656214..3f226c66a2 100644 --- a/src/pokedex_heightweight.c +++ b/src/pokedex_heightweight.c @@ -3,10 +3,10 @@ #include #include +#include "graphics.h" #include "heap.h" #include "narc.h" #include "pokedex_data_index.h" -#include "unk_02006E3C.h" typedef struct HeightWeightData { int *height; diff --git a/src/pokemon_summary_app.c b/src/pokemon_summary_app.c index 80eeb67cc7..b4ce86e385 100644 --- a/src/pokemon_summary_app.c +++ b/src/pokemon_summary_app.c @@ -13,6 +13,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -30,7 +31,6 @@ #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_02006224.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" diff --git a/src/sprite_resource.c b/src/sprite_resource.c index 26702edbd9..f99af19057 100644 --- a/src/sprite_resource.c +++ b/src/sprite_resource.c @@ -7,10 +7,10 @@ #include "nnsys/g2d/g2d_Image.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "resource_collection.h" -#include "unk_02006E3C.h" #define SPRITE_VRAM_TYPE_DEFAULT NNS_G2D_VRAM_TYPE_3DMAIN #define NARC_INDEX_NONE 0xFFFFFFFE diff --git a/src/text.c b/src/text.c index 84c522e833..db6b9a5903 100644 --- a/src/text.c +++ b/src/text.c @@ -8,12 +8,12 @@ #include "bg_window.h" #include "font.h" +#include "graphics.h" #include "heap.h" #include "render_text.h" #include "strbuf.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" static enum RenderResult TextPrinter_Render(TextPrinter *printer); static u8 Text_CreatePrinterTask(SysTaskFunc taskFunc, TextPrinter *printer, u32 priority); diff --git a/src/unk_0200C440.c b/src/unk_0200C440.c index 7b9a1f58b4..66a19005e5 100644 --- a/src/unk_0200C440.c +++ b/src/unk_0200C440.c @@ -4,9 +4,9 @@ #include #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "unk_020021B0.h" -#include "unk_02006E3C.h" typedef struct UnkStruct_0200C440_t { void *unk_00; diff --git a/src/unk_0200DA60.c b/src/unk_0200DA60.c index a4479c07e9..f85afb5bf5 100644 --- a/src/unk_0200DA60.c +++ b/src/unk_0200DA60.c @@ -14,6 +14,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "narc.h" @@ -23,7 +24,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200A328.h" #include "unk_0200C6E4.h" diff --git a/src/unk_02012744.c b/src/unk_02012744.c index 4a40a4062b..5b7065f5fe 100644 --- a/src/unk_02012744.c +++ b/src/unk_02012744.c @@ -7,8 +7,8 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "heap.h" -#include "unk_02006E3C.h" #include "unk_0201E86C.h" typedef struct { diff --git a/src/unk_02014D38.c b/src/unk_02014D38.c index b74b68aca1..fca04cd085 100644 --- a/src/unk_02014D38.c +++ b/src/unk_02014D38.c @@ -3,12 +3,12 @@ #include #include +#include "graphics.h" #include "heap.h" #include "message.h" #include "narc.h" #include "savedata.h" #include "strbuf.h" -#include "unk_02006E3C.h" #include "unk_0201D15C.h" static const u16 Unk_020E5522[] = { diff --git a/src/unk_02015920.c b/src/unk_02015920.c index 57c4c640a1..a5f3a8d176 100644 --- a/src/unk_02015920.c +++ b/src/unk_02015920.c @@ -7,12 +7,12 @@ #include "struct_defs/struct_02015958.h" #include "bg_window.h" +#include "graphics.h" #include "heap.h" #include "sys_task.h" #include "sys_task_manager.h" #include "touch_screen.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_02023FCC.h" typedef struct { diff --git a/src/unk_020528D0.c b/src/unk_020528D0.c index 77bba6c2e8..58fbb38153 100644 --- a/src/unk_020528D0.c +++ b/src/unk_020528D0.c @@ -16,6 +16,7 @@ #include "field_overworld_state.h" #include "field_system.h" #include "font.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -27,7 +28,6 @@ #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200A9DC.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" diff --git a/src/unk_0205C980.c b/src/unk_0205C980.c index cb23776dc3..40092b380c 100644 --- a/src/unk_0205C980.c +++ b/src/unk_0205C980.c @@ -3,9 +3,9 @@ #include #include +#include "graphics.h" #include "heap.h" #include "string_template.h" -#include "unk_02006E3C.h" static const int Unk_020ED7F0[][3] = { { 0x3, 0x3C, 0x3C }, diff --git a/src/unk_0205CA94.c b/src/unk_0205CA94.c index 65959cdde1..b60daee623 100644 --- a/src/unk_0205CA94.c +++ b/src/unk_0205CA94.c @@ -10,6 +10,7 @@ #include "bg_window.h" #include "cell_actor.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "map_object.h" @@ -20,7 +21,6 @@ #include "trainer_info.h" #include "unk_02005474.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200F174.h" diff --git a/src/unk_02073838.c b/src/unk_02073838.c index b58eb27265..39e5169a23 100644 --- a/src/unk_02073838.c +++ b/src/unk_02073838.c @@ -10,11 +10,11 @@ #include "overlay005/struct_ov5_02201C58.h" #include "easy3d.h" +#include "graphics.h" #include "heap.h" #include "narc.h" #include "sys_task.h" #include "sys_task_manager.h" -#include "unk_02006E3C.h" #include "unk_0201E190.h" static void sub_020739D8(UnkStruct_02073974 *param0, void *param1, u32 param2); diff --git a/src/unk_0207AE68.c b/src/unk_0207AE68.c index 49a16c67b2..8772b214df 100644 --- a/src/unk_0207AE68.c +++ b/src/unk_0207AE68.c @@ -22,6 +22,7 @@ #include "core_sys.h" #include "game_options.h" #include "game_records.h" +#include "graphics.h" #include "gx_layers.h" #include "hardware_palette.h" #include "heap.h" @@ -41,7 +42,6 @@ #include "text.h" #include "unk_02001AF4.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_0200DA60.h" #include "unk_0200F174.h" diff --git a/src/unk_0207E0B8.c b/src/unk_0207E0B8.c index d65598f830..b3a1110d6b 100644 --- a/src/unk_0207E0B8.c +++ b/src/unk_0207E0B8.c @@ -19,6 +19,7 @@ #include "font.h" #include "game_options.h" #include "game_overlay.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -36,7 +37,6 @@ #include "unk_02001AF4.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_02006E3C.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" diff --git a/src/unk_02082C2C.c b/src/unk_02082C2C.c index b14380bc22..75d9c8e4ef 100644 --- a/src/unk_02082C2C.c +++ b/src/unk_02082C2C.c @@ -13,6 +13,7 @@ #include "overlay104/struct_ov104_0224133C.h" #include "cell_actor.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "item.h" @@ -20,7 +21,6 @@ #include "party.h" #include "pokemon.h" #include "pokemon_icon.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" #include "unk_0201DBEC.h" diff --git a/src/unk_0208694C.c b/src/unk_0208694C.c index 772c568022..a09ba94b56 100644 --- a/src/unk_0208694C.c +++ b/src/unk_0208694C.c @@ -15,6 +15,7 @@ #include "core_sys.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "gx_layers.h" #include "heap.h" #include "message.h" @@ -32,7 +33,6 @@ #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_0200679C.h" -#include "unk_02006E3C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" diff --git a/src/unk_0208A3F4.c b/src/unk_0208A3F4.c index 9243d3d1a5..ac140af0d8 100644 --- a/src/unk_0208A3F4.c +++ b/src/unk_0208A3F4.c @@ -19,13 +19,13 @@ #include "bg_window.h" #include "font.h" #include "game_options.h" +#include "graphics.h" #include "inlines.h" #include "message.h" #include "narc.h" #include "palette.h" #include "strbuf.h" #include "text.h" -#include "unk_02006E3C.h" #include "unk_0200C6E4.h" #include "unk_0200DA60.h" #include "unk_02012744.h" diff --git a/src/unk_02094EDC.c b/src/unk_02094EDC.c index f1dfc543bc..4ae892cbce 100644 --- a/src/unk_02094EDC.c +++ b/src/unk_02094EDC.c @@ -14,13 +14,13 @@ #include "battle/struct_ov16_0223E0C8.h" #include "overlay006/struct_ov6_02248BE8.h" +#include "graphics.h" #include "heap.h" #include "message.h" #include "narc.h" #include "pokemon.h" #include "render_text.h" #include "strbuf.h" -#include "unk_02006E3C.h" #include "unk_0200762C.h" #include "unk_020131EC.h" #include "unk_0201D15C.h" From d213734ab1fea97925edc0e6879e792a7bba1533 Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 16:09:07 -0700 Subject: [PATCH 08/11] Document static routines in graphics.c --- include/graphics.h | 16 +++ src/graphics.c | 333 +++++++++++++++++++++++---------------------- 2 files changed, 184 insertions(+), 165 deletions(-) diff --git a/include/graphics.h b/include/graphics.h index 94b5f73eaa..a619fe812f 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -6,6 +6,22 @@ #include "bg_window.h" #include "narc.h" +enum PaletteLoadLocation { + PAL_LOAD_MAIN_BG = 0, + PAL_LOAD_MAIN_OBJ, + PAL_LOAD_MAIN_BGEXT, + PAL_LOAD_MAIN_OBJEXT, + PAL_LOAD_SUB_BG, + PAL_LOAD_SUB_OBJ, + PAL_LOAD_SUB_BGEXT, + PAL_LOAD_SUB_OBJEXT, +}; + +enum ImageMappingLayout { + IMAGE_MAPPING_LAYOUT_1D = 0, + IMAGE_MAPPING_LAYOUT_2D, +}; + u32 sub_02006E3C(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); void sub_02006E60(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); void sub_02006E84(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5); diff --git a/src/graphics.c b/src/graphics.c index 65fdbf2cf3..4e2dcdb8e0 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -7,29 +7,29 @@ #include "heap.h" #include "narc.h" -static u32 sub_020072D0(void *param0, BgConfig *param1, u32 param2, u32 param3, u32 param4); -static void sub_02007314(void *param0, BgConfig *param1, u32 param2, u32 param3, u32 param4); -static u32 sub_02007374(void *param0, int param1, u32 param2, u32 param3); -static void sub_020073BC(void *param0, int param1, u32 param2, u32 param3, u32 param4); -static void sub_0200749C(void *param0, NNS_G2D_VRAM_TYPE param1, u32 param2, NNSG2dImagePaletteProxy *param3); -static u32 sub_020074EC(void *param0, int param1, u32 param2, NNS_G2D_VRAM_TYPE param3, u32 param4, NNSG2dImageProxy *param5); -static void sub_02007534(void *param0, int param1, u32 param2, NNS_G2D_VRAM_TYPE param3, u32 param4, NNSG2dImageProxy *param5); -static void *sub_020075A0(void *param0, NNSG2dCharacterData **param1); -static void *sub_020075BC(void *param0, NNSG2dScreenData **param1); -static void *sub_020075D8(void *param0, NNSG2dPaletteData **param1); -static void *sub_020075F4(void *param0, NNSG2dCellDataBank **param1); -static void *sub_02007610(void *param0, NNSG2dAnimBankData **param1); +static u32 LoadTilesToBgLayer(void *ncgrBuffer, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size); +static void LoadTilemapToBgLayer(void *nscrBuffer, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size); +static u32 LoadObjectTiles(void *ncgrBuffer, enum DSScreen display, u32 offset, u32 size); +static void LoadPaletteWithSrcOffset(void *nclrBuffer, enum PaletteLoadLocation paletteType, u32 srcOffset, u32 offset, u32 size); +static void LoadPartialPalette(void *nclrBuffer, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, NNSG2dImagePaletteProxy *paletteProxy); +static u32 LoadImageMapping(void *ncgrBuffer, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, NNSG2dImageProxy *imageProxy); +static void LoadImageMappingAndSetVramMode(void *ncgrBuffer, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, NNSG2dImageProxy *imageProxy); +static void *GetCharacterData(void *ncgrBuffer, NNSG2dCharacterData **outCharData); +static void *GetScreenData(void *nscrBuffer, NNSG2dScreenData **outScreenData); +static void *GetPaletteData(void *nclrBuffer, NNSG2dPaletteData **outPaletteData); +static void *GetCellBank(void *ncerBuffer, NNSG2dCellDataBank **outCellData); +static void *GetAnimBank(void *nanrBuffer, NNSG2dAnimBankData **outAnimBank); u32 sub_02006E3C(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { void *v0 = sub_02006FE8(param0, param1, param6, param7, 0); - return sub_020072D0(v0, param2, param3, param4, param5); + return LoadTilesToBgLayer(v0, param2, param3, param4, param5); } void sub_02006E60(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { void *v0 = sub_02006FE8(param0, param1, param6, param7, 1); - sub_02007314(v0, param2, param3, param4, param5); + LoadTilemapToBgLayer(v0, param2, param3, param4, param5); } void sub_02006E84(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5) @@ -40,50 +40,50 @@ void sub_02006E84(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u3 void sub_02006E9C(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6) { void *v0 = sub_02006FE8(param0, param1, 0, param6, 1); - sub_020073BC(v0, param2, param3, param4, param5); + LoadPaletteWithSrcOffset(v0, param2, param3, param4, param5); } u32 sub_02006EC0(u32 param0, u32 param1, int param2, u32 param3, u32 param4, BOOL param5, u32 param6) { void *v0 = sub_02006FE8(param0, param1, param5, param6, 1); - return sub_02007374(v0, param2, param3, param4); + return LoadObjectTiles(v0, param2, param3, param4); } void sub_02006EE0(u32 param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5) { void *v0 = sub_02006FE8(param0, param1, 0, param4, 1); - sub_0200749C(v0, param2, param3, param5); + LoadPartialPalette(v0, param2, param3, param5); } u32 sub_02006F00(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) { void *v0 = sub_02006FE8(param0, param1, param2, param7, 1); - return sub_020074EC(v0, param3, param4, param5, param6, param8); + return LoadImageMapping(v0, param3, param4, param5, param6, param8); } void sub_02006F28(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) { void *v0 = sub_02006FE8(param0, param1, param2, param7, 1); - sub_02007534(v0, param3, param4, param5, param6, param8); + LoadImageMappingAndSetVramMode(v0, param3, param4, param5, param6, param8); } void *sub_02006F50(u32 param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4) { void *v0 = sub_02006FE8(param0, param1, param2, param4, 0); - return sub_020075A0(v0, param3); + return GetCharacterData(v0, param3); } void *sub_02006F6C(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4) { void *v0 = sub_02006FE8(param0, param1, param2, param4, 0); - return sub_020075BC(v0, param3); + return GetScreenData(v0, param3); } void *sub_02006F88(u32 param0, u32 param1, NNSG2dPaletteData **param2, u32 param3) { void *v0 = sub_02006FE8(param0, param1, 0, param3, 0); - return sub_020075D8(v0, param2); + return GetPaletteData(v0, param2); } void *sub_02006FA0(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4) @@ -91,13 +91,13 @@ void *sub_02006FA0(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **par void *v0; v0 = sub_02006FE8(param0, param1, param2, param4, 0); - return sub_020075F4(v0, param3); + return GetCellBank(v0, param3); } void *sub_02006FBC(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4) { void *v0 = sub_02006FE8(param0, param1, param2, param4, 0); - return sub_02007610(v0, param3); + return GetAnimBank(v0, param3); } void *sub_02006FD8(u32 param0, u32 param1, u32 param2) @@ -180,13 +180,13 @@ void *sub_02007068(u32 narcIndex, u32 fileIndex, BOOL param2, u32 heapID, int pa u32 sub_020070E8(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { void *v0 = sub_0200723C(param0, param1, param6, param7, 0); - return sub_020072D0(v0, param2, param3, param4, param5); + return LoadTilesToBgLayer(v0, param2, param3, param4, param5); } void sub_0200710C(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { void *v0 = sub_0200723C(param0, param1, param6, param7, 1); - sub_02007314(v0, param2, param3, param4, param5); + LoadTilemapToBgLayer(v0, param2, param3, param4, param5); } void sub_02007130(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5) @@ -197,37 +197,37 @@ void sub_02007130(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, void sub_02007148(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6) { void *v0 = sub_0200723C(param0, param1, 0, param6, 1); - sub_020073BC(v0, param2, param3, param4, param5); + LoadPaletteWithSrcOffset(v0, param2, param3, param4, param5); } void sub_0200716C(NARC *param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5) { void *v0 = sub_0200723C(param0, param1, 0, param4, 1); - sub_0200749C(v0, param2, param3, param5); + LoadPartialPalette(v0, param2, param3, param5); } u32 sub_0200718C(NARC *param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) { void *v0 = sub_0200723C(param0, param1, param2, param7, 1); - return sub_020074EC(v0, param3, param4, param5, param6, param8); + return LoadImageMapping(v0, param3, param4, param5, param6, param8); } void *sub_020071B4(NARC *param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4) { void *v0 = sub_0200723C(param0, param1, param2, param4, 0); - return sub_020075A0(v0, param3); + return GetCharacterData(v0, param3); } void *sub_020071D0(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4) { void *v0 = sub_0200723C(param0, param1, param2, param4, 0); - return sub_020075BC(v0, param3); + return GetScreenData(v0, param3); } void *sub_020071EC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3) { void *v0 = sub_0200723C(param0, param1, 0, param3, 0); - return sub_020075D8(v0, param2); + return GetPaletteData(v0, param2); } void *sub_02007204(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4) @@ -235,13 +235,13 @@ void *sub_02007204(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **p void *v0; v0 = sub_0200723C(param0, param1, param2, param4, 0); - return sub_020075F4(v0, param3); + return GetCellBank(v0, param3); } void *sub_02007220(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4) { void *v0 = sub_0200723C(param0, param1, param2, param4, 0); - return sub_02007610(v0, param3); + return GetAnimBank(v0, param3); } void *sub_0200723C(NARC *narc, u32 NarcFileIndex, BOOL param2, u32 param3, int param4) @@ -289,262 +289,265 @@ void *sub_02007250(NARC *narc, u32 NarcFileIndex, BOOL param2, u32 param3, int p return v0; } -static u32 sub_020072D0(void *param0, BgConfig *param1, u32 param2, u32 param3, u32 param4) +static u32 LoadTilesToBgLayer(void *ncgrBuffer, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size) { - if (param0 != NULL) { - NNSG2dCharacterData *v0; + if (ncgrBuffer != NULL) { + NNSG2dCharacterData *tiles; - if (NNS_G2dGetUnpackedBGCharacterData(param0, &v0)) { - if (param4 == 0) { - param4 = v0->szByte; + if (NNS_G2dGetUnpackedBGCharacterData(ncgrBuffer, &tiles)) { + if (size == 0) { + size = tiles->szByte; } - Bg_LoadTiles(param1, param2, v0->pRawData, param4, param3); + Bg_LoadTiles(bgConfig, bgLayer, tiles->pRawData, size, offset); } - Heap_FreeToHeap(param0); + Heap_FreeToHeap(ncgrBuffer); } - return param4; + return size; } -static void sub_02007314(void *param0, BgConfig *param1, u32 param2, u32 param3, u32 param4) +static void LoadTilemapToBgLayer(void *nscrBuffer, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size) { - if (param0 != NULL) { - NNSG2dScreenData *v0; + if (nscrBuffer != NULL) { + NNSG2dScreenData *tilemap; - if (NNS_G2dGetUnpackedScreenData(param0, &v0)) { - if (param4 == 0) { - param4 = v0->szByte; + if (NNS_G2dGetUnpackedScreenData(nscrBuffer, &tilemap)) { + if (size == 0) { + size = tilemap->szByte; } - if (Bg_GetTilemapBuffer(param1, param2) != NULL) { - Bg_LoadTilemapBuffer(param1, param2, v0->rawData, param4); + if (Bg_GetTilemapBuffer(bgConfig, bgLayer) != NULL) { + Bg_LoadTilemapBuffer(bgConfig, bgLayer, tilemap->rawData, size); } - Bg_CopyTilemapBufferRangeToVRAM(param1, param2, v0->rawData, param4, param3); + Bg_CopyTilemapBufferRangeToVRAM(bgConfig, bgLayer, tilemap->rawData, size, offset); } - Heap_FreeToHeap(param0); + Heap_FreeToHeap(nscrBuffer); } } -static u32 sub_02007374(void *param0, int param1, u32 param2, u32 param3) +static void (*const sDisplayObjectLoadFunc[])(const void *, u32, u32) = { + GX_LoadOBJ, + GXS_LoadOBJ +}; + +static u32 LoadObjectTiles(void *ncgrBuffer, enum DSScreen display, u32 offset, u32 size) { - static void (*const v0[])(const void *, u32, u32) = { - GX_LoadOBJ, - GXS_LoadOBJ - }; - if (param0 != NULL) { + if (ncgrBuffer != NULL) { NNSG2dCharacterData *v1; - if (NNS_G2dGetUnpackedCharacterData(param0, &v1)) { - if (param3 == 0) { - param3 = v1->szByte; + if (NNS_G2dGetUnpackedCharacterData(ncgrBuffer, &v1)) { + if (size == 0) { + size = v1->szByte; } - DC_FlushRange(v1->pRawData, param3); - v0[param1](v1->pRawData, param2, param3); + DC_FlushRange(v1->pRawData, size); + sDisplayObjectLoadFunc[display](v1->pRawData, offset, size); } - Heap_FreeToHeap(param0); + Heap_FreeToHeap(ncgrBuffer); } - return param3; + return size; } -static void sub_020073BC(void *param0, int param1, u32 param2, u32 param3, u32 param4) -{ - static void (*const v0[])(const void *, u32, u32) = { - GX_LoadBGPltt, - GX_LoadOBJPltt, - GX_LoadBGExtPltt, - GX_LoadOBJExtPltt, - GXS_LoadBGPltt, - GXS_LoadOBJPltt, - GXS_LoadBGExtPltt, - GXS_LoadOBJExtPltt - }; +static void (*const sPaletteLoadFuncs[])(const void *, u32, u32) = { + GX_LoadBGPltt, + GX_LoadOBJPltt, + GX_LoadBGExtPltt, + GX_LoadOBJExtPltt, + GXS_LoadBGPltt, + GXS_LoadOBJPltt, + GXS_LoadBGExtPltt, + GXS_LoadOBJExtPltt +}; - if (param0 != NULL) { - NNSG2dPaletteData *v1; +static void LoadPaletteWithSrcOffset(void *nclrBuffer, enum PaletteLoadLocation loadLocation, u32 srcOffset, u32 offset, u32 size) +{ + if (nclrBuffer != NULL) { + NNSG2dPaletteData *palette; - if (NNS_G2dGetUnpackedPaletteData(param0, &v1)) { - (u8 *)(v1->pRawData) += param2; + if (NNS_G2dGetUnpackedPaletteData(nclrBuffer, &palette)) { + palette->pRawData = (void *)((u32)palette->pRawData + srcOffset); - if (param4 == 0) { - param4 = v1->szByte - param2; + if (size == 0) { + size = palette->szByte - srcOffset; } - DC_FlushRange(v1->pRawData, param4); + DC_FlushRange(palette->pRawData, size); - switch (param1) { - case 2: + switch (loadLocation) { + case PAL_LOAD_MAIN_BGEXT: GX_BeginLoadBGExtPltt(); - v0[param1](v1->pRawData, param3, param4); + sPaletteLoadFuncs[loadLocation](palette->pRawData, offset, size); GX_EndLoadBGExtPltt(); break; - case 6: + + case PAL_LOAD_SUB_BGEXT: GXS_BeginLoadBGExtPltt(); - v0[param1](v1->pRawData, param3, param4); + sPaletteLoadFuncs[loadLocation](palette->pRawData, offset, size); GXS_EndLoadBGExtPltt(); break; - case 3: + + case PAL_LOAD_MAIN_OBJEXT: GX_BeginLoadOBJExtPltt(); - v0[param1](v1->pRawData, param3, param4); + sPaletteLoadFuncs[loadLocation](palette->pRawData, offset, size); GX_EndLoadOBJExtPltt(); break; - case 7: + + case PAL_LOAD_SUB_OBJEXT: GXS_BeginLoadOBJExtPltt(); - v0[param1](v1->pRawData, param3, param4); + sPaletteLoadFuncs[loadLocation](palette->pRawData, offset, size); GXS_EndLoadOBJExtPltt(); break; + default: - v0[param1](v1->pRawData, param3, param4); + sPaletteLoadFuncs[loadLocation](palette->pRawData, offset, size); break; } } - Heap_FreeToHeap(param0); + Heap_FreeToHeap(nclrBuffer); } } -static void sub_0200749C(void *param0, NNS_G2D_VRAM_TYPE param1, u32 param2, NNSG2dImagePaletteProxy *param3) +static void LoadPartialPalette(void *nclrBuffer, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, NNSG2dImagePaletteProxy *paletteProxy) { - if (param0 != NULL) { - NNSG2dPaletteData *v0; - NNSG2dPaletteCompressInfo *v1; - BOOL v2; + if (nclrBuffer != NULL) { + NNSG2dPaletteData *palette; + NNSG2dPaletteCompressInfo *compPalette; + BOOL extended = NNS_G2dGetUnpackedPaletteCompressInfo(nclrBuffer, &compPalette); - v2 = NNS_G2dGetUnpackedPaletteCompressInfo(param0, &v1); - - if (NNS_G2dGetUnpackedPaletteData(param0, &v0)) { - if (v2) { - NNS_G2dLoadPaletteEx(v0, v1, param2, param1, param3); + if (NNS_G2dGetUnpackedPaletteData(nclrBuffer, &palette)) { + if (extended) { + NNS_G2dLoadPaletteEx(palette, compPalette, baseAddr, vramType, paletteProxy); } else { - NNS_G2dLoadPalette(v0, param2, param1, param3); + NNS_G2dLoadPalette(palette, baseAddr, vramType, paletteProxy); } } - Heap_FreeToHeap(param0); + Heap_FreeToHeap(nclrBuffer); } } -static u32 sub_020074EC(void *param0, int param1, u32 param2, NNS_G2D_VRAM_TYPE param3, u32 param4, NNSG2dImageProxy *param5) -{ - static void (*const v0[])(const NNSG2dCharacterData *, u32, NNS_G2D_VRAM_TYPE, NNSG2dImageProxy *) = { - NNS_G2dLoadImage1DMapping, - NNS_G2dLoadImage2DMapping - }; +static void (*const sImageLayoutLoadFuncs[])(const NNSG2dCharacterData *, u32, NNS_G2D_VRAM_TYPE, NNSG2dImageProxy *) = { + NNS_G2dLoadImage1DMapping, + NNS_G2dLoadImage2DMapping +}; - u32 v1 = 0; +static u32 LoadImageMapping(void *ncgrBuffer, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, NNSG2dImageProxy *imageProxy) +{ + u32 result = 0; - if (param0 != NULL) { - NNSG2dCharacterData *v2; + if (ncgrBuffer != NULL) { + NNSG2dCharacterData *tiles; - if (NNS_G2dGetUnpackedCharacterData(param0, &v2)) { - if (param2) { - v2->szByte = param2; + if (NNS_G2dGetUnpackedCharacterData(ncgrBuffer, &tiles)) { + if (size) { + tiles->szByte = size; } - v0[param1](v2, param4, param3, param5); - v1 = v2->szByte; + sImageLayoutLoadFuncs[layout](tiles, baseAddr, vramType, imageProxy); + result = tiles->szByte; } - Heap_FreeToHeap(param0); + Heap_FreeToHeap(ncgrBuffer); } - return v1; + return result; } -static void sub_02007534(void *param0, int param1, u32 param2, NNS_G2D_VRAM_TYPE param3, u32 param4, NNSG2dImageProxy *param5) -{ - static void (*const v0[])(const NNSG2dCharacterData *, u32, NNS_G2D_VRAM_TYPE, NNSG2dImageProxy *) = { - NNS_G2dLoadImage1DMapping, - NNS_G2dLoadImage2DMapping - }; +static void (*const sImageLayoutLoadFuncs2[])(const NNSG2dCharacterData *, u32, NNS_G2D_VRAM_TYPE, NNSG2dImageProxy *) = { + NNS_G2dLoadImage1DMapping, + NNS_G2dLoadImage2DMapping +}; - if (param0 != NULL) { - NNSG2dCharacterData *v1; +static void LoadImageMappingAndSetVramMode(void *ncgrBuffer, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, NNSG2dImageProxy *imageProxy) +{ + if (ncgrBuffer != NULL) { + NNSG2dCharacterData *tiles; - if (NNS_G2dGetUnpackedCharacterData(param0, &v1)) { - if (param2) { - v1->szByte = param2; + if (NNS_G2dGetUnpackedCharacterData(ncgrBuffer, &tiles)) { + if (size) { + tiles->szByte = size; } - switch (param3) { + switch (vramType) { case NNS_G2D_VRAM_TYPE_2DMAIN: - v1->mapingType = GX_GetOBJVRamModeChar(); + tiles->mapingType = GX_GetOBJVRamModeChar(); break; case NNS_G2D_VRAM_TYPE_2DSUB: - v1->mapingType = GXS_GetOBJVRamModeChar(); + tiles->mapingType = GXS_GetOBJVRamModeChar(); break; } - v0[param1](v1, param4, param3, param5); + sImageLayoutLoadFuncs2[layout](tiles, baseAddr, vramType, imageProxy); } - Heap_FreeToHeap(param0); + Heap_FreeToHeap(ncgrBuffer); } } -static void *sub_020075A0(void *param0, NNSG2dCharacterData **param1) +static void *GetCharacterData(void *ncgrBuffer, NNSG2dCharacterData **outCharData) { - if (param0 != NULL) { - if (NNS_G2dGetUnpackedBGCharacterData(param0, param1) == 0) { - Heap_FreeToHeap(param0); + if (ncgrBuffer != NULL) { + if (NNS_G2dGetUnpackedBGCharacterData(ncgrBuffer, outCharData) == 0) { + Heap_FreeToHeap(ncgrBuffer); return NULL; } } - return param0; + return ncgrBuffer; } -static void *sub_020075BC(void *param0, NNSG2dScreenData **param1) +static void *GetScreenData(void *nscrBuffer, NNSG2dScreenData **outScreenData) { - if (param0 != NULL) { - if (NNS_G2dGetUnpackedScreenData(param0, param1) == 0) { - Heap_FreeToHeap(param0); + if (nscrBuffer != NULL) { + if (NNS_G2dGetUnpackedScreenData(nscrBuffer, outScreenData) == 0) { + Heap_FreeToHeap(nscrBuffer); return NULL; } } - return param0; + return nscrBuffer; } -static void *sub_020075D8(void *param0, NNSG2dPaletteData **param1) +static void *GetPaletteData(void *nclrBuffer, NNSG2dPaletteData **outPaletteData) { - if (param0 != NULL) { - if (NNS_G2dGetUnpackedPaletteData(param0, param1) == 0) { - Heap_FreeToHeap(param0); + if (nclrBuffer != NULL) { + if (NNS_G2dGetUnpackedPaletteData(nclrBuffer, outPaletteData) == 0) { + Heap_FreeToHeap(nclrBuffer); return NULL; } } - return param0; + return nclrBuffer; } -static void *sub_020075F4(void *param0, NNSG2dCellDataBank **param1) +static void *GetCellBank(void *ncerBuffer, NNSG2dCellDataBank **outCellData) { - if (param0 != NULL) { - if (NNS_G2dGetUnpackedCellBank(param0, param1) == 0) { - Heap_FreeToHeap(param0); + if (ncerBuffer != NULL) { + if (NNS_G2dGetUnpackedCellBank(ncerBuffer, outCellData) == 0) { + Heap_FreeToHeap(ncerBuffer); return NULL; } } - return param0; + return ncerBuffer; } -static void *sub_02007610(void *param0, NNSG2dAnimBankData **param1) +static void *GetAnimBank(void *nanrBuffer, NNSG2dAnimBankData **outAnimBank) { - if (param0 != NULL) { - if (NNS_G2dGetUnpackedAnimBank(param0, param1) == 0) { - Heap_FreeToHeap(param0); + if (nanrBuffer != NULL) { + if (NNS_G2dGetUnpackedAnimBank(nanrBuffer, outAnimBank) == 0) { + Heap_FreeToHeap(nanrBuffer); return NULL; } } - return param0; + return nanrBuffer; } From de256003a28aa1da1ec4c22ed32b39f2d2f1d5ca Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 16:20:00 -0700 Subject: [PATCH 09/11] Document LoadMemberFrom[Open]NARC routines --- include/graphics.h | 11 +- src/choose_starter/choose_starter_app.c | 4 +- src/easy3d_object.c | 6 +- src/graphics.c | 169 ++++++++++++------------ src/overlay005/encounter_effect.c | 2 +- src/overlay005/ov5_021D521C.c | 2 +- src/overlay005/ov5_021D5EB8.c | 2 +- src/overlay005/ov5_021F6454.c | 2 +- src/overlay006/ov6_02246184.c | 2 +- src/overlay006/ov6_02248050.c | 2 +- src/overlay017/ov17_02252A70.c | 2 +- src/overlay019/ov19_021D79F8.c | 4 +- src/overlay021/ov21_021D3208.c | 2 +- src/overlay021/ov21_021D57B4.c | 6 +- src/overlay022/ov22_02255094.c | 10 +- src/overlay022/ov22_02259098.c | 4 +- src/overlay022/ov22_0225AF8C.c | 4 +- src/overlay025/ov25_02255540.c | 4 +- src/overlay062/ov62_02231690.c | 2 +- src/overlay066/ov66_022343A8.c | 6 +- src/overlay066/ov66_02234EA8.c | 4 +- src/overlay069/ov69_0225C700.c | 4 +- src/overlay070/ov70_0225C700.c | 2 +- src/overlay070/ov70_0225C858.c | 2 +- src/overlay070/ov70_0225D9A4.c | 2 +- src/overlay070/ov70_02260B44.c | 6 +- src/overlay070/ov70_02269190.c | 2 +- src/overlay071/ov71_0223B140.c | 4 +- src/overlay088/ov88_0223B140.c | 2 +- src/overlay092/ov92_021D0D80.c | 4 +- src/overlay094/ov94_022414B8.c | 4 +- src/overlay095/ov95_022476F0.c | 2 +- src/overlay097/ov97_02230410.c | 2 +- src/overlay097/ov97_02237694.c | 2 +- src/overlay113/ov113_0225C700.c | 4 +- src/overlay113/ov113_0225E368.c | 6 +- src/overlay115/ov115_02260440.c | 2 +- src/pokedex_heightweight.c | 20 +-- src/sprite_resource.c | 2 +- src/unk_02014D38.c | 2 +- src/unk_0205CA94.c | 4 +- src/unk_02073838.c | 4 +- src/unk_02082C2C.c | 2 +- src/unk_02094EDC.c | 6 +- 44 files changed, 168 insertions(+), 172 deletions(-) diff --git a/include/graphics.h b/include/graphics.h index a619fe812f..e8093cf79a 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -22,6 +22,12 @@ enum ImageMappingLayout { IMAGE_MAPPING_LAYOUT_2D, }; +void *LoadCompressedMemberFromNARC(u32 narcID, u32 narcMemberIdx, u32 heapID); +void *LoadMemberFromNARC(u32 narcID, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd); +void *LoadMemberFromNARC_OutFileSize(u32 narcID, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd, u32 *fileSize); +void *LoadMemberFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd); +void *LoadMemberFromOpenNARC_OutFileSize(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd, u32 *fileSize); + u32 sub_02006E3C(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); void sub_02006E60(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); void sub_02006E84(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5); @@ -35,9 +41,6 @@ void *sub_02006F6C(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param void *sub_02006F88(u32 bankID, u32 memberIndex, NNSG2dPaletteData **param2, u32 param3); void *sub_02006FA0(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4); void *sub_02006FBC(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4); -void *sub_02006FD8(u32 param0, u32 param1, u32 param2); -void *sub_02006FE8(u32 param0, u32 param1, BOOL param2, u32 param3, int param4); -void *sub_02007068(u32 narcIndex, u32 fileIndex, BOOL param2, u32 heapID, int param4, u32 *fileSize); u32 sub_020070E8(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); void sub_0200710C(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); void sub_02007130(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5); @@ -49,7 +52,5 @@ void *sub_020071D0(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **par void *sub_020071EC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3); void *sub_02007204(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4); void *sub_02007220(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4); -void *sub_0200723C(NARC *param0, u32 param1, BOOL param2, u32 param3, int param4); -void *sub_02007250(NARC *param0, u32 param1, BOOL param2, u32 param3, int param4, u32 *param5); #endif // POKEPLATINUM_GRAPHICS_H diff --git a/src/choose_starter/choose_starter_app.c b/src/choose_starter/choose_starter_app.c index 1674550de0..9eb9642452 100644 --- a/src/choose_starter/choose_starter_app.c +++ b/src/choose_starter/choose_starter_app.c @@ -784,7 +784,7 @@ static void ov78_021D1604(ChooseStarter3DGraphics *param0, int param1, int param static void ov78_021D1630(ChooseStarter3DGraphics *param0, int param1, int param2) { - param0->unk_54 = sub_02006FE8(82, param1, 0, param2, 0); + param0->unk_54 = LoadMemberFromNARC(82, param1, 0, param2, 0); param0->unk_58 = NNS_G3dGetMdlSet(param0->unk_54); param0->unk_5C = NNS_G3dGetMdlByIdx(param0->unk_58, 0); param0->unk_60 = NNS_G3dGetTex(param0->unk_54); @@ -797,7 +797,7 @@ static void ov78_021D1630(ChooseStarter3DGraphics *param0, int param1, int param static void ov78_021D1694(ChooseStarter3DGraphics *param0, int param1, int param2, NNSFndAllocator *param3) { - param0->unk_64 = sub_02006FE8(82, param1, 0, param2, 0); + param0->unk_64 = LoadMemberFromNARC(82, param1, 0, param2, 0); param0->unk_68 = NNS_G3dGetAnmByIdx(param0->unk_64, 0); param0->unk_6C = NNS_G3dAllocAnmObj(param3, param0->unk_68, param0->unk_5C); diff --git a/src/easy3d_object.c b/src/easy3d_object.c index 2814c418af..7b0ef02368 100644 --- a/src/easy3d_object.c +++ b/src/easy3d_object.c @@ -16,13 +16,13 @@ static void Easy3DAnim_LoadInternal(Easy3DAnim *anim, const Easy3DModel *model, void Easy3DModel_Load(Easy3DModel *model, u32 narcIndex, u32 memberIndex, u32 heapID) { - model->data = sub_02006FE8(narcIndex, memberIndex, FALSE, heapID, 0); + model->data = LoadMemberFromNARC(narcIndex, memberIndex, FALSE, heapID, 0); Easy3DModel_LoadInternal(model); } void Easy3DModel_LoadFrom(Easy3DModel *model, NARC *narc, u32 memberIndex, u32 heapID) { - model->data = sub_0200723C(narc, memberIndex, FALSE, heapID, 0); + model->data = LoadMemberFromOpenNARC(narc, memberIndex, FALSE, heapID, 0); Easy3DModel_LoadInternal(model); } @@ -59,7 +59,7 @@ void Easy3DModel_Release(Easy3DModel *model) void Easy3DAnim_LoadFrom(Easy3DAnim *anim, const Easy3DModel *model, NARC *narc, u32 memberIndex, u32 heapID, NNSFndAllocator *allocator) { - void *data = sub_0200723C(narc, memberIndex, FALSE, heapID, 0); + void *data = LoadMemberFromOpenNARC(narc, memberIndex, FALSE, heapID, 0); Easy3DAnim_LoadInternal(anim, model, data, allocator); anim->dataBorrowed = FALSE; diff --git a/src/graphics.c b/src/graphics.c index 4e2dcdb8e0..055c132ff3 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -22,13 +22,13 @@ static void *GetAnimBank(void *nanrBuffer, NNSG2dAnimBankData **outAnimBank); u32 sub_02006E3C(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { - void *v0 = sub_02006FE8(param0, param1, param6, param7, 0); + void *v0 = LoadMemberFromNARC(param0, param1, param6, param7, 0); return LoadTilesToBgLayer(v0, param2, param3, param4, param5); } void sub_02006E60(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { - void *v0 = sub_02006FE8(param0, param1, param6, param7, 1); + void *v0 = LoadMemberFromNARC(param0, param1, param6, param7, 1); LoadTilemapToBgLayer(v0, param2, param3, param4, param5); } @@ -39,50 +39,50 @@ void sub_02006E84(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u3 void sub_02006E9C(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6) { - void *v0 = sub_02006FE8(param0, param1, 0, param6, 1); + void *v0 = LoadMemberFromNARC(param0, param1, 0, param6, 1); LoadPaletteWithSrcOffset(v0, param2, param3, param4, param5); } u32 sub_02006EC0(u32 param0, u32 param1, int param2, u32 param3, u32 param4, BOOL param5, u32 param6) { - void *v0 = sub_02006FE8(param0, param1, param5, param6, 1); + void *v0 = LoadMemberFromNARC(param0, param1, param5, param6, 1); return LoadObjectTiles(v0, param2, param3, param4); } void sub_02006EE0(u32 param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5) { - void *v0 = sub_02006FE8(param0, param1, 0, param4, 1); + void *v0 = LoadMemberFromNARC(param0, param1, 0, param4, 1); LoadPartialPalette(v0, param2, param3, param5); } u32 sub_02006F00(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) { - void *v0 = sub_02006FE8(param0, param1, param2, param7, 1); + void *v0 = LoadMemberFromNARC(param0, param1, param2, param7, 1); return LoadImageMapping(v0, param3, param4, param5, param6, param8); } void sub_02006F28(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) { - void *v0 = sub_02006FE8(param0, param1, param2, param7, 1); + void *v0 = LoadMemberFromNARC(param0, param1, param2, param7, 1); LoadImageMappingAndSetVramMode(v0, param3, param4, param5, param6, param8); } void *sub_02006F50(u32 param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4) { - void *v0 = sub_02006FE8(param0, param1, param2, param4, 0); + void *v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); return GetCharacterData(v0, param3); } void *sub_02006F6C(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4) { - void *v0 = sub_02006FE8(param0, param1, param2, param4, 0); + void *v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); return GetScreenData(v0, param3); } void *sub_02006F88(u32 param0, u32 param1, NNSG2dPaletteData **param2, u32 param3) { - void *v0 = sub_02006FE8(param0, param1, 0, param3, 0); + void *v0 = LoadMemberFromNARC(param0, param1, 0, param3, 0); return GetPaletteData(v0, param2); } @@ -90,102 +90,100 @@ void *sub_02006FA0(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **par { void *v0; - v0 = sub_02006FE8(param0, param1, param2, param4, 0); + v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); return GetCellBank(v0, param3); } void *sub_02006FBC(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4) { - void *v0 = sub_02006FE8(param0, param1, param2, param4, 0); + void *v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); return GetAnimBank(v0, param3); } -void *sub_02006FD8(u32 param0, u32 param1, u32 param2) +void *LoadCompressedMemberFromNARC(u32 narcID, u32 narcMemberIdx, u32 heapID) { - return sub_02006FE8(param0, param1, 1, param2, 0); + return LoadMemberFromNARC(narcID, narcMemberIdx, TRUE, heapID, FALSE); } -void *sub_02006FE8(u32 param0, u32 param1, BOOL param2, u32 param3, int param4) +void *LoadMemberFromNARC(u32 narcID, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd) { - void *v0; + void *data; - if (param2 || (param4 == 1)) { - v0 = Heap_AllocFromHeapAtEnd(param3, NARC_GetMemberSizeByIndexPair(param0, param1)); + if (compressed || allocAtEnd == TRUE) { + data = Heap_AllocFromHeapAtEnd(heapID, NARC_GetMemberSizeByIndexPair(narcID, narcMemberIdx)); } else { - v0 = Heap_AllocFromHeap(param3, NARC_GetMemberSizeByIndexPair(param0, param1)); + data = Heap_AllocFromHeap(heapID, NARC_GetMemberSizeByIndexPair(narcID, narcMemberIdx)); } - if (v0 != NULL) { - NARC_ReadWholeMemberByIndexPair(v0, param0, param1); + if (data != NULL) { + NARC_ReadWholeMemberByIndexPair(data, narcID, narcMemberIdx); - if (param2) { - void *v1; + if (compressed) { + void *uncompBuf; - if (param4 == 0) { - v1 = Heap_AllocFromHeap(param3, MI_GetUncompressedSize(v0)); + if (allocAtEnd == FALSE) { + uncompBuf = Heap_AllocFromHeap(heapID, MI_GetUncompressedSize(data)); } else { - v1 = Heap_AllocFromHeapAtEnd(param3, MI_GetUncompressedSize(v0)); + uncompBuf = Heap_AllocFromHeapAtEnd(heapID, MI_GetUncompressedSize(data)); } - if (v1) { - MI_UncompressLZ8(v0, v1); - Heap_FreeToHeap(v0); + if (uncompBuf) { + MI_UncompressLZ8(data, uncompBuf); + Heap_FreeToHeap(data); } - v0 = v1; + data = uncompBuf; } } - return v0; + return data; } -void *sub_02007068(u32 narcIndex, u32 fileIndex, BOOL param2, u32 heapID, int param4, u32 *fileSize) +void *LoadMemberFromNARC_OutFileSize(u32 narcID, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd, u32 *fileSize) { - void *v0; + void *data; + *fileSize = NARC_GetMemberSizeByIndexPair(narcID, narcMemberIdx); - *fileSize = NARC_GetMemberSizeByIndexPair(narcIndex, fileIndex); - - if (param2 || (param4 == 1)) { - v0 = Heap_AllocFromHeapAtEnd(heapID, *fileSize); + if (compressed || allocAtEnd == TRUE) { + data = Heap_AllocFromHeapAtEnd(heapID, *fileSize); } else { - v0 = Heap_AllocFromHeap(heapID, *fileSize); + data = Heap_AllocFromHeap(heapID, *fileSize); } - if (v0 != NULL) { - NARC_ReadWholeMemberByIndexPair(v0, narcIndex, fileIndex); - - if (param2) { - void *v1; + if (data != NULL) { + NARC_ReadWholeMemberByIndexPair(data, narcID, narcMemberIdx); - *fileSize = MI_GetUncompressedSize(v0); + if (compressed) { + *fileSize = MI_GetUncompressedSize(data); - if (param4 == 0) { - v1 = Heap_AllocFromHeap(heapID, *fileSize); + void *uncompBuf; + if (allocAtEnd == FALSE) { + uncompBuf = Heap_AllocFromHeap(heapID, *fileSize); } else { - v1 = Heap_AllocFromHeapAtEnd(heapID, *fileSize); + uncompBuf = Heap_AllocFromHeapAtEnd(heapID, *fileSize); } - if (v1) { - MI_UncompressLZ8(v0, v1); - Heap_FreeToHeap(v0); + if (uncompBuf) { + MI_UncompressLZ8(data, uncompBuf); + Heap_FreeToHeap(data); } - v0 = v1; + data = uncompBuf; } } - return v0; + return data; } u32 sub_020070E8(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { - void *v0 = sub_0200723C(param0, param1, param6, param7, 0); + void *v0 = LoadMemberFromOpenNARC(param0, param1, param6, param7, 0); return LoadTilesToBgLayer(v0, param2, param3, param4, param5); } void sub_0200710C(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { - void *v0 = sub_0200723C(param0, param1, param6, param7, 1); + void *v0 = LoadMemberFromOpenNARC(param0, param1, param6, param7, 1); LoadTilemapToBgLayer(v0, param2, param3, param4, param5); } @@ -196,37 +194,37 @@ void sub_02007130(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, void sub_02007148(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6) { - void *v0 = sub_0200723C(param0, param1, 0, param6, 1); + void *v0 = LoadMemberFromOpenNARC(param0, param1, 0, param6, 1); LoadPaletteWithSrcOffset(v0, param2, param3, param4, param5); } void sub_0200716C(NARC *param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5) { - void *v0 = sub_0200723C(param0, param1, 0, param4, 1); + void *v0 = LoadMemberFromOpenNARC(param0, param1, 0, param4, 1); LoadPartialPalette(v0, param2, param3, param5); } u32 sub_0200718C(NARC *param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) { - void *v0 = sub_0200723C(param0, param1, param2, param7, 1); + void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param7, 1); return LoadImageMapping(v0, param3, param4, param5, param6, param8); } void *sub_020071B4(NARC *param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4) { - void *v0 = sub_0200723C(param0, param1, param2, param4, 0); + void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); return GetCharacterData(v0, param3); } void *sub_020071D0(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4) { - void *v0 = sub_0200723C(param0, param1, param2, param4, 0); + void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); return GetScreenData(v0, param3); } void *sub_020071EC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3) { - void *v0 = sub_0200723C(param0, param1, 0, param3, 0); + void *v0 = LoadMemberFromOpenNARC(param0, param1, 0, param3, 0); return GetPaletteData(v0, param2); } @@ -234,59 +232,56 @@ void *sub_02007204(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **p { void *v0; - v0 = sub_0200723C(param0, param1, param2, param4, 0); + v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); return GetCellBank(v0, param3); } void *sub_02007220(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4) { - void *v0 = sub_0200723C(param0, param1, param2, param4, 0); + void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); return GetAnimBank(v0, param3); } -void *sub_0200723C(NARC *narc, u32 NarcFileIndex, BOOL param2, u32 param3, int param4) +void *LoadMemberFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd) { - u32 v0; - - return sub_02007250(narc, NarcFileIndex, param2, param3, param4, &v0); + u32 tmp; + return LoadMemberFromOpenNARC_OutFileSize(narc, narcMemberIdx, compressed, heapID, allocAtEnd, &tmp); } -void *sub_02007250(NARC *narc, u32 NarcFileIndex, BOOL param2, u32 param3, int param4, u32 *param5) +void *LoadMemberFromOpenNARC_OutFileSize(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd, u32 *fileSize) { - void *v0; + void *data; + *fileSize = NARC_GetMemberSize(narc, narcMemberIdx); - *param5 = NARC_GetMemberSize(narc, NarcFileIndex); - - if (param2 || (param4 == 1)) { - v0 = Heap_AllocFromHeapAtEnd(param3, *param5); + if (compressed || allocAtEnd == TRUE) { + data = Heap_AllocFromHeapAtEnd(heapID, *fileSize); } else { - v0 = Heap_AllocFromHeap(param3, *param5); + data = Heap_AllocFromHeap(heapID, *fileSize); } - if (v0 != NULL) { - NARC_ReadWholeMember(narc, NarcFileIndex, v0); - - if (param2) { - void *v1; + if (data != NULL) { + NARC_ReadWholeMember(narc, narcMemberIdx, data); - *param5 = MI_GetUncompressedSize(v0); + if (compressed) { + *fileSize = MI_GetUncompressedSize(data); - if (param4 == 0) { - v1 = Heap_AllocFromHeap(param3, *param5); + void *uncompBuf; + if (allocAtEnd == FALSE) { + uncompBuf = Heap_AllocFromHeap(heapID, *fileSize); } else { - v1 = Heap_AllocFromHeapAtEnd(param3, *param5); + uncompBuf = Heap_AllocFromHeapAtEnd(heapID, *fileSize); } - if (v1) { - MI_UncompressLZ8(v0, v1); - Heap_FreeToHeap(v0); + if (uncompBuf) { + MI_UncompressLZ8(data, uncompBuf); + Heap_FreeToHeap(data); } - v0 = v1; + data = uncompBuf; } } - return v0; + return data; } static u32 LoadTilesToBgLayer(void *ncgrBuffer, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size) diff --git a/src/overlay005/encounter_effect.c b/src/overlay005/encounter_effect.c index d2d15fe783..8e37e06dcf 100644 --- a/src/overlay005/encounter_effect.c +++ b/src/overlay005/encounter_effect.c @@ -1443,7 +1443,7 @@ void ov5_021DF0CC(NARC *param0, u32 param1) v1 = sub_02014784(Unk_ov5_02202120->unk_08); Camera_SetClipping(FX32_ONE, FX32_ONE * 900, v1); - v0 = sub_0200723C(param0, param1, 0, 4, 0); + v0 = LoadMemberFromOpenNARC(param0, param1, 0, 4, 0); sub_020144CC(Unk_ov5_02202120->unk_08, v0, 0 | 0, 0); } diff --git a/src/overlay005/ov5_021D521C.c b/src/overlay005/ov5_021D521C.c index a11041da2b..d69e90a79b 100644 --- a/src/overlay005/ov5_021D521C.c +++ b/src/overlay005/ov5_021D521C.c @@ -147,7 +147,7 @@ static u32 ov5_021D53D4(u32 param0, UnkStruct_ov5_021D52F4 **param1) char v7[256]; UnkStruct_ov5_021D52F4 *v8; - v4 = sub_02006FE8(176, param0, 0, 4, 0); + v4 = LoadMemberFromNARC(176, param0, 0, 4, 0); v3 = v4; v2 = 0; diff --git a/src/overlay005/ov5_021D5EB8.c b/src/overlay005/ov5_021D5EB8.c index bc3fd33b5a..c6d86ca344 100644 --- a/src/overlay005/ov5_021D5EB8.c +++ b/src/overlay005/ov5_021D5EB8.c @@ -813,7 +813,7 @@ static void ov5_021D6290(SpriteResourceTable *param0, int param1, int param2) void *v1; v0 = SpriteResourceTable_GetArrayElement(param0, param1); - v1 = sub_02006FE8(65, param2, 0, 4, 1); + v1 = LoadMemberFromNARC(65, param2, 0, 4, 1); SpriteResourceTable_LoadFromBinary(v1, v0, 4); Heap_FreeToHeap(v1); diff --git a/src/overlay005/ov5_021F6454.c b/src/overlay005/ov5_021F6454.c index 163c482ed4..6dc266e992 100644 --- a/src/overlay005/ov5_021F6454.c +++ b/src/overlay005/ov5_021F6454.c @@ -200,7 +200,7 @@ static u16 *ov5_021F65FC(int heapID, int fileIndex, int *pokedexLength) u32 pokedexSize; u16 *pokedex; - pokedex = sub_02007068(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA, fileIndex, 0, heapID, 0, &pokedexSize); + pokedex = LoadMemberFromNARC_OutFileSize(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA, fileIndex, 0, heapID, 0, &pokedexSize); *pokedexLength = pokedexSize / (sizeof(u16)); return pokedex; diff --git a/src/overlay006/ov6_02246184.c b/src/overlay006/ov6_02246184.c index efaf960850..56ffe5e164 100644 --- a/src/overlay006/ov6_02246184.c +++ b/src/overlay006/ov6_02246184.c @@ -67,7 +67,7 @@ UnkStruct_ov6_02246204 *ov6_02246184(u32 param0, u32 param1) v0 = Heap_AllocFromHeap(param0, sizeof(UnkStruct_ov6_02246204)); memset(v0, 0, sizeof(UnkStruct_ov6_02246204)); - v0->unk_00 = sub_02006FE8(115, param1, 0, param0, 0); + v0->unk_00 = LoadMemberFromNARC(115, param1, 0, param0, 0); v0->unk_10 = param0; v0->unk_0C = param1; v0->unk_04 = Pokemon_New(param0); diff --git a/src/overlay006/ov6_02248050.c b/src/overlay006/ov6_02248050.c index fea72c0512..9d53416771 100644 --- a/src/overlay006/ov6_02248050.c +++ b/src/overlay006/ov6_02248050.c @@ -619,7 +619,7 @@ static void ov6_022487F8(UnkStruct_ov5_021D1BEC *param0, FieldSystem *fieldSyste Easy3DModel_LoadFrom(&v0->unk_00, v2, 8, 4); for (v1 = 0; v1 < 4; v1++) { - v0->unk_CD0[v1] = sub_0200723C(v2, 4 + v1, 0, 4, 0); + v0->unk_CD0[v1] = LoadMemberFromOpenNARC(v2, 4 + v1, 0, 4, 0); } for (v1 = 0; v1 < 16; v1++) { diff --git a/src/overlay017/ov17_02252A70.c b/src/overlay017/ov17_02252A70.c index d159b2fecf..b51caaf3ce 100644 --- a/src/overlay017/ov17_02252A70.c +++ b/src/overlay017/ov17_02252A70.c @@ -28,5 +28,5 @@ u32 ov17_02252A70(const UnkStruct_02029C88 *param0, const u8 *param1) u8 *ov17_02252A9C(u32 param0, u32 param1) { - return sub_02006FE8(90, 3 + param1, 0, param0, 0); + return LoadMemberFromNARC(90, 3 + param1, 0, param0, 0); } diff --git a/src/overlay019/ov19_021D79F8.c b/src/overlay019/ov19_021D79F8.c index dede472f87..05c9e4fffb 100644 --- a/src/overlay019/ov19_021D79F8.c +++ b/src/overlay019/ov19_021D79F8.c @@ -200,7 +200,7 @@ static void ov19_021D7C58(UnkStruct_ov19_021D8318 *param0, const UnkStruct_ov19_ { void *v0; - v0 = sub_02006FE8(18, Unk_ov19_021E0178[param1->unk_01].unk_01, 1, 10, 1); + v0 = LoadMemberFromNARC(18, Unk_ov19_021E0178[param1->unk_01].unk_01, 1, 10, 1); if (v0 != NULL) { NNSG2dCharacterData *v1; @@ -236,7 +236,7 @@ static void ov19_021D7D00(UnkStruct_ov19_021D8318 *param0, const UnkStruct_ov19_ { void *v0; - v0 = sub_02006FE8(18, Unk_ov19_021E0178[param1->unk_01].unk_00, 1, 10, 1); + v0 = LoadMemberFromNARC(18, Unk_ov19_021E0178[param1->unk_01].unk_00, 1, 10, 1); if (v0) { u16 *v1; diff --git a/src/overlay021/ov21_021D3208.c b/src/overlay021/ov21_021D3208.c index 00c0e196fa..8c70432c47 100644 --- a/src/overlay021/ov21_021D3208.c +++ b/src/overlay021/ov21_021D3208.c @@ -704,7 +704,7 @@ static u16 *Pokedex_Sorted_Array(int heapID, int pokedexSort, int *pokedexLength GF_ASSERT(47 > pokedexSort); pokedexDataNarcIndex = Pokedex_Data_NARC_Index(); - pokedexSortedArray = sub_02007068(pokedexDataNarcIndex, 11 + pokedexSort, 0, heapID, 0, &pokedexSize); + pokedexSortedArray = LoadMemberFromNARC_OutFileSize(pokedexDataNarcIndex, 11 + pokedexSort, 0, heapID, 0, &pokedexSize); *pokedexLength = pokedexSize / (sizeof(u16)); return pokedexSortedArray; diff --git a/src/overlay021/ov21_021D57B4.c b/src/overlay021/ov21_021D57B4.c index e93a8eebdf..15145cc8d2 100644 --- a/src/overlay021/ov21_021D57B4.c +++ b/src/overlay021/ov21_021D57B4.c @@ -50,7 +50,7 @@ void ov21_021D57B4(UnkStruct_ov21_021D5844 *param0, int param1, int param2, int break; } - param0->unk_00 = (int *)sub_02007068(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_PLATINUM, v0 + param1, 0, param3, 0, &v1); + param0->unk_00 = (int *)LoadMemberFromNARC_OutFileSize(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_PLATINUM, v0 + param1, 0, param3, 0, &v1); param0->unk_04 = v1 / sizeof(int); } @@ -70,7 +70,7 @@ UnkStruct_ov21_021D5868 *ov21_021D5868(int param0, int *param1) UnkStruct_ov21_021D5868 *v0; u32 v1; - v0 = (UnkStruct_ov21_021D5868 *)sub_02007068(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_PLATINUM, 0, 0, param0, 0, &v1); + v0 = (UnkStruct_ov21_021D5868 *)LoadMemberFromNARC_OutFileSize(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_PLATINUM, 0, 0, param0, 0, &v1); if (param1) { *param1 = v1 / sizeof(UnkStruct_ov21_021D5868); @@ -84,7 +84,7 @@ UnkStruct_ov21_021D5890 *ov21_021D5890(int param0, int *param1) UnkStruct_ov21_021D5890 *v0; u32 v1; - v0 = (UnkStruct_ov21_021D5890 *)sub_02007068(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_PLATINUM, 2, 0, param0, 0, &v1); + v0 = (UnkStruct_ov21_021D5890 *)LoadMemberFromNARC_OutFileSize(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_ENC_PLATINUM, 2, 0, param0, 0, &v1); if (param1) { *param1 = v1 / sizeof(UnkStruct_ov21_021D5890); diff --git a/src/overlay022/ov22_02255094.c b/src/overlay022/ov22_02255094.c index c36d0e83a2..7958d03476 100644 --- a/src/overlay022/ov22_02255094.c +++ b/src/overlay022/ov22_02255094.c @@ -745,7 +745,7 @@ static void ov22_02255ACC(UnkStruct_ov22_0225A0E4 *param0, UnkStruct_ov22_02255C void *v2; for (v0 = 0; v0 < 100; v0++) { - v2 = sub_0200723C(param0->unk_5C, v0 + 1, 0, 14, 1); + v2 = LoadMemberFromOpenNARC(param0->unk_5C, v0 + 1, 0, 14, 1); GF_ASSERT(v2); @@ -755,7 +755,7 @@ static void ov22_02255ACC(UnkStruct_ov22_0225A0E4 *param0, UnkStruct_ov22_02255C param1->unk_00[v1].unk_00 = param0->unk_00; } - v2 = sub_0200723C(param0->unk_5C, 0, 0, 14, 1); + v2 = LoadMemberFromOpenNARC(param0->unk_5C, 0, 0, 14, 1); ResourceCollection_Add(param1->unk_14, v2, 0); NNS_G2dGetUnpackedPaletteData(v2, ¶m1->unk_08[0].unk_04); @@ -771,14 +771,14 @@ static void ov22_02255B50(UnkStruct_ov22_0225A0E4 *param0, UnkStruct_ov22_02255C int v2; for (v0 = 0; v0 < 18; v0++) { - v1 = sub_0200723C(param0->unk_5C, v0 + 206, 0, 14, 1); + v1 = LoadMemberFromOpenNARC(param0->unk_5C, v0 + 206, 0, 14, 1); v2 = v0 + 100; param1->unk_00[v2].unk_04 = ov22_02255340(param0, v1, v2); param1->unk_00[v2].unk_00 = param0->unk_00; v2 = v0 + 1; - v1 = sub_0200723C(param0->unk_5C, (v0) * 4 + 134 + 1, 0, 14, 1); + v1 = LoadMemberFromOpenNARC(param0->unk_5C, (v0) * 4 + 134 + 1, 0, 14, 1); ResourceCollection_Add(param1->unk_14, v1, v2); NNS_G2dGetUnpackedPaletteData(v1, ¶m1->unk_08[v2].unk_04); @@ -791,7 +791,7 @@ static void ov22_02255B50(UnkStruct_ov22_0225A0E4 *param0, UnkStruct_ov22_02255C static void ov22_02255BF4(UnkStruct_ov22_0225A0E4 *param0, int param1) { - param0->unk_30 = sub_0200723C(param0->unk_5C, 235, 0, param1, 0); + param0->unk_30 = LoadMemberFromOpenNARC(param0->unk_5C, 235, 0, param1, 0); } static void ov22_02255C14(UnkStruct_ov22_0225A0E4 *param0) diff --git a/src/overlay022/ov22_02259098.c b/src/overlay022/ov22_02259098.c index d61a23d8ca..cfa96e83a6 100644 --- a/src/overlay022/ov22_02259098.c +++ b/src/overlay022/ov22_02259098.c @@ -27,7 +27,7 @@ void ov22_02259098(UnkStruct_ov22_0225A0E4 *param0, ArchivedSprite *param1) void *v0; NNSG2dCharacterData *v1; - v0 = sub_02006FE8(param1->archive, param1->character, 0, 14, 0); + v0 = LoadMemberFromNARC(param1->archive, param1->character, 0, 14, 0); v1 = ov22_02255340(param0, v0, (100 + 18)); sub_020093A0((u8 *)v1->pRawData, param1->archive); @@ -66,7 +66,7 @@ void ov22_022590D4(UnkStruct_020298D8 *param0, UnkStruct_02007768 *param1, Pokem void *v4; NNSG2dCharacterData *v5; - v4 = sub_02006FE8(param3->archive, param3->character, 0, param4, 0); + v4 = LoadMemberFromNARC(param3->archive, param3->character, 0, param4, 0); NNS_G2dGetUnpackedCharacterData(v4, &v5); sub_020093A0((u8 *)v5->pRawData, param3->archive); diff --git a/src/overlay022/ov22_0225AF8C.c b/src/overlay022/ov22_0225AF8C.c index 95aea268f1..d2ec9f9ddf 100644 --- a/src/overlay022/ov22_0225AF8C.c +++ b/src/overlay022/ov22_0225AF8C.c @@ -464,7 +464,7 @@ static void ov22_0225B5A8(UnkStruct_ov22_0225A0E4 *param0, UnkStruct_ov22_02255C v1 = v3; if (ResourceCollection_IsIDUnused(param1->unk_10, v1) == 1) { - v2 = sub_0200723C(param0->unk_5C, v3 + 1, 0, param3, 1); + v2 = LoadMemberFromOpenNARC(param0->unk_5C, v3 + 1, 0, param3, 1); ResourceCollection_Add(param1->unk_10, v2, v1); NNS_G2dGetUnpackedCharacterData(v2, ¶m1->unk_00[v1].unk_04); @@ -473,7 +473,7 @@ static void ov22_0225B5A8(UnkStruct_ov22_0225A0E4 *param0, UnkStruct_ov22_02255C } } - v2 = sub_0200723C(param0->unk_5C, 0, 0, param3, 1); + v2 = LoadMemberFromOpenNARC(param0->unk_5C, 0, 0, param3, 1); ResourceCollection_Add(param1->unk_14, v2, 0); NNS_G2dGetUnpackedPaletteData(v2, ¶m1->unk_08[0].unk_04); diff --git a/src/overlay025/ov25_02255540.c b/src/overlay025/ov25_02255540.c index 3503733a96..208208731d 100644 --- a/src/overlay025/ov25_02255540.c +++ b/src/overlay025/ov25_02255540.c @@ -304,8 +304,8 @@ void ov25_02255950(UnkStruct_ov25_022558C4 *param0, u16 param1) BOOL ov25_02255958(UnkStruct_ov25_02255958 *param0, u32 param1, u32 param2, u32 param3, int param4) { param0->unk_10 = param4; - param0->unk_00 = sub_02006FD8(param1, param2, param4); - param0->unk_04 = sub_02006FD8(param1, param3, param4); + param0->unk_00 = LoadCompressedMemberFromNARC(param1, param2, param4); + param0->unk_04 = LoadCompressedMemberFromNARC(param1, param3, param4); if ((param0->unk_00 != NULL) && (param0->unk_04 != NULL)) { if (!NNS_G2dGetUnpackedCellBank(param0->unk_00, &(param0->unk_08))) { diff --git a/src/overlay062/ov62_02231690.c b/src/overlay062/ov62_02231690.c index 3298b2792b..e34789d950 100644 --- a/src/overlay062/ov62_02231690.c +++ b/src/overlay062/ov62_02231690.c @@ -192,7 +192,7 @@ u16 *ov62_Pokedex_Alphabetical(int heapID, int unused, int *pokedexLength) u32 pokedexSize; u16 *pokedexAlphabetical; - pokedexAlphabetical = sub_02007068(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA, 13, 0, heapID, 0, &pokedexSize); + pokedexAlphabetical = LoadMemberFromNARC_OutFileSize(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA, 13, 0, heapID, 0, &pokedexSize); *pokedexLength = pokedexSize / sizeof(u16); return pokedexAlphabetical; diff --git a/src/overlay066/ov66_022343A8.c b/src/overlay066/ov66_022343A8.c index bd82b8ac7e..9b1283fa24 100644 --- a/src/overlay066/ov66_022343A8.c +++ b/src/overlay066/ov66_022343A8.c @@ -184,7 +184,7 @@ UnkStruct_ov66_02234548 *ov66_022343A8(u32 param0, u32 param1, u32 param2, u32 p v4 = NARC_ctor(NARC_INDEX_GRAPHIC__WIFI_LOBBY_OTHER, param2); { - v5 = sub_0200723C(v4, 127, 0, param3, 0); + v5 = LoadMemberFromOpenNARC(v4, 127, 0, param3, 0); ResourceCollection_Add(v0->unk_00, v5, 127); ov66_02231668(v5); @@ -200,7 +200,7 @@ UnkStruct_ov66_02234548 *ov66_022343A8(u32 param0, u32 param1, u32 param2, u32 p { for (v6 = 0; v6 < 2; v6++) { - v5 = sub_0200723C(v3, Unk_ov66_02258B28[v6], 0, param3, 0); + v5 = LoadMemberFromOpenNARC(v3, Unk_ov66_02258B28[v6], 0, param3, 0); ResourceCollection_Add(v0->unk_04, v5, Unk_ov66_02258B28[v6]); } } @@ -227,7 +227,7 @@ UnkStruct_ov66_02234548 *ov66_022343A8(u32 param0, u32 param1, u32 param2, u32 p v11 = 0; } - v5 = sub_0200723C(v3, Unk_ov66_02258B38[v6].unk_02_0, 0, param3, 0); + v5 = LoadMemberFromOpenNARC(v3, Unk_ov66_02258B38[v6].unk_02_0, 0, param3, 0); v9 = TextureResourceManager_AddTexture(v0->unk_08, v5, Unk_ov66_02258B38[v6].unk_02_0, v11, param3); if (v11 == 1) { diff --git a/src/overlay066/ov66_02234EA8.c b/src/overlay066/ov66_02234EA8.c index bcfa694a18..322b883498 100644 --- a/src/overlay066/ov66_02234EA8.c +++ b/src/overlay066/ov66_02234EA8.c @@ -59,7 +59,7 @@ static void ov66_02234F2C(NARC *param0, u32 param1, u16 param2, u8 param3, fx32 u32 v3; int v4; - v1 = sub_02007250(param0, 18, 0, param1, 0, &v3); + v1 = LoadMemberFromOpenNARC_OutFileSize(param0, 18, 0, param1, 0, &v3); v2 = (UnkStruct_ov92_021D1530 *)v1; v4 = v3 / 6; @@ -81,7 +81,7 @@ static void ov66_02234F2C(NARC *param0, u32 param1, u16 param2, u8 param3, fx32 v9 = sub_020996D4(param2); v8 = sub_02099764(v9); - v5 = sub_02007250(param0, v8, 0, param1, 0, &v7); + v5 = LoadMemberFromOpenNARC_OutFileSize(param0, v8, 0, param1, 0, &v7); v6 = (UnkStruct_ov69_0225C980 *)v5; v10 = v7 / 4; diff --git a/src/overlay069/ov69_0225C700.c b/src/overlay069/ov69_0225C700.c index 3d2f48a9ef..4894ab2625 100644 --- a/src/overlay069/ov69_0225C700.c +++ b/src/overlay069/ov69_0225C700.c @@ -806,7 +806,7 @@ static void ov69_0225C980(UnkStruct_ov69_0225CA7C *param0, const UnkStruct_ov66_ u32 v3; int v4, v5; - v1 = sub_02007250(v0, 18, 0, param2, 0, &v3); + v1 = LoadMemberFromOpenNARC_OutFileSize(v0, 18, 0, param2, 0, &v3); v2 = (UnkStruct_ov92_021D1530 *)v1; v5 = v3 / 6; @@ -834,7 +834,7 @@ static void ov69_0225C980(UnkStruct_ov69_0225CA7C *param0, const UnkStruct_ov66_ while (v12 < v11) { v9 = sub_02099764(v12); - v6 = sub_02007250(v0, v9, 0, param2, 0, &v8); + v6 = LoadMemberFromOpenNARC_OutFileSize(v0, v9, 0, param2, 0, &v8); v7 = (UnkStruct_ov69_0225C980 *)v6; v13 = v8 / 4; diff --git a/src/overlay070/ov70_0225C700.c b/src/overlay070/ov70_0225C700.c index 6c786df91a..06b9069101 100644 --- a/src/overlay070/ov70_0225C700.c +++ b/src/overlay070/ov70_0225C700.c @@ -35,7 +35,7 @@ void ov70_0225C730(void **param0, NARC *param1, u32 param2, u32 param3) NNSGfdPlttKey v4; NNSG3dResTex *v5; - v1 = sub_0200723C(param1, param2, 0, param3, 1); + v1 = LoadMemberFromOpenNARC(param1, param2, 0, param3, 1); { v5 = NNS_G3dGetTex(v1); diff --git a/src/overlay070/ov70_0225C858.c b/src/overlay070/ov70_0225C858.c index f06e517b1b..c9c45b15d6 100644 --- a/src/overlay070/ov70_0225C858.c +++ b/src/overlay070/ov70_0225C858.c @@ -21,7 +21,7 @@ UnkStruct_ov70_0225C894 *ov70_0225C858(u32 param0) v0 = Heap_AllocFromHeap(param0, sizeof(UnkStruct_ov70_0225C894)); v0->unk_00 = ov63_0222BCE8(35, 42, param0); - v1 = sub_02006FE8(174, 0, 0, param0, 1); + v1 = LoadMemberFromNARC(174, 0, 0, param0, 1); ov63_0222BD50(v0->unk_00, v1); Heap_FreeToHeap(v1); diff --git a/src/overlay070/ov70_0225D9A4.c b/src/overlay070/ov70_0225D9A4.c index 0b8f1c05bf..fa030c14e9 100644 --- a/src/overlay070/ov70_0225D9A4.c +++ b/src/overlay070/ov70_0225D9A4.c @@ -2638,7 +2638,7 @@ static void ov70_0225FDA0(UnkStruct_ov70_0225F350 *param0, UnkStruct_ov70_0225FA if (v0 != 0) { v2 = ov66_022316E8(v0); - v3 = sub_02006FE8(sub_0207C944(), sub_0207C908(v2), 1, param3, 1); + v3 = LoadMemberFromNARC(sub_0207C944(), sub_0207C908(v2), 1, param3, 1); NNS_G2dGetUnpackedCharacterData(v3, &v4); diff --git a/src/overlay070/ov70_02260B44.c b/src/overlay070/ov70_02260B44.c index 654a630767..f741e5f248 100644 --- a/src/overlay070/ov70_02260B44.c +++ b/src/overlay070/ov70_02260B44.c @@ -564,7 +564,7 @@ static UnkStruct_ov70_02261418 *ov70_022613F4(int param0, int param1, u32 param2 v1 = (param1 * 5) + param0; GF_ASSERT(v1 < (5 * 5)); - v0 = sub_02006FE8(174, 1 + v1, 0, param2, 1); + v0 = LoadMemberFromNARC(174, 1 + v1, 0, param2, 1); return v0; } @@ -787,7 +787,7 @@ static void ov70_0226174C(UnkStruct_ov70_022618C8 *param0, NARC *param1, NNSFndA { for (v0 = 0; v0 < 2; v0++) { - param0->unk_00[v0].data = sub_0200723C(param1, param3->unk_120[v0], 0, param4, 0); + param0->unk_00[v0].data = LoadMemberFromOpenNARC(param1, param3->unk_120[v0], 0, param4, 0); param0->unk_00[v0].set = NNS_G3dGetMdlSet(param0->unk_00[v0].data); param0->unk_00[v0].model = NNS_G3dGetMdlByIdx(param0->unk_00[v0].set, 0); param0->unk_00[v0].texture = NNS_G3dGetTex(param0->unk_20[v0][0]); @@ -954,7 +954,7 @@ static void ov70_02261B24(UnkStruct_ov70_02261BB4 *param0, NARC *param1, NNSFndA for (v1 = 0; v1 < 3; v1++) { if (param3->unk_48[v0][v1] != param3->unk_00[v0]) { - param0->unk_120[v0][v1] = sub_0200723C(param1, param3->unk_48[v0][v1], 0, param4, 0); + param0->unk_120[v0][v1] = LoadMemberFromOpenNARC(param1, param3->unk_48[v0][v1], 0, param4, 0); } else { param0->unk_120[v0][v1] = NULL; } diff --git a/src/overlay070/ov70_02269190.c b/src/overlay070/ov70_02269190.c index f86613848e..e65fbb88b7 100644 --- a/src/overlay070/ov70_02269190.c +++ b/src/overlay070/ov70_02269190.c @@ -795,7 +795,7 @@ static void ov70_02269540(UnkStruct_ov70_02269204 *param0, NARC *param1, u32 par int v0; for (v0 = 0; v0 < 15; v0++) { - param0->unk_10550[v0].data = sub_0200723C(param1, 129 + v0, 0, param2, 0); + param0->unk_10550[v0].data = LoadMemberFromOpenNARC(param1, 129 + v0, 0, param2, 0); param0->unk_10550[v0].set = NNS_G3dGetMdlSet(param0->unk_10550[v0].data); param0->unk_10550[v0].model = NNS_G3dGetMdlByIdx(param0->unk_10550[v0].set, 0); param0->unk_10550[v0].texture = NULL; diff --git a/src/overlay071/ov71_0223B140.c b/src/overlay071/ov71_0223B140.c index 0cf3573672..4b9ee2ba5a 100644 --- a/src/overlay071/ov71_0223B140.c +++ b/src/overlay071/ov71_0223B140.c @@ -701,7 +701,7 @@ static void ov71_0223B968(UnkStruct_ov71_0223B620 *param0, NARC *param1) { BOOL v7; - param0->unk_30B8 = sub_0200723C(param1, v4, 0, 25, 0); + param0->unk_30B8 = LoadMemberFromOpenNARC(param1, v4, 0, 25, 0); GF_ASSERT(param0->unk_30B8 != NULL); v7 = NNS_G2dGetUnpackedBGCharacterData(param0->unk_30B8, ¶m0->unk_30BC); @@ -721,7 +721,7 @@ static void ov71_0223B968(UnkStruct_ov71_0223B620 *param0, NARC *param1) { BOOL v8; - param0->unk_30B8 = sub_0200723C(param1, Unk_ov71_0223D604[param0->unk_B4->unk_05], 0, 25, 0); + param0->unk_30B8 = LoadMemberFromOpenNARC(param1, Unk_ov71_0223D604[param0->unk_B4->unk_05], 0, 25, 0); GF_ASSERT(param0->unk_30B8 != NULL); v8 = NNS_G2dGetUnpackedBGCharacterData(param0->unk_30B8, ¶m0->unk_30BC); diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index a48f26e732..2c376c546d 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -1174,7 +1174,7 @@ static void ov88_0223C44C(BgConfig *param0) static void ov88_0223C488(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { - void *v0 = sub_0200723C(param0, param1, param6, param7, 1); + void *v0 = LoadMemberFromOpenNARC(param0, param1, param6, param7, 1); if (v0 != NULL) { NNSG2dScreenData *v1; diff --git a/src/overlay092/ov92_021D0D80.c b/src/overlay092/ov92_021D0D80.c index 9b61dcd206..0e2f58149b 100644 --- a/src/overlay092/ov92_021D0D80.c +++ b/src/overlay092/ov92_021D0D80.c @@ -735,7 +735,7 @@ static void ov92_021D1530(UnkStruct_ov92_021D1B24 *param0) u32 v3; int v4, v5; - v1 = sub_02007250(v0, 18, 0, param0->unk_00, 0, &v3); + v1 = LoadMemberFromOpenNARC_OutFileSize(v0, 18, 0, param0->unk_00, 0, &v3); v2 = (UnkStruct_ov92_021D1530 *)v1; v5 = v3 / 6; @@ -763,7 +763,7 @@ static void ov92_021D1530(UnkStruct_ov92_021D1B24 *param0) while (v12 < v11) { v9 = sub_02099764(v12); - v6 = sub_02007250(v0, v9, 0, param0->unk_00, 0, &v8); + v6 = LoadMemberFromOpenNARC_OutFileSize(v0, v9, 0, param0->unk_00, 0, &v8); v7 = (UnkStruct_ov69_0225C980 *)v6; v13 = v8 / 4; diff --git a/src/overlay094/ov94_022414B8.c b/src/overlay094/ov94_022414B8.c index daa2721e18..fea4de11bc 100644 --- a/src/overlay094/ov94_022414B8.c +++ b/src/overlay094/ov94_022414B8.c @@ -1013,7 +1013,7 @@ u16 *ov94_Pokedex_Alphabetical(int heapID, int unused, int *pokedexLength) u32 pokedexSize; u16 *pokedexAlphabetical; - pokedexAlphabetical = sub_02007068(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA, 13, 0, heapID, 0, &pokedexSize); + pokedexAlphabetical = LoadMemberFromNARC_OutFileSize(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA, 13, 0, heapID, 0, &pokedexSize); *pokedexLength = pokedexSize / (sizeof(u16)); return pokedexAlphabetical; @@ -1027,7 +1027,7 @@ u8 *ov94_02242548(int param0) MI_CpuClearFast(v4, NATIONAL_DEX_COUNT + 1); - v3 = sub_02007068(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA, 12, 0, param0, 0, &v0); + v3 = LoadMemberFromNARC_OutFileSize(NARC_INDEX_APPLICATION__ZUKANLIST__ZKN_DATA__ZUKAN_DATA, 12, 0, param0, 0, &v0); v1 = v0 / (sizeof(u16)); for (v2 = 0; v2 < v1; v2++) { diff --git a/src/overlay095/ov95_022476F0.c b/src/overlay095/ov95_022476F0.c index 219a2de5a5..a37a9430d0 100644 --- a/src/overlay095/ov95_022476F0.c +++ b/src/overlay095/ov95_022476F0.c @@ -142,7 +142,7 @@ UnkStruct_ov95_02247958 *ov95_022478B4(UnkStruct_ov95_0224773C *param0, int para { UnkStruct_ov95_02247958 *v0 = ¶m0->unk_18[param1]; - v0->unk_00 = sub_02006FE8(param2, param3, 0, 58, 1); + v0->unk_00 = LoadMemberFromNARC(param2, param3, 0, 58, 1); DC_FlushRange(v0->unk_00, NARC_GetMemberSizeByIndexPair(param2, param3)); if (v0->unk_00) { diff --git a/src/overlay097/ov97_02230410.c b/src/overlay097/ov97_02230410.c index eed7b4033f..3aa41091e1 100644 --- a/src/overlay097/ov97_02230410.c +++ b/src/overlay097/ov97_02230410.c @@ -706,7 +706,7 @@ static int ov97_02230F20(UnkStruct_ov97_02230868 *param0, int param1, int param2 static void ov97_02230F58(UnkStruct_ov97_02230868 *param0, u32 param1, u32 param2, u32 param3) { NNSG2dScreenData *v0; - void *v1 = sub_02006FE8(116, param1, 1, param0->unk_00, 1); + void *v1 = LoadMemberFromNARC(116, param1, 1, param0->unk_00, 1); NNS_G2dGetUnpackedScreenData(v1, &v0); diff --git a/src/overlay097/ov97_02237694.c b/src/overlay097/ov97_02237694.c index 4567a709a7..500c3054ea 100644 --- a/src/overlay097/ov97_02237694.c +++ b/src/overlay097/ov97_02237694.c @@ -676,7 +676,7 @@ void ov97_02238194(BgConfig *param0, UnkStruct_0202DF40 *param1) { NNSG2dScreenData *v3; - void *v4 = sub_02006FE8(116, 31, 1, v2->unk_08, 1); + void *v4 = LoadMemberFromNARC(116, 31, 1, v2->unk_08, 1); NNS_G2dGetUnpackedScreenData(v4, &v3); diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index cb1f3f87e5..ea7342c2a6 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -1128,13 +1128,13 @@ static BOOL ov113_0225D938(int param0, int param1, CellActorData *param2, NARC * } if (PokemonHasOverworldFootprint(param0, param1, param6) == 1) { - v2 = sub_0200723C(param4, 3 + param0, 1, 118, 1); + v2 = LoadMemberFromOpenNARC(param4, 3 + param0, 1, 118, 1); NNS_G2dGetUnpackedCharacterData(v2, &v3); DC_FlushRange(v3->pRawData, 0x20 * 8); v4 = &((u8 *)v3->pRawData)[0x20 * 4]; v5 = v3->pRawData; } else { - v2 = sub_0200723C(param3, 16, 0, 118, 1); + v2 = LoadMemberFromOpenNARC(param3, 16, 0, 118, 1); NNS_G2dGetUnpackedCharacterData(v2, &v3); DC_FlushRange(v3->pRawData, 0x20 * 4); v4 = v3->pRawData; diff --git a/src/overlay113/ov113_0225E368.c b/src/overlay113/ov113_0225E368.c index 9c7b53b404..52fdd1c861 100644 --- a/src/overlay113/ov113_0225E368.c +++ b/src/overlay113/ov113_0225E368.c @@ -568,7 +568,7 @@ static UnkStruct_ov113_0225E6B8 *ov113_0225E6B8(UnkStruct_ov113_0225DBCC *param0 static BOOL ov113_0225E774(UnkStruct_ov113_0225EB20 *param0, Easy3DModel *param1, NARC *param2, NARC *param3, const UnkStruct_ov113_02260818 *param4, BOOL param5) { - param1->data = sub_0200723C(param2, 29, 0, 118, 0); + param1->data = LoadMemberFromOpenNARC(param2, 29, 0, 118, 0); { BOOL v0; @@ -677,10 +677,10 @@ static void ov113_0225E920(NNSG3dResTex *param0, NARC *param1, NARC *param2, con v1 = (u8 *)((u8 *)param0 + param0->texInfo.ofsTex); if (v4 == 1) { - v2 = sub_0200723C(param2, 3 + param3->unk_02, 1, 118, 1); + v2 = LoadMemberFromOpenNARC(param2, 3 + param3->unk_02, 1, 118, 1); NNS_G2dGetUnpackedCharacterData(v2, &v3); } else { - v2 = sub_0200723C(param1, 16, 0, 118, 1); + v2 = LoadMemberFromOpenNARC(param1, 16, 0, 118, 1); NNS_G2dGetUnpackedCharacterData(v2, &v3); } diff --git a/src/overlay115/ov115_02260440.c b/src/overlay115/ov115_02260440.c index d0eb1543ab..67f597d3fc 100644 --- a/src/overlay115/ov115_02260440.c +++ b/src/overlay115/ov115_02260440.c @@ -529,7 +529,7 @@ static void ov115_02260ADC(UnkStruct_ov115_0226095C *param0, u32 param1) u32 v0; int v1; - param0->unk_48.unk_04 = sub_02007068(NARC_INDEX_APPLICATION__BUCKET__BALLSLOW_DATA, 0, 0, param1, 0, &v0); + param0->unk_48.unk_04 = LoadMemberFromNARC_OutFileSize(NARC_INDEX_APPLICATION__BUCKET__BALLSLOW_DATA, 0, 0, param1, 0, &v0); param0->unk_48.unk_00 = v0 / sizeof(UnkStruct_ov115_02262DC4); for (v1 = 0; v1 < param0->unk_08.unk_08; v1++) { diff --git a/src/pokedex_heightweight.c b/src/pokedex_heightweight.c index 3f226c66a2..29ced26ff7 100644 --- a/src/pokedex_heightweight.c +++ b/src/pokedex_heightweight.c @@ -128,36 +128,36 @@ short Pokedex_HeightWeightData_PokemonScale(const HeightWeightData *HWData, int static int *Pokedex_Height_Array(NARC *pokedexDataNARC, int param1) { - void *height = sub_0200723C(pokedexDataNARC, 0, 0, param1, 0); + void *height = LoadMemberFromOpenNARC(pokedexDataNARC, 0, 0, param1, 0); return (int *)height; } static int *Pokedex_Weight_Array(NARC *pokedexDataNARC, int param1) { - void *weight = sub_0200723C(pokedexDataNARC, 1, 0, param1, 0); + void *weight = LoadMemberFromOpenNARC(pokedexDataNARC, 1, 0, param1, 0); return (int *)weight; } static void Pokedex_Comparison_Pos_M_Array(NARC *pokedexDataNARC, short **trainerPos, short **pokemonPos, int param3) { - *trainerPos = (short *)sub_0200723C(pokedexDataNARC, 9, 0, param3, 0); - *pokemonPos = (short *)sub_0200723C(pokedexDataNARC, 10, 0, param3, 0); + *trainerPos = (short *)LoadMemberFromOpenNARC(pokedexDataNARC, 9, 0, param3, 0); + *pokemonPos = (short *)LoadMemberFromOpenNARC(pokedexDataNARC, 10, 0, param3, 0); } static void Pokedex_Comparison_Pos_F_Array(NARC *pokedexDataNARC, short **trainerPos, short **pokemonPos, int param3) { - *trainerPos = (short *)sub_0200723C(pokedexDataNARC, 7, 0, param3, 0); - *pokemonPos = (short *)sub_0200723C(pokedexDataNARC, 8, 0, param3, 0); + *trainerPos = (short *)LoadMemberFromOpenNARC(pokedexDataNARC, 7, 0, param3, 0); + *pokemonPos = (short *)LoadMemberFromOpenNARC(pokedexDataNARC, 8, 0, param3, 0); } static void Pokedex_Comparison_Scale_M_Array(NARC *pokedexDataNARC, short **trainerScale, short **pokemonScale, int param3) { - *trainerScale = (short *)sub_0200723C(pokedexDataNARC, 5, 0, param3, 0); - *pokemonScale = (short *)sub_0200723C(pokedexDataNARC, 6, 0, param3, 0); + *trainerScale = (short *)LoadMemberFromOpenNARC(pokedexDataNARC, 5, 0, param3, 0); + *pokemonScale = (short *)LoadMemberFromOpenNARC(pokedexDataNARC, 6, 0, param3, 0); } static void Pokedex_Comparison_Scale_F_Array(NARC *pokedexDataNARC, short **trainerScale, short **pokemonScale, int param3) { - *trainerScale = (short *)sub_0200723C(pokedexDataNARC, 3, 0, param3, 0); - *pokemonScale = (short *)sub_0200723C(pokedexDataNARC, 4, 0, param3, 0); + *trainerScale = (short *)LoadMemberFromOpenNARC(pokedexDataNARC, 3, 0, param3, 0); + *pokemonScale = (short *)LoadMemberFromOpenNARC(pokedexDataNARC, 4, 0, param3, 0); } diff --git a/src/sprite_resource.c b/src/sprite_resource.c index f99af19057..0e3aa2418e 100644 --- a/src/sprite_resource.c +++ b/src/sprite_resource.c @@ -824,7 +824,7 @@ static void SpriteResourceCollection_InitResFromFile(SpriteResourceCollection *s static void SpriteResourceCollection_InitRes(SpriteResourceCollection *spriteResources, SpriteResource *spriteRes, int narcIdx, int memberIdx, BOOL compressed, int id, NNS_G2D_VRAM_TYPE vramType, int paletteIdx, enum SpriteResourceType type, enum HeapId heapID, BOOL allocAtEnd) { - void *data = sub_02006FE8(narcIdx, memberIdx, compressed, heapID, allocAtEnd); + void *data = LoadMemberFromNARC(narcIdx, memberIdx, compressed, heapID, allocAtEnd); spriteRes->rawResource = ResourceCollection_Add(spriteResources->collection, data, id); spriteRes->type = type; diff --git a/src/unk_02014D38.c b/src/unk_02014D38.c index fca04cd085..9da9e402ab 100644 --- a/src/unk_02014D38.c +++ b/src/unk_02014D38.c @@ -349,7 +349,7 @@ UnkStruct_02014FB0 *sub_02014FB0(u32 heapID) v0 = Heap_AllocFromHeap(heapID, sizeof(UnkStruct_02014FB0)); memset(v0, 0, sizeof(UnkStruct_02014FB0)); - v0->unk_04 = sub_02007068(NARC_INDEX_RESOURCE__ENG__PMS_AIKOTOBA__PMS_AIKOTOBA, 0, 0, heapID, 0, &fileSize); + v0->unk_04 = LoadMemberFromNARC_OutFileSize(NARC_INDEX_RESOURCE__ENG__PMS_AIKOTOBA__PMS_AIKOTOBA, 0, 0, heapID, 0, &fileSize); v0->unk_00 = fileSize / sizeof(u32); return v0; diff --git a/src/unk_0205CA94.c b/src/unk_0205CA94.c index b60daee623..8971ead827 100644 --- a/src/unk_0205CA94.c +++ b/src/unk_0205CA94.c @@ -456,7 +456,7 @@ static void sub_0205D0D8(UnkStruct_0205D094 *param0, int param1, u32 param2) sub_0200A41C(param0->unk_18[0]); sub_0200A684(param0->unk_18[1]); - v1 = sub_02006FE8(177, 4, 0, 4, 0); + v1 = LoadMemberFromNARC(177, 4, 0, 4, 0); param0->unk_04 = sub_02009508(v1, 4, param0->unk_08[0], param0->unk_08[1], param0->unk_08[2], param0->unk_08[3], NULL, NULL); Heap_FreeToHeap(v1); @@ -470,7 +470,7 @@ static int sub_0205D1C4(SpriteResourceCollection *param0, SpriteResourceList **p void *v3; v0 = Heap_AllocFromHeapAtEnd(4, SpriteResourceTable_Size()); - v3 = sub_02006FE8(177, param2, 0, 4, 0); + v3 = LoadMemberFromNARC(177, param2, 0, 4, 0); SpriteResourceTable_LoadFromBinary(v3, v0, 4); Heap_FreeToHeap(v3); diff --git a/src/unk_02073838.c b/src/unk_02073838.c index 39e5169a23..e86c28fa28 100644 --- a/src/unk_02073838.c +++ b/src/unk_02073838.c @@ -55,7 +55,7 @@ void sub_02073848(UnkStruct_02073838 *param0, NNSG3dResFileHeader *param1, u32 p void sub_0207389C(UnkStruct_02073838 *param0, u32 param1, NARC *param2, u32 param3, u32 param4, int param5) { - NNSG3dResFileHeader *v0 = sub_0200723C(param2, param3, 0, param4, param5); + NNSG3dResFileHeader *v0 = LoadMemberFromOpenNARC(param2, param3, 0, param4, param5); sub_02073848(param0, v0, param1); } @@ -139,7 +139,7 @@ void sub_020739A8(UnkStruct_02073974 *param0, UnkStruct_02073974 *param1, u32 pa void sub_020739B4(UnkStruct_02073974 *param0, u32 param1, NARC *param2, u32 param3, u32 param4, int param5) { - void *v0 = sub_0200723C(param2, param3, 0, param4, param5); + void *v0 = LoadMemberFromOpenNARC(param2, param3, 0, param4, param5); sub_02073980(param0, v0, param1); } diff --git a/src/unk_02082C2C.c b/src/unk_02082C2C.c index 75d9c8e4ef..4e7a681a38 100644 --- a/src/unk_02082C2C.c +++ b/src/unk_02082C2C.c @@ -122,7 +122,7 @@ void sub_02082DA8(GameWindowLayout *param0, u8 param1) v3 = Pokemon_GetValue(v0, MON_DATA_FORM, NULL); v1 = NARC_ctor(NARC_INDEX_POKETOOL__ICONGRA__PL_POKE_ICON, 12); v4 = NNS_G2dGetImageLocation(SpriteActor_ImageProxy(param0->unk_704[param1].unk_24), NNS_G2D_VRAM_TYPE_2DMAIN); - v5 = sub_0200723C(v1, Pokemon_IconSpriteIndex(v0), 0, 12, 1); + v5 = LoadMemberFromOpenNARC(v1, Pokemon_IconSpriteIndex(v0), 0, 12, 1); v7 = NNS_G2dGetUnpackedCharacterData(v5, &v6); if (v7) { diff --git a/src/unk_02094EDC.c b/src/unk_02094EDC.c index 4ae892cbce..a7698dacb7 100644 --- a/src/unk_02094EDC.c +++ b/src/unk_02094EDC.c @@ -418,7 +418,7 @@ void sub_02094F04(UnkStruct_02095C48 *param0, int param1, int param2, int param3 break; } - v9 = sub_02006FE8(90, 0, 0, param1, 1); + v9 = LoadMemberFromNARC(90, 0, 0, param1, 1); v6 = NARC_GetMemberSizeByIndexPair(NARC_INDEX_CONTEST__DATA__CONTEST_DATA, 0) / sizeof(UnkStruct_ov6_02248BE8); v2 = Heap_AllocFromHeapAtEnd(param1, v6 + 1); @@ -530,7 +530,7 @@ void sub_020951B0(UnkStruct_02095C48 *param0, int param1) int v4; int v5; - v2 = sub_02006FE8(90, 2, 0, param1, 1); + v2 = LoadMemberFromNARC(90, 2, 0, param1, 1); switch (param0->unk_00.unk_111) { case 4: @@ -694,7 +694,7 @@ void sub_020954F0(UnkStruct_02095C48 *param0, int param1, int param2, int param3 UnkStruct_020954F0 *v6; u8 *v7, *v8; - v6 = sub_02006FE8(90, 1, 0, param1, 1); + v6 = LoadMemberFromNARC(90, 1, 0, param1, 1); v5 = NARC_GetMemberSizeByIndexPair(NARC_INDEX_CONTEST__DATA__CONTEST_DATA, 1) / sizeof(UnkStruct_020954F0); v7 = Heap_AllocFromHeapAtEnd(param1, v5 + 1); v8 = Heap_AllocFromHeapAtEnd(param1, v5 + 1); From fa194563da6d87918b4be799b03c32a71d7946a5 Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 16:33:13 -0700 Subject: [PATCH 10/11] Identify extern functions in graphics.h --- include/graphics.h | 48 ++++----- include/inlines.h | 2 +- src/battle/ov16_0223B140.c | 8 +- src/battle/ov16_0226871C.c | 16 +-- src/choose_starter/choose_starter_app.c | 8 +- src/font.c | 4 +- src/graphics.c | 52 +++++----- src/library_tv/library_tv.c | 14 +-- src/overlay005/encounter_effect.c | 8 +- src/overlay005/encounter_effect_core.c | 4 +- src/overlay005/ov5_021DD6FC.c | 4 +- src/overlay005/ov5_021F007C.c | 4 +- src/overlay006/ov6_0223E140.c | 6 +- src/overlay007/ov7_0224CD28.c | 10 +- src/overlay010/ov10_0221F800.c | 14 +-- src/overlay012/ov12_0221FC20.c | 24 ++--- src/overlay012/ov12_02226B84.c | 8 +- src/overlay012/ov12_02234E44.c | 4 +- src/overlay013/ov13_0221FC20.c | 4 +- src/overlay013/ov13_022264F4.c | 6 +- src/overlay017/ov17_0223B140.c | 12 +-- src/overlay017/ov17_0223CB1C.c | 12 +-- src/overlay017/ov17_0223DAD0.c | 4 +- src/overlay017/ov17_0223F7E4.c | 4 +- src/overlay017/ov17_022413D8.c | 2 +- src/overlay017/ov17_02247A48.c | 2 +- src/overlay017/ov17_022492DC.c | 14 +-- src/overlay017/ov17_0224F4D4.c | 4 +- src/overlay017/ov17_02250744.c | 10 +- src/overlay019/ov19_021D61B0.c | 10 +- src/overlay019/ov19_021D79F8.c | 2 +- src/overlay019/ov19_021D8B54.c | 6 +- src/overlay019/ov19_021DA270.c | 12 +-- src/overlay019/ov19_021DA814.c | 6 +- src/overlay019/ov19_021DA92C.c | 14 +-- src/overlay019/ov19_021DB2FC.c | 6 +- src/overlay019/ov19_021DB8E4.c | 18 ++-- src/overlay019/ov19_021DC5F0.c | 2 +- src/overlay019/ov19_021DCF88.c | 24 ++--- src/overlay019/ov19_021DE3E8.c | 10 +- src/overlay019/ov19_021DEC04.c | 24 ++--- src/overlay020/ov20_021D2098.c | 8 +- src/overlay020/ov20_021D2EA4.c | 12 +-- src/overlay020/ov20_021D3864.c | 4 +- src/overlay020/ov20_021D3A54.c | 4 +- src/overlay020/ov20_021D4728.c | 16 +-- src/overlay021/ov21_021E8D48.c | 22 ++--- src/overlay022/ov22_022597BC.c | 10 +- src/overlay022/ov22_0225B660.c | 12 +-- src/overlay023/ov23_0223E140.c | 18 ++-- src/overlay023/ov23_02241F74.c | 2 +- src/overlay023/ov23_0224340C.c | 8 +- src/overlay023/ov23_02248F1C.c | 8 +- src/overlay023/ov23_0224B05C.c | 2 +- src/overlay024/ov24_02253CE0.c | 6 +- src/overlay025/ov25_02254560.c | 12 +-- src/overlay025/ov25_02255090.c | 2 +- src/overlay026/ov26_02256404.c | 6 +- src/overlay027/ov27_0225680C.c | 8 +- src/overlay028/ov28_0225697C.c | 4 +- src/overlay029/ov29_022566C8.c | 6 +- src/overlay030/ov30_022563EC.c | 6 +- src/overlay032/ov32_02256470.c | 4 +- src/overlay033/ov33_02256474.c | 4 +- src/overlay034/ov34_02256540.c | 6 +- src/overlay035/ov35_02256410.c | 8 +- src/overlay036/ov36_02256404.c | 8 +- src/overlay037/ov37_022563D4.c | 6 +- src/overlay038/ov38_0225632C.c | 4 +- src/overlay039/ov39_022563DC.c | 4 +- src/overlay040/ov40_0225645C.c | 6 +- src/overlay041/ov41_022567B0.c | 6 +- src/overlay042/ov42_022563D4.c | 6 +- src/overlay043/ov43_02256544.c | 6 +- src/overlay044/ov44_022565BC.c | 6 +- src/overlay045/ov45_022566EC.c | 8 +- src/overlay046/ov46_02256BCC.c | 8 +- src/overlay047/ov47_02256634.c | 6 +- src/overlay048/ov48_0225650C.c | 6 +- src/overlay049/ov49_022563D4.c | 6 +- src/overlay050/ov50_02256510.c | 6 +- src/overlay051/ov51_0225632C.c | 4 +- src/overlay052/ov52_02256694.c | 6 +- src/overlay053/ov53_02256420.c | 6 +- src/overlay055/ov55_0225632C.c | 4 +- src/overlay056/ov56_022561C0.c | 8 +- src/overlay058/ov58_021D0D80.c | 12 +-- src/overlay059/ov59_021D0D80.c | 22 ++--- src/overlay061/ov61_0222BF44.c | 12 +-- src/overlay062/ov62_022300D8.c | 24 ++--- src/overlay062/ov62_02231690.c | 2 +- src/overlay062/ov62_02234A10.c | 8 +- src/overlay062/ov62_02235E64.c | 6 +- src/overlay062/ov62_02236CBC.c | 4 +- src/overlay062/ov62_02237D24.c | 4 +- src/overlay062/ov62_02239D60.c | 46 ++++----- src/overlay062/ov62_0223CAEC.c | 8 +- src/overlay062/ov62_0223DFA8.c | 34 +++---- src/overlay062/ov62_02241204.c | 50 +++++----- src/overlay062/ov62_02246B00.c | 4 +- src/overlay062/ov62_02247D74.c | 6 +- src/overlay063/ov63_0222D1C0.c | 2 +- src/overlay064/ov64_0222DCE0.c | 24 ++--- src/overlay065/ov65_0222DCE0.c | 40 ++++---- src/overlay065/ov65_02235060.c | 6 +- src/overlay065/ov65_0223648C.c | 12 +-- src/overlay067/ov67_0225C700.c | 12 +-- src/overlay068/ov68_0225C700.c | 22 ++--- src/overlay069/ov69_0225C700.c | 16 +-- src/overlay070/ov70_0225D9A4.c | 24 ++--- src/overlay071/ov71_0223B140.c | 60 ++++++------ src/overlay072/ov72_0223D7A0.c | 12 +-- src/overlay073/ov73_021D0D80.c | 38 ++++---- src/overlay073/ov73_021D3250.c | 16 +-- src/overlay076/ov76_0223B870.c | 16 +-- src/overlay077/ov77_021D0D80.c | 36 +++---- src/overlay077/ov77_021D25B0.c | 124 ++++++++++++------------ src/overlay081/ov81_021D0D80.c | 12 +-- src/overlay083/ov83_0223D6A8.c | 18 ++-- src/overlay084/ov84_0223B5A0.c | 24 ++--- src/overlay085/ov85_02241440.c | 12 +-- src/overlay086/ov86_0223B140.c | 22 ++--- src/overlay087/ov87_021D106C.c | 16 +-- src/overlay088/ov88_0223B140.c | 20 ++-- src/overlay091/ov91_021D0D80.c | 6 +- src/overlay092/ov92_021D0D80.c | 12 +-- src/overlay094/ov94_0223BCB0.c | 2 +- src/overlay094/ov94_0223C610.c | 14 +-- src/overlay094/ov94_0223D0C4.c | 14 +-- src/overlay094/ov94_0223DC04.c | 8 +- src/overlay094/ov94_0223E46C.c | 8 +- src/overlay094/ov94_0223FB48.c | 10 +- src/overlay094/ov94_022414B8.c | 6 +- src/overlay094/ov94_02242AD0.c | 2 +- src/overlay094/ov94_02243EF8.c | 4 +- src/overlay094/ov94_02244950.c | 12 +-- src/overlay095/ov95_02246C20.c | 10 +- src/overlay095/ov95_02247B6C.c | 18 ++-- src/overlay095/ov95_02248590.c | 32 +++--- src/overlay095/ov95_02249740.c | 16 +-- src/overlay095/ov95_02249F90.c | 12 +-- src/overlay095/ov95_0224A390.c | 16 +-- src/overlay095/ov95_0224ABC0.c | 24 ++--- src/overlay095/ov95_0224B3D8.c | 12 +-- src/overlay096/ov96_0223BCE0.c | 12 +-- src/overlay097/ov97_0222AE60.c | 4 +- src/overlay097/ov97_0222C174.c | 12 +-- src/overlay097/ov97_0222D30C.c | 12 +-- src/overlay097/ov97_02230410.c | 24 ++--- src/overlay097/ov97_02233B18.c | 10 +- src/overlay097/ov97_02237694.c | 6 +- src/overlay098/ov98_022471C8.c | 18 ++-- src/overlay099/ov99_021D1A54.c | 30 +++--- src/overlay099/ov99_021D4134.c | 6 +- src/overlay100/ov100_021D13E4.c | 6 +- src/overlay100/ov100_021D1C44.c | 4 +- src/overlay100/ov100_021D2F0C.c | 4 +- src/overlay102/ov102_021D0D80.c | 26 ++--- src/overlay104/ov104_02237DD8.c | 10 +- src/overlay104/ov104_0223C2D4.c | 16 +-- src/overlay104/ov104_0223D9E4.c | 6 +- src/overlay104/ov104_0223DC7C.c | 6 +- src/overlay105/ov105_02241AE0.c | 36 +++---- src/overlay106/ov106_02241AE0.c | 12 +-- src/overlay107/ov107_02241AE0.c | 28 +++--- src/overlay107/ov107_02245EB0.c | 24 ++--- src/overlay108/ov108_02241AE0.c | 14 +-- src/overlay109/ov109_021D3D50.c | 22 ++--- src/overlay110/ov110_021D0D80.c | 12 +-- src/overlay111/ov111_021D0D80.c | 22 ++--- src/overlay112/ov112_0225C700.c | 18 ++-- src/overlay113/ov113_0225C700.c | 12 +-- src/overlay114/ov114_0225C700.c | 38 ++++---- src/overlay115/ov115_02260CEC.c | 18 ++-- src/overlay116/ov116_02261870.c | 30 +++--- src/overlay117/ov117_02260668.c | 24 ++--- src/overlay117/ov117_02263AF0.c | 4 +- src/overlay119/ov119_021D0D80.c | 8 +- src/palette.c | 6 +- src/pokemon_summary_app.c | 16 +-- src/text.c | 2 +- src/unk_0200C440.c | 2 +- src/unk_0200DA60.c | 26 ++--- src/unk_02012744.c | 2 +- src/unk_02015920.c | 6 +- src/unk_020528D0.c | 2 +- src/unk_0205C980.c | 2 +- src/unk_0207AE68.c | 8 +- src/unk_0207E0B8.c | 14 +-- src/unk_0208694C.c | 24 ++--- src/unk_0208A3F4.c | 8 +- 191 files changed, 1240 insertions(+), 1240 deletions(-) diff --git a/include/graphics.h b/include/graphics.h index e8093cf79a..067b20d4c9 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -28,29 +28,29 @@ void *LoadMemberFromNARC_OutFileSize(u32 narcID, u32 narcMemberIdx, BOOL compres void *LoadMemberFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd); void *LoadMemberFromOpenNARC_OutFileSize(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd, u32 *fileSize); -u32 sub_02006E3C(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); -void sub_02006E60(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); -void sub_02006E84(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5); -void sub_02006E9C(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6); -u32 sub_02006EC0(u32 param0, u32 param1, int param2, u32 param3, u32 param4, BOOL param5, u32 param6); -void sub_02006EE0(u32 param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5); -u32 sub_02006F00(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8); -void sub_02006F28(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8); -void *sub_02006F50(u32 param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4); -void *sub_02006F6C(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4); -void *sub_02006F88(u32 bankID, u32 memberIndex, NNSG2dPaletteData **param2, u32 param3); -void *sub_02006FA0(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4); -void *sub_02006FBC(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4); -u32 sub_020070E8(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); -void sub_0200710C(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); -void sub_02007130(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5); -void sub_02007148(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6); -void sub_0200716C(NARC *param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5); -u32 sub_0200718C(NARC *param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8); -void *sub_020071B4(NARC *param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4); -void *sub_020071D0(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4); -void *sub_020071EC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3); -void *sub_02007204(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4); -void *sub_02007220(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4); +u32 Graphics_LoadTilesToBgLayer(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); +void Graphics_LoadTilemapToBgLayer(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); +void Graphics_LoadPalette(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5); +void Graphics_LoadPaletteWithSrcOffset(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6); +u32 Graphics_LoadObjectTiles(u32 param0, u32 param1, int param2, u32 param3, u32 param4, BOOL param5, u32 param6); +void Graphics_LoadPartialPalette(u32 param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5); +u32 Graphics_LoadImageMapping(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8); +void Graphics_LoadImageMappingAndSetVramMode(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8); +void *Graphics_GetCharData(u32 param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4); +void *Graphics_GetScrnData(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4); +void *Graphics_GetPlttData(u32 bankID, u32 memberIndex, NNSG2dPaletteData **param2, u32 param3); +void *Graphics_GetCellBank(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4); +void *Graphics_GetAnimBank(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4); +u32 Graphics_LoadTilesToBgLayerFromOpenNARC(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); +void Graphics_LoadTilemapToBgLayerFromOpenNARC(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); +void Graphics_LoadPaletteFromOpenNARC(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5); +void Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6); +void Graphics_LoadPartialPaletteFromOpenNARC(NARC *param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5); +u32 Graphics_LoadImageMappingFromOpenNARC(NARC *param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8); +void *Graphics_GetCharDataFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4); +void *Graphics_GetScrnDataFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4); +void *Graphics_GetPlttDataFromOpenNARC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3); +void *Graphics_GetCellBankFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4); +void *Graphics_GetAnimBankFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4); #endif // POKEPLATINUM_GRAPHICS_H diff --git a/include/inlines.h b/include/inlines.h index 34a8275c07..79f6abaae2 100644 --- a/include/inlines.h +++ b/include/inlines.h @@ -34,7 +34,7 @@ static inline void inline_ov61_0222C3B0(UnkStruct_ov61_0222C3B0 *param0, NARC *p MI_CpuClear8(param0, sizeof(UnkStruct_ov61_0222C3B0)); - v1 = sub_020071EC(param1, param2, &v0, param3); + v1 = Graphics_GetPlttDataFromOpenNARC(param1, param2, &v0, param3); MI_CpuCopy16(&((u16 *)(v0->pRawData))[0 * 16], param0->unk_08, 4 * 0x20); MI_CpuCopy16(&((u16 *)(v0->pRawData))[0 * 16], param0->unk_88, 4 * 0x20); diff --git a/src/battle/ov16_0223B140.c b/src/battle/ov16_0223B140.c index fc75329842..0f4b1c5ea8 100644 --- a/src/battle/ov16_0223B140.c +++ b/src/battle/ov16_0223B140.c @@ -446,11 +446,11 @@ void ov16_0223B578(BattleSystem *param0) v1 = ov16_0223EDE0(param0); sub_0200E218(param0->unk_04, 1, 1, 10, v1, 5); - sub_02006E3C(7, 3 + param0->unk_2400, param0->unk_04, 3, 0, 0, 1, 5); + Graphics_LoadTilesToBgLayer(7, 3 + param0->unk_2400, param0->unk_04, 3, 0, 0, 1, 5); PaletteData_LoadBufferFromFileStart(param0->unk_28, 7, 172 + (param0->unk_2400 * 3) + ov16_0223EC04(param0), 5, 0, 0, 0); PaletteData_LoadBufferFromFileStart(param0->unk_28, 38, sub_0200DD08(v1), 5, 0, 0x20, 10 * 0x10); PaletteData_LoadBufferFromFileStart(param0->unk_28, 14, 7, 5, 0, 0x20, 0xb * 0x10); - sub_02006E60(7, 2, param0->unk_04, 3, 0, 0, 1, 5); + Graphics_LoadTilemapToBgLayer(7, 2, param0->unk_04, 3, 0, 0, 1, 5); } { @@ -931,11 +931,11 @@ static void ov16_0223C004(BattleSystem *param0, BgConfig *param1) v3 = ov16_0223EDE0(param0); sub_0200E218(param1, 1, 1, 10, v3, 5); - sub_02006E3C(7, 3 + param0->unk_2400, param1, 3, 0, 0, 1, 5); + Graphics_LoadTilesToBgLayer(7, 3 + param0->unk_2400, param1, 3, 0, 0, 1, 5); PaletteData_LoadBufferFromFileStart(param0->unk_28, 7, 172 + (param0->unk_2400 * 3) + ov16_0223EC04(param0), 5, 0, 0, 0); PaletteData_LoadBufferFromFileStart(param0->unk_28, 38, sub_0200DD08(v3), 5, 0, 0x20, 10 * 0x10); PaletteData_LoadBufferFromFileStart(param0->unk_28, 14, 7, 5, 0, 0x20, 0xb * 0x10); - sub_02006E60(7, 2, param1, 3, 0, 0, 1, 5); + Graphics_LoadTilemapToBgLayer(7, 2, param1, 3, 0, 0, 1, 5); } { diff --git a/src/battle/ov16_0226871C.c b/src/battle/ov16_0226871C.c index 281e84574b..11c8342d2d 100644 --- a/src/battle/ov16_0226871C.c +++ b/src/battle/ov16_0226871C.c @@ -1093,7 +1093,7 @@ void *ov16_022687C8(NARC *param0, NARC *param1, BattleSystem *param2, int param3 v6 = Unk_ov16_02270264[v5]; } - v4 = sub_02006F6C(7, v6, 1, &v3, 5); + v4 = Graphics_GetScrnData(7, v6, 1, &v3, 5); MI_CpuCopy32(v3->rawData, v0->unk_3C[v5], 0x800); Heap_FreeToHeap(v4); @@ -1154,7 +1154,7 @@ void *ov16_022687C8(NARC *param0, NARC *param1, BattleSystem *param2, int param3 v15 = 267; } - v14 = sub_02006F88(7, v15, &v13, 5); + v14 = Graphics_GetPlttData(7, v15, &v13, 5); if (BattleSystem_BattleType(param2) & 0x80) { MI_CpuCopy16(v13->pRawData, v0->unk_60, 0x40); @@ -1221,7 +1221,7 @@ void ov16_02268A88(UnkStruct_ov16_02268A14 *param0) v5 = 28; } - sub_02006E3C(7, v5, v0, 4, 0, 0x6000, 1, 5); + Graphics_LoadTilesToBgLayer(7, v5, v0, 4, 0, 0x6000, 1, 5); } sub_0207C9EC(v1, v2, 20017, 20017); @@ -1295,12 +1295,12 @@ void ov16_02268C04(NARC *param0, NARC *param1, UnkStruct_ov16_02268A14 *param2, v6 = v0->unk_00; } - sub_020070E8(param0, v6, v3, 4, 0, (0x6000 - (32 * 12 * 0x20)), 1, 5); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0, v6, v3, 4, 0, (0x6000 - (32 * 12 * 0x20)), 1, 5); if (param2->unk_66D == 0) { - sub_020070E8(param0, 37, v3, 4, ((0x6000 - (32 * 12 * 0x20)) / 0x20), (32 * 12 * 0x20), 1, 5); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0, 37, v3, 4, ((0x6000 - (32 * 12 * 0x20)) / 0x20), (32 * 12 * 0x20), 1, 5); } else { - sub_020070E8(param0, 38, v3, 4, ((0x6000 - (32 * 12 * 0x20)) / 0x20), (32 * 12 * 0x20), 1, 5); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0, 38, v3, 4, ((0x6000 - (32 * 12 * 0x20)) / 0x20), (32 * 12 * 0x20), 1, 5); } } @@ -2034,7 +2034,7 @@ static void ov16_02269E94(UnkStruct_ov16_02268A14 *param0, int param1, int param NNSG2dScreenData *v3; void *v4; - v4 = sub_02006F6C(7, 46, 1, &v3, 5); + v4 = Graphics_GetScrnData(7, 46, 1, &v3, 5); MI_CpuCopy32(v3->rawData, param0->unk_3C[6], 0x800); Heap_FreeToHeap(v4); @@ -2800,7 +2800,7 @@ void ov16_0226AC98(UnkStruct_ov16_02268A14 *param0, int param1, const UnkStruct_ for (v4 = 0; v4 < 4; v4++) { if ((param2->unk_00[v4] != v0->unk_00.unk_00[v4]) && (param2->unk_00[v4] != 0)) { v5 = MoveTable_LoadParam(param2->unk_00[v4], MOVEATTRIBUTE_TYPE); - v1 = sub_02006F50(sub_0207C944(), sub_0207C908(v5), 1, &v2, 5); + v1 = Graphics_GetCharData(sub_0207C944(), sub_0207C908(v5), 1, &v2, 5); MI_CpuCopy32(v2->pRawData, v0->unk_18[v4], v3); Heap_FreeToHeap(v1); } diff --git a/src/choose_starter/choose_starter_app.c b/src/choose_starter/choose_starter_app.c index 9eb9642452..ad665bf923 100644 --- a/src/choose_starter/choose_starter_app.c +++ b/src/choose_starter/choose_starter_app.c @@ -671,7 +671,7 @@ static void MakeMessageWindow(ChooseStarterApp *app, enum HeapId heapID) Window_FillTilemap(app->messageWindow, 15); sub_0200DD0C(app->bgl, BG_LAYER_MAIN_1, FRAME_TEXT_START, FRAME_TEXT_PALETTE_INDEX, app->messageFrame, heapID); - sub_02006E84(NARC_INDEX_GRAPHIC__EV_POKESELECT, 16, 0, FRAME_PALETTE_INDEX * 32, 32, heapID); + Graphics_LoadPalette(NARC_INDEX_GRAPHIC__EV_POKESELECT, 16, 0, FRAME_PALETTE_INDEX * 32, 32, heapID); sub_0200E060(app->messageWindow, 0, FRAME_TEXT_START, FRAME_TEXT_PALETTE_INDEX); } @@ -1546,8 +1546,8 @@ static void MakePreviewWindow(StarterPreviewWindow *param0, ChooseStarterApp *pa UnkStruct_ov22_02255800 v1; UnkStruct_ov21_021E7F40 v2; - param0->unk_0C = sub_02006F50(82, 14, 0, ¶m0->unk_14, param2); - param0->unk_10 = sub_02006F88(82, 15, ¶m0->unk_18, param2); + param0->unk_0C = Graphics_GetCharData(82, 14, 0, ¶m0->unk_14, param2); + param0->unk_10 = Graphics_GetPlttData(82, 15, ¶m0->unk_18, param2); v0.unk_00 = param1->spriteDisplay; v0.unk_04 = param0->unk_14; @@ -1730,7 +1730,7 @@ static void MakeSubplaneWindow(ChooseStarterApp *param0, int param1) int v0; int v1, v2; - sub_02006E84(82, 17, 0, 5 * 32, 32, param1); + Graphics_LoadPalette(82, 17, 0, 5 * 32, 32, param1); for (v0 = 0; v0 < 3; v0++) { param0->unk_9C[v0] = Window_New(param1, 1); diff --git a/src/font.c b/src/font.c index ad32372961..df5b303ce2 100644 --- a/src/font.c +++ b/src/font.c @@ -230,12 +230,12 @@ u8 Font_GetAttribute(u8 font, u8 attribute) void Font_LoadTextPalette(int palLocation, u32 palSlotOffset, u32 heapID) { - sub_02006E84(NARC_INDEX_GRAPHIC__PL_FONT, 6, palLocation, palSlotOffset, 0x20, heapID); + Graphics_LoadPalette(NARC_INDEX_GRAPHIC__PL_FONT, 6, palLocation, palSlotOffset, 0x20, heapID); } void Font_LoadScreenIndicatorsPalette(int palLocation, u32 palSlotOffset, u32 heapID) { - sub_02006E84(NARC_INDEX_GRAPHIC__PL_FONT, 7, palLocation, palSlotOffset, 0x20, heapID); + Graphics_LoadPalette(NARC_INDEX_GRAPHIC__PL_FONT, 7, palLocation, palSlotOffset, 0x20, heapID); } u32 Font_CalcMaxLineWidth(enum Font font, const Strbuf *strbuf, u32 letterSpacing) diff --git a/src/graphics.c b/src/graphics.c index 055c132ff3..b4aee94f3b 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -20,73 +20,73 @@ static void *GetPaletteData(void *nclrBuffer, NNSG2dPaletteData **outPaletteData static void *GetCellBank(void *ncerBuffer, NNSG2dCellDataBank **outCellData); static void *GetAnimBank(void *nanrBuffer, NNSG2dAnimBankData **outAnimBank); -u32 sub_02006E3C(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) +u32 Graphics_LoadTilesToBgLayer(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { void *v0 = LoadMemberFromNARC(param0, param1, param6, param7, 0); return LoadTilesToBgLayer(v0, param2, param3, param4, param5); } -void sub_02006E60(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) +void Graphics_LoadTilemapToBgLayer(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { void *v0 = LoadMemberFromNARC(param0, param1, param6, param7, 1); LoadTilemapToBgLayer(v0, param2, param3, param4, param5); } -void sub_02006E84(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5) +void Graphics_LoadPalette(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5) { - sub_02006E9C(param0, param1, param2, 0, param3, param4, param5); + Graphics_LoadPaletteWithSrcOffset(param0, param1, param2, 0, param3, param4, param5); } -void sub_02006E9C(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6) +void Graphics_LoadPaletteWithSrcOffset(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6) { void *v0 = LoadMemberFromNARC(param0, param1, 0, param6, 1); LoadPaletteWithSrcOffset(v0, param2, param3, param4, param5); } -u32 sub_02006EC0(u32 param0, u32 param1, int param2, u32 param3, u32 param4, BOOL param5, u32 param6) +u32 Graphics_LoadObjectTiles(u32 param0, u32 param1, int param2, u32 param3, u32 param4, BOOL param5, u32 param6) { void *v0 = LoadMemberFromNARC(param0, param1, param5, param6, 1); return LoadObjectTiles(v0, param2, param3, param4); } -void sub_02006EE0(u32 param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5) +void Graphics_LoadPartialPalette(u32 param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5) { void *v0 = LoadMemberFromNARC(param0, param1, 0, param4, 1); LoadPartialPalette(v0, param2, param3, param5); } -u32 sub_02006F00(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) +u32 Graphics_LoadImageMapping(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) { void *v0 = LoadMemberFromNARC(param0, param1, param2, param7, 1); return LoadImageMapping(v0, param3, param4, param5, param6, param8); } -void sub_02006F28(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) +void Graphics_LoadImageMappingAndSetVramMode(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) { void *v0 = LoadMemberFromNARC(param0, param1, param2, param7, 1); LoadImageMappingAndSetVramMode(v0, param3, param4, param5, param6, param8); } -void *sub_02006F50(u32 param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4) +void *Graphics_GetCharData(u32 param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4) { void *v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); return GetCharacterData(v0, param3); } -void *sub_02006F6C(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4) +void *Graphics_GetScrnData(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4) { void *v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); return GetScreenData(v0, param3); } -void *sub_02006F88(u32 param0, u32 param1, NNSG2dPaletteData **param2, u32 param3) +void *Graphics_GetPlttData(u32 param0, u32 param1, NNSG2dPaletteData **param2, u32 param3) { void *v0 = LoadMemberFromNARC(param0, param1, 0, param3, 0); return GetPaletteData(v0, param2); } -void *sub_02006FA0(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4) +void *Graphics_GetCellBank(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4) { void *v0; @@ -94,7 +94,7 @@ void *sub_02006FA0(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **par return GetCellBank(v0, param3); } -void *sub_02006FBC(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4) +void *Graphics_GetAnimBank(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4) { void *v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); return GetAnimBank(v0, param3); @@ -175,60 +175,60 @@ void *LoadMemberFromNARC_OutFileSize(u32 narcID, u32 narcMemberIdx, BOOL compres return data; } -u32 sub_020070E8(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) +u32 Graphics_LoadTilesToBgLayerFromOpenNARC(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { void *v0 = LoadMemberFromOpenNARC(param0, param1, param6, param7, 0); return LoadTilesToBgLayer(v0, param2, param3, param4, param5); } -void sub_0200710C(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) +void Graphics_LoadTilemapToBgLayerFromOpenNARC(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) { void *v0 = LoadMemberFromOpenNARC(param0, param1, param6, param7, 1); LoadTilemapToBgLayer(v0, param2, param3, param4, param5); } -void sub_02007130(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5) +void Graphics_LoadPaletteFromOpenNARC(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5) { - sub_02007148(param0, param1, param2, 0, param3, param4, param5); + Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(param0, param1, param2, 0, param3, param4, param5); } -void sub_02007148(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6) +void Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6) { void *v0 = LoadMemberFromOpenNARC(param0, param1, 0, param6, 1); LoadPaletteWithSrcOffset(v0, param2, param3, param4, param5); } -void sub_0200716C(NARC *param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5) +void Graphics_LoadPartialPaletteFromOpenNARC(NARC *param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5) { void *v0 = LoadMemberFromOpenNARC(param0, param1, 0, param4, 1); LoadPartialPalette(v0, param2, param3, param5); } -u32 sub_0200718C(NARC *param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) +u32 Graphics_LoadImageMappingFromOpenNARC(NARC *param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) { void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param7, 1); return LoadImageMapping(v0, param3, param4, param5, param6, param8); } -void *sub_020071B4(NARC *param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4) +void *Graphics_GetCharDataFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4) { void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); return GetCharacterData(v0, param3); } -void *sub_020071D0(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4) +void *Graphics_GetScrnDataFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4) { void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); return GetScreenData(v0, param3); } -void *sub_020071EC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3) +void *Graphics_GetPlttDataFromOpenNARC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3) { void *v0 = LoadMemberFromOpenNARC(param0, param1, 0, param3, 0); return GetPaletteData(v0, param2); } -void *sub_02007204(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4) +void *Graphics_GetCellBankFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4) { void *v0; @@ -236,7 +236,7 @@ void *sub_02007204(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **p return GetCellBank(v0, param3); } -void *sub_02007220(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4) +void *Graphics_GetAnimBankFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4) { void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); return GetAnimBank(v0, param3); diff --git a/src/library_tv/library_tv.c b/src/library_tv/library_tv.c index 45867d4430..ea8c6f0110 100644 --- a/src/library_tv/library_tv.c +++ b/src/library_tv/library_tv.c @@ -203,26 +203,26 @@ static void LibraryTV_SetVramBank(LibraryTV *ltv) charSetID = 1; screenID = 4; Bg_InitFromTemplate(ltv->bgl, frame, &bgHeader1, 0); - sub_02006E3C(NARC_INDEX_DEMO__INTRO__INTRO_TV, charSetID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); - sub_02006E60(NARC_INDEX_DEMO__INTRO__INTRO_TV, screenID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); + Graphics_LoadTilesToBgLayer(NARC_INDEX_DEMO__INTRO__INTRO_TV, charSetID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); + Graphics_LoadTilemapToBgLayer(NARC_INDEX_DEMO__INTRO__INTRO_TV, screenID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); BgTemplate bgHeader2 = { 0, 0, 0x800, 0, 1, GX_BG_COLORMODE_16, GX_BG_SCRBASE_0x1000, GX_BG_CHARBASE_0x10000, GX_BG_EXTPLTT_01, 1, 0, 0, FALSE }; frame = 1; charSetID = 2; screenID = 5; Bg_InitFromTemplate(ltv->bgl, frame, &bgHeader2, 0); - sub_02006E3C(NARC_INDEX_DEMO__INTRO__INTRO_TV, charSetID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); - sub_02006E60(NARC_INDEX_DEMO__INTRO__INTRO_TV, screenID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); + Graphics_LoadTilesToBgLayer(NARC_INDEX_DEMO__INTRO__INTRO_TV, charSetID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); + Graphics_LoadTilemapToBgLayer(NARC_INDEX_DEMO__INTRO__INTRO_TV, screenID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); BgTemplate bgHeader3 = { 0, 0, 0x800, 0, 1, GX_BG_COLORMODE_256, GX_BG_SCRBASE_0x1800, GX_BG_CHARBASE_0x20000, GX_BG_EXTPLTT_01, 1, 0, 0, FALSE }; frame = 3; charSetID = 2; screenID = 4; Bg_InitFromTemplate(ltv->bgl, frame, &bgHeader3, 0); - sub_02006E3C(NARC_INDEX_GRAPHIC__LIBRARY_TV, charSetID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); - sub_02006E60(NARC_INDEX_GRAPHIC__LIBRARY_TV, screenID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); + Graphics_LoadTilesToBgLayer(NARC_INDEX_GRAPHIC__LIBRARY_TV, charSetID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); + Graphics_LoadTilemapToBgLayer(NARC_INDEX_GRAPHIC__LIBRARY_TV, screenID, ltv->bgl, frame, 0, 0, 0, ltv->heapID); - sub_02006E84(NARC_INDEX_GRAPHIC__LIBRARY_TV, 3, 0, 0, 0, ltv->heapID); + Graphics_LoadPalette(NARC_INDEX_GRAPHIC__LIBRARY_TV, 3, 0, 0, 0, ltv->heapID); Font_LoadTextPalette(0, 1 * (2 * 16), ltv->heapID); Bg_MaskPalette(0, 0x0); Bg_MaskPalette(4, 0x0); diff --git a/src/overlay005/encounter_effect.c b/src/overlay005/encounter_effect.c index 8e37e06dcf..cc300b6d43 100644 --- a/src/overlay005/encounter_effect.c +++ b/src/overlay005/encounter_effect.c @@ -714,10 +714,10 @@ void ov5_021DE3D0(NARC *param0, u32 param1, u32 param2, u32 param3, u32 param4, void *v0; NNSG2dScreenData *v1; - sub_02007130(param0, param3, 0, param4 * 32, param5 * 32, 4); - sub_020070E8(param0, param2, param6, param7, 0, 0, 0, 4); + Graphics_LoadPaletteFromOpenNARC(param0, param3, 0, param4 * 32, param5 * 32, 4); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0, param2, param6, param7, 0, 0, 0, 4); - v0 = sub_020071D0(param0, param1, 0, &v1, 4); + v0 = Graphics_GetScrnDataFromOpenNARC(param0, param1, 0, &v1, 4); Bg_LoadToTilemapRect(param6, param7, v1->rawData, 0, 0, v1->screenWidth / 8, v1->screenHeight / 8); Bg_ChangeTilemapRectPalette(param6, param7, 0, 0, v1->screenWidth / 8, v1->screenHeight / 8, param4); @@ -781,7 +781,7 @@ void ov5_021DE5D0(CellActor *param0, u32 param1, u32 param2, u8 param3, u16 para sub_02076AAC(param2, 2, &v0); v3 = Heap_AllocFromHeap(param1, 32); - v2 = sub_02006F88(v0.unk_00, v0.unk_08, &v1, param1); + v2 = Graphics_GetPlttData(v0.unk_00, v0.unk_08, &v1, param1); BlendPalette(v1->pRawData, v3, 16, param3, param4); ov5_021DE67C(param0, v3, 32); diff --git a/src/overlay005/encounter_effect_core.c b/src/overlay005/encounter_effect_core.c index 548bef4d3f..36a7ef3d15 100644 --- a/src/overlay005/encounter_effect_core.c +++ b/src/overlay005/encounter_effect_core.c @@ -2897,7 +2897,7 @@ static BOOL EncounterEffect_GymLeader(EncounterEffect *encEffect, enum HeapId he memset(encEffect->param, 0, sizeof(UnkStruct_ov5_021E52A8)); v0 = encEffect->param; - sub_02007130(encEffect->narc, 11, 0, 2 * 0x20, 0x20, heapID); + Graphics_LoadPaletteFromOpenNARC(encEffect->narc, 11, 0, 2 * 0x20, 0x20, heapID); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG2, 0); Window_Add(encEffect->fieldSystem->unk_08, &v0->unk_2E0, 2, 0, 10, 16, 2, 2, 1); @@ -3332,7 +3332,7 @@ static BOOL EncounterEffect_EliteFourChampion(EncounterEffect *encEffect, enum H { Strbuf *v9; - sub_02007130(encEffect->narc, 11, 0, 2 * 0x20, 0x20, heapID); + Graphics_LoadPaletteFromOpenNARC(encEffect->narc, 11, 0, 2 * 0x20, 0x20, heapID); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG2, 0); Window_Add(encEffect->fieldSystem->unk_08, &v0->unk_358, 2, 21, 13, 11, 2, 2, 1); diff --git a/src/overlay005/ov5_021DD6FC.c b/src/overlay005/ov5_021DD6FC.c index f50d127688..f6557d96c4 100644 --- a/src/overlay005/ov5_021DD6FC.c +++ b/src/overlay005/ov5_021DD6FC.c @@ -64,9 +64,9 @@ static void ov5_021DD744(UnkStruct_ov5_021DD9C8 *param0, u8 param1, u16 param2, v3 = param0->unk_31 * 2; - param0->unk_38 = sub_02006F50(160, v3, 0, ¶m0->unk_34, 4); + param0->unk_38 = Graphics_GetCharData(160, v3, 0, ¶m0->unk_34, 4); Bg_LoadTiles(param0->unk_1C, param1, param0->unk_34->pRawData, param0->unk_34->szByte, param2); - v0 = sub_02006F88(160, v3 + 1, &v2, 4); + v0 = Graphics_GetPlttData(160, v3 + 1, &v2, 4); ov5_021DD6FC(v2->pRawData, 1, param3); Heap_FreeToHeap(v0); diff --git a/src/overlay005/ov5_021F007C.c b/src/overlay005/ov5_021F007C.c index f94069ac1d..745ff97ea5 100644 --- a/src/overlay005/ov5_021F007C.c +++ b/src/overlay005/ov5_021F007C.c @@ -62,7 +62,7 @@ static void ov5_021F007C(UnkStruct_ov5_021D1BEC *param0, FieldSystem *fieldSyste { UnkStruct_ov5_021F007C *v0 = param2; - v0->unk_00 = sub_02006F88(65, 55, &v0->unk_04, 4); + v0->unk_00 = Graphics_GetPlttData(65, 55, &v0->unk_04, 4); v0->unk_3C = 0; ov5_021F02B8(&v0->unk_28, 0, 8, 19); @@ -76,7 +76,7 @@ static void ov5_021F00BC(UnkStruct_ov5_021D1BEC *param0, FieldSystem *fieldSyste { UnkStruct_ov5_021F007C *v0 = param2; - v0->unk_00 = sub_02006F88(65, 55, &v0->unk_04, 4); + v0->unk_00 = Graphics_GetPlttData(65, 55, &v0->unk_04, 4); v0->unk_3C = 0; ov5_021F02B8(&v0->unk_28, 8, 0, 19); diff --git a/src/overlay006/ov6_0223E140.c b/src/overlay006/ov6_0223E140.c index c00e1458a2..09403c54b9 100644 --- a/src/overlay006/ov6_0223E140.c +++ b/src/overlay006/ov6_0223E140.c @@ -2060,9 +2060,9 @@ UnkStruct_ov6_022401B8 *ov6_02240104(u32 param0, FieldSystem *fieldSystem) { BgConfig *v1 = sub_0203D170(v0->fieldSystem); - sub_02006E3C(172, 74, v1, 2, 0, 0, 0, param0); - sub_02006E60(172, 76, v1, 2, 0, 0, 0, param0); - sub_02006E84(172, 75, 0, 0x20 * 6, 0x20, param0); + Graphics_LoadTilesToBgLayer(172, 74, v1, 2, 0, 0, 0, param0); + Graphics_LoadTilemapToBgLayer(172, 76, v1, 2, 0, 0, 0, param0); + Graphics_LoadPalette(172, 75, 0, 0x20 * 6, 0x20, param0); Bg_SetPriority(2, 1); v0->unk_34.unk_00 = 0; diff --git a/src/overlay007/ov7_0224CD28.c b/src/overlay007/ov7_0224CD28.c index 3573a484ae..41786b85d9 100644 --- a/src/overlay007/ov7_0224CD28.c +++ b/src/overlay007/ov7_0224CD28.c @@ -485,18 +485,18 @@ static void ov7_0224D474(UnkStruct_ov7_0224D008 *param0) v0 = NARC_ctor(NARC_INDEX_GRAPHIC__SHOP_GRA, 11); - sub_020070E8(v0, 0, param0->unk_00, 1, 0, 0, 0, 11); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 0, param0->unk_00, 1, 0, 0, 0, 11); if ((param0->unk_2A9 == 0) || (param0->unk_2A9 == 3)) { - sub_0200710C(v0, 2, param0->unk_00, 1, 0, 0, 0, 11); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 2, param0->unk_00, 1, 0, 0, 0, 11); } else { - sub_0200710C(v0, 3, param0->unk_00, 1, 0, 0, 0, 11); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 3, param0->unk_00, 1, 0, 0, 0, 11); } if (param0->unk_2A9 == 3) { - sub_02007130(v0, 11, 0, 0, 32, 11); + Graphics_LoadPaletteFromOpenNARC(v0, 11, 0, 0, 32, 11); } else { - sub_02007130(v0, 1, 0, 0, 32, 11); + Graphics_LoadPaletteFromOpenNARC(v0, 1, 0, 0, 32, 11); } sub_0200DAA4(param0->unk_00, 3, (1 + (18 + 12)), 11, 0, 11); diff --git a/src/overlay010/ov10_0221F800.c b/src/overlay010/ov10_0221F800.c index 4eb31ea539..d2192c772c 100644 --- a/src/overlay010/ov10_0221F800.c +++ b/src/overlay010/ov10_0221F800.c @@ -1432,11 +1432,11 @@ static void ov10_02220E70(UnkStruct_ov10_0221FB28 *param0) v0 = NARC_ctor(NARC_INDEX_BATTLE__GRAPHIC__VS_DEMO_GRA, param0->unk_00->unk_24); - sub_020070E8(v0, 0, param0->unk_0C, 1, 0, 0, 0, param0->unk_00->unk_24); - sub_0200710C(v0, 4, param0->unk_0C, 1, 0, 0, 0, param0->unk_00->unk_24); - sub_0200710C(v0, 2, param0->unk_0C, 2, 0, 0, 0, param0->unk_00->unk_24); - sub_0200710C(v0, 3, param0->unk_0C, 3, 0, 0, 0, param0->unk_00->unk_24); - sub_02007130(v0, 1, 0, 0, 0, param0->unk_00->unk_24); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 0, param0->unk_0C, 1, 0, 0, 0, param0->unk_00->unk_24); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 4, param0->unk_0C, 1, 0, 0, 0, param0->unk_00->unk_24); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 2, param0->unk_0C, 2, 0, 0, 0, param0->unk_00->unk_24); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 3, param0->unk_0C, 3, 0, 0, 0, param0->unk_00->unk_24); + Graphics_LoadPaletteFromOpenNARC(v0, 1, 0, 0, 0, param0->unk_00->unk_24); PaletteData_LoadBufferFromHardware(param0->unk_08, 0, 0, 0x20 * 5); Bg_MaskPalette(1, 0x18c6); NARC_dtor(v0); @@ -1921,8 +1921,8 @@ static void ov10_02221A3C(UnkStruct_ov10_0221FB28 *param0) v0 = NARC_ctor(NARC_INDEX_GRAPHIC__PL_PLIST_GRA, param0->unk_00->unk_24); - sub_020070E8(v0, 15, param0->unk_0C, 3, 0, 0, 0, param0->unk_00->unk_24); - sub_0200710C(v0, 17, param0->unk_0C, 3, 0, 0, 0, param0->unk_00->unk_24); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 15, param0->unk_0C, 3, 0, 0, 0, param0->unk_00->unk_24); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 17, param0->unk_0C, 3, 0, 0, 0, param0->unk_00->unk_24); { NNSG2dPaletteData *v1; diff --git a/src/overlay012/ov12_0221FC20.c b/src/overlay012/ov12_0221FC20.c index 601fc61f2d..3a575cb70f 100644 --- a/src/overlay012/ov12_0221FC20.c +++ b/src/overlay012/ov12_0221FC20.c @@ -2045,7 +2045,7 @@ static void ov12_0222128C(UnkStruct_ov12_0221FCDC *param0) Bg_ToggleLayer(2, 0); Bg_LoadTiles(param0->unk_C0, 2, v0, (10 * 10 * ((8 / 2) * 8)), 0); PaletteData_LoadBufferFromFileStart(param0->unk_C4, v4, v5, param0->unk_00, 0, 0, (8 * 16)); - sub_0200710C(param0->unk_1A0[0], v6, param0->unk_C0, 2, 0, 0, 0, param0->unk_00); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_1A0[0], v6, param0->unk_C0, 2, 0, 0, 0, param0->unk_00); if (v2 == 1) { SysTask *v9; @@ -2516,7 +2516,7 @@ static BOOL ov12_02221A54(UnkStruct_ov12_02221BBC *param0, UnkStruct_ov12_0221FC static void ov12_02221AA8(UnkStruct_ov12_02221BBC *param0, UnkStruct_ov12_0221FCDC *param1, int param2, int param3) { - sub_02006E3C(7, ov12_022234E4(param3, 0), param1->unk_C0, param2, 0, 0, 1, param1->unk_00); + Graphics_LoadTilesToBgLayer(7, ov12_022234E4(param3, 0), param1->unk_C0, param2, 0, 0, 1, param1->unk_00); PaletteData_LoadBufferFromFileStart(param1->unk_C4, 7, ov12_022234E4(param3, 1), param1->unk_00, 0, 0x20, (9 * 16)); Bg_ClearTilemap(param1->unk_C0, param2); @@ -2529,7 +2529,7 @@ static void ov12_02221AA8(UnkStruct_ov12_02221BBC *param0, UnkStruct_ov12_0221FC v0 = 3; } - sub_02006E60(7, ov12_022234E4(param3, v0), param1->unk_C0, param2, 0, 0, 1, param1->unk_00); + Graphics_LoadTilemapToBgLayer(7, ov12_022234E4(param3, v0), param1->unk_C0, param2, 0, 0, 1, param1->unk_00); } } @@ -2749,11 +2749,11 @@ static BOOL ov12_02221D50(SysTask *param0, UnkStruct_ov12_02221BBC *param1) ov12_02223460(param1->unk_48, 3); ov12_02223488(param1->unk_48); } else { - sub_02006E3C(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_04, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); + Graphics_LoadTilesToBgLayer(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_04, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); PaletteData_LoadBufferFromFileStart(param1->unk_48->unk_C4, param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_08, param1->unk_48->unk_00, 0, param1->unk_48->unk_180.unk_14 * 0x20, param1->unk_48->unk_180.unk_10); } - sub_02006E60(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_0C, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); + Graphics_LoadTilemapToBgLayer(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_0C, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); param1->unk_05++; break; case 4: @@ -2853,11 +2853,11 @@ static BOOL ov12_0222206C(SysTask *param0, UnkStruct_ov12_02221BBC *param1) ov12_02223460(param1->unk_48, 3); ov12_02223488(param1->unk_48); } else { - sub_02006E3C(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_04, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); + Graphics_LoadTilesToBgLayer(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_04, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); PaletteData_LoadBufferFromFileStart(param1->unk_48->unk_C4, param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_08, param1->unk_48->unk_00, 0, param1->unk_48->unk_180.unk_14 * 0x20, param1->unk_48->unk_180.unk_10); } - sub_02006E60(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_0C, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); + Graphics_LoadTilemapToBgLayer(param1->unk_48->unk_180.unk_00, param1->unk_48->unk_180.unk_0C, param1->unk_48->unk_C0, 3, 0, 0, 1, param1->unk_48->unk_00); Bg_ToggleLayer(3, 1); param1->unk_05++; @@ -3073,12 +3073,12 @@ void ov12_02222590(UnkStruct_ov12_0221FCDC *param0, int param1) Bg_ClearTilemap(param0->unk_C0, param1); if (ov12_0221FDD4(param0) == 1) { - sub_02006E3C(param0->unk_180.unk_00, param0->unk_180.unk_04, param0->unk_C0, param1, 0, 0, 1, param0->unk_00); + Graphics_LoadTilesToBgLayer(param0->unk_180.unk_00, param0->unk_180.unk_04, param0->unk_C0, param1, 0, 0, 1, param0->unk_00); } else { ov12_02223460(param0, param1); } - sub_02006E60(param0->unk_180.unk_00, param0->unk_180.unk_0C, param0->unk_C0, param1, 0, 0, 1, param0->unk_00); + Graphics_LoadTilemapToBgLayer(param0->unk_180.unk_00, param0->unk_180.unk_0C, param0->unk_C0, param1, 0, 0, 1, param0->unk_00); } void ov12_02222664(UnkStruct_ov12_0221FCDC *param0, int param1) @@ -3227,9 +3227,9 @@ static void ov12_02222860(UnkStruct_ov12_0221FCDC *param0) v0 = inline_ov12_022204C4(param0->unk_18); param0->unk_18 += 1; - sub_02006E3C(7, ov12_022234E4(v0, 0), param0->unk_C0, 3, 0, 0, 1, param0->unk_00); - sub_02006E84(7, ov12_022234E4(v0, 1), 0, 0, 0, param0->unk_00); - sub_02006E60(7, ov12_022234E4(v0, 2), param0->unk_C0, 3, 0, 0, 1, param0->unk_00); + Graphics_LoadTilesToBgLayer(7, ov12_022234E4(v0, 0), param0->unk_C0, 3, 0, 0, 1, param0->unk_00); + Graphics_LoadPalette(7, ov12_022234E4(v0, 1), 0, 0, 0, param0->unk_00); + Graphics_LoadTilemapToBgLayer(7, ov12_022234E4(v0, 2), param0->unk_C0, 3, 0, 0, 1, param0->unk_00); } static void ov12_022228DC(UnkStruct_ov12_0221FCDC *param0) diff --git a/src/overlay012/ov12_02226B84.c b/src/overlay012/ov12_02226B84.c index e7d900ff9d..d621f2a9dc 100644 --- a/src/overlay012/ov12_02226B84.c +++ b/src/overlay012/ov12_02226B84.c @@ -644,7 +644,7 @@ void ov12_02226EB0(UnkStruct_ov12_0221FCDC *param0) { int v2 = ov12_02220280(param0, 0); - sub_02006E3C(7, ov12_022234E4(v2, 0), v0->unk_1C.unk_14, 2, 0, 0, 1, ov12_0221FDE4(param0)); + Graphics_LoadTilesToBgLayer(7, ov12_022234E4(v2, 0), v0->unk_1C.unk_14, 2, 0, 0, 1, ov12_0221FDE4(param0)); PaletteData_LoadBufferFromFileStart(v0->unk_1C.unk_18, 7, ov12_022234E4(v2, 1), ov12_0221FDE4(param0), 0, 0x20, (9 * 16)); Bg_ClearTilemap(v0->unk_1C.unk_14, 2); @@ -657,7 +657,7 @@ void ov12_02226EB0(UnkStruct_ov12_0221FCDC *param0) v3 = 3; } - sub_02006E60(7, ov12_022234E4(v2, v3), v0->unk_1C.unk_14, 2, 0, 0, 1, ov12_0221FDE4(param0)); + Graphics_LoadTilemapToBgLayer(7, ov12_022234E4(v2, v3), v0->unk_1C.unk_14, 2, 0, 0, 1, ov12_0221FDE4(param0)); } } @@ -804,7 +804,7 @@ void ov12_022271D8(UnkStruct_ov12_0221FCDC *param0) { int v2 = ov12_02220280(param0, 0); - sub_02006E3C(7, ov12_022234E4(v2, 0), v0->unk_1C.unk_14, 2, 0, 0, 1, ov12_0221FDE4(param0)); + Graphics_LoadTilesToBgLayer(7, ov12_022234E4(v2, 0), v0->unk_1C.unk_14, 2, 0, 0, 1, ov12_0221FDE4(param0)); PaletteData_LoadBufferFromFileStart(v0->unk_1C.unk_18, 7, ov12_022234E4(v2, 1), ov12_0221FDE4(param0), 0, 0x20, (9 * 16)); Bg_ClearTilemap(v0->unk_1C.unk_14, 2); @@ -817,7 +817,7 @@ void ov12_022271D8(UnkStruct_ov12_0221FCDC *param0) v3 = 3; } - sub_02006E60(7, ov12_022234E4(v2, v3), v0->unk_1C.unk_14, 2, 0, 0, 1, ov12_0221FDE4(param0)); + Graphics_LoadTilemapToBgLayer(7, ov12_022234E4(v2, v3), v0->unk_1C.unk_14, 2, 0, 0, 1, ov12_0221FDE4(param0)); } } diff --git a/src/overlay012/ov12_02234E44.c b/src/overlay012/ov12_02234E44.c index cf80c2f8f1..2194801d9c 100644 --- a/src/overlay012/ov12_02234E44.c +++ b/src/overlay012/ov12_02234E44.c @@ -65,10 +65,10 @@ static void ov12_02234E54(UnkStruct_ov12_02234E54 *param0, int param1) v1 = ov12_02223428(param0->unk_18.unk_04, 3); Bg_SetPriority(param1, v1); - sub_02006E3C(param0->unk_00.unk_00, Unk_ov12_0223A1D8[param0->unk_00.unk_04][0], param0->unk_18.unk_14, param1, 0, 0, 1, v0); + Graphics_LoadTilesToBgLayer(param0->unk_00.unk_00, Unk_ov12_0223A1D8[param0->unk_00.unk_04][0], param0->unk_18.unk_14, param1, 0, 0, 1, v0); PaletteData_LoadBufferFromFileStart(param0->unk_18.unk_18, param0->unk_00.unk_00, Unk_ov12_0223A1D8[param0->unk_00.unk_04][1], v0, 0, 0x20, (8 * 16)); Bg_ClearTilemap(param0->unk_18.unk_14, param1); - sub_02006E60(param0->unk_00.unk_00, Unk_ov12_0223A1D8[param0->unk_00.unk_04][2], param0->unk_18.unk_14, param1, 0, 0, 1, v0); + Graphics_LoadTilemapToBgLayer(param0->unk_00.unk_00, Unk_ov12_0223A1D8[param0->unk_00.unk_04][2], param0->unk_18.unk_14, param1, 0, 0, 1, v0); } static void ov12_02234EF0(SysTask *param0, void *param1) diff --git a/src/overlay013/ov13_0221FC20.c b/src/overlay013/ov13_0221FC20.c index c98bdedf54..fa0da990a7 100644 --- a/src/overlay013/ov13_0221FC20.c +++ b/src/overlay013/ov13_0221FC20.c @@ -1125,7 +1125,7 @@ static void ov13_02220D4C(UnkStruct_ov13_022213F0 *param0) NARC *v0; v0 = NARC_ctor(NARC_INDEX_BATTLE__GRAPHIC__PL_B_PLIST_GRA, param0->unk_00->unk_0C); - sub_020070E8(v0, 22, param0->unk_1E0, 7, 0, 0, 0, param0->unk_00->unk_0C); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 22, param0->unk_1E0, 7, 0, 0, 0, param0->unk_00->unk_0C); { NNSG2dScreenData *v1; @@ -1157,7 +1157,7 @@ static void ov13_02220D4C(UnkStruct_ov13_022213F0 *param0) { int v4 = ov16_0223EDE0(param0->unk_00->unk_08); - sub_02006E3C(38, sub_0200DD04(v4), param0->unk_1E0, 4, 1, 0, 0, param0->unk_00->unk_0C); + Graphics_LoadTilesToBgLayer(38, sub_0200DD04(v4), param0->unk_1E0, 4, 1, 0, 0, param0->unk_00->unk_0C); PaletteData_LoadBufferFromFileStart(param0->unk_1E4, 38, sub_0200DD08(v4), param0->unk_00->unk_0C, 1, 0x20, 14 * 16); } diff --git a/src/overlay013/ov13_022264F4.c b/src/overlay013/ov13_022264F4.c index 5e5a1059ec..7dcfb8a0d5 100644 --- a/src/overlay013/ov13_022264F4.c +++ b/src/overlay013/ov13_022264F4.c @@ -726,8 +726,8 @@ static void ov13_02226FC4(UnkStruct_ov13_02227244 *param0) v0 = NARC_ctor(NARC_INDEX_BATTLE__GRAPHIC__B_BAG_GRA, param0->unk_00->unk_0C); - sub_020070E8(v0, 2, param0->unk_04, 6, 0, 0, 0, param0->unk_00->unk_0C); - sub_0200710C(v0, 0, param0->unk_04, 6, 0, 0, 0, param0->unk_00->unk_0C); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 2, param0->unk_04, 6, 0, 0, 0, param0->unk_00->unk_0C); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 0, param0->unk_04, 6, 0, 0, 0, param0->unk_00->unk_0C); { NNSG2dScreenData *v1; @@ -748,7 +748,7 @@ static void ov13_02226FC4(UnkStruct_ov13_02227244 *param0) { int v4 = ov16_0223EDE0(param0->unk_00->unk_00); - sub_02006E3C(38, sub_0200DD04(v4), param0->unk_04, 4, 1024 - (18 + 12), 0, 0, param0->unk_00->unk_0C); + Graphics_LoadTilesToBgLayer(38, sub_0200DD04(v4), param0->unk_04, 4, 1024 - (18 + 12), 0, 0, param0->unk_00->unk_0C); PaletteData_LoadBufferFromFileStart(param0->unk_08, 38, sub_0200DD08(v4), param0->unk_00->unk_0C, 1, 0x20, 14 * 16); } } diff --git a/src/overlay017/ov17_0223B140.c b/src/overlay017/ov17_0223B140.c index 02c8f99e61..82ea709a9f 100644 --- a/src/overlay017/ov17_0223B140.c +++ b/src/overlay017/ov17_0223B140.c @@ -637,8 +637,8 @@ static void ov17_0223BAD0(UnkStruct_ov17_02246F24 *param0) void ov17_0223BB14(UnkStruct_ov17_02246F24 *param0, int param1, int param2) { if (param1 == 0) { - sub_02006E3C(45, 3, param0->unk_0C.unk_24, 2, 0, 0x4000, 1, 21); - sub_02006E60(45, 5, param0->unk_0C.unk_24, 2, 0, 0, 1, 21); + Graphics_LoadTilesToBgLayer(45, 3, param0->unk_0C.unk_24, 2, 0, 0x4000, 1, 21); + Graphics_LoadTilemapToBgLayer(45, 5, param0->unk_0C.unk_24, 2, 0, 0, 1, 21); Bg_SetPriority(1, 1); Bg_SetPriority(2, 0); @@ -657,10 +657,10 @@ void ov17_0223BB14(UnkStruct_ov17_02246F24 *param0, int param1, int param2) static void ov17_0223BBA8(UnkStruct_ov17_02246F24 *param0, NARC *param1) { - sub_020070E8(param1, 1, param0->unk_0C.unk_24, 3, 0, 0, 1, 21); - sub_0200710C(param1, 2, param0->unk_0C.unk_24, 3, 0, 0, 1, 21); - sub_020070E8(param1, 3, param0->unk_0C.unk_24, 1, 0, 0, 1, 21); - sub_0200710C(param1, 4, param0->unk_0C.unk_24, 1, 0, 0, 1, 21); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 1, param0->unk_0C.unk_24, 3, 0, 0, 1, 21); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 2, param0->unk_0C.unk_24, 3, 0, 0, 1, 21); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 3, param0->unk_0C.unk_24, 1, 0, 0, 1, 21); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 4, param0->unk_0C.unk_24, 1, 0, 0, 1, 21); ov17_0223BB14(param0, 0, 0); diff --git a/src/overlay017/ov17_0223CB1C.c b/src/overlay017/ov17_0223CB1C.c index 19e9a7d980..1b6f8cc661 100644 --- a/src/overlay017/ov17_0223CB1C.c +++ b/src/overlay017/ov17_0223CB1C.c @@ -602,8 +602,8 @@ static void ov17_0223D4A8(UnkStruct_ov17_02247A48 *param0, NARC *param1) { int v0; - sub_020070E8(param1, 23, param0->unk_0C.unk_24, 3, 0, 0, 1, 22); - sub_0200710C(param1, 22, param0->unk_0C.unk_24, 3, 0, 0, 1, 22); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 23, param0->unk_0C.unk_24, 3, 0, 0, 1, 22); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 22, param0->unk_0C.unk_24, 3, 0, 0, 1, 22); Bg_ClearTilemap(param0->unk_0C.unk_24, 1); PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 45, 35, 22, 0, 0, 0); PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 45, 36, 22, 0, 0x20, 13 * 16); @@ -612,8 +612,8 @@ static void ov17_0223D4A8(UnkStruct_ov17_02247A48 *param0, NARC *param1) sub_0200DD0C(param0->unk_0C.unk_24, 1, 1, 15, v0, 22); PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 38, sub_0200DD08(v0), 22, 0, 0x20, 14 * 16); - sub_020070E8(param1, 24, param0->unk_0C.unk_24, 2, 0, 0, 1, 22); - sub_0200710C(param1, 21, param0->unk_0C.unk_24, 2, 0, 0, 1, 22); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 24, param0->unk_0C.unk_24, 2, 0, 0, 1, 22); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 21, param0->unk_0C.unk_24, 2, 0, 0, 1, 22); PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 45, 37, 22, 0, 0x20, 0xc * 16); } @@ -624,8 +624,8 @@ static void ov17_0223D5AC(UnkStruct_ov17_02247A48 *param0) static void ov17_0223D5B0(UnkStruct_ov17_02247A48 *param0, NARC *param1) { - sub_020070E8(param1, 19, param0->unk_0C.unk_24, 4, 0, 0, 1, 22); - sub_0200710C(param1, 20, param0->unk_0C.unk_24, 4, 0, 0, 1, 22); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 19, param0->unk_0C.unk_24, 4, 0, 0, 1, 22); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 20, param0->unk_0C.unk_24, 4, 0, 0, 1, 22); PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 45, 34, 22, 1, 0, 0); } diff --git a/src/overlay017/ov17_0223DAD0.c b/src/overlay017/ov17_0223DAD0.c index 47050f950f..8cc6cbd17b 100644 --- a/src/overlay017/ov17_0223DAD0.c +++ b/src/overlay017/ov17_0223DAD0.c @@ -783,7 +783,7 @@ static void ov17_0223E67C(UnkStruct_ov17_0224DF54 *param0, NARC *param1) { int v0; - sub_020070E8(param1, 13, param0->unk_14.unk_60, 3, 0, 0, 1, 23); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 13, param0->unk_14.unk_60, 3, 0, 0, 1, 23); { int v1, v2; @@ -791,7 +791,7 @@ static void ov17_0223E67C(UnkStruct_ov17_0224DF54 *param0, NARC *param1) ov17_0223E3CC(param0, &v1, &v2); v3 = ov17_0223F0BC(v2, 0); - sub_0200710C(param1, v3, param0->unk_14.unk_60, 3, 0, 0, 1, 23); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, v3, param0->unk_14.unk_60, 3, 0, 0, 1, 23); } PaletteData_LoadBufferFromFileStart(param0->unk_14.unk_90, 45, 32, 23, 0, 0, 0); diff --git a/src/overlay017/ov17_0223F7E4.c b/src/overlay017/ov17_0223F7E4.c index 337a03901d..1b2d9fa818 100644 --- a/src/overlay017/ov17_0223F7E4.c +++ b/src/overlay017/ov17_0223F7E4.c @@ -581,7 +581,7 @@ void *ov17_0223F88C(UnkStruct_02095C48 *param0, UnkStruct_ov17_0223F88C *param1, for (v4 = 0; v4 < 5; v4++) { v0->unk_20[v4] = Heap_AllocFromHeap(21, 0x800); - v3 = sub_020071D0(v1, Unk_ov17_02253250[v4], 1, &v2, 21); + v3 = Graphics_GetScrnDataFromOpenNARC(v1, Unk_ov17_02253250[v4], 1, &v2, 21); MI_CpuCopy32(v2->rawData, v0->unk_20[v4], 0x800); Heap_FreeToHeap(v3); } @@ -677,7 +677,7 @@ void ov17_0223F9C4(UnkStruct_ov17_0223F7E4 *param0, int param1, int param2, void } if ((v0->unk_00 != 0xffff) && ((param2 == 1) || (v0->unk_00 != v1->unk_00))) { - param0->unk_2C0 = sub_02006F50(45, v0->unk_00, 1, ¶m0->unk_2C4, 21); + param0->unk_2C0 = Graphics_GetCharData(45, v0->unk_00, 1, ¶m0->unk_2C4, 21); SysTask_ExecuteAfterVBlank(ov17_022411E4, param0, 10); } diff --git a/src/overlay017/ov17_022413D8.c b/src/overlay017/ov17_022413D8.c index f0b6315f63..f43cc43579 100644 --- a/src/overlay017/ov17_022413D8.c +++ b/src/overlay017/ov17_022413D8.c @@ -1754,7 +1754,7 @@ static void ov17_022431E8(SysTask *param0, void *param1) v1 = 2; } - sub_02006E60(45, v1, v0->unk_00->unk_0C.unk_24, 3, 0, 0, 1, 21); + Graphics_LoadTilemapToBgLayer(45, v1, v0->unk_00->unk_0C.unk_24, 3, 0, 0, 1, 21); } v0->unk_08++; diff --git a/src/overlay017/ov17_02247A48.c b/src/overlay017/ov17_02247A48.c index b56af29229..ef56dddb03 100644 --- a/src/overlay017/ov17_02247A48.c +++ b/src/overlay017/ov17_02247A48.c @@ -259,7 +259,7 @@ static void ov17_02247B00(UnkStruct_ov17_0224F30C *param0, void *param1, const U v0->unk_F5B = (Unk_ov17_02254468[0] + 4) * 8; } - sub_02006E60(45, 21, v0->unk_0C.unk_24, 2, 0, 0, 1, 22); + Graphics_LoadTilemapToBgLayer(45, 21, v0->unk_0C.unk_24, 2, 0, 0, 1, 22); SysTask_Start(ov17_02247C5C, v2, 30000); } diff --git a/src/overlay017/ov17_022492DC.c b/src/overlay017/ov17_022492DC.c index 41e114e34b..4dd109d334 100644 --- a/src/overlay017/ov17_022492DC.c +++ b/src/overlay017/ov17_022492DC.c @@ -355,31 +355,31 @@ static void ov17_022493DC(UnkStruct_ov17_022492DC *param0) param0->unk_E0[0] = Heap_AllocFromHeap(23, 0x200); param0->unk_E0[1] = Heap_AllocFromHeap(23, 0x200); - v2 = sub_02006F50(45, 9, 1, &v0, 23); + v2 = Graphics_GetCharData(45, 9, 1, &v0, 23); MI_CpuCopy32(v0->pRawData, param0->unk_C4[0], (0x8000 - (0x800 * 4))); Heap_FreeToHeap(v2); - v2 = sub_02006F50(45, 18, 1, &v0, 23); + v2 = Graphics_GetCharData(45, 18, 1, &v0, 23); MI_CpuCopy32(v0->pRawData, param0->unk_C4[1], (0x8000 - (0x800 * 4))); Heap_FreeToHeap(v2); - v2 = sub_02006F50(45, 16, 1, &v0, 23); + v2 = Graphics_GetCharData(45, 16, 1, &v0, 23); MI_CpuCopy32(v0->pRawData, param0->unk_C4[2], 6 * 12 * 0x20 * 3); Heap_FreeToHeap(v2); - v2 = sub_02006F6C(45, 7, 1, &v1, 23); + v2 = Graphics_GetScrnData(45, 7, 1, &v1, 23); MI_CpuCopy32(v1->rawData, param0->unk_D0[0], 0x800); Heap_FreeToHeap(v2); - v2 = sub_02006F6C(45, 8, 1, &v1, 23); + v2 = Graphics_GetScrnData(45, 8, 1, &v1, 23); MI_CpuCopy32(v1->rawData, param0->unk_D0[1], 0x800); Heap_FreeToHeap(v2); - v2 = sub_02006F6C(45, 17, 1, &v1, 23); + v2 = Graphics_GetScrnData(45, 17, 1, &v1, 23); MI_CpuCopy32(v1->rawData, param0->unk_D0[2], 0x800); Heap_FreeToHeap(v2); - v2 = sub_02006F6C(45, 28, 1, &v1, 23); + v2 = Graphics_GetScrnData(45, 28, 1, &v1, 23); MI_CpuCopy32(v1->rawData, param0->unk_D0[3], 0x800); Heap_FreeToHeap(v2); diff --git a/src/overlay017/ov17_0224F4D4.c b/src/overlay017/ov17_0224F4D4.c index ede9bbf8bb..1b56314091 100644 --- a/src/overlay017/ov17_0224F4D4.c +++ b/src/overlay017/ov17_0224F4D4.c @@ -612,8 +612,8 @@ static void ov17_0224FE68(UnkStruct_ov17_0224FCA0 *param0) static void ov17_0224FE70(UnkStruct_ov17_0224FCA0 *param0) { - sub_02006E3C(45, 19, param0->unk_10.unk_20, 4, 0, 0, 1, 24); - sub_02006E60(45, 20, param0->unk_10.unk_20, 4, 0, 0, 1, 24); + Graphics_LoadTilesToBgLayer(45, 19, param0->unk_10.unk_20, 4, 0, 0, 1, 24); + Graphics_LoadTilemapToBgLayer(45, 20, param0->unk_10.unk_20, 4, 0, 0, 1, 24); PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 45, 34, 24, 1, 0, 0); } diff --git a/src/overlay017/ov17_02250744.c b/src/overlay017/ov17_02250744.c index 7e31ecdad4..15fa78af12 100644 --- a/src/overlay017/ov17_02250744.c +++ b/src/overlay017/ov17_02250744.c @@ -282,8 +282,8 @@ void ov17_022509AC(UnkStruct_ov17_0224FCA0 *param0) v1 = NARC_ctor(NARC_INDEX_CONTEST__GRAPHIC__CONTEST_BG, 24); - sub_020070E8(v1, 23, param0->unk_10.unk_20, 3, 0, 0, 1, 24); - sub_0200710C(v1, 22, param0->unk_10.unk_20, 3, 0, 0, 1, 24); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 23, param0->unk_10.unk_20, 3, 0, 0, 1, 24); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 22, param0->unk_10.unk_20, 3, 0, 0, 1, 24); Bg_ClearTilemap(param0->unk_10.unk_20, 1); PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 45, 35, 24, 0, 0, 0); PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 45, 36, 24, 0, 0x20, 13 * 16); @@ -320,9 +320,9 @@ void ov17_02250B00(UnkStruct_ov17_0224FCA0 *param0) v1 = NARC_ctor(NARC_INDEX_CONTEST__GRAPHIC__CONTEST_BG, 24); - sub_020070E8(v1, 27, param0->unk_10.unk_20, 3, 0, 0, 1, 24); - sub_0200710C(v1, 25, param0->unk_10.unk_20, 3, 0, 0, 1, 24); - sub_0200710C(v1, 26, param0->unk_10.unk_20, 2, 0, 0, 1, 24); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 27, param0->unk_10.unk_20, 3, 0, 0, 1, 24); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 25, param0->unk_10.unk_20, 3, 0, 0, 1, 24); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 26, param0->unk_10.unk_20, 2, 0, 0, 1, 24); Bg_ClearTilemap(param0->unk_10.unk_20, 1); PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 45, 39, 24, 0, 0, 0); PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 45, 36, 24, 0, 0x20, 13 * 16); diff --git a/src/overlay019/ov19_021D61B0.c b/src/overlay019/ov19_021D61B0.c index 1de0f6c308..49340d1fa1 100644 --- a/src/overlay019/ov19_021D61B0.c +++ b/src/overlay019/ov19_021D61B0.c @@ -181,7 +181,7 @@ BOOL ov19_021D61B0(UnkStruct_ov19_021D61B0 **param0, const UnkStruct_ov19_021D4D NNS_G2dInitImagePaletteProxy(&(v0->unk_1A8)); - sub_0200716C(v3, 26, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 10, &(v0->unk_1A8)); + Graphics_LoadPartialPaletteFromOpenNARC(v3, 26, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 10, &(v0->unk_1A8)); Font_UseImmediateGlyphAccess(FONT_SYSTEM, 10); v0->unk_1BC = sub_0200762C(10); @@ -1795,14 +1795,14 @@ static void ov19_021D74B4(UnkStruct_ov19_021D61B0 *param0, const UnkStruct_ov19_ static void ov19_021D75CC(UnkStruct_ov19_021D61B0 *param0, const UnkStruct_ov19_021D4DF0 *param1, NARC *param2) { - sub_020070E8(param2, 4, param0->unk_1C0, 1, 0, 0, 1, 10); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2, 4, param0->unk_1C0, 1, 0, 0, 1, 10); Bg_FillTilemapRect(param0->unk_1C0, 1, 0x0, 0, 0, 32, 32, 17); Bg_CopyTilemapBufferToVRAM(param0->unk_1C0, 1); - sub_020070E8(param2, 1, param0->unk_1C0, 2, 0, 0, 1, 10); - sub_02007130(param2, 5, 0, 0, 0x20 * 7, 10); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2, 1, param0->unk_1C0, 2, 0, 0, 1, 10); + Graphics_LoadPaletteFromOpenNARC(param2, 5, 0, 0, 0x20 * 7, 10); if (ov19_021D5E08(param1) != 4) { - sub_0200710C(param2, 0, param0->unk_1C0, 2, 0, 0, 1, 10); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param2, 0, param0->unk_1C0, 2, 0, 0, 1, 10); } ov19_021D7A9C(¶m0->unk_494); diff --git a/src/overlay019/ov19_021D79F8.c b/src/overlay019/ov19_021D79F8.c index 05c9e4fffb..999317ced3 100644 --- a/src/overlay019/ov19_021D79F8.c +++ b/src/overlay019/ov19_021D79F8.c @@ -174,7 +174,7 @@ static void ov19_021D7BC0(UnkStruct_ov19_021D8318 *param0, const UnkStruct_ov19_ NNSG2dPaletteData *v0; void *v1; - v1 = sub_02006F88(18, Unk_ov19_021E0178[param1->unk_01].unk_02, &v0, 10); + v1 = Graphics_GetPlttData(18, Unk_ov19_021E0178[param1->unk_01].unk_02, &v0, 10); if (v1) { int v2; diff --git a/src/overlay019/ov19_021D8B54.c b/src/overlay019/ov19_021D8B54.c index 4b63b5787e..c8bfe5c836 100644 --- a/src/overlay019/ov19_021D8B54.c +++ b/src/overlay019/ov19_021D8B54.c @@ -80,8 +80,8 @@ BOOL ov19_021D8B54(UnkStruct_ov19_021D8E00 *param0, UnkStruct_ov19_021D61B0 *par param0->unk_10 = NULL; param0->unk_754 = 0; param0->unk_78E = 1; - param0->unk_14 = sub_02007204(param4, 13, 1, &(param0->unk_1C), 10); - param0->unk_18 = sub_02007220(param4, 14, 1, &(param0->unk_20), 10); + param0->unk_14 = Graphics_GetCellBankFromOpenNARC(param4, 13, 1, &(param0->unk_1C), 10); + param0->unk_18 = Graphics_GetAnimBankFromOpenNARC(param4, 14, 1, &(param0->unk_20), 10); if ((param0->unk_14 == NULL) || (param0->unk_18 == NULL)) { return 0; @@ -97,7 +97,7 @@ void ov19_021D8C1C(UnkStruct_ov19_021D8E00 *param0, NARC *param1) NNS_G2dInitImageProxy(&(param0->unk_24)); - sub_0200718C(param1, 12, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0 * 0x20, 10, &(param0->unk_24)); + Graphics_LoadImageMappingFromOpenNARC(param1, 12, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0 * 0x20, 10, &(param0->unk_24)); ov19_021D783C(&v0, &(param0->unk_24), ov19_021D77D0(param0->unk_794), param0->unk_1C, param0->unk_20, ((param0->unk_785 == 1) ? 1 : 2)); ov19_021D9D48(¶m0->unk_764, ¶m0->unk_768, ¶m0->unk_785, param0); diff --git a/src/overlay019/ov19_021DA270.c b/src/overlay019/ov19_021DA270.c index e9ce531021..9d82b858ba 100644 --- a/src/overlay019/ov19_021DA270.c +++ b/src/overlay019/ov19_021DA270.c @@ -26,9 +26,9 @@ BOOL ov19_021DA270(UnkStruct_ov19_021DA384 *param0, UnkStruct_ov19_021D61B0 *par param0->unk_48 = NARC_ctor(NARC_INDEX_POKETOOL__ICONGRA__PL_POKE_ICON, 10); NNS_G2dInitImagePaletteProxy(&v0); - sub_0200716C(param0->unk_48, PokeIconPalettesFileIndex(), NNS_G2D_VRAM_TYPE_2DMAIN, 2 * 0x20, 10, &v0); + Graphics_LoadPartialPaletteFromOpenNARC(param0->unk_48, PokeIconPalettesFileIndex(), NNS_G2D_VRAM_TYPE_2DMAIN, 2 * 0x20, 10, &v0); - v2 = sub_020071EC(param0->unk_48, PokeIconPalettesFileIndex(), &v1, 10); + v2 = Graphics_GetPlttDataFromOpenNARC(param0->unk_48, PokeIconPalettesFileIndex(), &v1, 10); if (v2) { BOOL v3; @@ -47,10 +47,10 @@ BOOL ov19_021DA270(UnkStruct_ov19_021DA384 *param0, UnkStruct_ov19_021D61B0 *par Heap_FreeToHeap(v2); } - param0->unk_08 = sub_02007204(param4, 21, 1, &(param0->unk_10), 10); - param0->unk_00 = sub_02007220(param4, 22, 1, &(param0->unk_04), 10); - param0->unk_14 = sub_02007204(param4, 23, 1, &(param0->unk_1C), 10); - param0->unk_18 = sub_02007220(param4, 24, 1, &(param0->unk_20), 10); + param0->unk_08 = Graphics_GetCellBankFromOpenNARC(param4, 21, 1, &(param0->unk_10), 10); + param0->unk_00 = Graphics_GetAnimBankFromOpenNARC(param4, 22, 1, &(param0->unk_04), 10); + param0->unk_14 = Graphics_GetCellBankFromOpenNARC(param4, 23, 1, &(param0->unk_1C), 10); + param0->unk_18 = Graphics_GetAnimBankFromOpenNARC(param4, 24, 1, &(param0->unk_20), 10); if ((param0->unk_08 == NULL) || (param0->unk_00 == NULL) || (param0->unk_48 == NULL)) { return 0; diff --git a/src/overlay019/ov19_021DA814.c b/src/overlay019/ov19_021DA814.c index 3f81fad84d..2a2db5b061 100644 --- a/src/overlay019/ov19_021DA814.c +++ b/src/overlay019/ov19_021DA814.c @@ -20,8 +20,8 @@ BOOL ov19_021DA814(UnkStruct_ov19_021DA8D8 *param0, UnkStruct_ov19_021D61B0 *par param0->unk_40 = param2; param0->unk_00 = param3; param0->unk_04 = NULL; - param0->unk_08 = sub_02007204(param4, 10, 1, &(param0->unk_10), 10); - param0->unk_0C = sub_02007220(param4, 11, 1, &(param0->unk_14), 10); + param0->unk_08 = Graphics_GetCellBankFromOpenNARC(param4, 10, 1, &(param0->unk_10), 10); + param0->unk_0C = Graphics_GetAnimBankFromOpenNARC(param4, 11, 1, &(param0->unk_14), 10); if ((param0->unk_08 == NULL) || (param0->unk_0C == NULL)) { return 0; @@ -36,7 +36,7 @@ void ov19_021DA864(UnkStruct_ov19_021DA8D8 *param0, NARC *param1) NNS_G2dInitImageProxy(&(param0->unk_18)); - sub_0200718C(param1, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 1256 * 0x20, 10, &(param0->unk_18)); + Graphics_LoadImageMappingFromOpenNARC(param1, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 1256 * 0x20, 10, &(param0->unk_18)); ov19_021D783C(&v0, &(param0->unk_18), ov19_021D77D0(param0->unk_44), param0->unk_10, param0->unk_14, 2); param0->unk_04 = ov19_021D785C(param0->unk_00, &v0, 183 + ov19_021D7820(param0->unk_44), 176, 44, NNS_G2D_VRAM_TYPE_2DMAIN); CellActor_SetExplicitPalette(param0->unk_04, 1); diff --git a/src/overlay019/ov19_021DA92C.c b/src/overlay019/ov19_021DA92C.c index a69774490c..e107cfb6b0 100644 --- a/src/overlay019/ov19_021DA92C.c +++ b/src/overlay019/ov19_021DA92C.c @@ -74,11 +74,11 @@ BOOL ov19_021DA92C(UnkStruct_ov19_021DA9E0 *param0, UnkStruct_ov19_021D61B0 *par param0->unk_20 = ov19_021D7818(param1); param0->unk_18 = sub_0200C440(9, 6, 15, 10); param0->unk_1C = sub_0200C440(1, 2, 15, 10); - param0->unk_28 = sub_02007204(param6, 16, 1, &(param0->unk_2C), 10); + param0->unk_28 = Graphics_GetCellBankFromOpenNARC(param6, 16, 1, &(param0->unk_2C), 10); param0->unk_30 = NULL; param0->unk_44 = MessageLoader_GetNewStrbuf(param5, 21); param0->unk_48 = MessageLoader_GetNewStrbuf(param5, 22); - param0->unk_34 = sub_02006FA0(sub_0207C944(), sub_0207C924(), 1, &(param0->unk_38), 10); + param0->unk_34 = Graphics_GetCellBank(sub_0207C944(), sub_0207C924(), 1, &(param0->unk_38), 10); for (v0 = 0; v0 < 2; v0++) { param0->unk_3C[v0] = NULL; @@ -218,11 +218,11 @@ static void ov19_021DAB44(UnkStruct_ov19_021DA9E0 *param0) v2 = sub_0207C944(); v3 = sub_0207C908(2); - sub_02006E84(v2, sub_0207C920(), 1, 10 * 0x20, 0x20 * 3, 10); + Graphics_LoadPalette(v2, sub_0207C920(), 1, 10 * 0x20, 0x20 * 3, 10); for (v4 = 0; v4 < 2; v4++) { NNS_G2dInitImageProxy(&v0); - sub_02006F28(v2, v3, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, (1504 + (8 * v4)) * 0x20, 10, &v0); + Graphics_LoadImageMappingAndSetVramMode(v2, v3, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, (1504 + (8 * v4)) * 0x20, 10, &v0); ov19_021D783C(&v1, &v0, ov19_021D77D0(param0->unk_14), param0->unk_38, NULL, 3); param0->unk_3C[v4] = ov19_021D785C(param0->unk_0C, &v1, 24 + 36 * v4, 176, 46, NNS_G2D_VRAM_TYPE_2DMAIN); @@ -233,7 +233,7 @@ static void ov19_021DAB44(UnkStruct_ov19_021DA9E0 *param0) NNS_G2dInitImageProxy(&v0); - sub_02006F00(18, 15, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 1480 * 0x20, 10, &v0); + Graphics_LoadImageMapping(18, 15, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 1480 * 0x20, 10, &v0); ov19_021D783C(&v1, &v0, ov19_021D77D0(param0->unk_14), param0->unk_2C, NULL, 3); param0->unk_30 = ov19_021D785C(param0->unk_0C, &v1, 56, 176, 47, NNS_G2D_VRAM_TYPE_2DMAIN); @@ -416,7 +416,7 @@ static void ov19_021DAE60(Window *param0, UnkStruct_ov19_021DA9E0 *param1, u32 p v3 = sub_0207C944(); v4 = sub_0207C908(param1->unk_10->unk_4C.unk_0C); - sub_02006EC0(sub_0207C944(), sub_0207C908(param1->unk_10->unk_4C.unk_0C), 0, 1504 * 0x20, 0, 1, 10); + Graphics_LoadObjectTiles(sub_0207C944(), sub_0207C908(param1->unk_10->unk_4C.unk_0C), 0, 1504 * 0x20, 0, 1, 10); v2 = *CellActor_GetPosition(param1->unk_3C[0]); v2.y = (176 + (16 * param3)) << FX32_SHIFT; @@ -426,7 +426,7 @@ static void ov19_021DAE60(Window *param0, UnkStruct_ov19_021DA9E0 *param1, u32 p CellActor_SetDrawFlag(param1->unk_3C[0], 1); if (param1->unk_10->unk_4C.unk_0C != param1->unk_10->unk_4C.unk_0D) { - sub_02006EC0(sub_0207C944(), sub_0207C908(param1->unk_10->unk_4C.unk_0D), 0, (1504 + 8) * 0x20, 0, 1, 10); + Graphics_LoadObjectTiles(sub_0207C944(), sub_0207C908(param1->unk_10->unk_4C.unk_0D), 0, (1504 + 8) * 0x20, 0, 1, 10); v2.x += (36 << FX32_SHIFT); diff --git a/src/overlay019/ov19_021DB2FC.c b/src/overlay019/ov19_021DB2FC.c index 3f93b5672f..ae13143aca 100644 --- a/src/overlay019/ov19_021DB2FC.c +++ b/src/overlay019/ov19_021DB2FC.c @@ -42,7 +42,7 @@ BOOL ov19_021DB2FC(UnkStruct_ov19_021DB6F0 *param0, UnkStruct_ov19_021D61B0 *par param0->unk_1C = 0; param0->unk_1E = 0; param0->unk_18 = NULL; - param0->unk_24 = sub_020071B4(param8, 25, 1, &(param0->unk_28), 10); + param0->unk_24 = Graphics_GetCharDataFromOpenNARC(param8, 25, 1, &(param0->unk_28), 10); if ((param0->unk_24 == NULL) || (param0->unk_30 == NULL) || (param0->unk_34 == NULL)) { return 0; @@ -98,8 +98,8 @@ void ov19_021DB3C4(UnkStruct_ov19_021DB6F0 *param0) } } - sub_02006E3C(38, 0, param0->unk_00, 1, 512, 0, 0, 10); - sub_02006E84(38, 24, 0, 7 * 0x20, 0x20, 10); + Graphics_LoadTilesToBgLayer(38, 0, param0->unk_00, 1, 512, 0, 0, 10); + Graphics_LoadPalette(38, 24, 0, 7 * 0x20, 0x20, 10); sub_0200DD0C(param0->unk_00, 1, 521, 8, param0->unk_20, 10); } diff --git a/src/overlay019/ov19_021DB8E4.c b/src/overlay019/ov19_021DB8E4.c index a2d61c519e..39ad30b237 100644 --- a/src/overlay019/ov19_021DB8E4.c +++ b/src/overlay019/ov19_021DB8E4.c @@ -76,17 +76,17 @@ BOOL ov19_021DB8E4(UnkStruct_ov19_021DBA9C *param0, UnkStruct_ov19_021D61B0 *par param0->unk_0C = param2; param0->unk_08 = param4; - sub_020070E8(param5, 4, param3, 1, 0, 0, 1, 10); + Graphics_LoadTilesToBgLayerFromOpenNARC(param5, 4, param3, 1, 0, 0, 1, 10); { NNSG2dPaletteData *v1; void *v2; - v2 = sub_020071EC(param5, 27, &v1, 10); + v2 = Graphics_GetPlttDataFromOpenNARC(param5, 27, &v1, 10); MI_CpuCopy16(v1->pRawData, &(param0->unk_E4[0][0]), 0x40); Heap_FreeToHeap(v2); - v2 = sub_020071EC(param5, 20, &v1, 10); + v2 = Graphics_GetPlttDataFromOpenNARC(param5, 20, &v1, 10); MI_CpuCopy16(v1->pRawData, &(param0->unk_E4[0][32]), 0x20); Heap_FreeToHeap(v2); @@ -109,10 +109,10 @@ BOOL ov19_021DB8E4(UnkStruct_ov19_021DBA9C *param0, UnkStruct_ov19_021D61B0 *par GXS_LoadOBJPltt(param0->unk_E4[0], 13 * 0x20, 96); } - param0->unk_14 = sub_020071B4(param5, 17, 1, &(param0->unk_18), 10); - param0->unk_1C = sub_02007204(param5, 18, 1, &(param0->unk_20), 10); - param0->unk_34 = sub_020071D0(param5, 2, 1, &(param0->unk_38), 10); - param0->unk_2C = sub_020071D0(param5, 3, 1, &(param0->unk_30), 10); + param0->unk_14 = Graphics_GetCharDataFromOpenNARC(param5, 17, 1, &(param0->unk_18), 10); + param0->unk_1C = Graphics_GetCellBankFromOpenNARC(param5, 18, 1, &(param0->unk_20), 10); + param0->unk_34 = Graphics_GetScrnDataFromOpenNARC(param5, 2, 1, &(param0->unk_38), 10); + param0->unk_2C = Graphics_GetScrnDataFromOpenNARC(param5, 3, 1, &(param0->unk_30), 10); param0->unk_44 = sub_0200C440(2, 13, 4, 10); param0->unk_4BFC = Strbuf_Init(500, 10); param0->unk_10 = NULL; @@ -717,11 +717,11 @@ static void ov19_021DC4F8(UnkStruct_ov19_021DBA9C *param0, u32 param1) ov19_021D783C(&v0, &v2, ov19_021D77D0(param0->unk_00), v1->unk_1C, v1->unk_20, 0); NNS_G2dInitImageProxy(&v2); - v4 = sub_02006F50(16, Item_FileID(param1, 1), 0, &v3, 10); + v4 = Graphics_GetCharData(16, Item_FileID(param1, 1), 0, &v3, 10); v3->mapingType = GX_GetOBJVRamModeChar(); NNS_G2dLoadImage1DMapping(v3, 1520 * 0x20, NNS_G2D_VRAM_TYPE_2DMAIN, &v2); - sub_02006E84(16, Item_FileID(param1, 2), 1, 6 * 0x20, 0x20, 10); + Graphics_LoadPalette(16, Item_FileID(param1, 2), 1, 6 * 0x20, 0x20, 10); param0->unk_90 = ov19_021D785C(param0->unk_08, &v0, 18, 224, 0, NNS_G2D_VRAM_TYPE_2DMAIN); if (param0->unk_90) { diff --git a/src/overlay019/ov19_021DC5F0.c b/src/overlay019/ov19_021DC5F0.c index 3df4bccba8..c5f5ad8657 100644 --- a/src/overlay019/ov19_021DC5F0.c +++ b/src/overlay019/ov19_021DC5F0.c @@ -68,7 +68,7 @@ BOOL ov19_021DC5F0(UnkStruct_ov19_021DC680 *param0, UnkStruct_ov19_021D61B0 *par ov19_021DA3CC(param0->unk_38, param0->unk_3C, 6); param0->unk_1C = Heap_AllocFromHeap(10, sizeof(VecFx32) * 6 * 8); - param0->unk_14 = sub_020071D0(param5, 6, 1, &(param0->unk_18), 10); + param0->unk_14 = Graphics_GetScrnDataFromOpenNARC(param5, 6, 1, &(param0->unk_18), 10); if ((param0->unk_14 == NULL) || (param0->unk_1C == NULL)) { return 0; diff --git a/src/overlay019/ov19_021DCF88.c b/src/overlay019/ov19_021DCF88.c index 2cecf113ff..5d6eef668a 100644 --- a/src/overlay019/ov19_021DCF88.c +++ b/src/overlay019/ov19_021DCF88.c @@ -418,10 +418,10 @@ void ov19_021DD078(UnkStruct_ov19_021DCF88 *param0) void ov19_021DD114(UnkStruct_ov19_021DCF88 *param0, NARC *param1) { if (param0) { - sub_020070E8(param1, 127, param0->unk_08, 7, 0, 0, 1, 10); - sub_0200710C(param1, 124, param0->unk_08, 7, 0, 0, 1, 10); - sub_0200710C(param1, 125, param0->unk_08, 6, 0, 0, 1, 10); - sub_0200710C(param1, 126, param0->unk_08, 5, 0, 0, 1, 10); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 127, param0->unk_08, 7, 0, 0, 1, 10); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 124, param0->unk_08, 7, 0, 0, 1, 10); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 125, param0->unk_08, 6, 0, 0, 1, 10); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 126, param0->unk_08, 5, 0, 0, 1, 10); Bg_FillTilesRange(param0->unk_08, 4, 0x0, 1, 0); Bg_FillTilemapRect(param0->unk_08, 4, 0x0, 0, 0, 32, 32, 17); Bg_CopyTilemapBufferToVRAM(param0->unk_08, 4); @@ -430,7 +430,7 @@ void ov19_021DD114(UnkStruct_ov19_021DCF88 *param0, NARC *param1) Window_FillTilemap(&(param0->unk_88), 0x0); Window_CopyToVRAM(¶m0->unk_88); ov19_021DE324(param0); - sub_02007130(param1, 128, 4, 0, 0x20 * 3, 10); + Graphics_LoadPaletteFromOpenNARC(param1, 128, 4, 0, 0x20 * 3, 10); ov19_021DD224(param0, param1); } } @@ -443,7 +443,7 @@ static void ov19_021DD224(UnkStruct_ov19_021DCF88 *param0, NARC *param1) ov19_021DD2BC(param0, param1); NNS_G2dInitImageProxy(&v1); - sub_0200718C(param1, 138, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DSUB, 0 * 0x20, 10, &(v1)); + Graphics_LoadImageMappingFromOpenNARC(param1, 138, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DSUB, 0 * 0x20, 10, &(v1)); ov19_021D783C(&v0, &v1, &(param0->unk_18), param0->unk_9C, param0->unk_A4, 3); @@ -459,13 +459,13 @@ static void ov19_021DD224(UnkStruct_ov19_021DCF88 *param0, NARC *param1) static void ov19_021DD2BC(UnkStruct_ov19_021DCF88 *param0, NARC *param1) { - param0->unk_98 = sub_02007204(param1, 139, 1, &(param0->unk_9C), 10); - param0->unk_A0 = sub_02007220(param1, 140, 1, &(param0->unk_A4), 10); - param0->unk_A8 = sub_02007204(param1, 142, 1, &(param0->unk_AC), 10); - param0->unk_B0 = sub_02007220(param1, 143, 1, &(param0->unk_B4), 10); + param0->unk_98 = Graphics_GetCellBankFromOpenNARC(param1, 139, 1, &(param0->unk_9C), 10); + param0->unk_A0 = Graphics_GetAnimBankFromOpenNARC(param1, 140, 1, &(param0->unk_A4), 10); + param0->unk_A8 = Graphics_GetCellBankFromOpenNARC(param1, 142, 1, &(param0->unk_AC), 10); + param0->unk_B0 = Graphics_GetAnimBankFromOpenNARC(param1, 143, 1, &(param0->unk_B4), 10); NNS_G2dInitImagePaletteProxy(&(param0->unk_18)); - sub_0200716C(param1, 144, NNS_G2D_VRAM_TYPE_2DSUB, 0, 10, &(param0->unk_18)); + Graphics_LoadPartialPaletteFromOpenNARC(param1, 144, NNS_G2D_VRAM_TYPE_2DSUB, 0, 10, &(param0->unk_18)); } static SysTask *ov19_021DD344(UnkStruct_ov19_021DCF88 *param0, SysTaskFunc param1, void *param2) @@ -933,7 +933,7 @@ static void ov19_021DD9DC(UnkStruct_ov19_021DCF88 *param0) v2 = ov19_021D5EC8(param0->unk_04); NNS_G2dInitImageProxy(&v1); - sub_02006F00(18, 141, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DSUB, 192 * 0x20, 10, &v1); + Graphics_LoadImageMapping(18, 141, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DSUB, 192 * 0x20, 10, &v1); for (v3 = 0; v3 < 8; v3++) { ov19_021D783C(&v0, &v1, &(param0->unk_18), param0->unk_AC, param0->unk_B4, 2); diff --git a/src/overlay019/ov19_021DE3E8.c b/src/overlay019/ov19_021DE3E8.c index b0e022f017..d6f6c3cca8 100644 --- a/src/overlay019/ov19_021DE3E8.c +++ b/src/overlay019/ov19_021DE3E8.c @@ -107,7 +107,7 @@ static void ov19_021DE450(UnkStruct_ov19_021DE3E8 *param0) int v4; ov19_021D783C(&v0, &v1, ov19_021D77D0(param0->unk_04), param0->unk_14->unk_1C, param0->unk_14->unk_20, 0); - v3 = sub_02006F50(16, Item_FileID(1, 1), 0, &v2, 10); + v3 = Graphics_GetCharData(16, Item_FileID(1, 1), 0, &v2, 10); if (v3) { int v5; @@ -225,8 +225,8 @@ static void ov19_021DE5D4(UnkStruct_ov19_021DE3E8 *param0) v2 = 2; } - sub_02006EC0(16, Item_FileID(v0, 1), 0, Unk_ov19_021E04CC[v3].unk_00, 0, 0, 10); - sub_02006E84(16, Item_FileID(v0, 2), 1, Unk_ov19_021E04CC[v3].unk_04 * 0x20, 0x20, 10); + Graphics_LoadObjectTiles(16, Item_FileID(v0, 1), 0, Unk_ov19_021E04CC[v3].unk_00, 0, 0, 10); + Graphics_LoadPalette(16, Item_FileID(v0, 2), 1, Unk_ov19_021E04CC[v3].unk_04 * 0x20, 0x20, 10); CellActor_SetExplicitPriority(param0->unk_1C[v3], v2); ov19_021D78AC(param0->unk_1C[v3], 2); @@ -266,8 +266,8 @@ static void ov19_021DE718(UnkStruct_ov19_021DE3E8 *param0, int param1, int param ov19_021DE694(param0, &v0, &v1); - sub_02006EC0(16, Item_FileID(param2, 1), 0, Unk_ov19_021E04CC[param1].unk_00, 0, 0, 10); - sub_02006E84(16, Item_FileID(param2, 2), 1, Unk_ov19_021E04CC[param1].unk_04 * 0x20, 0x20, 10); + Graphics_LoadObjectTiles(16, Item_FileID(param2, 1), 0, Unk_ov19_021E04CC[param1].unk_00, 0, 0, 10); + Graphics_LoadPalette(16, Item_FileID(param2, 2), 1, Unk_ov19_021E04CC[param1].unk_04 * 0x20, 0x20, 10); CellActor_SetExplicitPriority(param0->unk_1C[param1], v1); ov19_021D78AC(param0->unk_1C[param1], 3); diff --git a/src/overlay019/ov19_021DEC04.c b/src/overlay019/ov19_021DEC04.c index 16ace07dae..5d4732811a 100644 --- a/src/overlay019/ov19_021DEC04.c +++ b/src/overlay019/ov19_021DEC04.c @@ -95,8 +95,8 @@ BOOL ov19_021DEC04(UnkStruct_ov19_021DEC04 **param0, UnkStruct_ov19_021D61B0 *pa v0->unk_0C = param3; v0->unk_10 = param4; v0->unk_14 = ov19_021D77D8(param1); - v0->unk_370 = sub_020071D0(param6, 7, 1, &(v0->unk_368), 10); - v0->unk_374 = sub_020071D0(param6, 8, 1, &(v0->unk_36C), 10); + v0->unk_370 = Graphics_GetScrnDataFromOpenNARC(param6, 7, 1, &(v0->unk_368), 10); + v0->unk_374 = Graphics_GetScrnDataFromOpenNARC(param6, 8, 1, &(v0->unk_36C), 10); v0->unk_6C = param5; v0->unk_70 = MessageLoader_Init(1, 26, 647, 10); v0->unk_74 = Strbuf_Init(32, 10); @@ -127,12 +127,12 @@ void ov19_021DECE8(UnkStruct_ov19_021DEC04 *param0, NARC *param1) if (param0) { ov19_021DEEFC(param0); - sub_020070E8(param1, 132, param0->unk_0C, 5, 0, 0, 1, 10); - sub_0200710C(param1, 129, param0->unk_0C, 5, 0, 0, 1, 10); - sub_0200710C(param1, 130, param0->unk_0C, 6, 0, 0, 1, 10); - sub_0200710C(param1, 131, param0->unk_0C, 7, 0, 0, 1, 10); - sub_02007130(param1, 133, 4, 0, 0x20 * 4, 10); - sub_02006E84(19, PokeIconPalettesFileIndex(), 5, 4 * 0x20, 4 * 0x20, 10); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 132, param0->unk_0C, 5, 0, 0, 1, 10); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 129, param0->unk_0C, 5, 0, 0, 1, 10); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 130, param0->unk_0C, 6, 0, 0, 1, 10); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 131, param0->unk_0C, 7, 0, 0, 1, 10); + Graphics_LoadPaletteFromOpenNARC(param1, 133, 4, 0, 0x20 * 4, 10); + Graphics_LoadPalette(19, PokeIconPalettesFileIndex(), 5, 4 * 0x20, 4 * 0x20, 10); Bg_ClearTilesRange(4, 0x20, 0, 10); Bg_FillTilemapRect(param0->unk_0C, 4, 0x0, 0, 0, 32, 32, 17); @@ -583,12 +583,12 @@ static void ov19_021DF5D0(UnkStruct_ov19_021DEC04 *param0, NARC *param1) CellActorResourceData v2; u32 v3, v4, v5; - param0->unk_5C = sub_02007204(param1, 135, 1, &(param0->unk_60), 10); - param0->unk_64 = sub_02007220(param1, 136, 1, &(param0->unk_68), 10); + param0->unk_5C = Graphics_GetCellBankFromOpenNARC(param1, 135, 1, &(param0->unk_60), 10); + param0->unk_64 = Graphics_GetAnimBankFromOpenNARC(param1, 136, 1, &(param0->unk_68), 10); - sub_02007130(param1, 137, 5, 0, 0x20 * 3, 10); + Graphics_LoadPaletteFromOpenNARC(param1, 137, 5, 0, 0x20 * 3, 10); NNS_G2dInitImageProxy(&v1); - v3 = sub_0200718C(param1, 134, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DSUB, 0, 10, &v1); + v3 = Graphics_LoadImageMappingFromOpenNARC(param1, 134, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DSUB, 0, 10, &v1); ov19_021D783C(&v2, &v1, ov19_021D77D0(param0->unk_04), param0->unk_60, param0->unk_68, 1); for (v4 = 0; v4 < 2; v4++) { diff --git a/src/overlay020/ov20_021D2098.c b/src/overlay020/ov20_021D2098.c index 2c9e97f2a1..15e757dbc7 100644 --- a/src/overlay020/ov20_021D2098.c +++ b/src/overlay020/ov20_021D2098.c @@ -320,11 +320,11 @@ static void ov20_021D2370(UnkStruct_ov20_021D2238 *param0, NARC *param1) NNS_G2dInitImageProxy(&(v0->unk_1B4[0])); NNS_G2dInitImageProxy(&(v0->unk_1B4[1])); - sub_0200718C(param1, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 35, &(v0->unk_1B4[0])); - sub_0200716C(param1, 10, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 35, &(v0->unk_1FC[0])); + Graphics_LoadImageMappingFromOpenNARC(param1, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 35, &(v0->unk_1B4[0])); + Graphics_LoadPartialPaletteFromOpenNARC(param1, 10, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 35, &(v0->unk_1FC[0])); - v0->unk_234[0] = sub_02007204(param1, 7, 1, &(v0->unk_224[0]), 35); - v0->unk_23C[0] = sub_02007220(param1, 8, 1, &(v0->unk_22C[0]), 35); + v0->unk_234[0] = Graphics_GetCellBankFromOpenNARC(param1, 7, 1, &(v0->unk_224[0]), 35); + v0->unk_23C[0] = Graphics_GetAnimBankFromOpenNARC(param1, 8, 1, &(v0->unk_22C[0]), 35); v0->unk_234[1] = NULL; v0->unk_23C[1] = NULL; } diff --git a/src/overlay020/ov20_021D2EA4.c b/src/overlay020/ov20_021D2EA4.c index e588cc8be9..ca9937fecf 100644 --- a/src/overlay020/ov20_021D2EA4.c +++ b/src/overlay020/ov20_021D2EA4.c @@ -127,9 +127,9 @@ void ov20_021D2F50(UnkStruct_ov20_021D30F8 *param0, NARC *param1) v0 = ov20_021D2E04(param0->unk_00); ov20_021D30A4(param0, param1); - sub_0200710C(param1, 0, v0, 0, 0, 0, 1, 35); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 0, v0, 0, 0, 0, 1, 35); - v1 = sub_020070E8(param1, 1, v0, 0, 0, 0, 1, 35); + v1 = Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 1, v0, 0, 0, 0, 1, 35); v1 /= 0x20; Window_Add(v0, ¶m0->unk_0C, 0, 3, 1, 27, 4, 0, v1); @@ -141,11 +141,11 @@ void ov20_021D2F50(UnkStruct_ov20_021D30F8 *param0, NARC *param1) Window_Add(v0, ¶m0->unk_2C, 0, 23, 15, 8, 4, 11, v1); v1 += 32; - sub_02006E3C(38, 0, v0, 0, v1, 0, 0, 35); + Graphics_LoadTilesToBgLayer(38, 0, v0, 0, v1, 0, 0, 35); param0->unk_60 = v1; v1 += 9; - sub_02006E84(38, 24, 0, 14 * 0x20, 0x20, 35); + Graphics_LoadPalette(38, 24, 0, 14 * 0x20, 0x20, 35); sub_0200DD0C(v0, 0, v1, 15, ov20_021D2080(param0->unk_04), 35); sub_0200E010(¶m0->unk_1C, v1, 15); Window_PutToTilemap(¶m0->unk_0C); @@ -164,9 +164,9 @@ static void ov20_021D30A4(UnkStruct_ov20_021D30F8 *param0, NARC *param1) NNSG2dPaletteData *v0; void *v1; - sub_02007130(param1, 6, 0, 0, 14 * 0x20, 35); + Graphics_LoadPaletteFromOpenNARC(param1, 6, 0, 0, 14 * 0x20, 35); - v1 = sub_020071EC(param1, 6, &v0, 35); + v1 = Graphics_GetPlttDataFromOpenNARC(param1, 6, &v0, 35); MI_CpuCopy16(v0->pRawData, param0->unk_70, sizeof(param0->unk_70)); DC_FlushRange(param0->unk_70, sizeof(param0->unk_70)); diff --git a/src/overlay020/ov20_021D3864.c b/src/overlay020/ov20_021D3864.c index b6e014f9e1..c5f4637ef0 100644 --- a/src/overlay020/ov20_021D3864.c +++ b/src/overlay020/ov20_021D3864.c @@ -62,8 +62,8 @@ void ov20_021D3898(UnkStruct_ov20_021D3980 *param0, NARC *param1) v2 = ov20_021D2E04(param0->unk_00); - sub_0200710C(param1, 4, v2, 3, 0, 0, 1, 35); - sub_020070E8(param1, 5, v2, 3, 0, 0, 1, 35); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 4, v2, 3, 0, 0, 1, 35); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 5, v2, 3, 0, 0, 1, 35); ov20_021D390C(v2, &v0, 0); ov20_021D390C(v2, &v1, 1); diff --git a/src/overlay020/ov20_021D3A54.c b/src/overlay020/ov20_021D3A54.c index 678f7fa573..7fc6d59266 100644 --- a/src/overlay020/ov20_021D3A54.c +++ b/src/overlay020/ov20_021D3A54.c @@ -76,9 +76,9 @@ void ov20_021D3A98(UnkStruct_ov20_021D3E0C *param0, NARC *param1) v0 = ov20_021D2E04(param0->unk_00); - sub_0200710C(param1, 2, v0, 1, 0, 0, 1, 35); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 2, v0, 1, 0, 0, 1, 35); - v1 = sub_020070E8(param1, 3, v0, 1, 0, 0, 1, 35); + v1 = Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 3, v0, 1, 0, 0, 1, 35); v1 /= 0x20; v1 = ov20_021D3B74(param0, v0, v1); v1 = ov20_021D3C78(param0, v0, v1); diff --git a/src/overlay020/ov20_021D4728.c b/src/overlay020/ov20_021D4728.c index 18303de705..9ff114e999 100644 --- a/src/overlay020/ov20_021D4728.c +++ b/src/overlay020/ov20_021D4728.c @@ -91,8 +91,8 @@ void ov20_021D4764(UnkStruct_ov20_021D4AD4 *param0) void ov20_021D4774(UnkStruct_ov20_021D4AD4 *param0, NARC *param1) { - sub_02007130(param1, 21, 4, 0, 0x40, 35); - sub_0200710C(param1, 11, param0->unk_0C, 4, 0, 0, 1, 35); + Graphics_LoadPaletteFromOpenNARC(param1, 21, 4, 0, 0x40, 35); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 11, param0->unk_0C, 4, 0, 0, 1, 35); ov20_021D4874(param0, param1); ov20_021D48C4(param0, param1); @@ -126,7 +126,7 @@ static void ov20_021D4874(UnkStruct_ov20_021D4AD4 *param0, NARC *param1) NNSG2dScreenData *v3; for (v1 = 0; v1 < NELEMS(v0); v1++) { - v2 = sub_020071D0(param1, v0[v1], 1, &v3, 35); + v2 = Graphics_GetScrnDataFromOpenNARC(param1, v0[v1], 1, &v3, 35); if (v2) { MI_CpuCopy16(v3->rawData, param0->unk_2C[v1], 77 * 2); @@ -145,7 +145,7 @@ static void ov20_021D48C4(UnkStruct_ov20_021D4AD4 *param0, NARC *param1) Font_InitManager(FONT_SUBSCREEN, HEAP_ID_SYSTEM); v0 = MessageBank_GetNewStrbufFromNARC(0x1A, 0x1B5, 0xB, 0x23); v1 = MessageBank_GetNewStrbufFromNARC(0x1A, 0x1B5, 0xC, 0x23); - v2 = sub_020071B4(param1, 20, 1, &v3, 0x23); + v2 = Graphics_GetCharDataFromOpenNARC(param1, 20, 1, &v3, 0x23); if (v2) { Window v4; @@ -205,8 +205,8 @@ static void ov20_021D4A24(UnkStruct_ov20_021D4AD4 *param0, NARC *param1) NNS_G2dInitImagePaletteProxy(&v0); NNS_G2dInitImageProxy(&v1); - sub_0200716C(param1, 25, NNS_G2D_VRAM_TYPE_2DSUB, 0, 35, &v0); - sub_0200718C(param1, 24, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DSUB, 0, 35, &v1); + Graphics_LoadPartialPaletteFromOpenNARC(param1, 25, NNS_G2D_VRAM_TYPE_2DSUB, 0, 35, &v0); + Graphics_LoadImageMappingFromOpenNARC(param1, 24, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DSUB, 0, 35, &v1); ov20_021D4AF8(&(param0->unk_1C), param1, 22, 23); @@ -234,8 +234,8 @@ static void ov20_021D4AD4(UnkStruct_ov20_021D4AD4 *param0) static void ov20_021D4AF8(UnkStruct_ov20_021D4B2C *param0, NARC *param1, u32 param2, u32 param3) { - param0->unk_00 = sub_02007204(param1, param2, 1, &(param0->unk_04), 35); - param0->unk_08 = sub_02007220(param1, param3, 1, &(param0->unk_0C), 35); + param0->unk_00 = Graphics_GetCellBankFromOpenNARC(param1, param2, 1, &(param0->unk_04), 35); + param0->unk_08 = Graphics_GetAnimBankFromOpenNARC(param1, param3, 1, &(param0->unk_0C), 35); } static void ov20_021D4B2C(UnkStruct_ov20_021D4B2C *param0) diff --git a/src/overlay021/ov21_021E8D48.c b/src/overlay021/ov21_021E8D48.c index 8c167d4540..8142742ecc 100644 --- a/src/overlay021/ov21_021E8D48.c +++ b/src/overlay021/ov21_021E8D48.c @@ -635,25 +635,25 @@ static void ov21_021E96A8(BgConfig *param0, int param1, NARC *param2) void *v0; NNSG2dScreenData *v1; - sub_02007130(param2, 6, 0, 0, 0, param1); - sub_020070E8(param2, 33, param0, 3, 0, 0, 1, param1); + Graphics_LoadPaletteFromOpenNARC(param2, 6, 0, 0, 0, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2, 33, param0, 3, 0, 0, 1, param1); - v0 = sub_020071D0(param2, 50, 1, &v1, param1); + v0 = Graphics_GetScrnDataFromOpenNARC(param2, 50, 1, &v1, param1); Bg_LoadToTilemapRect(param0, 3, v1->rawData, 0, 0, v1->screenWidth / 8, v1->screenHeight / 8); Heap_FreeToHeap(v0); - v0 = sub_020071D0(param2, 51, 1, &v1, param1); + v0 = Graphics_GetScrnDataFromOpenNARC(param2, 51, 1, &v1, param1); Bg_LoadToTilemapRect(param0, 3, v1->rawData, 0, 3, v1->screenWidth / 8, v1->screenHeight / 8); Heap_FreeToHeap(v0); - v0 = sub_020071D0(param2, 52, 1, &v1, param1); + v0 = Graphics_GetScrnDataFromOpenNARC(param2, 52, 1, &v1, param1); Bg_LoadToTilemapRect(param0, 3, v1->rawData, 12, 8, v1->screenWidth / 8, v1->screenHeight / 8); Heap_FreeToHeap(v0); - v0 = sub_020071D0(param2, 54, 1, &v1, param1); + v0 = Graphics_GetScrnDataFromOpenNARC(param2, 54, 1, &v1, param1); Bg_LoadToTilemapRect(param0, 3, v1->rawData, 0, 16, v1->screenWidth / 8, v1->screenHeight / 8); Heap_FreeToHeap(v0); @@ -665,9 +665,9 @@ static void ov21_021E97C4(BgConfig *param0, int param1, NARC *param2) void *v0; NNSG2dScreenData *v1; - sub_020070E8(param2, 33, param0, 2, 0, 0, 1, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2, 33, param0, 2, 0, 0, 1, param1); - v0 = sub_020071D0(param2, 57, 1, &v1, param1); + v0 = Graphics_GetScrnDataFromOpenNARC(param2, 57, 1, &v1, param1); Bg_LoadToTilemapRect(param0, 2, v1->rawData, 0, 0, v1->screenWidth / 8, v1->screenHeight / 8); Heap_FreeToHeap(v0); @@ -785,12 +785,12 @@ static void ov21_021E9A40(UnkStruct_ov21_021E9A9C *param0, int param1, int param int v0; if (param2 == 0) { - param0->unk_00[0] = sub_020071EC(param3, 23, ¶m0->unk_08[0], param1); + param0->unk_00[0] = Graphics_GetPlttDataFromOpenNARC(param3, 23, ¶m0->unk_08[0], param1); } else { - param0->unk_00[0] = sub_020071EC(param3, 24, ¶m0->unk_08[0], param1); + param0->unk_00[0] = Graphics_GetPlttDataFromOpenNARC(param3, 24, ¶m0->unk_08[0], param1); } - param0->unk_00[1] = sub_020071EC(param3, 26, ¶m0->unk_08[1], param1); + param0->unk_00[1] = Graphics_GetPlttDataFromOpenNARC(param3, 26, ¶m0->unk_08[1], param1); param0->unk_10 = 0; param0->unk_1C = 0; diff --git a/src/overlay022/ov22_022597BC.c b/src/overlay022/ov22_022597BC.c index d91c2102be..0a7b200ad1 100644 --- a/src/overlay022/ov22_022597BC.c +++ b/src/overlay022/ov22_022597BC.c @@ -101,7 +101,7 @@ void ov22_02259838(UnkStruct_ov22_02259820 *param0, int param1) param0->unk_10 = 0; } - v1 = sub_02006F6C(param0->unk_00->unk_04, v2, 0, &v0, param0->unk_14); + v1 = Graphics_GetScrnData(param0->unk_00->unk_04, v2, 0, &v0, param0->unk_14); ov22_02259ABC(param0->unk_00->unk_00, param0->unk_00->unk_1C, v0, param0->unk_00->unk_14, param0->unk_00->unk_18, param0->unk_00->unk_0C, param0->unk_00->unk_10, param0->unk_00->unk_28, param0->unk_00->unk_20); Heap_FreeToHeap(v1); @@ -113,7 +113,7 @@ void ov22_022598A0(UnkStruct_ov22_02259820 *param0) NNSG2dScreenData *v0; void *v1; - v1 = sub_02006F6C(param0->unk_00->unk_04, param0->unk_00->unk_08, 0, &v0, param0->unk_14); + v1 = Graphics_GetScrnData(param0->unk_00->unk_04, param0->unk_00->unk_08, 0, &v0, param0->unk_14); ov22_02259ABC(param0->unk_00->unk_00, param0->unk_00->unk_1C, v0, param0->unk_00->unk_14, param0->unk_00->unk_18, param0->unk_00->unk_0C, param0->unk_00->unk_10, param0->unk_00->unk_28, param0->unk_00->unk_20); Heap_FreeToHeap(v1); @@ -181,7 +181,7 @@ static void ov22_022599A0(UnkStruct_ov22_022599A0 *param0, int *param1, int *par ov22_02259B8C(param0->unk_04, param0->unk_0C, v0, param0->unk_24 * 32, param0->unk_20 * 32, param0->unk_2C); - v2 = sub_02006F6C(param0->unk_04, param0->unk_10, 0, &v1, param0->unk_2C); + v2 = Graphics_GetScrnData(param0->unk_04, param0->unk_10, 0, &v1, param0->unk_2C); v4 = v1->screenWidth / 8; v3 = v1->screenHeight / 8; @@ -234,7 +234,7 @@ static void ov22_02259B3C(u32 param0, u32 param1, BgConfig *param2, u32 param3, v0 = Heap_AllocFromHeap(param5, sizeof(UnkStruct_ov22_02259B3C)); memset(v0, 0, sizeof(UnkStruct_ov22_02259B3C)); - v0->unk_08 = sub_02006F50(param0, param1, 0, &v0->unk_04, param5); + v0->unk_08 = Graphics_GetCharData(param0, param1, 0, &v0->unk_04, param5); v0->unk_00 = param2; v0->unk_0C = param3; v0->unk_10 = param4; @@ -249,7 +249,7 @@ static void ov22_02259B8C(u32 param0, u32 param1, int param2, u32 param3, u32 pa v0 = Heap_AllocFromHeap(param5, sizeof(UnkStruct_ov22_02259B8C)); memset(v0, 0, sizeof(UnkStruct_ov22_02259B8C)); - v0->unk_04 = sub_02006F88(param0, param1, &v0->unk_00, param5); + v0->unk_04 = Graphics_GetPlttData(param0, param1, &v0->unk_00, param5); v0->unk_08 = param2; v0->unk_0C = param3; v0->unk_10 = param4; diff --git a/src/overlay022/ov22_0225B660.c b/src/overlay022/ov22_0225B660.c index 7befffe0ca..7f6f03d618 100644 --- a/src/overlay022/ov22_0225B660.c +++ b/src/overlay022/ov22_0225B660.c @@ -188,8 +188,8 @@ static void ov22_0225B85C(UnkStruct_ov22_0225B85C *param0) int v2; int v3; - sub_02007130(param0->unk_14.unk_5C, 126, 0, 3 * 32, 64, 14); - sub_020070E8(param0->unk_14.unk_5C, 125, param0->unk_14.unk_40, 1, 0, 0, 0, 14); + Graphics_LoadPaletteFromOpenNARC(param0->unk_14.unk_5C, 126, 0, 3 * 32, 64, 14); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_5C, 125, param0->unk_14.unk_40, 1, 0, 0, 0, 14); if (param0->unk_0C == 0) { v2 = 128; @@ -199,7 +199,7 @@ static void ov22_0225B85C(UnkStruct_ov22_0225B85C *param0) v3 = 3; } - v0 = sub_020071D0(param0->unk_14.unk_5C, v2, 0, &v1, 14); + v0 = Graphics_GetScrnDataFromOpenNARC(param0->unk_14.unk_5C, v2, 0, &v1, 14); Bg_LoadToTilemapRect(param0->unk_14.unk_40, 1, v1->rawData, 0, 0, v1->screenWidth / 8, v1->screenHeight / 8); Bg_ChangeTilemapRectPalette(param0->unk_14.unk_40, 1, 0, 0, v1->screenWidth / 8, v1->screenHeight / 8, v3); @@ -209,9 +209,9 @@ static void ov22_0225B85C(UnkStruct_ov22_0225B85C *param0) static void ov22_0225B910(UnkStruct_ov22_0225B85C *param0) { - sub_02006E84(12, 12, 4, 0, 32, 14); - sub_02006E60(12, 11, param0->unk_14.unk_40, 4, 0, 0, 1, 14); - sub_02006E3C(12, 10, param0->unk_14.unk_40, 4, 0, 0, 1, 14); + Graphics_LoadPalette(12, 12, 4, 0, 32, 14); + Graphics_LoadTilemapToBgLayer(12, 11, param0->unk_14.unk_40, 4, 0, 0, 1, 14); + Graphics_LoadTilesToBgLayer(12, 10, param0->unk_14.unk_40, 4, 0, 0, 1, 14); } static void ov22_0225B964(UnkStruct_ov22_0225B85C *param0) diff --git a/src/overlay023/ov23_0223E140.c b/src/overlay023/ov23_0223E140.c index 082cc10f93..8f52081386 100644 --- a/src/overlay023/ov23_0223E140.c +++ b/src/overlay023/ov23_0223E140.c @@ -1324,14 +1324,14 @@ static void ov23_0223EE80(UnkStruct_ov23_0223EE80 *param0) NARC *v6; v6 = NARC_ctor(NARC_INDEX_DATA__UG_FOSSIL, 29); - sub_02007130(v6, 1, 0, 0, 32 * 3, 29); + Graphics_LoadPaletteFromOpenNARC(v6, 1, 0, 0, 32 * 3, 29); - v0 = sub_020070E8(v6, 0, v1, 0, 0, 0, 0, 29); - sub_0200710C(v6, 2, v1, 0, 0, 0, 0, 29); + v0 = Graphics_LoadTilesToBgLayerFromOpenNARC(v6, 0, v1, 0, 0, 0, 0, 29); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v6, 2, v1, 0, 0, 0, 0, 29); NARC_dtor(v6); } - sub_02006E84(50, 52, 0, 10 * 0x20, 4 * 0x20, 29); + Graphics_LoadPalette(50, 52, 0, 10 * 0x20, 4 * 0x20, 29); ov23_0223FA3C(v1, v0, param0); } @@ -1348,7 +1348,7 @@ static void ov23_0223EF98(void) Bg_CopyTilemapBufferToVRAM(Unk_ov23_02257740->unk_04, 1); ov23_0223FF8C(Unk_ov23_02257740->unk_04); - sub_02006E3C(55, 9, Unk_ov23_02257740->unk_04, 2, 1, 0, 0, 29); + Graphics_LoadTilesToBgLayer(55, 9, Unk_ov23_02257740->unk_04, 2, 1, 0, 0, 29); ov23_022401B0(Unk_ov23_02257740->unk_04); @@ -1590,7 +1590,7 @@ static void ov23_0223F118(SysTask *param0, void *param1) HBlankSystem_Stop(v0->fieldSystem->unk_04->hBlankSystem); HBlankSystem_Start(v0->fieldSystem->unk_04->hBlankSystem); - sub_02006E84(50, 52, 0, 10 * 0x20, 4 * 0x20, 4); + Graphics_LoadPalette(50, 52, 0, 10 * 0x20, 4 * 0x20, 4); sub_0200DAA4(v0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); CommPlayerMan_Restart(); @@ -1938,14 +1938,14 @@ static int ov23_0223FC9C(int param0, BgConfig *param1, int param2, UnkStruct_ov2 } if (param0 >= param3->unk_0C) { - sub_02007130(v12, v0->unk_00->unk_12, 0, (v11 + 3) * 32, 32, 29); + Graphics_LoadPaletteFromOpenNARC(v12, v0->unk_00->unk_12, 0, (v11 + 3) * 32, 32, 29); } else { - param3->unk_18[param0] = sub_020071EC(v12, v0->unk_00->unk_12, ¶m3->unk_28[param0], 29); + param3->unk_18[param0] = Graphics_GetPlttDataFromOpenNARC(v12, v0->unk_00->unk_12, ¶m3->unk_28[param0], 29); DC_FlushRange(param3->unk_28[param0]->pRawData, 32); GX_LoadBGPltt(param3->unk_28[param0]->pRawData, (v11 + 3) * 32, 32); } - v10 = sub_020070E8(v12, v0->unk_00->unk_10, param1, 1, param2, 0, 0, 29); + v10 = Graphics_LoadTilesToBgLayerFromOpenNARC(v12, v0->unk_00->unk_10, param1, 1, param2, 0, 0, 29); NARC_dtor(v12); for (v6 = v3; v6 < v5; v6++) { diff --git a/src/overlay023/ov23_02241F74.c b/src/overlay023/ov23_02241F74.c index 6187e50537..95a976a199 100644 --- a/src/overlay023/ov23_02241F74.c +++ b/src/overlay023/ov23_02241F74.c @@ -144,7 +144,7 @@ static void CommManUnderground_Init(CommManUnderground *param0, FieldSystem *fie sCommManUnderground->unk_128 = ov23_02253D48(630, 33, fieldSystem->unk_08, v0, 0); sub_0200DD0C(sCommManUnderground->fieldSystem->unk_08, 3, (1024 - (18 + 12)), 10, 0, 4); - sub_02006E84(50, 52, 0, 10 * 0x20, 4 * 0x20, 4); + Graphics_LoadPalette(50, 52, 0, 10 * 0x20, 4 * 0x20, 4); sub_0200DAA4(sCommManUnderground->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); for (v1 = 0; v1 < (7 + 1); v1++) { diff --git a/src/overlay023/ov23_0224340C.c b/src/overlay023/ov23_0224340C.c index eb6159926b..3d1ca32041 100644 --- a/src/overlay023/ov23_0224340C.c +++ b/src/overlay023/ov23_0224340C.c @@ -2346,23 +2346,23 @@ static void ov23_022451C8(SysTask *param0, void *param1) break; case 1: sub_0200AAE0(1, 10, 0, GX_BLEND_PLANEMASK_BG0, 1); - sub_02006E3C(50, 9, v0->unk_10, 2, 0, 8 * 6 * 6, 0, 4); + Graphics_LoadTilesToBgLayer(50, 9, v0->unk_10, 2, 0, 8 * 6 * 6, 0, 4); v0->unk_00++; break; case 2: - sub_02006E84(50, 10, 0, 0, 32, 4); + Graphics_LoadPalette(50, 10, 0, 0, 32, 4); v0->unk_00++; break; case 3: sub_0200AAE0(1, 0, 10, GX_BLEND_PLANEMASK_BG0, 1); if (Unk_ov23_02257764->unk_B9F == 19) { - sub_02006E60(50, 8, v0->unk_10, 2, 0, 32 * 24 * 2, 0, 4); + Graphics_LoadTilemapToBgLayer(50, 8, v0->unk_10, 2, 0, 32 * 24 * 2, 0, 4); } else { u16 v2[] = { 11, 12, 13, 14 }; u16 v3 = LCRNG_Next() % 4; - sub_02006E60(50, v2[v3], v0->unk_10, 2, 0, 32 * 24 * 2, 0, 4); + Graphics_LoadTilemapToBgLayer(50, v2[v3], v0->unk_10, 2, 0, 32 * 24 * 2, 0, 4); } Bg_SetPriority(0, 3); diff --git a/src/overlay023/ov23_02248F1C.c b/src/overlay023/ov23_02248F1C.c index bf8b91b91b..b22a045f79 100644 --- a/src/overlay023/ov23_02248F1C.c +++ b/src/overlay023/ov23_02248F1C.c @@ -415,9 +415,9 @@ static void ov23_0224944C(BgConfig *param0, Window *param1) v3 = NARC_ctor(NARC_INDEX_DATA__UNDERG_RADAR, 4); - sub_02007130(v3, 0, 4, 0, 0x20 * 2, 4); - sub_020070E8(v3, 1, param0, 4, 0, 32 * 5 * 0x20, 0, 4); - sub_0200710C(v3, 2, param0, 4, 0, 32 * 24 * 2, 0, 4); + Graphics_LoadPaletteFromOpenNARC(v3, 0, 4, 0, 0x20 * 2, 4); + Graphics_LoadTilesToBgLayerFromOpenNARC(v3, 1, param0, 4, 0, 32 * 5 * 0x20, 0, 4); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v3, 2, param0, 4, 0, 32 * 24 * 2, 0, 4); NARC_dtor(v3); } @@ -425,7 +425,7 @@ static void ov23_0224944C(BgConfig *param0, Window *param1) Bg_ClearTilesRange(7, 32, 0, 4); FieldMessage_AddWindow(param0, param1, 7); Window_FillTilemap(param1, 0); - sub_02006E84(50, 52, 4, 10 * 0x20, 4 * 0x20, 4); + Graphics_LoadPalette(50, 52, 4, 10 * 0x20, 4 * 0x20, 4); sub_0200F338(1); } diff --git a/src/overlay023/ov23_0224B05C.c b/src/overlay023/ov23_0224B05C.c index da8813e1ed..465cb816bc 100644 --- a/src/overlay023/ov23_0224B05C.c +++ b/src/overlay023/ov23_0224B05C.c @@ -1641,7 +1641,7 @@ static BOOL ov23_0224C790(TaskManager *param0) CommSys_EnableSendMovementData(); sub_020594FC(); - sub_02006E84(50, 52, 0, 10 * 0x20, 4 * 0x20, 4); + Graphics_LoadPalette(50, 52, 0, 10 * 0x20, 4 * 0x20, 4); sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); if (v1->unk_2D) { diff --git a/src/overlay024/ov24_02253CE0.c b/src/overlay024/ov24_02253CE0.c index 137c3e0f9b..b044d2551a 100644 --- a/src/overlay024/ov24_02253CE0.c +++ b/src/overlay024/ov24_02253CE0.c @@ -42,9 +42,9 @@ void ov24_02253CE0(BgConfig *param0) v1 = NARC_ctor(NARC_INDEX_GRAPHIC__POKETCH, 8); - sub_020070E8(v1, 10, param0, 4, 0, 0, 1, 8); - sub_0200710C(v1, 11, param0, 4, 0, 0, 1, 8); - sub_02007130(v1, 12, 4, 0, 0x20, 8); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 10, param0, 4, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 11, param0, 4, 0, 0, 1, 8); + Graphics_LoadPaletteFromOpenNARC(v1, 12, 4, 0, 0x20, 8); NARC_dtor(v1); } diff --git a/src/overlay025/ov25_02254560.c b/src/overlay025/ov25_02254560.c index 4763a0d393..08ded5f2c6 100644 --- a/src/overlay025/ov25_02254560.c +++ b/src/overlay025/ov25_02254560.c @@ -150,7 +150,7 @@ static void ov25_02254684(UnkStruct_ov25_02254560 *param0) NNSG2dPaletteData *v0; void *v1; - v1 = sub_02006F88(12, 0, &v0, 7); + v1 = Graphics_GetPlttData(12, 0, &v0, 7); if (v1) { MI_CpuCopy32(v0->pRawData, param0->unk_200, 8 * 0x40); @@ -318,9 +318,9 @@ static void ov25_02254820(SysTask *param0, void *param1) Bg_InitFromTemplate(v2->unk_1F8, 4, &v0, 0); Bg_InitFromTemplate(v2->unk_1F8, 5, &v1, 0); - sub_02006E3C(12, 14, v2->unk_1F8, 4, 64, 0, 1, 7); - sub_02006E60(12, 15, v2->unk_1F8, 4, 0, 0, 1, 7); - sub_02006E9C(12, 13, 4, PoketchSystem_GetBorderColor(v2->poketchSys) * 0x20, 15 * 0x20, 0x20, 7); + Graphics_LoadTilesToBgLayer(12, 14, v2->unk_1F8, 4, 64, 0, 1, 7); + Graphics_LoadTilemapToBgLayer(12, 15, v2->unk_1F8, 4, 0, 0, 1, 7); + Graphics_LoadPaletteWithSrcOffset(12, 13, 4, PoketchSystem_GetBorderColor(v2->poketchSys) * 0x20, 15 * 0x20, 0x20, 7); Bg_FillTilemapRect(v2->unk_1F8, 5, 64 + 164, 0, 0, 32, 24, 15); Bg_CopyTilemapBufferToVRAM(v2->unk_1F8, 5); @@ -576,8 +576,8 @@ static void ov25_02254DE0(UnkStruct_ov25_02254560 *param0, UnkStruct_ov25_02254D 0 }; - sub_02006EC0(12, 2, 1, 0, 0, 1, 7); - sub_02006E84(12, 0, 5, 0, 0x60, 7); + Graphics_LoadObjectTiles(12, 2, 1, 0, 0, 1, 7); + Graphics_LoadPalette(12, 0, 5, 0, 0x60, 7); ov25_02254E84(param0, 15); diff --git a/src/overlay025/ov25_02255090.c b/src/overlay025/ov25_02255090.c index 8c1a7d0d47..2a70120cfa 100644 --- a/src/overlay025/ov25_02255090.c +++ b/src/overlay025/ov25_02255090.c @@ -253,7 +253,7 @@ void ov25_02255360(u32 param0) void *v0; NNSG2dPaletteData *v1; - v0 = sub_02006F88(19, PokeIconPalettesFileIndex(), &v1, 8); + v0 = Graphics_GetPlttData(19, PokeIconPalettesFileIndex(), &v1, 8); if (v0) { ov25_02255290(v1->pRawData, 4 * 0x10); diff --git a/src/overlay026/ov26_02256404.c b/src/overlay026/ov26_02256404.c index b0e8b06f85..179cb1037a 100644 --- a/src/overlay026/ov26_02256404.c +++ b/src/overlay026/ov26_02256404.c @@ -43,7 +43,7 @@ BOOL ov26_02256404(UnkStruct_ov26_02256404 **param0, const UnkStruct_ov26_022564 v0->unk_00 = param1; v0->unk_04 = ov25_02254674(); - v2 = sub_02006F6C(12, 25, 1, &v1, 8); + v2 = Graphics_GetScrnData(12, 25, 1, &v1, 8); if (v2 == NULL) { Heap_FreeToHeap(v0); @@ -136,8 +136,8 @@ static void ov26_022564F8(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 23, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 24, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 23, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 24, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); ov26_022565F4(v2); diff --git a/src/overlay027/ov27_0225680C.c b/src/overlay027/ov27_0225680C.c index 81bccd4981..e43ada31b0 100644 --- a/src/overlay027/ov27_0225680C.c +++ b/src/overlay027/ov27_0225680C.c @@ -191,8 +191,8 @@ static void ov27_02256A18(SysTask *param0, void *param1) UnkStruct_ov27_0225680C *v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 21, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 20, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 21, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 20, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); @@ -221,8 +221,8 @@ static void ov27_02256A18(SysTask *param0, void *param1) static BOOL ov27_02256AEC(UnkStruct_ov27_0225680C *param0) { - sub_02006EC0(12, 2, 1, 0, 0, 1, 8); - sub_02006EC0(12, 22, 1, 80 * 0x20, 0, 1, 8); + Graphics_LoadObjectTiles(12, 2, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 22, 1, 80 * 0x20, 0, 1, 8); return 1; } diff --git a/src/overlay028/ov28_0225697C.c b/src/overlay028/ov28_0225697C.c index f070ee9408..a15deff3c7 100644 --- a/src/overlay028/ov28_0225697C.c +++ b/src/overlay028/ov28_0225697C.c @@ -542,8 +542,8 @@ static void ov28_02256A08(SysTask *param0, void *param1) v3 = ov25_0225523C(param1); Bg_InitFromTemplate(v3->unk_04, 6, &v0, 0); - sub_02006E3C(12, 16, v3->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 17, v3->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 16, v3->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 17, v3->unk_04, 6, 0, 0, 1, 8); ov28_02256AA4(v3); ov25_022546B8(0, 0); diff --git a/src/overlay029/ov29_022566C8.c b/src/overlay029/ov29_022566C8.c index 9210903648..7d503d3ca4 100644 --- a/src/overlay029/ov29_022566C8.c +++ b/src/overlay029/ov29_022566C8.c @@ -175,8 +175,8 @@ static void ov29_02256804(SysTask *param0, void *param1) GF_ASSERT(GF_heap_c_dummy_return_true(8)); - sub_02006E3C(12, 30, v3->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 31, v3->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 30, v3->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 31, v3->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); GF_ASSERT(GF_heap_c_dummy_return_true(8)); @@ -324,7 +324,7 @@ static void ov29_02256ABC(UnkStruct_ov29_022566C8 *param0) }, }; - sub_02006EC0(12, 32, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 32, 1, 0, 0, 1, 8); if (ov25_02255958(¶m0->unk_54, 12, 33, 34, 8)) { int v1; diff --git a/src/overlay030/ov30_022563EC.c b/src/overlay030/ov30_022563EC.c index 03adfbfa7f..3e1b011ef7 100644 --- a/src/overlay030/ov30_022563EC.c +++ b/src/overlay030/ov30_022563EC.c @@ -140,8 +140,8 @@ static void ov30_022564B4(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 23, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 26, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 23, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 26, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); ov30_022565B0(v2); @@ -217,7 +217,7 @@ static BOOL ov30_022565F4(UnkStruct_ov30_022563EC *param0) }, }; - sub_02006EC0(12, 29, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 29, 1, 0, 0, 1, 8); if (ov25_02255958(¶m0->unk_34, 12, 27, 28, 8)) { int v1; diff --git a/src/overlay032/ov32_02256470.c b/src/overlay032/ov32_02256470.c index 4b6745524f..aeccd5ff74 100644 --- a/src/overlay032/ov32_02256470.c +++ b/src/overlay032/ov32_02256470.c @@ -177,7 +177,7 @@ static void ov32_02256588(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - v3 = sub_02006E3C(12, 106, v2->unk_04, 6, 0, 0, 1, 8); + v3 = Graphics_LoadTilesToBgLayer(12, 106, v2->unk_04, 6, 0, 0, 1, 8); v3 /= 0x20; Bg_FillTilemapRect(v2->unk_04, 6, 0x5, 0, 0, 32, 24, 0); @@ -278,7 +278,7 @@ static void ov32_02256898(UnkStruct_ov32_02256470 *param0, const UnkStruct_ov32_ int v0; UnkStruct_ov25_02255810 v1; - sub_02006EC0(12, 109, 1, 0 * 0x20, 0, 1, 8); + Graphics_LoadObjectTiles(12, 109, 1, 0 * 0x20, 0, 1, 8); v1.unk_0A = 0; v1.unk_0B = 2; diff --git a/src/overlay033/ov33_02256474.c b/src/overlay033/ov33_02256474.c index f3172a3a8c..d4b8b6122e 100644 --- a/src/overlay033/ov33_02256474.c +++ b/src/overlay033/ov33_02256474.c @@ -217,7 +217,7 @@ static void ov33_02256598(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 7, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 7, v2->unk_04, 6, 0, 0, 1, 8); Bg_FillTilemapRect(v2->unk_04, 6, 0, 0, 0, 32, 24, 0); ov25_022546B8(0, 0); @@ -247,7 +247,7 @@ static void ov33_02256634(UnkStruct_ov33_02256474 *param0, const UnkStruct_ov33_ NARC *v1; ov25_02255360(1); - sub_02006EC0(12, 35, 1, ((4 * 4 * 2) * 6) * 0x20, 0, 1, 8); + Graphics_LoadObjectTiles(12, 35, 1, ((4 * 4 * 2) * 6) * 0x20, 0, 1, 8); v1 = NARC_ctor(NARC_INDEX_POKETOOL__ICONGRA__PL_POKE_ICON, 8); diff --git a/src/overlay034/ov34_02256540.c b/src/overlay034/ov34_02256540.c index 6b0762f012..e86b4479e5 100644 --- a/src/overlay034/ov34_02256540.c +++ b/src/overlay034/ov34_02256540.c @@ -93,7 +93,7 @@ static BOOL ov34_02256588(UnkStruct_ov34_02256540 *param0) if (ov25_02255958(¶m0->unk_58, 12, 40, 41, 8)) { int v2; - sub_02006EC0(12, 42, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 42, 1, 0, 0, 1, 8); param0->unk_34 = ov25_02255810(param0->unk_30, &v0, ¶m0->unk_58); ov25_02255914(param0->unk_34, 1); @@ -181,8 +181,8 @@ static void ov34_02256690(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 39, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 38, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 39, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 38, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); diff --git a/src/overlay035/ov35_02256410.c b/src/overlay035/ov35_02256410.c index 9c5b172b58..589bf60f6e 100644 --- a/src/overlay035/ov35_02256410.c +++ b/src/overlay035/ov35_02256410.c @@ -89,8 +89,8 @@ static void ov35_02256460(UnkStruct_ov35_02256410 *param0, const UnkStruct_ov35_ }; int v2; - sub_02006EC0(12, 2, 1, 0, 0, 1, 8); - sub_02006EC0(12, 47, 1, 80 * 0x20, 0, 1, 8); + Graphics_LoadObjectTiles(12, 2, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 47, 1, 80 * 0x20, 0, 1, 8); ov25_02255958(¶m0->unk_38, 12, 45, 46, 8); ov25_02255958(¶m0->unk_4C, 12, 3, 4, 8); @@ -176,8 +176,8 @@ static void ov35_02256598(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 44, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 43, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 44, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 43, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay036/ov36_02256404.c b/src/overlay036/ov36_02256404.c index f0196a0691..ce7dd0291c 100644 --- a/src/overlay036/ov36_02256404.c +++ b/src/overlay036/ov36_02256404.c @@ -84,8 +84,8 @@ static void ov36_02256454(UnkStruct_ov36_02256404 *param0, const UnkStruct_ov36_ }; int v2; - sub_02006EC0(12, 2, 1, 0, 0, 1, 8); - sub_02006EC0(12, 52, 1, 80 * 0x20, 0, 1, 8); + Graphics_LoadObjectTiles(12, 2, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 52, 1, 80 * 0x20, 0, 1, 8); ov25_02255958(¶m0->unk_3C, 12, 50, 51, 8); ov25_02255958(¶m0->unk_50, 12, 3, 4, 8); @@ -169,8 +169,8 @@ static void ov36_0225658C(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 49, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 48, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 49, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 48, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay037/ov37_022563D4.c b/src/overlay037/ov37_022563D4.c index 4371eb006d..7c74d4f713 100644 --- a/src/overlay037/ov37_022563D4.c +++ b/src/overlay037/ov37_022563D4.c @@ -74,7 +74,7 @@ static void ov37_0225641C(UnkStruct_ov37_022563D4 *param0, const UnkStruct_ov37_ }; int v1; - sub_02006EC0(12, 104, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 104, 1, 0, 0, 1, 8); ov25_02255958(¶m0->unk_28, 12, 102, 103, 8); param0->unk_24 = ov25_02255810(param0->unk_20, &v0, ¶m0->unk_28); @@ -144,8 +144,8 @@ static void ov37_022564D8(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 101, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 100, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 101, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 100, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay038/ov38_0225632C.c b/src/overlay038/ov38_0225632C.c index fd191e8cab..4a5f8c46b3 100644 --- a/src/overlay038/ov38_0225632C.c +++ b/src/overlay038/ov38_0225632C.c @@ -101,9 +101,9 @@ static void ov38_022563B8(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 8, v2->unk_04, 6, 0, 0, 0, 8); + Graphics_LoadTilesToBgLayer(12, 8, v2->unk_04, 6, 0, 0, 0, 8); Bg_FillTilemapRect(v2->unk_04, 6, 0, 0, 0, 32, 24, 0); - sub_02006E84(12, 9, 4, 0 * 0x20, 0x20, 8); + Graphics_LoadPalette(12, 9, 4, 0 * 0x20, 0x20, 8); ov25_02255440(v2->unk_04, 12, 6); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay039/ov39_022563DC.c b/src/overlay039/ov39_022563DC.c index c252d1ac91..60497f80e7 100644 --- a/src/overlay039/ov39_022563DC.c +++ b/src/overlay039/ov39_022563DC.c @@ -111,8 +111,8 @@ static void ov39_02256468(SysTask *param0, void *param1) v3 = ov25_02255240(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 59, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 58, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 59, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 58, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); diff --git a/src/overlay040/ov40_0225645C.c b/src/overlay040/ov40_0225645C.c index 54265fb3d3..ca9017cb20 100644 --- a/src/overlay040/ov40_0225645C.c +++ b/src/overlay040/ov40_0225645C.c @@ -184,7 +184,7 @@ static void ov40_022564D4(UnkStruct_ov40_0225645C *param0, const UnkStruct_ov40_ ov25_02255360(1); - v3 = sub_02006EC0(12, 84, 1, 0, 0, 1, 8); + v3 = Graphics_LoadObjectTiles(12, 84, 1, 0, 0, 1, 8); v3 /= 20; param0->unk_78 = v3; @@ -271,8 +271,8 @@ static void ov40_02256618(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 81, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 80, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 81, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 80, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay041/ov41_022567B0.c b/src/overlay041/ov41_022567B0.c index d7b57da119..b2a102a211 100644 --- a/src/overlay041/ov41_022567B0.c +++ b/src/overlay041/ov41_022567B0.c @@ -123,7 +123,7 @@ static void ov41_0225680C(UnkStruct_ov41_022567B0 *param0, const UnkStruct_ov41_ }; int v1; - sub_02006EC0(12, 89, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 89, 1, 0, 0, 1, 8); ov25_02255958(¶m0->unk_34, 12, 87, 88, 8); for (v1 = 0; v1 < 4; v1++) { @@ -222,10 +222,10 @@ static void ov41_022568DC(SysTask *param0, void *param1) GF_ASSERT(GF_heap_c_dummy_return_true(8)); - v4 = sub_02006E3C(12, 86, v3->unk_04, 6, 0, 0, 1, 8); + v4 = Graphics_LoadTilesToBgLayer(12, 86, v3->unk_04, 6, 0, 0, 1, 8); v4 /= 0x20; - sub_02006E60(12, 85, v3->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 85, v3->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); GF_ASSERT(GF_heap_c_dummy_return_true(8)); diff --git a/src/overlay042/ov42_022563D4.c b/src/overlay042/ov42_022563D4.c index 4d05e581d2..ea20fc6bbb 100644 --- a/src/overlay042/ov42_022563D4.c +++ b/src/overlay042/ov42_022563D4.c @@ -75,7 +75,7 @@ static void ov42_02256420(UnkStruct_ov42_022563D4 *param0) 0 }; - sub_02006EC0(12, 57, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 57, 1, 0, 0, 1, 8); ov25_02255958(¶m0->unk_28, 12, 55, 56, 8); param0->unk_24 = ov25_02255810(param0->unk_20, &v0, ¶m0->unk_28); @@ -152,8 +152,8 @@ static void ov42_022564F0(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 54, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 53, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 54, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 53, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay043/ov43_02256544.c b/src/overlay043/ov43_02256544.c index 2157ff421a..f116997f48 100644 --- a/src/overlay043/ov43_02256544.c +++ b/src/overlay043/ov43_02256544.c @@ -140,7 +140,7 @@ static void ov43_022565B4(UnkStruct_ov43_02256544 *param0) }; int v2; - sub_02006EC0(12, 64, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 64, 1, 0, 0, 1, 8); ov25_02255958(¶m0->unk_60, 12, 62, 63, 8); for (v2 = 0; v2 < 6; v2++) { @@ -242,8 +242,8 @@ static void ov43_02256700(SysTask *param0, void *param1) Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - v6 = sub_02006E3C(12, 61, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 60, v2->unk_04, 6, 0, 0, 1, 8); + v6 = Graphics_LoadTilesToBgLayer(12, 61, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 60, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); v6 /= 0x20; diff --git a/src/overlay044/ov44_022565BC.c b/src/overlay044/ov44_022565BC.c index b84694b456..9688c3aafa 100644 --- a/src/overlay044/ov44_022565BC.c +++ b/src/overlay044/ov44_022565BC.c @@ -140,7 +140,7 @@ static void ov44_0225660C(UnkStruct_ov44_022565BC *param0, const UnkStruct_ov44_ ov25_02255360(1); - v2 = sub_02006EC0(12, 74, 1, 0, 0, 1, 8); + v2 = Graphics_LoadObjectTiles(12, 74, 1, 0, 0, 1, 8); v2 /= 20; param0->unk_64 = v2; @@ -239,8 +239,8 @@ static void ov44_02256794(SysTask *param0, void *param1) v3 = ov25_02255240(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 71, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 70, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 71, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 70, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay045/ov45_022566EC.c b/src/overlay045/ov45_022566EC.c index 40914e0e50..d54c37c062 100644 --- a/src/overlay045/ov45_022566EC.c +++ b/src/overlay045/ov45_022566EC.c @@ -181,8 +181,8 @@ static void ov45_0225673C(UnkStruct_ov45_022566EC *param0, const UnkStruct_ov45_ }; int v1; - sub_02006EC0(12, 2, 1, 0, 0, 1, 8); - sub_02006EC0(12, 79, 1, 80 * 0x20, 0, 1, 8); + Graphics_LoadObjectTiles(12, 2, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 79, 1, 80 * 0x20, 0, 1, 8); ov25_02255958(¶m0->unk_68, 12, 77, 78, 8); ov25_02255958(¶m0->unk_7C, 12, 3, 4, 8); @@ -296,8 +296,8 @@ static void ov45_02256968(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 76, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 75, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 76, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 75, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay046/ov46_02256BCC.c b/src/overlay046/ov46_02256BCC.c index 6ffb28123e..687882239c 100644 --- a/src/overlay046/ov46_02256BCC.c +++ b/src/overlay046/ov46_02256BCC.c @@ -221,8 +221,8 @@ static void ov46_02256C20(UnkStruct_ov46_02256BCC *param0, const UnkStruct_ov46_ }; int v1; - sub_02006EC0(12, 2, 1, 0, 0, 1, 8); - sub_02006EC0(12, 94, 1, 80 * 0x20, 0, 1, 8); + Graphics_LoadObjectTiles(12, 2, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 94, 1, 80 * 0x20, 0, 1, 8); ov25_02255958(¶m0->unk_78, 12, 92, 93, 8); ov25_02255958(¶m0->unk_8C, 12, 3, 4, 8); @@ -315,8 +315,8 @@ static void ov46_02256D74(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 91, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 90, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 91, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 90, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay047/ov47_02256634.c b/src/overlay047/ov47_02256634.c index 326ea29b11..7e9724ad45 100644 --- a/src/overlay047/ov47_02256634.c +++ b/src/overlay047/ov47_02256634.c @@ -76,7 +76,7 @@ static void ov47_02256684(UnkStruct_ov47_02256634 *param0, const UnkStruct_ov47_ int v1, v2; u32 v3, v4; - sub_02006EC0(12, 120, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 120, 1, 0, 0, 1, 8); ov25_02255958(¶m0->unk_68, 12, 118, 119, 8); @@ -217,8 +217,8 @@ static void ov47_022568BC(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 117, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 115, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 117, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 115, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); diff --git a/src/overlay048/ov48_0225650C.c b/src/overlay048/ov48_0225650C.c index 5e84db3729..b63ec3b944 100644 --- a/src/overlay048/ov48_0225650C.c +++ b/src/overlay048/ov48_0225650C.c @@ -133,10 +133,10 @@ static void ov48_022565A8(SysTask *param0, void *param1) Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - v4 = sub_02006E3C(12, 117, v2->unk_04, 6, 0, 0, 1, 8); + v4 = Graphics_LoadTilesToBgLayer(12, 117, v2->unk_04, 6, 0, 0, 1, 8); v4 /= 0x20; - sub_02006E60(12, 116, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 116, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); ov48_02256650(v2, v4); @@ -239,7 +239,7 @@ static void ov48_022567FC(UnkStruct_ov48_0225650C *param0) v0 = param0->unk_00; - sub_02006EC0(12, 120, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 120, 1, 0, 0, 1, 8); ov25_02255958(¶m0->unk_138, 12, 118, 119, 8); diff --git a/src/overlay049/ov49_022563D4.c b/src/overlay049/ov49_022563D4.c index 0da542333c..59449bd35e 100644 --- a/src/overlay049/ov49_022563D4.c +++ b/src/overlay049/ov49_022563D4.c @@ -66,7 +66,7 @@ static void ov49_02256410(UnkStruct_ov49_022563D4 *param0, const UnkStruct_ov49_ 0 }; - sub_02006EC0(12, 69, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 69, 1, 0, 0, 1, 8); ov25_02255958(¶m0->unk_28, 12, 67, 68, 8); param0->unk_24 = ov25_02255810(param0->unk_20, &v0, ¶m0->unk_28); @@ -147,8 +147,8 @@ static void ov49_022564E4(SysTask *param0, void *param1) v3 = ov25_02255240(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 66, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 65, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 66, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 65, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay050/ov50_02256510.c b/src/overlay050/ov50_02256510.c index c0825a043d..6fc8f713b7 100644 --- a/src/overlay050/ov50_02256510.c +++ b/src/overlay050/ov50_02256510.c @@ -79,7 +79,7 @@ static void ov50_02256560(UnkStruct_ov50_02256510 *param0, const UnkStruct_ov50_ 0, }; - sub_02006EC0(12, 114, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 114, 1, 0, 0, 1, 8); ov25_02255958(¶m0->unk_28, 12, 112, 113, 8); param0->unk_24 = ov25_02255810(param0->unk_20, &v0, ¶m0->unk_28); @@ -175,7 +175,7 @@ static void ov50_0225664C(SysTask *param0, void *param1) ov50_0225675C(v3, v4); ov50_022567F4(v3, v4); - sub_02006E3C(12, 111, v3->unk_04, 7, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 111, v3->unk_04, 7, 0, 0, 1, 8); ov25_022546B8(0, 0); Bg_CopyTilemapBufferToVRAM(v3->unk_04, 6); @@ -215,7 +215,7 @@ static void ov50_0225675C(UnkStruct_ov50_02256510 *param0, const UnkStruct_ov50_ { u32 v0; - sub_02006E60(12, 110, param0->unk_04, 7, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 110, param0->unk_04, 7, 0, 0, 1, 8); for (v0 = 0; v0 < param1->unk_04; v0++) { if (param1->unk_0C[v0].unk_03) { diff --git a/src/overlay051/ov51_0225632C.c b/src/overlay051/ov51_0225632C.c index ce465d5ee1..f61945f603 100644 --- a/src/overlay051/ov51_0225632C.c +++ b/src/overlay051/ov51_0225632C.c @@ -101,9 +101,9 @@ static void ov51_022563B8(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 8, v2->unk_04, 6, 0, 0, 0, 8); + Graphics_LoadTilesToBgLayer(12, 8, v2->unk_04, 6, 0, 0, 0, 8); Bg_FillTilemapRect(v2->unk_04, 6, 0, 0, 0, 32, 24, 0); - sub_02006E84(12, 9, 4, 0 * 0x20, 0x20, 8); + Graphics_LoadPalette(12, 9, 4, 0 * 0x20, 0x20, 8); ov25_02255440(v2->unk_04, 26, 6); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay052/ov52_02256694.c b/src/overlay052/ov52_02256694.c index 0910cbad09..3e0940787e 100644 --- a/src/overlay052/ov52_02256694.c +++ b/src/overlay052/ov52_02256694.c @@ -122,7 +122,7 @@ static void ov52_0225670C(UnkStruct_ov52_02256694 *param0, const UnkStruct_ov52_ }; int v1; - sub_02006EC0(12, 99, 1, 0, 0, 1, 8); + Graphics_LoadObjectTiles(12, 99, 1, 0, 0, 1, 8); ov25_02255958(¶m0->unk_44, 12, 97, 98, 8); for (v1 = 0; v1 < 4; v1++) { @@ -207,10 +207,10 @@ static void ov52_022567F4(SysTask *param0, void *param1) Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - v5 = sub_02006E3C(12, 96, v2->unk_04, 6, 0, 0, 1, 8); + v5 = Graphics_LoadTilesToBgLayer(12, 96, v2->unk_04, 6, 0, 0, 1, 8); v5 /= 0x20; - sub_02006E60(12, 95, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 95, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); Window_Add(v2->unk_04, &v2->unk_20, 6, 2, 2, 24, 20, 0, v5); diff --git a/src/overlay053/ov53_02256420.c b/src/overlay053/ov53_02256420.c index eec22fe405..18aa3a2235 100644 --- a/src/overlay053/ov53_02256420.c +++ b/src/overlay053/ov53_02256420.c @@ -126,8 +126,8 @@ static void ov53_022564B0(SysTask *param0, void *param1) v3 = ov25_02255240(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 122, v2->unk_04, 6, 0, 0, 1, 8); - sub_02006E60(12, 121, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilesToBgLayer(12, 122, v2->unk_04, 6, 0, 0, 1, 8); + Graphics_LoadTilemapToBgLayer(12, 121, v2->unk_04, 6, 0, 0, 1, 8); ov25_022546B8(0, 0); ov53_022566AC(v2, v3); @@ -347,7 +347,7 @@ static void ov53_022566AC(UnkStruct_ov53_02256420 *param0, const UnkStruct_ov53_ ov25_02255958(¶m0->unk_78, 12, 5, 6, 8); ov25_02255958(¶m0->unk_64, 12, 123, 124, 8); - v1 = sub_02006EC0(12, 125, 1, 0, 0, 1, 8); + v1 = Graphics_LoadObjectTiles(12, 125, 1, 0, 0, 1, 8); v1 /= 0x20; param0->unk_AC = v1; diff --git a/src/overlay055/ov55_0225632C.c b/src/overlay055/ov55_0225632C.c index 97a748dfd8..0bf9025936 100644 --- a/src/overlay055/ov55_0225632C.c +++ b/src/overlay055/ov55_0225632C.c @@ -104,9 +104,9 @@ static void ov55_022563C8(SysTask *param0, void *param1) v2 = ov25_0225523C(param1); Bg_InitFromTemplate(v2->unk_04, 6, &v0, 0); - sub_02006E3C(12, 8, v2->unk_04, 6, 0, 0, 0, 8); + Graphics_LoadTilesToBgLayer(12, 8, v2->unk_04, 6, 0, 0, 0, 8); Bg_FillTilemapRect(v2->unk_04, 6, 0, 0, 0, 32, 24, 0); - sub_02006E84(12, 9, 4, 0 * 0x20, 0x20, 8); + Graphics_LoadPalette(12, 9, 4, 0 * 0x20, 0x20, 8); ov25_02255440(v2->unk_04, v2->unk_00->unk_00, 6); Bg_CopyTilemapBufferToVRAM(v2->unk_04, 6); diff --git a/src/overlay056/ov56_022561C0.c b/src/overlay056/ov56_022561C0.c index 2663b4d5f5..6a94f406f1 100644 --- a/src/overlay056/ov56_022561C0.c +++ b/src/overlay056/ov56_022561C0.c @@ -185,7 +185,7 @@ static void ov56_02256294(UnkStruct_ov56_02256468 *param0) param0->unk_2D8.unk_06 = 0; param0->unk_18 = StringTemplate_Default(4); param0->unk_1C = MessageLoader_Init(0, 26, 635, 4); - param0->unk_20 = sub_02006F6C(74, 3, 1, &(param0->unk_24), 4); + param0->unk_20 = Graphics_GetScrnData(74, 3, 1, &(param0->unk_24), 4); } static void ov56_022562EC(BgConfig *param0, UnkStruct_ov56_022562EC *param1) @@ -368,9 +368,9 @@ static void ov56_02256508(BgConfig *param0) GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG3, 0); } - sub_02006E84(74, 0, 4, 0, 0x20 * 3, 4); - sub_02006E3C(74, 2, param0, 7, 0, (32 * 5) * 0x20, 1, 4); - sub_02006E60(74, 4, param0, 7, 0, 32 * 24 * 2, 1, 4); + Graphics_LoadPalette(74, 0, 4, 0, 0x20 * 3, 4); + Graphics_LoadTilesToBgLayer(74, 2, param0, 7, 0, (32 * 5) * 0x20, 1, 4); + Graphics_LoadTilemapToBgLayer(74, 4, param0, 7, 0, 32 * 24 * 2, 1, 4); sub_0205D8CC(4, 0); } diff --git a/src/overlay058/ov58_021D0D80.c b/src/overlay058/ov58_021D0D80.c index 53450e29e8..9b2da2ce3b 100644 --- a/src/overlay058/ov58_021D0D80.c +++ b/src/overlay058/ov58_021D0D80.c @@ -586,14 +586,14 @@ static void ov58_021D142C(UnkStruct_02095EAC *param0, NARC *param1) { BgConfig *v0 = param0->unk_00; - sub_02007130(param1, 0, 0, 0, 16 * 2 * 2, 39); - sub_02007130(param1, 1, 4, 0, 16 * 2 * 2, 39); + Graphics_LoadPaletteFromOpenNARC(param1, 0, 0, 0, 16 * 2 * 2, 39); + Graphics_LoadPaletteFromOpenNARC(param1, 1, 4, 0, 16 * 2 * 2, 39); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 39); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 39); - sub_020070E8(param1, 2, v0, 2, 0, 32 * 8 * 0x20, 1, 39); - sub_0200710C(param1, 4, v0, 2, 0, 32 * 24 * 2, 1, 39); - sub_020070E8(param1, 3, v0, 5, 0, 32 * 8 * 0x20, 1, 39); - sub_0200710C(param1, 5, v0, 5, 0, 32 * 24 * 2, 1, 39); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, v0, 2, 0, 32 * 8 * 0x20, 1, 39); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 4, v0, 2, 0, 32 * 24 * 2, 1, 39); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 3, v0, 5, 0, 32 * 8 * 0x20, 1, 39); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 5, v0, 5, 0, 32 * 24 * 2, 1, 39); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_08->unk_08), 39); sub_0200DAA4(v0, 0, 1 + (18 + 12), 11, 0, 39); } diff --git a/src/overlay059/ov59_021D0D80.c b/src/overlay059/ov59_021D0D80.c index cf300bd20c..12c9a527d0 100644 --- a/src/overlay059/ov59_021D0D80.c +++ b/src/overlay059/ov59_021D0D80.c @@ -533,7 +533,7 @@ static void ov59_021D1250(UnkStruct_020961E8 *param0, NARC *param1) param0->unk_0C.unk_00 = 0; param0->unk_0C.unk_08 = 0; param0->unk_0C.unk_04 = 0; - param0->unk_0C.unk_0C = sub_020071EC(param1, 1, ¶m0->unk_0C.unk_10, 51); + param0->unk_0C.unk_0C = Graphics_GetPlttDataFromOpenNARC(param1, 1, ¶m0->unk_0C.unk_10, 51); param0->unk_4AA8 = 0; param0->unk_384 = NULL; param0->unk_4AAC = 2; @@ -570,14 +570,14 @@ static void ov59_021D1388(UnkStruct_020961E8 *param0, NARC *param1) { BgConfig *v0 = param0->unk_00; - sub_02007130(param1, 0, 0, 0, 16 * 16 * 2, 51); - sub_02006E84(12, 12, 4, 0, 16 * 2, 51); + Graphics_LoadPaletteFromOpenNARC(param1, 0, 0, 0, 16 * 16 * 2, 51); + Graphics_LoadPalette(12, 12, 4, 0, 16 * 2, 51); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 51); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 51); - sub_02006E3C(12, 10, v0, 6, 0, 0, 1, 51); - sub_02006E60(12, 11, v0, 6, 0, 0, 1, 51); - sub_020070E8(param1, 2, v0, 1, 0, 32 * 8 * 0x20, 1, 51); - sub_0200710C(param1, 3, v0, 1, 0, 32 * 24 * 2, 1, 51); + Graphics_LoadTilesToBgLayer(12, 10, v0, 6, 0, 0, 1, 51); + Graphics_LoadTilemapToBgLayer(12, 11, v0, 6, 0, 0, 1, 51); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, v0, 1, 0, 32 * 8 * 0x20, 1, 51); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 3, v0, 1, 0, 32 * 24 * 2, 1, 51); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_08->unk_08), 51); sub_0200DAA4(v0, 0, 1 + (18 + 12), 11, 0, 51); } @@ -1649,10 +1649,10 @@ static void ov59_021D26E8(UnkStruct_020961E8 *param0) static void ov59_021D27FC(UnkStruct_020961E8 *param0, NARC *param1) { - param0->unk_398[0] = sub_02006F88(104, 8, &(param0->unk_3A0[0]), 51); - param0->unk_398[1] = sub_020071EC(param1, 7, &(param0->unk_3A0[1]), 51); - param0->unk_388[0] = sub_02006F50(104, 32, 1, &(param0->unk_390[0]), 51); - param0->unk_388[1] = sub_020071B4(param1, 9, 1, &(param0->unk_390[1]), 51); + param0->unk_398[0] = Graphics_GetPlttData(104, 8, &(param0->unk_3A0[0]), 51); + param0->unk_398[1] = Graphics_GetPlttDataFromOpenNARC(param1, 7, &(param0->unk_3A0[1]), 51); + param0->unk_388[0] = Graphics_GetCharData(104, 32, 1, &(param0->unk_390[0]), 51); + param0->unk_388[1] = Graphics_GetCharDataFromOpenNARC(param1, 9, 1, &(param0->unk_390[1]), 51); } static const u16 Unk_ov59_021D3290[] = { diff --git a/src/overlay061/ov61_0222BF44.c b/src/overlay061/ov61_0222BF44.c index 39409ba3dc..f528c21c61 100644 --- a/src/overlay061/ov61_0222BF44.c +++ b/src/overlay061/ov61_0222BF44.c @@ -433,16 +433,16 @@ static void ov61_0222C3B0(UnkStruct_ov61_0222C664 *param0) v1 = NARC_ctor(NARC_INDEX_DATA__WIFIP2PMATCH, 117); - sub_02007130(v1, 3, 0, 0, 0, 117); - sub_02007130(v1, 3, 4, 0, 0, 117); + Graphics_LoadPaletteFromOpenNARC(v1, 3, 0, 0, 0, 117); + Graphics_LoadPaletteFromOpenNARC(v1, 3, 4, 0, 0, 117); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 117); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 117); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(SaveData_Options(param0->unk_00->unk_00->unk_04)), 117); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 117); - sub_020070E8(v1, 2, v0, 1, 0, 0, 0, 117); - sub_0200710C(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 117); - sub_020070E8(v1, 10, v0, 5, 0, 0, 0, 117); - sub_0200710C(v1, 11, v0, 5, 0, 32 * 24 * 2, 0, 117); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 2, v0, 1, 0, 0, 0, 117); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 117); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 10, v0, 5, 0, 0, 0, 117); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 11, v0, 5, 0, 32 * 24 * 2, 0, 117); Bg_MaskPalette(0, 0); Bg_MaskPalette(4, 0); diff --git a/src/overlay062/ov62_022300D8.c b/src/overlay062/ov62_022300D8.c index bee32b7512..36564e00f7 100644 --- a/src/overlay062/ov62_022300D8.c +++ b/src/overlay062/ov62_022300D8.c @@ -50,25 +50,25 @@ void ov62_022300D8(UnkStruct_0208C06C *param0) PaletteData *v4 = param0->unk_14.unk_14; if (param0->unk_00 == 0) { - sub_020070E8(v0, 67, v1, 1, 0, 0, 0, 102); - sub_020070E8(v0, 67, v1, 5, 0, 0, 0, 102); - sub_0200710C(v0, 69, v1, 5, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 67, v1, 1, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 67, v1, 5, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 69, v1, 5, 0, 0, 0, 102); PaletteData_LoadBufferFromFileStart(v4, 162, ov62_02231710(param0, 3), 102, 0, 0x20 * (8 + 1), 0); PaletteData_LoadBufferFromFileStart(v4, 162, ov62_02231710(param0, 3), 102, 1, 0x20 * (8 + 1), 0); PaletteData_LoadBufferFromFileStart(v4, 162, ov62_02231710(param0, 0), 102, 0, 0x20, 14 * 16); PaletteData_LoadBufferFromFileStart(v4, 162, ov62_02231710(param0, 0), 102, 1, 0x20, 14 * 16); } else { - sub_020070E8(v0, 54, v1, 1, 0, 0, 0, 102); - sub_020070E8(v0, 54, v1, 5, 0, 0, 0, 102); - sub_0200710C(v0, 55, v1, 5, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 54, v1, 1, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 54, v1, 5, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 55, v1, 5, 0, 0, 0, 102); PaletteData_LoadBufferFromFileStart(v4, 162, 53, 102, 0, 0x20 * (8 + 1), 0); PaletteData_LoadBufferFromFileStart(v4, 162, 53, 102, 1, 0x20 * (8 + 1), 0); PaletteData_LoadBufferFromFileStart(v4, 162, 52, 102, 0, 0x20, 14 * 16); PaletteData_LoadBufferFromFileStart(v4, 162, 52, 102, 1, 0x20, 14 * 16); } - sub_0200710C(v0, 70, v1, 5, 0, 0, 0, 102); - sub_0200710C(v0, 70, v1, 1, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 70, v1, 5, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 70, v1, 1, 0, 0, 0, 102); PaletteData_BlendMulti(v4, 1, 0x2, 16, param0->unk_14.unk_44); } @@ -85,8 +85,8 @@ void ov62_022302A8(UnkStruct_0208C06C *param0, int param1, BOOL param2) v5 = 0; } - sub_020070E8(v0, 45, v1, param1, 0, 0, 0, 102); - sub_0200710C(v0, v5, v1, param1, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 45, v1, param1, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, v5, v1, param1, 0, 0, 0, 102); } void ov62_022302F0(UnkStruct_0208C06C *param0, int param1) @@ -98,8 +98,8 @@ void ov62_022302F0(UnkStruct_0208C06C *param0, int param1) PaletteData *v4 = param0->unk_14.unk_14; int v5 = 1; - sub_020070E8(v0, 45, v1, param1, 0, 0, 0, 102); - sub_0200710C(v0, v5, v1, param1, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 45, v1, param1, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, v5, v1, param1, 0, 0, 0, 102); } void ov62_02230330(UnkStruct_0208C06C *param0) diff --git a/src/overlay062/ov62_02231690.c b/src/overlay062/ov62_02231690.c index e34789d950..74a9c1b86d 100644 --- a/src/overlay062/ov62_02231690.c +++ b/src/overlay062/ov62_02231690.c @@ -2711,7 +2711,7 @@ int ov62_0223438C(u64 param0) void ov62_022343B8(UnkStruct_0208C06C *param0, int param1, int param2) { - sub_0200710C(param0->unk_14.unk_00, param1, param0->unk_14.unk_10, param2, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, param1, param0->unk_14.unk_10, param2, 0, 0, 0, 102); } static void ov62_022343D8(SysTask *param0, void *param1) diff --git a/src/overlay062/ov62_02234A10.c b/src/overlay062/ov62_02234A10.c index 4ffeecc9e9..d0ebedbe0d 100644 --- a/src/overlay062/ov62_02234A10.c +++ b/src/overlay062/ov62_02234A10.c @@ -163,9 +163,9 @@ static BOOL ov62_02234CDC(UnkStruct_0208C06C *param0) if (ov62_022300BC(param0) == 1) { if (param0->unk_00 == 0) { - sub_0200710C(param0->unk_14.unk_00, 69, param0->unk_14.unk_10, 5, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 69, param0->unk_14.unk_10, 5, 0, 0, 0, 102); } else { - sub_0200710C(param0->unk_14.unk_00, 55, param0->unk_14.unk_10, 5, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 55, param0->unk_14.unk_10, 5, 0, 0, 0, 102); } sub_0208B948(param0->unk_6F0, 256 / 2, 192 + 32); @@ -202,9 +202,9 @@ static BOOL ov62_02234CDC(UnkStruct_0208C06C *param0) break; case 2: if (param0->unk_00 == 0) { - sub_0200710C(param0->unk_14.unk_00, 69, param0->unk_14.unk_10, 5, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 69, param0->unk_14.unk_10, 5, 0, 0, 0, 102); } else { - sub_0200710C(param0->unk_14.unk_00, 55, param0->unk_14.unk_10, 5, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 55, param0->unk_14.unk_10, 5, 0, 0, 0, 102); } param0->unk_08++; diff --git a/src/overlay062/ov62_02235E64.c b/src/overlay062/ov62_02235E64.c index 8bee644d7b..d7aaa2e636 100644 --- a/src/overlay062/ov62_02235E64.c +++ b/src/overlay062/ov62_02235E64.c @@ -126,8 +126,8 @@ static BOOL ov62_02235EBC(UnkStruct_0208C06C *param0) Bg_SetPriority(5, 3); Bg_SetPriority(6, 1); Bg_SetPriority(7, 2); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; break; default: @@ -363,7 +363,7 @@ static BOOL ov62_022363CC(UnkStruct_0208C06C *param0) case 2: ov62_022362B8(param0); ov62_02231AAC(param0, 296); - sub_0200710C(param0->unk_14.unk_00, 84, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 84, param0->unk_14.unk_10, 7, 0, 0, 0, 102); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG3, 1); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG3, 1); param0->unk_08++; diff --git a/src/overlay062/ov62_02236CBC.c b/src/overlay062/ov62_02236CBC.c index a43b122e25..85b5a909a8 100644 --- a/src/overlay062/ov62_02236CBC.c +++ b/src/overlay062/ov62_02236CBC.c @@ -139,8 +139,8 @@ static void ov62_02236E14(UnkStruct_0208C06C *param0) SpriteGfxHandler *v4 = param0->unk_14.unk_08; PaletteData *v5 = param0->unk_14.unk_14; - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 6, 0, 0, 0, 102); - sub_0200710C(v1, 68, v2, 6, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 6, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 68, v2, 6, 0, 0, 0, 102); SpriteRenderer_LoadPalette(v5, 3, v3, v4, v1, ov62_02231710(param0, 0), 0, 1, NNS_G2D_VRAM_TYPE_2DSUB, 29292); SpriteRenderer_LoadCharResObjFromOpenNarc(v3, v4, v1, 66, 0, NNS_G2D_VRAM_TYPE_2DSUB, 29292); SpriteRenderer_LoadCellResObjFromOpenNarc(v3, v4, v1, 71, 0, 29292); diff --git a/src/overlay062/ov62_02237D24.c b/src/overlay062/ov62_02237D24.c index 22ca7a3297..b3d06cb87f 100644 --- a/src/overlay062/ov62_02237D24.c +++ b/src/overlay062/ov62_02237D24.c @@ -274,8 +274,8 @@ static BOOL ov62_02237DB8(UnkStruct_0208C06C *param0) ov62_02231454(param0); ov62_02239608(param0); ov62_02234540(param0, 0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_0222FB60(param0, 2); break; } diff --git a/src/overlay062/ov62_02239D60.c b/src/overlay062/ov62_02239D60.c index df6664d695..b1ece971f7 100644 --- a/src/overlay062/ov62_02239D60.c +++ b/src/overlay062/ov62_02239D60.c @@ -600,7 +600,7 @@ static BOOL ov62_0223A544(UnkStruct_0208C06C *param0) ov62_02231664(&v0->unk_1AC, 1); if (ov62_022315E0(&v0->unk_1A4, &v0->unk_1A8, 1, 2)) { - sub_0200710C(param0->unk_14.unk_00, 79, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 79, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_0223AB14(param0); ov62_0223A4C8(param0, 1); param0->unk_08++; @@ -725,7 +725,7 @@ static BOOL ov62_0223A840(UnkStruct_0208C06C *param0) if (ov62_022315E0(&v0->unk_1A4, &v0->unk_1A8, 1, 2)) { ov62_0223A4C8(param0, 0); - sub_0200710C(param0->unk_14.unk_00, 77, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 77, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; } @@ -1248,8 +1248,8 @@ static void ov62_0223B158(UnkStruct_0208C06C *param0) v0->unk_04.unk_176 = 0; } - sub_020070E8(param0->unk_14.unk_00, (138 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, (140 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, (138 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, (140 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); PaletteData_LoadBufferFromFile(param0->unk_14.unk_14, 162, (139 + (v0->unk_04.unk_176 * 3)), 102, 0, 0x40, 12 * 16, 12 * 16); ov62_0223B050(param0); @@ -1277,8 +1277,8 @@ static void ov62_0223B230(UnkStruct_0208C06C *param0) } } - sub_020070E8(param0->unk_14.unk_00, (138 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, (140 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, (138 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, (140 + (v0->unk_04.unk_176 * 3)), param0->unk_14.unk_10, 3, 0, 0, 0, 102); PaletteData_LoadBufferFromFile(param0->unk_14.unk_14, 162, (139 + (v0->unk_04.unk_176 * 3)), 102, 0, 0x40, 12 * 16, 12 * 16); ov62_0223B050(param0); @@ -1301,8 +1301,8 @@ static BOOL ov62_0223B2E8(UnkStruct_0208C06C *param0) ov62_0223AFC0(param0, 0); ov62_02234540(param0, 0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, 77, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 77, param0->unk_14.unk_10, 7, 0, 0, 0, 102); } GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG3, 1); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG3, 1); @@ -1410,8 +1410,8 @@ static BOOL ov62_0223B564(UnkStruct_0208C06C *param0) ov62_022302F0(param0, 2); ov62_0223AA90(param0); ov62_0223AC0C(param0, 275); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, 79, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 79, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_0223AB14(param0); ov62_0223A4C8(param0, 1); @@ -1640,9 +1640,9 @@ static BOOL ov62_0223B980(UnkStruct_0208C06C *param0) ov62_02231664(&v0->unk_1AC, 1); if (ov62_022315E0(&v0->unk_1A4, &v0->unk_1A8, 1, 0)) { - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, 3, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, 78, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 3, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 78, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; } @@ -1725,7 +1725,7 @@ static BOOL ov62_0223B980(UnkStruct_0208C06C *param0) if (ov62_022315E0(&v0->unk_1A4, &v0->unk_1A8, 1, 0)) { GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG2, 0); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG2, 0); - sub_0200710C(param0->unk_14.unk_00, 79, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 79, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; } break; @@ -1875,7 +1875,7 @@ static BOOL ov62_0223BFB4(UnkStruct_0208C06C *param0) param0->unk_08++; case 1: if (ov62_022315E0(&v0->unk_1A4, &v0->unk_1A8, 1, 0)) { - sub_0200710C(param0->unk_14.unk_00, 79, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 79, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; } break; @@ -1942,7 +1942,7 @@ static BOOL ov62_0223C138(UnkStruct_0208C06C *param0) ov62_02234540(param0, 0); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG2, 0); - sub_0200710C(param0->unk_14.unk_00, 75, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 75, param0->unk_14.unk_10, 7, 0, 0, 0, 102); } GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG3, 1); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG3, 1); @@ -2017,9 +2017,9 @@ static BOOL ov62_0223C424(UnkStruct_0208C06C *param0) param0->unk_08++; case 2: if (ov62_022315E0(&v0->unk_1A4, &v0->unk_1A8, 1, 0)) { - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, 3, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, 78, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 3, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 78, param0->unk_14.unk_10, 7, 0, 0, 0, 102); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG2, 0); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG2, 0); param0->unk_08++; @@ -2096,8 +2096,8 @@ static BOOL ov62_0223C63C(UnkStruct_0208C06C *param0) ov62_02232378(&v0->unk_2ED8, param0); ov62_022323B8(&v0->unk_2ED8, 0); ov62_02234540(param0, 0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); param0->unk_08++; } break; @@ -2136,8 +2136,8 @@ static BOOL ov62_0223C79C(UnkStruct_0208C06C *param0) if (ov62_022315E0(&v0->unk_1A4, &v0->unk_1A8, 1, 1)) { Bg_ClearTilemap(param0->unk_14.unk_10, 2); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG2, 0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, 3, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 3, param0->unk_14.unk_10, 3, 0, 0, 0, 102); param0->unk_08++; } break; diff --git a/src/overlay062/ov62_0223CAEC.c b/src/overlay062/ov62_0223CAEC.c index 5edafe6af4..e259ea99a2 100644 --- a/src/overlay062/ov62_0223CAEC.c +++ b/src/overlay062/ov62_0223CAEC.c @@ -1098,10 +1098,10 @@ static BOOL ov62_0223DAE8 (UnkStruct_0208C06C * param0) switch (param0->unk_08) { case 0: - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, 33, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_0200710C(param0->unk_14.unk_00, 34, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 33, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 34, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_0223D004(param0); ov62_0223D160(param0); diff --git a/src/overlay062/ov62_0223DFA8.c b/src/overlay062/ov62_0223DFA8.c index 4a0fccc9b7..4797d61d02 100644 --- a/src/overlay062/ov62_0223DFA8.c +++ b/src/overlay062/ov62_0223DFA8.c @@ -547,7 +547,7 @@ static BOOL ov62_0223E810 (UnkStruct_0208C06C * param0) ov62_02231664(&v0->unk_08, 1); if (ov62_022315E0(&v0->unk_00, &v0->unk_04, 1, 2)) { - sub_0200710C(param0->unk_14.unk_00, 84, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 84, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_0223E0FC(param0, 102, v0->unk_1FB0); param0->unk_08++; } @@ -600,8 +600,8 @@ static BOOL ov62_0223E8BC (UnkStruct_0208C06C * param0) ov62_0224088C(param0); ov62_02240900(param0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_02234540(param0, 1); if (v0->unk_10 == 0) { @@ -613,11 +613,11 @@ static BOOL ov62_0223E8BC (UnkStruct_0208C06C * param0) ov62_02232394(&v0->unk_194, param0); ov62_02232378(&v0->unk_194, param0); ov62_022323B8(&v0->unk_194, 0); - sub_0200710C(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); } ov62_02234540(param0, 0); - sub_0200710C(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; break; case 3: @@ -695,8 +695,8 @@ static BOOL ov62_0223EB28 (UnkStruct_0208C06C * param0) } ov62_02240900(param0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_02234540(param0, 1); if (v0->unk_10 == 0) { @@ -707,11 +707,11 @@ static BOOL ov62_0223EB28 (UnkStruct_0208C06C * param0) } else { ov62_02232378(&v0->unk_194, param0); ov62_022323B8(&v0->unk_194, 0); - sub_0200710C(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); } ov62_02234540(param0, 0); - sub_0200710C(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; break; case 3: @@ -1216,8 +1216,8 @@ static BOOL ov62_0223F760 (UnkStruct_0208C06C * param0) v0->unk_2008.unk_00 = ov62_02233A68(102); v0->unk_2008.unk_08 = 500; - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_022343B8(param0, 4, 3); ov62_022343B8(param0, 7, 7); @@ -1683,8 +1683,8 @@ static BOOL ov62_02240084 (UnkStruct_0208C06C * param0) } } - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_022343B8(param0, 6, 7); @@ -2032,7 +2032,7 @@ asm static BOOL ov62_022403F8 (UnkStruct_0208C06C * param0) ldr r2, [r4, #0x24] mov r1, #0x3e mov r3, #3 - bl sub_020070E8 + bl Graphics_LoadTilesToBgLayerFromOpenNARC mov r0, #0 str r0, [sp] str r0, [sp, #4] @@ -2043,7 +2043,7 @@ asm static BOOL ov62_022403F8 (UnkStruct_0208C06C * param0) ldr r2, [r4, #0x24] mov r1, #0x3e mov r3, #7 - bl sub_020070E8 + bl Graphics_LoadTilesToBgLayerFromOpenNARC add r0, r4, #0 mov r1, #1 bl ov62_02234540 @@ -2090,7 +2090,7 @@ asm static BOOL ov62_022403F8 (UnkStruct_0208C06C * param0) ldr r2, [r4, #0x24] mov r1, #0x50 mov r3, #3 - bl sub_0200710C + bl Graphics_LoadTilemapToBgLayerFromOpenNARC _02240698: add r0, r4, #0 mov r1, #0 @@ -2105,7 +2105,7 @@ asm static BOOL ov62_022403F8 (UnkStruct_0208C06C * param0) ldr r2, [r4, #0x24] mov r1, #6 mov r3, #7 - bl sub_0200710C + bl Graphics_LoadTilemapToBgLayerFromOpenNARC ldr r0, [r4, #8] add r0, r0, #1 str r0, [r4, #8] diff --git a/src/overlay062/ov62_02241204.c b/src/overlay062/ov62_02241204.c index 181ddb7892..fe7c69d0a4 100644 --- a/src/overlay062/ov62_02241204.c +++ b/src/overlay062/ov62_02241204.c @@ -858,8 +858,8 @@ static BOOL ov62_02241D24 (UnkStruct_0208C06C * param0) ov62_02234314(); ov62_022315C8(&v0->unk_00, &v0->unk_04, 0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_022343B8(param0, 56, 3); ov62_022343B8(param0, 59, 7); @@ -2228,8 +2228,8 @@ static BOOL ov62_02243514 (UnkStruct_0208C06C * param0) ov62_02234540(param0, 0); ov62_02245640(param0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_02234540(param0, 1); if (v0->unk_1CC == 0) { @@ -2240,11 +2240,11 @@ static BOOL ov62_02243514 (UnkStruct_0208C06C * param0) } else { ov62_02232378(&v0->unk_80, param0); ov62_022323B8(&v0->unk_80, 0); - sub_0200710C(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); } ov62_02234540(param0, 0); - sub_0200710C(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; break; case 5: @@ -2456,8 +2456,8 @@ static BOOL ov62_02243B1C (UnkStruct_0208C06C * param0) v0->unk_79C = param0->unk_8B4.unk_3904[param0->unk_14.unk_48C.unk_38.unk_00]; - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_022343B8(param0, 6, 7); @@ -2946,8 +2946,8 @@ static BOOL ov62_022444BC (UnkStruct_0208C06C * param0) ov62_02231560(&v0->unk_00, &v0->unk_04, (GX_BLEND_PLANEMASK_BG3), (GX_BLEND_PLANEMASK_BG1 | GX_BLEND_PLANEMASK_OBJ), (GX_BLEND_PLANEMASK_BG3), (GX_BLEND_PLANEMASK_BG1 | GX_BLEND_PLANEMASK_OBJ), 0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_022343B8(param0, 6, 7); @@ -3474,8 +3474,8 @@ static BOOL ov62_02245018 (UnkStruct_0208C06C * param0) Bg_ClearTilemap(param0->unk_14.unk_10, 6); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG2, 0); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG2, 0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_0223376C(param0, 0); param0->unk_08++; break; @@ -3504,8 +3504,8 @@ static BOOL ov62_02245018 (UnkStruct_0208C06C * param0) case 2: ov62_02245C64(param0); ov62_02245640(param0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_02234540(param0, 1); if (v0->unk_1CC == 0) { @@ -3516,11 +3516,11 @@ static BOOL ov62_02245018 (UnkStruct_0208C06C * param0) } else { ov62_02232378(&v0->unk_80, param0); ov62_022323B8(&v0->unk_80, 0); - sub_0200710C(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); } ov62_02234540(param0, 0); - sub_0200710C(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; break; case 3: @@ -4261,7 +4261,7 @@ static BOOL ov62_02245FE4 (UnkStruct_0208C06C * param0) ov62_02231664(&v0->unk_08, 1); if (ov62_022315E0(&v0->unk_00, &v0->unk_04, 1, 2)) { - sub_0200710C(param0->unk_14.unk_00, 84, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 84, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_02244AB4(param0, 102, v0->unk_1C8); param0->unk_08++; } @@ -4479,8 +4479,8 @@ static BOOL ov62_02246428 (UnkStruct_0208C06C * param0) ov62_022455C4(param0); ov62_02245640(param0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_02234540(param0, 1); @@ -4493,11 +4493,11 @@ static BOOL ov62_02246428 (UnkStruct_0208C06C * param0) ov62_02232394(&v0->unk_80, param0); ov62_02232378(&v0->unk_80, param0); ov62_022323B8(&v0->unk_80, 0); - sub_0200710C(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); } ov62_02234540(param0, 0); - sub_0200710C(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; break; case 3: @@ -4558,8 +4558,8 @@ static BOOL ov62_02246640 (UnkStruct_0208C06C * param0) } ov62_02245640(param0); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_02234540(param0, 1); if (v0->unk_1CC == 0) { @@ -4569,11 +4569,11 @@ static BOOL ov62_02246640 (UnkStruct_0208C06C * param0) } else { ov62_02232378(&v0->unk_80, param0); ov62_022323B8(&v0->unk_80, 0); - sub_0200710C(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 80, param0->unk_14.unk_10, 3, 0, 0, 0, 102); } ov62_02234540(param0, 0); - sub_0200710C(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 6, param0->unk_14.unk_10, 7, 0, 0, 0, 102); param0->unk_08++; break; case 3: diff --git a/src/overlay062/ov62_02246B00.c b/src/overlay062/ov62_02246B00.c index 388d1e522f..7a22774005 100644 --- a/src/overlay062/ov62_02246B00.c +++ b/src/overlay062/ov62_02246B00.c @@ -594,8 +594,8 @@ void ov62_02247574(UnkStruct_ov62_02246BF4 *param0) v1 = param0->unk_220.unk_0C; v0 = param0->unk_220.unk_00; - sub_020070E8(v0, 54, param0->unk_220.unk_0C, 3, 0, 0, 0, 102); - sub_0200710C(v0, 43, v1, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 54, param0->unk_220.unk_0C, 3, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 43, v1, 3, 0, 0, 0, 102); SpriteRenderer_LoadPalette(v4, 2, v2, v3, v0, 44, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 1000); SpriteRenderer_LoadCharResObjFromOpenNarc(v2, v3, v0, 40, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 1000); SpriteRenderer_LoadCellResObjFromOpenNarc(v2, v3, v0, 41, 0, 1000); diff --git a/src/overlay062/ov62_02247D74.c b/src/overlay062/ov62_02247D74.c index ee2b8a89e3..a3bdaa9312 100644 --- a/src/overlay062/ov62_02247D74.c +++ b/src/overlay062/ov62_02247D74.c @@ -174,8 +174,8 @@ static BOOL ov62_02247FFC(UnkStruct_0208C06C *param0) Bg_SetPriority(5, 3); Bg_SetPriority(6, 1); Bg_SetPriority(7, 2); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); - sub_020070E8(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 3, 0, 0, 0, 102); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_14.unk_00, 62, param0->unk_14.unk_10, 7, 0, 0, 0, 102); ov62_02234540(param0, 1); ov62_02231454(param0); ov62_02234540(param0, 0); @@ -203,7 +203,7 @@ static BOOL ov62_02248114(UnkStruct_0208C06C *param0) case 0: ov62_02247E9C(param0); ov62_02247D74(param0, 0); - sub_0200710C(param0->unk_14.unk_00, 84, param0->unk_14.unk_10, 7, 0, 0, 0, 102); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14.unk_00, 84, param0->unk_14.unk_10, 7, 0, 0, 0, 102); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG3, 1); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG3, 1); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG2, 0); diff --git a/src/overlay063/ov63_0222D1C0.c b/src/overlay063/ov63_0222D1C0.c index a78fe6cde4..58052582c0 100644 --- a/src/overlay063/ov63_0222D1C0.c +++ b/src/overlay063/ov63_0222D1C0.c @@ -47,7 +47,7 @@ UnkStruct_ov63_0222D1C0 *ov63_0222D1C0(UnkStruct_0200C738 *param0, BgConfig *par ov63_0222D31C(v0->unk_04, v0->unk_14, param2); - v0->unk_08 = sub_02006F6C(param2->unk_08, param2->unk_09, param2->unk_0A, &v0->unk_0C, param3); + v0->unk_08 = Graphics_GetScrnData(param2->unk_08, param2->unk_09, param2->unk_0A, &v0->unk_0C, param3); return v0; } diff --git a/src/overlay064/ov64_0222DCE0.c b/src/overlay064/ov64_0222DCE0.c index b0db8c99cc..8d606d941a 100644 --- a/src/overlay064/ov64_0222DCE0.c +++ b/src/overlay064/ov64_0222DCE0.c @@ -941,15 +941,15 @@ static void ov64_0222E290 (UnkStruct_ov64_0222E21C * param0, u32 param1) Bg_ClearTilemap(param0->unk_00, Unk_ov64_02232258[v0]); } - sub_02007130(param0->unk_21C, 0, 0, 0, ((6 + 1) - 0) * 32, param1); - sub_02007130(param0->unk_21C, 0, 4, 0, ((4 + 1) - 0) * 32, param1); + Graphics_LoadPaletteFromOpenNARC(param0->unk_21C, 0, 0, 0, ((6 + 1) - 0) * 32, param1); + Graphics_LoadPaletteFromOpenNARC(param0->unk_21C, 0, 4, 0, ((4 + 1) - 0) * 32, param1); - sub_020070E8(param0->unk_21C, 18, param0->unk_00, Unk_ov64_02232258[0], 0, 0, 0, param1); - sub_020070E8(param0->unk_21C, 18, param0->unk_00, Unk_ov64_02232258[2], 0, 0, 0, param1); - sub_020070E8(param0->unk_21C, 13, param0->unk_00, Unk_ov64_02232258[4], 0, 0, 0, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_21C, 18, param0->unk_00, Unk_ov64_02232258[0], 0, 0, 0, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_21C, 18, param0->unk_00, Unk_ov64_02232258[2], 0, 0, 0, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_21C, 13, param0->unk_00, Unk_ov64_02232258[4], 0, 0, 0, param1); - sub_0200710C(param0->unk_21C, 12, param0->unk_00, Unk_ov64_02232258[0], 0, 0, 0, param1); - sub_0200710C(param0->unk_21C, 14, param0->unk_00, Unk_ov64_02232258[4], 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_21C, 12, param0->unk_00, Unk_ov64_02232258[0], 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_21C, 14, param0->unk_00, Unk_ov64_02232258[4], 0, 0, 0, param1); } static void ov64_0222E3AC (UnkStruct_ov64_0222E21C * param0) @@ -1076,7 +1076,7 @@ static void ov64_0222E6D8 (UnkStruct_ov64_0222E21C * param0, u32 param1) int v1; for (v1 = 0; v1 < 2; v1++) { - param0->unk_278.unk_00[v1] = sub_020071D0(param0->unk_21C, v0[v1], 0, ¶m0->unk_278.unk_08[v1], param1); + param0->unk_278.unk_00[v1] = Graphics_GetScrnDataFromOpenNARC(param0->unk_21C, v0[v1], 0, ¶m0->unk_278.unk_08[v1], param1); } } @@ -1565,7 +1565,7 @@ asm static void ov64_0222EC94 (UnkStruct_ov64_0222F038 * param0, UnkStruct_ov64_ mov r1, #1 mov r2, #0 add r3, #0x18 - bl sub_020071D0 + bl Graphics_GetScrnDataFromOpenNARC ldr r1, [sp, #0x14] str r0, [r1, #0x14] add sp, #0x30 @@ -3113,7 +3113,7 @@ asm static void ov64_02230680 (UnkStruct_ov64_02230620 * param0, UnkStruct_ov64_ mov r1, #0xb mov r2, #0 add r3, #0x24 - bl sub_020071D0 + bl Graphics_GetScrnDataFromOpenNARC str r0, [r5, #0x20] add sp, #0x28 pop {r3, r4, r5, r6, r7, pc} @@ -3477,7 +3477,7 @@ static void ov64_02230F24 (UnkStruct_ov64_02230F60 * param0, UnkStruct_ov64_0222 int v1; for (v1 = 0; v1 < 7; v1++) { - param0->unk_00[v1] = sub_020071D0(param1->unk_21C, v0[v1], 0, ¶m0->unk_1C[v1], param2); + param0->unk_00[v1] = Graphics_GetScrnDataFromOpenNARC(param1->unk_21C, v0[v1], 0, ¶m0->unk_1C[v1], param2); } } @@ -3950,7 +3950,7 @@ asm static void ov64_02231164 (UnkStruct_ov64_02230F98 * param0, UnkStruct_ov64_ ldr r1, [sp, #0x40] mov r2, #0 lsl r3, r3, #6 - bl sub_02006E84 + bl Graphics_LoadPalette ldr r0, [sp, #0x30] cmp r0, #0 bne _0223148A diff --git a/src/overlay065/ov65_0222DCE0.c b/src/overlay065/ov65_0222DCE0.c index 94e308fc36..f8ae5eca5c 100644 --- a/src/overlay065/ov65_0222DCE0.c +++ b/src/overlay065/ov65_0222DCE0.c @@ -1211,17 +1211,17 @@ static UnkStruct_ov65_022354D8 * ov65_0222E8D4 (UnkStruct_ov65_0222EBE0 * param0 static void ov65_0222E90C(BgConfig *param0, UnkStruct_ov65_0222E99C *param1, NARC *param2, u32 param3) { - sub_02007130(param2, 13, 0, 8 * 32, 2 * 32, param3); - sub_02007130(param2, 13, 4, 13 * 32, 2 * 32, param3); - sub_020070E8(param2, 12, param0, 1, 0, 0, 0, param3); - sub_020070E8(param2, 12, param0, 6, 0, 0, 0, param3); + Graphics_LoadPaletteFromOpenNARC(param2, 13, 0, 8 * 32, 2 * 32, param3); + Graphics_LoadPaletteFromOpenNARC(param2, 13, 4, 13 * 32, 2 * 32, param3); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2, 12, param0, 1, 0, 0, 0, param3); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2, 12, param0, 6, 0, 0, 0, param3); if (param1->unk_08 == NULL) { - param1->unk_08 = sub_020071B4(param2, 12, 0, ¶m1->unk_0C, param3); + param1->unk_08 = Graphics_GetCharDataFromOpenNARC(param2, 12, 0, ¶m1->unk_0C, param3); } if (param1->unk_00 == NULL) { - param1->unk_00 = sub_020071D0(param2, 14, 0, ¶m1->unk_04, param3); + param1->unk_00 = Graphics_GetScrnDataFromOpenNARC(param2, 14, 0, ¶m1->unk_04, param3); } } @@ -1453,16 +1453,16 @@ static void ov65_0222ECA8 (UnkStruct_ov65_0222EBE0 * param0, NARC * param1) GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG3, 1); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG0, 1); - sub_02007130(param1, 3, 0, 0, 0, 54); - sub_02007130(param1, 3, 4, 0, 0, 54); + Graphics_LoadPaletteFromOpenNARC(param1, 3, 0, 0, 0, 54); + Graphics_LoadPaletteFromOpenNARC(param1, 3, 4, 0, 0, 54); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 54); Font_LoadScreenIndicatorsPalette(0, 12 * 0x20, 54); - sub_020070E8(param1, 2, v0, 0, 0, 0, 0, 54); - sub_0200710C(param1, 5, v0, 0, 0, 0, 0, 54); - sub_020070E8(param1, 10, v0, 4, 0, 0, 0, 54); - sub_0200710C(param1, 11, v0, 4, 0, 0, 0, 54); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, v0, 0, 0, 0, 0, 54); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 5, v0, 0, 0, 0, 0, 54); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 10, v0, 4, 0, 0, 0, 54); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 11, v0, 4, 0, 0, 0, 54); { int v1 = Options_Frame(SaveData_Options(param0->unk_160)); @@ -5141,22 +5141,22 @@ static void ov65_022332FC (UnkStruct_ov65_0222EBE0 * param0, NARC * param1, u32 int v2, v3; Bg_ClearTilemap(param0->unk_15C, 4); - sub_02007130(param1, 16, 4, 0 * 32, 4 * 32, param2); - sub_02007130(param1, 19, 4, 4 * 32, 5 * 32, param2); - sub_020070E8(param1, 15, param0->unk_15C, 4, 0, 0, 0, param2); - sub_020070E8(param1, 18, param0->unk_15C, 6, (0 + 48), 0, 0, param2); - sub_0200710C(param1, 17, param0->unk_15C, 4, 0, 0, 0, param2); + Graphics_LoadPaletteFromOpenNARC(param1, 16, 4, 0 * 32, 4 * 32, param2); + Graphics_LoadPaletteFromOpenNARC(param1, 19, 4, 4 * 32, 5 * 32, param2); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 15, param0->unk_15C, 4, 0, 0, 0, param2); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 18, param0->unk_15C, 6, (0 + 48), 0, 0, param2); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 17, param0->unk_15C, 4, 0, 0, 0, param2); - param0->unk_BE0.unk_04 = sub_020071D0(param1, 20, 0, ¶m0->unk_BE0.unk_08, param2); + param0->unk_BE0.unk_04 = Graphics_GetScrnDataFromOpenNARC(param1, 20, 0, ¶m0->unk_BE0.unk_08, param2); ov65_022335F8(param0->unk_BE0.unk_08, (0 + 48)); for (v0 = 0; v0 < 7; v0++) { - param0->unk_BE0.unk_0C[v0] = sub_020071D0(param1, 21 + v0, 0, ¶m0->unk_BE0.unk_28[v0], param2); + param0->unk_BE0.unk_0C[v0] = Graphics_GetScrnDataFromOpenNARC(param1, 21 + v0, 0, ¶m0->unk_BE0.unk_28[v0], param2); ov65_022335F8(param0->unk_BE0.unk_28[v0], (0 + 48)); } - param0->unk_BE0.unk_44 = sub_020071D0(param1, 28, 0, ¶m0->unk_BE0.unk_48, param2); + param0->unk_BE0.unk_44 = Graphics_GetScrnDataFromOpenNARC(param1, 28, 0, ¶m0->unk_BE0.unk_48, param2); ov65_022335F8(param0->unk_BE0.unk_48, (0 + 48)); Font_LoadScreenIndicatorsPalette(4, 15 * 32, param2); diff --git a/src/overlay065/ov65_02235060.c b/src/overlay065/ov65_02235060.c index 3995ab4e06..dddf74ec7c 100644 --- a/src/overlay065/ov65_02235060.c +++ b/src/overlay065/ov65_02235060.c @@ -637,9 +637,9 @@ static void ov65_0223591C(BgConfig *param0) static void ov65_02235920(BgConfig *param0, u32 param1, NARC *param2) { - sub_02007130(param2, 30, 0, 0, 8 * 32, param1); + Graphics_LoadPaletteFromOpenNARC(param2, 30, 0, 0, 8 * 32, param1); Bg_MaskPalette(0, 0); - sub_020070E8(param2, 29, param0, 0, 0, 0, 0, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2, 29, param0, 0, 0, 0, 0, param1); } static void ov65_02235960(UnkStruct_ov65_022358CC *param0, u32 param1, NARC *param2) @@ -1159,7 +1159,7 @@ static void ov65_022362B0(UnkStruct_ov65_02235130 *param0, UnkStruct_ov65_022363 { memset(param1, 0, sizeof(UnkStruct_ov65_02236318)); - param1->unk_00 = sub_020071EC(param2, 31, ¶m1->unk_04, param0->unk_04); + param1->unk_00 = Graphics_GetPlttDataFromOpenNARC(param2, 31, ¶m1->unk_04, param0->unk_04); param1->unk_08 = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3); param1->unk_09 = 0; param1->unk_0A = Unk_ov65_02238BC8[param1->unk_09]; diff --git a/src/overlay065/ov65_0223648C.c b/src/overlay065/ov65_0223648C.c index 957de17553..5c871683a2 100644 --- a/src/overlay065/ov65_0223648C.c +++ b/src/overlay065/ov65_0223648C.c @@ -711,16 +711,16 @@ static void ov65_02236840(UnkStruct_ov65_02236840 *param0, u32 param1) v0 = NARC_ctor(NARC_INDEX_DATA__WIFIP2PMATCH, param1); - sub_02007130(v0, 13, 0, 5 * 32, 1 * 32, param1); - sub_020070E8(v0, 12, param0->unk_00, 2, 0 * 32, (24 * 2) * 32, 0, param1); + Graphics_LoadPaletteFromOpenNARC(v0, 13, 0, 5 * 32, 1 * 32, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 12, param0->unk_00, 2, 0 * 32, (24 * 2) * 32, 0, param1); - param0->unk_244 = sub_020071D0(v0, 14, 0, ¶m0->unk_248, param1); + param0->unk_244 = Graphics_GetScrnDataFromOpenNARC(v0, 14, 0, ¶m0->unk_248, param1); { - param0->unk_250 = sub_020071EC(v0, 44, ¶m0->unk_254, param1); + param0->unk_250 = Graphics_GetPlttDataFromOpenNARC(v0, 44, ¶m0->unk_254, param1); - sub_020070E8(v0, 45, param0->unk_00, 0, 0, 0, 0, param1); - sub_0200710C(v0, 46, param0->unk_00, 0, 0, 0, 0, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 45, param0->unk_00, 0, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 46, param0->unk_00, 0, 0, 0, 0, param1); ov65_022372EC(param0, 0); param0->unk_258 = 3; diff --git a/src/overlay067/ov67_0225C700.c b/src/overlay067/ov67_0225C700.c index a45156997e..26881b9378 100644 --- a/src/overlay067/ov67_0225C700.c +++ b/src/overlay067/ov67_0225C700.c @@ -587,12 +587,12 @@ static void ov67_0225CE30(UnkStruct_ov67_0225D154 *param0, u32 param1) } { - sub_02006E84(92, 3, 0, 0, 11 * 32, param1); - sub_02006E84(92, 3, 4, 0, 11 * 32, param1); - sub_02006E3C(92, 2, param0->unk_0C, Unk_ov67_0225D3F4[0], 0, 0, 0, param1); - sub_02006E3C(92, 10, param0->unk_0C, Unk_ov67_0225D3F4[2], 0, 0, 0, param1); - sub_02006E60(92, 5, param0->unk_0C, Unk_ov67_0225D3F4[0], 0, 0, 0, param1); - sub_02006E60(92, 11, param0->unk_0C, Unk_ov67_0225D3F4[2], 0, 0, 0, param1); + Graphics_LoadPalette(92, 3, 0, 0, 11 * 32, param1); + Graphics_LoadPalette(92, 3, 4, 0, 11 * 32, param1); + Graphics_LoadTilesToBgLayer(92, 2, param0->unk_0C, Unk_ov67_0225D3F4[0], 0, 0, 0, param1); + Graphics_LoadTilesToBgLayer(92, 10, param0->unk_0C, Unk_ov67_0225D3F4[2], 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayer(92, 5, param0->unk_0C, Unk_ov67_0225D3F4[0], 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayer(92, 11, param0->unk_0C, Unk_ov67_0225D3F4[2], 0, 0, 0, param1); } GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 1); diff --git a/src/overlay068/ov68_0225C700.c b/src/overlay068/ov68_0225C700.c index a19f213c35..f688c9d375 100644 --- a/src/overlay068/ov68_0225C700.c +++ b/src/overlay068/ov68_0225C700.c @@ -496,9 +496,9 @@ static void ov68_0225C9A0(UnkStruct_ov68_0225C91C *param0, Options *param1, u32 sub_0200DAA4(param0->unk_00, 1, (1 + (18 + 12)), 6, 0, param2); { - sub_02006E3C(169, 2, param0->unk_00, 4, 0, 0, 0, param2); - sub_02006E60(169, 6, param0->unk_00, 4, 0, 0, 0, param2); - sub_02006E84(169, 0, 4, 0, 0, param2); + Graphics_LoadTilesToBgLayer(169, 2, param0->unk_00, 4, 0, 0, 0, param2); + Graphics_LoadTilemapToBgLayer(169, 6, param0->unk_00, 4, 0, 0, 0, param2); + Graphics_LoadPalette(169, 0, 4, 0, 0, param2); } } @@ -663,9 +663,9 @@ static void ov68_0225CCC8(UnkUnion_ov68_0225CCA8 *param0, UnkStruct_ov68_0225CB7 static void ov68_0225CCD0(UnkStruct_ov68_0225D0F8 *param0, UnkStruct_ov68_0225CB70 *param1, UnkStruct_ov68_0225C91C *param2, u32 param3) { { - sub_02007130(param2->unk_1A4, 199, 0, 0, 4 * 32, param3); - sub_020070E8(param2->unk_1A4, 200, param2->unk_00, 0, 0, 0, 0, param3); - sub_0200710C(param2->unk_1A4, 201, param2->unk_00, 0, 0, 0, 0, param3); + Graphics_LoadPaletteFromOpenNARC(param2->unk_1A4, 199, 0, 0, 4 * 32, param3); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2->unk_1A4, 200, param2->unk_00, 0, 0, 0, 0, param3); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param2->unk_1A4, 201, param2->unk_00, 0, 0, 0, 0, param3); } { @@ -1033,9 +1033,9 @@ static void ov68_0225D380(UnkUnion_ov68_0225CCA8 *param0, UnkStruct_ov68_0225CB7 static void ov68_0225D388(UnkStruct_ov68_0225D388 *param0, UnkStruct_ov68_0225CB70 *param1, UnkStruct_ov68_0225C91C *param2, UnkStruct_ov66_02231374 *param3, u32 param4) { { - sub_02007130(param2->unk_1A4, 199, 0, 0, 4 * 32, param4); - sub_020070E8(param2->unk_1A4, 200, param2->unk_00, 0, 0, 0, 0, param4); - sub_0200710C(param2->unk_1A4, 202, param2->unk_00, 0, 0, 0, 0, param4); + Graphics_LoadPaletteFromOpenNARC(param2->unk_1A4, 199, 0, 0, 4 * 32, param4); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2->unk_1A4, 200, param2->unk_00, 0, 0, 0, 0, param4); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param2->unk_1A4, 202, param2->unk_00, 0, 0, 0, 0, param4); } { @@ -1049,7 +1049,7 @@ static void ov68_0225D388(UnkStruct_ov68_0225D388 *param0, UnkStruct_ov68_0225CB ov68_0225D89C(param0, param1, 109, TEXT_COLOR(3, 4, 0)); { - param0->unk_80 = sub_020071B4(param2->unk_1A4, 200, 0, ¶m0->unk_84, param4); + param0->unk_80 = Graphics_GetCharDataFromOpenNARC(param2->unk_1A4, 200, 0, ¶m0->unk_84, param4); } { @@ -1422,7 +1422,7 @@ static BOOL ov68_0225DA74(UnkStruct_ov68_0225D388 *param0, UnkStruct_ov68_0225C9 static void ov68_0225DB3C(UnkStruct_ov68_0225D388 *param0, UnkStruct_ov68_0225CB70 *param1, UnkStruct_ov68_0225C91C *param2, u32 param3) { { - sub_0200710C(param2->unk_1A4, 203, param2->unk_00, 0, 0, 0, 0, param3); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param2->unk_1A4, 203, param2->unk_00, 0, 0, 0, 0, param3); } { diff --git a/src/overlay069/ov69_0225C700.c b/src/overlay069/ov69_0225C700.c index 4894ab2625..254679553c 100644 --- a/src/overlay069/ov69_0225C700.c +++ b/src/overlay069/ov69_0225C700.c @@ -1423,16 +1423,16 @@ static void ov69_0225D3A4(UnkStruct_ov69_0225D35C *param0, Options *param1, u32 } } - sub_02007130(param0->unk_1A8, 5, 4, 0, 0, param2); + Graphics_LoadPaletteFromOpenNARC(param0->unk_1A8, 5, 4, 0, 0, param2); { - sub_020070E8(param0->unk_1A8, 11, param0->unk_00, 4, 0, 0, 0, param2); - sub_0200710C(param0->unk_1A8, 12, param0->unk_00, 4, 0, 0, 0, param2); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_1A8, 11, param0->unk_00, 4, 0, 0, 0, param2); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_1A8, 12, param0->unk_00, 4, 0, 0, 0, param2); } { - sub_020070E8(param0->unk_1A8, 4, param0->unk_00, 6, 0, 0, 0, param2); - sub_0200710C(param0->unk_1A8, 18, param0->unk_00, 7, 0, 0, 0, param2); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_1A8, 4, param0->unk_00, 6, 0, 0, 0, param2); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_1A8, 18, param0->unk_00, 7, 0, 0, 0, param2); } Font_LoadScreenIndicatorsPalette(0, 1 * 0x20, param2); @@ -2039,7 +2039,7 @@ static void ov69_0225DEC0(UnkStruct_ov69_0225E084 *param0, UnkStruct_ov69_0225D3 ov69_0225E590(param0, param1, param3); { - param0->unk_94 = sub_020071D0(param1->unk_1A8, 19, 0, ¶m0->unk_98, param3); + param0->unk_94 = Graphics_GetScrnDataFromOpenNARC(param1->unk_1A8, 19, 0, ¶m0->unk_98, param3); } ov69_0225E960(¶m0->unk_1B8, param1, ¶m0->unk_2E4, param3); @@ -2539,7 +2539,7 @@ static void ov69_0225E748(UnkStruct_ov69_0225E7DC *param0, UnkStruct_ov69_0225D3 param0->unk_18 = param2->unk_04; for (v0 = 0; v0 < param0->unk_18; v0++) { - param0->unk_08[v0] = sub_020071D0( + param0->unk_08[v0] = Graphics_GetScrnDataFromOpenNARC( param1->unk_1A8, param2->unk_00[v0], 0, ¶m0->unk_10[v0], param4); } } @@ -2547,7 +2547,7 @@ static void ov69_0225E748(UnkStruct_ov69_0225E7DC *param0, UnkStruct_ov69_0225D3 if (param2->unk_08 > 0) { param0->unk_24 = param2->unk_08; param0->unk_26 = param2->unk_0A; - param0->unk_1C = sub_020071EC(param1->unk_1A8, param2->unk_06, ¶m0->unk_20, param4); + param0->unk_1C = Graphics_GetPlttDataFromOpenNARC(param1->unk_1A8, param2->unk_06, ¶m0->unk_20, param4); } } diff --git a/src/overlay070/ov70_0225D9A4.c b/src/overlay070/ov70_0225D9A4.c index fa030c14e9..e6ec6e3942 100644 --- a/src/overlay070/ov70_0225D9A4.c +++ b/src/overlay070/ov70_0225D9A4.c @@ -1302,7 +1302,7 @@ static void ov70_0225E4EC(UnkStruct_ov70_0225E4EC *param0, SaveData *param1, u32 sub_0200DD0C(param0->unk_00, Unk_ov70_0226D5CC[0], 1, 1, v2, param2); sub_0200E2A4(param0->unk_00, Unk_ov70_0226D5CC[0], (1 + (18 + 12)), 2, 3, 0, param2); - sub_02006E84(186, 90, 0, 2 * 32, 32, param2); + Graphics_LoadPalette(186, 90, 0, 2 * 32, 32, param2); } { @@ -2431,7 +2431,7 @@ static void ov70_0225F95C(SysTask *param0, void *param1) UnkStruct_ov70_0225F350 *v0 = param1; { - sub_02007130(v0->unk_14C, v0->unk_154, 4, 0, 0, v0->unk_156); + Graphics_LoadPaletteFromOpenNARC(v0->unk_14C, v0->unk_154, 4, 0, 0, v0->unk_156); } { @@ -2439,7 +2439,7 @@ static void ov70_0225F95C(SysTask *param0, void *param1) } { - sub_02006E84(sub_0207C944(), sub_0207C920(), 4, 11 * 32, 3 * 32, v0->unk_156); + Graphics_LoadPalette(sub_0207C944(), sub_0207C920(), 4, 11 * 32, 3 * 32, v0->unk_156); } SysTask_Done(param0); @@ -2449,12 +2449,12 @@ static void ov70_0225F9BC(UnkStruct_ov70_0225F350 *param0, UnkStruct_ov70_0225E4 { { if (param3 == 0) { - sub_02007130(param2, 86, 4, 0, 0, param4); + Graphics_LoadPaletteFromOpenNARC(param2, 86, 4, 0, 0, param4); } else { - sub_02007130(param2, 87, 4, 0, 0, param4); + Graphics_LoadPaletteFromOpenNARC(param2, 87, 4, 0, 0, param4); } - sub_020070E8(param2, 54, param1->unk_00, Unk_ov70_0226D5CC[1], 0, 0, 0, param4); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2, 54, param1->unk_00, Unk_ov70_0226D5CC[1], 0, 0, 0, param4); } { @@ -2472,7 +2472,7 @@ static void ov70_0225FA14(UnkStruct_ov70_0225E4EC *param0, NARC *param1, u32 par void *v0; NNSG2dScreenData *v1; - v0 = sub_020071D0(param1, param2, 0, &v1, param5); + v0 = Graphics_GetScrnDataFromOpenNARC(param1, param2, 0, &v1, param5); { int v2; @@ -3066,7 +3066,7 @@ static void ov70_02260744(UnkStruct_ov70_02260744 *param0, UnkStruct_ov70_0225E4 Window_AddFromTemplate(param1->unk_00, ¶m0->unk_0C, &Unk_ov70_0226D5A4); for (v0 = 0; v0 < 3; v0++) { - param0->unk_20[v0] = sub_020071D0(param2, 56 + v0, 0, ¶m0->unk_2C[v0], param3); + param0->unk_20[v0] = Graphics_GetScrnDataFromOpenNARC(param2, 56 + v0, 0, ¶m0->unk_2C[v0], param3); } { @@ -3134,7 +3134,7 @@ static BOOL ov70_022607D4(UnkStruct_ov70_02260744 *param0, UnkStruct_ov70_0225E4 static void ov70_02260870(UnkStruct_ov70_02260744 *param0, UnkStruct_ov70_0225E4EC *param1, UnkStruct_ov70_0225F208 *param2, const UnkStruct_ov66_0222E71C *param3, NARC *param4, u32 param5) { { - sub_0200710C(param4, 55, param1->unk_00, Unk_ov70_0226D5CC[1], 0, 0, 0, param5); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param4, 55, param1->unk_00, Unk_ov70_0226D5CC[1], 0, 0, 0, param5); } param0->unk_08 = 0; @@ -3142,7 +3142,7 @@ static void ov70_02260870(UnkStruct_ov70_02260744 *param0, UnkStruct_ov70_0225E4 { param0->unk_0A = ov66_0222E8C4(param3); - sub_020070E8(param4, 0 + param0->unk_0A, param1->unk_00, Unk_ov70_0226D5CC[3], 320, 0, 0, param5); + Graphics_LoadTilesToBgLayerFromOpenNARC(param4, 0 + param0->unk_0A, param1->unk_00, Unk_ov70_0226D5CC[3], 320, 0, 0, param5); ov70_0225FA14(param1, param4, 27 + param0->unk_0A, Unk_ov70_0226D5CC[3], 320, param5); } @@ -3167,13 +3167,13 @@ static void ov70_02260930(UnkStruct_ov70_02260744 *param0, UnkStruct_ov70_0225E4 GF_ASSERT(param2 < 3); { - sub_0200710C(param3, 55, param1->unk_00, Unk_ov70_0226D5CC[1], 0, 0, 0, param4); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param3, 55, param1->unk_00, Unk_ov70_0226D5CC[1], 0, 0, 0, param4); } param0->unk_08 = 1; param0->unk_0A = param2; - sub_020070E8(param3, 93 + param0->unk_0A, param1->unk_00, Unk_ov70_0226D5CC[3], 320, 0, 0, param4); + Graphics_LoadTilesToBgLayerFromOpenNARC(param3, 93 + param0->unk_0A, param1->unk_00, Unk_ov70_0226D5CC[3], 320, 0, 0, param4); if (param0->unk_02 == 0) { ov70_022609D4(param0, param1, 0, param3, param4); diff --git a/src/overlay071/ov71_0223B140.c b/src/overlay071/ov71_0223B140.c index 4b9ee2ba5a..c31e337ed0 100644 --- a/src/overlay071/ov71_0223B140.c +++ b/src/overlay071/ov71_0223B140.c @@ -447,26 +447,26 @@ static void ov71_0223B6A8(const u8 param0, const u8 param1, NARC *param2) if (param1) { switch (param0) { case 0: - v0 = sub_020071EC(param2, 0, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param2, 0, &v1, 25); break; case 1: - v0 = sub_020071EC(param2, 1, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param2, 1, &v1, 25); break; case 2: - v0 = sub_020071EC(param2, 2, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param2, 2, &v1, 25); break; case 3: - v0 = sub_020071EC(param2, 3, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param2, 3, &v1, 25); break; case 4: - v0 = sub_020071EC(param2, 4, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param2, 4, &v1, 25); break; case 5: - v0 = sub_020071EC(param2, 5, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param2, 5, &v1, 25); break; } } else { - v0 = sub_020071EC(param2, 6, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param2, 6, &v1, 25); } { @@ -490,22 +490,22 @@ static void ov71_0223B768(const u8 param0, NARC *param1) switch (param0) { case 10: - v0 = sub_020071EC(param1, 7, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param1, 7, &v1, 25); break; case 11: - v0 = sub_020071EC(param1, 8, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param1, 8, &v1, 25); break; case 12: - v0 = sub_020071EC(param1, 10, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param1, 10, &v1, 25); break; case 7: - v0 = sub_020071EC(param1, 11, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param1, 11, &v1, 25); break; case 8: - v0 = sub_020071EC(param1, 12, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param1, 12, &v1, 25); break; default: - v0 = sub_020071EC(param1, 9, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param1, 9, &v1, 25); break; } @@ -523,7 +523,7 @@ static void ov71_0223B820(const u8 param0, NARC *param1) u8 *v1; NNSG2dPaletteData *v2; - v0 = sub_020071EC(param1, 48, &v2, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param1, 48, &v2, 25); v1 = (u8 *)(v2->pRawData); DC_FlushRange(&v1[2 * 16 * param0], 2 * 16); @@ -659,7 +659,7 @@ static void ov71_0223B968(UnkStruct_ov71_0223B620 *param0, NARC *param1) void *v0; NNSG2dPaletteData *v1; - v0 = sub_020071EC(param1, 0, &v1, 25); + v0 = Graphics_GetPlttDataFromOpenNARC(param1, 0, &v1, 25); DC_FlushRange(v1->pRawData, 2 * 16 * 16); GXS_LoadBGPltt(v1->pRawData, 0, 2 * 16 * 16); @@ -672,7 +672,7 @@ static void ov71_0223B968(UnkStruct_ov71_0223B620 *param0, NARC *param1) void *v2; NNSG2dPaletteData *v3; - v2 = sub_020071EC(param1, 13, &v3, 25); + v2 = Graphics_GetPlttDataFromOpenNARC(param1, 13, &v3, 25); DC_FlushRange(v3->pRawData, 16 * 2 * 16); GX_LoadBGPltt(v3->pRawData, 0, 16 * 2 * 16); @@ -709,13 +709,13 @@ static void ov71_0223B968(UnkStruct_ov71_0223B620 *param0, NARC *param1) } if (v6 != -1) { - sub_02007130(param1, v6, 4, (4 * 32), (2 * 32), 25); + Graphics_LoadPaletteFromOpenNARC(param1, v6, 4, (4 * 32), (2 * 32), 25); } if (param0->unk_B4->unk_04_2 == 0) { - param0->unk_335C = sub_020071D0(param1, v5, 0, ¶m0->unk_3360, 25); + param0->unk_335C = Graphics_GetScrnDataFromOpenNARC(param1, v5, 0, ¶m0->unk_3360, 25); } else { - param0->unk_335C = sub_020071D0(param1, v5 + 1, 0, ¶m0->unk_3360, 25); + param0->unk_335C = Graphics_GetScrnDataFromOpenNARC(param1, v5 + 1, 0, ¶m0->unk_3360, 25); } } else { { @@ -727,7 +727,7 @@ static void ov71_0223B968(UnkStruct_ov71_0223B620 *param0, NARC *param1) v8 = NNS_G2dGetUnpackedBGCharacterData(param0->unk_30B8, ¶m0->unk_30BC); GF_ASSERT(v8); - param0->unk_335C = sub_020071D0(param1, 49, 0, ¶m0->unk_3360, 25); + param0->unk_335C = Graphics_GetScrnDataFromOpenNARC(param1, 49, 0, ¶m0->unk_3360, 25); ov71_0223B820(param0->unk_B4->unk_05, param1); } @@ -735,17 +735,17 @@ static void ov71_0223B968(UnkStruct_ov71_0223B620 *param0, NARC *param1) ov71_0223C390(param0); - sub_020070E8(param1, 27, param0->unk_00, 6, 0, 0, 0, 25); - sub_0200710C(param1, 35, param0->unk_00, 6, 0, 0, 0, 25); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 27, param0->unk_00, 6, 0, 0, 0, 25); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 35, param0->unk_00, 6, 0, 0, 0, 25); - sub_020070E8(param1, 28, param0->unk_00, 5, 0, 0, 0, 25); - sub_0200710C(param1, 37, param0->unk_00, 5, 0, 0, 0, 25); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 28, param0->unk_00, 5, 0, 0, 0, 25); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 37, param0->unk_00, 5, 0, 0, 0, 25); - sub_020070E8(param1, 29, param0->unk_00, 2, 0, 0, 0, 25); - sub_0200710C(param1, 38, param0->unk_00, 2, 0, 0, 0, 25); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 29, param0->unk_00, 2, 0, 0, 0, 25); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 38, param0->unk_00, 2, 0, 0, 0, 25); - sub_020070E8(param1, 30, param0->unk_00, 3, 0, 0, 0, 25); - sub_0200710C(param1, 39, param0->unk_00, 3, 0, 0, 0, 25); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 30, param0->unk_00, 3, 0, 0, 0, 25); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 39, param0->unk_00, 3, 0, 0, 0, 25); ov71_0223C4DC(param0->unk_B4->unk_68, param0->unk_B8); } @@ -799,7 +799,7 @@ static BOOL ov71_0223BC20(UnkStruct_ov71_0223B620 *param0) case 2: if (param0->unk_30C0 == 0) { param0->unk_30C0 = 1; - sub_02006E60(51, 36, param0->unk_00, 6, 0, 0, 0, 25); + Graphics_LoadTilemapToBgLayer(51, 36, param0->unk_00, 6, 0, 0, 0, 25); ov71_0223CD44(param0->unk_04, 0, 6); ov71_0223C3E8(param0); Bg_ClearTilemap(param0->unk_00, 7); @@ -807,7 +807,7 @@ static BOOL ov71_0223BC20(UnkStruct_ov71_0223B620 *param0) ov71_0223C530(param0->unk_00, 7, param0->unk_B8); } else { param0->unk_30C0 = 0; - sub_02006E60(51, 35, param0->unk_00, 6, 0, 0, 0, 25); + Graphics_LoadTilemapToBgLayer(51, 35, param0->unk_00, 6, 0, 0, 0, 25); ov71_0223CD44(param0->unk_04, 7, 10); Bg_ClearTilemap(param0->unk_00, 7); ov71_0223C390(param0); diff --git a/src/overlay072/ov72_0223D7A0.c b/src/overlay072/ov72_0223D7A0.c index af0aa35fae..f8ac7d3d66 100644 --- a/src/overlay072/ov72_0223D7A0.c +++ b/src/overlay072/ov72_0223D7A0.c @@ -442,15 +442,15 @@ static void ov72_0223DCA8(UnkStruct_ov72_0223DB98 *param0, NARC *param1) { BgConfig *v0 = param0->unk_00; - sub_02007130(param1, 0, 0, 0, 16 * 2 * 3, 39); - sub_02007130(param1, 2, 4, 0, 16 * 2 * 2, 39); + Graphics_LoadPaletteFromOpenNARC(param1, 0, 0, 0, 16 * 2 * 3, 39); + Graphics_LoadPaletteFromOpenNARC(param1, 2, 4, 0, 16 * 2 * 2, 39); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 39); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 39); Bg_ClearTilesRange(1, 32, 0, 39); - sub_020070E8(param1, 3, v0, 2, 0, 32 * 8 * 0x20, 1, 39); - sub_0200710C(param1, 5, v0, 2, 0, 32 * 24 * 2, 1, 39); - sub_020070E8(param1, 4, v0, 5, 0, 32 * 8 * 0x20, 1, 39); - sub_0200710C(param1, 6, v0, 5, 0, 32 * 24 * 2, 1, 39); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 3, v0, 2, 0, 32 * 8 * 0x20, 1, 39); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 5, v0, 2, 0, 32 * 24 * 2, 1, 39); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 4, v0, 5, 0, 32 * 8 * 0x20, 1, 39); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 6, v0, 5, 0, 32 * 24 * 2, 1, 39); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_0C), 39); sub_0200DAA4(v0, 0, 1 + (18 + 12), 11, 0, 39); } diff --git a/src/overlay073/ov73_021D0D80.c b/src/overlay073/ov73_021D0D80.c index bccd5fd790..1502ad95ca 100644 --- a/src/overlay073/ov73_021D0D80.c +++ b/src/overlay073/ov73_021D0D80.c @@ -905,9 +905,9 @@ static BOOL ov73_021D1784(UnkStruct_ov73_021D1058 *param0, u32 param1, int param static void ov73_021D1930(UnkStruct_ov73_021D1058 *param0) { - sub_02006E3C(125, 0, param0->unk_18, 3, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(125, 0, param0->unk_18, 3, 0, 0, 0, param0->unk_00); Bg_ClearTilesRange(0, 32, 0, param0->unk_00); - sub_02006E3C(125, 24, param0->unk_18, 7, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(125, 24, param0->unk_18, 7, 0, 0, 0, param0->unk_00); { int v0, v1; @@ -923,8 +923,8 @@ static void ov73_021D1930(UnkStruct_ov73_021D1058 *param0) v1 = 26; } - sub_02006E84(125, v0, 0, 0 * (2 * 16), (2 * 16) * 3, param0->unk_00); - sub_02006E84(125, v1, 4, 0 * (2 * 16), (2 * 16) * 5, param0->unk_00); + Graphics_LoadPalette(125, v0, 0, 0 * (2 * 16), (2 * 16) * 3, param0->unk_00); + Graphics_LoadPalette(125, v1, 4, 0 * (2 * 16), (2 * 16) * 5, param0->unk_00); } ov73_021D19DC(param0); @@ -943,7 +943,7 @@ static void ov73_021D19DC(UnkStruct_ov73_021D1058 *param0) return; } - sub_02006E60(125, v0[param0->unk_88], param0->unk_18, 3, 0, 0, 0, param0->unk_00); + Graphics_LoadTilemapToBgLayer(125, v0[param0->unk_88], param0->unk_18, 3, 0, 0, 0, param0->unk_00); } static void ov73_021D1A20(UnkStruct_ov73_021D1058 *param0) @@ -963,16 +963,16 @@ static void ov73_021D1A20(UnkStruct_ov73_021D1058 *param0) }; if ((param0->unk_89 != 0) && (param0->unk_89 < 12)) { - sub_02006E3C(125, v0[param0->unk_89][0], param0->unk_18, 1, 0, 0, 0, param0->unk_00); - sub_02006E84(125, v0[param0->unk_89][1], 0, 7 * (2 * 16), (2 * 16), param0->unk_00); - sub_02006E60(125, 23, param0->unk_18, 1, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(125, v0[param0->unk_89][0], param0->unk_18, 1, 0, 0, 0, param0->unk_00); + Graphics_LoadPalette(125, v0[param0->unk_89][1], 0, 7 * (2 * 16), (2 * 16), param0->unk_00); + Graphics_LoadTilemapToBgLayer(125, 23, param0->unk_18, 1, 0, 0, 0, param0->unk_00); ov73_021D14DC(param0, 1, 7); } if ((param0->unk_8A != 0) && (param0->unk_8A < 12)) { - sub_02006E3C(125, v0[param0->unk_8A][0], param0->unk_18, 2, 0, 0, 0, param0->unk_00); - sub_02006E84(125, v0[param0->unk_8A][1], 0, 8 * (2 * 16), (2 * 16), param0->unk_00); - sub_02006E60(125, 23, param0->unk_18, 2, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(125, v0[param0->unk_8A][0], param0->unk_18, 2, 0, 0, 0, param0->unk_00); + Graphics_LoadPalette(125, v0[param0->unk_8A][1], 0, 8 * (2 * 16), (2 * 16), param0->unk_00); + Graphics_LoadTilemapToBgLayer(125, 23, param0->unk_18, 2, 0, 0, 0, param0->unk_00); ov73_021D14DC(param0, 2, 8); } } @@ -985,7 +985,7 @@ static void ov73_021D1B14(UnkStruct_ov73_021D1058 *param0) return; } - sub_02006E60(125, v0[param0->unk_8B], param0->unk_18, 7, 0, 0, 0, param0->unk_00); + Graphics_LoadTilemapToBgLayer(125, v0[param0->unk_8B], param0->unk_18, 7, 0, 0, 0, param0->unk_00); if (param0->unk_8B == 1) { ov73_021D14DC(param0, 7, 3); @@ -1149,12 +1149,12 @@ static void ov73_021D1B80(UnkStruct_ov73_021D1058 *param0) static void ov73_021D1CE0(UnkStruct_ov73_021D1058 *param0) { - sub_02006E60(125, 40, param0->unk_18, 6, 0, 0, 0, param0->unk_00); + Graphics_LoadTilemapToBgLayer(125, 40, param0->unk_18, 6, 0, 0, 0, param0->unk_00); ov73_021D14DC(param0, 6, 9); - sub_02006E84(125, 41, 4, 7 * (2 * 16), (2 * 16) * 3, param0->unk_00); + Graphics_LoadPalette(125, 41, 4, 7 * (2 * 16), (2 * 16) * 3, param0->unk_00); Bg_ClearTilesRange(6, 32, 0, param0->unk_00); - sub_02006E3C(125, 32, param0->unk_18, 6, 0x20, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(125, 32, param0->unk_18, 6, 0x20, 0, 0, param0->unk_00); } static BOOL ov73_021D1D44(UnkStruct_ov73_021D1058 *param0, int param1, int param2) @@ -1216,7 +1216,7 @@ static void ov73_021D1DE8(UnkStruct_ov73_021D1058 *param0) { int v0[] = { 9, 10, 11, 12 }; - sub_02006E3C(125, v0[param0->unk_8C], param0->unk_18, 1, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(125, v0[param0->unk_8C], param0->unk_18, 1, 0, 0, 0, param0->unk_00); } } else { if (param0->unk_8F) { @@ -1231,7 +1231,7 @@ static void ov73_021D1DE8(UnkStruct_ov73_021D1058 *param0) { int v1[] = { 14, 15, 16, 17 }; - sub_02006E3C(125, v1[param0->unk_8E], param0->unk_18, 2, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(125, v1[param0->unk_8E], param0->unk_18, 2, 0, 0, 0, param0->unk_00); } } } @@ -1274,7 +1274,7 @@ static BOOL ov73_021D1F18(UnkStruct_ov73_021D1058 *param0) if (v1 == 0xff) { v0 = 1; } else { - sub_02006E3C(125, v1, param0->unk_18, 1, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(125, v1, param0->unk_18, 1, 0, 0, 0, param0->unk_00); } return v0; @@ -1766,7 +1766,7 @@ static BOOL ov73_021D2318(UnkStruct_ov73_021D1058 *param0) param0->unk_0C = 50; } else { - sub_02006E3C(125, v3[param0->unk_94[0]], param0->unk_18, 6, 0x20, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(125, v3[param0->unk_94[0]], param0->unk_18, 6, 0x20, 0, 0, param0->unk_00); param0->unk_94[0]++; param0->unk_94[1] = 4; } diff --git a/src/overlay073/ov73_021D3250.c b/src/overlay073/ov73_021D3250.c index 26fd07f72c..5b68cbb488 100644 --- a/src/overlay073/ov73_021D3250.c +++ b/src/overlay073/ov73_021D3250.c @@ -239,8 +239,8 @@ static void ov73_021D342C (UnkStruct_ov73_021D342C * param0) v4 = 4; Bg_InitFromTemplate(param0->unk_04, v2, &v6, 0); - sub_02006E3C(136, v3, param0->unk_04, v2, 0, 0, 0, param0->unk_00); - sub_02006E60(136, v4, param0->unk_04, v2, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(136, v3, param0->unk_04, v2, 0, 0, 0, param0->unk_00); + Graphics_LoadTilemapToBgLayer(136, v4, param0->unk_04, v2, 0, 0, 0, param0->unk_00); } { BgTemplate v7 = { @@ -264,8 +264,8 @@ static void ov73_021D342C (UnkStruct_ov73_021D342C * param0) v4 = 5; Bg_InitFromTemplate(param0->unk_04, v2, &v7, 0); - sub_02006E3C(136, v3, param0->unk_04, v2, 0, 0, 0, param0->unk_00); - sub_02006E60(136, v4, param0->unk_04, v2, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(136, v3, param0->unk_04, v2, 0, 0, 0, param0->unk_00); + Graphics_LoadTilemapToBgLayer(136, v4, param0->unk_04, v2, 0, 0, 0, param0->unk_00); } { BgTemplate v8 = { @@ -289,12 +289,12 @@ static void ov73_021D342C (UnkStruct_ov73_021D342C * param0) v4 = 7; Bg_InitFromTemplate(param0->unk_04, v2, &v8, 0); - sub_02006E3C(136, v3, param0->unk_04, v2, 0, 0, 0, param0->unk_00); - sub_02006E60(136, v4, param0->unk_04, v2, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(136, v3, param0->unk_04, v2, 0, 0, 0, param0->unk_00); + Graphics_LoadTilemapToBgLayer(136, v4, param0->unk_04, v2, 0, 0, 0, param0->unk_00); } } - sub_02006E84(136, 6, 0, 0, 0, param0->unk_00); - sub_02006E9C(136, 9, 0, 0x20 * 2, 0x20 * 2, 0x20 * 14, param0->unk_00); + Graphics_LoadPalette(136, 6, 0, 0, 0, param0->unk_00); + Graphics_LoadPaletteWithSrcOffset(136, 9, 0, 0x20 * 2, 0x20 * 2, 0x20 * 14, param0->unk_00); Font_LoadTextPalette(0, 1 * (2 * 16), param0->unk_00); Bg_MaskPalette(0, 0x0); Bg_MaskPalette(4, 0x0); diff --git a/src/overlay076/ov76_0223B870.c b/src/overlay076/ov76_0223B870.c index dd9c993617..4eb34f5e68 100644 --- a/src/overlay076/ov76_0223B870.c +++ b/src/overlay076/ov76_0223B870.c @@ -1109,16 +1109,16 @@ void ov76_0223CE84(UnkStruct_ov76_0223DE00 *param0, NARC *param1) int v3 = 288; int v4 = 2; - sub_020070E8(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); - sub_0200710C(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); PaletteData_LoadBufferFromFileStart(param0->unk_D4.unk_14, v0, v3, 53, 0, 0x20 * 2, 0); v1 = 269; v2 = 285; v4 = 3; - sub_020070E8(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); - sub_0200710C(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); } void ov76_0223CF24(UnkStruct_ov76_0223DE00 *param0, NARC *param1) @@ -1129,8 +1129,8 @@ void ov76_0223CF24(UnkStruct_ov76_0223DE00 *param0, NARC *param1) int v3 = 287; int v4 = 5; - sub_020070E8(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); - sub_0200710C(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); PaletteData_LoadBufferFromFileStart(param0->unk_D4.unk_14, v0, v3, 53, 1, 0x20 * 2, 0); } @@ -1142,8 +1142,8 @@ void ov76_0223CF88(UnkStruct_ov76_0223DE00 *param0, NARC *param1) int v3 = 287; int v4 = 7; - sub_020070E8(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); - sub_0200710C(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, v1, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, v2, param0->unk_D4.unk_10, v4, 0, 0, 1, 53); PaletteData_LoadBufferFromFileStart(param0->unk_D4.unk_14, v0, v3, 53, 1, 0x20 * 2, 0); } diff --git a/src/overlay077/ov77_021D0D80.c b/src/overlay077/ov77_021D0D80.c index c41e3da837..80ba12924b 100644 --- a/src/overlay077/ov77_021D0D80.c +++ b/src/overlay077/ov77_021D0D80.c @@ -948,8 +948,8 @@ static void ov77_021D1CC0(BgConfig *param0, int param1) Bg_InitFromTemplate(param0, 5, &v0, 0); } - sub_02006E3C(48, 23, param0, 5, 0, 0, 0, param1); - sub_02006E60(48, 25, param0, 5, 0, 0, 0, param1); + Graphics_LoadTilesToBgLayer(48, 23, param0, 5, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayer(48, 25, param0, 5, 0, 0, 0, param1); G2_BlendNone(); G2S_SetBlendAlpha(GX_BLEND_PLANEMASK_BG1, GX_BLEND_PLANEMASK_BG3, 10, 10); @@ -981,7 +981,7 @@ static void ov77_021D1D48(BgConfig *param0, int param1) Bg_InitFromTemplate(param0, 4, &v0, 0); } - sub_02006E60(48, 22, param0, 4, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayer(48, 22, param0, 4, 0, 0, 0, param1); G2S_SetBG0Priority(0); G2S_SetBG1Priority(1); @@ -1216,16 +1216,16 @@ static void ov77_021D2214(BgConfig *param0, int param1, UnkStruct_ov77_021D1568 { int v0, v1; - sub_02006E3C(48, 23, param0, 7, 0, 0, 0, param1); - sub_02006E3C(48, 26, param0, 3, 0, 0, 0, param1); - sub_02006E60(48, 24, param0, 7, 0, 0, 0, param1); - sub_02006E60(48, 27, param0, 3, 0, 0, 0, param1); + Graphics_LoadTilesToBgLayer(48, 23, param0, 7, 0, 0, 0, param1); + Graphics_LoadTilesToBgLayer(48, 26, param0, 3, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayer(48, 24, param0, 7, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayer(48, 27, param0, 3, 0, 0, 0, param1); v0 = 7; v1 = 6; - sub_02006E84(48, v0, 4, 0, 0, param1); - sub_02006E84(48, v1, 0, 0, 0, param1); + Graphics_LoadPalette(48, v0, 4, 0, 0, param1); + Graphics_LoadPalette(48, v1, 0, 0, 0, param1); } { int v2, v3; @@ -1233,19 +1233,19 @@ static void ov77_021D2214(BgConfig *param0, int param1, UnkStruct_ov77_021D1568 v2 = 12; v3 = 11; - sub_02006E3C(48, v2, param0, 6, 0, 0, 0, param1); - sub_02006E84(48, v3, 6, 0x4000, 0, param1); - sub_02006E60(48, 22, param0, 6, 0, 0, 0, param1); + Graphics_LoadTilesToBgLayer(48, v2, param0, 6, 0, 0, 0, param1); + Graphics_LoadPalette(48, v3, 6, 0x4000, 0, param1); + Graphics_LoadTilemapToBgLayer(48, 22, param0, 6, 0, 0, 0, param1); } { - sub_02006E3C(128, 14, param0, 5, 0, 0, 0, param1); - sub_02006E84(128, 13, 6, 0x2000, 0, param1); - sub_02006E60(128, 12, param0, 5, 0, 0, 0, param1); + Graphics_LoadTilesToBgLayer(128, 14, param0, 5, 0, 0, 0, param1); + Graphics_LoadPalette(128, 13, 6, 0x2000, 0, param1); + Graphics_LoadTilemapToBgLayer(128, 12, param0, 5, 0, 0, 0, param1); } { - sub_02006E3C(48, 5, param0, 1, 0, 0, 0, param1); - sub_02006E60(48, 3, param0, 1, 0, 0, 0, param1); - sub_02006E84(48, 4, 0, 32 * 1, 32 * 3, param1); + Graphics_LoadTilesToBgLayer(48, 5, param0, 1, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayer(48, 3, param0, 1, 0, 0, 0, param1); + Graphics_LoadPalette(48, 4, 0, 32 * 1, 32 * 3, param1); } Bg_MaskPalette(0, 0x0); diff --git a/src/overlay077/ov77_021D25B0.c b/src/overlay077/ov77_021D25B0.c index a7bd436e79..bbf5058cb8 100644 --- a/src/overlay077/ov77_021D25B0.c +++ b/src/overlay077/ov77_021D25B0.c @@ -1067,25 +1067,25 @@ static void ov77_021D2F0C(UnkStruct_ov77_021D2E9C *param0) static void ov77_021D2F38(UnkStruct_ov77_021D2F38 *param0) { - sub_02006E3C(128, 16, param0->unk_0C, 2, 0, 0, 0, 76); - sub_02006E3C(128, 16, param0->unk_0C, 6, 0, 0, 0, 76); - sub_02006E60(128, 17, param0->unk_0C, 2, 0, 0, 0, 76); - sub_02006E60(128, 18, param0->unk_0C, 6, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayer(128, 16, param0->unk_0C, 2, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayer(128, 16, param0->unk_0C, 6, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayer(128, 17, param0->unk_0C, 2, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayer(128, 18, param0->unk_0C, 6, 0, 0, 0, 76); - sub_02006E84(128, 15, 0, 0, 0, 76); - sub_02006E84(128, 15, 4, 0, 0, 76); + Graphics_LoadPalette(128, 15, 0, 0, 0, 76); + Graphics_LoadPalette(128, 15, 4, 0, 0, 76); - sub_02006E3C(48, 15, param0->unk_0C, 1, 0, 0, 0, 76); - sub_02006E60(48, 13, param0->unk_0C, 1, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayer(48, 15, param0->unk_0C, 1, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayer(48, 13, param0->unk_0C, 1, 0, 0, 0, 76); - sub_02006E84(48, 14, 0, 0, 2 * 16 * 1, 76); + Graphics_LoadPalette(48, 14, 0, 0, 2 * 16 * 1, 76); - sub_02006E60(128, 19, param0->unk_0C, 3, 0, 0, 0, 76); - sub_02006E60(128, 19, param0->unk_0C, 7, 0, 0, 0, 76); - sub_02006E3C(128, 114, param0->unk_0C, 5, 0, 0, 0, 76); - sub_02006E60(128, 113, param0->unk_0C, 5, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayer(128, 19, param0->unk_0C, 3, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayer(128, 19, param0->unk_0C, 7, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayer(128, 114, param0->unk_0C, 5, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayer(128, 113, param0->unk_0C, 5, 0, 0, 0, 76); - sub_02006E84(128, 115, 4, 0, 2 * 16 * 1, 76); + Graphics_LoadPalette(128, 115, 4, 0, 2 * 16 * 1, 76); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG2, 0); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG2, 0); @@ -1477,41 +1477,41 @@ static void ov77_021D37C0(UnkStruct_ov77_021D37C0 *param0) v1 = NARC_ctor(NARC_INDEX_DEMO__TITLE__OP_DEMO, 76); { - sub_02007148(v1, 96, 0, 0x20 * 0xc, 0x20 * 0xc, 0x20 * 2, 76); - sub_020070E8(v1, 95, param0->unk_10, 3, 0, 0, 0, 76); - sub_0200710C(v1, 12, param0->unk_10, 3, 0, 0, 0, 76); + Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(v1, 96, 0, 0x20 * 0xc, 0x20 * 0xc, 0x20 * 2, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 95, param0->unk_10, 3, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 12, param0->unk_10, 3, 0, 0, 0, 76); - sub_02007148(v1, 13, 0, 0x20 * 0xe, 0x20 * 0xe, 0x20 * 2, 76); - sub_020070E8(v1, 14, param0->unk_10, 2, 0, 0, 0, 76); - sub_0200710C(v1, 12, param0->unk_10, 2, 0, 0, 0, 76); + Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(v1, 13, 0, 0x20 * 0xe, 0x20 * 0xe, 0x20 * 2, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 14, param0->unk_10, 2, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 12, param0->unk_10, 2, 0, 0, 0, 76); { NARC *v2; v2 = NARC_ctor(NARC_INDEX_DATA__WEATHER_SYS, 76); - sub_020070E8(v2, 56, param0->unk_10, 1, 0, 0, 0, 76); - sub_0200710C(v2, 57, param0->unk_10, 1, 0, 0, 0, 76); - sub_0200710C(v2, 57, param0->unk_10, 1, 32 * 32, 0, 0, 76); - sub_02007130(v2, 55, 0, 0x20 * 0, 0x20, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v2, 56, param0->unk_10, 1, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v2, 57, param0->unk_10, 1, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v2, 57, param0->unk_10, 1, 32 * 32, 0, 0, 76); + Graphics_LoadPaletteFromOpenNARC(v2, 55, 0, 0x20 * 0, 0x20, 76); NARC_dtor(v2); } } { - sub_02007130(v1, 61, 4, 0, 0, 76); - sub_020070E8(v1, 59, param0->unk_10, 5, 0, 0, 0, 76); - sub_0200710C(v1, 63, param0->unk_10, 5, 0, 0, 0, 76); - sub_020070E8(v1, 58, param0->unk_10, 6, 0, 0, 0, 76); - sub_0200710C(v1, 62, param0->unk_10, 6, 0, 0, 0, 76); - sub_020070E8(v1, 60, param0->unk_10, 7, 0, 0, 0, 76); - sub_0200710C(v1, 64, param0->unk_10, 7, 0, 0, 0, 76); + Graphics_LoadPaletteFromOpenNARC(v1, 61, 4, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 59, param0->unk_10, 5, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 63, param0->unk_10, 5, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 58, param0->unk_10, 6, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 62, param0->unk_10, 6, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 60, param0->unk_10, 7, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 64, param0->unk_10, 7, 0, 0, 0, 76); } { - sub_020070E8(v1, 14, param0->unk_10, 4, 0, 0, 0, 76); - sub_0200710C(v1, 12, param0->unk_10, 4, 0, 0, 0, 76); - sub_02007148(v1, 13, 4, 0x20 * 0xe, 0x20 * 0xe, 0x20 * 2, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 14, param0->unk_10, 4, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 12, param0->unk_10, 4, 0, 0, 0, 76); + Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(v1, 13, 4, 0x20 * 0xe, 0x20 * 0xe, 0x20 * 2, 76); } ov77_021D5564(param0->unk_14); @@ -1544,14 +1544,14 @@ static void ov77_021D3A10(UnkStruct_ov77_021D2E9C *param0, UnkStruct_ov77_021D37 v1 = NARC_ctor(NARC_INDEX_DEMO__TITLE__OP_DEMO, 76); - sub_02007130(v1, 68, 0, 0, 0, 76); + Graphics_LoadPaletteFromOpenNARC(v1, 68, 0, 0, 0, 76); - sub_020070E8(v1, 66, param1->unk_10, 1, 0, 0, 0, 76); - sub_0200710C(v1, 70, param1->unk_10, 1, 0, 0, 0, 76); - sub_020070E8(v1, 65, param1->unk_10, 2, 0, 0, 0, 76); - sub_0200710C(v1, 69, param1->unk_10, 2, 0, 0, 0, 76); - sub_020070E8(v1, 67, param1->unk_10, 3, 0, 0, 0, 76); - sub_0200710C(v1, 71, param1->unk_10, 3, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 66, param1->unk_10, 1, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 70, param1->unk_10, 1, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 65, param1->unk_10, 2, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 69, param1->unk_10, 2, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 67, param1->unk_10, 3, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 71, param1->unk_10, 3, 0, 0, 0, 76); MI_CpuClear16((void *)HW_BG_PLTT, 2); MI_CpuClear16((void *)HW_DB_BG_PLTT, 2); @@ -1575,28 +1575,28 @@ static void ov77_021D3B5C(UnkStruct_ov77_021D2E9C *param0, UnkStruct_ov77_021D37 v1 = NARC_ctor(NARC_INDEX_DEMO__TITLE__OP_DEMO, 76); - sub_02007130(v1, 72, 0, 0, 0, 76); - sub_02007130(v1, 72, 4, 0, 0, 76); + Graphics_LoadPaletteFromOpenNARC(v1, 72, 0, 0, 0, 76); + Graphics_LoadPaletteFromOpenNARC(v1, 72, 4, 0, 0, 76); param1->unk_240 = Heap_AllocFromHeap(76, 0x200); MI_CpuCopy16((void *)HW_BG_PLTT, param1->unk_240, 0x200); MI_CpuClear16(param1->unk_240, 2); - sub_020070E8(v1, 73, param1->unk_10, 1, 0, 0, 0, 76); - sub_0200710C(v1, 76, param1->unk_10, 1, 0, 0, 0, 76); - sub_020070E8(v1, 73, param1->unk_10, 5, 0, 0, 0, 76); - sub_0200710C(v1, 76, param1->unk_10, 5, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 73, param1->unk_10, 1, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 76, param1->unk_10, 1, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 73, param1->unk_10, 5, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 76, param1->unk_10, 5, 0, 0, 0, 76); - sub_020070E8(v1, 74, param1->unk_10, 2, 0, 0, 0, 76); - sub_0200710C(v1, 77, param1->unk_10, 2, 0, 0, 0, 76); - sub_020070E8(v1, 74, param1->unk_10, 6, 0, 0, 0, 76); - sub_0200710C(v1, 77, param1->unk_10, 6, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 74, param1->unk_10, 2, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 77, param1->unk_10, 2, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 74, param1->unk_10, 6, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 77, param1->unk_10, 6, 0, 0, 0, 76); - sub_020070E8(v1, 75, param1->unk_10, 3, 0, 0, 0, 76); - sub_0200710C(v1, 78, param1->unk_10, 3, 0, 0, 0, 76); - sub_020070E8(v1, 75, param1->unk_10, 7, 0, 0, 0, 76); - sub_0200710C(v1, 78, param1->unk_10, 7, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 75, param1->unk_10, 3, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 78, param1->unk_10, 3, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 75, param1->unk_10, 7, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 78, param1->unk_10, 7, 0, 0, 0, 76); MI_CpuClear16((void *)HW_BG_PLTT, 2); MI_CpuClear16((void *)HW_DB_BG_PLTT, 2); @@ -1620,10 +1620,10 @@ static void ov77_021D3D4C(UnkStruct_ov77_021D2E9C *param0, UnkStruct_ov77_021D37 v1 = NARC_ctor(NARC_INDEX_DEMO__TITLE__OP_DEMO, 76); - sub_020070E8(v1, 79, param1->unk_10, 0, 0, 0, 0, 76); - sub_0200710C(v1, 80, param1->unk_10, 0, 0, 0, 0, 76); - sub_020070E8(v1, 81, param1->unk_10, 4, 0, 0, 0, 76); - sub_0200710C(v1, 82, param1->unk_10, 4, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 79, param1->unk_10, 0, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 80, param1->unk_10, 0, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 81, param1->unk_10, 4, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 82, param1->unk_10, 4, 0, 0, 0, 76); NARC_dtor(v1); } @@ -2532,9 +2532,9 @@ static void ov77_021D52C8(UnkStruct_ov77_021D2E9C *param0) static void ov77_021D5308(UnkStruct_ov77_021D5308 *param0) { - sub_02006E84(128, 99, 0, 0, 0, 76); - sub_02006E3C(128, 98, param0->unk_08, 2, 0, 0, 0, 76); - sub_02006E60(128, 97, param0->unk_08, 2, 0, 0, 0, 76); + Graphics_LoadPalette(128, 99, 0, 0, 0, 76); + Graphics_LoadTilesToBgLayer(128, 98, param0->unk_08, 2, 0, 0, 0, 76); + Graphics_LoadTilemapToBgLayer(128, 97, param0->unk_08, 2, 0, 0, 0, 76); GXLayers_DisableEngineALayers(); GXLayers_EngineASetLayers(0); diff --git a/src/overlay081/ov81_021D0D80.c b/src/overlay081/ov81_021D0D80.c index a88c10d49e..249928ee08 100644 --- a/src/overlay081/ov81_021D0D80.c +++ b/src/overlay081/ov81_021D0D80.c @@ -292,13 +292,13 @@ static void ov81_021D1050(UnkStruct_ov81_021D1610 *param0) v1 = NARC_ctor(NARC_INDEX_GRAPHIC__F_NOTE_GRA, 42); if (TrainerInfo_Gender(param0->unk_48) == 0) { - sub_020070E8(v1, 2, param0->unk_00, 2, 0, 0, 0, 42); - sub_0200710C(v1, 0, param0->unk_00, 2, 0, 0, 0, 42); - sub_02007130(v1, 4, 0, 0, 0, 42); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 2, param0->unk_00, 2, 0, 0, 0, 42); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 0, param0->unk_00, 2, 0, 0, 0, 42); + Graphics_LoadPaletteFromOpenNARC(v1, 4, 0, 0, 0, 42); } else { - sub_020070E8(v1, 3, param0->unk_00, 2, 0, 0, 0, 42); - sub_0200710C(v1, 1, param0->unk_00, 2, 0, 0, 0, 42); - sub_02007130(v1, 5, 0, 0, 0, 42); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 3, param0->unk_00, 2, 0, 0, 0, 42); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 1, param0->unk_00, 2, 0, 0, 0, 42); + Graphics_LoadPaletteFromOpenNARC(v1, 5, 0, 0, 0, 42); } NARC_dtor(v1); diff --git a/src/overlay083/ov83_0223D6A8.c b/src/overlay083/ov83_0223D6A8.c index cfe68ba9c0..793c3c5b87 100644 --- a/src/overlay083/ov83_0223D6A8.c +++ b/src/overlay083/ov83_0223D6A8.c @@ -131,7 +131,7 @@ static UnkStruct_02015128 *ov83_0223D6BC(UnkStruct_02015064 *param0, u32 param1, NNSG2dCharacterData *v2; UnkStruct_02015128 *v3; - v1 = sub_020071B4(param3, param1, 0, &v2, param2); + v1 = Graphics_GetCharDataFromOpenNARC(param3, param1, 0, &v2, param2); v0.unk_00 = param0; v0.unk_04 = v2; v3 = sub_02015128(&v0); @@ -148,7 +148,7 @@ static UnkStruct_020151A4 *ov83_0223D6EC(UnkStruct_02015064 *param0, u32 param1, NNSG2dPaletteData *v2; UnkStruct_020151A4 *v3; - v1 = sub_020071EC(param3, param1, &v2, param2); + v1 = Graphics_GetPlttDataFromOpenNARC(param3, param1, &v2, param2); v0.unk_00 = param0; v0.unk_04 = v2; v0.unk_08 = 1; @@ -648,8 +648,8 @@ static void ov83_0223E15C(UnkStruct_ov83_0223E138 *param0, u32 param1, NARC *par { int v0; - sub_02007130(param2, 1, 4, 2 * 32, 2 * 32, param1); - sub_020070E8(param2, 0, param0->unk_04, 5, 0, 0, 0, param1); + Graphics_LoadPaletteFromOpenNARC(param2, 1, 4, 2 * 32, 2 * 32, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2, 0, param0->unk_04, 5, 0, 0, 0, param1); if (param0->unk_14 == 1) { v0 = 2; @@ -657,12 +657,12 @@ static void ov83_0223E15C(UnkStruct_ov83_0223E138 *param0, u32 param1, NARC *par v0 = 3; } - param0->unk_20 = sub_020071D0(param2, v0, 0, ¶m0->unk_24, param1); + param0->unk_20 = Graphics_GetScrnDataFromOpenNARC(param2, v0, 0, ¶m0->unk_24, param1); Bg_LoadToTilemapRect(param0->unk_04, 5, param0->unk_24->rawData, 0, 0, param0->unk_24->screenWidth / 8, param0->unk_24->screenHeight / 8); Bg_ChangeTilemapRectPalette(param0->unk_04, 5, 0, 0, param0->unk_24->screenWidth / 8, param0->unk_24->screenHeight / 8, 2 + 1); - param0->unk_28 = sub_020071D0(param2, 4, 0, ¶m0->unk_2C, param1); + param0->unk_28 = Graphics_GetScrnDataFromOpenNARC(param2, 4, 0, ¶m0->unk_2C, param1); Bg_ScheduleTilemapTransfer(param0->unk_04, 5); } @@ -1085,10 +1085,10 @@ static void ov83_0223E844(UnkStruct_ov83_0223E824 *param0, u32 param1, NARC *par void *v0; NNSG2dScreenData *v1; - sub_02007130(param2, 6, 0, 4 * 32, 1 * 32, param1); - sub_020070E8(param2, 5, param0->unk_04, 1, 0, 0, 0, param1); + Graphics_LoadPaletteFromOpenNARC(param2, 6, 0, 4 * 32, 1 * 32, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(param2, 5, param0->unk_04, 1, 0, 0, 0, param1); - v0 = sub_020071D0(param2, 7, 0, &v1, param1); + v0 = Graphics_GetScrnDataFromOpenNARC(param2, 7, 0, &v1, param1); Bg_LoadToTilemapRect(param0->unk_04, 1, v1->rawData, 0, 0, v1->screenWidth / 8, v1->screenHeight / 8); Bg_ChangeTilemapRectPalette(param0->unk_04, 1, 0, 0, v1->screenWidth / 8, v1->screenHeight / 8, 4); diff --git a/src/overlay084/ov84_0223B5A0.c b/src/overlay084/ov84_0223B5A0.c index ab6f9a7e11..db1425ae4c 100644 --- a/src/overlay084/ov84_0223B5A0.c +++ b/src/overlay084/ov84_0223B5A0.c @@ -816,21 +816,21 @@ static void ov84_0223BC1C(UnkStruct_ov84_0223B5A0 *param0) { param0->unk_D4 = NARC_ctor(NARC_INDEX_GRAPHIC__PL_BAG_GRA, 6); - sub_020070E8(param0->unk_D4, 11, param0->unk_00, 1, 0, 0, 0, 6); - sub_0200710C(param0->unk_D4, 14, param0->unk_00, 1, 0, 0, 0, 6); - sub_0200710C(param0->unk_D4, 13, param0->unk_00, 3, 0, 0, 0, 6); - sub_02007130(param0->unk_D4, 12, 0, 0, 0, 6); - sub_02007130(param0->unk_D4, 22, 0, 16 * 13 * 2, 32, 6); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_D4, 11, param0->unk_00, 1, 0, 0, 0, 6); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_D4, 14, param0->unk_00, 1, 0, 0, 0, 6); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_D4, 13, param0->unk_00, 3, 0, 0, 0, 6); + Graphics_LoadPaletteFromOpenNARC(param0->unk_D4, 12, 0, 0, 0, 6); + Graphics_LoadPaletteFromOpenNARC(param0->unk_D4, 22, 0, 16 * 13 * 2, 32, 6); Font_LoadScreenIndicatorsPalette(0, 11 * 32, 6); sub_0200DAA4(param0->unk_00, 0, 1024 - 9, 14, 0, 6); sub_0200DD0C(param0->unk_00, 0, 1024 - 9 - (18 + 12), 12, Options_Frame(param0->unk_D0), 6); - sub_020070E8(param0->unk_D4, 15, param0->unk_00, 5, 0, 0, 0, 6); - sub_02007130(param0->unk_D4, 16, 4, 0, 0, 6); - sub_0200710C(param0->unk_D4, 17, param0->unk_00, 5, 0, 0, 0, 6); - sub_020070E8(param0->unk_D4, 32, param0->unk_00, 7, 0, 0, 0, 6); - sub_0200710C(param0->unk_D4, 33, param0->unk_00, 7, 0, 0, 0, 6); - sub_020070E8(param0->unk_D4, 19, param0->unk_00, 4, 0, 0, 0, 6); - sub_02007130(param0->unk_D4, 18, 4, 16 * 2 * 2, 0x20 * 2, 6); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_D4, 15, param0->unk_00, 5, 0, 0, 0, 6); + Graphics_LoadPaletteFromOpenNARC(param0->unk_D4, 16, 4, 0, 0, 6); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_D4, 17, param0->unk_00, 5, 0, 0, 0, 6); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_D4, 32, param0->unk_00, 7, 0, 0, 0, 6); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_D4, 33, param0->unk_00, 7, 0, 0, 0, 6); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_D4, 19, param0->unk_00, 4, 0, 0, 0, 6); + Graphics_LoadPaletteFromOpenNARC(param0->unk_D4, 18, 4, 16 * 2 * 2, 0x20 * 2, 6); } static void ov84_0223BDB4(UnkStruct_ov84_0223B5A0 *param0) diff --git a/src/overlay085/ov85_02241440.c b/src/overlay085/ov85_02241440.c index f0983af222..99a106cd06 100644 --- a/src/overlay085/ov85_02241440.c +++ b/src/overlay085/ov85_02241440.c @@ -419,10 +419,10 @@ static void ov85_022416E8(BgConfig *param0) static void ov85_02241718(UnkStruct_ov85_022417E4 *param0, NARC *param1) { - sub_020070E8(param1, 2, param0->unk_00, 2, 0, 0, 0, 36); - sub_0200710C(param1, 0, param0->unk_00, 2, 0, 0, 0, 36); - sub_0200710C(param1, 1, param0->unk_00, 3, 0, 0, 0, 36); - sub_02007130(param1, 3, 0, 0, 0, 36); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, param0->unk_00, 2, 0, 0, 0, 36); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 0, param0->unk_00, 2, 0, 0, 0, 36); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 1, param0->unk_00, 3, 0, 0, 0, 36); + Graphics_LoadPaletteFromOpenNARC(param1, 3, 0, 0, 0, 36); { u16 *v0; @@ -788,8 +788,8 @@ static int ov85_02241DF8(UnkStruct_ov85_022417E4 *param0) static void ov85_02241E60(UnkStruct_ov85_022417E4 *param0, NARC *param1) { - sub_020070E8(param1, ov85_02241EB0(param0->unk_1F8->unk_08), param0->unk_00, 1, 1, 0, 0, 36); - sub_02007130(param1, ov85_02241EB4(param0->unk_1F8->unk_08), 0, 3 * 0x20, 0x20, 36); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, ov85_02241EB0(param0->unk_1F8->unk_08), param0->unk_00, 1, 1, 0, 0, 36); + Graphics_LoadPaletteFromOpenNARC(param1, ov85_02241EB4(param0->unk_1F8->unk_08), 0, 3 * 0x20, 0x20, 36); } u32 ov85_02241EB0(u32 param0) diff --git a/src/overlay086/ov86_0223B140.c b/src/overlay086/ov86_0223B140.c index 12e1ab6148..6cab882581 100644 --- a/src/overlay086/ov86_0223B140.c +++ b/src/overlay086/ov86_0223B140.c @@ -500,7 +500,7 @@ static BOOL ov86_0223B574(UnkStruct_ov86_0223B3C8 *param0) switch (param0->unk_00) { case 0: - sub_02006E60(105, 1, param0->unk_10, 3, 0, 0, 1, 63); + Graphics_LoadTilemapToBgLayer(105, 1, param0->unk_10, 3, 0, 0, 1, 63); param0->unk_00++; break; case 1: @@ -690,10 +690,10 @@ static void ov86_0223B74C(UnkStruct_ov86_0223B3C8 *param0) v0 = NARC_ctor(NARC_INDEX_GRAPHIC__DENDOU_DEMO, 63); - sub_020070E8(v0, 3, param0->unk_10, 3, 0, 0, 1, 63); - sub_0200710C(v0, 0, param0->unk_10, 3, 0, 0, 1, 63); - sub_02007130(v0, 4, 0, 0, 0x60, 63); - sub_0200710C(v0, 2, param0->unk_10, 2, 0, 0, 1, 63); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 3, param0->unk_10, 3, 0, 0, 1, 63); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 0, param0->unk_10, 3, 0, 0, 1, 63); + Graphics_LoadPaletteFromOpenNARC(v0, 4, 0, 0, 0x60, 63); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 2, param0->unk_10, 2, 0, 0, 1, 63); Bg_CopyTilemapBufferToVRAM(param0->unk_10, 1); G2_SetWnd0Position(0, 0, 0, 0); @@ -780,8 +780,8 @@ static void ov86_0223BA44(UnkStruct_ov86_0223B3C8 *param0) sub_0200A784(0, 128, 0, 32, 0, 128, 0, 32, 63); param0->unk_24 = sub_020095C4(64, ¶m0->unk_28, 63); - param0->unk_1D0 = sub_02007204(v2, 77, 0, &v0, 63); - param0->unk_1D4 = sub_02007220(v2, 78, 0, &v1, 63); + param0->unk_1D0 = Graphics_GetCellBankFromOpenNARC(v2, 77, 0, &v0, 63); + param0->unk_1D4 = Graphics_GetAnimBankFromOpenNARC(v2, 78, 0, &v1, 63); ov86_0223BAC8(param0, v0, v1, v2); @@ -826,8 +826,8 @@ static void ov86_0223BAC8(UnkStruct_ov86_0223B3C8 *param0, NNSG2dCellDataBank *p v3.vramType = NNS_G2D_VRAM_TYPE_2DMAIN; v3.heapID = 63; - v9 = sub_020071B4(param3, 76, 0, &v7, 63); - v10 = sub_020071EC(param3, 75, &v8, 63); + v9 = Graphics_GetCharDataFromOpenNARC(param3, 76, 0, &v7, 63); + v10 = Graphics_GetPlttDataFromOpenNARC(param3, 75, &v8, 63); for (v12 = 0; v12 < param0->unk_04; v12++) { NNS_G2dInitImageProxy(&v5); @@ -855,7 +855,7 @@ static void ov86_0223BAC8(UnkStruct_ov86_0223B3C8 *param0, NNSG2dCellDataBank *p DC_FlushRange(param0->unk_310, 3200); GX_LoadOBJ(param0->unk_310, v12 * 2 * 3200 + 3200, 3200); - sub_02006E84(v1.archive, v1.palette, 1, v12 * 0x20, 0x20, 63); + Graphics_LoadPalette(v1.archive, v1.palette, 1, v12 * 0x20, 0x20, 63); PokeSprite_LoadAnimationFrames(param0->unk_1C54, ¶m0->unk_1D8[v12][0], param0->unk_2E0[v12], 1); } @@ -870,7 +870,7 @@ static void ov86_0223BAC8(UnkStruct_ov86_0223B3C8 *param0, NNSG2dCellDataBank *p DC_FlushRange(param0->unk_310, 3200); GX_LoadOBJ(param0->unk_310, 38400, 3200); - sub_02006E84(v4.unk_00, v4.unk_08, 1, 192, 0x20, 63); + Graphics_LoadPalette(v4.unk_00, v4.unk_08, 1, 192, 0x20, 63); v3.priority = 0; param0->unk_1CC = CellActorCollection_Add(&v3); diff --git a/src/overlay087/ov87_021D106C.c b/src/overlay087/ov87_021D106C.c index c5a0303694..412c6e5b59 100644 --- a/src/overlay087/ov87_021D106C.c +++ b/src/overlay087/ov87_021D106C.c @@ -303,9 +303,9 @@ static void ov87_021D139C(UnkStruct_ov87_021D106C *param0) SetAllGraphicsModes(&v1); Bg_InitFromTemplate(param0->unk_10, 1, &v2, 0); Bg_InitFromTemplate(param0->unk_10, 2, &v3, 0); - sub_02006E3C(101, 1, param0->unk_10, 2, 0, 0, 1, 61); - sub_02006E60(101, 0, param0->unk_10, 2, 0, 0, 1, 61); - sub_02006E84(101, 2, 0, 0, 0x40, 61); + Graphics_LoadTilesToBgLayer(101, 1, param0->unk_10, 2, 0, 0, 1, 61); + Graphics_LoadTilemapToBgLayer(101, 0, param0->unk_10, 2, 0, 0, 1, 61); + Graphics_LoadPalette(101, 2, 0, 0, 0x40, 61); Bg_FillTilesRange(param0->unk_10, 1, 0x0, 1, 0); Bg_FillTilemapRect(param0->unk_10, 1, 0x0, 0, 0, 32, 32, 0); @@ -443,8 +443,8 @@ static void ov87_021D1818(UnkStruct_ov87_021D106C *param0) NNSG2dAnimBankData *v1; int v2; - param0->unk_1DC = sub_02006FA0(27, 77, 0, &v0, 61); - param0->unk_1E0 = sub_02006FBC(27, 78, 0, &v1, 61); + param0->unk_1DC = Graphics_GetCellBank(27, 77, 0, &v0, 61); + param0->unk_1E0 = Graphics_GetAnimBank(27, 78, 0, &v1, 61); MI_CpuClearFast(param0->unk_200, sizeof(param0->unk_200)); @@ -504,8 +504,8 @@ static void ov87_021D18A0(UnkStruct_ov87_021D106C *param0, NNSG2dCellDataBank *p v2.vramType = NNS_G2D_VRAM_TYPE_2DMAIN; v2.heapID = 61; - v7 = sub_02006F50(27, 76, 0, &v5, 61); - v8 = sub_02006F88(27, 75, &v6, 61); + v7 = Graphics_GetCharData(27, 76, 0, &v5, 61); + v8 = Graphics_GetPlttData(27, 75, &v6, 61); for (v9 = 0; v9 < 6; v9++) { NNS_G2dInitImageProxy(&v3); @@ -548,7 +548,7 @@ static void ov87_021D1970(UnkStruct_ov87_021D106C *param0) DC_FlushRange(param0->unk_200, sizeof(param0->unk_200)); GX_LoadOBJ(param0->unk_200, 3200 * v3, 3200); - sub_02006E84(v1.archive, v1.palette, 1, v3 * 0x20, 0x20, 61); + Graphics_LoadPalette(v1.archive, v1.palette, 1, v3 * 0x20, 0x20, 61); if (v3 == v2->unk_18) { Sound_FlagDefaultChatotCry(1); diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index 2c376c546d..b9e3aeea94 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -528,7 +528,7 @@ static void ov88_0223B7A0(Party *param0, int param1, UnkStruct_02095E80 *param2) for (v0 = 0; v0 < Party_GetCurrentCount(param0); v0++) { v1 = v0 + param1; - param2->unk_7E8[v1] = sub_02006F50(19, PokeIconSpriteIndex(param2->unk_6F4[v1].unk_00, param2->unk_6F4[v1].unk_05, param2->unk_6F4[v1].unk_06), 0, ¶m2->unk_818[v1], 26); + param2->unk_7E8[v1] = Graphics_GetCharData(19, PokeIconSpriteIndex(param2->unk_6F4[v1].unk_00, param2->unk_6F4[v1].unk_05, param2->unk_6F4[v1].unk_06), 0, ¶m2->unk_818[v1], 26); DC_FlushRange(param2->unk_818[v1]->pRawData, 0x20 * 4 * 4); @@ -909,7 +909,7 @@ static void ov88_0223C0E0(void *param0) int v1 = v0->unk_2168 - 1; GXS_LoadOBJ(v0->unk_848[v1], 0 + v1 * (0x20 * 10 * 10), (0x20 * 10 * 10)); - sub_02006E84(v0->unk_2148[v1].archive, v0->unk_2148[v1].palette, 5, 0x20 * (2 + v1), 32, 26); + Graphics_LoadPalette(v0->unk_2148[v1].archive, v0->unk_2148[v1].palette, 5, 0x20 * (2 + v1), 32, 26); v0->unk_2168 = 0; } @@ -1203,21 +1203,21 @@ static void ov88_0223C504(UnkStruct_02095E80 *param0, NARC *param1) { BgConfig *v0 = param0->unk_174; - sub_02007130(param1, 0, 4, 0, 16 * 9 * 2, 26); - sub_02007130(param1, 0, 0, 0, 16 * 9 * 2, 26); + Graphics_LoadPaletteFromOpenNARC(param1, 0, 4, 0, 16 * 9 * 2, 26); + Graphics_LoadPaletteFromOpenNARC(param1, 0, 0, 0, 16 * 9 * 2, 26); Bg_MaskPalette(0, 0); Bg_MaskPalette(4, 0); Font_LoadScreenIndicatorsPalette(0, 13 * 32, 26); - sub_020070E8(param1, 1, v0, 2, 0, 16 * 18 * 0x20, 1, 26); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 1, v0, 2, 0, 16 * 18 * 0x20, 1, 26); ov88_0223C488(param1, 3, v0, 2, 0, 32 * 24 * 2, 1, 26); - sub_0200710C(param1, 4, v0, 3, 0, 32 * 24 * 2, 1, 26); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 4, v0, 3, 0, 32 * 24 * 2, 1, 26); Font_LoadScreenIndicatorsPalette(0, 2 * 32, 26); Font_LoadTextPalette(0, 3 * 32, 26); - sub_020070E8(param1, 2, v0, 5, 0, 16 * 4 * 0x20, 1, 26); - sub_0200710C(param1, 5, v0, 5, 0, 32 * 24 * 2, 1, 26); - sub_0200710C(param1, 6, v0, 6, 0, 32 * 24 * 2, 1, 26); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, v0, 5, 0, 16 * 4 * 0x20, 1, 26); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 5, v0, 5, 0, 32 * 24 * 2, 1, 26); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 6, v0, 6, 0, 32 * 24 * 2, 1, 26); Font_LoadScreenIndicatorsPalette(4, 2 * 32, 26); Font_LoadTextPalette(4, 3 * 32, 26); Bg_ClearTilemap(v0, 4); @@ -1264,7 +1264,7 @@ static void ov88_0223C66C(UnkStruct_02095E80 *param0, NARC *param1) sub_0200A328(param0->unk_334[1][0]); sub_0200A5C8(param0->unk_334[0][1]); sub_0200A5C8(param0->unk_334[1][1]); - sub_02006E84(19, PokeIconPalettesFileIndex(), 1, 10 * 0x20, 0x20 * 4, 26); + Graphics_LoadPalette(19, PokeIconPalettesFileIndex(), 1, 10 * 0x20, 0x20 * 4, 26); } static int ov88_0223C800(int param0, Pokemon *param1, u8 *param2, ArchivedSprite *param3) diff --git a/src/overlay091/ov91_021D0D80.c b/src/overlay091/ov91_021D0D80.c index 03032e265c..63bdb619e3 100644 --- a/src/overlay091/ov91_021D0D80.c +++ b/src/overlay091/ov91_021D0D80.c @@ -603,9 +603,9 @@ static void ov91_021D1098(BgConfig *param0) static void ov91_021D10C8(UnkStruct_ov91_021D0ED8 *param0, NARC *param1) { - sub_020070E8(param1, 10, param0->unk_04, 2, 0, 0, 0, 67); - sub_0200710C(param1, 11, param0->unk_04, 2, 0, 0, 0, 67); - sub_02007130(param1, 12, 0, 0, 0, 67); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 10, param0->unk_04, 2, 0, 0, 0, 67); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 11, param0->unk_04, 2, 0, 0, 0, 67); + Graphics_LoadPaletteFromOpenNARC(param1, 12, 0, 0, 0, 67); Font_LoadScreenIndicatorsPalette(0, 14 * 32, 67); sub_0200DAA4(param0->unk_04, 0, 1, 12, 0, 67); sub_0200DD0C(param0->unk_04, 0, (1 + 9), 13, Options_Frame(param0->unk_00->unk_08), 67); diff --git a/src/overlay092/ov92_021D0D80.c b/src/overlay092/ov92_021D0D80.c index 0e2f58149b..ae32ff3cd2 100644 --- a/src/overlay092/ov92_021D0D80.c +++ b/src/overlay092/ov92_021D0D80.c @@ -919,9 +919,9 @@ static void ov92_021D1888(UnkStruct_ov92_021D1B24 *param0, NARC *param1) Bg_InitFromTemplate(param0->unk_B810, 6, &Unk_ov92_021D2970, 0); Bg_ClearTilemap(param0->unk_B810, 6); Bg_InitFromTemplate(param0->unk_B810, 7, &Unk_ov92_021D298C, 0); - sub_020070E8(param1, 5, param0->unk_B810, 7, 0, 0, 0, param0->unk_00); - sub_02007130(param1, 6, 4, 0 * (2 * 16), (2 * 16) * 4, param0->unk_00); - sub_0200710C(param1, 7, param0->unk_B810, 7, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 5, param0->unk_B810, 7, 0, 0, 0, param0->unk_00); + Graphics_LoadPaletteFromOpenNARC(param1, 6, 4, 0 * (2 * 16), (2 * 16) * 4, param0->unk_00); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 7, param0->unk_B810, 7, 0, 0, 0, param0->unk_00); sub_0200DD0C(param0->unk_B810, 6, (512 - (18 + 12)), 6, Options_Frame(param0->unk_08), param0->unk_00); sub_0200DAA4(param0->unk_B810, 6, ((512 - (18 + 12)) - 9), 7, 0, param0->unk_00); Font_LoadTextPalette(4, 4 * (2 * 16), param0->unk_00); @@ -936,9 +936,9 @@ static void ov92_021D1888(UnkStruct_ov92_021D1B24 *param0, NARC *param1) Bg_InitFromTemplate(param0->unk_B810, 2, &Unk_ov92_021D2970, 0); Bg_ClearTilemap(param0->unk_B810, 2); Bg_InitFromTemplate(param0->unk_B810, 3, &Unk_ov92_021D298C, 0); - sub_020070E8(param1, 5, param0->unk_B810, 3, 0, 0, 0, param0->unk_00); - sub_02007130(param1, 6, 0, 0 * (2 * 16), (2 * 16) * 4, param0->unk_00); - sub_0200710C(param1, 7, param0->unk_B810, 3, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 5, param0->unk_B810, 3, 0, 0, 0, param0->unk_00); + Graphics_LoadPaletteFromOpenNARC(param1, 6, 0, 0 * (2 * 16), (2 * 16) * 4, param0->unk_00); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 7, param0->unk_B810, 3, 0, 0, 0, param0->unk_00); sub_0200DAA4(param0->unk_B810, 2, ((512 - (18 + 12)) - 9), 7, 0, param0->unk_00); Font_LoadTextPalette(0, 4 * (2 * 16), param0->unk_00); Bg_ClearTilesRange(2, 32, 0, param0->unk_00); diff --git a/src/overlay094/ov94_0223BCB0.c b/src/overlay094/ov94_0223BCB0.c index 3e17485241..979696b2d8 100644 --- a/src/overlay094/ov94_0223BCB0.c +++ b/src/overlay094/ov94_0223BCB0.c @@ -347,7 +347,7 @@ static void ov94_0223C0D4(UnkStruct_ov94_0223FD4C *param0) int v4, v5, v6, v7; u16 *v8; - v2 = sub_02006F88(19, PokeIconPalettesFileIndex(), &v3, 62); + v2 = Graphics_GetPlttData(19, PokeIconPalettesFileIndex(), &v3, 62); DC_FlushRange(v3->pRawData, (3 * 16) * 2); GX_LoadOBJPltt(v3->pRawData, 3 * 0x20, (3 * 16) * 2); diff --git a/src/overlay094/ov94_0223C610.c b/src/overlay094/ov94_0223C610.c index e7df6e126a..7246876028 100644 --- a/src/overlay094/ov94_0223C610.c +++ b/src/overlay094/ov94_0223C610.c @@ -276,13 +276,13 @@ static void ov94_0223C888(UnkStruct_ov94_0223FD4C *param0) v1 = NARC_ctor(NARC_INDEX_GRAPHIC__WORLDTRADE, 62); - sub_02007130(v1, 4, 0, 0, 16 * 3 * 2, 62); + Graphics_LoadPaletteFromOpenNARC(v1, 4, 0, 0, 16 * 3 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); - sub_020070E8(v1, 14, v0, 1, 0, 16 * 6 * 0x20, 1, 62); - sub_0200710C(v1, 30, v0, 1, 0, 32 * 24 * 2, 1, 62); - sub_0200710C(v1, 29, v0, 2, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 14, v0, 1, 0, 16 * 6 * 0x20, 1, 62); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 30, v0, 1, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 29, v0, 2, 0, 32 * 24 * 2, 1, 62); ov94_0223D068(param0); @@ -615,7 +615,7 @@ void ov94_0223D068(UnkStruct_ov94_0223FD4C *param0) { BgConfig *v0 = param0->unk_04; - sub_02006E84(104, 5, 4, 0, 16 * 16 * 2, 62); - sub_02006E3C(104, 15, v0, 5, 0, 32 * 21 * 0x40, 1, 62); - sub_02006E60(104, 31, v0, 5, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadPalette(104, 5, 4, 0, 16 * 16 * 2, 62); + Graphics_LoadTilesToBgLayer(104, 15, v0, 5, 0, 32 * 21 * 0x40, 1, 62); + Graphics_LoadTilemapToBgLayer(104, 31, v0, 5, 0, 32 * 24 * 2, 1, 62); } diff --git a/src/overlay094/ov94_0223D0C4.c b/src/overlay094/ov94_0223D0C4.c index 2af712a611..5e3b01ae85 100644 --- a/src/overlay094/ov94_0223D0C4.c +++ b/src/overlay094/ov94_0223D0C4.c @@ -237,15 +237,15 @@ static void ov94_0223D2E8(UnkStruct_ov94_0223FD4C *param0) BgConfig *v0 = param0->unk_04; NARC *v1 = NARC_ctor(NARC_INDEX_GRAPHIC__WORLDTRADE, 62); - sub_02007130(v1, 7, 0, 0, 16 * 3 * 2, 62); - sub_02007130(v1, 5, 4, 0, 16 * 8 * 2, 62); + Graphics_LoadPaletteFromOpenNARC(v1, 7, 0, 0, 16 * 3 * 2, 62); + Graphics_LoadPaletteFromOpenNARC(v1, 5, 4, 0, 16 * 8 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); - sub_020070E8(v1, 17, v0, 1, 0, 16 * 5 * 0x20, 1, 62); - sub_0200710C(v1, 25, v0, 1, 0, 32 * 24 * 2, 1, 62); - sub_020070E8(v1, 15, v0, 5, 0, 32 * 21 * 0x40, 1, 62); - sub_0200710C(v1, 31, v0, 5, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 17, v0, 1, 0, 16 * 5 * 0x20, 1, 62); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 25, v0, 1, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 15, v0, 5, 0, 32 * 21 * 0x40, 1, 62); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 31, v0, 5, 0, 32 * 24 * 2, 1, 62); NARC_dtor(v1); } @@ -600,7 +600,7 @@ void ov94_0223DB2C(Pokemon *param0) DC_FlushRange(v1, (0x20 * 10 * 10)); GX_LoadOBJ(v1, ((18 * 32 + 16) * 32), (0x20 * 10 * 10)); - sub_02006E84(v0.archive, v0.palette, 1, 0x20 * 13, 32, 62); + Graphics_LoadPalette(v0.archive, v0.palette, 1, 0x20 * 13, 32, 62); Heap_FreeToHeap(v1); } diff --git a/src/overlay094/ov94_0223DC04.c b/src/overlay094/ov94_0223DC04.c index dc1a1d61ab..6be2d0712a 100644 --- a/src/overlay094/ov94_0223DC04.c +++ b/src/overlay094/ov94_0223DC04.c @@ -209,8 +209,8 @@ static void ov94_0223DE04(UnkStruct_ov94_0223FD4C *param0) Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); - sub_02006E3C(104, 17, v0, 1, 0, 16 * 5 * 0x20, 1, 62); - sub_02006E84(104, 7, 0, 0, 16 * 3 * 2, 62); + Graphics_LoadTilesToBgLayer(104, 17, v0, 1, 0, 16 * 5 * 0x20, 1, 62); + Graphics_LoadPalette(104, 7, 0, 0, 16 * 3 * 2, 62); } static void ov94_0223DE7C(UnkStruct_ov94_0223FD4C *param0) @@ -401,10 +401,10 @@ static int ov94_0223E1D0(UnkStruct_ov94_0223FD4C *param0) static void ov94_0223E240(UnkStruct_ov94_0223FD4C *param0) { if (param0->unk_10E == 0) { - sub_02006E60(104, 27, param0->unk_04, 1, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadTilemapToBgLayer(104, 27, param0->unk_04, 1, 0, 32 * 24 * 2, 1, 62); ov94_0223E3B0(¶m0->unk_FCC[9], param0->unk_B90, param0->unk_B94, ¶m0->unk_250[param0->unk_11C].unk_F0); } else { - sub_02006E60(104, 28, param0->unk_04, 1, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadTilemapToBgLayer(104, 28, param0->unk_04, 1, 0, 32 * 24 * 2, 1, 62); ov94_0223E424(¶m0->unk_FCC[9], param0->unk_BB4[0], param0->unk_BB4[1]); } } diff --git a/src/overlay094/ov94_0223E46C.c b/src/overlay094/ov94_0223E46C.c index 4f3b03d439..ccd46cebfd 100644 --- a/src/overlay094/ov94_0223E46C.c +++ b/src/overlay094/ov94_0223E46C.c @@ -273,13 +273,13 @@ static void ov94_0223E6B8(UnkStruct_ov94_0223FD4C *param0) BgConfig *v0 = param0->unk_04; NARC *v1 = NARC_ctor(NARC_INDEX_GRAPHIC__WORLDTRADE, 62); - sub_02007130(v1, 3, 0, 0, 16 * 3 * 2, 62); - sub_02007130(v1, 5, 4, 0, 16 * 8 * 2, 62); + Graphics_LoadPaletteFromOpenNARC(v1, 3, 0, 0, 16 * 3 * 2, 62); + Graphics_LoadPaletteFromOpenNARC(v1, 5, 4, 0, 16 * 8 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); - sub_020070E8(v1, 13, v0, 1, 0, 16 * 5 * 0x20, 1, 62); - sub_0200710C(v1, 26, v0, 1, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 13, v0, 1, 0, 16 * 5 * 0x20, 1, 62); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 26, v0, 1, 0, 32 * 24 * 2, 1, 62); NARC_dtor(v1); } diff --git a/src/overlay094/ov94_0223FB48.c b/src/overlay094/ov94_0223FB48.c index 2107bce8f2..8b2e0f476e 100644 --- a/src/overlay094/ov94_0223FB48.c +++ b/src/overlay094/ov94_0223FB48.c @@ -295,14 +295,14 @@ static void ov94_0223FD4C(UnkStruct_ov94_0223FD4C *param0) BgConfig *v0 = param0->unk_04; NARC *v1 = NARC_ctor(NARC_INDEX_GRAPHIC__WORLDTRADE, 62); - sub_02007130(v1, 2, 0, 0, 16 * 3 * 2, 62); - sub_02007130(v1, 5, 4, 0, 16 * 8 * 2, 62); + Graphics_LoadPaletteFromOpenNARC(v1, 2, 0, 0, 16 * 3 * 2, 62); + Graphics_LoadPaletteFromOpenNARC(v1, 5, 4, 0, 16 * 8 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); - sub_020070E8(v1, 12, v0, 1, 0, 16 * 5 * 0x20, 1, 62); - sub_0200710C(v1, 24, v0, 1, 0, 32 * 24 * 2, 1, 62); - sub_0200710C(v1, 29, v0, 2, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 12, v0, 1, 0, 16 * 5 * 0x20, 1, 62); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 24, v0, 1, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 29, v0, 2, 0, 32 * 24 * 2, 1, 62); NARC_dtor(v1); } diff --git a/src/overlay094/ov94_022414B8.c b/src/overlay094/ov94_022414B8.c index fea4de11bc..2dd54efbcc 100644 --- a/src/overlay094/ov94_022414B8.c +++ b/src/overlay094/ov94_022414B8.c @@ -456,12 +456,12 @@ static void ov94_0224170C(UnkStruct_ov94_0223FD4C *param0) { BgConfig *v0 = param0->unk_04; - sub_02006E84(104, 1, 0, 0, 16 * 3 * 2, 62); + Graphics_LoadPalette(104, 1, 0, 0, 16 * 3 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); - sub_02006E3C(104, 11, v0, 1, 0, 16 * 5 * 0x20, 1, 62); - sub_02006E60(104, 23, v0, 1, 0, 32 * 24 * 2, 1, 62); + Graphics_LoadTilesToBgLayer(104, 11, v0, 1, 0, 16 * 5 * 0x20, 1, 62); + Graphics_LoadTilemapToBgLayer(104, 23, v0, 1, 0, 32 * 24 * 2, 1, 62); } static void ov94_022417A0(UnkStruct_ov94_0223FD4C *param0) diff --git a/src/overlay094/ov94_02242AD0.c b/src/overlay094/ov94_02242AD0.c index e4d1f2d222..bc48f4ebc7 100644 --- a/src/overlay094/ov94_02242AD0.c +++ b/src/overlay094/ov94_02242AD0.c @@ -326,7 +326,7 @@ static void ov94_02242CAC(UnkStruct_ov94_0223FD4C *param0) { BgConfig *v0 = param0->unk_04; - sub_02006E84(104, 0, 0, 0, 16 * 3 * 2, 62); + Graphics_LoadPalette(104, 0, 0, 0, 16 * 3 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); diff --git a/src/overlay094/ov94_02243EF8.c b/src/overlay094/ov94_02243EF8.c index bb74ac0de2..f5c7be2243 100644 --- a/src/overlay094/ov94_02243EF8.c +++ b/src/overlay094/ov94_02243EF8.c @@ -281,8 +281,8 @@ void ov94_022442E4(UnkStruct_ov94_0223FD4C *param0) static void ov94_0224432C(UnkStruct_ov94_0223FD4C *param0) { - param0->unk_10FC = sub_02006F88(86, 7, &(param0->unk_1100), 62); - param0->unk_10F4 = sub_02006F50(86, 9, 1, &(param0->unk_10F8), 62); + param0->unk_10FC = Graphics_GetPlttData(86, 7, &(param0->unk_1100), 62); + param0->unk_10F4 = Graphics_GetCharData(86, 9, 1, &(param0->unk_10F8), 62); DC_FlushRange(param0->unk_10F8, (256 * 256 / 2)); } diff --git a/src/overlay094/ov94_02244950.c b/src/overlay094/ov94_02244950.c index 2fdeb6b16c..dff8d0e3d0 100644 --- a/src/overlay094/ov94_02244950.c +++ b/src/overlay094/ov94_02244950.c @@ -272,16 +272,16 @@ static void ov94_02244B8C(UnkStruct_ov94_0223FD4C *param0) v1 = NARC_ctor(NARC_INDEX_DATA__WIFIP2PMATCH, 62); - sub_02007130(v1, 3, 0, 0, 0, 62); - sub_02007130(v1, 3, 4, 0, 0, 62); + Graphics_LoadPaletteFromOpenNARC(v1, 3, 0, 0, 0, 62); + Graphics_LoadPaletteFromOpenNARC(v1, 3, 4, 0, 0, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 62); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); - sub_020070E8(v1, 2, v0, 1, 0, 0, 0, 62); - sub_0200710C(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 62); - sub_020070E8(v1, 10, v0, 5, 0, 0, 0, 62); - sub_0200710C(v1, 11, v0, 5, 0, 32 * 24 * 2, 0, 62); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 2, v0, 1, 0, 0, 0, 62); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 62); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 10, v0, 5, 0, 0, 0, 62); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 11, v0, 5, 0, 32 * 24 * 2, 0, 62); Bg_MaskPalette(0, 0); Bg_MaskPalette(4, 0); diff --git a/src/overlay095/ov95_02246C20.c b/src/overlay095/ov95_02246C20.c index 6567871d3f..a0c8a6e3b6 100644 --- a/src/overlay095/ov95_02246C20.c +++ b/src/overlay095/ov95_02246C20.c @@ -276,7 +276,7 @@ UnkStruct_ov95_02247004 *ov95_02246F30(BOOL *param0, int param1) u32 v3; int v4; - v2 = sub_02006F88(93, 6, &v1, 57); + v2 = Graphics_GetPlttData(93, 6, &v1, 57); if (v2) { MI_CpuFill16(v0->unk_00, 0x0, 96); @@ -588,7 +588,7 @@ void ov95_022473E8(UnkStruct_ov95_02247628 *param0, int param1, u32 param2, u32 } v1 = (param2 >= 4) ? 4 : 0; - sub_02006E84(v0.archive, v0.palette, v1, param3 * 0x20, 0x20, 57); + Graphics_LoadPalette(v0.archive, v0.palette, v1, param3 * 0x20, 0x20, 57); } void ov95_022474D4(UnkStruct_ov95_02247628 *param0, int param1, u32 param2, u32 param3, u32 param4, u32 param5) @@ -603,7 +603,7 @@ void ov95_022474D4(UnkStruct_ov95_02247628 *param0, int param1, u32 param2, u32 v2 = (param0->unk_1AC) ? 263 : 262; } - v0 = sub_02006F6C(7, v2, 0, &v1, 57); + v0 = Graphics_GetScrnData(7, v2, 0, &v1, 57); if (v0) { Bg_CopyToTilemapRect(param0->unk_08, param2, param4, param5, 10, 10, v1->rawData, 0, 0, 32, 32); @@ -614,8 +614,8 @@ void ov95_022474D4(UnkStruct_ov95_02247628 *param0, int param1, u32 param2, u32 void ov95_02247568(UnkStruct_ov95_02247568 *param0, u32 param1, u32 param2, u32 param3) { - param0->unk_00 = sub_02006FA0(param1, param2, 1, &(param0->unk_08), 58); - param0->unk_04 = sub_02006FBC(param1, param3, 1, &(param0->unk_0C), 58); + param0->unk_00 = Graphics_GetCellBank(param1, param2, 1, &(param0->unk_08), 58); + param0->unk_04 = Graphics_GetAnimBank(param1, param3, 1, &(param0->unk_0C), 58); } void ov95_022475A0(UnkStruct_ov95_02247568 *param0) diff --git a/src/overlay095/ov95_02247B6C.c b/src/overlay095/ov95_02247B6C.c index 57e363d80b..7af2480ec1 100644 --- a/src/overlay095/ov95_02247B6C.c +++ b/src/overlay095/ov95_02247B6C.c @@ -260,13 +260,13 @@ static int ov95_02247CB4(UnkStruct_ov95_02247C6C *param0, int *param1) Window_Add(param0->unk_54, &(param0->unk_58), 1, 2, 19, 27, 4, 1, 1); Window_FillTilemap(&(param0->unk_58), 0xf); - sub_02006E84(14, 7, 0, 1 * 0x20, 0x20, 58); - sub_02006E3C(93, 22, param0->unk_54, 2, 0, 0, 1, 58); - sub_02006E60(93, 21, param0->unk_54, 2, 0, 0, 1, 58); - sub_02006E84(93, 23, 0, 0 * 0x20, 0x20, 58); - sub_02006E3C(93, 22, param0->unk_54, 6, 0, 0, 1, 58); - sub_02006E60(93, 21, param0->unk_54, 6, 0, 0, 1, 58); - sub_02006E84(93, 23, 4, 0 * 0x20, 0x20, 58); + Graphics_LoadPalette(14, 7, 0, 1 * 0x20, 0x20, 58); + Graphics_LoadTilesToBgLayer(93, 22, param0->unk_54, 2, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 21, param0->unk_54, 2, 0, 0, 1, 58); + Graphics_LoadPalette(93, 23, 0, 0 * 0x20, 0x20, 58); + Graphics_LoadTilesToBgLayer(93, 22, param0->unk_54, 6, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 21, param0->unk_54, 6, 0, 0, 1, 58); + Graphics_LoadPalette(93, 23, 4, 0 * 0x20, 0x20, 58); Bg_CopyTilemapBufferToVRAM(param0->unk_54, 1); ov95_02248174(param0); @@ -478,8 +478,8 @@ static void ov95_0224829C(UnkStruct_ov95_02247C6C *param0) NNS_G2dInitImagePaletteProxy(&v0); NNS_G2dInitImageProxy(&v1); - sub_02006F00(93, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v1); - sub_02006EE0(93, 10, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v0); + Graphics_LoadImageMapping(93, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v1); + Graphics_LoadPartialPalette(93, 10, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v0); ov95_022475C4(&v2, ¶m0->unk_44, &v1, &v0, 2); diff --git a/src/overlay095/ov95_02248590.c b/src/overlay095/ov95_02248590.c index ee171b308e..bea5163c8d 100644 --- a/src/overlay095/ov95_02248590.c +++ b/src/overlay095/ov95_02248590.c @@ -481,22 +481,22 @@ static void ov95_022488A4(UnkStruct_ov95_02248688 *param0) OS_RestoreInterrupts(v6); } - sub_02006E3C(93, 2, param0->unk_C0, 2, 0, 0, 1, 58); - sub_02006E3C(93, 2, param0->unk_C0, 6, 0, 0, 1, 58); - sub_02006E60(93, 0, param0->unk_C0, 2, 0, 0, 1, 58); - sub_02006E60(93, 0, param0->unk_C0, 6, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, 2, param0->unk_C0, 2, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, 2, param0->unk_C0, 6, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 0, param0->unk_C0, 2, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 0, param0->unk_C0, 6, 0, 0, 1, 58); v5 = ov95_02247644(param0->unk_00); - sub_02006E84(93, 3, 0, 0, 0x20, 58); - sub_02006E84(93, 3, 4, 0, 0x20, 58); - sub_02006E9C(93, 3, 0, v4[v5], 0x20, 0x40, 58); - sub_02006E9C(93, 3, 4, v4[v5], 0x20, 0x40, 58); + Graphics_LoadPalette(93, 3, 0, 0, 0x20, 58); + Graphics_LoadPalette(93, 3, 4, 0, 0x20, 58); + Graphics_LoadPaletteWithSrcOffset(93, 3, 0, v4[v5], 0x20, 0x40, 58); + Graphics_LoadPaletteWithSrcOffset(93, 3, 4, v4[v5], 0x20, 0x40, 58); - sub_02006E3C(93, 5, param0->unk_C0, 3, 0, 0, 1, 58); - sub_02006E3C(93, 5, param0->unk_C0, 7, 0, 0, 1, 58); - sub_02006E60(93, 4, param0->unk_C0, 3, 0, 0, 1, 58); - sub_02006E60(93, 4, param0->unk_C0, 7, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, 5, param0->unk_C0, 3, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, 5, param0->unk_C0, 7, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 4, param0->unk_C0, 3, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 4, param0->unk_C0, 7, 0, 0, 1, 58); { u8 *v7 = Heap_AllocFromHeap(58, 96); @@ -607,10 +607,10 @@ static void ov95_02248CA8(UnkStruct_ov95_02248688 *param0) NNS_G2dInitImagePaletteProxy(&v0); NNS_G2dInitImageProxy(&v1); - sub_02006F00(93, 13, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v1); - sub_02006F00(93, 13, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DSUB, 0, 58, &v1); - sub_02006EE0(93, 14, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v0); - sub_02006EE0(93, 14, NNS_G2D_VRAM_TYPE_2DSUB, 0, 58, &v0); + Graphics_LoadImageMapping(93, 13, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v1); + Graphics_LoadImageMapping(93, 13, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DSUB, 0, 58, &v1); + Graphics_LoadPartialPalette(93, 14, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v0); + Graphics_LoadPartialPalette(93, 14, NNS_G2D_VRAM_TYPE_2DSUB, 0, 58, &v0); ov95_022475C4(&v2, ¶m0->unk_0C, &v1, &v0, 1); MTRNG_SetSeed(UnkEnum_ov95_02248CA8_00); diff --git a/src/overlay095/ov95_02249740.c b/src/overlay095/ov95_02249740.c index f8a89aa454..562f4b610f 100644 --- a/src/overlay095/ov95_02249740.c +++ b/src/overlay095/ov95_02249740.c @@ -309,14 +309,14 @@ static void ov95_02249910(UnkStruct_ov95_022497D8 *param0) break; } - sub_02006E3C(93, v4, param0->unk_24, 3, 0, 0, 1, 58); - sub_02006E3C(93, v4, param0->unk_24, 7, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, v4, param0->unk_24, 3, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, v4, param0->unk_24, 7, 0, 0, 1, 58); - sub_02006E60(93, v3, param0->unk_24, 3, 0, 0, 1, 58); - sub_02006E60(93, v3, param0->unk_24, 7, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, v3, param0->unk_24, 3, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, v3, param0->unk_24, 7, 0, 0, 1, 58); - sub_02006E9C(93, v5, 0, v6, 0, 0x20, 58); - sub_02006E9C(93, v5, 4, v6, 0, 0x20, 58); + Graphics_LoadPaletteWithSrcOffset(93, v5, 0, v6, 0, 0x20, 58); + Graphics_LoadPaletteWithSrcOffset(93, v5, 4, v6, 0, 0x20, 58); Bg_SetOffset(param0->unk_24, 3, 3, 256); Bg_SetOffset(param0->unk_24, 7, 3, 0); @@ -404,8 +404,8 @@ static void ov95_02249B90(UnkStruct_ov95_022497D8 *param0) NNS_G2dInitImagePaletteProxy(&v0); NNS_G2dInitImageProxy(&v1); - sub_02006F00(93, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v1); - sub_02006EE0(93, 10, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v0); + Graphics_LoadImageMapping(93, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v1); + Graphics_LoadPartialPalette(93, 10, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v0); ov95_022475C4(&v2, ¶m0->unk_10, &v1, &v0, 0); param0->unk_20[0] = ov95_022475E4(param0->unk_00, &v2, UnkEnum_ov95_02249B90_00, UnkEnum_ov95_02249B90_01, 0, NNS_G2D_VRAM_TYPE_2DMAIN); diff --git a/src/overlay095/ov95_02249F90.c b/src/overlay095/ov95_02249F90.c index 63ce336c3c..33e7757d53 100644 --- a/src/overlay095/ov95_02249F90.c +++ b/src/overlay095/ov95_02249F90.c @@ -226,13 +226,13 @@ static void ov95_0224A10C(UnkStruct_ov95_02249FF8 *param0) Bg_InitFromTemplate(param0->unk_0C, 3, &v4, 0); Bg_InitFromTemplate(param0->unk_0C, 7, &v4, 0); - sub_02006E3C(93, 19, param0->unk_0C, 3, 0, 0, 1, 58); - sub_02006E3C(93, 19, param0->unk_0C, 7, 0, 0, 1, 58); - sub_02006E60(93, 18, param0->unk_0C, 3, 0, 0, 1, 58); - sub_02006E60(93, 18, param0->unk_0C, 7, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, 19, param0->unk_0C, 3, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, 19, param0->unk_0C, 7, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 18, param0->unk_0C, 3, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 18, param0->unk_0C, 7, 0, 0, 1, 58); - sub_02006E84(93, 20, 0, 0, 0x20, 58); - sub_02006E84(93, 20, 4, 0, 0x20, 58); + Graphics_LoadPalette(93, 20, 0, 0, 0x20, 58); + Graphics_LoadPalette(93, 20, 4, 0, 0x20, 58); Bg_FillTilesRange(param0->unk_0C, 1, 0x0, 1, 200); Bg_FillTilesRange(param0->unk_0C, 5, 0x0, 1, 200); diff --git a/src/overlay095/ov95_0224A390.c b/src/overlay095/ov95_0224A390.c index ecdee0fab7..0e0738247c 100644 --- a/src/overlay095/ov95_0224A390.c +++ b/src/overlay095/ov95_0224A390.c @@ -288,14 +288,14 @@ static void ov95_0224A518(UnkStruct_ov95_0224A42C *param0) break; } - sub_02006E3C(93, v4, param0->unk_24, 3, 0, 0, 1, 58); - sub_02006E3C(93, v4, param0->unk_24, 7, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, v4, param0->unk_24, 3, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, v4, param0->unk_24, 7, 0, 0, 1, 58); - sub_02006E60(93, v3, param0->unk_24, 3, 0, 0, 1, 58); - sub_02006E60(93, v3, param0->unk_24, 7, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, v3, param0->unk_24, 3, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, v3, param0->unk_24, 7, 0, 0, 1, 58); - sub_02006E9C(93, v5, 0, v6, 0, 0x20, 58); - sub_02006E9C(93, v5, 4, v6, 0, 0x20, 58); + Graphics_LoadPaletteWithSrcOffset(93, v5, 0, v6, 0, 0x20, 58); + Graphics_LoadPaletteWithSrcOffset(93, v5, 4, v6, 0, 0x20, 58); Bg_SetOffset(param0->unk_24, 3, 3, 0); Bg_SetOffset(param0->unk_24, 7, 3, 256); @@ -388,8 +388,8 @@ static void ov95_0224A7B0(UnkStruct_ov95_0224A42C *param0) NNS_G2dInitImagePaletteProxy(&v0); NNS_G2dInitImageProxy(&v1); - sub_02006F00(93, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v1); - sub_02006EE0(93, 10, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v0); + Graphics_LoadImageMapping(93, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v1); + Graphics_LoadPartialPalette(93, 10, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v0); ov95_022475C4(&v2, ¶m0->unk_10, &v1, &v0, 1); param0->unk_20[0] = ov95_022475E4(param0->unk_00, &v2, 128, 96, 0, NNS_G2D_VRAM_TYPE_2DMAIN); diff --git a/src/overlay095/ov95_0224ABC0.c b/src/overlay095/ov95_0224ABC0.c index c63e3958ef..47f69d7bd8 100644 --- a/src/overlay095/ov95_0224ABC0.c +++ b/src/overlay095/ov95_0224ABC0.c @@ -358,22 +358,22 @@ static void ov95_0224AE1C(UnkStruct_ov95_0224AC64 *param0) OS_RestoreInterrupts(v6); } - sub_02006E3C(93, 2, param0->unk_0C, 2, 0, 0, 1, 58); - sub_02006E3C(93, 2, param0->unk_0C, 6, 0, 0, 1, 58); - sub_02006E60(93, 1, param0->unk_0C, 2, 0, 0, 1, 58); - sub_02006E60(93, 1, param0->unk_0C, 6, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, 2, param0->unk_0C, 2, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, 2, param0->unk_0C, 6, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 1, param0->unk_0C, 2, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 1, param0->unk_0C, 6, 0, 0, 1, 58); v5 = ov95_02247644(param0->unk_00); - sub_02006E84(93, 3, 0, 0, 0x20, 58); - sub_02006E84(93, 3, 4, 0, 0x20, 58); - sub_02006E9C(93, 3, 0, v4[v5], 0x20, 0x40, 58); - sub_02006E9C(93, 3, 4, v4[v5], 0x20, 0x40, 58); + Graphics_LoadPalette(93, 3, 0, 0, 0x20, 58); + Graphics_LoadPalette(93, 3, 4, 0, 0x20, 58); + Graphics_LoadPaletteWithSrcOffset(93, 3, 0, v4[v5], 0x20, 0x40, 58); + Graphics_LoadPaletteWithSrcOffset(93, 3, 4, v4[v5], 0x20, 0x40, 58); - sub_02006E3C(93, 5, param0->unk_0C, 3, 0, 0, 1, 58); - sub_02006E3C(93, 5, param0->unk_0C, 7, 0, 0, 1, 58); - sub_02006E60(93, 4, param0->unk_0C, 3, 0, 0, 1, 58); - sub_02006E60(93, 4, param0->unk_0C, 7, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, 5, param0->unk_0C, 3, 0, 0, 1, 58); + Graphics_LoadTilesToBgLayer(93, 5, param0->unk_0C, 7, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 4, param0->unk_0C, 3, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 4, param0->unk_0C, 7, 0, 0, 1, 58); { u8 *v7 = Heap_AllocFromHeap(58, 96); diff --git a/src/overlay095/ov95_0224B3D8.c b/src/overlay095/ov95_0224B3D8.c index 370b29b33d..57d3abce28 100644 --- a/src/overlay095/ov95_0224B3D8.c +++ b/src/overlay095/ov95_0224B3D8.c @@ -288,12 +288,12 @@ static int ov95_0224B520(UnkStruct_ov95_0224B4D4 *param0, int *param1) Window_Add(param0->unk_58, &(param0->unk_5C), 1, 2, 19, 27, 4, 1, 1); Window_FillTilemap(&(param0->unk_5C), 0xf); - sub_02006E84(14, 7, 0, 1 * 0x20, 0x20, 58); + Graphics_LoadPalette(14, 7, 0, 1 * 0x20, 0x20, 58); Bg_CopyTilemapBufferToVRAM(param0->unk_58, 1); - sub_02006E3C(93, 22, param0->unk_58, 2, 0, 0, 1, 58); - sub_02006E60(93, 21, param0->unk_58, 2, 0, 0, 1, 58); - sub_02006E84(93, 23, 0, 0 * 0x20, 0x20, 58); + Graphics_LoadTilesToBgLayer(93, 22, param0->unk_58, 2, 0, 0, 1, 58); + Graphics_LoadTilemapToBgLayer(93, 21, param0->unk_58, 2, 0, 0, 1, 58); + Graphics_LoadPalette(93, 23, 0, 0 * 0x20, 0x20, 58); ov95_0224B9C0(param0); @@ -520,8 +520,8 @@ static void ov95_0224BAE8(UnkStruct_ov95_0224B4D4 *param0) NNS_G2dInitImagePaletteProxy(&v0); NNS_G2dInitImageProxy(&v1); - sub_02006F00(93, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v1); - sub_02006EE0(93, 10, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v0); + Graphics_LoadImageMapping(93, 9, 1, 0, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v1); + Graphics_LoadPartialPalette(93, 10, NNS_G2D_VRAM_TYPE_2DMAIN, 0, 58, &v0); ov95_022475C4(&v2, ¶m0->unk_48, &v1, &v0, 2); diff --git a/src/overlay096/ov96_0223BCE0.c b/src/overlay096/ov96_0223BCE0.c index dcabf62995..d6af618a8f 100644 --- a/src/overlay096/ov96_0223BCE0.c +++ b/src/overlay096/ov96_0223BCE0.c @@ -351,16 +351,16 @@ static void ov96_0223BF40(UnkStruct_ov96_0223BF40 *param0) BgConfig *v0 = param0->unk_04; NARC *v1 = NARC_ctor(NARC_INDEX_DATA__WIFIP2PMATCH, 68); - sub_02007130(v1, 3, 0, 0, 0, 68); - sub_02007130(v1, 3, 4, 0, 0, 68); + Graphics_LoadPaletteFromOpenNARC(v1, 3, 0, 0, 0, 68); + Graphics_LoadPaletteFromOpenNARC(v1, 3, 4, 0, 0, 68); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 68); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 68); sub_0200DD0C(v0, 0, 1, 14, Options_Frame(param0->unk_00->unk_10), 68); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 68); - sub_020070E8(v1, 2, v0, 1, 0, 0, 0, 68); - sub_0200710C(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 68); - sub_020070E8(v1, 10, v0, 5, 0, 0, 0, 68); - sub_0200710C(v1, 11, v0, 5, 0, 32 * 24 * 2, 0f, 68); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 2, v0, 1, 0, 0, 0, 68); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 68); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 10, v0, 5, 0, 0, 0, 68); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 11, v0, 5, 0, 32 * 24 * 2, 0f, 68); Bg_MaskPalette(0, 0); Bg_MaskPalette(4, 0); diff --git a/src/overlay097/ov97_0222AE60.c b/src/overlay097/ov97_0222AE60.c index edd9b02ffb..73635c55f1 100644 --- a/src/overlay097/ov97_0222AE60.c +++ b/src/overlay097/ov97_0222AE60.c @@ -491,8 +491,8 @@ static void ov97_0222B404(UnkStruct_0222AE60 *param0) static void ov97_0222B46C(UnkStruct_0222AE60 *param0) { - sub_02006E84(116, 45, 0, 4 * 32, 32 * 1, 81); - sub_02006E3C(116, 44, param0->unk_00, 2, 0x380, 2 * 32 * 0x20, 0, 81); + Graphics_LoadPalette(116, 45, 0, 4 * 32, 32 * 1, 81); + Graphics_LoadTilesToBgLayer(116, 44, param0->unk_00, 2, 0x380, 2 * 32 * 0x20, 0, 81); } static void ov97_0222B4AC(UnkStruct_0222AE60 *param0, int param1, int param2, int param3) diff --git a/src/overlay097/ov97_0222C174.c b/src/overlay097/ov97_0222C174.c index 0159f0661b..2948de2ead 100644 --- a/src/overlay097/ov97_0222C174.c +++ b/src/overlay097/ov97_0222C174.c @@ -547,9 +547,9 @@ static void ov97_0222C254(UnkStruct_ov97_0222C388 *param0) v0 = Options_Frame(param0->unk_14); sub_0200DD0C(param0->unk_04, 0, (1 + 9), 2, v0, param0->unk_00); - sub_02006E84(116, 0, 0, 16 * 2 * 8, 16 * 2, param0->unk_00); - sub_02006E3C(116, 1, param0->unk_04, 1, 0, 10 * 16 * 0x20, 1, param0->unk_00); - sub_02006E60(116, 2, param0->unk_04, 1, 0, 32 * 24 * 2, 1, param0->unk_00); + Graphics_LoadPalette(116, 0, 0, 16 * 2 * 8, 16 * 2, param0->unk_00); + Graphics_LoadTilesToBgLayer(116, 1, param0->unk_04, 1, 0, 10 * 16 * 0x20, 1, param0->unk_00); + Graphics_LoadTilemapToBgLayer(116, 2, param0->unk_04, 1, 0, 32 * 24 * 2, 1, param0->unk_00); Bg_ChangeTilemapRectPalette(param0->unk_04, 1, 0, 0, 32, 24, 8); Bg_CopyTilemapBufferToVRAM(param0->unk_04, 1); @@ -558,9 +558,9 @@ static void ov97_0222C254(UnkStruct_ov97_0222C388 *param0) static void ov97_0222C388(UnkStruct_ov97_0222C388 *param0) { - sub_02006E84(116, 0, 4, 16 * 2 * 8, 16 * 2, param0->unk_00); - sub_02006E3C(116, 1, param0->unk_04, 4, 0, 10 * 16 * 0x20, 1, param0->unk_00); - sub_02006E60(116, 2, param0->unk_04, 4, 0, 32 * 24 * 2, 1, param0->unk_00); + Graphics_LoadPalette(116, 0, 4, 16 * 2 * 8, 16 * 2, param0->unk_00); + Graphics_LoadTilesToBgLayer(116, 1, param0->unk_04, 4, 0, 10 * 16 * 0x20, 1, param0->unk_00); + Graphics_LoadTilemapToBgLayer(116, 2, param0->unk_04, 4, 0, 32 * 24 * 2, 1, param0->unk_00); Bg_ChangeTilemapRectPalette(param0->unk_04, 4, 0, 0, 32, 24, 8); Bg_CopyTilemapBufferToVRAM(param0->unk_04, 4); } diff --git a/src/overlay097/ov97_0222D30C.c b/src/overlay097/ov97_0222D30C.c index 31fc547032..e19c62601d 100644 --- a/src/overlay097/ov97_0222D30C.c +++ b/src/overlay097/ov97_0222D30C.c @@ -758,18 +758,18 @@ static void ov97_0222DBC4(BgConfig *param0) static void ov97_0222DC20(BgConfig *param0) { - sub_02006E84(116, 0, 4, 16 * 2 * 8, 16 * 2, 86); - sub_02006E3C(116, 1, param0, 5, 0, 10 * 16 * 0x20, 1, 86); - sub_02006E60(116, 2, param0, 5, 0, 32 * 24 * 2, 1, 86); + Graphics_LoadPalette(116, 0, 4, 16 * 2 * 8, 16 * 2, 86); + Graphics_LoadTilesToBgLayer(116, 1, param0, 5, 0, 10 * 16 * 0x20, 1, 86); + Graphics_LoadTilemapToBgLayer(116, 2, param0, 5, 0, 32 * 24 * 2, 1, 86); Bg_ChangeTilemapRectPalette(param0, 5, 0, 0, 32, 24, 8); Bg_CopyTilemapBufferToVRAM(param0, 5); } static void ov97_0222DC9C(BgConfig *param0) { - sub_02006E84(116, 0, 0, 16 * 2 * 8, 16 * 2, 86); - sub_02006E3C(116, 1, param0, 1, 0, 10 * 16 * 0x20, 1, 86); - sub_02006E60(116, 2, param0, 1, 0, 32 * 24 * 2, 1, 86); + Graphics_LoadPalette(116, 0, 0, 16 * 2 * 8, 16 * 2, 86); + Graphics_LoadTilesToBgLayer(116, 1, param0, 1, 0, 10 * 16 * 0x20, 1, 86); + Graphics_LoadTilemapToBgLayer(116, 2, param0, 1, 0, 32 * 24 * 2, 1, 86); Bg_ChangeTilemapRectPalette(param0, 1, 0, 0, 32, 24, 8); Bg_CopyTilemapBufferToVRAM(param0, 1); diff --git a/src/overlay097/ov97_02230410.c b/src/overlay097/ov97_02230410.c index 3aa41091e1..e301897b2b 100644 --- a/src/overlay097/ov97_02230410.c +++ b/src/overlay097/ov97_02230410.c @@ -341,10 +341,10 @@ static void ov97_022305EC(Window *param0, int param1) static void ov97_02230664(BgConfig *param0) { - sub_02006E84(116, 11, 0, 16 * 2 * 15, 16 * 2, 87); - sub_02006E84(116, 16, 0, 16 * 2 * 12, 16 * 2, 87); - sub_02006E3C(116, 17, param0, 1, 0, 6 * 16 * 0x20, 1, 87); - sub_02006E60(116, 18, param0, 1, 0, 32 * 24 * 2, 1, 87); + Graphics_LoadPalette(116, 11, 0, 16 * 2 * 15, 16 * 2, 87); + Graphics_LoadPalette(116, 16, 0, 16 * 2 * 12, 16 * 2, 87); + Graphics_LoadTilesToBgLayer(116, 17, param0, 1, 0, 6 * 16 * 0x20, 1, 87); + Graphics_LoadTilemapToBgLayer(116, 18, param0, 1, 0, 32 * 24 * 2, 1, 87); Bg_ChangeTilemapRectPalette(param0, 1, 0, 0, 32, 24, 12); Bg_CopyTilemapBufferToVRAM(param0, 1); } @@ -716,20 +716,20 @@ static void ov97_02230F58(UnkStruct_ov97_02230868 *param0, u32 param1, u32 param static void ov97_02230F98(UnkStruct_ov97_02230868 *param0, int param1) { - sub_02006E84(116, 3, 0, 0, 16 * 16, param0->unk_00); - sub_02006E3C(116, 6, param0->unk_2A5C, 1, 0, 24 * 16 * 0x20, 1, param0->unk_00); + Graphics_LoadPalette(116, 3, 0, 0, 16 * 16, param0->unk_00); + Graphics_LoadTilesToBgLayer(116, 6, param0->unk_2A5C, 1, 0, 24 * 16 * 0x20, 1, param0->unk_00); switch (param1) { case 0: - sub_02006E60(116, 4, param0->unk_2A5C, 1, 0, 32 * 24 * 2, 1, param0->unk_00); + Graphics_LoadTilemapToBgLayer(116, 4, param0->unk_2A5C, 1, 0, 32 * 24 * 2, 1, param0->unk_00); break; case 1: - sub_02006E60(116, 5, param0->unk_2A5C, 1, 0, 32 * 24 * 2, 1, param0->unk_00); + Graphics_LoadTilemapToBgLayer(116, 5, param0->unk_2A5C, 1, 0, 32 * 24 * 2, 1, param0->unk_00); break; } - sub_02006E84(116, 0, 0, 16 * 2 * 11, 16 * 2, param0->unk_00); - sub_02006E3C(116, 1, param0->unk_2A5C, 3, 0 * 1, 1 * 16 * 0x20, 1, param0->unk_00); + Graphics_LoadPalette(116, 0, 0, 16 * 2 * 11, 16 * 2, param0->unk_00); + Graphics_LoadTilesToBgLayer(116, 1, param0->unk_2A5C, 3, 0 * 1, 1 * 16 * 0x20, 1, param0->unk_00); ov97_02230F58(param0, 2, 3, 32 * 24 * 2); @@ -794,7 +794,7 @@ static void ov97_022310FC(UnkStruct_ov97_02230868 *param0) ov97_02237A74(); ov97_02237B0C(116, 26, 23, 25, 24, 0); - sub_02006E84(19, PokeIconPalettesFileIndex(), 1, 3 * 0x20, 0, param0->unk_00); + Graphics_LoadPalette(19, PokeIconPalettesFileIndex(), 1, 3 * 0x20, 0, param0->unk_00); } v2 = 1; @@ -812,7 +812,7 @@ static void ov97_022310FC(UnkStruct_ov97_02230868 *param0) } param0->unk_2E90[v1] = ov97_02237D14(0, param0->unk_2E90[v1], v0, 16, 10 + v1); - v3 = sub_02006F50(19, PokeIconSpriteIndex(v2, 0, 0), 0, &v4, param0->unk_00); + v3 = Graphics_GetCharData(19, PokeIconSpriteIndex(v2, 0, 0), 0, &v4, param0->unk_00); DC_FlushRange(v4->pRawData, ((4 * 4) * 0x20)); GX_LoadOBJ(v4->pRawData, (0x64 + v1 * (4 * 4)) * 0x20, ((4 * 4) * 0x20)); diff --git a/src/overlay097/ov97_02233B18.c b/src/overlay097/ov97_02233B18.c index 2ee11641c6..75efc73c0d 100644 --- a/src/overlay097/ov97_02233B18.c +++ b/src/overlay097/ov97_02233B18.c @@ -528,7 +528,7 @@ static void ov97_02233FA4(UnkStruct_ov97_02234A2C *param0) sub_0200A328(param0->unk_1D0[0]); sub_0200A5C8(param0->unk_1D0[1]); - sub_02006E84(19, PokeIconPalettesFileIndex(), 1, 8 * 0x20, 0, 78); + Graphics_LoadPalette(19, PokeIconPalettesFileIndex(), 1, 8 * 0x20, 0, 78); } static void ov97_022340B0(UnkStruct_ov97_02234A2C *param0) @@ -1403,14 +1403,14 @@ static void ov97_02234DFC(UnkStruct_ov97_02234A2C *param0) Text_ResetAllPrinters(); Font_LoadTextPalette(0, 15 * 32, 78); - sub_02006E84(116, 19, 0, 0, 32 * 6, 78); - sub_02006E3C(116, 22, param0->unk_20, 2, 0, 10 * 16 * 0x20, 1, 78); + Graphics_LoadPalette(116, 19, 0, 0, 32 * 6, 78); + Graphics_LoadTilesToBgLayer(116, 22, param0->unk_20, 2, 0, 10 * 16 * 0x20, 1, 78); Font_InitManager(FONT_SUBSCREEN, 78); } static void ov97_02234E7C(UnkStruct_ov97_02234A2C *param0) { - sub_02006E60(116, 20, param0->unk_20, 2, 0, 32 * 24 * 2, 1, 78); + Graphics_LoadTilemapToBgLayer(116, 20, param0->unk_20, 2, 0, 32 * 24 * 2, 1, 78); Bg_ChangeTilemapRectPalette(param0->unk_20, 2, 0, 0, 32, 24, Unk_ov97_0223EA60[param0->unk_00]); Bg_CopyTilemapBufferToVRAM(param0->unk_20, 2); } @@ -1477,7 +1477,7 @@ static void ov97_02234F88(UnkStruct_ov97_02234A2C *param0) ov97_02234278(v1, v2, v4, v3, v0, param0->unk_478[v0]); } - sub_02006E60(116, 21, param0->unk_20, 2, 0, 32 * 24 * 2, 1, 78); + Graphics_LoadTilemapToBgLayer(116, 21, param0->unk_20, 2, 0, 32 * 24 * 2, 1, 78); Bg_ChangeTilemapRectPalette(param0->unk_20, 2, 0, 0, 32, 24, Unk_ov97_0223EA60[param0->unk_00]); Bg_CopyTilemapBufferToVRAM(param0->unk_20, 2); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG1, 0); diff --git a/src/overlay097/ov97_02237694.c b/src/overlay097/ov97_02237694.c index 500c3054ea..eb03b71b1f 100644 --- a/src/overlay097/ov97_02237694.c +++ b/src/overlay097/ov97_02237694.c @@ -594,7 +594,7 @@ static void ov97_02237EF8(CellActor *param0, Pokemon *param1, int param2, int pa NNSG2dImagePaletteProxy *v6 = CellActor_GetPaletteProxy(param0); u32 v7 = NNS_G2dGetImagePaletteLocation(v6, NNS_G2D_VRAM_TYPE_2DSUB); - sub_02006E84(param5->archive, param5->palette, 5, 0x20 * (2 + 1) + v7, 32, v3->unk_08); + Graphics_LoadPalette(param5->archive, param5->palette, 5, 0x20 * (2 + 1) + v7, 32, v3->unk_08); } } @@ -661,7 +661,7 @@ static void ov97_022380C8(UnkStruct_ov97_0223F550 *param0, int param1, UnkStruct static void ov97_02238174(void *param0) { UnkStruct_ov97_0223F550 *v0 = (UnkStruct_ov97_0223F550 *)param0; - sub_02006E84(116, 29, 4, 16 * 2 * 8, 16 * 2 * 6, v0->unk_08); + Graphics_LoadPalette(116, 29, 4, 16 * 2 * 8, 16 * 2 * 6, v0->unk_08); } void ov97_02238194(BgConfig *param0, UnkStruct_0202DF40 *param1) @@ -672,7 +672,7 @@ void ov97_02238194(BgConfig *param0, UnkStruct_0202DF40 *param1) v1 = param1->unk_00; v0 = ov97_02237EA8(v1); - sub_02006E3C(116, 30, param0, 5, 0, 10 * 16 * 0x20, 1, v2->unk_08); + Graphics_LoadTilesToBgLayer(116, 30, param0, 5, 0, 10 * 16 * 0x20, 1, v2->unk_08); { NNSG2dScreenData *v3; diff --git a/src/overlay098/ov98_022471C8.c b/src/overlay098/ov98_022471C8.c index 7d5e3f5876..63c5bb085e 100644 --- a/src/overlay098/ov98_022471C8.c +++ b/src/overlay098/ov98_022471C8.c @@ -627,17 +627,17 @@ static void ov98_02247704 (UnkStruct_ov98_02247704 * param0) v1 = NARC_ctor(NARC_INDEX_DATA__WIFIP2PMATCH, 109); - sub_02007130(v1, 3, 0, 0, 0, 109); - sub_02007130(v1, 3, 4, 0, 0, 109); + Graphics_LoadPaletteFromOpenNARC(v1, 3, 0, 0, 0, 109); + Graphics_LoadPaletteFromOpenNARC(v1, 3, 4, 0, 0, 109); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 109); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 109); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_08), 109); sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 109); sub_0200DAA4(v0, 2, (1 + (18 + 12)), 11, 0, 109); - sub_020070E8(v1, 2, v0, 1, 0, 0, 0, 109); - sub_0200710C(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 109); - sub_020070E8(v1, 10, v0, 5, 0, 0, 0, 109); - sub_0200710C(v1, 11, v0, 5, 0, 32 * 24 * 2, 0, 109); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 2, v0, 1, 0, 0, 0, 109); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 109); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 10, v0, 5, 0, 0, 0, 109); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 11, v0, 5, 0, 32 * 24 * 2, 0, 109); Bg_MaskPalette(0, 0); Bg_MaskPalette(4, 0); @@ -650,9 +650,9 @@ static void ov98_02247704 (UnkStruct_ov98_02247704 * param0) GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG3, 0); - sub_020070E8(v1, 11, v0, 3, 0, 0, 0, 109); - sub_0200710C(v1, 10, v0, 3, 0, 0, 0, 109); - sub_02007130(v1, 12, 0, 9 * 0x20, 0x20, 109); + Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 11, v0, 3, 0, 0, 0, 109); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 10, v0, 3, 0, 0, 0, 109); + Graphics_LoadPaletteFromOpenNARC(v1, 12, 0, 9 * 0x20, 0x20, 109); NARC_dtor(v1); } diff --git a/src/overlay099/ov99_021D1A54.c b/src/overlay099/ov99_021D1A54.c index 2673b4efea..3ab7356962 100644 --- a/src/overlay099/ov99_021D1A54.c +++ b/src/overlay099/ov99_021D1A54.c @@ -389,7 +389,7 @@ static void ov99_021D1BC4(UnkStruct_ov99_021D2CB0 *param0, CellActorData **param } param0->unk_10F4 = Heap_AllocFromHeap(75, (0x20 * 8)); - v3 = sub_020071B4(param0->unk_10F8, v5, 0, &v4, 75); + v3 = Graphics_GetCharDataFromOpenNARC(param0->unk_10F8, v5, 0, &v4, 75); MI_CpuCopy32(v4->pRawData, param0->unk_10F4, (0x20 * 8)); Heap_FreeToHeap(v3); @@ -454,12 +454,12 @@ static void ov99_021D1D68(UnkStruct_ov99_021D2CB0 *param0) BgConfig *v0 = param0->unk_08; PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 18, 75, 0, 0, 0); - sub_020070E8(param0->unk_10F8, 9, param0->unk_08, 2, 0, 0, 0, 75); - sub_0200710C(param0->unk_10F8, 3, param0->unk_08, 2, 0, 0, 0, 75); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_10F8, 9, param0->unk_08, 2, 0, 0, 0, 75); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_10F8, 3, param0->unk_08, 2, 0, 0, 0, 75); PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 21, 75, 1, 0, 0); - sub_020070E8(param0->unk_10F8, 12, param0->unk_08, 7, 0, 0, 0, 75); - sub_0200710C(param0->unk_10F8, 6, param0->unk_08, 7, 0, 0, 0, 75); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_10F8, 12, param0->unk_08, 7, 0, 0, 0, 75); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_10F8, 6, param0->unk_08, 7, 0, 0, 0, 75); Bg_SetOffset(v0, 2, 0, 0); Bg_SetOffset(v0, 2, 3, 0); @@ -663,18 +663,18 @@ static void ov99_021D2180(UnkStruct_ov99_021D2CB0 *param0) BgConfig *v0 = param0->unk_08; PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 19, 75, 0, 0, 0); - sub_020070E8(param0->unk_10F8, 10, param0->unk_08, 2, 0, 0, 0, 75); - sub_0200710C(param0->unk_10F8, 4, param0->unk_08, 2, 0, 0, 0, 75); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_10F8, 10, param0->unk_08, 2, 0, 0, 0, 75); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_10F8, 4, param0->unk_08, 2, 0, 0, 0, 75); PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 22, 75, 1, 0, 0); - sub_020070E8(param0->unk_10F8, 13, param0->unk_08, 7, 0, 0, 0, 75); - sub_0200710C(param0->unk_10F8, 7, param0->unk_08, 7, 0, 0, 0, 75); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_10F8, 13, param0->unk_08, 7, 0, 0, 0, 75); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_10F8, 7, param0->unk_08, 7, 0, 0, 0, 75); { NNSG2dPaletteData *v1; void *v2; - v2 = sub_020071EC(param0->unk_10F8, 16, &v1, 75); + v2 = Graphics_GetPlttDataFromOpenNARC(param0->unk_10F8, 16, &v1, 75); MI_CpuCopy16(v1->pRawData, param0->unk_FA4.unk_08_val2.unk_08, 0x20 * 4); Heap_FreeToHeap(v2); } @@ -803,18 +803,18 @@ static void ov99_021D24F0(UnkStruct_ov99_021D2CB0 *param0) BgConfig *v0 = param0->unk_08; PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 20, 75, 0, 0, 0); - sub_020070E8(param0->unk_10F8, 11, param0->unk_08, 2, 0, 0, 0, 75); - sub_0200710C(param0->unk_10F8, 5, param0->unk_08, 2, 0, 0, 0, 75); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_10F8, 11, param0->unk_08, 2, 0, 0, 0, 75); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_10F8, 5, param0->unk_08, 2, 0, 0, 0, 75); PaletteData_LoadBufferFromFileStart(param0->unk_0C, 127, 23, 75, 1, 0, 0); - sub_020070E8(param0->unk_10F8, 14, param0->unk_08, 7, 0, 0, 0, 75); - sub_0200710C(param0->unk_10F8, 8, param0->unk_08, 7, 0, 0, 0, 75); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_10F8, 14, param0->unk_08, 7, 0, 0, 0, 75); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_10F8, 8, param0->unk_08, 7, 0, 0, 0, 75); { NNSG2dPaletteData *v1; void *v2; - v2 = sub_020071EC(param0->unk_10F8, 17, &v1, 75); + v2 = Graphics_GetPlttDataFromOpenNARC(param0->unk_10F8, 17, &v1, 75); MI_CpuCopy16(v1->pRawData, param0->unk_FA4.unk_08_val3.unk_08, 0x20 * 8); Heap_FreeToHeap(v2); diff --git a/src/overlay099/ov99_021D4134.c b/src/overlay099/ov99_021D4134.c index b589c37e58..3389f7aca1 100644 --- a/src/overlay099/ov99_021D4134.c +++ b/src/overlay099/ov99_021D4134.c @@ -182,7 +182,7 @@ void ov99_021D439C(UnkStruct_ov99_021D2CB0 *param0, int param1, int param2, int break; } - v2 = sub_020071EC(param0->unk_10F8, v3->unk_04, &v1, 75); + v2 = Graphics_GetPlttDataFromOpenNARC(param0->unk_10F8, v3->unk_04, &v1, 75); DC_FlushRange(v1->pRawData, v1->szByte); GX_BeginLoadBGExtPltt(); @@ -198,8 +198,8 @@ void ov99_021D439C(UnkStruct_ov99_021D2CB0 *param0, int param1, int param2, int Heap_FreeToHeap(v2); PaletteData_FillBufferRange(param0->unk_0C, 0, 2, 0x0, 0, 1); PaletteData_FillBufferRange(param0->unk_0C, 1, 2, 0x0, 0, 1); - sub_020070E8(param0->unk_10F8, v3->unk_00, param0->unk_08, param2, 0, 0, 0, 75); - sub_0200710C(param0->unk_10F8, v3->unk_02, param0->unk_08, param2, 0, 0, 0, 75); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_10F8, v3->unk_00, param0->unk_08, param2, 0, 0, 0, 75); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_10F8, v3->unk_02, param0->unk_08, param2, 0, 0, 0, 75); Bg_SetOffset(v0, param2, 0, v3->unk_06); Bg_SetOffset(v0, param2, 3, v3->unk_08); } diff --git a/src/overlay100/ov100_021D13E4.c b/src/overlay100/ov100_021D13E4.c index 7a01205a04..ce823277aa 100644 --- a/src/overlay100/ov100_021D13E4.c +++ b/src/overlay100/ov100_021D13E4.c @@ -245,9 +245,9 @@ static void ov100_021D1808(UnkStruct_ov100_021D1808 *param0) PaletteData *v4 = param0->unk_7C4->unk_10; int v5 = 50000; - sub_020070E8(v0, 70, v1, 5, 0, 0, 0, 111); - sub_0200710C(v0, 72, v1, 5, 0, 0, 0, 111); - sub_0200710C(v0, 73, v1, 4, 0, 0, 0, 111); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 70, v1, 5, 0, 0, 0, 111); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 72, v1, 5, 0, 0, 0, 111); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 73, v1, 4, 0, 0, 0, 111); PaletteData_LoadBufferFromFileStart(v4, 172, 71, 111, 1, 0x20 * 2, 0); { diff --git a/src/overlay100/ov100_021D1C44.c b/src/overlay100/ov100_021D1C44.c index f855c409b0..580c9eebb9 100644 --- a/src/overlay100/ov100_021D1C44.c +++ b/src/overlay100/ov100_021D1C44.c @@ -78,8 +78,8 @@ static void ov100_021D1C98(UnkStruct_ov100_021D1C98 *param0) PaletteData *v4 = param0->unk_1EBC->unk_10; int v5 = 50000; - sub_020070E8(v0, 18, v1, 5, 0, 0, 0, 111); - sub_0200710C(v0, 20, v1, 5, 0, 0, 0, 111); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 18, v1, 5, 0, 0, 0, 111); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 20, v1, 5, 0, 0, 0, 111); PaletteData_LoadBufferFromFileStart(v4, 172, 19, 111, 1, 0x20 * 2, 0); PaletteData_LoadBufferFromFileStart(v4, 172, 19, 111, 0, 0x20 * 2, 0); diff --git a/src/overlay100/ov100_021D2F0C.c b/src/overlay100/ov100_021D2F0C.c index b3eefe061b..82ca221018 100644 --- a/src/overlay100/ov100_021D2F0C.c +++ b/src/overlay100/ov100_021D2F0C.c @@ -49,8 +49,8 @@ static void ov100_021D2F0C(BgConfig *param0, PaletteData *param1) int v4 = 4; int v5 = 111; - sub_02006E3C(v0, v1, param0, v4, 0, 0, 1, v5); - sub_02006E60(v0, v2, param0, v4, 0, 0, 1, v5); + Graphics_LoadTilesToBgLayer(v0, v1, param0, v4, 0, 0, 1, v5); + Graphics_LoadTilemapToBgLayer(v0, v2, param0, v4, 0, 0, 1, v5); PaletteData_LoadBufferFromFileStart(param1, v0, v3, v5, 1, 0x20 * 1, 0); } diff --git a/src/overlay102/ov102_021D0D80.c b/src/overlay102/ov102_021D0D80.c index 83ec58ec44..d3e28f282f 100644 --- a/src/overlay102/ov102_021D0D80.c +++ b/src/overlay102/ov102_021D0D80.c @@ -368,23 +368,23 @@ static void ov102_021D1274(UnkStruct_ov102_021D0F8C *param0) v5 = 5; } - sub_02006E60(132, v0, param0->unk_10, 3, 0, 0, 0, param0->unk_00); - sub_02006E3C(132, v1, param0->unk_10, 3, 0, 0, 0, param0->unk_00); - sub_02006E84(132, v2, 0, 0 * (2 * 16), (2 * 16), param0->unk_00); - sub_02006E60(132, v0, param0->unk_10, 7, 0, 0, 0, param0->unk_00); - sub_02006E3C(132, v1, param0->unk_10, 7, 0, 0, 0, param0->unk_00); - sub_02006E84(132, v2, 4, 0 * (2 * 16), (2 * 16), param0->unk_00); - - sub_02006E60(132, v3, param0->unk_10, 1, 0, 0, 0, param0->unk_00); + Graphics_LoadTilemapToBgLayer(132, v0, param0->unk_10, 3, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(132, v1, param0->unk_10, 3, 0, 0, 0, param0->unk_00); + Graphics_LoadPalette(132, v2, 0, 0 * (2 * 16), (2 * 16), param0->unk_00); + Graphics_LoadTilemapToBgLayer(132, v0, param0->unk_10, 7, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(132, v1, param0->unk_10, 7, 0, 0, 0, param0->unk_00); + Graphics_LoadPalette(132, v2, 4, 0 * (2 * 16), (2 * 16), param0->unk_00); + + Graphics_LoadTilemapToBgLayer(132, v3, param0->unk_10, 1, 0, 0, 0, param0->unk_00); Bg_ChangeTilemapRectPalette(param0->unk_10, 1, 0, 0, 32, 24, 1); Bg_CopyTilemapBufferToVRAM(param0->unk_10, 1); - sub_02006E3C(132, v4, param0->unk_10, 1, 0, 0, 0, param0->unk_00); - sub_02006E84(132, v5, 0, 1 * (2 * 16), (2 * 16), param0->unk_00); - sub_02006E60(132, v3, param0->unk_10, 5, 0, 0, 0, param0->unk_00); + Graphics_LoadTilesToBgLayer(132, v4, param0->unk_10, 1, 0, 0, 0, param0->unk_00); + Graphics_LoadPalette(132, v5, 0, 1 * (2 * 16), (2 * 16), param0->unk_00); + Graphics_LoadTilemapToBgLayer(132, v3, param0->unk_10, 5, 0, 0, 0, param0->unk_00); Bg_ChangeTilemapRectPalette(param0->unk_10, 5, 0, 0, 32, 24, 1); Bg_CopyTilemapBufferToVRAM(param0->unk_10, 5); - sub_02006E3C(132, v4, param0->unk_10, 5, 0, 0, 0, param0->unk_00); - sub_02006E84(132, v5, 4, 1 * (2 * 16), (2 * 16), param0->unk_00); + Graphics_LoadTilesToBgLayer(132, v4, param0->unk_10, 5, 0, 0, 0, param0->unk_00); + Graphics_LoadPalette(132, v5, 4, 1 * (2 * 16), (2 * 16), param0->unk_00); Bg_ClearTilesRange(0, 32, 0, param0->unk_00); Bg_ClearTilesRange(4, 32, 0, param0->unk_00); diff --git a/src/overlay104/ov104_02237DD8.c b/src/overlay104/ov104_02237DD8.c index a43690dad0..cdadc338b2 100644 --- a/src/overlay104/ov104_02237DD8.c +++ b/src/overlay104/ov104_02237DD8.c @@ -636,14 +636,14 @@ void ov104_02238658(void *param0, UnkStruct_ov104_0223C4CC *param1) if (v1->unk_13 != 32) { v0 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_BG, 94); - sub_020070E8(v0, Unk_ov104_0223FBBA[v1->unk_13][0], param1->unk_00, 2, 0, 0, 1, 94); - sub_0200710C(v0, Unk_ov104_0223FBBA[v1->unk_13][1], param1->unk_00, 2, 0, 0, 1, 94); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, Unk_ov104_0223FBBA[v1->unk_13][0], param1->unk_00, 2, 0, 0, 1, 94); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, Unk_ov104_0223FBBA[v1->unk_13][1], param1->unk_00, 2, 0, 0, 1, 94); { NNSG2dPaletteData *v2; void *v3; - v3 = sub_020071EC(v0, Unk_ov104_0223FBBA[v1->unk_13][2], &v2, 94); + v3 = Graphics_GetPlttDataFromOpenNARC(v0, Unk_ov104_0223FBBA[v1->unk_13][2], &v2, 94); DC_FlushRange(v2->pRawData, v2->szByte); GX_BeginLoadBGExtPltt(); @@ -671,7 +671,7 @@ void ov104_02238728(void *param0, UnkStruct_ov104_0223C4CC *param1) v1 = (UnkStruct_ov104_0223BFFC *)param0; v0 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_BG, 94); - sub_0200710C(v0, 53, param1->unk_00, 3, 0, 0, 1, 94); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 53, param1->unk_00, 3, 0, 0, 1, 94); Bg_ScheduleTilemapTransfer(param1->unk_00, 3); NARC_dtor(v0); @@ -900,7 +900,7 @@ void ov104_02238AB4(u8 param0, u8 param1) memset(v5, 0, 0x1000 * 2); v4 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_BG, 94); - v3 = sub_020071EC(v4, v0, &v2, 94); + v3 = Graphics_GetPlttDataFromOpenNARC(v4, v0, &v2, 94); BlendPalette(v2->pRawData, v5, 0x1000, param0, 0x0); DC_FlushRange(v5, 0x1000 * 2); diff --git a/src/overlay104/ov104_0223C2D4.c b/src/overlay104/ov104_0223C2D4.c index 1e57cb62a3..24024d5d87 100644 --- a/src/overlay104/ov104_0223C2D4.c +++ b/src/overlay104/ov104_0223C2D4.c @@ -635,8 +635,8 @@ static void ov104_0223CC10(UnkStruct_ov104_0223C4CC *param0) v0 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_BG, 94); - sub_020070E8(v0, 125, param0->unk_00, 4, 0, 0, 1, 94); - sub_0200710C(v0, 126, param0->unk_00, 4, 0, 0, 1, 94); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 125, param0->unk_00, 4, 0, 0, 1, 94); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 126, param0->unk_00, 4, 0, 0, 1, 94); PaletteData_LoadBufferFromFileStart(param0->unk_04, 150, 171, 94, 1, 0x20, 0 * 16); NARC_dtor(v0); } @@ -701,7 +701,7 @@ static void ov104_0223CC74(UnkStruct_ov104_0223C4CC *param0, int param1, const T v2 = ov104_0222EA90(param1, 5); v3 = NARC_ctor(v2, 94); - sub_020070E8(v3, ov104_0222EA90(param1, 7), param0->unk_00, 3, 0, 0, 1, 94); + Graphics_LoadTilesToBgLayerFromOpenNARC(v3, ov104_0222EA90(param1, 7), param0->unk_00, 3, 0, 0, 1, 94); if (v4 == GX_BGMODE_0) { PaletteData_LoadBufferFromFileStart(param0->unk_04, v2, ov104_0222EA90(param1, 8), 94, 0, ((10 - 0 + 1) * 0x20), 0 * 16); @@ -709,7 +709,7 @@ static void ov104_0223CC74(UnkStruct_ov104_0223C4CC *param0, int param1, const T NNSG2dPaletteData *v5; void *v6; - v6 = sub_020071EC(v3, ov104_0222EA90(param1, 8), &v5, 94); + v6 = Graphics_GetPlttDataFromOpenNARC(v3, ov104_0222EA90(param1, 8), &v5, 94); DC_FlushRange(v5->pRawData, v5->szByte); GX_BeginLoadBGExtPltt(); @@ -720,11 +720,11 @@ static void ov104_0223CC74(UnkStruct_ov104_0223C4CC *param0, int param1, const T } PaletteData_FillBufferRange(param0->unk_04, 0, 2, 0x0, 0, 1); - sub_0200710C(v3, ov104_0222EA90(param1, 6), param0->unk_00, 3, 0, 0, 1, 94); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v3, ov104_0222EA90(param1, 6), param0->unk_00, 3, 0, 0, 1, 94); if (ov104_0222EA90(param1, 9) != 0xffff) { - sub_020070E8(v3, ov104_0222EA90(param1, 10), param0->unk_00, 2, 0, 0, 1, 94); - sub_0200710C(v3, ov104_0222EA90(param1, 9), param0->unk_00, 2, 0, 0, 1, 94); + Graphics_LoadTilesToBgLayerFromOpenNARC(v3, ov104_0222EA90(param1, 10), param0->unk_00, 2, 0, 0, 1, 94); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v3, ov104_0222EA90(param1, 9), param0->unk_00, 2, 0, 0, 1, 94); if (v4 == GX_BGMODE_0) { (void)0; @@ -732,7 +732,7 @@ static void ov104_0223CC74(UnkStruct_ov104_0223C4CC *param0, int param1, const T NNSG2dPaletteData *v7; void *v8; - v8 = sub_020071EC(v3, ov104_0222EA90(param1, 11), &v7, 94); + v8 = Graphics_GetPlttDataFromOpenNARC(v3, ov104_0222EA90(param1, 11), &v7, 94); DC_FlushRange(v7->pRawData, v7->szByte); GX_BeginLoadBGExtPltt(); diff --git a/src/overlay104/ov104_0223D9E4.c b/src/overlay104/ov104_0223D9E4.c index 223b9536e6..1d51962d6c 100644 --- a/src/overlay104/ov104_0223D9E4.c +++ b/src/overlay104/ov104_0223D9E4.c @@ -100,7 +100,7 @@ static UnkStruct_ov104_0223DB34 *ov104_0223DA40(BgConfig *param0) v1 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_BG, 94); for (v4 = 0; v4 < 2; v4++) { - v2 = sub_020071D0(v1, Unk_ov104_022418B0[v4], 1, &v3, 94); + v2 = Graphics_GetScrnDataFromOpenNARC(v1, Unk_ov104_022418B0[v4], 1, &v3, 94); MI_CpuCopy32(v3->rawData, v0->unk_08[v4], 0x1000); Heap_FreeToHeap(v2); } @@ -115,12 +115,12 @@ static UnkStruct_ov104_0223DB34 *ov104_0223DA40(BgConfig *param0) v5 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_BG, 94); - v6 = sub_020071B4(v5, 14, 1, &v7, 94); + v6 = Graphics_GetCharDataFromOpenNARC(v5, 14, 1, &v7, 94); MI_CpuCopy32(v7->pRawData, v0->unk_2008[0], v7->szByte); Heap_FreeToHeap(v6); - v6 = sub_020071B4(v5, 15, 1, &v7, 94); + v6 = Graphics_GetCharDataFromOpenNARC(v5, 15, 1, &v7, 94); MI_CpuCopy32(v7->pRawData, v0->unk_2008[1], v7->szByte); Heap_FreeToHeap(v6); diff --git a/src/overlay104/ov104_0223DC7C.c b/src/overlay104/ov104_0223DC7C.c index efe431620a..622b305eec 100644 --- a/src/overlay104/ov104_0223DC7C.c +++ b/src/overlay104/ov104_0223DC7C.c @@ -621,8 +621,8 @@ static void ov104_0223E5A8(UnkStruct_ov104_0223DD30 *param0, const UnkStruct_ov1 G2_SetWnd1Position(0, 0, 0, 0); PaletteData_LoadBufferFromFileStart(param0->unk_1C, 112, param1->unk_08, 94, 0, 0x20, 12 * 16); - sub_020070E8(param0->unk_24, param1->unk_09, param0->unk_10, 1, 0, 0, 0, 94); - sub_0200710C(param0->unk_24, param1->unk_0A, param0->unk_10, 1, 0, 0, 0, 94); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_24, param1->unk_09, param0->unk_10, 1, 0, 0, 0, 94); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_24, param1->unk_0A, param0->unk_10, 1, 0, 0, 0, 94); Bg_ChangeTilemapRectPalette(param0->unk_10, 1, 0, 0, 32, 32, 12); Bg_ScheduleTilemapTransfer(param0->unk_10, 1); @@ -630,7 +630,7 @@ static void ov104_0223E5A8(UnkStruct_ov104_0223DD30 *param0, const UnkStruct_ov1 void *v0; NNSG2dPaletteData *v1; - v0 = sub_02006F88(112, param1->unk_08, &v1, 94); + v0 = Graphics_GetPlttData(112, param1->unk_08, &v1, 94); MI_CpuCopy16(v1->pRawData, param0->unk_40, 8 * 32); Heap_FreeToHeap(v0); diff --git a/src/overlay105/ov105_02241AE0.c b/src/overlay105/ov105_02241AE0.c index 59e7a8c1d3..74e1ff51d3 100644 --- a/src/overlay105/ov105_02241AE0.c +++ b/src/overlay105/ov105_02241AE0.c @@ -2445,12 +2445,12 @@ static void ov105_02244924(UnkStruct_ov105_02241FF4 *param0, u32 param1) static void ov105_022449A4(UnkStruct_ov105_02241FF4 *param0, u32 param1) { - sub_020070E8(param0->unk_338, 4, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_338, 4, param0->unk_4C, param1, 0, 0, 1, 93); if (ov104_0223AED4(param0->unk_09) == 0) { - sub_0200710C(param0->unk_338, 5, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 5, param0->unk_4C, param1, 0, 0, 1, 93); } else { - sub_0200710C(param0->unk_338, 11, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 11, param0->unk_4C, param1, 0, 0, 1, 93); } return; @@ -2458,24 +2458,24 @@ static void ov105_022449A4(UnkStruct_ov105_02241FF4 *param0, u32 param1) static void ov105_02244A18(UnkStruct_ov105_02241FF4 *param0, u32 param1) { - sub_020070E8(param0->unk_338, 4, param0->unk_4C, param1, 0, 0, 1, 93); - sub_0200710C(param0->unk_338, 7, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_338, 4, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 7, param0->unk_4C, param1, 0, 0, 1, 93); return; } static void ov105_02244A60(UnkStruct_ov105_02241FF4 *param0, u32 param1) { - sub_020070E8(param0->unk_338, 4, param0->unk_4C, param1, 0, 0, 1, 93); - sub_0200710C(param0->unk_338, 8, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_338, 4, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 8, param0->unk_4C, param1, 0, 0, 1, 93); return; } static void ov105_02244AA8(UnkStruct_ov105_02241FF4 *param0, u32 param1) { - sub_020070E8(param0->unk_338, 4, param0->unk_4C, param1, 0, 0, 1, 93); - sub_0200710C(param0->unk_338, 9, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_338, 4, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 9, param0->unk_4C, param1, 0, 0, 1, 93); Bg_SetPriority(1, 2); return; @@ -2486,7 +2486,7 @@ static void ov105_02244AF8(void) void *v0; NNSG2dPaletteData *v1; - v0 = sub_02006F88(150, 130, &v1, 93); + v0 = Graphics_GetPlttData(150, 130, &v1, 93); DC_FlushRange(v1->pRawData, (sizeof(u16) * 16 * 11)); GX_LoadBGPltt(v1->pRawData, 0, (sizeof(u16) * 16 * 11)); @@ -2497,9 +2497,9 @@ static void ov105_02244AF8(void) static void ov105_02244B30(UnkStruct_ov105_02241FF4 *param0, u32 param1) { - sub_020070E8(param0->unk_338, 125, param0->unk_4C, param1, 0, 0, 1, 93); - sub_0200710C(param0->unk_338, 126, param0->unk_4C, param1, 0, 0, 1, 93); - sub_02007130(param0->unk_338, 171, 4, 0, 0x20, 93); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_338, 125, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 126, param0->unk_4C, param1, 0, 0, 1, 93); + Graphics_LoadPaletteFromOpenNARC(param0->unk_338, 171, 4, 0, 0x20, 93); return; } @@ -2507,9 +2507,9 @@ static void ov105_02244B30(UnkStruct_ov105_02241FF4 *param0, u32 param1) static void ov105_02244B90(UnkStruct_ov105_02241FF4 *param0, u32 param1) { if (ov104_0223AED4(param0->unk_09) == 0) { - sub_0200710C(param0->unk_338, 5, param0->unk_4C, 3, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 5, param0->unk_4C, 3, 0, 0, 1, 93); } else { - sub_0200710C(param0->unk_338, 11, param0->unk_4C, 3, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 11, param0->unk_4C, 3, 0, 0, 1, 93); } return; @@ -2517,16 +2517,16 @@ static void ov105_02244B90(UnkStruct_ov105_02241FF4 *param0, u32 param1) static void ov105_02244BE4(UnkStruct_ov105_02241FF4 *param0, u32 param1) { - sub_0200710C(param0->unk_338, 7, param0->unk_4C, 3, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 7, param0->unk_4C, 3, 0, 0, 1, 93); return; } static void ov105_02244C0C(UnkStruct_ov105_02241FF4 *param0, u32 param1) { if (ov104_0223AED4(param0->unk_09) == 0) { - sub_0200710C(param0->unk_338, 10, param0->unk_4C, 3, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 10, param0->unk_4C, 3, 0, 0, 1, 93); } else { - sub_0200710C(param0->unk_338, 12, param0->unk_4C, 3, 0, 0, 1, 93); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_338, 12, param0->unk_4C, 3, 0, 0, 1, 93); } return; diff --git a/src/overlay106/ov106_02241AE0.c b/src/overlay106/ov106_02241AE0.c index d4500a2d15..8960d33772 100644 --- a/src/overlay106/ov106_02241AE0.c +++ b/src/overlay106/ov106_02241AE0.c @@ -1026,8 +1026,8 @@ static void ov106_0224273C(BgConfig *param0) static void ov106_0224283C(UnkStruct_ov106_02243118 *param0, u32 param1) { - sub_020070E8(param0->unk_29C, 23, param0->unk_48, param1, 0, 0, 1, 98); - sub_0200710C(param0->unk_29C, 24, param0->unk_48, param1, 0, 0, 1, 98); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_29C, 23, param0->unk_48, param1, 0, 0, 1, 98); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_29C, 24, param0->unk_48, param1, 0, 0, 1, 98); return; } @@ -1037,7 +1037,7 @@ static void ov106_02242884(void) void *v0; NNSG2dPaletteData *v1; - v0 = sub_02006F88(150, 134, &v1, 98); + v0 = Graphics_GetPlttData(150, 134, &v1, 98); DC_FlushRange(v1->pRawData, (sizeof(u16) * 16 * 6)); GX_LoadBGPltt(v1->pRawData, 0, (sizeof(u16) * 16 * 6)); @@ -1048,9 +1048,9 @@ static void ov106_02242884(void) static void ov106_022428B8(UnkStruct_ov106_02243118 *param0, u32 param1) { - sub_020070E8(param0->unk_29C, 125, param0->unk_48, param1, 0, 0, 1, 98); - sub_0200710C(param0->unk_29C, 126, param0->unk_48, param1, 0, 0, 1, 98); - sub_02007130(param0->unk_29C, 171, 4, 0, 0x20, 98); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_29C, 125, param0->unk_48, param1, 0, 0, 1, 98); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_29C, 126, param0->unk_48, param1, 0, 0, 1, 98); + Graphics_LoadPaletteFromOpenNARC(param0->unk_29C, 171, 4, 0, 0x20, 98); return; } diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index 19b29ea494..0671fd0110 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -1736,12 +1736,12 @@ static void ov107_02243444(BgConfig *param0) static void ov107_02243588 (UnkStruct_ov107_02241D6C * param0, u32 param1) { - sub_020070E8(param0->unk_440, 34, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_440, 34, param0->unk_4C, param1, 0, 0, 1, 100); if (ov104_0223BA14(param0->unk_09) == 0) { - sub_0200710C(param0->unk_440, 35, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_440, 35, param0->unk_4C, param1, 0, 0, 1, 100); } else { - sub_0200710C(param0->unk_440, 36, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_440, 36, param0->unk_4C, param1, 0, 0, 1, 100); } return; @@ -1752,7 +1752,7 @@ static void ov107_022435FC (void) void * v0; NNSG2dPaletteData * v1; - v0 = sub_02006F88(150, 137, &v1, 100); + v0 = Graphics_GetPlttData(150, 137, &v1, 100); DC_FlushRange(v1->pRawData, (sizeof(u16) * 16 * 4)); GX_LoadBGPltt(v1->pRawData, 0, (sizeof(u16) * 16 * 4)); @@ -1763,8 +1763,8 @@ static void ov107_022435FC (void) static void ov107_02243630 (UnkStruct_ov107_02241D6C * param0, u32 param1) { - sub_020070E8(param0->unk_440, 34, param0->unk_4C, param1, 0, 0, 1, 100); - sub_0200710C(param0->unk_440, 38, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_440, 34, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_440, 38, param0->unk_4C, param1, 0, 0, 1, 100); return; } @@ -1774,7 +1774,7 @@ static void ov107_02243678 (void) void * v0; NNSG2dPaletteData * v1; - v0 = sub_02006F88(150, 137, &v1, 100); + v0 = Graphics_GetPlttData(150, 137, &v1, 100); DC_FlushRange(v1->pRawData, (sizeof(u16) * 16 * 4)); GX_LoadBGPltt(v1->pRawData, 0, (sizeof(u16) * 16 * 4)); @@ -1785,25 +1785,25 @@ static void ov107_02243678 (void) static void ov107_022436AC (UnkStruct_ov107_02241D6C * param0, u32 param1) { - sub_020070E8(param0->unk_440, 34, param0->unk_4C, param1, 0, 0, 1, 100); - sub_0200710C(param0->unk_440, 39, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_440, 34, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_440, 39, param0->unk_4C, param1, 0, 0, 1, 100); return; } static void ov107_022436F4 (UnkStruct_ov107_02241D6C * param0, u32 param1) { - sub_020070E8(param0->unk_440, 34, param0->unk_4C, param1, 0, 0, 1, 100); - sub_0200710C(param0->unk_440, 37, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_440, 34, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_440, 37, param0->unk_4C, param1, 0, 0, 1, 100); return; } static void ov107_0224373C (UnkStruct_ov107_02241D6C * param0, u32 param1) { - sub_020070E8(param0->unk_440, 125, param0->unk_4C, param1, 0, 0, 1, 100); - sub_0200710C(param0->unk_440, 126, param0->unk_4C, param1, 0, 0, 1, 100); - sub_02007130(param0->unk_440, 171, 4, 0, 0x20, 100); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_440, 125, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_440, 126, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadPaletteFromOpenNARC(param0->unk_440, 171, 4, 0, 0x20, 100); return; } diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index 5a58a075ad..300d50777c 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -1403,12 +1403,12 @@ static void ov107_02247340(BgConfig *param0) static void ov107_02247484 (UnkStruct_ov107_02246170 * param0, u32 param1) { - sub_020070E8(param0->unk_3E0, 44, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_3E0, 44, param0->unk_4C, param1, 0, 0, 1, 100); if (ov104_0223BA14(param0->unk_09) == 0) { - sub_0200710C(param0->unk_3E0, 40, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3E0, 40, param0->unk_4C, param1, 0, 0, 1, 100); } else { - sub_0200710C(param0->unk_3E0, 41, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3E0, 41, param0->unk_4C, param1, 0, 0, 1, 100); } return; @@ -1419,7 +1419,7 @@ static void ov107_022474F8 (void) void * v0; NNSG2dPaletteData * v1; - v0 = sub_02006F88(150, 138, &v1, 100); + v0 = Graphics_GetPlttData(150, 138, &v1, 100); DC_FlushRange(v1->pRawData, (sizeof(u16) * 16 * 4)); GX_LoadBGPltt(v1->pRawData, 0, (sizeof(u16) * 16 * 4)); @@ -1430,8 +1430,8 @@ static void ov107_022474F8 (void) static void ov107_0224752C (UnkStruct_ov107_02246170 * param0, u32 param1) { - sub_020070E8(param0->unk_3E0, 44, param0->unk_4C, param1, 0, 0, 1, 100); - sub_0200710C(param0->unk_3E0, 42, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_3E0, 44, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3E0, 42, param0->unk_4C, param1, 0, 0, 1, 100); return; } @@ -1441,7 +1441,7 @@ static void ov107_02247574 (void) void * v0; NNSG2dPaletteData * v1; - v0 = sub_02006F88(150, 138, &v1, 100); + v0 = Graphics_GetPlttData(150, 138, &v1, 100); DC_FlushRange(v1->pRawData, (sizeof(u16) * 16 * 4)); GX_LoadBGPltt(v1->pRawData, 0, (sizeof(u16) * 16 * 4)); @@ -1452,17 +1452,17 @@ static void ov107_02247574 (void) static void ov107_022475A8 (UnkStruct_ov107_02246170 * param0, u32 param1) { - sub_020070E8(param0->unk_3E0, 44, param0->unk_4C, param1, 0, 0, 1, 100); - sub_0200710C(param0->unk_3E0, 43, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_3E0, 44, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3E0, 43, param0->unk_4C, param1, 0, 0, 1, 100); return; } static void ov107_022475F0 (UnkStruct_ov107_02246170 * param0, u32 param1) { - sub_020070E8(param0->unk_3E0, 125, param0->unk_4C, param1, 0, 0, 1, 100); - sub_0200710C(param0->unk_3E0, 126, param0->unk_4C, param1, 0, 0, 1, 100); - sub_02007130(param0->unk_3E0, 171, 4, 0, 0x20, 100); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_3E0, 125, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3E0, 126, param0->unk_4C, param1, 0, 0, 1, 100); + Graphics_LoadPaletteFromOpenNARC(param0->unk_3E0, 171, 4, 0, 0x20, 100); return; } diff --git a/src/overlay108/ov108_02241AE0.c b/src/overlay108/ov108_02241AE0.c index 9a4d72913c..c5107ec807 100644 --- a/src/overlay108/ov108_02241AE0.c +++ b/src/overlay108/ov108_02241AE0.c @@ -1027,7 +1027,7 @@ static void ov108_02242828(UnkStruct_ov108_02241DB0 *param0, u32 param1) { u32 v0; - sub_020070E8(param0->unk_3D0, 120, param0->unk_90, param1, 0, 0, 1, 103); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_3D0, 120, param0->unk_90, param1, 0, 0, 1, 103); if (ov104_0223C000(param0->unk_09) == 0) { v0 = 116; @@ -1035,7 +1035,7 @@ static void ov108_02242828(UnkStruct_ov108_02241DB0 *param0, u32 param1) v0 = 118; } - sub_0200710C(param0->unk_3D0, v0, param0->unk_90, param1, 0, 0, 1, 103); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3D0, v0, param0->unk_90, param1, 0, 0, 1, 103); return; } @@ -1049,7 +1049,7 @@ static void ov108_02242884(UnkStruct_ov108_02241DB0 *param0, u32 param1) v0 = 119; } - sub_0200710C(param0->unk_3D0, v0, param0->unk_90, param1, 0, 0, 1, 103); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3D0, v0, param0->unk_90, param1, 0, 0, 1, 103); return; } @@ -1058,7 +1058,7 @@ static void ov108_022428C0(void) void *v0; NNSG2dPaletteData *v1; - v0 = sub_02006F88(150, 167, &v1, 103); + v0 = Graphics_GetPlttData(150, 167, &v1, 103); DC_FlushRange(v1->pRawData, (sizeof(u16) * 16 * 7)); GX_LoadBGPltt(v1->pRawData, 0, (sizeof(u16) * 16 * 7)); @@ -1069,9 +1069,9 @@ static void ov108_022428C0(void) static void ov108_022428F4(UnkStruct_ov108_02241DB0 *param0, u32 param1) { - sub_020070E8(param0->unk_3D0, 122, param0->unk_90, param1, 0, 0, 1, 103); - sub_02007130(param0->unk_3D0, 168, 4, 0, (sizeof(u16) * 16 * 2), 103); - sub_0200710C(param0->unk_3D0, 121, param0->unk_90, param1, 0, 0, 1, 103); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_3D0, 122, param0->unk_90, param1, 0, 0, 1, 103); + Graphics_LoadPaletteFromOpenNARC(param0->unk_3D0, 168, 4, 0, (sizeof(u16) * 16 * 2), 103); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3D0, 121, param0->unk_90, param1, 0, 0, 1, 103); return; } diff --git a/src/overlay109/ov109_021D3D50.c b/src/overlay109/ov109_021D3D50.c index 31c2a19666..1b17c9470b 100644 --- a/src/overlay109/ov109_021D3D50.c +++ b/src/overlay109/ov109_021D3D50.c @@ -530,7 +530,7 @@ static void ov109_021D41F8(UnkStruct_ov109_021D5140 *param0, NARC *param1) param0->unk_1C.unk_00 = 0; param0->unk_1C.unk_08 = 0; param0->unk_1C.unk_04 = 0; - param0->unk_1C.unk_0C = sub_020071EC(param1, 1, ¶m0->unk_1C.unk_10, 95); + param0->unk_1C.unk_0C = Graphics_GetPlttDataFromOpenNARC(param1, 1, ¶m0->unk_1C.unk_10, 95); param0->unk_4AA8 = 0; param0->unk_394 = NULL; param0->unk_10->unk_2C = 2; @@ -566,14 +566,14 @@ static void ov109_021D4300(UnkStruct_ov109_021D5140 *param0, NARC *param1) { BgConfig *v0 = param0->unk_14; - sub_02007130(param1, 0, 0, 0, 16 * 16 * 2, 95); - sub_02006E84(12, 12, 4, 0, 16 * 2, 95); + Graphics_LoadPaletteFromOpenNARC(param1, 0, 0, 0, 16 * 16 * 2, 95); + Graphics_LoadPalette(12, 12, 4, 0, 16 * 2, 95); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 95); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 95); - sub_02006E3C(12, 10, v0, 6, 0, 0, 1, 95); - sub_02006E60(12, 11, v0, 6, 0, 0, 1, 95); - sub_020070E8(param1, 2, v0, 1, 0, 32 * 8 * 0x20, 1, 95); - sub_0200710C(param1, 3, v0, 1, 0, 32 * 24 * 2, 1, 95); + Graphics_LoadTilesToBgLayer(12, 10, v0, 6, 0, 0, 1, 95); + Graphics_LoadTilemapToBgLayer(12, 11, v0, 6, 0, 0, 1, 95); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, v0, 1, 0, 32 * 8 * 0x20, 1, 95); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 3, v0, 1, 0, 32 * 24 * 2, 1, 95); sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_0C->unk_14.unk_10), 95); sub_0200DAA4(v0, 0, 1 + (18 + 12), 11, 0, 95); } @@ -1651,10 +1651,10 @@ static void ov109_021D5668(UnkStruct_ov109_021D5140 *param0) static void ov109_021D577C(UnkStruct_ov109_021D5140 *param0, NARC *param1) { - param0->unk_3A8[0] = sub_02006F88(104, 8, &(param0->unk_3B0[0]), 95); - param0->unk_3A8[1] = sub_020071EC(param1, 7, &(param0->unk_3B0[1]), 95); - param0->unk_398[0] = sub_02006F50(104, 32, 1, &(param0->unk_3A0[0]), 95); - param0->unk_398[1] = sub_020071B4(param1, 9, 1, &(param0->unk_3A0[1]), 95); + param0->unk_3A8[0] = Graphics_GetPlttData(104, 8, &(param0->unk_3B0[0]), 95); + param0->unk_3A8[1] = Graphics_GetPlttDataFromOpenNARC(param1, 7, &(param0->unk_3B0[1]), 95); + param0->unk_398[0] = Graphics_GetCharData(104, 32, 1, &(param0->unk_3A0[0]), 95); + param0->unk_398[1] = Graphics_GetCharDataFromOpenNARC(param1, 9, 1, &(param0->unk_3A0[1]), 95); } static const u16 Unk_ov109_021D5D9C[] = { diff --git a/src/overlay110/ov110_021D0D80.c b/src/overlay110/ov110_021D0D80.c index 13d5a0a32c..0e88d91c31 100644 --- a/src/overlay110/ov110_021D0D80.c +++ b/src/overlay110/ov110_021D0D80.c @@ -437,8 +437,8 @@ static void ov110_021D123C (UnkStruct_ov110_021D0F78 * param0, u32 param1) v0 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__FRONTIER_GRAPHIC__FRONTIER_BG, 114); - sub_020070E8(v0, 124, param0->unk_0C, param1, 0, 0, 1, 114); - sub_0200710C(v0, 123, param0->unk_0C, param1, 0, 0, 1, 114); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 124, param0->unk_0C, param1, 0, 0, 1, 114); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 123, param0->unk_0C, param1, 0, 0, 1, 114); NARC_dtor(v0); return; @@ -449,7 +449,7 @@ static void ov110_021D128C (void) void * v0; NNSG2dPaletteData * v1; - v0 = sub_02006F88(150, 170, &v1, 114); + v0 = Graphics_GetPlttData(150, 170, &v1, 114); DC_FlushRange(v1->pRawData, (sizeof(u16) * 16 * 2)); GX_LoadBGPltt(v1->pRawData, 0, (sizeof(u16) * 16 * 2)); @@ -464,9 +464,9 @@ static void ov110_021D12C0 (UnkStruct_ov110_021D0F78 * param0, u32 param1) v0 = NARC_ctor(NARC_INDEX_GRAPHIC__POKETCH, 114); - sub_020070E8(v0, 10, param0->unk_0C, param1, 0, 0, 1, 114); - sub_0200710C(v0, 11, param0->unk_0C, param1, 0, 0, 1, 114); - sub_02007130(v0, 12, 4, 0, 0x20, 114); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 10, param0->unk_0C, param1, 0, 0, 1, 114); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 11, param0->unk_0C, param1, 0, 0, 1, 114); + Graphics_LoadPaletteFromOpenNARC(v0, 12, 4, 0, 0x20, 114); NARC_dtor(v0); return; diff --git a/src/overlay111/ov111_021D0D80.c b/src/overlay111/ov111_021D0D80.c index 48bea07e82..393ee36d27 100644 --- a/src/overlay111/ov111_021D0D80.c +++ b/src/overlay111/ov111_021D0D80.c @@ -1460,16 +1460,16 @@ static void ov111_021D20EC(BgConfig *param0) static void ov111_021D2248(UnkStruct_ov111_021D0F7C *param0, u32 param1) { - sub_020070E8(param0->unk_3E4, 35, param0->unk_58, param1, 0, 0, 0, 115); - sub_0200710C(param0->unk_3E4, 37, param0->unk_58, param1, 0, 0, 0, 115); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_3E4, 35, param0->unk_58, param1, 0, 0, 0, 115); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3E4, 37, param0->unk_58, param1, 0, 0, 0, 115); return; } static void ov111_021D228C(UnkStruct_ov111_021D0F7C *param0, u32 param1) { - sub_020070E8(param0->unk_3E4, 38, param0->unk_58, param1, 0, 0, 0, 115); - sub_0200710C(param0->unk_3E4, 40, param0->unk_58, param1, 0, 0, 0, 115); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_3E4, 38, param0->unk_58, param1, 0, 0, 0, 115); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3E4, 40, param0->unk_58, param1, 0, 0, 0, 115); return; } @@ -1479,7 +1479,7 @@ static void ov111_021D22D0(void) void *v0; NNSG2dPaletteData *v1; - v0 = sub_02006F88(184, 34, &v1, 115); + v0 = Graphics_GetPlttData(184, 34, &v1, 115); DC_FlushRange(v1->pRawData, (sizeof(u16) * 16 * 5)); GXS_LoadBGPltt(v1->pRawData, 0, (sizeof(u16) * 16 * 5)); @@ -1493,7 +1493,7 @@ static void ov111_021D2304(void) void *v0; NNSG2dPaletteData *v1; - v0 = sub_02006F88(184, 0, &v1, 115); + v0 = Graphics_GetPlttData(184, 0, &v1, 115); DC_FlushRange(v1->pRawData, (sizeof(u16) * 16 * 9)); GX_LoadBGPltt(v1->pRawData, 0, (sizeof(u16) * 16 * 10)); @@ -1504,16 +1504,16 @@ static void ov111_021D2304(void) static void ov111_021D233C(UnkStruct_ov111_021D0F7C *param0, u32 param1) { - sub_020070E8(param0->unk_3E4, 4, param0->unk_58, param1, 0, 0, 0, 115); - sub_0200710C(param0->unk_3E4, 6, param0->unk_58, param1, 0, 0, 0, 115); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_3E4, 4, param0->unk_58, param1, 0, 0, 0, 115); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3E4, 6, param0->unk_58, param1, 0, 0, 0, 115); return; } static void ov111_021D2380(UnkStruct_ov111_021D0F7C *param0, u32 param1) { - sub_020070E8(param0->unk_3E4, 7, param0->unk_58, param1, 0, 0, 0, 115); - sub_0200710C(param0->unk_3E4, 9, param0->unk_58, param1, 0, 0, 0, 115); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_3E4, 7, param0->unk_58, param1, 0, 0, 0, 115); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_3E4, 9, param0->unk_58, param1, 0, 0, 0, 115); return; } @@ -2123,7 +2123,7 @@ static void ov111_021D2E28(UnkStruct_ov111_021D0F7C *param0) static void ov111_021D2E4C(UnkStruct_ov111_021D0F7C *param0) { - param0->unk_3F0 = sub_02006F50(184, 7, 0, ¶m0->unk_3F4, 115); + param0->unk_3F0 = Graphics_GetCharData(184, 7, 0, ¶m0->unk_3F4, 115); Bg_LoadTiles(param0->unk_58, 0, param0->unk_3F4->pRawData, param0->unk_3F4->szByte, 0); Bg_CopyTilemapBufferToVRAM(param0->unk_58, 0); diff --git a/src/overlay112/ov112_0225C700.c b/src/overlay112/ov112_0225C700.c index 2a23940e6f..09da2f3f83 100644 --- a/src/overlay112/ov112_0225C700.c +++ b/src/overlay112/ov112_0225C700.c @@ -507,17 +507,17 @@ static void ov112_0225CA34(UnkStruct_ov112_0225C9BC *param0, u32 param1) } { - sub_02007130(param0->unk_1A4, 0, 0, 0, 0, param1); + Graphics_LoadPaletteFromOpenNARC(param0->unk_1A4, 0, 0, 0, 0, param1); Font_LoadScreenIndicatorsPalette(0, 10 * 32, param1); - sub_020070E8(param0->unk_1A4, 1, param0->unk_00, 1, 0, 0, 0, param1); - sub_0200710C(param0->unk_1A4, 3, param0->unk_00, 1, 0, 0, 0, param1); - sub_0200710C(param0->unk_1A4, 4, param0->unk_00, 2, 0, 0, 0, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_1A4, 1, param0->unk_00, 1, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_1A4, 3, param0->unk_00, 1, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_1A4, 4, param0->unk_00, 2, 0, 0, 0, param1); } { - sub_02007130(param0->unk_1A4, 0, 4, 0, 0, param1); - sub_020070E8(param0->unk_1A4, 2, param0->unk_00, 4, 0, 0, 0, param1); - sub_0200710C(param0->unk_1A4, 6, param0->unk_00, 4, 0, 0, 0, param1); + Graphics_LoadPaletteFromOpenNARC(param0->unk_1A4, 0, 4, 0, 0, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_1A4, 2, param0->unk_00, 4, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_1A4, 6, param0->unk_00, 4, 0, 0, 0, param1); } } @@ -580,7 +580,7 @@ static void ov112_0225CC38(UnkStruct_ov112_0225C9BC *param0) static void ov112_0225CC64(UnkStruct_ov112_0225CC84 *param0, UnkStruct_ov112_0225C9BC *param1, u32 param2) { - param0->unk_00 = sub_020071D0(param1->unk_1A4, 5, 0, ¶m0->unk_04, param2); + param0->unk_00 = Graphics_GetScrnDataFromOpenNARC(param1->unk_1A4, 5, 0, ¶m0->unk_04, param2); } static void ov112_0225CC84(UnkStruct_ov112_0225CC84 *param0) @@ -957,7 +957,7 @@ static void ov112_0225D1EC(UnkStruct_ov112_0225D2D0 *param0, UnkStruct_ov112_022 } param0->unk_90 = Strbuf_Init(256, param2); - param0->unk_94 = sub_020071EC(param1->unk_1A4, 0, ¶m0->unk_98, param2); + param0->unk_94 = Graphics_GetPlttDataFromOpenNARC(param1->unk_1A4, 0, ¶m0->unk_98, param2); Bg_LoadPalette(0, &((u8 *)param0->unk_98->pRawData)[(7 * 0x20) + (7 * 2)], 0x4, (7 * 0x20) + (13 * 2)); Bg_LoadPalette(0, &((u8 *)param0->unk_98->pRawData)[(7 * 0x20) + (7 * 2)], 0x4, (8 * 0x20) + (13 * 2)); diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index ea7342c2a6..75798cf1e1 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -889,18 +889,18 @@ static void ov113_0225D160(UnkStruct_ov113_0225DBCC *param0, NARC *param1) u16 *v1; PaletteData_LoadBufferFromFileStart(param0->unk_0C, 187, 19, 118, 0, 0x200 - 0x40, 0); - sub_020070E8(param1, 18, param0->unk_08, 2, 0, 0, 0, 118); - sub_0200710C(param1, 17, param0->unk_08, 2, 0, 0, 0, 118); - sub_0200710C(param1, 20, param0->unk_08, 3, 0, 0, 0, 118); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 18, param0->unk_08, 2, 0, 0, 0, 118); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 17, param0->unk_08, 2, 0, 0, 0, 118); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 20, param0->unk_08, 3, 0, 0, 0, 118); PaletteData_LoadBufferFromFileStart(param0->unk_0C, 187, 23, 118, 1, 0, 0); if (param0->unk_00->unk_04 == 0) { PaletteData_CopyBuffer(param0->unk_0C, 1, 16 * 1, 1, 16 * 0, 0x20); } - sub_020070E8(param1, 22, param0->unk_08, 6, 0, 0, 0, 118); - sub_0200710C(param1, 21, param0->unk_08, 6, 0, 0, 0, 118); - sub_0200710C(param1, 24, param0->unk_08, 7, 0, 0, 0, 118); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 22, param0->unk_08, 6, 0, 0, 0, 118); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 21, param0->unk_08, 6, 0, 0, 0, 118); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 24, param0->unk_08, 7, 0, 0, 0, 118); v1 = Bg_GetTilemapBuffer(param0->unk_08, 6); diff --git a/src/overlay114/ov114_0225C700.c b/src/overlay114/ov114_0225C700.c index 2acd15f3e7..261f9928d0 100644 --- a/src/overlay114/ov114_0225C700.c +++ b/src/overlay114/ov114_0225C700.c @@ -1679,12 +1679,12 @@ static void ov114_0225D5BC(UnkStruct_ov114_0225D678 *param0, u32 param1) v0 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__WIFI_LOBBY_MINIGAME__WLMNGM_TOOL, param1); - sub_02007130(v0, 4, 0, 0, 9 * 32, param1); - sub_020070E8(v0, 6, param0->unk_30.unk_00, 1, 0, 0, 0, param1); + Graphics_LoadPaletteFromOpenNARC(v0, 4, 0, 0, 9 * 32, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 6, param0->unk_30.unk_00, 1, 0, 0, 0, param1); - param0->unk_260 = sub_020071D0(v0, 9, 0, ¶m0->unk_264, param1); + param0->unk_260 = Graphics_GetScrnDataFromOpenNARC(v0, 9, 0, ¶m0->unk_264, param1); - sub_0200710C(v0, 8, param0->unk_30.unk_00, 3, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 8, param0->unk_30.unk_00, 3, 0, 0, 0, param1); ov114_0225E550(v0, param0->unk_04, param1); param0->unk_22C = ov114_0225CD54(¶m0->unk_214, v0, 11, 5, 12, 13, 14, 5000, param1); @@ -2297,8 +2297,8 @@ static void ov114_0225E1A4(UnkStruct_ov114_0225E1A4 *param0, UnkStruct_ov114_022 param0->unk_10 = param3; GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG0, 0); - sub_020070E8(param4, 7, param1->unk_00, 0, 0, 0, 0, param5); - sub_0200710C(param4, 10, param1->unk_00, 0, 0, 0, 0, param5); + Graphics_LoadTilesToBgLayerFromOpenNARC(param4, 7, param1->unk_00, 0, 0, 0, 0, param5); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param4, 10, param1->unk_00, 0, 0, 0, 0, param5); } static void ov114_0225E234(UnkStruct_ov114_0225E1A4 *param0) @@ -2465,8 +2465,8 @@ static void ov114_0225E550(NARC *param0, u32 param1, u32 param2) break; } - sub_02007148(param0, 5, 0, v0 * 32, 5 * 32, 32, param2); - sub_02007148(param0, 5, 4, v0 * 32, 5 * 32, 32, param2); + Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(param0, 5, 0, v0 * 32, 5 * 32, 32, param2); + Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(param0, 5, 4, v0 * 32, 5 * 32, 32, param2); } static UnkStruct_ov114_0225E854 *ov114_0225E5A8(const UnkStruct_ov114_0225C76C *param0, const UnkStruct_ov114_0225C9A8 *param1, u32 param2, u32 param3) @@ -2547,21 +2547,21 @@ static void ov114_0225E744(UnkStruct_ov114_0225E854 *param0, u32 param1) v0 = NARC_ctor(NARC_INDEX_RESOURCE__ENG__WIFI_LOBBY_MINIGAME__WLMNGM_TOOL, param1); - sub_02007130(v0, 4, 0, 0, 9 * 32, param1); - sub_02007130(v0, 4, 4, 0, 9 * 32, param1); - sub_020070E8(v0, 6, param0->unk_4C.unk_00, 1, 0, 0, 0, param1); - sub_020070E8(v0, 6, param0->unk_4C.unk_00, 5, 0, 0x4000, 0, param1); + Graphics_LoadPaletteFromOpenNARC(v0, 4, 0, 0, 9 * 32, param1); + Graphics_LoadPaletteFromOpenNARC(v0, 4, 4, 0, 9 * 32, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 6, param0->unk_4C.unk_00, 1, 0, 0, 0, param1); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 6, param0->unk_4C.unk_00, 5, 0, 0x4000, 0, param1); { int v1; for (v1 = 0; v1 < 1; v1++) { - param0->unk_2B8[v1] = sub_020071D0(v0, 9 + v1, 0, ¶m0->unk_2BC[v1], param1); + param0->unk_2B8[v1] = Graphics_GetScrnDataFromOpenNARC(v0, 9 + v1, 0, ¶m0->unk_2BC[v1], param1); } } - sub_0200710C(v0, 8, param0->unk_4C.unk_00, 3, 0, 0, 0, param1); - sub_0200710C(v0, 8, param0->unk_4C.unk_00, 5, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 8, param0->unk_4C.unk_00, 3, 0, 0, 0, param1); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 8, param0->unk_4C.unk_00, 5, 0, 0, 0, param1); ov114_0225E550(v0, param0->unk_07, param1); @@ -3142,7 +3142,7 @@ static void ov114_0225F124(SysTask *param0, void *param1) static void ov114_0225F148(UnkStruct_ov114_0225E854 *param0, NARC *param1, u32 param2) { - param0->unk_6B8 = sub_020071EC(param1, 5, ¶m0->unk_6BC, param2); + param0->unk_6B8 = Graphics_GetPlttDataFromOpenNARC(param1, 5, ¶m0->unk_6BC, param2); } static void ov114_0225F168(UnkStruct_ov114_0225E854 *param0) @@ -3369,9 +3369,9 @@ static void ov114_0225F484(UnkStruct_ov114_0225F578 *param0, UnkStruct_ov114_022 memset(param0, 0, sizeof(UnkStruct_ov114_0225F578)); { - sub_02007130(param4, 24, 0, (13 + 1) * 32, 32, param5); - sub_020070E8(param4, 25, param1->unk_00, 2, ((1 + (18 + 12)) + (27 * 4)), 0, 0, param5); - param0->unk_00 = sub_020071D0(param4, 26, 0, ¶m0->unk_04, param5); + Graphics_LoadPaletteFromOpenNARC(param4, 24, 0, (13 + 1) * 32, 32, param5); + Graphics_LoadTilesToBgLayerFromOpenNARC(param4, 25, param1->unk_00, 2, ((1 + (18 + 12)) + (27 * 4)), 0, 0, param5); + param0->unk_00 = Graphics_GetScrnDataFromOpenNARC(param4, 26, 0, ¶m0->unk_04, param5); } { diff --git a/src/overlay115/ov115_02260CEC.c b/src/overlay115/ov115_02260CEC.c index 076c106f75..3b74523485 100644 --- a/src/overlay115/ov115_02260CEC.c +++ b/src/overlay115/ov115_02260CEC.c @@ -1430,9 +1430,9 @@ static void ov115_022617E8(UnkStruct_ov115_022617E8 *param0, UnkStruct_ov115_022 MessageLoader_GetStrbuf(param1->unk_08, 0, v0); Text_AddPrinterWithParamsAndColor(¶m0->unk_0C, FONT_SYSTEM, v0, 0, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 15), NULL); Strbuf_Free(v0); - sub_020070E8(param5, 18, param1->unk_00, 2, 0, 0, 0, param6); - sub_0200710C(param5, 20 + (param3 - 2), param1->unk_00, 2, 0, 0, 0, param6); - sub_02007130(param5, 19, 0, 0 * 32, (3 + 1) * 32, param6); + Graphics_LoadTilesToBgLayerFromOpenNARC(param5, 18, param1->unk_00, 2, 0, 0, 0, param6); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param5, 20 + (param3 - 2), param1->unk_00, 2, 0, 0, 0, param6); + Graphics_LoadPaletteFromOpenNARC(param5, 19, 0, 0 * 32, (3 + 1) * 32, param6); { int v2; @@ -3301,12 +3301,12 @@ static void ov115_02263CD8(UnkStruct_ov115_02261ADC *param0, NARC *param1, u32 p 11, }; - sub_020070E8(param1, 12, param0->unk_00, 4, 0, 0, 0, param3); - sub_0200710C(param1, 14, param0->unk_00, 7, 0, 0, 0, param3); - sub_0200710C(param1, 15, param0->unk_00, 6, 0, 0, 0, param3); - sub_0200710C(param1, 16, param0->unk_00, 5, 0, 0, 0, param3); - sub_0200710C(param1, 17, param0->unk_00, 4, 0, 0, 0, param3); - sub_02007130(param1, 13, 4, 0, 12 * 32, param3); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 12, param0->unk_00, 4, 0, 0, 0, param3); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 14, param0->unk_00, 7, 0, 0, 0, param3); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 15, param0->unk_00, 6, 0, 0, 0, param3); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 16, param0->unk_00, 5, 0, 0, 0, param3); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 17, param0->unk_00, 4, 0, 0, 0, param3); + Graphics_LoadPaletteFromOpenNARC(param1, 13, 4, 0, 12 * 32, param3); Bg_ChangeTilemapRectPalette(param0->unk_00, 7, 0, 0, 32, 32, v0[param2]); Bg_ChangeTilemapRectPalette(param0->unk_00, 6, 0, 0, 32, 32, 2 + (param2 * 2)); Bg_ChangeTilemapRectPalette(param0->unk_00, 5, 0, 0, 32, 32, 1 + (param2 * 2)); diff --git a/src/overlay116/ov116_02261870.c b/src/overlay116/ov116_02261870.c index daab0de656..214745a87a 100644 --- a/src/overlay116/ov116_02261870.c +++ b/src/overlay116/ov116_02261870.c @@ -497,13 +497,13 @@ void ov116_022620AC(UnkStruct_ov116_0226139C *param0, UnkStruct_ov116_02262A8C * switch (param1->unk_04) { case 2: - sub_0200710C(param1->unk_14->unk_00, 79, param1->unk_14->unk_10, 7, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1->unk_14->unk_00, 79, param1->unk_14->unk_10, 7, 0, 0, 0, 106); break; case 3: - sub_0200710C(param1->unk_14->unk_00, 80, param1->unk_14->unk_10, 7, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1->unk_14->unk_00, 80, param1->unk_14->unk_10, 7, 0, 0, 0, 106); break; case 4: - sub_0200710C(param1->unk_14->unk_00, 81, param1->unk_14->unk_10, 7, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1->unk_14->unk_00, 81, param1->unk_14->unk_10, 7, 0, 0, 0, 106); break; default: GF_ASSERT(0); @@ -570,7 +570,7 @@ void ov116_02262264(UnkStruct_ov116_02262A8C *param0) v1++; } - sub_0200710C(param0->unk_14->unk_00, 78, param0->unk_14->unk_10, 7, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_14->unk_00, 78, param0->unk_14->unk_10, 7, 0, 0, 0, 106); } void ov116_022622C8(UnkStruct_ov116_0226139C *param0) @@ -821,18 +821,18 @@ void ov116_022628B8(UnkStruct_ov116_0226139C *param0) PaletteData *v5 = param0->unk_48.unk_14; NARC *v6 = v0; - sub_020070E8(v6, 72, v2, 4, 0, 0, 0, 106); - sub_020070E8(v6, 75, v2, 5, 0, 0, 0, 106); - sub_0200710C(v6, 74, v2, 4, 0, 0, 0, 106); - sub_0200710C(v6, 76, v2, 5, 0, 0, 0, 106); - sub_0200710C(v6, 77, v2, 6, 0, 0, 0, 106); - sub_0200710C(v6, 78, v2, 7, 0, 0, 0, 106); + Graphics_LoadTilesToBgLayerFromOpenNARC(v6, 72, v2, 4, 0, 0, 0, 106); + Graphics_LoadTilesToBgLayerFromOpenNARC(v6, 75, v2, 5, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v6, 74, v2, 4, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v6, 76, v2, 5, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v6, 77, v2, 6, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v6, 78, v2, 7, 0, 0, 0, 106); PaletteData_LoadBufferFromFileStart(v5, 164, 73, 106, 1, 0x20 * 5, 0); - sub_020070E8(v6, 5, v2, 3, 0, 0, 0, 106); - sub_020070E8(v6, 8, v2, 1, 0, 0, 0, 106); - sub_0200710C(v6, 7, v2, 3, 0, 0, 0, 106); - sub_0200710C(v6, 9, v2, 1, 0, 0, 0, 106); - sub_0200710C(v6, 10, v2, 2, 0, 0, 0, 106); + Graphics_LoadTilesToBgLayerFromOpenNARC(v6, 5, v2, 3, 0, 0, 0, 106); + Graphics_LoadTilesToBgLayerFromOpenNARC(v6, 8, v2, 1, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v6, 7, v2, 3, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v6, 9, v2, 1, 0, 0, 0, 106); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v6, 10, v2, 2, 0, 0, 0, 106); PaletteData_LoadBufferFromFileStart(v5, 164, 6, 106, 0, 0x20, 0); PaletteData_LoadBufferFromFileStart(v5, 14, 7, 106, 1, 0x20, 14 * 16); PaletteData_LoadBufferFromFileStart(v5, 38, Window_FramePalette(), 106, 1, 0x20, 13 * 16); diff --git a/src/overlay117/ov117_02260668.c b/src/overlay117/ov117_02260668.c index d59ac21818..f2136bbf9a 100644 --- a/src/overlay117/ov117_02260668.c +++ b/src/overlay117/ov117_02260668.c @@ -1048,10 +1048,10 @@ static void ov117_022619F8(UnkStruct_ov117_02261280 *param0) static void ov117_02261A2C(UnkStruct_ov117_02261280 *param0, NARC *param1) { PaletteData_LoadBufferFromFileStart(param0->unk_8C, 173, 4, 110, 0, 0, 0); - sub_020070E8(param1, 2, param0->unk_2C, 3, 0, 0, 0, 110); - sub_0200710C(param1, 3, param0->unk_2C, 3, 0, 0, 0, 110); - sub_020070E8(param1, 0, param0->unk_2C, 2, 0, 0, 0, 110); - sub_0200710C(param1, 1, param0->unk_2C, 2, 0, 0, 0, 110); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, param0->unk_2C, 3, 0, 0, 0, 110); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 3, param0->unk_2C, 3, 0, 0, 0, 110); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 0, param0->unk_2C, 2, 0, 0, 0, 110); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 1, param0->unk_2C, 2, 0, 0, 0, 110); PaletteData_FillBufferRange(param0->unk_8C, 0, 2, 0x0, 0, 1); } @@ -1064,24 +1064,24 @@ static void ov117_02261AC8(UnkStruct_ov117_02261280 *param0, NARC *param1) { PaletteData_LoadBufferFromFileStart(param0->unk_8C, 173, 5, 110, 1, 5 * 0x20, 0); PaletteData_LoadBufferFromFile(param0->unk_8C, 173, 6, 110, 1, (0x20 * 10), 6 * 16, 6 * 16); - sub_020070E8(param1, 13, param0->unk_2C, 6, 0, 0, 0, 110); - sub_0200710C(param1, 14, param0->unk_2C, 6, 0, 0, 0, 110); - sub_020070E8(param1, 18, param0->unk_2C, 5, 0, 0, 0, 110); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 13, param0->unk_2C, 6, 0, 0, 0, 110); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 14, param0->unk_2C, 6, 0, 0, 0, 110); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 18, param0->unk_2C, 5, 0, 0, 0, 110); switch (param0->unk_00->unk_30) { case 2: - sub_0200710C(param1, 15, param0->unk_2C, 5, 0, 0, 0, 110); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 15, param0->unk_2C, 5, 0, 0, 0, 110); break; case 3: - sub_0200710C(param1, 16, param0->unk_2C, 5, 0, 0, 0, 110); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 16, param0->unk_2C, 5, 0, 0, 0, 110); break; default: - sub_0200710C(param1, 17, param0->unk_2C, 5, 0, 0, 0, 110); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 17, param0->unk_2C, 5, 0, 0, 0, 110); break; } - sub_020070E8(param1, 18, param0->unk_2C, 4, 0, 0, 0, 110); - sub_0200710C(param1, 19, param0->unk_2C, 4, 0, 0, 0, 110); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 18, param0->unk_2C, 4, 0, 0, 0, 110); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 19, param0->unk_2C, 4, 0, 0, 0, 110); ov117_02264AF0(param0); ov117_02264AB0(param0); diff --git a/src/overlay117/ov117_02263AF0.c b/src/overlay117/ov117_02263AF0.c index c3b623a230..d3736683ec 100644 --- a/src/overlay117/ov117_02263AF0.c +++ b/src/overlay117/ov117_02263AF0.c @@ -391,8 +391,8 @@ void ov117_02263AF0(BgConfig *param0, int param1, int param2, UnkStruct_ov117_02 v0 = NARC_ctor(NARC_INDEX_APPLICATION__BALLOON__GRAPHIC__BALLOON_GRA, 110); - sub_020070E8(v0, Unk_ov117_02266BEC[param2].unk_00, param0, 7, 0, 0, 0, 110); - sub_0200710C(v0, Unk_ov117_02266BEC[param2].unk_02, param0, 7, 0, 0, 0, 110); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, Unk_ov117_02266BEC[param2].unk_00, param0, 7, 0, 0, 0, 110); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, Unk_ov117_02266BEC[param2].unk_02, param0, 7, 0, 0, 0, 110); NARC_dtor(v0); MI_CpuClear8(param3, sizeof(UnkStruct_ov117_02263DAC)); diff --git a/src/overlay119/ov119_021D0D80.c b/src/overlay119/ov119_021D0D80.c index 2be2eb80a7..ebe854c994 100644 --- a/src/overlay119/ov119_021D0D80.c +++ b/src/overlay119/ov119_021D0D80.c @@ -387,8 +387,8 @@ void ov119_021D1308(BgConfig *param0, PaletteData *param1) int v4 = 3; int v5 = 71; - sub_02006E3C(v0, v1, param0, v4, 0, 0, 1, v5); - sub_02006E60(v0, v2, param0, v4, 0, 0, 1, v5); + Graphics_LoadTilesToBgLayer(v0, v1, param0, v4, 0, 0, 1, v5); + Graphics_LoadTilemapToBgLayer(v0, v2, param0, v4, 0, 0, 1, v5); PaletteData_LoadBufferFromFileStart(param1, v0, v3, v5, 0, 0x20 * 2, 0); } @@ -401,8 +401,8 @@ void ov119_021D135C(BgConfig *param0, PaletteData *param1) int v4 = 4; int v5 = 71; - sub_02006E3C(v0, v1, param0, v4, 0, 0, 1, v5); - sub_02006E60(v0, v2, param0, v4, 0, 0, 1, v5); + Graphics_LoadTilesToBgLayer(v0, v1, param0, v4, 0, 0, 1, v5); + Graphics_LoadTilemapToBgLayer(v0, v2, param0, v4, 0, 0, 1, v5); PaletteData_LoadBufferFromFileStart(param1, v0, v3, v5, 1, 0x20 * 1, 0); } diff --git a/src/palette.c b/src/palette.c index 72a2d1d97c..a101cd4d32 100644 --- a/src/palette.c +++ b/src/palette.c @@ -70,7 +70,7 @@ void PaletteData_LoadBuffer(PaletteData *paletteData, const void *src, enum Pale void PaletteData_LoadBufferFromFile(PaletteData *paletteData, u32 narcID, u32 narcMemberIdx, u32 heapID, enum PaletteBufferID bufferID, u32 srcSize, u16 destStart, u16 srcStart) { NNSG2dPaletteData *palette; - void *ptr = sub_02006F88(narcID, narcMemberIdx, &palette, heapID); + void *ptr = Graphics_GetPlttData(narcID, narcMemberIdx, &palette, heapID); GF_ASSERT(ptr != NULL); @@ -122,7 +122,7 @@ void PaletteData_LoadBufferFromHardware(PaletteData *paletteData, enum PaletteBu void LoadPaletteFromFile(u32 narcID, u32 narcMemberIdx, u32 heapID, u32 size, u16 start, void *dest) { NNSG2dPaletteData *palette; - void *ptr = sub_02006F88(narcID, narcMemberIdx, &palette, heapID); + void *ptr = Graphics_GetPlttData(narcID, narcMemberIdx, &palette, heapID); GF_ASSERT(ptr != NULL); @@ -594,7 +594,7 @@ void TintPalette(u16 *palette, int numColorsToTint, int tintR, int tintG, int ti void PaletteData_LoadBufferFromFileStartWithTint(PaletteData *paletteData, u32 narcID, u32 narcMemberIdx, u32 heapID, enum PaletteBufferID bufferID, u32 size, u16 start, int r, int g, int b) { NNSG2dPaletteData *palette; - void *ptr = sub_02006F88(narcID, narcMemberIdx, &palette, heapID); + void *ptr = Graphics_GetPlttData(narcID, narcMemberIdx, &palette, heapID); GF_ASSERT(ptr != NULL); diff --git a/src/pokemon_summary_app.c b/src/pokemon_summary_app.c index b4ce86e385..124a08a36b 100644 --- a/src/pokemon_summary_app.c +++ b/src/pokemon_summary_app.c @@ -460,16 +460,16 @@ static void sub_0208C76C(BgConfig *param0) static void sub_0208C7AC(PokemonSummaryApp *param0, NARC *param1) { - sub_020070E8(param1, 0, param0->bgl, 3, 0, 0, 0, 19); - sub_0200710C(param1, 3, param0->bgl, 3, 0, 0, 0, 19); - sub_02007130(param1, 1, 0, 0, 0, 19); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 0, param0->bgl, 3, 0, 0, 0, 19); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 3, param0->bgl, 3, 0, 0, 0, 19); + Graphics_LoadPaletteFromOpenNARC(param1, 1, 0, 0, 0, 19); - sub_0200710C(param1, 11, param0->bgl, 2, 0, 0, 0, 19); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 11, param0->bgl, 2, 0, 0, 0, 19); - sub_020070E8(param1, 2, param0->bgl, 4, 0, 0, 0, 19); - sub_020070E8(param1, 16, param0->bgl, 5, 0, 0, 0, 19); - sub_0200710C(param1, 15, param0->bgl, 5, 0, 0, 0, 19); - sub_02007130(param1, 14, 4, 0, 0, 19); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, param0->bgl, 4, 0, 0, 0, 19); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 16, param0->bgl, 5, 0, 0, 0, 19); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 15, param0->bgl, 5, 0, 0, 0, 19); + Graphics_LoadPaletteFromOpenNARC(param1, 14, 4, 0, 0, 19); } static void sub_0208C86C(void) diff --git a/src/text.c b/src/text.c index db6b9a5903..5933628e4a 100644 --- a/src/text.c +++ b/src/text.c @@ -324,7 +324,7 @@ static u8 *Text_LoadScreenIndicatorGfx(void) NNSG2dCharacterData *g2dCharData; u8 *gfx = Heap_AllocFromHeap(HEAP_ID_SYSTEM, 24 * 64); // These numbers are file dimensions. Curiously, this only loads the bottom-screen indicators. - void *ncgr = sub_02006F50(NARC_INDEX_GRAPHIC__PL_FONT, 5, FALSE, &g2dCharData, HEAP_ID_SYSTEM); + void *ncgr = Graphics_GetCharData(NARC_INDEX_GRAPHIC__PL_FONT, 5, FALSE, &g2dCharData, HEAP_ID_SYSTEM); MI_CpuCopy32(g2dCharData->pRawData, gfx, 24 * 64); Heap_FreeToHeap(ncgr); diff --git a/src/unk_0200C440.c b/src/unk_0200C440.c index 66a19005e5..4479231297 100644 --- a/src/unk_0200C440.c +++ b/src/unk_0200C440.c @@ -36,7 +36,7 @@ UnkStruct_0200C440 *sub_0200C440(u32 param0, u32 param1, u32 param2, u32 param3) u32 v1; u8 *v2; - v0->unk_00 = sub_02006F50(14, 4, 1, &v0->unk_04, param3); + v0->unk_00 = Graphics_GetCharData(14, 4, 1, &v0->unk_04, param3); v2 = v0->unk_04->pRawData; for (v1 = 0; v1 < v0->unk_04->szByte; v1++) { diff --git a/src/unk_0200DA60.c b/src/unk_0200DA60.c index f85afb5bf5..dddc564919 100644 --- a/src/unk_0200DA60.c +++ b/src/unk_0200DA60.c @@ -82,9 +82,9 @@ static const SpriteTemplate Unk_020E5040 = { void Window_SetFrame(BgConfig *param0, u8 param1, u16 param2, u8 param3, u32 param4) { if (param3 == 0) { - sub_02006E3C(38, 0, param0, param1, param2, 0, 0, param4); + Graphics_LoadTilesToBgLayer(38, 0, param0, param1, param2, 0, 0, param4); } else { - sub_02006E3C(38, 1, param0, param1, param2, 0, 0, param4); + Graphics_LoadTilesToBgLayer(38, 1, param0, param1, param2, 0, 0, param4); } } @@ -103,7 +103,7 @@ void sub_0200DAA4(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, v0 = 1; } - sub_02006E3C(38, v0, param0, param1, param2, 0, 0, param5); + Graphics_LoadTilesToBgLayer(38, v0, param0, param1, param2, 0, 0, param5); if (param4 == 2) { v0 = 45; @@ -112,9 +112,9 @@ void sub_0200DAA4(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, } if (param1 < 4) { - sub_02006E84(38, v0, 0, param3 * 0x20, 0x20, param5); + Graphics_LoadPalette(38, v0, 0, param3 * 0x20, 0x20, param5); } else { - sub_02006E84(38, v0, 4, param3 * 0x20, 0x20, param5); + Graphics_LoadPalette(38, v0, 4, param3 * 0x20, 0x20, param5); } } @@ -164,12 +164,12 @@ u32 sub_0200DD08(u32 param0) void sub_0200DD0C(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u32 param5) { - sub_02006E3C(38, sub_0200DD04(param4), param0, param1, param2, 0, 0, param5); + Graphics_LoadTilesToBgLayer(38, sub_0200DD04(param4), param0, param1, param2, 0, 0, param5); if (param1 < 4) { - sub_02006E84(38, sub_0200DD08(param4), 0, param3 * 0x20, 0x20, param5); + Graphics_LoadPalette(38, sub_0200DD08(param4), 0, param3 * 0x20, 0x20, param5); } else { - sub_02006E84(38, sub_0200DD08(param4), 4, param3 * 0x20, 0x20, param5); + Graphics_LoadPalette(38, sub_0200DD08(param4), 4, param3 * 0x20, 0x20, param5); } } @@ -255,7 +255,7 @@ static void sub_0200E130(Window *param0, u16 param1) { NNSG2dCharacterData *v7; - v4 = sub_02006F50(38, 22, 0, &v7, v0); + v4 = Graphics_GetCharData(38, 22, 0, &v7, v0); v3 = (u8 *)v7->pRawData; } @@ -281,7 +281,7 @@ void sub_0200E218(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u32 v3; u8 v4, v5; - v0 = sub_02006F50(38, sub_0200DD04(param4), 0, &v1, param5); + v0 = Graphics_GetCharData(38, sub_0200DD04(param4), 0, &v1, param5); v2 = Heap_AllocFromHeap(param5, 0x20 * 18); memcpy(v2, v1->pRawData, 0x20 * 18); @@ -308,7 +308,7 @@ void sub_0200E218(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, void sub_0200E2A4(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u16 param5, u32 param6) { - sub_02006E3C( + Graphics_LoadTilesToBgLayer( 36, 0, param0, param1, param2, (18 + 12) * 0x20, 0, param6); { @@ -337,7 +337,7 @@ static void sub_0200E31C(BgConfig *param0, u8 param1, u16 param2, u8 param3, u16 param4 += 2; } - sub_02006E3C(36, param4, param0, param1, param2, 24 * 0x20, 0, param5); + Graphics_LoadTilesToBgLayer(36, param4, param0, param1, param2, 24 * 0x20, 0, param5); } static void sub_0200E354(BgConfig *param0, u8 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6, u16 param7) @@ -446,7 +446,7 @@ void *sub_0200E7FC(Window *param0, u32 param1) { NNSG2dCharacterData *v8; - v5 = sub_02006F50(38, 23, 0, &v8, v1); + v5 = Graphics_GetCharData(38, 23, 0, &v8, v1); v3 = (u8 *)v8->pRawData; } diff --git a/src/unk_02012744.c b/src/unk_02012744.c index 5b7065f5fe..1dcebb5cd5 100644 --- a/src/unk_02012744.c +++ b/src/unk_02012744.c @@ -100,7 +100,7 @@ UnkStruct_02012744 *sub_02012744(int param0, int param1) GF_ASSERT(v0); for (v1 = 0; v1 < 12; v1++) { - v0->unk_00[v1] = sub_02006FA0( + v0->unk_00[v1] = Graphics_GetCellBank( 35, v1, 0, &v0->unk_30[v1], param1); GF_ASSERT(v0->unk_00[v1]); diff --git a/src/unk_02015920.c b/src/unk_02015920.c index a5f3a8d176..7972d316fe 100644 --- a/src/unk_02015920.c +++ b/src/unk_02015920.c @@ -291,7 +291,7 @@ static void sub_02015C38(UnkStruct_02015C38 *param0, const UnkStruct_02015B14 *p param0->unk_35 = param1->unk_2D; for (v0 = 0; v0 < 4; v0++) { - param0->unk_08[v0] = sub_02006F6C(param1->unk_08, param1->unk_0C[v0], 1, ¶m0->unk_18[v0], param2); + param0->unk_08[v0] = Graphics_GetScrnData(param1->unk_08, param1->unk_0C[v0], 1, ¶m0->unk_18[v0], param2); sub_02015F34(param0->unk_18[v0], param1->unk_1C); sub_02015F54(param0->unk_18[v0], param1->unk_20); @@ -371,7 +371,7 @@ static void sub_02015DCC(u32 param0, u32 param1, BgConfig *param2, u32 param3, u v0 = Heap_AllocFromHeap(param5, sizeof(UnkStruct_02015DCC)); memset(v0, 0, sizeof(UnkStruct_02015DCC)); - v0->unk_08 = sub_02006F50(param0, param1, 1, &v0->unk_04, param5); + v0->unk_08 = Graphics_GetCharData(param0, param1, 1, &v0->unk_04, param5); v0->unk_00 = param2; v0->unk_0C = param3; v0->unk_10 = param4; @@ -386,7 +386,7 @@ static void sub_02015E1C(u32 param0, u32 param1, int param2, u32 param3, u32 par v0 = Heap_AllocFromHeap(param5, sizeof(UnkStruct_02015E1C)); memset(v0, 0, sizeof(UnkStruct_02015E1C)); - v0->unk_04 = sub_02006F88(param0, param1, &v0->unk_00, param5); + v0->unk_04 = Graphics_GetPlttData(param0, param1, &v0->unk_00, param5); v0->unk_08 = param2; v0->unk_0C = param3; v0->unk_10 = param4; diff --git a/src/unk_020528D0.c b/src/unk_020528D0.c index 58fbb38153..9977429919 100644 --- a/src/unk_020528D0.c +++ b/src/unk_020528D0.c @@ -99,7 +99,7 @@ static void sub_020528D0(BgConfig *param0) GXLayers_SetBanks(&v0); SetAllGraphicsModes(&v1); Bg_InitFromTemplate(param0, 3, &v2, 0); - sub_02006E84(14, 6, 0, 13 * 0x20, 0x20, 11); + Graphics_LoadPalette(14, 6, 0, 13 * 0x20, 0x20, 11); } static void sub_02052914(FieldSystem *fieldSystem, TaskManager *param1) diff --git a/src/unk_0205C980.c b/src/unk_0205C980.c index 40092b380c..94c5bfc879 100644 --- a/src/unk_0205C980.c +++ b/src/unk_0205C980.c @@ -102,7 +102,7 @@ u16 *sub_0205CA4C(int param0) u16 *v4, *v5; int v6; - v0 = sub_02006F88(86, 7, &v2, param0); + v0 = Graphics_GetPlttData(86, 7, &v2, param0); v4 = Heap_AllocFromHeap(param0, 16 * 18 * 2); v5 = (u16 *)v2->pRawData; diff --git a/src/unk_0207AE68.c b/src/unk_0207AE68.c index 8772b214df..2e6b443c60 100644 --- a/src/unk_0207AE68.c +++ b/src/unk_0207AE68.c @@ -886,8 +886,8 @@ static void sub_0207C1CC(UnkStruct_0207AE68 *param0, BgConfig *param1) v4 = Options_Frame(param0->unk_2C); sub_0200E218(param1, 1, 1, 10, v4, param0->unk_5C); - sub_02006E3C(v5, v6, param1, v9, 0, 0, 1, param0->unk_5C); - sub_02006E60(v5, v7, param1, v9, 0, 0, 1, param0->unk_5C); + Graphics_LoadTilesToBgLayer(v5, v6, param1, v9, 0, 0, 1, param0->unk_5C); + Graphics_LoadTilemapToBgLayer(v5, v7, param1, v9, 0, 0, 1, param0->unk_5C); PaletteData_LoadBufferFromFileStart(param0->unk_14, v5, v8, param0->unk_5C, 0, 0x20 * 2, 0); PaletteData_LoadBufferFromFileStart(param0->unk_14, 38, sub_0200DD08(v4), param0->unk_5C, 0, 0x20, 10 * 0x10); PaletteData_LoadBufferFromFileStart(param0->unk_14, 14, 7, param0->unk_5C, 0, 0x20, 0xb * 0x10); @@ -902,8 +902,8 @@ static void sub_0207C1CC(UnkStruct_0207AE68 *param0, BgConfig *param1) int v13 = 12; int v14 = 4; - sub_02006E3C(v10, v11, param1, v14, 0, 0, 1, param0->unk_5C); - sub_02006E60(v10, v12, param1, v14, 0, 0, 1, param0->unk_5C); + Graphics_LoadTilesToBgLayer(v10, v11, param1, v14, 0, 0, 1, param0->unk_5C); + Graphics_LoadTilemapToBgLayer(v10, v12, param1, v14, 0, 0, 1, param0->unk_5C); PaletteData_LoadBufferFromFileStart(param0->unk_14, v10, v13, param0->unk_5C, 1, 0x20 * 1, 0); } diff --git a/src/unk_0207E0B8.c b/src/unk_0207E0B8.c index b3a1110d6b..7ce9ae3251 100644 --- a/src/unk_0207E0B8.c +++ b/src/unk_0207E0B8.c @@ -908,8 +908,8 @@ static void sub_0207EB64(GenericPointerData *param0) static void sub_0207EB6C(GameWindowLayout *param0, NARC *param1) { - sub_020070E8(param1, 15, param0->unk_00, 3, 0, 0, 0, 12); - sub_0200710C(param1, 17, param0->unk_00, 3, 0, 0, 0, 12); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 15, param0->unk_00, 3, 0, 0, 0, 12); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 17, param0->unk_00, 3, 0, 0, 0, 12); { NNSG2dPaletteData *v0; @@ -928,11 +928,11 @@ static void sub_0207EB6C(GameWindowLayout *param0, NARC *param1) Font_LoadScreenIndicatorsPalette(0, 13 * 32, 12); sub_0200DAA4(param0->unk_00, 0, 1, 14, 0, 12); sub_0200DD0C(param0->unk_00, 0, (1 + 9), 15, Options_Frame(param0->unk_5A4->unk_0C), 12); - sub_020070E8(param1, 3, param0->unk_00, 4, 0, 0, 0, 12); - sub_02007130(param1, 4, 4, 0x20, 0x20, 12); - sub_020070E8(param1, 12, param0->unk_00, 5, 0, 0, 0, 12); - sub_0200710C(param1, 14, param0->unk_00, 5, 0, 0, 0, 12); - sub_02007130(param1, 13, 4, 0, 0x20, 12); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 3, param0->unk_00, 4, 0, 0, 0, 12); + Graphics_LoadPaletteFromOpenNARC(param1, 4, 4, 0x20, 0x20, 12); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 12, param0->unk_00, 5, 0, 0, 0, 12); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 14, param0->unk_00, 5, 0, 0, 0, 12); + Graphics_LoadPaletteFromOpenNARC(param1, 13, 4, 0, 0x20, 12); LoadScreenDataFromNARC(12, param0->unk_264, param0->unk_324, param0->unk_3E4); Bg_MaskPalette(0, 0); Bg_MaskPalette(4, 0); diff --git a/src/unk_0208694C.c b/src/unk_0208694C.c index a09ba94b56..1acb0fe762 100644 --- a/src/unk_0208694C.c +++ b/src/unk_0208694C.c @@ -1503,19 +1503,19 @@ static void sub_0208769C(UnkStruct_02087A10 *param0, NARC *param1) { BgConfig *v0 = param0->unk_160; - sub_02007130(param1, 0, 0, 0, 16 * 3 * 2, 18); - sub_02006E84(12, 12, 4, 0, 16 * 2, 18); + Graphics_LoadPaletteFromOpenNARC(param1, 0, 0, 0, 16 * 3 * 2, 18); + Graphics_LoadPalette(12, 12, 4, 0, 16 * 2, 18); Bg_MaskPalette(4, 0); - sub_020070E8(param1, 2, v0, 2, 0, ((32 * 8) * 0x20), 1, 18); - sub_0200710C(param1, 4, v0, 2, 0, 32 * 24 * 2, 1, 18); - sub_020070E8(param1, 2, v0, 1, 0, 32 * 8 * 0x20, 1, 18); - sub_0200710C(param1, 6, v0, 1, 0, (32 * 14 * 2), 1, 18); - sub_0200710C(param1, 7, v0, 0, 0, (32 * 14 * 2), 1, 18); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, v0, 2, 0, ((32 * 8) * 0x20), 1, 18); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 4, v0, 2, 0, 32 * 24 * 2, 1, 18); + Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, v0, 1, 0, 32 * 8 * 0x20, 1, 18); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 6, v0, 1, 0, (32 * 14 * 2), 1, 18); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 7, v0, 0, 0, (32 * 14 * 2), 1, 18); Font_LoadScreenIndicatorsPalette(0, 12 * 32, 18); sub_0200DD0C(param0->unk_160, 4, (32 * 8), 10, Options_Frame(param0->unk_18), 18); Font_LoadScreenIndicatorsPalette(4, 12 * 32, 18); - param0->unk_510 = sub_020071B4(param1, 16, 1, ¶m0->unk_514, 18); + param0->unk_510 = Graphics_GetCharDataFromOpenNARC(param1, 16, 1, ¶m0->unk_514, 18); } void sub_020877C4(void) @@ -1554,10 +1554,10 @@ static void sub_020877F4(UnkStruct_02087A10 *param0, NARC *param1) param0->unk_328[0][3] = SpriteResourceCollection_AddFrom(param0->unk_318[3], param1, 14, 1, 0, 3, 18); if (param0->unk_00 == 1) { - param0->unk_518 = sub_02006F50(19, PokeIconSpriteIndex(param0->unk_04, 0, param0->unk_08), 0, ¶m0->unk_51C, 18); + param0->unk_518 = Graphics_GetCharData(19, PokeIconSpriteIndex(param0->unk_04, 0, param0->unk_08), 0, ¶m0->unk_51C, 18); DC_FlushRange(param0->unk_51C, 0x20 * 4 * 4); - param0->unk_520 = sub_02006F88(19, PokeIconPalettesFileIndex(), ¶m0->unk_524, 18); + param0->unk_520 = Graphics_GetPlttData(19, PokeIconPalettesFileIndex(), ¶m0->unk_524, 18); DC_FlushRange(param0->unk_524, 0x20 * 4); } @@ -1743,7 +1743,7 @@ static void sub_02087D64(BgConfig *param0, Window *param1, int *param2, int para case 0: { u16 v3 = Unk_020F24DC[param3] | (Unk_020F24DC[param3] << 4); - sub_02006E60(31, 6 + param3, param0, 0 + v0, 0, (32 * 14 * 2), 1, 18); + Graphics_LoadTilemapToBgLayer(31, 6 + param3, param0, 0 + v0, 0, (32 * 14 * 2), 1, 18); sub_02088260(param5, v0); sub_02088E58(¶m1[v0], v3, param3, TEXT_COLOR(14, 15, 0), param7); (*param2)++; @@ -1829,7 +1829,7 @@ static void sub_02087FC0(UnkStruct_02087A10 *param0, OverlayManager *param1, NAR Window_Add(param0->unk_160, ¶m0->unk_41C[1], 1, 2, 1, 26, 12, 1, ((32 * 8) + (26 * 12))); if (param0->unk_00 == 4) { - sub_0200710C(param2, 6 + 3, param0->unk_160, 1, 0, (32 * 14 * 2), 1, 18); + Graphics_LoadTilemapToBgLayerFromOpenNARC(param2, 6 + 3, param0->unk_160, 1, 0, (32 * 14 * 2), 1, 18); param0->unk_4C4 = 4; sub_02088844(param0->unk_3A, 4); sub_02088E58(¶m0->unk_41C[1], 0xa0a, 4, TEXT_COLOR(14, 15, 0), param0->unk_514->pRawData); diff --git a/src/unk_0208A3F4.c b/src/unk_0208A3F4.c index ac140af0d8..1643154a9b 100644 --- a/src/unk_0208A3F4.c +++ b/src/unk_0208A3F4.c @@ -75,12 +75,12 @@ void sub_0208A490 (UnkStruct_02089688 * param0) v1 = param0->unk_2C0.unk_0C; v0 = param0->unk_2C0.unk_00; - sub_020070E8(v0, 12, v1, 1, 0, 0, 0, 101); - sub_0200710C(v0, 14, v1, 1, 0, 0, 0, 101); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 12, v1, 1, 0, 0, 0, 101); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 14, v1, 1, 0, 0, 0, 101); PaletteData_LoadBufferFromFileStart(v4, 159, 13, 101, 0, 0x20 * 1, 0); - sub_020070E8(v0, 15, v1, 5, 0, 0, 0, 101); - sub_0200710C(v0, 17, v1, 5, 0, 0, 0, 101); + Graphics_LoadTilesToBgLayerFromOpenNARC(v0, 15, v1, 5, 0, 0, 0, 101); + Graphics_LoadTilemapToBgLayerFromOpenNARC(v0, 17, v1, 5, 0, 0, 0, 101); PaletteData_LoadBufferFromFileStart(v4, 159, 16, 101, 1, 0x20 * 1, 0); SpriteRenderer_LoadPalette(v4, 2, v2, v3, v0, 1, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 1000); From 7820f1d44f42b241364ce6581ab4e3396cb2e1f3 Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 23 Oct 2024 17:07:08 -0700 Subject: [PATCH 11/11] Document and clean up graphics.c --- include/graphics.h | 51 ++++++++------- src/graphics.c | 153 ++++++++++++++++++++++----------------------- 2 files changed, 101 insertions(+), 103 deletions(-) diff --git a/include/graphics.h b/include/graphics.h index 067b20d4c9..7916100c08 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -28,29 +28,32 @@ void *LoadMemberFromNARC_OutFileSize(u32 narcID, u32 narcMemberIdx, BOOL compres void *LoadMemberFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd); void *LoadMemberFromOpenNARC_OutFileSize(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd, u32 *fileSize); -u32 Graphics_LoadTilesToBgLayer(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); -void Graphics_LoadTilemapToBgLayer(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); -void Graphics_LoadPalette(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5); -void Graphics_LoadPaletteWithSrcOffset(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6); -u32 Graphics_LoadObjectTiles(u32 param0, u32 param1, int param2, u32 param3, u32 param4, BOOL param5, u32 param6); -void Graphics_LoadPartialPalette(u32 param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5); -u32 Graphics_LoadImageMapping(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8); -void Graphics_LoadImageMappingAndSetVramMode(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8); -void *Graphics_GetCharData(u32 param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4); -void *Graphics_GetScrnData(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4); -void *Graphics_GetPlttData(u32 bankID, u32 memberIndex, NNSG2dPaletteData **param2, u32 param3); -void *Graphics_GetCellBank(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4); -void *Graphics_GetAnimBank(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4); -u32 Graphics_LoadTilesToBgLayerFromOpenNARC(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); -void Graphics_LoadTilemapToBgLayerFromOpenNARC(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7); -void Graphics_LoadPaletteFromOpenNARC(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5); -void Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6); -void Graphics_LoadPartialPaletteFromOpenNARC(NARC *param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5); -u32 Graphics_LoadImageMappingFromOpenNARC(NARC *param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8); -void *Graphics_GetCharDataFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4); -void *Graphics_GetScrnDataFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4); -void *Graphics_GetPlttDataFromOpenNARC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3); -void *Graphics_GetCellBankFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4); -void *Graphics_GetAnimBankFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4); +u32 Graphics_LoadTilesToBgLayer(u32 narcID, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID); +void Graphics_LoadTilemapToBgLayer(u32 narcID, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID); +void Graphics_LoadPalette(u32 narcID, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 palOffset, u32 size, u32 heapID); +void Graphics_LoadPaletteWithSrcOffset(u32 narcID, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 srcOffset, u32 palOffset, u32 size, u32 heapID); +u32 Graphics_LoadObjectTiles(u32 narcID, u32 narcMemberIdx, enum DSScreen display, u32 offset, u32 size, BOOL compressed, u32 heapID); +void Graphics_LoadPartialPalette(u32 narcID, u32 narcMemberIdx, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImagePaletteProxy *paletteProxy); +u32 Graphics_LoadImageMapping(u32 narcID, u32 narcMemberIdx, BOOL compressed, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImageProxy *imageProxy); +void Graphics_LoadImageMappingAndSetVramMode(u32 narcID, u32 narcMemberIdx, BOOL compressed, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImageProxy *imageProxy); + +void *Graphics_GetCharData(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dCharacterData **outCharData, u32 heapID); +void *Graphics_GetScrnData(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dScreenData **outScreenData, u32 heapID); +void *Graphics_GetPlttData(u32 narcID, u32 narcMemberIdx, NNSG2dPaletteData **outPaletteData, u32 heapID); +void *Graphics_GetCellBank(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dCellDataBank **outCellBank, u32 heapID); +void *Graphics_GetAnimBank(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dAnimBankData **outAnimBank, u32 heapID); + +u32 Graphics_LoadTilesToBgLayerFromOpenNARC(NARC *narc, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID); +void Graphics_LoadTilemapToBgLayerFromOpenNARC(NARC *narc, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID); +void Graphics_LoadPaletteFromOpenNARC(NARC *narc, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 offset, u32 size, u32 heapID); +void Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(NARC *narc, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 srcOffset, u32 offset, u32 size, u32 heapID); +void Graphics_LoadPartialPaletteFromOpenNARC(NARC *narc, u32 narcMemberIdx, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImagePaletteProxy *paletteProxy); +u32 Graphics_LoadImageMappingFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImageProxy *imageProxy); + +void *Graphics_GetCharDataFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dCharacterData **outCharData, u32 heapID); +void *Graphics_GetScrnDataFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dScreenData **outScreenData, u32 heapID); +void *Graphics_GetPlttDataFromOpenNARC(NARC *narc, u32 narcMemberIdx, NNSG2dPaletteData **outPaletteData, u32 heapID); +void *Graphics_GetCellBankFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dCellDataBank **outCellBank, u32 heapID); +void *Graphics_GetAnimBankFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dAnimBankData **outAnimBank, u32 heapID); #endif // POKEPLATINUM_GRAPHICS_H diff --git a/src/graphics.c b/src/graphics.c index b4aee94f3b..f4ba29cc83 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -10,94 +10,91 @@ static u32 LoadTilesToBgLayer(void *ncgrBuffer, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size); static void LoadTilemapToBgLayer(void *nscrBuffer, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size); static u32 LoadObjectTiles(void *ncgrBuffer, enum DSScreen display, u32 offset, u32 size); -static void LoadPaletteWithSrcOffset(void *nclrBuffer, enum PaletteLoadLocation paletteType, u32 srcOffset, u32 offset, u32 size); +static void LoadPaletteWithSrcOffset(void *nclrBuffer, enum PaletteLoadLocation loadLocation, u32 srcOffset, u32 offset, u32 size); static void LoadPartialPalette(void *nclrBuffer, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, NNSG2dImagePaletteProxy *paletteProxy); static u32 LoadImageMapping(void *ncgrBuffer, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, NNSG2dImageProxy *imageProxy); static void LoadImageMappingAndSetVramMode(void *ncgrBuffer, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, NNSG2dImageProxy *imageProxy); static void *GetCharacterData(void *ncgrBuffer, NNSG2dCharacterData **outCharData); static void *GetScreenData(void *nscrBuffer, NNSG2dScreenData **outScreenData); static void *GetPaletteData(void *nclrBuffer, NNSG2dPaletteData **outPaletteData); -static void *GetCellBank(void *ncerBuffer, NNSG2dCellDataBank **outCellData); +static void *GetCellBank(void *ncerBuffer, NNSG2dCellDataBank **outCellBank); static void *GetAnimBank(void *nanrBuffer, NNSG2dAnimBankData **outAnimBank); -u32 Graphics_LoadTilesToBgLayer(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) +u32 Graphics_LoadTilesToBgLayer(u32 narcID, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID) { - void *v0 = LoadMemberFromNARC(param0, param1, param6, param7, 0); - return LoadTilesToBgLayer(v0, param2, param3, param4, param5); + void *ncgrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, compressed, heapID, FALSE); + return LoadTilesToBgLayer(ncgrBuffer, bgConfig, bgLayer, offset, size); } -void Graphics_LoadTilemapToBgLayer(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) +void Graphics_LoadTilemapToBgLayer(u32 narcID, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID) { - void *v0 = LoadMemberFromNARC(param0, param1, param6, param7, 1); - LoadTilemapToBgLayer(v0, param2, param3, param4, param5); + void *nscrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, compressed, heapID, TRUE); + LoadTilemapToBgLayer(nscrBuffer, bgConfig, bgLayer, offset, size); } -void Graphics_LoadPalette(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5) +void Graphics_LoadPalette(u32 narcID, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 palOffset, u32 size, u32 heapID) { - Graphics_LoadPaletteWithSrcOffset(param0, param1, param2, 0, param3, param4, param5); + Graphics_LoadPaletteWithSrcOffset(narcID, narcMemberIdx, loadLocation, 0, palOffset, size, heapID); } -void Graphics_LoadPaletteWithSrcOffset(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6) +void Graphics_LoadPaletteWithSrcOffset(u32 narcID, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 srcOffset, u32 palOffset, u32 size, u32 heapID) { - void *v0 = LoadMemberFromNARC(param0, param1, 0, param6, 1); - LoadPaletteWithSrcOffset(v0, param2, param3, param4, param5); + void *nclrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, FALSE, heapID, TRUE); + LoadPaletteWithSrcOffset(nclrBuffer, loadLocation, srcOffset, palOffset, size); } -u32 Graphics_LoadObjectTiles(u32 param0, u32 param1, int param2, u32 param3, u32 param4, BOOL param5, u32 param6) +u32 Graphics_LoadObjectTiles(u32 narcID, u32 narcMemberIdx, enum DSScreen display, u32 offset, u32 size, BOOL compressed, u32 heapID) { - void *v0 = LoadMemberFromNARC(param0, param1, param5, param6, 1); - return LoadObjectTiles(v0, param2, param3, param4); + void *ncgrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, compressed, heapID, TRUE); + return LoadObjectTiles(ncgrBuffer, display, offset, size); } -void Graphics_LoadPartialPalette(u32 param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5) +void Graphics_LoadPartialPalette(u32 narcID, u32 narcMemberIdx, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImagePaletteProxy *paletteProxy) { - void *v0 = LoadMemberFromNARC(param0, param1, 0, param4, 1); - LoadPartialPalette(v0, param2, param3, param5); + void *nclrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, FALSE, heapID, TRUE); + LoadPartialPalette(nclrBuffer, vramType, baseAddr, paletteProxy); } -u32 Graphics_LoadImageMapping(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) +u32 Graphics_LoadImageMapping(u32 narcID, u32 narcMemberIdx, BOOL compressed, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImageProxy *imageProxy) { - void *v0 = LoadMemberFromNARC(param0, param1, param2, param7, 1); - return LoadImageMapping(v0, param3, param4, param5, param6, param8); + void *ncgrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, compressed, heapID, TRUE); + return LoadImageMapping(ncgrBuffer, layout, size, vramType, baseAddr, imageProxy); } -void Graphics_LoadImageMappingAndSetVramMode(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) +void Graphics_LoadImageMappingAndSetVramMode(u32 narcID, u32 narcMemberIdx, BOOL compressed, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImageProxy *imageProxy) { - void *v0 = LoadMemberFromNARC(param0, param1, param2, param7, 1); - LoadImageMappingAndSetVramMode(v0, param3, param4, param5, param6, param8); + void *ncgrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, compressed, heapID, TRUE); + LoadImageMappingAndSetVramMode(ncgrBuffer, layout, size, vramType, baseAddr, imageProxy); } -void *Graphics_GetCharData(u32 param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4) +void *Graphics_GetCharData(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dCharacterData **outCharData, u32 heapID) { - void *v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); - - return GetCharacterData(v0, param3); + void *ncgrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, compressed, heapID, FALSE); + return GetCharacterData(ncgrBuffer, outCharData); } -void *Graphics_GetScrnData(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4) +void *Graphics_GetScrnData(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dScreenData **outScreenData, u32 heapID) { - void *v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); - return GetScreenData(v0, param3); + void *nscrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, compressed, heapID, FALSE); + return GetScreenData(nscrBuffer, outScreenData); } -void *Graphics_GetPlttData(u32 param0, u32 param1, NNSG2dPaletteData **param2, u32 param3) +void *Graphics_GetPlttData(u32 narcID, u32 narcMemberIdx, NNSG2dPaletteData **outPaletteData, u32 heapID) { - void *v0 = LoadMemberFromNARC(param0, param1, 0, param3, 0); - return GetPaletteData(v0, param2); + void *nclrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, FALSE, heapID, FALSE); + return GetPaletteData(nclrBuffer, outPaletteData); } -void *Graphics_GetCellBank(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4) +void *Graphics_GetCellBank(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dCellDataBank **outCellBank, u32 heapID) { - void *v0; - - v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); - return GetCellBank(v0, param3); + void *ncerBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, compressed, heapID, FALSE); + return GetCellBank(ncerBuffer, outCellBank); } -void *Graphics_GetAnimBank(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4) +void *Graphics_GetAnimBank(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dAnimBankData **outAnimBank, u32 heapID) { - void *v0 = LoadMemberFromNARC(param0, param1, param2, param4, 0); - return GetAnimBank(v0, param3); + void *nanrBuffer = LoadMemberFromNARC(narcID, narcMemberIdx, compressed, heapID, FALSE); + return GetAnimBank(nanrBuffer, outAnimBank); } void *LoadCompressedMemberFromNARC(u32 narcID, u32 narcMemberIdx, u32 heapID) @@ -175,71 +172,69 @@ void *LoadMemberFromNARC_OutFileSize(u32 narcID, u32 narcMemberIdx, BOOL compres return data; } -u32 Graphics_LoadTilesToBgLayerFromOpenNARC(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) +u32 Graphics_LoadTilesToBgLayerFromOpenNARC(NARC *narc, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID) { - void *v0 = LoadMemberFromOpenNARC(param0, param1, param6, param7, 0); - return LoadTilesToBgLayer(v0, param2, param3, param4, param5); + void *ncgrBuffer = LoadMemberFromOpenNARC(narc, narcMemberIdx, compressed, heapID, FALSE); + return LoadTilesToBgLayer(ncgrBuffer, bgConfig, bgLayer, offset, size); } -void Graphics_LoadTilemapToBgLayerFromOpenNARC(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7) +void Graphics_LoadTilemapToBgLayerFromOpenNARC(NARC *narc, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID) { - void *v0 = LoadMemberFromOpenNARC(param0, param1, param6, param7, 1); - LoadTilemapToBgLayer(v0, param2, param3, param4, param5); + void *nscrBuffer = LoadMemberFromOpenNARC(narc, narcMemberIdx, compressed, heapID, TRUE); + LoadTilemapToBgLayer(nscrBuffer, bgConfig, bgLayer, offset, size); } -void Graphics_LoadPaletteFromOpenNARC(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5) +void Graphics_LoadPaletteFromOpenNARC(NARC *narc, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 offset, u32 size, u32 heapID) { - Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(param0, param1, param2, 0, param3, param4, param5); + Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(narc, narcMemberIdx, loadLocation, FALSE, offset, size, heapID); } -void Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6) +void Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(NARC *narc, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 srcOffset, u32 offset, u32 size, u32 heapID) { - void *v0 = LoadMemberFromOpenNARC(param0, param1, 0, param6, 1); - LoadPaletteWithSrcOffset(v0, param2, param3, param4, param5); + void *nclrBuffer = LoadMemberFromOpenNARC(narc, narcMemberIdx, FALSE, heapID, TRUE); + LoadPaletteWithSrcOffset(nclrBuffer, loadLocation, srcOffset, offset, size); } -void Graphics_LoadPartialPaletteFromOpenNARC(NARC *param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5) +void Graphics_LoadPartialPaletteFromOpenNARC(NARC *narc, u32 narcMemberIdx, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImagePaletteProxy *paletteProxy) { - void *v0 = LoadMemberFromOpenNARC(param0, param1, 0, param4, 1); - LoadPartialPalette(v0, param2, param3, param5); + void *nclrBuffer = LoadMemberFromOpenNARC(narc, narcMemberIdx, FALSE, heapID, TRUE); + LoadPartialPalette(nclrBuffer, vramType, baseAddr, paletteProxy); } -u32 Graphics_LoadImageMappingFromOpenNARC(NARC *param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8) +u32 Graphics_LoadImageMappingFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImageProxy *imageProxy) { - void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param7, 1); - return LoadImageMapping(v0, param3, param4, param5, param6, param8); + void *ncgrBuffer = LoadMemberFromOpenNARC(narc, narcMemberIdx, compressed, heapID, TRUE); + return LoadImageMapping(ncgrBuffer, layout, size, vramType, baseAddr, imageProxy); } -void *Graphics_GetCharDataFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4) +void *Graphics_GetCharDataFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dCharacterData **outCharData, u32 heapID) { - void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); - return GetCharacterData(v0, param3); + void *ncgrBuffer = LoadMemberFromOpenNARC(narc, narcMemberIdx, compressed, heapID, FALSE); + return GetCharacterData(ncgrBuffer, outCharData); } -void *Graphics_GetScrnDataFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4) +void *Graphics_GetScrnDataFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dScreenData **outScreenData, u32 heapID) { - void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); - return GetScreenData(v0, param3); + void *nscrBuffer = LoadMemberFromOpenNARC(narc, narcMemberIdx, compressed, heapID, FALSE); + return GetScreenData(nscrBuffer, outScreenData); } -void *Graphics_GetPlttDataFromOpenNARC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3) +void *Graphics_GetPlttDataFromOpenNARC(NARC *narc, u32 narcMemberIdx, NNSG2dPaletteData **outPaletteData, u32 heapID) { - void *v0 = LoadMemberFromOpenNARC(param0, param1, 0, param3, 0); - return GetPaletteData(v0, param2); + void *nclrBuffer = LoadMemberFromOpenNARC(narc, narcMemberIdx, FALSE, heapID, FALSE); + return GetPaletteData(nclrBuffer, outPaletteData); } -void *Graphics_GetCellBankFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4) +void *Graphics_GetCellBankFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dCellDataBank **outCellBank, u32 heapID) { - void *v0; - - v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); - return GetCellBank(v0, param3); + void *ncerBuffer = LoadMemberFromOpenNARC(narc, narcMemberIdx, compressed, heapID, 0); + return GetCellBank(ncerBuffer, outCellBank); } -void *Graphics_GetAnimBankFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4) +void *Graphics_GetAnimBankFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dAnimBankData **outAnimBank, u32 heapID) { - void *v0 = LoadMemberFromOpenNARC(param0, param1, param2, param4, 0); - return GetAnimBank(v0, param3); + void *nanrBuffer = LoadMemberFromOpenNARC(narc, narcMemberIdx, compressed, heapID, 0); + return GetAnimBank(nanrBuffer, outAnimBank); } void *LoadMemberFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd) @@ -523,10 +518,10 @@ static void *GetPaletteData(void *nclrBuffer, NNSG2dPaletteData **outPaletteData return nclrBuffer; } -static void *GetCellBank(void *ncerBuffer, NNSG2dCellDataBank **outCellData) +static void *GetCellBank(void *ncerBuffer, NNSG2dCellDataBank **outCellBank) { if (ncerBuffer != NULL) { - if (NNS_G2dGetUnpackedCellBank(ncerBuffer, outCellData) == 0) { + if (NNS_G2dGetUnpackedCellBank(ncerBuffer, outCellBank) == 0) { Heap_FreeToHeap(ncerBuffer); return NULL; }