From bdd3fa89da0f3f88135b513e72ce2029c039ca95 Mon Sep 17 00:00:00 2001 From: Kaz Date: Mon, 25 May 2020 08:02:02 -0400 Subject: battle/anim/flying.c, psychic.c: minor NONMATCHING fixes battle/anim/water.c: revisit AnimTask_CreateSurfWave (still NONMATCHING) --- include/graphics.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index e14aa72d5..5c25eb204 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -3317,6 +3317,8 @@ extern struct BattleAnimBackground gBattleAnimBackgroundImage_16[]; extern struct BattleAnimBackground gBattleAnimBackgroundImage_17[]; extern struct BattleAnimBackground gBattleAnimBackgroundImage_20[]; extern struct BattleAnimBackground gBattleAnimBackgroundImage_21[]; +extern struct BattleAnimBackground gBattleAnimBackgroundImage_Surf[]; +extern struct BattleAnimBackground gBattleAnimBackgroundImageMuddyWater_Pal[]; extern struct BattleAnimBackground gBattleAnimBackgroundPalette_00[]; extern struct BattleAnimBackground gBattleAnimBackgroundPalette_02[]; extern struct BattleAnimBackground gBattleAnimBackgroundPalette_03[]; @@ -3331,6 +3333,7 @@ extern struct BattleAnimBackground gBattleAnimBackgroundPalette_17[]; extern struct BattleAnimBackground gBattleAnimBackgroundPalette_18[]; extern struct BattleAnimBackground gBattleAnimBackgroundPalette_20[]; extern struct BattleAnimBackground gBattleAnimBackgroundPalette_21[]; +extern struct BattleAnimBackground gBattleAnimBackgroundPalette_Surf[]; extern struct BattleAnimBackground gBattleAnimBackgroundPalette_22[]; extern struct BattleAnimBackground gBattleAnimBackgroundPalette_24[]; extern struct BattleAnimBackground gBattleAnimBackgroundTilemap_00[]; @@ -3429,6 +3432,10 @@ extern const u8 Tiles_D129AC[]; extern const u8 gAreaUnknownTiles[]; extern const u16 gAreaUnknownPalette[]; +extern const u8 gUnknown_08E70968[]; +extern const u8 gUnknown_08E70C38[]; +extern const u8 gUnknown_08E70F0C[]; + extern const u8 gUnknown_08E964B8[]; extern const u8 gUnknown_08E8096C[]; -- cgit v1.2.3 From 08c053f0130dd8bedb81f4cdb1850a85c90ae89f Mon Sep 17 00:00:00 2001 From: Kaz Date: Mon, 25 May 2020 22:07:36 -0400 Subject: decoration.c, field_player_avatar.c, field_tasks.c: fix NONMATCHINGs --- include/fieldmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/fieldmap.h b/include/fieldmap.h index cc2a29914..cdac9f79c 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -13,7 +13,7 @@ extern struct BackupMapLayout gUnknown_03004870; struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection); int GetMapBorderIdAt(int x, int y); int CanCameraMoveInDirection(int direction); -u32 GetBehaviorByMetatileId(u16 metatile); +u16 GetBehaviorByMetatileId(u16 metatile); void MapGridSetMetatileEntryAt(int, int, u16); void not_trainer_hill_battle_pyramid(void); @@ -31,7 +31,7 @@ u32 MapGridGetMetatileIdAt(int, int); u32 MapGridGetMetatileBehaviorAt(int x, int y); // return: (u8|u16|int) args: (int|s16|s32) u8 MapGridGetMetatileLayerTypeAt(int, int); void MapGridSetMetatileIdAt(int, int, u16); -u32 GetBehaviorByMetatileId(u16 metatile); +u16 GetBehaviorByMetatileId(u16 metatile); void save_serialize_map(void); void sub_8056670(); bool8 CameraMove(int, int); -- cgit v1.2.3 From 754634f966a2e89e3fe72db98045ec7ba8ab305b Mon Sep 17 00:00:00 2001 From: Kaz Date: Tue, 26 May 2020 19:34:38 -0400 Subject: battle_script_commands.c: atk24 OK --- include/battle.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/battle.h b/include/battle.h index 59eee8407..536ac5995 100644 --- a/include/battle.h +++ b/include/battle.h @@ -139,15 +139,14 @@ struct ProtectStruct struct SpecialStatus { - u8 statLowered:1; - u8 lightningRodRedirected:1; - u8 restoredBattlerSprite: 1; - u8 intimidatedMon:1; - u8 traced:1; - u8 ppNotAffectedByPressure:1; - u8 flag40:1; - u8 focusBanded:1; - u8 field1[3]; + u32 statLowered:1; + u32 lightningRodRedirected:1; + u32 restoredBattlerSprite: 1; + u32 intimidatedMon:1; + u32 traced:1; + u32 ppNotAffectedByPressure:1; + u32 flag40:1; + u32 focusBanded:1; s32 dmg; s32 physicalDmg; s32 specialDmg; -- cgit v1.2.3 From 447dc3bd5d089842bcc8a93bb6bfa8761674cdd6 Mon Sep 17 00:00:00 2001 From: Kaz Date: Tue, 26 May 2020 23:09:27 -0400 Subject: s32 damage consistency in ProtectStruct. Most of these structs should be revisited and cleaned up. --- include/battle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/battle.h b/include/battle.h index 536ac5995..afebbc781 100644 --- a/include/battle.h +++ b/include/battle.h @@ -130,8 +130,8 @@ struct ProtectStruct u32 free : 4; /*field3*/ u32 field3 : 8; - u32 physicalDmg; - u32 specialDmg; + s32 physicalDmg; + s32 specialDmg; u8 physicalBattlerId; u8 specialBattlerId; u16 fieldE; -- cgit v1.2.3 From 164d55e3e6166ed56c652346c99b30b0c0c7e158 Mon Sep 17 00:00:00 2001 From: Kaz Date: Sat, 30 May 2020 19:14:20 -0400 Subject: money.c: Draw10000Sprite WIP --- include/money.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/money.h b/include/money.h index 43579910c..98f70cc08 100644 --- a/include/money.h +++ b/include/money.h @@ -7,7 +7,7 @@ void RemoveMoney(u32 *, u32); void GetMoneyAmountText(u8 *buffer, u32 arg1, u8 arg2); void PrintMoneyAmount(u32 arg0, u8 arg1, u8 x, u8 y); void sub_80B7AEC(u32, u8 right, u8 top); -void Draw10000Sprite(u8, u8, int); +void Draw10000Sprite(u8, u8, s32); void UpdateMoneyWindow(u32, u8, u8); void OpenMoneyWindow(u32, u8, u8); void CloseMoneyWindow(u8, u8); -- cgit v1.2.3 From 8d0b9655ba2a71edc1c561f9efb7e977acc5b527 Mon Sep 17 00:00:00 2001 From: Kaz Date: Sun, 31 May 2020 05:52:38 -0400 Subject: pokemon_system_storage_4.c: CopyWallpaperTilemap and ClearLowestWallpaperTiles. File is now fully matching. Fix NONMATCHING target. --- include/graphics.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index 5c25eb204..66ef9a028 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -3446,4 +3446,6 @@ extern const u8 gRouletteCreditTiles[]; extern const u8 gRouletteNumbersTiles[]; extern const u8 gRouletteMultiplierTiles[]; +extern const u8 gDecoration10000_Gfx[]; + #endif // GUARD_GRAPHICS_H -- cgit v1.2.3 From 2ec8ae4bec77ae4c5dac798a44e497d33be5dd7f Mon Sep 17 00:00:00 2001 From: Kaz Date: Mon, 8 Jun 2020 04:12:23 -0400 Subject: Preliminary support for English rev0 debug. Matching but still needs cleaning up. Rename DEBUG_TRANSLATE to DEBUG_FIX now that we have actual English Debug ROMs. Add Sapphire German "first edition" debug support, now that we have a hash for it. Fix an obvious nonmatching. --- include/config.h | 17 +++++------------ include/global.h | 5 +++-- include/main.h | 2 +- include/pokemon.h | 4 ++-- include/start_menu.h | 6 +++++- 5 files changed, 16 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/config.h b/include/config.h index 0046c3878..57154e8e2 100644 --- a/include/config.h +++ b/include/config.h @@ -5,11 +5,11 @@ // Ruby/Sapphire and Emerald do not have these asserts while Fire Red // still has them in the ROM. This is because the developers forgot // to define NDEBUG before release, however this has been changed as -// Ruby's actual debug build does not use the AGBPrint features. +// Ruby's actual debug builds do not use the AGBPrint features. // To note, Ruby/Sapphire likely did not use AGBPrint. This is because -// the german debug ROM of Ruby did not have any uses of AGBPrint and -// the assert commands but instead a "crash" screen. This config exists +// the debug ROMs of Ruby did not have any uses of AGBPrint and the +// assert commands but instead a "crash" screen. This config exists // for convenience for the user of pokeruby and NOT because it is // authoritative. These additions are for user convenience based on // officially recommended SDK practices for debugging and is therefore @@ -55,15 +55,8 @@ #define UNITS_METRIC #endif -// An option to use translations/encoding fixes for the Debug menus. -// Selected by default for custom English debug roms. -#ifndef DEBUG_TRANSLATE -#if ENGLISH && DEBUG -#define DEBUG_TRANSLATE 1 -#else -#define DEBUG_TRANSLATE 0 -#endif -#endif +// An option to use fuller translations for debug ROMs. +// #define DEBUG_FIX 1 // Unsupported languages default to English text. // Fixed in Emerald. // #define BUGFIX_SETMONIVS diff --git a/include/global.h b/include/global.h index 0ddc2d7bb..4ca22ff32 100644 --- a/include/global.h +++ b/include/global.h @@ -21,12 +21,13 @@ #endif // For debug menu translations. -// DTR("こんにちは", "Hello") will expand to "Hello" with DEBUG_TRANSLATE, +// DTR("こんにちは", "Hello") will expand to "Hello" with DEBUG_FIX, // or "こんにちは" if not. // The KANA macro will wrap Japanese text with encoding markers to // prevent mojibake while they are being translated. -#if DEBUG_TRANSLATE +// TODO: Support multiple languages. +#if DEBUG_FIX #define DTR(japanese, english) _(english) #define KANA(txt) _("{JPN}" txt "{ENG}") #else diff --git a/include/main.h b/include/main.h index 8a7c4d67c..20ed1ec74 100644 --- a/include/main.h +++ b/include/main.h @@ -64,7 +64,7 @@ void InitFlashTimer(void); void DoSoftReset(void); void ClearPokemonCrySongs(void); -extern const char BuildDateTime[]; +extern const u8 BuildDateTime[]; extern s8 gPcmDmaCounter; #endif // GUARD_MAIN_H diff --git a/include/pokemon.h b/include/pokemon.h index df2d42522..cb02268a8 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -509,8 +509,8 @@ void BoxMonRestorePP(struct BoxPokemon *); bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, u8 battleId); u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit); -#if DEBUG +#if DEBUG && !(ENGLISH && REVISION == 0) void Nakamura_NakaGenderTest_RecalcStats(struct Pokemon *); -#endif // DEBUG +#endif #endif // GUARD_POKEMON_H diff --git a/include/start_menu.h b/include/start_menu.h index 327df8c16..b035eb211 100644 --- a/include/start_menu.h +++ b/include/start_menu.h @@ -13,7 +13,11 @@ void debug_sub_8075DB4(struct BattleTowerEReaderTrainer *ereaderTrainer, const u bool8 debug_sub_8075C30(void); #if DEBUG -extern u32 gUnknown_Debug_03004BD0; +extern u8 gUnknown_Debug_03004BD0; +// TODO: see if this is in rev1+ +#if (ENGLISH && REVISION == 0) +extern u8 gUnknown_Debug_Murakawa2; +#endif #endif // DEBUG #endif // GUARD_START_MENU_H -- cgit v1.2.3 From 7f94272bfa5ebdfd4edbb41210b8644273ad8783 Mon Sep 17 00:00:00 2001 From: Kaz Date: Mon, 8 Jun 2020 21:40:08 -0400 Subject: Actually fix everything. --- include/start_menu.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/start_menu.h b/include/start_menu.h index b035eb211..3f69604f1 100644 --- a/include/start_menu.h +++ b/include/start_menu.h @@ -13,11 +13,20 @@ void debug_sub_8075DB4(struct BattleTowerEReaderTrainer *ereaderTrainer, const u bool8 debug_sub_8075C30(void); #if DEBUG -extern u8 gUnknown_Debug_03004BD0; + +#if (ENGLISH && REVISION == 0) +#define TYPE u8 +#else +#define TYPE u32 +#endif + +extern TYPE gUnknown_Debug_03004BD0; // TODO: see if this is in rev1+ #if (ENGLISH && REVISION == 0) -extern u8 gUnknown_Debug_Murakawa2; +extern TYPE gUnknown_Debug_Murakawa2; #endif + +#undef TYPE #endif // DEBUG #endif // GUARD_START_MENU_H -- cgit v1.2.3