diff options
author | Rémi Calixte <remicalixte.rmc@gmail.com> | 2021-08-22 15:10:58 +0200 |
---|---|---|
committer | Rémi Calixte <remicalixte.rmc@gmail.com> | 2021-08-22 15:10:58 +0200 |
commit | 23071e67d75ab4a52d68ef4fdecd090215216506 (patch) | |
tree | 49b432bf55bddacbcfb5112668cb69323c22d824 /include | |
parent | d789398ef7fc5a2955199ac4f87be40b90182405 (diff) | |
parent | d08722a7381c4c05a40ee59bb6de556616e1dfc2 (diff) |
Merge branch 'master' into unk_02006D98
Diffstat (limited to 'include')
-rw-r--r-- | include/bg_window.h | 2 | ||||
-rw-r--r-- | include/brightness.h | 38 | ||||
-rw-r--r-- | include/constants/accessories.h | 105 | ||||
-rw-r--r-- | include/font.h | 15 | ||||
-rw-r--r-- | include/main.h | 2 | ||||
-rw-r--r-- | include/oam.h | 42 | ||||
-rw-r--r-- | include/pokemon.h | 3 | ||||
-rw-r--r-- | include/proto.h | 4 | ||||
-rw-r--r-- | include/render_window.h | 143 | ||||
-rw-r--r-- | include/rs_migrate_string.h | 26 | ||||
-rw-r--r-- | include/save_block_2.h | 2 | ||||
-rw-r--r-- | include/save_data_read_error.h | 7 | ||||
-rw-r--r-- | include/save_data_write_error.h | 6 | ||||
-rw-r--r-- | include/scrcmd.h | 15 | ||||
-rw-r--r-- | include/script_buffers.h | 2 | ||||
-rw-r--r-- | include/sound_chatot.h | 19 | ||||
-rw-r--r-- | include/string16.h | 11 | ||||
-rw-r--r-- | include/text_02054590.h | 2 | ||||
-rw-r--r-- | include/unk_020040F4.h | 27 | ||||
-rw-r--r-- | include/unk_02008AA4.h | 55 | ||||
-rw-r--r-- | include/unk_02008DEC.h | 285 | ||||
-rw-r--r-- | include/unk_0200BB14.h | 106 | ||||
-rw-r--r-- | include/unk_02021590.h | 52 |
23 files changed, 885 insertions, 84 deletions
diff --git a/include/bg_window.h b/include/bg_window.h index 24ed152b..9ac29965 100644 --- a/include/bg_window.h +++ b/include/bg_window.h @@ -267,7 +267,7 @@ void CopyBgTilemapRectAffine(struct Bg *bg, u8 srcHeight, u8 adjustForSrcDims); void FillBgTilemapRect(struct BgConfig *bgConfig, - u32 bgId, + u8 bgId, u16 fillValue, u8 x, u8 y, diff --git a/include/brightness.h b/include/brightness.h new file mode 100644 index 00000000..029ee0b9 --- /dev/null +++ b/include/brightness.h @@ -0,0 +1,38 @@ +#ifndef POKEDIAMOND_UNK_0200A104_H +#define POKEDIAMOND_UNK_0200A104_H + +#include "global.h" +#include "nitro/FX_types.h" + +struct BrightnessData +{ + fx32 surfaceMask; + u32 screenMask; + u16 step_count; + s16 target_brightness; + u32 unk0c; + s8 transition_direction; + s16 brightness_diff; + s16 step_size_integer; + u16 step_size_fractional; + u16 fractional_count; + s16 current_brightness; + BOOL transitionActive; +}; + +void DoBrightnessTransitionStep(struct BrightnessData *brightness); +void InitBrightnessTransition(struct BrightnessData *brightnessData, + u16 step_count, + s16 target_brightness, + s16 start_brightness, + fx32 surfaceMask, + u32 screenMask); +void StartBrightnessTransition( + u16 step_count, s16 target_brightness, s16 start_brightness, fx32 surfaceMask, u32 screenMask); +void SetBrightness(fx32 brightness, fx32 surfaceMask, u32 screenMask); +void InitAllScreenBrightnessData(void); +void InitScreenBrightnessData(u32 screenMask); +void DoAllScreenBrightnessTransitionStep(void); +BOOL IsBrightnessTransitionActive(u32 screenMask); + +#endif // POKEDIAMOND_UNK_0200A104_H diff --git a/include/constants/accessories.h b/include/constants/accessories.h new file mode 100644 index 00000000..907e12cb --- /dev/null +++ b/include/constants/accessories.h @@ -0,0 +1,105 @@ +#ifndef POKEDIAMOND_CONSTANTS_ACCESSORIES_H +#define POKEDIAMOND_CONSTANTS_ACCESSORIES_H + +#define ACCESSORY_WHITE_FLUFF 0 +#define ACCESSORY_YELLOW_FLUFF 1 +#define ACCESSORY_PINK_FLUFF 2 +#define ACCESSORY_BROWN_FLUFF 3 +#define ACCESSORY_BLACK_FLUFF 4 +#define ACCESSORY_ORANGE_FLUFF 5 +#define ACCESSORY_ROUND_PEBBLE 6 +#define ACCESSORY_GLITTER_BOULDER 7 +#define ACCESSORY_SNAGGY_PEBBLE 8 +#define ACCESSORY_JAGGED_BOULDER 9 +#define ACCESSORY_BLACK_PEBBLE 10 +#define ACCESSORY_MINI_PEBBLE 11 +#define ACCESSORY_PINK_SCALE 12 +#define ACCESSORY_BLUE_SCALE 13 +#define ACCESSORY_GREEN_SCALE 14 +#define ACCESSORY_PURPLE_SCALE 15 +#define ACCESSORY_BIG_SCALE 16 +#define ACCESSORY_NARROW_SCALE 17 +#define ACCESSORY_BLUE_FEATHER 18 +#define ACCESSORY_RED_FEATHER 19 +#define ACCESSORY_YELLOW_FEATHER 20 +#define ACCESSORY_WHITE_FEATHER 21 +#define ACCESSORY_BLACK_MOUSTACHE 22 +#define ACCESSORY_WHITE_MOUSTACHE 23 +#define ACCESSORY_BLACK_BEARD 24 +#define ACCESSORY_WHITE_BEARD 25 +#define ACCESSORY_SMALL_LEAF 26 +#define ACCESSORY_BIG_LEAF 27 +#define ACCESSORY_NARROW_LEAF 28 +#define ACCESSORY_SHED_CLAW 29 +#define ACCESSORY_SHED_HORN 30 +#define ACCESSORY_THIN_MUSHROOM 31 +#define ACCESSORY_THICK_MUSHROOM 32 +#define ACCESSORY_STUMP 33 +#define ACCESSORY_PRETTY_DEWDROP 34 +#define ACCESSORY_SNOW_CRYSTAL 35 +#define ACCESSORY_SPARKS 36 +#define ACCESSORY_SHIMMERING_FIRE 37 +#define ACCESSORY_MYSTIC_FIRE 38 +#define ACCESSORY_DETERMINATION 39 +#define ACCESSORY_PECULIAR_SPOON 40 +#define ACCESSORY_PUFFY_SMOKE 41 +#define ACCESSORY_POISON_EXTRACT 42 +#define ACCESSORY_WEALTHY_COIN 43 +#define ACCESSORY_EERIE_THING 44 +#define ACCESSORY_SPRING 45 +#define ACCESSORY_SEASHELL 46 +#define ACCESSORY_HUMMING_NOTE 47 +#define ACCESSORY_SHINY_POWDER 48 +#define ACCESSORY_GLITTER_POWDER 49 +#define ACCESSORY_RED_FLOWER 50 +#define ACCESSORY_PINK_FLOWER 51 +#define ACCESSORY_WHITE_FLOWER 52 +#define ACCESSORY_BLUE_FLOWER 53 +#define ACCESSORY_ORANGE_FLOWER 54 +#define ACCESSORY_YELLOW_FLOWER 55 +#define ACCESSORY_GOOGLY_SPECS 56 +#define ACCESSORY_BLACK_SPECS 57 +#define ACCESSORY_GORGEOUS_SPECS 58 +#define ACCESSORY_SWEET_CANDY 59 +#define ACCESSORY_CONFETTI 60 +#define ACCESSORY_COLORED_PARASOL 61 +#define ACCESSORY_OLD_UMBRELLA 62 +#define ACCESSORY_SPOTLIGHT 63 +#define ACCESSORY_CAPE 64 +#define ACCESSORY_STANDING_MIKE 65 +#define ACCESSORY_SURFBOARD 66 +#define ACCESSORY_CARPET 67 +#define ACCESSORY_RETRO_PIPE 68 +#define ACCESSORY_FLUFFY_BED 69 +#define ACCESSORY_MIRROR_BALL 70 +#define ACCESSORY_PHOTO_BOARD 71 +#define ACCESSORY_PINK_BARRETTE 72 +#define ACCESSORY_RED_BARRETTE 73 +#define ACCESSORY_BLUE_BARRETTE 74 +#define ACCESSORY_YELLOW_BARRETTE 75 +#define ACCESSORY_GREEN_BARRETTE 76 +#define ACCESSORY_PINK_BALLOON 77 +#define ACCESSORY_RED_BALLOONS 78 +#define ACCESSORY_BLUE_BALLOONS 79 +#define ACCESSORY_YELLOW_BALLOON 80 +#define ACCESSORY_GREEN_BALLOONS 81 +#define ACCESSORY_LACE_HEADDRESS 82 +#define ACCESSORY_TOP_HAT 83 +#define ACCESSORY_SILK_VEIL 84 +#define ACCESSORY_HEROIC_HEADBAND 85 +#define ACCESSORY_PROFESSOR_HAT 86 +#define ACCESSORY_FLOWER_STAGE 87 +#define ACCESSORY_GOLD_PEDESTAL 88 +#define ACCESSORY_GLASS_STAGE 89 +#define ACCESSORY_AWARD_PODIUM 90 +#define ACCESSORY_CUBE_STAGE 91 +#define ACCESSORY_TURTWIG_MASK 92 +#define ACCESSORY_CHIMCHAR_MASK 93 +#define ACCESSORY_PIPLUP_MASK 94 +#define ACCESSORY_BIG_TREE 95 +#define ACCESSORY_FLAG 96 +#define ACCESSORY_CROWN 97 +#define ACCESSORY_TIARA 98 +#define ACCESSORY_COMET 99 + +#endif diff --git a/include/font.h b/include/font.h index 963e36bc..3c0f4267 100644 --- a/include/font.h +++ b/include/font.h @@ -4,28 +4,33 @@ #include "global.h" #include "text.h" -struct UnkStruct_02002C14 +struct UnkStruct_02002C14_sub { const char buf[0x80]; u8 width; u8 height; +}; + +struct UnkStruct_02002C14 +{ + struct UnkStruct_02002C14_sub unk00; void *unk84[4]; - struct UnkStruct_0202199C *unk94[4]; + struct FontData *unk94[4]; }; extern struct UnkStruct_02002C14 *UNK_02106FC8; void FUN_02002C14(); -void FUN_02002C50(u32 param0, u32 param1); +void FUN_02002C50(u32 font_id, u32 heap_id); void FUN_02002C84(s32 param0, u32 param1); void FUN_02002CC0(s32 param0); void FUN_02002CF8(int param0); -struct UnkStruct_02002C14 *FUN_02002D94(u32 param0, u32 param1); +struct UnkStruct_02002C14_sub *FUN_02002D94(u32 param0, u32 param1); u32 FontFunc(u32 fontId, struct TextPrinter *printer); u32 FUN_02002DE0(u32 param0, u16 *str, u32 param2); u32 FUN_02002E14(u32 param0, struct String *str, u32 param2); s32 GetFontAttribute(u8 fontId, s32 attr); -void FUN_02002ED0(u32 layer, u32 baseAddr, u32 heap_id); +void FUN_02002ED0(enum GFBgLayer layer, u32 baseAddr, u32 heap_id); void FUN_02002EEC(u32 layer, u32 baseAddr, u32 heap_id); s32 FUN_02002F08(u32 param0, struct String *str, u32 param2); u32 FUN_02002F40(u32 param0, struct String *str, u32 param2, u32 param3); diff --git a/include/main.h b/include/main.h index ba4d7bc2..87110de5 100644 --- a/include/main.h +++ b/include/main.h @@ -94,7 +94,7 @@ struct Main u16 touchNew; u16 touchHeld; u8 touchpadReadAuto; - u8 unk65; + u8 screensFlipped; u8 unk66; u8 unk67; u8 softResetDisabled; diff --git a/include/oam.h b/include/oam.h new file mode 100644 index 00000000..773c985d --- /dev/null +++ b/include/oam.h @@ -0,0 +1,42 @@ +#ifndef POKEDIAMOND_UNK_02009EAC_H +#define POKEDIAMOND_UNK_02009EAC_H + +#include "global.h" +#include "NNS_g2d.h" + +struct OamData +{ + NNSG2dOamManager oamManagers[2]; + u32 heap_id; +}; + +void FUN_02009EAC(s32 param0, + s32 param1, + s32 param2, + s32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7, + u32 param8); +void InitOamData(s32 param0, + s32 param1, + s32 param2, + s32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7, + u32 heap_id); +void ApplyAndResetOamManagerBuffer(void); +void DeinitOamData(void); +void FUN_02009FD8(void *param0, u32 *param1, u32 param2, u32 param3); +NNSG2dOamManager *GetOamManager(u32 screen); +void FUN_0200A064(u32 heap_id); +void FUN_0200A06C(u32 heap_id); +u32 EntryOamManagerOamWithAffineIdxMainScreen(u32 param0, u32 param1); +u32 EntryOamManagerOamWithAffineIdxSubScreen(u32 param0, u32 param1); +u32 EntryOamManagerAffineMainScreen(u32 param0); +u32 EntryOamManagerAffineSubScreen(u32 param0); + +#endif // POKEDIAMOND_UNK_02009EAC_H diff --git a/include/pokemon.h b/include/pokemon.h index d107bf85..60fa1838 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -10,6 +10,7 @@ #include "constants/pokemon.h" #include "string16.h" #include "player_data.h" +#include "sound_chatot.h" struct BaseStats { /* 0x00 */ u8 hp; @@ -294,7 +295,7 @@ void Party_SpreadPokerus(struct PlayerParty * party); BOOL Pokemon_HasPokerus(struct Pokemon * pokemon); BOOL Pokemon_IsImmuneToPokerus(struct Pokemon * pokemon); void Pokemon_UpdateArceusForme(struct Pokemon * pokemon); -void FUN_02069FB0(u32 r7, u32 r5, u32 r4, u32 r6, u32 sp18, u32 sp1C, u32 sp20); +void FUN_02069FB0(struct SaveChatotSoundClip *r7, u32 r5, u16 r4, s32 r6, s32 sp18, u32 sp1C, u32 sp20); void FUN_0206A014(struct Pokemon * pokemon, struct PlayerData * a1, u32 pokeball, u32 a3, u32 encounterType, u32 heap_id); void FUN_0206A094(struct Pokemon * pokemon, u32 a1, u32 a2); BOOL FUN_0206A13C(struct Pokemon * pokemon, u32 a1); diff --git a/include/proto.h b/include/proto.h index 7af3f19d..43ed28ac 100644 --- a/include/proto.h +++ b/include/proto.h @@ -11,10 +11,6 @@ int TrainerClass_GetGenderOrTrainerCount(int x); int FUN_02014C3C(u8); void FUN_02014C54(int, int, struct UnkStruct_02069038 *, u8); u32 IsNighttime(void); // is day or night -int FUN_02005F14(int); -void FUN_02005E80(int); -void FUN_02005E90(int, int, int, int); -void FUN_020056AC(int, int, int, int, int); void FUN_020808AC(struct BoxPokemon *, struct PlayerData *, int, u32, u32); #endif //POKEDIAMOND_PROTO_H diff --git a/include/render_window.h b/include/render_window.h new file mode 100644 index 00000000..385c61ad --- /dev/null +++ b/include/render_window.h @@ -0,0 +1,143 @@ +#ifndef POKEDIAMOND_UNK_0200CABC_H +#define POKEDIAMOND_UNK_0200CABC_H + +#include "global.h" +#include "bg_window.h" +#include "pokemon.h" +#include "unk_02008DEC.h" + +struct UnkStruct_0200CABC_1 +{ + struct Window *unk000; + u8 unk004[9][0x80]; + u16 fillValue; + u8 unk486; + u8 unk487 : 7; + u8 unk488 : 2; +}; + +struct UnkStruct_0200CABC_2 +{ + u32 unk000; + u8 unk004[0x12c]; + struct UnkStruct_02008DEC_1 *unk130; + struct UnkStruct_02008DEC_1 *unk134; + u8 unk138[0x2a]; + u16 unk162; + u32 *unk164; + struct BgConfig *bgConfig; + u8 bgId; + u8 x; + u8 y; + u8 unk16f; +}; + +struct UnkStruct_0200CABC_3 +{ + u32 unk00; + u32 unk04; + u32 unk08; + u32 unk0c; +}; + +u32 FUN_0200CABC(struct BgConfig *bgConfig, u32 layer, u32 numTiles, u32 param3, u32 heap_id); +s32 FUN_0200CAFC(void); +void FUN_0200CB00( + struct BgConfig *bg_config, u32 layer, u32 num_tiles, u32 param3, u8 param4, u32 heap_id); +void DrawFrame1(struct BgConfig *bgConfig, + u8 bgId, + u8 x, + u8 y, + u8 width, + u8 height, + u8 paletteNum, + u16 fillValue); +void DrawFrameAndWindow1(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); +void ClearFrameAndWindow1(struct Window *window, BOOL copy_to_vram); +s32 FUN_0200CD60(s32 param0); +s32 FUN_0200CD64(s32 param0); +void FUN_0200CD68( + struct BgConfig *param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5); +void DrawFrame2(struct BgConfig *bgConfig, + u8 bgId, + u8 x, + u8 y, + u8 width, + u8 height, + u8 paletteNum, + u16 fillValue); +void DrawWindowFrame2(struct Window *window, u32 fill_value, u32 palette_num); +void DrawFrameAndWindow2(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); +void ClearFrameAndWindow2(struct Window *window, BOOL param1); +void BlitRect4Bit(u8 *srcPixels, + u16 srcX, + u16 srcY, + u16 srcWidth, + u16 srcHeight, + u8 *dstPixels, + u16 dstWidth, + u16 dstHeight, + u16 dstX, + u16 dstY, + u16 width, + u16 height); +void FUN_0200D18C(struct Window *window, u16 fill_value); +void FUN_0200D274( + struct BgConfig *bg_config, u8 bg_id, u16 param2, u8 param3, u8 param4, u32 heap_id); +void FUN_0200D300(struct BgConfig *bg_config, + u8 bg_id, + u16 numtiles, + u8 param3, + u8 param4, + u16 param5, + u32 heap_id); +void FUN_0200D378( + struct BgConfig *bg_config, u8 bg_id, u16 numtiles, u8 param3, u16 param4, u32 heap_id); +void DrawFrame3(struct BgConfig *bgConfig, + u8 bgId, + u8 x, + u8 y, + u8 width, + u8 height, + u8 paletteNum, + u16 fillValue); +void DrawWindowCorner(struct Window *window, u16 fillValue, u8 paletteNum); +void DrawFrameAndWindow3( + struct Window *window, BOOL copy_to_vram, u16 fillValue, u8 paletteNum, u8 param4); +void ClearFrameAndWindow3(struct Window *window, u8 param1, BOOL copy_to_vram); +struct UnkStruct_0200CABC_1 *FUN_0200D858(struct Window *window, u32 param1); +void FUN_0200D980(struct UnkStruct_0200CABC_1 *param0, u32 param1); +void FUN_0200DB7C(u32 param0, void *param1); +void FUN_0200DBE8(u32 param0, void *param1); +void FUN_0200DBFC(struct UnkStruct_0200CABC_1 *param0); +void FUN_0200DC24(struct UnkStruct_0200CABC_1 *param0); +u8 *FUN_0200DC4C(struct BgConfig *bg_config, + u8 bg_id, + u8 param2, + u8 param3, + u8 param4, + u16 param5, + u16 param6, + u8 param7, + s32 param8); +u8 *FUN_0200DCA4(struct BgConfig *bg_config, + u8 bg_id, + u8 param2, + u8 param3, + u8 param4, + u16 param5, + struct Pokemon *param6, + s32 param7); +void FUN_0200DCF8(u32 param0, void *param1); +struct UnkStruct_0200CABC_2 *FUN_0200DD70( + struct BgConfig *bg_config, u8 bg_id, u8 param2, u8 param3, u32 param4); +void FUN_0200DDAC(struct UnkStruct_0200CABC_2 *param0, u32 param1); +void FUN_0200DDD8(struct UnkStruct_0200CABC_2 *param0); +void FUN_0200DE30(struct UnkStruct_0200CABC_2 *param0, u8 param1, u8 param2); +void FUN_0200DE80(struct UnkStruct_0200CABC_2 *param0, u16 param1, u8 param2); +void FUN_0200DEC0(struct UnkStruct_0200CABC_2 *param0, struct Pokemon *param1); +void FUN_0200DEF4(struct UnkStruct_0200CABC_2 *param0, struct SomeDrawPokemonStruct *param1); +void DrawFramed10x10Square(struct UnkStruct_0200CABC_2 *param0, u8 paletteNum, u16 fillValue); +void ClearFramed10x10Square(struct UnkStruct_0200CABC_2 *param0); + +#endif // POKEDIAMOND_UNK_0200CABC_H diff --git a/include/rs_migrate_string.h b/include/rs_migrate_string.h new file mode 100644 index 00000000..b83807f5 --- /dev/null +++ b/include/rs_migrate_string.h @@ -0,0 +1,26 @@ +#ifndef POKEDIAMOND_UNK_02015D14_H
+#define POKEDIAMOND_UNK_02015D14_H
+
+// --------------------------------------------
+// ConvertRSStringToDPStringInternational
+// ============================================
+// Param rs_str: Pointer to u8 representing
+// the name of a Pokemon or
+// its OT when migrating from
+// Advanced Gameboy.
+// Param dp_str: Pointer to u16 representing
+// the destination string buffer
+// for migration to Diamond
+// or Pearl.
+// Param length: The length of the string
+// to convert, including the
+// terminator byte.
+// Param language: Game language of origin.
+// See include/config.h.
+// Return: TRUE if the conversion was completed
+// successfully. Otherwise, dp_str will
+// be filled with up to 10 question mark
+// characters.
+BOOL ConvertRSStringToDPStringInternational(const u8 * rs_str, u16 * dp_str, u32 length, u32 language);
+
+#endif //POKEDIAMOND_UNK_02015D14_H
diff --git a/include/save_block_2.h b/include/save_block_2.h index a4514c96..fb2bc92a 100644 --- a/include/save_block_2.h +++ b/include/save_block_2.h @@ -152,6 +152,6 @@ BOOL FlashLoadChunk(u32 src, void * dest, u32 size); void FlashWriteCommandCallback(void * arg); int FlashWriteChunkInternal(u32 dest, void * src, u32 size); BOOL WaitFlashWrite(int lock, BOOL * res); -void SaveErrorHandling(int lock, int errno); +void SaveErrorHandling(int lock, u32 errno); #endif //POKEDIAMOND_SAVE_BLOCK_2_H diff --git a/include/save_data_read_error.h b/include/save_data_read_error.h new file mode 100644 index 00000000..d3556734 --- /dev/null +++ b/include/save_data_read_error.h @@ -0,0 +1,7 @@ +#ifndef POKEDIAMOND_SAVE_DATA_READ_ERROR_H +#define POKEDIAMOND_SAVE_DATA_READ_ERROR_H + +void ShowSaveDataReadError(u32 heap_id); +void ShowGBACartRemovedError(u32 heap_id); + +#endif diff --git a/include/save_data_write_error.h b/include/save_data_write_error.h new file mode 100644 index 00000000..e4c77453 --- /dev/null +++ b/include/save_data_write_error.h @@ -0,0 +1,6 @@ +#ifndef POKEDIAMOND_SAVE_DATA_WRITE_ERROR_H +#define POKEDIAMOND_SAVE_DATA_WRITE_ERROR_H + +void ShowSaveDataWriteError(u32 heap_id, u32 err_no); + +#endif diff --git a/include/scrcmd.h b/include/scrcmd.h index 5e28a4d0..7a0ab21e 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -15,6 +15,14 @@ struct UnkStruct_0203A288 { u8 padding[1]; }; +typedef struct UnkStruct_0203B174 +{ + BOOL Unk00; + u32 Unk04; + void *Unk08; + struct UnkSavStruct80 *Unk0C; +} UnkStruct_0203B174; + //scrcmd.c BOOL ScrCmd_Nop(struct ScriptContext* ctx); BOOL ScrCmd_Dummy(struct ScriptContext* ctx); @@ -249,7 +257,12 @@ BOOL ScrCmd_Unk01A6(struct ScriptContext* ctx); BOOL ScrCmd_Unk01A7(struct ScriptContext* ctx); BOOL ScrCmd_Unk01AD(struct ScriptContext* ctx); -//scrcmd_18.c +//scrcmd_amity_square.c +BOOL ScrCmd_ClearAmitySquareSteps(struct ScriptContext* ctx); +BOOL ScrCmd_CheckAmitySquareSteps(struct ScriptContext* ctx); +BOOL ScrCmd_GetAmitySquareAccessory(struct ScriptContext* ctx); + +//scrcmd_party.c BOOL ScrCmd_GiveMon(struct ScriptContext* ctx); BOOL ScrCmd_GetPartyMonSpecies(struct ScriptContext* ctx); BOOL ScrCmd_CheckPartyMonOTID(struct ScriptContext* ctx); diff --git a/include/script_buffers.h b/include/script_buffers.h index b9f0e268..e5c39291 100644 --- a/include/script_buffers.h +++ b/include/script_buffers.h @@ -104,7 +104,7 @@ void BufferMonthNameAbbr(struct ScrStrBufs * mgr, u32 idx, u32 month); void ScrStrBufs_UpperFirstChar(struct ScrStrBufs * mgr, u32 idx); void StringExpandPlaceholders(struct ScrStrBufs * mgr, struct String * dest, struct String * src); void ScrStrBufs_ResetBuffers(struct ScrStrBufs * mgr); -struct UnkStruct_0200B870 * MessagePrinter_new(u32 r5, u32 r6, u32 sp4, u32 r4); +struct UnkStruct_0200B870 * MessagePrinter_new(u32 color1, u32 color2, u32 color3, u32 heap_id); void MessagePrinter_delete(struct UnkStruct_0200B870 * a0); void FUN_0200B9A8(struct UnkStruct_0200B870 * a0, int a1, struct Window * a2, int a3, int a4); void FUN_0200B9EC(struct UnkStruct_0200B870 * string, u32 value, u32 n, enum PrintingMode mode, struct Window *window, int x, int y); diff --git a/include/sound_chatot.h b/include/sound_chatot.h new file mode 100644 index 00000000..fbbba0c6 --- /dev/null +++ b/include/sound_chatot.h @@ -0,0 +1,19 @@ +#ifndef POKEDIAMOND_SOUND_CHATOT_H +#define POKEDIAMOND_SOUND_CHATOT_H + +#include "global.h" +#include "sav_chatot.h" + +BOOL FUN_02005CFC(void); +BOOL Chatot_checkCry(struct SaveChatotSoundClip *param0); +u32 FUN_02005D48(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); +void FUN_02005DFC(void); +u32 Chatot_startRecording(void); +void Chatot_stopRecording(void); +void Chatot_saveRecording(struct SaveChatotSoundClip *param0); +void FUN_02005E80(u8 param0); +void FUN_02005E90(struct SaveChatotSoundClip *param0, u32 param1, s32 param2, s32 param3); +u32 FUN_02005EE0(struct SaveChatotSoundClip *param0); +BOOL FUN_02005F14(s32 param0); + +#endif // POKEDIAMOND_UNK_02005CFC_H diff --git a/include/string16.h b/include/string16.h index 69ea4e30..f42ff918 100644 --- a/include/string16.h +++ b/include/string16.h @@ -2,6 +2,7 @@ #define POKEDIAMOND_STRING16_H #include "string_util.h" +#include "unk_02021590.h" struct String { @@ -12,12 +13,6 @@ struct String u8 padding[2]; }; -struct UnkStruct_0202199C -{ - u8 filler_00[0x70]; - int (*unk_70)(struct UnkStruct_0202199C *, int); -}; - #define STR16_MAGIC 0xB6F8D2EC struct String * String_ctor(u32 count, u32 heap_id); @@ -25,8 +20,8 @@ BOOL StringCompare(struct String *, struct String *); void CopyU16ArrayToStringN(struct String *, u16 *, u32); // copy void StringSetEmpty(struct String *); // set empty struct String * StringDup(struct String *, u32 heap_id); -s32 StringGetWidth(struct UnkStruct_0202199C * r7, const u16 * arr, u32 r6); -s32 StringGetWidth_SingleLine_HandleClearToControlCode(struct UnkStruct_0202199C * r6, const u16 * arr); +s32 StringGetWidth(struct FontData * r7, const u16 * arr, u32 r6); +s32 StringGetWidth_SingleLine_HandleClearToControlCode(struct FontData * r6, const u16 * arr); void String_dtor(struct String * str); void StringCopy(struct String * dest, struct String * src); void String16_FormatInteger(struct String * str, int num, u32 ndigits, int strConvMode, BOOL whichCharset); diff --git a/include/text_02054590.h b/include/text_02054590.h index 4d05260a..d55f0b80 100644 --- a/include/text_02054590.h +++ b/include/text_02054590.h @@ -15,6 +15,6 @@ u16 FUN_02054658(struct Window * window, struct String *str, struct Options *opt u16 DrawFieldMessage(struct Window * window, struct String *str, u8 fontId, u32 speed, u8 a4, s32 a5); u8 FUN_020546C8(u32 param0); void FUN_020546E0(struct BgConfig *param0, struct Window *param1, u32 param2, u32 param3); -void FUN_02054744(struct Window *param0, u32 param1, u32 param2); +void FUN_02054744(struct Window *param0, u32 param1, u16 param2); #endif // POKEDIAMOND_UNK_02054590_H diff --git a/include/unk_020040F4.h b/include/unk_020040F4.h index 413e853f..819a96fa 100644 --- a/include/unk_020040F4.h +++ b/include/unk_020040F4.h @@ -2,6 +2,7 @@ #define POKEDIAMOND_UNK_020040F4_H #include "global.h" +#include "SPI_mic.h" struct WaveArcInfo { @@ -31,11 +32,11 @@ struct UnkStruct_020040F4_2 }; void FUN_020040F4(u8 param0); -u8 FUN_02004104(); +u8 FUN_02004104(void); void FUN_02004110(u16 param0); -u16 FUN_02004124(); +u16 FUN_02004124(void); void FUN_02004130(u16 param0); -u16 FUN_02004140(); +u16 FUN_02004140(void); void FUN_0200414C(u16 param0); void FUN_0200415C(u8 param0); BOOL FUN_02004180(s32 param0); @@ -51,10 +52,10 @@ void FUN_020046C4(int param0, u32 param1); void FUN_020046E8(s32 param0); void FUN_02004704(s32 param0, int param1, u32 param2); void FUN_02004724(int param0); -void FUN_02004738(); +void FUN_02004738(void); int FUN_02004748(s32 param0); void FUN_020047C8(u8 param0, u8 param1); -void FUN_02004810(); +void FUN_02004810(void); void GF_SndPlayerMoveVolume(int playerNo, s32 param1, s32 param2); void GF_SndPlayerSetInitialVolume(int playerNo, s32 param1); void FUN_02004858(u32 param0, int playerNo); @@ -65,8 +66,8 @@ u8 FUN_020048D0(u16 param0); u32 GF_SndPlayerGetSeqNo(u32 *param0); u32 FUN_020048F4(u16 param0); u16 FUN_02004900(u32 param0); -u32 GF_MIC_StartAutoSampling(u32 param0); -u32 GF_MIC_StopAutoSampling(u32 param0); +u32 GF_MIC_StartAutoSampling(struct MIC_SamplingData *param0); +u32 GF_MIC_StopAutoSampling(void); u32 GF_MIC_DoSamplingAsync(u32 param0, u32 param1, u32 param2, u32 param3); void *FUN_02004930(u32 param0); BOOL FUN_02004984(u32 param0); @@ -80,12 +81,12 @@ void FUN_02004AF8(u32 param0, s32 param1); u32 FUN_02004B30(u32 param0, s32 param1, s32 param2, u32 param3, u32 param4); void FUN_02004C1C(u8 *param0, u32 param1); void FUN_02004C3C(u32 param0); -BOOL GF_SndCaptureIsActive(); +BOOL GF_SndCaptureIsActive(void); u32 GF_SndCaptureStartReverb(u32 param0); void GF_SndCaptureStopReverb(u32 param0); void GF_SndCaptureSetReverbVolume(u32 param0, u32 param1); -void FUN_02004CB4(); -void GF_SndCaptureStopEffect(); +void FUN_02004CB4(void); +void GF_SndCaptureStopEffect(void); void FUN_02004D04(s32 param0); void GF_SndPlayerSetTrackPitch(int playerNo, u32 param1, s32 param2); void FUN_02004D34(u16 param0, u32 param1, s32 param2); @@ -93,8 +94,8 @@ void GF_SndPlayerSetTrackPan(int playerNo, u32 param1, s32 param2); void GF_SndSetMonoFlag(u32 param0); void FUN_02004D74(s32 param0); void FUN_02004D84(u32 param0); -u16 FUN_02004D94(); -u8 *FUN_02004DB4(); +u16 FUN_02004D94(void); +u8 *FUN_02004DB4(void); void FUN_02004DBC(u8 param0); u32 FUN_02004DCC(u32 param0, u16 param1, u32 param2, u32 param3, u8 param4, u32 param5); u32 FUN_02004E08( @@ -110,7 +111,7 @@ void FUN_02004F70(struct UnkStruct_020040F4_2 *param0, u8 *param1, int param2, s void FUN_02005068(s16 *param0, s16 *param1, u32 param2, u32 param3, void *param4); void FUN_02005160(u32 param0); void FUN_0200516C(u32 param0); -void FUN_020051AC(); +void FUN_020051AC(void); void GF_SndPlayerSetPlayerVolume(u32 param0, u8 param1); #endif // POKEDIAMOND_UNK_020040F4_H diff --git a/include/unk_02008AA4.h b/include/unk_02008AA4.h new file mode 100644 index 00000000..00343884 --- /dev/null +++ b/include/unk_02008AA4.h @@ -0,0 +1,55 @@ +#ifndef POKEDIAMOND_UNK_02008AA4_H +#define POKEDIAMOND_UNK_02008AA4_H + +#include "global.h" +#include "unk_0200BB14.h" + +struct UnkStruct_02008AA4_1 +{ + struct UnkStruct_0200BB14_sub *unk00; + s32 unk04; +}; + +struct UnkStruct_02008AA4_2 +{ + s32 unk00; + s32 unk04; + s32 unk08; + s32 unk0C; + s32 unk10; + s32 unk14; + u32 unk18; + u32 unk1C; +}; + +void FUN_02008AA4(struct UnkStruct_0200BB14_sub *param0, + s32 param1, + s32 param2, + s32 param3, + s32 param4, + s32 param5, + s32 param6, + u32 param7, + u32 param8, + struct UnkStruct_02008DEC_1 *param9, + struct UnkStruct_02008DEC_1 *param10, + struct UnkStruct_02008DEC_1 *param11, + struct UnkStruct_02008DEC_1 *param12, + struct UnkStruct_02008DEC_1 *param13, + struct UnkStruct_02008DEC_1 *param14); +struct UnkStruct_02008AA4_1 *FUN_02008BE0(struct UnkStruct_02008AA4_2 *param0, + u32 param1, + struct UnkStruct_02008DEC_1 *param2, + struct UnkStruct_02008DEC_1 *param3, + struct UnkStruct_02008DEC_1 *param4, + struct UnkStruct_02008DEC_1 *param5, + struct UnkStruct_02008DEC_1 *param6, + struct UnkStruct_02008DEC_1 *param7); +void FUN_02008C80(struct UnkStruct_02008AA4_1 *param0); +u32 FUN_02008C9C(u32 param0, void *param1, u32 param2); +void FUN_02008D04(u32 param0, u32 param1, u32 param2); +void FUN_02008D24(u32 param0, u32 param1, u32 param2); +void FUN_02008D44(u32 param0, u32 param1); +void FUN_02008DDC(u32 param0); + +#endif // POKEDIAMOND_UNK_02008AA4_H diff --git a/include/unk_02008DEC.h b/include/unk_02008DEC.h new file mode 100644 index 00000000..6504b524 --- /dev/null +++ b/include/unk_02008DEC.h @@ -0,0 +1,285 @@ +#ifndef POKEDIAMOND_UNK_02008DEC_H +#define POKEDIAMOND_UNK_02008DEC_H + +#include "global.h" +#include "NNS_g2d.h" +#include "filesystem.h" + +struct UnkStruct_02008DEC_sub +{ + u32 unk00; + u32 unk04; + void *unk08; +}; + +struct UnkStruct_02008DEC_1 +{ + + u32 unk00; + struct UnkStruct_02008DEC_sub *unk04; + s32 unk08; + u32 unk0C; + s32 unk10; +}; + +struct UnkStruct_02008DEC_2 +{ + union + { + struct UnkStruct_02008DEC_3 *unk00_3; + struct UnkStruct_02008DEC_4 *unk00_4; + }; + s32 unk04; + u32 unk08; + u8 unk0C; +}; + +struct UnkStruct_02008DEC_3 +{ + s32 unk00; + u8 unk04[0x40]; + u32 unk44; + u32 unk48; +}; + +struct UnkStruct_02008DEC_4 +{ + NarcId unk00; + s32 unk04; + BOOL unk08; + s32 unk0C; + u32 unk10; + u32 unk14; +}; + +struct UnkStruct_02008DEC_5 +{ + struct UnkStruct_02008DEC_sub **unk00; + s32 unk04; + s32 unk08; +}; + +struct CharacterData_02008DEC +{ + NNSG2dCharacterData *chData; + u32 unk04; +}; + +struct PaletteData_02008DEC +{ + NNSG2dPaletteData *plttData; + u32 unk04; + u32 unk08; +}; + +struct CellDataBank_02008DEC +{ + NNSG2dCellDataBank *cellBank; +}; + +struct AnimBank_02008DEC +{ + NNSG2dAnimBankData *bankData; +}; + +struct UnkStruct_02008DEC_1 *FUN_02008DEC(u32 param0, s32 param1, u32 param2); +void FUN_02008E2C(struct UnkStruct_02008DEC_1 *param0); +struct UnkStruct_02008DEC_sub *FUN_02008E6C(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_2 *param1, + s32 param2, + u32 param3); +struct UnkStruct_02008DEC_sub *FUN_02008F34(struct UnkStruct_02008DEC_1 *param0, + NarcId param1, + s32 param2, + BOOL param3, + s32 param4, + u32 param5, + u32 param6); +struct UnkStruct_02008DEC_sub *FUN_02008F90(struct UnkStruct_02008DEC_1 *param0, + NarcId param1, + s32 param2, + BOOL param3, + s32 param4, + u32 param5, + u32 param6, + BOOL param7); +struct UnkStruct_02008DEC_sub *FUN_02008FEC(struct UnkStruct_02008DEC_1 *param0, + NarcId param1, + s32 param2, + BOOL param3, + s32 param4, + u32 param5, + u32 param6, + u32 param7); +struct UnkStruct_02008DEC_sub *FUN_0200904C(struct UnkStruct_02008DEC_1 *param0, + NarcId param1, + s32 param2, + BOOL param3, + s32 param4, + u32 param5, + u32 param6, + u32 param7, + BOOL param8); +struct UnkStruct_02008DEC_sub *FUN_020090AC(struct UnkStruct_02008DEC_1 *param0, + NarcId param1, + s32 param2, + BOOL param3, + s32 param4, + u32 param5, + u32 param6); +void FUN_020090FC(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_sub *param1, + NarcId param2, + s32 param3, + BOOL param4, + u32 param5); +void FUN_02009168(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_sub *param1, + NarcId param2, + s32 param3, + BOOL param4, + u32 param5); +struct UnkStruct_02008DEC_sub *FUN_020091E0(struct UnkStruct_02008DEC_1 *param0, + NARC *param1, + u32 param2, + u32 param3, + s32 param4, + u32 param5, + u32 param6); +struct UnkStruct_02008DEC_sub *FUN_0200923C(struct UnkStruct_02008DEC_1 *param0, + NARC *param1, + u32 param2, + u32 param3, + s32 param4, + u32 param5, + u32 param6, + u32 param7); +struct UnkStruct_02008DEC_sub *FUN_02009298(struct UnkStruct_02008DEC_1 *param0, + NARC *param1, + u32 param2, + u32 param3, + s32 param4, + u32 param5, + u32 param6, + u32 param7); +struct UnkStruct_02008DEC_sub *FUN_020092F8(struct UnkStruct_02008DEC_1 *param0, + NARC *param1, + u32 param2, + u32 param3, + s32 param4, + u32 param5, + u32 param6, + u32 param7, + u32 param8); +struct UnkStruct_02008DEC_sub *FUN_02009358(struct UnkStruct_02008DEC_1 *param0, + NARC *param1, + u32 param2, + u32 param3, + s32 param4, + u32 param5, + u32 param6); +s32 FUN_020093A8(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_2 *param1, + struct UnkStruct_02008DEC_5 *param2, + u32 param3); +void FUN_020093DC(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_2 *param1, + s32 param2, + s32 param3, + struct UnkStruct_02008DEC_5 *param4, + u32 param5); +struct UnkStruct_02008DEC_5 *FUN_02009424(s32 param0, u32 param1); +void FUN_02009448(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_0200945C(struct UnkStruct_02008DEC_1 *param0, s32 param1); +void FUN_02009474(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009490(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_sub *param1); +void FUN_020094C4(struct UnkStruct_02008DEC_1 *param0); +struct UnkStruct_02008DEC_sub *FUN_020094F0(struct UnkStruct_02008DEC_1 *param0, s32 param1); +s32 FUN_02009530(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_02009544(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_0200955C(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_02009574(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_0200958C(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_020095A4(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_020095BC(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_020095D4(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_020095E4(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_02009610(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009630(struct UnkStruct_02008DEC_sub *param0, u32 param1); +u32 FUN_0200965C(void); +struct UnkStruct_02008DEC_2 *FUN_02009660(struct UnkStruct_02008DEC_2 *param0, s32 param1); +void FUN_02009668(u32 *param0, struct UnkStruct_02008DEC_2 *param1, u32 param2); +void FUN_020096B4(struct UnkStruct_02008DEC_2 *param0); +s32 FUN_020096CC(struct UnkStruct_02008DEC_2 *param0); +s32 FUN_020096DC(struct UnkStruct_02008DEC_2 *param0, s32 param1); +s32 FUN_02009710(struct UnkStruct_02008DEC_2 *param0, s32 param1); +BOOL FUN_0200973C(struct UnkStruct_02008DEC_2 *param0, s32 param1); +u32 FUN_02009768(struct UnkStruct_02008DEC_2 *param0, s32 param1); +u32 FUN_0200979C(struct UnkStruct_02008DEC_2 *param0, s32 param1); +struct UnkStruct_02008DEC_sub *FUN_020097D0(struct UnkStruct_02008DEC_1 *param0); +void FUN_020097FC( + struct UnkStruct_02008DEC_sub *param0, u32 param1, u32 param2, u32 param3, u32 param4); +struct CharacterData_02008DEC *FUN_0200986C(void *param0, u32 param1, u32 param2); +struct PaletteData_02008DEC *FUN_0200988C(void *param0, u32 param1, u32 param2, u32 param3); +struct CellDataBank_02008DEC *FUN_020098B0(void *param0, u32 param1); +struct AnimBank_02008DEC *FUN_020098CC(void *param0, u32 param1); +void *FUN_020098E8(void *param0, u32 param1); +void *FUN_02009904(void *param0, u32 param1); +void FUN_02009920(struct UnkStruct_02008DEC_sub *param0); +u32 *FUN_02009934(struct UnkStruct_02008DEC_sub *param0); +void FUN_0200994C(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_sub *param1, + void *param2, + s32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7); +void FUN_02009978(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_sub *param1, + NarcId param2, + s32 param3, + BOOL param4, + s32 param5, + u32 param6, + u32 param7, + u32 param8, + u32 param9, + BOOL param10); +void FUN_020099B0(struct UnkStruct_02008DEC_1 *param0, + struct UnkStruct_02008DEC_sub *param1, + NARC *param2, + u32 param3, + u32 param4, + s32 param5, + u32 param6, + u32 param7, + u32 param8, + u32 param9, + u32 param10); +s32 FUN_020099E8(struct UnkStruct_02008DEC_4 *param0); +void *FUN_02009A04(NARC *param0, u32 param1, u32 param2, u32 param3, u32 param4); +u32 FUN_02009A50(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009A90(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_02009AC4(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_02009B04(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009B44(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_02009B78(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009BB8(struct UnkStruct_02008DEC_sub *param0, struct UnkStruct_02008DEC_sub *param1); +void FUN_02009BE8(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009C0C(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009C30(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_02009C5C(struct UnkStruct_02008DEC_sub *param0); +u32 FUN_02009C80(struct UnkStruct_02008DEC_sub *param0, struct UnkStruct_02008DEC_sub *param1); +void FUN_02009CDC(u32 param0); +u32 FUN_02009CF0(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009D34(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_02009D68(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009DAC(struct UnkStruct_02008DEC_5 *param0); +void FUN_02009DE0(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009E04(struct UnkStruct_02008DEC_sub *param0); +void FUN_02009E28(struct UnkStruct_02008DEC_5 *param0); +u32 FUN_02009E54(struct UnkStruct_02008DEC_sub *param0, u32 param1); +s32 FUN_02009E88(struct UnkStruct_02008DEC_sub *param0, u32 param1); + +#endif // POKEDIAMOND_UNK_02008DEC_H diff --git a/include/unk_0200BB14.h b/include/unk_0200BB14.h index a252fd93..7d5a0083 100644 --- a/include/unk_0200BB14.h +++ b/include/unk_0200BB14.h @@ -2,6 +2,7 @@ #define POKEDIAMOND_UNK_0200BB14_H #include "global.h" +#include "unk_02008DEC.h" struct UnkStruct_0200BB14_1 { @@ -15,11 +16,11 @@ struct UnkStruct_0200BB14_1 struct UnkStruct_0200BB14_2 { u32 unk00; - u32 unk04; - u32 *unk08; - u32 unk0c[6]; - u32 *unk24[6]; - u32 unk3c[6]; + struct UnkStruct_02008AA4_1 *unk04; + struct UnkStruct_02008DEC_2 *unk08; + struct UnkStruct_02008DEC_1 *unk0c[6]; + struct UnkStruct_02008DEC_5 *unk24[6]; + s32 unk3c[6]; s32 unk54; }; @@ -41,7 +42,16 @@ struct UnkStruct_0200BB14_3 struct UnkStruct_0200BB14_sub { - u8 unk00[0x24]; + u32 unk00; + u32 unk04; + u32 unk08; + u32 unk0C; + u32 unk10; + u32 unk14; + u32 unk18; + u32 unk1C; + u8 unk20; + u8 unk21[0x3]; }; struct UnkStruct_0200BB14_4 @@ -108,19 +118,19 @@ u32 FUN_0200BE74(u32 *param0, u32 param12, u32 param13); BOOL FUN_0200BF60( - struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); + struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, s32 *param2); BOOL FUN_0200C00C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, u32 param5, s32 param6); s32 FUN_0200C06C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, u32 param5, u32 param6, s32 param7); @@ -128,45 +138,45 @@ u8 FUN_0200C0DC(u32 param0, u32 param1, u32 *param2, struct UnkStruct_0200BB14_2 *param3, - u32 param4, - u32 param5, - u32 param6, + NarcId param4, + s32 param5, + BOOL param6, u32 param7, u32 param8, s32 param9); -u32 FUN_0200C124(u32 *param0, +BOOL FUN_0200C124(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, s32 param5); -u32 FUN_0200C13C(u32 *param0, +BOOL FUN_0200C13C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, s32 param5); struct UnkStruct_0200BB14_5 *FUN_0200C154( struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); -u32 FUN_0200C334(u32 *param0, u32 param1); -u32 FUN_0200C344(u32 *param0, u32 param1, u32 param2); -u32 FUN_0200C358(struct UnkStruct_0200BB14_2 *param0, u32 param1); -u32 FUN_0200C368(struct UnkStruct_0200BB14_2 *param0, u32 param1); -u32 FUN_0200C378(struct UnkStruct_0200BB14_2 *param0, u32 param1); -u32 FUN_0200C388(struct UnkStruct_0200BB14_2 *param0, u32 param1); +u32 FUN_0200C334(struct UnkStruct_02008DEC_1 **param0, s32 param1); +s32 FUN_0200C344(struct UnkStruct_02008DEC_1 **param0, s32 param1, u32 param2); +BOOL FUN_0200C358(struct UnkStruct_0200BB14_2 *param0, u32 param1); +BOOL FUN_0200C368(struct UnkStruct_0200BB14_2 *param0, u32 param1); +BOOL FUN_0200C378(struct UnkStruct_0200BB14_2 *param0, u32 param1); +BOOL FUN_0200C388(struct UnkStruct_0200BB14_2 *param0, u32 param1); void FUN_0200C398(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); void FUN_0200C3DC(u32 *param0); BOOL FUN_0200C404(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, u32 param5, s32 param6); -BOOL FUN_0200C474(u32 *param0, u32 param1); -BOOL FUN_0200C4A8(u32 param0, u32 *param1, u32 param2); -BOOL FUN_0200C4F4(u32 param0, u32 *param1, u32 param2); -BOOL FUN_0200C548(u32 param0, u32 *param1, u32 param2); +BOOL FUN_0200C474(struct UnkStruct_02008DEC_5 *param0, struct UnkStruct_02008DEC_sub *param1); +BOOL FUN_0200C4A8(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_5 *param1, u32 param2); +BOOL FUN_0200C4F4(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_5 *param1, u32 param2); +BOOL FUN_0200C548(struct UnkStruct_02008DEC_1 *param0, struct UnkStruct_02008DEC_5 *param1, u32 param2); void FUN_0200C59C(u32 param0); void FUN_0200C5A8(u32 *param0); void FUN_0200C5B4(u32 *param0, u32 param1); @@ -204,8 +214,8 @@ void FUN_0200C720(u32 param0, u32 param1, u32 param2, u32 param3); void FUN_0200C750(u32 *param0, u32 param1, u32 param2, u32 param3); void FUN_0200C75C(u32 param0, u16 *param1, u16 *param2); void FUN_0200C7A0(u32 *param0, u16 *param1, u16 *param2); -void FUN_0200C7AC(u32 param0, u16 *param1, u16 *param2, u32 param3); -void FUN_0200C7F0(u32 *param0, u16 *param1, u16 *param2, u32 param3); +void FUN_0200C7AC(u32 param0, u16 *param1, u16 *param2, s32 param3); +void FUN_0200C7F0(u32 *param0, u16 *param1, u16 *param2, s32 param3); void FUN_0200C7FC(u32 param0, u16 *param1, u16 *param2); void FUN_0200C82C(u32 *param0, u16 *param1, u16 *param2); void FUN_0200C838(u32 param0, u32 param1); @@ -224,20 +234,22 @@ void FUN_0200C904(u32 param0, u32 param1); void FUN_0200C90C(u32 *param0, u32 param1); BOOL FUN_0200C918(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, u32 param5, s32 param6); BOOL FUN_0200C978(u32 *param0, struct UnkStruct_0200BB14_2 *param1, - u32 param2, - u32 param3, - u32 param4, + NarcId param2, + s32 param3, + BOOL param4, u32 param5, s32 param6); -void FUN_0200C9D8(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); -void FUN_0200CA0C(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); +void FUN_0200C9D8( + u32 *param0, struct UnkStruct_02008DEC_1 **param1, NarcId param2, s32 param3, BOOL param4, s32 param5); +void FUN_0200CA0C( + u32 *param0, struct UnkStruct_02008DEC_1 **param1, NarcId param2, s32 param3, BOOL param4, s32 param5); u32 FUN_0200CA40(u32 *param0); #endif // POKEDIAMOND_UNK_0200BB14_H diff --git a/include/unk_02021590.h b/include/unk_02021590.h new file mode 100644 index 00000000..6ed73bb8 --- /dev/null +++ b/include/unk_02021590.h @@ -0,0 +1,52 @@ +#ifndef POKEDIAMOND_UNK_02021590_H
+#define POKEDIAMOND_UNK_02021590_H
+
+#include "filesystem.h"
+#include "font.h"
+
+struct FontGraphicHeader
+{
+ u32 headerSize;
+ u32 widthDataStart;
+ u32 numGlyphs;
+ u8 fixedWidth;
+ u8 fixedHeight;
+ u8 glyphWidth;
+ u8 glyphHeight;
+};
+
+struct FontData
+{
+ u32 glyphAccessMode;
+ void (*uncompGlyphFunc)(struct FontData *, u16, struct UnkStruct_02002C14_sub *);
+ u32 glyphShape;
+ u32 glyphSize;
+ void * narcReadBuf;
+ u8 glyphReadBuf[0x40];
+ NARC * narc;
+ u32 fileId;
+ struct FontGraphicHeader gfxHeader;
+ BOOL isFixedWidthFont;
+ int (*glyphWidthFunc)(struct FontData *, int);
+ u8 * glyphWidths;
+};
+
+struct FontData *FontData_new(NarcId narcId, s32 fileId, u32 unk2, BOOL unk3, u32 heap_id);
+void FontData_delete(struct FontData * ptr);
+void FontData_ModeSwitch(struct FontData * ptr, u32 a1, u32 heap_id);
+void FontData_Init(struct FontData *ptr, NarcId narcId, s32 fileId, BOOL unk, u32 heap_id);
+void FontData_FreeWidthsAndNarc(struct FontData * ptr);
+void InitFontResources(struct FontData * ptr, u32 a1, u32 heap_id);
+void InitFontResources_FromPreloaded(struct FontData * ptr, u32 heap_id);
+void InitFontResources_LazyFromNarc(struct FontData * ptr, u32 heap_id);
+void FreeLoadedFontResources(struct FontData * ptr);
+void FreeLoadedFontResources_FromPreloaded(struct FontData * ptr);
+void FreeLoadedFontResources_LazyFromNarc(struct FontData * ptr);
+void TryLoadGlyph(struct FontData * ptr, u32 param1, struct UnkStruct_02002C14_sub * ptr2);
+void DecompressGlyphTiles_FromPreloaded(struct FontData * ptr, u16 param1, struct UnkStruct_02002C14_sub * param2);
+void DecompressGlyphTiles_LazyFromNarc(struct FontData * ptr, u16 param1, struct UnkStruct_02002C14_sub * param2);
+u32 GetStringWidth(struct FontData * ptr, const u16 * str, u32 letterSpacing);
+int GetGlyphWidth_VariableWidth(struct FontData * ptr, int a1);
+int GetGlyphWidth_FixedWidth(struct FontData * ptr, int a1);
+
+#endif //POKEDIAMOND_UNK_02021590_H
|