summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorscnorton <scnorton@biociphers.org>2017-06-27 15:01:18 -0400
committerscnorton <scnorton@biociphers.org>2017-06-27 15:01:18 -0400
commit00c7dee919c8f93b8519a7eede2c41ba2ddcaf08 (patch)
tree5707f8764920abcd4cffca84c675e5c53c32559d /src
parent3d9eb18add0d8a9eb5bfa77fc64cd7b1f37fea5d (diff)
parent06b6cada0ddedc62063171703ba6607019751a9a (diff)
Merge branch 'master' into pokemon_data
Diffstat (limited to 'src')
-rw-r--r--src/bard_music.c15
-rw-r--r--src/battle_2.c939
-rw-r--r--src/battle_6.c1484
-rw-r--r--src/battle_7.c449
-rw-r--r--src/battle_811DA74.c886
-rw-r--r--src/battle_ai.c321
-rw-r--r--src/battle_anim.c145
-rw-r--r--src/battle_anim_80A7E7C.c75
-rw-r--r--src/battle_anim_81258BC.c24
-rw-r--r--src/battle_anim_8137220.c1486
-rw-r--r--src/battle_interface.c173
-rw-r--r--src/battle_party_menu.c76
-rw-r--r--src/battle_records.c5
-rw-r--r--src/battle_setup.c19
-rw-r--r--src/berry.c4
-rw-r--r--src/berry_tag_screen.c8
-rw-r--r--src/bike.c2
-rw-r--r--src/birch_pc.c1
-rw-r--r--src/braille_puzzles.c3
-rw-r--r--src/cable_club.c38
-rw-r--r--src/calculate_base_damage.c79
-rw-r--r--src/choose_party.c1071
-rw-r--r--src/clear_save_data_menu.c2
-rw-r--r--src/clock.c13
-rw-r--r--src/contest_link_80C857C.c55
-rw-r--r--src/contest_painting.c18
-rw-r--r--src/coord_event_weather.c3
-rw-r--r--src/credits.c29
-rw-r--r--src/data/.clang-format22
-rw-r--r--src/data/decoration/decorations.h1212
-rw-r--r--src/data/decoration/descriptions_de.h699
-rw-r--r--src/data/pokedex_entries_de.h7955
-rw-r--r--src/data/pokedex_orders.h423
-rw-r--r--src/data/text/font0_widths.h60
-rw-r--r--src/data/text/font1_widths.h35
-rw-r--r--src/data/text/font3_widths.h60
-rw-r--r--src/data/text/font4_widths.h35
-rw-r--r--src/data/text/type1_map.h249
-rw-r--r--src/data/text/type3_map.h130
-rw-r--r--[-rwxr-xr-x]src/daycare.c2
-rw-r--r--src/de_rom_8040FE0.c272
-rw-r--r--src/decompress.c65
-rw-r--r--src/decoration.c64
-rw-r--r--src/decoration_inventory.c2
-rw-r--r--src/dewford_trend.c1
-rw-r--r--src/diploma.c3
-rw-r--r--src/easy_chat.c9
-rw-r--r--src/field_camera.c4
-rw-r--r--src/field_control_avatar.c30
-rw-r--r--src/field_door.c2
-rw-r--r--[-rwxr-xr-x]src/field_effect.c11
-rw-r--r--src/field_fadetransition.c18
-rw-r--r--src/field_ground_effect.c20
-rwxr-xr-x[-rw-r--r--]src/field_map_obj.c2041
-rwxr-xr-x[-rw-r--r--]src/field_map_obj_helpers.c22
-rw-r--r--src/field_message_box.c4
-rw-r--r--src/field_player_avatar.c59
-rw-r--r--src/field_poison.c5
-rw-r--r--src/field_region_map.c17
-rw-r--r--src/field_special_scene.c7
-rw-r--r--src/field_specials.c3
-rw-r--r--src/field_weather.c1
-rw-r--r--src/fieldmap.c33
-rw-r--r--src/fldeff_cut.c17
-rw-r--r--src/fldeff_softboiled.c8
-rw-r--r--src/fldeff_strength.c3
-rw-r--r--src/fldeff_sweetscent.c2
-rw-r--r--src/fldeff_teleport.c9
-rw-r--r--src/hof_pc.c3
-rw-r--r--src/intro.c36
-rw-r--r--src/item.c8
-rw-r--r--src/item_use.c73
-rw-r--r--src/link.c23
-rw-r--r--src/load_save.c1
-rw-r--r--src/lottery_corner.c1
-rw-r--r--src/mail.c8
-rw-r--r--src/mail_data.c7
-rw-r--r--src/main.c3
-rw-r--r--src/main_menu.c4
-rw-r--r--src/map_name_popup.c3
-rw-r--r--src/map_obj_lock.c3
-rw-r--r--src/matsuda_debug_menu.c8
-rw-r--r--src/mauville_old_man.c10
-rw-r--r--src/menu.c134
-rw-r--r--src/menu_cursor.c197
-rw-r--r--src/metatile_behavior.c3
-rw-r--r--src/money.c4
-rw-r--r--src/mori_debug_menu.c4
-rw-r--r--src/mystery_event_menu.c2
-rw-r--r--src/mystery_event_script.c19
-rw-r--r--src/name_string_util.c1
-rw-r--r--src/naming_screen.c67
-rw-r--r--src/new_game.c14
-rw-r--r--src/option_menu.c93
-rw-r--r--src/palette.c1
-rw-r--r--src/party_menu.c238
-rw-r--r--src/player_pc.c26
-rw-r--r--src/pokeball.c1193
-rw-r--r--src/pokedex.c112
-rw-r--r--src/pokedex_cry_screen.c2
-rw-r--r--src/pokemon_1.c8
-rw-r--r--src/pokemon_2.c62
-rw-r--r--src/pokemon_3.c110
-rw-r--r--src/pokemon_size_record.c11
-rw-r--r--src/pokemon_storage_system.c6
-rw-r--r--src/pokemon_summary_screen.c17
-rw-r--r--src/pokenav.c27
-rw-r--r--src/post_battle_event_funcs.c3
-rw-r--r--src/record_mixing.c12
-rw-r--r--src/roamer.c2
-rw-r--r--src/rom3.c987
-rw-r--r--src/rom4.c29
-rw-r--r--src/rom6.c8
-rw-r--r--src/rom_800D42C.c8
-rw-r--r--src/rom_8077ABC.c156
-rw-r--r--src/safari_zone.c8
-rw-r--r--src/save.c1
-rw-r--r--src/save_failed_screen.c9
-rw-r--r--src/save_menu_util.c2
-rw-r--r--src/scrcmd.c23
-rw-r--r--src/script.c1
-rw-r--r--src/script_menu.c170
-rw-r--r--src/script_movement.c8
-rw-r--r--src/script_pokemon_util_80C4BF0.c37
-rw-r--r--src/script_pokemon_util_80F99CC.c27
-rw-r--r--src/secret_base.c36
-rw-r--r--src/shop.c27
-rw-r--r--src/slot_machine.c6
-rw-r--r--src/smokescreen.c2
-rw-r--r--src/sound.c4
-rw-r--r--src/sprite.c1
-rw-r--r--src/start_menu.c7
-rw-r--r--src/starter_choose.c167
-rw-r--r--src/strings.c2
-rw-r--r--src/text.c14
-rw-r--r--src/time_events.c8
-rw-r--r--src/title_screen.c172
-rw-r--r--src/trade.c88
-rw-r--r--src/trainer_card.c12
-rw-r--r--src/trainer_see.c3
-rw-r--r--src/trig.c516
-rw-r--r--src/tv.c203
-rw-r--r--src/unknown_debug_menu.c12
-rw-r--r--src/unused_8124F94.c126
-rw-r--r--src/util.c2
-rw-r--r--src/wallclock.c5
-rw-r--r--src/wild_encounter.c31
147 files changed, 23061 insertions, 3453 deletions
diff --git a/src/bard_music.c b/src/bard_music.c
index 43c2923d2..a31568475 100644
--- a/src/bard_music.c
+++ b/src/bard_music.c
@@ -1,5 +1,5 @@
#include "global.h"
-#include "asm.h"
+#include "easy_chat.h"
struct BardSound
{
@@ -45,12 +45,25 @@ static s16 sub_814A2B8(u32 arg0, u32 arg1)
return gUnknown_08417068[arg0][arg1];
}
+#if ENGLISH
struct BardSound *sub_814A2D0(u16 arg0, u16 arg1)
{
struct BardSound *sounds = gBardMusicTable[arg0];
return &sounds[arg1];
}
+#elif GERMAN
+struct BardSound *sub_814A2D0(u16 arg0, u16 arg1)
+{
+ u32 index;
+ struct BardSound *sounds;
+
+ sounds = gBardMusicTable[arg0];
+ index = de_sub_80EB748(arg0, arg1);
+
+ return &sounds[index];
+}
+#endif
s32 sub_814A2EC(struct UnkBard2 *dest, struct UnkBard *src, u16 arg2)
{
diff --git a/src/battle_2.c b/src/battle_2.c
index c147bdb95..2b13fc45d 100644
--- a/src/battle_2.c
+++ b/src/battle_2.c
@@ -1,22 +1,31 @@
#include "global.h"
-#include "asm.h"
+#include "abilities.h"
#include "battle.h"
+#include "battle_interface.h"
+#include "battle_setup.h"
#include "data2.h"
+#include "item.h"
+#include "link.h"
#include "main.h"
-#include "text.h"
+#include "name_string_util.h"
#include "palette.h"
-#include "sprite.h"
-#include "task.h"
+#include "party_menu.h"
+#include "pokeball.h"
+#include "pokedex.h"
#include "pokemon.h"
-#include "species.h"
-#include "link.h"
-#include "name_string_util.h"
-#include "battle_setup.h"
#include "rng.h"
-#include "sound.h"
+#include "rom3.h"
+#include "rom_8077ABC.h"
+#include "rom_8094928.h"
#include "songs.h"
+#include "sound.h"
+#include "species.h"
+#include "sprite.h"
+#include "task.h"
+#include "text.h"
#include "trig.h"
-#include "abilities.h"
+#include "unknown_task.h"
+#include "util.h"
struct UnknownStruct6
{
@@ -87,8 +96,6 @@ struct UnknownStruct13
extern const u16 gUnknown_08D004E0[];
extern const struct MonCoords gCastformFrontSpriteCoords[];
-extern const struct BaseStats gBaseStats[];
-extern const u32 gBitTable[];
extern u8 ewram[];
#define ewram0 (*(struct UnknownStruct7 *)(ewram + 0x0))
@@ -133,46 +140,46 @@ extern u8 ewram[];
#define ewram1D000 ((struct Pokemon *)(ewram + 0x1D000))
extern struct UnknownPokemonStruct2 gUnknown_02023A00[];
-extern u8 gUnknown_02024260[][0x200];
-extern u8 gUnknown_02024A60;
-extern u32 gUnknown_02024A64;
-extern u8 gUnknown_02024A68;
-extern u16 gUnknown_02024A6A[];
-extern u8 gUnknown_02024A7F;
-extern u8 gUnknown_02024A7A[];
+extern u8 gBattleBufferB[][0x200];
+extern u8 gActiveBank;
+extern u32 gBattleExecBuffer;
+extern u8 gNoOfAllBanks;
+extern u16 gBattlePartyID[];
+extern u8 gFightStateTracker;
+extern u8 gTurnOrder[];
extern struct UnknownStruct12 gUnknown_02024AD0[];
-extern u8 gUnknown_02024BE0[];
-extern u16 gUnknown_02024BE6;
-extern u8 byte_2024C06;
-extern u8 gUnknown_02024C0B;
-extern u8 gUnknown_02024C0C;
-extern u8 gUnknown_02024C0E;
-extern u8 gUnknown_02024C18[];
+extern u8 gObjectBankIDs[];
+extern u16 gCurrentMove;
+extern u8 gLastUsedAbility;
+extern u8 gStringBank;
+extern u8 gAbsentBankFlags;
+extern u8 gMultiHitCounter;
+extern u8 gActionForBanks[];
extern u16 gUnknown_02024C2C[];
-extern u16 gUnknown_02024C34[];
-extern u16 gUnknown_02024C3C[];
+extern u16 gLastUsedMove[];
+extern u16 gMoveHitWith[];
extern u16 gUnknown_02024C44[];
extern u16 gUnknown_02024C4C[];
-extern u16 gUnknown_02024C54[];
+extern u16 gLockedMove[];
extern u8 gUnknown_02024C5C[];
-extern u16 gUnknown_02024C60[];
-extern u32 gUnknown_02024C6C;
+extern u16 gChosenMovesByBanks[];
+extern u32 gHitMarker;
extern u8 gUnknown_02024C70[];
-extern u16 gUnknown_02024C7A[];
-extern u8 gUnknown_02024C80[][12];
-extern u32 gUnknown_02024C98[];
-//extern u8 gUnknown_02024CA8[][0x1C];
-extern u16 gUnknown_02024D18;
-extern u16 gUnknown_02024D1A;
-extern u16 gUnknown_02024D1C;
-extern u8 gUnknown_02024D1E[];
+extern u16 gSideAffecting[];
+extern u8 gSideTimer[][12];
+extern u32 gStatuses3[];
+//extern u8 gDisableStructs[][0x1C];
+extern u16 gPauseCounterBattle;
+extern u16 gPaydayMoney;
+extern u16 gRandomTurnNumber;
+extern u8 gBattleCommunication[];
extern u8 gUnknown_02024D1F[]; // I don't actually know what type this is.
-extern u8 gUnknown_02024D26;
-extern struct UnknownStruct13 gUnknown_02024D28[];
-extern u8 gUnknown_02024DBC[];
+extern u8 gBattleOutcome;
+extern struct UnknownStruct13 gProtectStructs[];
+extern u8 gWishFutureKnock[];
extern u16 gUnknown_02024DE8;
-extern u8 gUnknown_02024E60[];
-extern u8 gUnknown_02024E64[];
+extern u8 gActionSelectionCursor[];
+extern u8 gMoveSelectionCursor[];
extern u8 gUnknown_02038470[];
extern u16 gUnknown_030041B0;
extern u16 gUnknown_030041B4;
@@ -190,12 +197,12 @@ extern u16 gUnknown_030042A0;
extern u16 gUnknown_030042A4;
extern u16 gUnknown_030042C0;
extern u16 gUnknown_030042C4;
-extern MainCallback gUnknown_030042D0;
-extern void (*gUnknown_030042D4)(void);
-extern struct Struct30042E0 gUnknown_030042E0;
-extern u8 gUnknown_03004324;
-extern void (*gUnknown_03004330[])(void);
-extern u8 gUnknown_03004340[];
+extern MainCallback gPreBattleCallback1;
+extern void (*gBattleMainFunc)(void);
+extern struct Struct30042E0 gBattleResults;
+extern u8 gLeveledUpInBattle;
+extern void (*gBattleBankFunc[])(void);
+extern u8 gHealthboxIDs[];
extern struct UnknownStruct6 gUnknown_03004DE0;
//extern u16 gUnknown_03004DE0[][0xA0]; // possibly?
extern u16 gBattleTypeFlags;
@@ -205,93 +212,13 @@ extern u16 gTrainerBattleOpponent;
extern struct BattleEnigmaBerry gEnigmaBerries[];
extern u16 gBlockRecvBuffer[MAX_LINK_PLAYERS][BLOCK_BUFFER_SIZE / 2];
extern u8 gBattleMonForms[];
-extern u8 gPlayerMonIndex;
-extern u8 gEnemyMonIndex;
+extern u8 gBankAttacker;
+extern u8 gBankTarget;
extern u16 gBattleWeather;
extern u32 gBattleMoveDamage;
extern struct BattlePokemon gBattleMons[];
extern u8 gBattleMoveFlags;
-extern void sub_800B858(void);
-extern void dp12_8087EA4(void);
-extern void sub_80895F8();
-extern void sub_800D6D4();
-extern void sub_800DAB8();
-extern void sub_800E23C();
-extern void setup_poochyena_battle();
-extern void SetWildMonHeldItem(void);
-extern void AdjustFriendship(struct Pokemon *, u8);
-extern void sub_800DE30(u8);
-extern void sub_800B950(void);
-extern u8 battle_load_something();
-extern void OpenPartyMenu();
-extern void sub_8089668();
-extern void sub_800D74C();
-extern void sub_804777C(u8);
-extern void sub_8043DFC();
-extern u8 CreateInvisibleSpriteWithCallback(void (*)(struct Sprite *));
-extern void dp01_build_cmdbuf_x00_a_b_0(u8 a, u8 b, u8 c);
-extern void dp01_build_cmdbuf_x04_4_4_4(u8 a);
-extern void dp01_build_cmdbuf_x07_7_7_7(u8 a);
-extern void dp01_build_cmdbuf_x12_a_bb(u8 a, u8 b, u16 c);
-extern void dp01_build_cmdbuf_x2E_a(u8 a, u8 b);
-extern void dp01_build_cmdbuf_x2F_2F_2F_2F(u8 a);
-extern void dp01_build_cmdbuf_x30_TODO(u8 a, u8 *b, u8 c);
-extern void dp01_battle_side_mark_buffer_for_execution();
-extern u8 GetNationalPokedexFlag();
-extern void sub_800C704(u8, u8, u8);
-extern u8 sub_8018324();
-extern u8 sub_801A02C();
-extern u8 sub_8015DFC();
-extern u8 sub_8016558();
-extern u8 sub_80173A4();
-extern u8 sub_80170DC();
-extern u8 ItemId_GetHoldEffect(u16);
-extern void sub_8094C98();
-
-void InitBattle(void);
-void sub_800EC9C(void);
-void sub_800F104(void);
-void sub_800F298(void);
-void sub_800F808(void);
-void sub_800F838(struct Sprite *);
-u8 CreateNPCTrainerParty(struct Pokemon *, u16);
-void sub_800FCFC(void);
-void sub_8010824(void);
-void sub_80101B8(void);
-void c2_081284E0(void);
-void sub_8010278(struct Sprite *);
-void sub_80102AC(struct Sprite *);
-void nullsub_37(struct Sprite *);
-void sub_8010320(struct Sprite *);
-void sub_8010494(struct Sprite *);
-void sub_801053C(struct Sprite *);
-void oac_poke_ally_(struct Sprite *);
-void nullsub_86(struct Sprite *);
-void objc_dp11b_pingpong(struct Sprite *);
-void sub_8010874(void);
-void bc_8012FAC(void);
-void bc_load_battlefield(void);
-void sub_8011384(void);
-void bc_801333C(void);
-void bc_battle_begin_message(void);
-void bc_8013568(void);
-void sub_8011800(void);
-void sub_8011834(void);
-void bc_801362C(void);
-void sub_8011970(void);
-void sub_80119B4(void);
-void sub_8011B00(void);
-void sub_8011E8C(void);
-void sub_8012324(void);
-void sub_8012FBC(u8, u8);
-u8 b_first_side();
-void sub_801365C(u8);
-void sub_801377C(void);
-void sub_80138F0(void);
-void b_cancel_multi_turn_move_maybe(u8);
-void b_std_message();
-void sub_80156DC();
void sub_800E7C4(void)
{
@@ -299,7 +226,7 @@ void sub_800E7C4(void)
{
sub_800B858();
SetMainCallback2(sub_800F104);
- gUnknown_02024D1E[0] = 0;
+ gBattleCommunication[0] = 0;
}
else
{
@@ -372,7 +299,7 @@ void InitBattle(void)
gMain.inBattle = TRUE;
for (i = 0; i < 6; i++)
AdjustFriendship(&gPlayerParty[i], 3);
- gUnknown_02024D1E[0] = 0;
+ gBattleCommunication[0] = 0;
}
void sub_800E9EC(void)
@@ -494,7 +421,7 @@ void sub_800EC9C(void)
ewram160CB = playerId;
enemyId = playerId ^ 1;
- switch (gUnknown_02024D1E[0])
+ switch (gBattleCommunication[0])
{
case 0:
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
@@ -506,13 +433,13 @@ void sub_800EC9C(void)
sub_800E9EC();
sub_800EAAC();
SendBlock(bitmask_all_link_players_but_self(), &ewram0, 32);
- gUnknown_02024D1E[0] = 1;
+ gBattleCommunication[0] = 1;
}
}
else
{
gBattleTypeFlags |= BATTLE_TYPE_WILD;
- gUnknown_02024D1E[0] = 8;
+ gBattleCommunication[0] = 8;
sub_800EB08();
}
break;
@@ -563,14 +490,14 @@ void sub_800EC9C(void)
gTasks[taskId].data[5] = 0;
gTasks[taskId].data[3] = ewram0.unk2 | (ewram0.unk3 << 8);
gTasks[taskId].data[4] = gBlockRecvBuffer[enemyId][1];
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 2:
if (sub_8007ECC())
{
SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(*gPlayerParty) * 2);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 3:
@@ -578,14 +505,14 @@ void sub_800EC9C(void)
{
ResetBlockReceivedFlags();
memcpy(gEnemyParty, gBlockRecvBuffer[enemyId], sizeof(*gEnemyParty) * 2);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 4:
if (sub_8007ECC())
{
SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(*gPlayerParty) * 2);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 5:
@@ -593,14 +520,14 @@ void sub_800EC9C(void)
{
ResetBlockReceivedFlags();
memcpy(gEnemyParty + 2, gBlockRecvBuffer[enemyId], sizeof(*gEnemyParty) * 2);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 6:
if (sub_8007ECC())
{
SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 4, sizeof(*gPlayerParty) * 2);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 7:
@@ -614,19 +541,19 @@ void sub_800EC9C(void)
shedinja_something(&gEnemyParty[3]);
shedinja_something(&gEnemyParty[4]);
shedinja_something(&gEnemyParty[5]);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 8:
sub_800B950();
- gUnknown_02024D1E[0]++;
- gUnknown_02024D1E[1] = 0;
- gUnknown_02024D1E[2] = 0;
+ gBattleCommunication[0]++;
+ gBattleCommunication[1] = 0;
+ gBattleCommunication[2] = 0;
break;
case 9:
if (battle_load_something(gUnknown_02024D1F, gUnknown_02024D1F + 1) != 0)
{
- gUnknown_030042D0 = gMain.callback1;
+ gPreBattleCallback1 = gMain.callback1;
gMain.callback1 = sub_8010824;
SetMainCallback2(sub_800F808);
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
@@ -679,14 +606,14 @@ void sub_800F104(void)
AnimateSprites();
BuildOamBuffer();
- switch (gUnknown_02024D1E[0])
+ switch (gBattleCommunication[0])
{
case 0:
if (gReceivedRemoteLinkPlayers != 0 && sub_8007ECC())
{
sub_800F02C();
SendBlock(bitmask_all_link_players_but_self(), ewram, 0x60);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 1:
@@ -704,7 +631,7 @@ void sub_800F104(void)
memcpy(gUnknown_02023A00, gBlockRecvBuffer[i], 0x60);
}
}
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
*pSavedCallback = gMain.savedCallback;
*pSavedBattleTypeFlags = gBattleTypeFlags;
gMain.savedCallback = sub_800F104;
@@ -714,7 +641,7 @@ void sub_800F104(void)
case 2:
if (!gPaletteFade.active)
{
- gUnknown_02024D1E[0] = 3;
+ gBattleCommunication[0] = 3;
sub_800832C();
}
break;
@@ -739,7 +666,7 @@ void sub_800F298(void)
RunTasks();
AnimateSprites();
BuildOamBuffer();
- switch (gUnknown_02024D1E[0])
+ switch (gBattleCommunication[0])
{
case 0:
if (gReceivedRemoteLinkPlayers != 0 && sub_8007ECC())
@@ -749,7 +676,7 @@ void sub_800F298(void)
sub_800E9EC();
sub_800EAAC();
SendBlock(bitmask_all_link_players_but_self(), ewram, 0x20);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 1:
@@ -829,7 +756,7 @@ void sub_800F298(void)
}
ZeroPlayerPartyMons();
ZeroEnemyPartyMons();
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
goto step_2;
}
break;
@@ -838,7 +765,7 @@ void sub_800F298(void)
if (sub_8007ECC())
{
SendBlock(bitmask_all_link_players_but_self(), ewram1D000, sizeof(struct Pokemon) * 2);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 3:
@@ -894,14 +821,14 @@ void sub_800F298(void)
}
}
}
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 4:
if (sub_8007ECC())
{
SendBlock(bitmask_all_link_players_but_self(), ewram1D000 + 2, sizeof(struct Pokemon));
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 5:
@@ -972,19 +899,19 @@ void sub_800F298(void)
shedinja_something(&gEnemyParty[4]);
shedinja_something(&gEnemyParty[5]);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 6:
sub_800B950();
- gUnknown_02024D1E[0]++;
- gUnknown_02024D1E[1] = 0;
- gUnknown_02024D1E[2] = 0;
+ gBattleCommunication[0]++;
+ gBattleCommunication[1] = 0;
+ gBattleCommunication[2] = 0;
break;
case 7:
if (battle_load_something(gUnknown_02024D1F, gUnknown_02024D1F + 1) != 0)
{
- gUnknown_030042D0 = gMain.callback1;
+ gPreBattleCallback1 = gMain.callback1;
gMain.callback1 = sub_8010824;
SetMainCallback2(sub_800F808);
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
@@ -1343,7 +1270,7 @@ void c2_8011A1C(void)
gTasks[taskId].data[5] = 1;
sub_800FE40(taskId);
SetMainCallback2(sub_80101B8);
- gUnknown_02024D1E[0] = 0;
+ gBattleCommunication[0] = 0;
}
void sub_80101B8(void)
@@ -1357,18 +1284,18 @@ void sub_80101B8(void)
void c2_081284E0(void)
{
- switch (gUnknown_02024D1E[0])
+ switch (gBattleCommunication[0])
{
case 0:
- gUnknown_02024D1E[1] = 0xFF;
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[1] = 0xFF;
+ gBattleCommunication[0]++;
break;
case 1:
- gUnknown_02024D1E[1]--;
- if (gUnknown_02024D1E[1] == 0)
+ gBattleCommunication[1]--;
+ if (gBattleCommunication[1] == 0)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
- gUnknown_02024D1E[0]++;
+ gBattleCommunication[0]++;
}
break;
case 2:
@@ -1403,7 +1330,7 @@ void sub_80102AC(struct Sprite *sprite)
if (sprite->animEnded)
{
sub_804777C(sprite->data0);
- sub_8043DFC(gUnknown_03004340[sprite->data0]);
+ sub_8043DFC(gHealthboxIDs[sprite->data0]);
sprite->callback = nullsub_37;
StartSpriteAnimIfDifferent(sprite, 0);
BeginNormalPaletteFade(0x00020000, 0, 10, 0, 0x3DEF);
@@ -1449,11 +1376,11 @@ void sub_8010384(struct Sprite *sprite)
else
species = sprite->data2;
- GetMonData(&gEnemyParty[gUnknown_02024A6A[r6]], MON_DATA_PERSONALITY); // Unused return value
+ GetMonData(&gEnemyParty[gBattlePartyID[r6]], MON_DATA_PERSONALITY); // Unused return value
if (species == SPECIES_UNOWN)
{
- u32 personalityValue = GetMonData(&gEnemyParty[gUnknown_02024A6A[r6]], MON_DATA_PERSONALITY);
+ u32 personalityValue = GetMonData(&gEnemyParty[gBattlePartyID[r6]], MON_DATA_PERSONALITY);
u16 unownForm = ((((personalityValue & 0x3000000) >> 18) | ((personalityValue & 0x30000) >> 12) | ((personalityValue & 0x300) >> 6) | (personalityValue & 3)) % 0x1C);
u16 unownSpecies;
@@ -1499,7 +1426,7 @@ void sub_8010494(struct Sprite *sprite)
}
else
{
- u8 *dst = (u8 *)gUnknown_081FAF4C[battle_get_per_side_status(sprite->data0)] + (gBattleMonForms[sprite->data0] << 11) + (sprite->data3 << 8);
+ u8 *dst = (u8 *)gUnknown_081FAF4C[GetBankIdentity(sprite->data0)] + (gBattleMonForms[sprite->data0] << 11) + (sprite->data3 << 8);
for (i = 0; i < 0x100; i++)
*(dst++) = 0;
@@ -1587,14 +1514,14 @@ void dp11b_obj_instanciate(u8 a, u8 b, s8 c, s8 d)
spriteId = CreateInvisibleSpriteWithCallback(objc_dp11b_pingpong);
if (b == TRUE)
{
- r7 = gUnknown_03004340[a];
+ r7 = gHealthboxIDs[a];
ewram17810[a].unk2 = spriteId;
ewram17810[a].unk0_1 = 1;
gSprites[spriteId].data0 = 0x80;
}
else
{
- r7 = gUnknown_02024BE0[a];
+ r7 = gObjectBankIDs[a];
ewram17810[a].unk3 = spriteId;
ewram17810[a].unk0_2 = 1;
gSprites[spriteId].data0 = 0xC0;
@@ -1652,17 +1579,17 @@ void nullsub_41(void)
void sub_8010800(void)
{
sub_8010874();
- gUnknown_02024D1E[1] = 0;
- gUnknown_030042D4 = bc_8012FAC;
+ gBattleCommunication[1] = 0;
+ gBattleMainFunc = bc_8012FAC;
}
void sub_8010824(void)
{
- gUnknown_030042D4();
- gUnknown_02024A60 = 0;
+ gBattleMainFunc();
+ gActiveBank = 0;
- for (gUnknown_02024A60 = 0; gUnknown_02024A60 < gUnknown_02024A68; gUnknown_02024A60++)
- gUnknown_03004330[gUnknown_02024A60]();
+ for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++)
+ gBattleBankFunc[gActiveBank]();
}
void sub_8010874(void)
@@ -1671,65 +1598,65 @@ void sub_8010874(void)
s32 j;
u8 *r4;
- sub_801365C(0);
- sub_801377C();
+ TurnValuesCleanUp(0);
+ SpecialStatusesClear();
for (i = 0; i < 4; i++)
{
- gUnknown_02024C98[i] = 0;
+ gStatuses3[i] = 0;
- r4 = (u8 *)&gUnknown_02024CA8[i];
+ r4 = (u8 *)&gDisableStructs[i];
for (j = 0; j < (u32)0x1C; j++)
r4[j] = 0;
- gUnknown_02024CA8[i].unk16 = 2;
+ gDisableStructs[i].unk16 = 2;
gUnknown_02024C70[i] = 0;
- gUnknown_02024C34[i] = 0;
- gUnknown_02024C3C[i] = 0;
+ gLastUsedMove[i] = 0;
+ gMoveHitWith[i] = 0;
gUnknown_02024C44[i] = 0;
gUnknown_02024C4C[i] = 0;
gUnknown_02024C5C[i] = 0xFF;
- gUnknown_02024C54[i] = 0;
+ gLockedMove[i] = 0;
gUnknown_02024C2C[i] = 0;
ewram17100[i] = 0;
}
for (i = 0; i < 2; i++)
{
- gUnknown_02024C7A[i] = 0;
+ gSideAffecting[i] = 0;
- r4 = (u8 *)&gUnknown_02024C80[i];
+ r4 = (u8 *)&gSideTimer[i];
for (j = 0; j < (u32)12; j++)
r4[j] = 0;
}
- gPlayerMonIndex = 0;
- gEnemyMonIndex = 0;
+ gBankAttacker = 0;
+ gBankTarget = 0;
gBattleWeather = 0;
- r4 = (u8 *)&gUnknown_02024DBC;
+ r4 = (u8 *)&gWishFutureKnock;
for (i = 0; i < (u32)0x2C; i++)
r4[i] = 0;
- gUnknown_02024C6C = 0;
+ gHitMarker = 0;
if ((gBattleTypeFlags & 2) == 0 && gSaveBlock2.optionsBattleSceneOff == TRUE)
- gUnknown_02024C6C = 0x80;
+ gHitMarker = 0x80;
ewram16084 = gSaveBlock2.optionsBattleStyle;
- gUnknown_02024C0E = 0;
- gUnknown_02024D26 = 0;
- gUnknown_02024A64 = 0;
- gUnknown_02024D1A = 0;
+ gMultiHitCounter = 0;
+ gBattleOutcome = 0;
+ gBattleExecBuffer = 0;
+ gPaydayMoney = 0;
ewram17130 = 0;
ewram17160 = 0;
for (i = 0; i < 8; i++)
- gUnknown_02024D1E[i] = 0;
- gUnknown_02024D18 = 0;
+ gBattleCommunication[i] = 0;
+ gPauseCounterBattle = 0;
gBattleMoveDamage = 0;
gUnknown_02024DE8 = 0;
ewram16002 = 0;
ewram160A1 = 0;
- gUnknown_03004324 = 0;
- gUnknown_02024C0C = 0;
+ gLeveledUpInBattle = 0;
+ gAbsentBankFlags = 0;
ewram16078 = 0;
ewram16086 = 0;
ewram16087 = 0;
@@ -1752,208 +1679,208 @@ void sub_8010874(void)
ewram160C9 = 6;
ewram16113 = 0;
for (i = 0; i < 11; i++)
- gUnknown_030042E0.unk36[i] = 0;
- gUnknown_030042E0.unk13 = 0;
- gUnknown_030042E0.unk0 = 0;
- gUnknown_030042E0.unk1 = 0;
- gUnknown_030042E0.unk2 = 0;
- gUnknown_030042E0.unk3 = 0;
- gUnknown_030042E0.unk4 = 0;
- gUnknown_030042E0.unk5_0 = 0;
- gUnknown_030042E0.unk5_1 = 0;
- gUnknown_030042E0.unk20 = 0;
- gUnknown_030042E0.unk22 = 0;
- gUnknown_030042E0.unk24 = 0;
- gUnknown_030042E0.unk6 = 0;
- gUnknown_030042E0.unk26 = 0;
- gUnknown_030042E0.unk28 = 0;
+ gBattleResults.unk36[i] = 0;
+ gBattleResults.unk13 = 0;
+ gBattleResults.unk0 = 0;
+ gBattleResults.unk1 = 0;
+ gBattleResults.unk2 = 0;
+ gBattleResults.unk3 = 0;
+ gBattleResults.unk4 = 0;
+ gBattleResults.unk5_0 = 0;
+ gBattleResults.unk5_1 = 0;
+ gBattleResults.unk20 = 0;
+ gBattleResults.unk22 = 0;
+ gBattleResults.unk24 = 0;
+ gBattleResults.unk6 = 0;
+ gBattleResults.unk26 = 0;
+ gBattleResults.unk28 = 0;
for (i = 0; i < 10; i++)
{
- gUnknown_030042E0.unk8[i] = 0;
- gUnknown_030042E0.unk14[i] = 0;
- gUnknown_030042E0.unk2A[i] = 0;
+ gBattleResults.unk8[i] = 0;
+ gBattleResults.unk14[i] = 0;
+ gBattleResults.unk2A[i] = 0;
}
}
void sub_8010B88(void)
{
- struct UnkBattleStruct4 sp0 = gUnknown_02024CA8[gUnknown_02024A60];
+ struct UnkBattleStruct4 sp0 = gDisableStructs[gActiveBank];
s32 i;
u8 *ptr;
u32 *ptr2;
- if (gBattleMoves[gUnknown_02024BE6].effect != 0x7F)
+ if (gBattleMoves[gCurrentMove].effect != 0x7F)
{
for (i = 0; i < 8; i++)
- gBattleMons[gUnknown_02024A60].statStages[i] = 6;
- for (i = 0; i < gUnknown_02024A68; i++)
+ gBattleMons[gActiveBank].statStages[i] = 6;
+ for (i = 0; i < gNoOfAllBanks; i++)
{
struct UnknownStruct12 *sp20 = &gUnknown_02024AD0[i];
- if ((sp20->unk0 & 0x04000000) && gUnknown_02024CA8[i].unk14 == gUnknown_02024A60)
+ if ((sp20->unk0 & 0x04000000) && gDisableStructs[i].unk14 == gActiveBank)
sp20->unk0 &= ~0x04000000;
- if ((gUnknown_02024C98[i] & 0x18) && gUnknown_02024CA8[i].unk15 == gUnknown_02024A60)
+ if ((gStatuses3[i] & 0x18) && gDisableStructs[i].unk15 == gActiveBank)
{
- gUnknown_02024C98[i] &= ~0x18;
- gUnknown_02024CA8[i].unk15 = 0;
+ gStatuses3[i] &= ~0x18;
+ gDisableStructs[i].unk15 = 0;
}
}
}
- if (gBattleMoves[gUnknown_02024BE6].effect == 0x7F)
+ if (gBattleMoves[gCurrentMove].effect == 0x7F)
{
- gBattleMons[gUnknown_02024A60].status2 &= 0x15100007;
- gUnknown_02024C98[gUnknown_02024A60] &= 0x3043F;
+ gBattleMons[gActiveBank].status2 &= 0x15100007;
+ gStatuses3[gActiveBank] &= 0x3043F;
- for (i = 0; i < gUnknown_02024A68; i++)
+ for (i = 0; i < gNoOfAllBanks; i++)
{
- if (battle_side_get_owner(gUnknown_02024A60) != battle_side_get_owner(i)
- && (gUnknown_02024C98[i] & 0x18) != 0
- && (gUnknown_02024CA8[i].unk15 == gUnknown_02024A60))
+ if (GetBankSide(gActiveBank) != GetBankSide(i)
+ && (gStatuses3[i] & 0x18) != 0
+ && (gDisableStructs[i].unk15 == gActiveBank))
{
- gUnknown_02024C98[i] &= ~0x18;
- gUnknown_02024C98[i] |= 0x10;
+ gStatuses3[i] &= ~0x18;
+ gStatuses3[i] |= 0x10;
}
}
}
else
{
- gBattleMons[gUnknown_02024A60].status2 = 0;
- gUnknown_02024C98[gUnknown_02024A60] = 0;
+ gBattleMons[gActiveBank].status2 = 0;
+ gStatuses3[gActiveBank] = 0;
}
- for (i = 0; i < gUnknown_02024A68; i++)
+ for (i = 0; i < gNoOfAllBanks; i++)
{
- if (gUnknown_02024AD0[i].unk0 & (gBitTable[gUnknown_02024A60] << 16))
- gUnknown_02024AD0[i].unk0 &= ~(gBitTable[gUnknown_02024A60] << 16);
- if ((gUnknown_02024AD0[i].unk0 & 0xE000) && ewram[0x16020 + i] == gUnknown_02024A60)
+ if (gUnknown_02024AD0[i].unk0 & (gBitTable[gActiveBank] << 16))
+ gUnknown_02024AD0[i].unk0 &= ~(gBitTable[gActiveBank] << 16);
+ if ((gUnknown_02024AD0[i].unk0 & 0xE000) && ewram[0x16020 + i] == gActiveBank)
gUnknown_02024AD0[i].unk0 &= ~0xE000;
}
- gUnknown_02024E60[gUnknown_02024A60] = 0;
- gUnknown_02024E64[gUnknown_02024A60] = 0;
+ gActionSelectionCursor[gActiveBank] = 0;
+ gMoveSelectionCursor[gActiveBank] = 0;
- ptr = (u8 *)&gUnknown_02024CA8[gUnknown_02024A60];
+ ptr = (u8 *)&gDisableStructs[gActiveBank];
for (i = 0; i < (u32)0x1C; i++)
ptr[i] = 0;
- if (gBattleMoves[gUnknown_02024BE6].effect == 0x7F)
+ if (gBattleMoves[gCurrentMove].effect == 0x7F)
{
- gUnknown_02024CA8[gUnknown_02024A60].unkA = sp0.unkA;
- gUnknown_02024CA8[gUnknown_02024A60].unk15 = sp0.unk15;
- gUnknown_02024CA8[gUnknown_02024A60].unkF_0 = sp0.unkF_0;
- gUnknown_02024CA8[gUnknown_02024A60].unkF_4 = sp0.unkF_4;
+ gDisableStructs[gActiveBank].unkA = sp0.unkA;
+ gDisableStructs[gActiveBank].unk15 = sp0.unk15;
+ gDisableStructs[gActiveBank].unkF_0 = sp0.unkF_0;
+ gDisableStructs[gActiveBank].unkF_4 = sp0.unkF_4;
}
- gUnknown_02024CA8[gUnknown_02024A60].unk16 = 2;
- gUnknown_02024C34[gUnknown_02024A60] = 0;
- gUnknown_02024C3C[gUnknown_02024A60] = 0;
- gUnknown_02024C44[gUnknown_02024A60] = 0;
- gUnknown_02024C4C[gUnknown_02024A60] = 0;
- gUnknown_02024C2C[gUnknown_02024A60] = 0;
- gUnknown_02024C5C[gUnknown_02024A60] = 0xFF;
+ gDisableStructs[gActiveBank].unk16 = 2;
+ gLastUsedMove[gActiveBank] = 0;
+ gMoveHitWith[gActiveBank] = 0;
+ gUnknown_02024C44[gActiveBank] = 0;
+ gUnknown_02024C4C[gActiveBank] = 0;
+ gUnknown_02024C2C[gActiveBank] = 0;
+ gUnknown_02024C5C[gActiveBank] = 0xFF;
- ewram[0x160AC + gUnknown_02024A60 * 2 + 0] = 0;
- ewram[0x160AC + gUnknown_02024A60 * 2 + 1] = 0;
- ewram[0x16100 + gUnknown_02024A60 * 4 + 0] = 0;
- ewram[0x16100 + gUnknown_02024A60 * 4 + 1] = 0;
- ewram[0x16100 + gUnknown_02024A60 * 4 + 2] = 0;
- ewram[0x16100 + gUnknown_02024A60 * 4 + 3] = 0;
- ewram[0x160E8 + gUnknown_02024A60 * 2 + 0] = 0;
- ewram[0x160E8 + gUnknown_02024A60 * 2 + 1] = 0;
+ ewram[0x160AC + gActiveBank * 2 + 0] = 0;
+ ewram[0x160AC + gActiveBank * 2 + 1] = 0;
+ ewram[0x16100 + gActiveBank * 4 + 0] = 0;
+ ewram[0x16100 + gActiveBank * 4 + 1] = 0;
+ ewram[0x16100 + gActiveBank * 4 + 2] = 0;
+ ewram[0x16100 + gActiveBank * 4 + 3] = 0;
+ ewram[0x160E8 + gActiveBank * 2 + 0] = 0;
+ ewram[0x160E8 + gActiveBank * 2 + 1] = 0;
ptr2 = (u32 *)(ewram + 0x17100);
- ptr2[gUnknown_02024A60] = 0;
+ ptr2[gActiveBank] = 0;
- gUnknown_02024BE6 = 0;
+ gCurrentMove = 0;
}
-void sub_8010F48(void)
+void UndoEffectsAfterFainting(void)
{
s32 i;
u8 *ptr;
u32 *ptr2;
for (i = 0; i < 8; i++)
- gBattleMons[gUnknown_02024A60].statStages[i] = 6;
- gBattleMons[gUnknown_02024A60].status2 = 0;
- gUnknown_02024C98[gUnknown_02024A60] = 0;
- for (i = 0; i < gUnknown_02024A68; i++)
+ gBattleMons[gActiveBank].statStages[i] = 6;
+ gBattleMons[gActiveBank].status2 = 0;
+ gStatuses3[gActiveBank] = 0;
+ for (i = 0; i < gNoOfAllBanks; i++)
{
- if ((gBattleMons[i].status2 & 0x4000000) && gUnknown_02024CA8[i].unk14 == gUnknown_02024A60)
+ if ((gBattleMons[i].status2 & 0x4000000) && gDisableStructs[i].unk14 == gActiveBank)
gBattleMons[i].status2 &= ~0x4000000;
- if (gBattleMons[i].status2 & (gBitTable[gUnknown_02024A60] << 16))
- gBattleMons[i].status2 &= ~(gBitTable[gUnknown_02024A60] << 16);
- if ((gBattleMons[i].status2 & 0xE000) && ewram[0x16020 + i] == gUnknown_02024A60)
+ if (gBattleMons[i].status2 & (gBitTable[gActiveBank] << 16))
+ gBattleMons[i].status2 &= ~(gBitTable[gActiveBank] << 16);
+ if ((gBattleMons[i].status2 & 0xE000) && ewram[0x16020 + i] == gActiveBank)
gBattleMons[i].status2 &= ~0xE000;
}
- gUnknown_02024E60[gUnknown_02024A60] = 0;
- gUnknown_02024E64[gUnknown_02024A60] = 0;
+ gActionSelectionCursor[gActiveBank] = 0;
+ gMoveSelectionCursor[gActiveBank] = 0;
- ptr = (u8 *)&gUnknown_02024CA8[gUnknown_02024A60];
+ ptr = (u8 *)&gDisableStructs[gActiveBank];
for (i = 0; i < (u32)0x1C; i++)
ptr[i] = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk0_0 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk0_1 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk0_2 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk0_3 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk0_4 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk0_5 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk0_6 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk0_7 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk1_0 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk1_1 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk1_2 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk1_3 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk1_5 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk1_6 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk1_7 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk2_0 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk2_1 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk2_2 = 0;
- gUnknown_02024D28[gUnknown_02024A60].unk2_3 = 0;
-
- gUnknown_02024CA8[gUnknown_02024A60].unk16 = 2;
- gUnknown_02024C34[gUnknown_02024A60] = 0;
- gUnknown_02024C3C[gUnknown_02024A60] = 0;
- gUnknown_02024C44[gUnknown_02024A60] = 0;
- gUnknown_02024C4C[gUnknown_02024A60] = 0;
- gUnknown_02024C2C[gUnknown_02024A60] = 0;
- gUnknown_02024C5C[gUnknown_02024A60] = 0xFF;
-
- ewram[0x160E8 + gUnknown_02024A60 * 2 + 0] = 0;
- ewram[0x160E8 + gUnknown_02024A60 * 2 + 1] = 0;
- ewram[0x160AC + gUnknown_02024A60 * 2 + 0] = 0;
- ewram[0x160AC + gUnknown_02024A60 * 2 + 1] = 0;
- ewram[0x16100 + gUnknown_02024A60 * 4 + 0] = 0;
- ewram[0x16100 + gUnknown_02024A60 * 4 + 1] = 0;
- ewram[0x16100 + gUnknown_02024A60 * 4 + 2] = 0;
- ewram[0x16100 + gUnknown_02024A60 * 4 + 3] = 0;
+ gProtectStructs[gActiveBank].unk0_0 = 0;
+ gProtectStructs[gActiveBank].unk0_1 = 0;
+ gProtectStructs[gActiveBank].unk0_2 = 0;
+ gProtectStructs[gActiveBank].unk0_3 = 0;
+ gProtectStructs[gActiveBank].unk0_4 = 0;
+ gProtectStructs[gActiveBank].unk0_5 = 0;
+ gProtectStructs[gActiveBank].unk0_6 = 0;
+ gProtectStructs[gActiveBank].unk0_7 = 0;
+ gProtectStructs[gActiveBank].unk1_0 = 0;
+ gProtectStructs[gActiveBank].unk1_1 = 0;
+ gProtectStructs[gActiveBank].unk1_2 = 0;
+ gProtectStructs[gActiveBank].unk1_3 = 0;
+ gProtectStructs[gActiveBank].unk1_5 = 0;
+ gProtectStructs[gActiveBank].unk1_6 = 0;
+ gProtectStructs[gActiveBank].unk1_7 = 0;
+ gProtectStructs[gActiveBank].unk2_0 = 0;
+ gProtectStructs[gActiveBank].unk2_1 = 0;
+ gProtectStructs[gActiveBank].unk2_2 = 0;
+ gProtectStructs[gActiveBank].unk2_3 = 0;
+
+ gDisableStructs[gActiveBank].unk16 = 2;
+ gLastUsedMove[gActiveBank] = 0;
+ gMoveHitWith[gActiveBank] = 0;
+ gUnknown_02024C44[gActiveBank] = 0;
+ gUnknown_02024C4C[gActiveBank] = 0;
+ gUnknown_02024C2C[gActiveBank] = 0;
+ gUnknown_02024C5C[gActiveBank] = 0xFF;
+
+ ewram[0x160E8 + gActiveBank * 2 + 0] = 0;
+ ewram[0x160E8 + gActiveBank * 2 + 1] = 0;
+ ewram[0x160AC + gActiveBank * 2 + 0] = 0;
+ ewram[0x160AC + gActiveBank * 2 + 1] = 0;
+ ewram[0x16100 + gActiveBank * 4 + 0] = 0;
+ ewram[0x16100 + gActiveBank * 4 + 1] = 0;
+ ewram[0x16100 + gActiveBank * 4 + 2] = 0;
+ ewram[0x16100 + gActiveBank * 4 + 3] = 0;
ptr2 = (u32 *)(ewram + 0x17100);
- ptr2[gUnknown_02024A60] = 0;
+ ptr2[gActiveBank] = 0;
- gBattleMons[gUnknown_02024A60].type1 = gBaseStats[gBattleMons[gUnknown_02024A60].species].type1;
- gBattleMons[gUnknown_02024A60].type2 = gBaseStats[gBattleMons[gUnknown_02024A60].species].type2;
+ gBattleMons[gActiveBank].type1 = gBaseStats[gBattleMons[gActiveBank].species].type1;
+ gBattleMons[gActiveBank].type2 = gBaseStats[gBattleMons[gActiveBank].species].type2;
}
void bc_8012FAC(void)
{
- switch (gUnknown_02024D1E[0])
+ switch (gBattleCommunication[0])
{
case 0:
- gUnknown_02024A60 = gUnknown_02024D1E[1];
- dp01_build_cmdbuf_x00_a_b_0(0, 0, 0);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
- gUnknown_02024D1E[0]++;
+ gActiveBank = gBattleCommunication[1];
+ EmitGetAttributes(0, 0, 0);
+ MarkBufferBankForExecution(gActiveBank);
+ gBattleCommunication[0]++;
break;
case 1:
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- gUnknown_02024D1E[1]++;
- if (gUnknown_02024D1E[1] == gUnknown_02024A68)
- gUnknown_030042D4 = bc_load_battlefield;
+ gBattleCommunication[1]++;
+ if (gBattleCommunication[1] == gNoOfAllBanks)
+ gBattleMainFunc = bc_load_battlefield;
else
- gUnknown_02024D1E[0] = 0;
+ gBattleCommunication[0] = 0;
}
break;
}
@@ -1961,14 +1888,14 @@ void bc_8012FAC(void)
void bc_load_battlefield(void)
{
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- gUnknown_02024A60 = battle_get_side_with_given_state(0);
- dp01_build_cmdbuf_x2E_a(0, gBattleTerrain);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
- gUnknown_030042D4 = sub_8011384;
- gUnknown_02024D1E[0] = 0;
- gUnknown_02024D1E[1] = 0;
+ gActiveBank = GetBankByPlayerAI(0);
+ EmitBattleIntroSlide(0, gBattleTerrain);
+ MarkBufferBankForExecution(gActiveBank);
+ gBattleMainFunc = sub_8011384;
+ gBattleCommunication[0] = 0;
+ gBattleCommunication[1] = 0;
}
}
@@ -1977,14 +1904,14 @@ void sub_8011384(void)
u8 *ptr;
s32 i;
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- for (gUnknown_02024A60 = 0; gUnknown_02024A60 < gUnknown_02024A68; gUnknown_02024A60++)
+ for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++)
{
if ((gBattleTypeFlags & BATTLE_TYPE_SAFARI)
- && battle_side_get_owner(gUnknown_02024A60) == 0)
+ && GetBankSide(gActiveBank) == 0)
{
- ptr = (u8 *)&gBattleMons[gUnknown_02024A60];
+ ptr = (u8 *)&gBattleMons[gActiveBank];
for (i = 0; i < (u32)0x58; i++)
ptr[i] = 0;
}
@@ -1992,59 +1919,59 @@ void sub_8011384(void)
{
u8 r0;
- ptr = (u8 *)&gBattleMons[gUnknown_02024A60];
+ ptr = (u8 *)&gBattleMons[gActiveBank];
for (i = 0; i < (u32)0x58; i++)
- ptr[i] = gUnknown_02024260[gUnknown_02024A60][4 + i];
+ ptr[i] = gBattleBufferB[gActiveBank][4 + i];
- gBattleMons[gUnknown_02024A60].type1 = gBaseStats[gBattleMons[gUnknown_02024A60].species].type1;
- gBattleMons[gUnknown_02024A60].type2 = gBaseStats[gBattleMons[gUnknown_02024A60].species].type2;
- gBattleMons[gUnknown_02024A60].ability = GetAbilityBySpecies(gBattleMons[gUnknown_02024A60].species, gBattleMons[gUnknown_02024A60].altAbility);
- r0 = battle_side_get_owner(gUnknown_02024A60);
- ewram160BC[r0] = gBattleMons[gUnknown_02024A60].hp;
+ gBattleMons[gActiveBank].type1 = gBaseStats[gBattleMons[gActiveBank].species].type1;
+ gBattleMons[gActiveBank].type2 = gBaseStats[gBattleMons[gActiveBank].species].type2;
+ gBattleMons[gActiveBank].ability = GetAbilityBySpecies(gBattleMons[gActiveBank].species, gBattleMons[gActiveBank].altAbility);
+ r0 = GetBankSide(gActiveBank);
+ ewram160BC[r0] = gBattleMons[gActiveBank].hp;
for (i = 0; i < 8; i++)
- gBattleMons[gUnknown_02024A60].statStages[i] = 6;
- gBattleMons[gUnknown_02024A60].status2 = 0;
+ gBattleMons[gActiveBank].statStages[i] = 6;
+ gBattleMons[gActiveBank].status2 = 0;
}
- if (battle_get_per_side_status(gUnknown_02024A60) == 0)
+ if (GetBankIdentity(gActiveBank) == 0)
{
dp01_build_cmdbuf_x07_7_7_7(0);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ MarkBufferBankForExecution(gActiveBank);
}
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)
{
- if (battle_get_per_side_status(gUnknown_02024A60) == 1)
+ if (GetBankIdentity(gActiveBank) == 1)
{
dp01_build_cmdbuf_x07_7_7_7(0);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ MarkBufferBankForExecution(gActiveBank);
}
- if (battle_side_get_owner(gUnknown_02024A60) == 1
+ if (GetBankSide(gActiveBank) == 1
&& !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_LINK)))
- GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gUnknown_02024A60].species), 2);
+ GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2);
}
else
{
- if (battle_side_get_owner(gUnknown_02024A60) == 1
+ if (GetBankSide(gActiveBank) == 1
&& !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_LINK)))
{
- GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gUnknown_02024A60].species), 2);
+ GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2);
dp01_build_cmdbuf_x04_4_4_4(0);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ MarkBufferBankForExecution(gActiveBank);
}
}
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
{
- if (battle_get_per_side_status(gUnknown_02024A60) == 2
- || battle_get_per_side_status(gUnknown_02024A60) == 3)
+ if (GetBankIdentity(gActiveBank) == 2
+ || GetBankIdentity(gActiveBank) == 3)
{
dp01_build_cmdbuf_x07_7_7_7(0);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ MarkBufferBankForExecution(gActiveBank);
}
}
}
- gUnknown_030042D4 = bc_801333C;
+ gBattleMainFunc = bc_801333C;
}
}
@@ -2052,7 +1979,7 @@ void bc_801333C(void)
{
s32 i;
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
struct
{
@@ -2076,9 +2003,9 @@ void bc_801333C(void)
sp0[i].status = GetMonData(&gEnemyParty[i], MON_DATA_STATUS);
}
}
- gUnknown_02024A60 = battle_get_side_with_given_state(1);
+ gActiveBank = GetBankByPlayerAI(1);
dp01_build_cmdbuf_x30_TODO(0, (u8 *)sp0, 0x80);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ MarkBufferBankForExecution(gActiveBank);
for (i = 0; i < 6; i++)
{
@@ -2094,11 +2021,11 @@ void bc_801333C(void)
sp0[i].status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS);
}
}
- gUnknown_02024A60 = battle_get_side_with_given_state(0);
+ gActiveBank = GetBankByPlayerAI(0);
dp01_build_cmdbuf_x30_TODO(0, (u8 *)sp0, 0x80);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ MarkBufferBankForExecution(gActiveBank);
- gUnknown_030042D4 = bc_battle_begin_message;
+ gBattleMainFunc = bc_battle_begin_message;
}
else
{
@@ -2120,198 +2047,198 @@ void bc_801333C(void)
}
}
- gUnknown_030042D4 = bc_8013568;
+ gBattleMainFunc = bc_8013568;
}
}
}
void bc_battle_begin_message(void)
{
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- gUnknown_02024A60 = battle_get_side_with_given_state(1);
- b_std_message(0, gUnknown_02024A60);
- gUnknown_030042D4 = sub_8011800;
+ gActiveBank = GetBankByPlayerAI(1);
+ PrepareStringBattle(0, gActiveBank);
+ gBattleMainFunc = sub_8011800;
}
}
void bc_8013568(void)
{
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- gUnknown_030042D4 = sub_8011970;
- b_std_message(0, 0);
+ gBattleMainFunc = sub_8011970;
+ PrepareStringBattle(0, 0);
}
}
void sub_8011800(void)
{
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- b_std_message(1, battle_get_side_with_given_state(1));
- gUnknown_030042D4 = sub_8011834;
+ PrepareStringBattle(1, GetBankByPlayerAI(1));
+ gBattleMainFunc = sub_8011834;
}
}
void sub_8011834(void)
{
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- for (gUnknown_02024A60 = 0; gUnknown_02024A60 < gUnknown_02024A68; gUnknown_02024A60++)
+ for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++)
{
- if (battle_get_per_side_status(gUnknown_02024A60) == 1)
+ if (GetBankIdentity(gActiveBank) == 1)
{
dp01_build_cmdbuf_x2F_2F_2F_2F(0);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ MarkBufferBankForExecution(gActiveBank);
}
if ((gBattleTypeFlags & BATTLE_TYPE_MULTI)
- && battle_get_per_side_status(gUnknown_02024A60) == 3)
+ && GetBankIdentity(gActiveBank) == 3)
{
dp01_build_cmdbuf_x2F_2F_2F_2F(0);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ MarkBufferBankForExecution(gActiveBank);
}
}
- gUnknown_030042D4 = bc_801362C;
+ gBattleMainFunc = bc_801362C;
}
}
void bc_801362C(void)
{
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- for (gUnknown_02024A60 = 0; gUnknown_02024A60 < gUnknown_02024A68; gUnknown_02024A60++)
+ for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++)
{
- if (battle_side_get_owner(gUnknown_02024A60) == 1
+ if (GetBankSide(gActiveBank) == 1
&& !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_LINK)))
- GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gUnknown_02024A60].species), 2);
+ GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2);
}
- gUnknown_030042D4 = sub_8011970;
+ gBattleMainFunc = sub_8011970;
}
}
void unref_sub_8011950(void)
{
- if (gUnknown_02024A64 == 0)
- gUnknown_030042D4 = sub_8011970;
+ if (gBattleExecBuffer == 0)
+ gBattleMainFunc = sub_8011970;
}
void sub_8011970(void)
{
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
if (!(gBattleTypeFlags & BATTLE_TYPE_SAFARI))
- b_std_message(1, battle_get_side_with_given_state(0));
- gUnknown_030042D4 = sub_80119B4;
+ PrepareStringBattle(1, GetBankByPlayerAI(0));
+ gBattleMainFunc = sub_80119B4;
}
}
void sub_80119B4(void)
{
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- for (gUnknown_02024A60 = 0; gUnknown_02024A60 < gUnknown_02024A68; gUnknown_02024A60++)
+ for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++)
{
- if (battle_get_per_side_status(gUnknown_02024A60) == 0)
+ if (GetBankIdentity(gActiveBank) == 0)
{
dp01_build_cmdbuf_x2F_2F_2F_2F(0);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ MarkBufferBankForExecution(gActiveBank);
}
if ((gBattleTypeFlags & BATTLE_TYPE_MULTI)
- && battle_get_per_side_status(gUnknown_02024A60) == 2)
+ && GetBankIdentity(gActiveBank) == 2)
{
dp01_build_cmdbuf_x2F_2F_2F_2F(0);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ MarkBufferBankForExecution(gActiveBank);
}
}
ewram16058 = 0;
ewram160F9 = 0;
ewram160E6 = 0;
- gUnknown_030042D4 = sub_8011B00;
+ gBattleMainFunc = BattleBeginFirstTurn;
}
}
void unref_sub_8011A68(void)
{
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- for (gUnknown_02024A60 = 0; gUnknown_02024A60 < gUnknown_02024A68; gUnknown_02024A60++)
+ for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++)
{
- if (battle_side_get_owner(gUnknown_02024A60) == 0)
+ if (GetBankSide(gActiveBank) == 0)
{
- sub_800C704(0, gUnknown_02024A6A[gUnknown_02024A60], 0);
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
+ sub_800C704(0, gBattlePartyID[gActiveBank], 0);
+ MarkBufferBankForExecution(gActiveBank);
}
}
ewram16058 = 0;
ewram160F9 = 0;
ewram160E6 = 0;
- gUnknown_030042D4 = sub_8011B00;
+ gBattleMainFunc = BattleBeginFirstTurn;
}
}
-void sub_8011B00(void)
+void BattleBeginFirstTurn(void)
{
s32 i;
s32 j;
u8 r9 = 0;
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
if (ewram16058 == 0)
{
- for (i = 0; i < gUnknown_02024A68; i++)
- gUnknown_02024A7A[i] = i;
- for (i = 0; i < gUnknown_02024A68 - 1; i++)
+ for (i = 0; i < gNoOfAllBanks; i++)
+ gTurnOrder[i] = i;
+ for (i = 0; i < gNoOfAllBanks - 1; i++)
{
- for (j = i + 1; j < gUnknown_02024A68; j++)
+ for (j = i + 1; j < gNoOfAllBanks; j++)
{
- if (b_first_side(gUnknown_02024A7A[i], gUnknown_02024A7A[j], 1) != 0)
+ if (b_first_side(gTurnOrder[i], gTurnOrder[j], 1) != 0)
sub_8012FBC(i, j);
}
}
}
- if (ewram160E6 == 0 && sub_8018324(0, 0, 0, 0xFF, 0) != 0)
+ if (ewram160E6 == 0 && AbilityBattleEffects(0, 0, 0, 0xFF, 0) != 0)
{
ewram160E6 = 1;
return;
}
- while (ewram16058 < gUnknown_02024A68)
+ while (ewram16058 < gNoOfAllBanks)
{
- if (sub_8018324(0, gUnknown_02024A7A[ewram16058], 0, 0, 0) != 0)
+ if (AbilityBattleEffects(0, gTurnOrder[ewram16058], 0, 0, 0) != 0)
r9++;
ewram16058++;
if (r9 != 0)
return;
}
- if (sub_8018324(9, 0, 0, 0, 0) != 0)
+ if (AbilityBattleEffects(9, 0, 0, 0, 0) != 0)
return;
- if (sub_8018324(11, 0, 0, 0, 0) != 0)
+ if (AbilityBattleEffects(11, 0, 0, 0, 0) != 0)
return;
- while (ewram160F9 < gUnknown_02024A68)
+ while (ewram160F9 < gNoOfAllBanks)
{
- if (sub_801A02C(0, gUnknown_02024A7A[ewram160F9], 0) != 0)
+ if (sub_801A02C(0, gTurnOrder[ewram160F9], 0) != 0)
r9++;
ewram160F9++;
if (r9 != 0)
return;
}
// Absolutely pointless for-loop that somehow doesn't get optimized out
- for (i = 0; i < gUnknown_02024A68; i++)
+ for (i = 0; i < gNoOfAllBanks; i++)
;
for (i = 0; i < 4; i++)
{
ewram[0x16068 + i] = 6;
- gUnknown_02024C18[i] = 0xFF;
- gUnknown_02024C60[i] = 0;
+ gActionForBanks[i] = 0xFF;
+ gChosenMovesByBanks[i] = 0;
}
- sub_801365C(0);
- sub_801377C();
- ewram160A6 = gUnknown_02024C0C;
- gUnknown_030042D4 = sub_8012324;
+ TurnValuesCleanUp(0);
+ SpecialStatusesClear();
+ ewram160A6 = gAbsentBankFlags;
+ gBattleMainFunc = sub_8012324;
sub_80156DC();
for (i = 0; i < 8; i++)
- gUnknown_02024D1E[i] = 0;
- for (i = 0; i < gUnknown_02024A68; i++)
+ gBattleCommunication[i] = 0;
+ for (i = 0; i < gNoOfAllBanks; i++)
gBattleMons[i].status2 &= ~8;
ewram16000 = 0;
ewram16001 = 0;
@@ -2321,7 +2248,7 @@ void sub_8011B00(void)
ewram16059 = 0;
ewram1600E = 0;
gBattleMoveFlags = 0;
- gUnknown_02024D1C = Random();
+ gRandomTurnNumber = Random();
}
}
@@ -2329,16 +2256,16 @@ void bc_8013B1C(void)
{
s32 i;
- if (gUnknown_02024A64 == 0)
+ if (gBattleExecBuffer == 0)
{
- gUnknown_030042D4 = sub_8011E8C;
+ gBattleMainFunc = BattleTurnPassed;
for (i = 0; i < 8; i++)
- gUnknown_02024D1E[i] = 0;
- for (i = 0; i < gUnknown_02024A68; i++)
+ gBattleCommunication[i] = 0;
+ for (i = 0; i < gNoOfAllBanks; i++)
{
gBattleMons[i].status2 &= ~8;
if ((gBattleMons[i].status1 & 7) && (gBattleMons[i].status2 & 0x1000))
- b_cancel_multi_turn_move_maybe(i);
+ CancelMultiTurnMoves(i);
}
ewram16000 = 0;
ewram16001 = 0;
@@ -2349,16 +2276,16 @@ void bc_8013B1C(void)
}
}
-void sub_8011E8C(void)
+void BattleTurnPassed(void)
{
s32 i;
- sub_801365C(1);
- if (gUnknown_02024D26 == 0)
+ TurnValuesCleanUp(1);
+ if (gBattleOutcome == 0)
{
- if (sub_8015DFC() != 0)
+ if (UpdateTurnCounters() != 0)
return;
- if (sub_8016558() != 0)
+ if (TurnBasedEffects() != 0)
return;
}
if (sub_80173A4() != 0)
@@ -2366,94 +2293,94 @@ void sub_8011E8C(void)
ewram16059 = 0;
if (sub_80170DC() != 0)
return;
- sub_801365C(0);
- gUnknown_02024C6C &= ~0x200;
- gUnknown_02024C6C &= ~0x80000;
- gUnknown_02024C6C &= ~0x400000;
- gUnknown_02024C6C &= ~0x100000;
+ TurnValuesCleanUp(0);
+ gHitMarker &= ~0x200;
+ gHitMarker &= ~0x80000;
+ gHitMarker &= ~0x400000;
+ gHitMarker &= ~0x100000;
ewram16002 = 0;
ewram160A1 = 0;
ewram1600C = 0;
gBattleMoveDamage = 0;
gBattleMoveFlags = 0;
for (i = 0; i < 5; i++)
- gUnknown_02024D1E[i] = 0;
- if (gUnknown_02024D26 != 0)
+ gBattleCommunication[i] = 0;
+ if (gBattleOutcome != 0)
{
- gUnknown_02024A7F = 12;
- gUnknown_030042D4 = sub_80138F0;
+ gFightStateTracker = 12;
+ gBattleMainFunc = sub_80138F0;
return;
}
- if (gUnknown_030042E0.unk13 < 0xFF)
- gUnknown_030042E0.unk13++;
- for (i = 0; i < gUnknown_02024A68; i++)
+ if (gBattleResults.unk13 < 0xFF)
+ gBattleResults.unk13++;
+ for (i = 0; i < gNoOfAllBanks; i++)
{
- gUnknown_02024C18[i] = 0xFF;
- gUnknown_02024C60[i] = 0;
+ gActionForBanks[i] = 0xFF;
+ gChosenMovesByBanks[i] = 0;
}
for (i = 0; i < 4; i++)
ewram[0x16068 + i] = 6;
- ewram160A6 = gUnknown_02024C0C;
- gUnknown_030042D4 = sub_8012324;
- gUnknown_02024D1C = Random();
+ ewram160A6 = gAbsentBankFlags;
+ gBattleMainFunc = sub_8012324;
+ gRandomTurnNumber = Random();
}
-u8 sub_8012028(void)
+u8 CanRunFromBattle(void)
{
u8 r2;
u8 r6;
s32 i;
- if (gBattleMons[gUnknown_02024A60].item == 0xAF)
- r2 = gEnigmaBerries[gUnknown_02024A60].holdEffect;
+ if (gBattleMons[gActiveBank].item == 0xAF)
+ r2 = gEnigmaBerries[gActiveBank].holdEffect;
else
- r2 = ItemId_GetHoldEffect(gBattleMons[gUnknown_02024A60].item);
- gUnknown_02024C0B = gUnknown_02024A60;
+ r2 = ItemId_GetHoldEffect(gBattleMons[gActiveBank].item);
+ gStringBank = gActiveBank;
if (r2 == 0x25)
return 0;
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
return 0;
- if (gBattleMons[gUnknown_02024A60].ability == ABILITY_RUN_AWAY)
+ if (gBattleMons[gActiveBank].ability == ABILITY_RUN_AWAY)
return 0;
- r6 = battle_side_get_owner(gUnknown_02024A60);
- for (i = 0; i < gUnknown_02024A68; i++)
+ r6 = GetBankSide(gActiveBank);
+ for (i = 0; i < gNoOfAllBanks; i++)
{
- if (r6 != battle_side_get_owner(i)
+ if (r6 != GetBankSide(i)
&& gBattleMons[i].ability == 0x17)
{
ewram16003 = i;
- byte_2024C06 = gBattleMons[i].ability;
- gUnknown_02024D1E[5] = 2;
+ gLastUsedAbility = gBattleMons[i].ability;
+ gBattleCommunication[5] = 2;
return 2;
}
- if (r6 != battle_side_get_owner(i)
- && gBattleMons[gUnknown_02024A60].ability != ABILITY_LEVITATE
- && gBattleMons[gUnknown_02024A60].type1 != 2
- && gBattleMons[gUnknown_02024A60].type2 != 2
+ if (r6 != GetBankSide(i)
+ && gBattleMons[gActiveBank].ability != ABILITY_LEVITATE
+ && gBattleMons[gActiveBank].type1 != 2
+ && gBattleMons[gActiveBank].type2 != 2
&& gBattleMons[i].ability == 0x47)
{
ewram16003 = i;
- byte_2024C06 = gBattleMons[i].ability;
- gUnknown_02024D1E[5] = 2;
+ gLastUsedAbility = gBattleMons[i].ability;
+ gBattleCommunication[5] = 2;
return 2;
}
}
- i = sub_8018324(15, gUnknown_02024A60, 0x2A, 0, 0);
- if (i != 0 && (gBattleMons[gUnknown_02024A60].type1 == 8 || gBattleMons[gUnknown_02024A60].type2 == 8))
+ i = AbilityBattleEffects(15, gActiveBank, 0x2A, 0, 0);
+ if (i != 0 && (gBattleMons[gActiveBank].type1 == 8 || gBattleMons[gActiveBank].type2 == 8))
{
ewram16003 = i - 1;
- byte_2024C06 = gBattleMons[i - 1].ability;
- gUnknown_02024D1E[5] = 2;
+ gLastUsedAbility = gBattleMons[i - 1].ability;
+ gBattleCommunication[5] = 2;
return 2;
}
- if ((gBattleMons[gUnknown_02024A60].status2 & 0x0400E000) || (gUnknown_02024C98[gUnknown_02024A60] & 0x400))
+ if ((gBattleMons[gActiveBank].status2 & 0x0400E000) || (gStatuses3[gActiveBank] & 0x400))
{
- gUnknown_02024D1E[5] = 0;
+ gBattleCommunication[5] = 0;
return 1;
}
if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
{
- gUnknown_02024D1E[5] = 1;
+ gBattleCommunication[5] = 1;
return 1;
}
return 0;
@@ -2467,7 +2394,7 @@ void sub_8012258(u8 a)
for (i = 0; i < 3; i++)
gUnknown_02038470[i] = ewram[0x1606C + i + a * 3];
- r4 = pokemon_order_func(gUnknown_02024A6A[a]);
+ r4 = pokemon_order_func(gBattlePartyID[a]);
r1 = pokemon_order_func(ewram[0x16068 + a]);
sub_8094C98(r4, r1);
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
@@ -2492,44 +2419,44 @@ void sub_8012324(void)
{
u8 r5;
- gUnknown_02024D1E[4] = 0;
+ gBattleCommunication[4] = 0;
// inverted loop
//_0801234C
- for (gUnknown_02024A60 = 0; gUnknown_02024A60 < gUnknown_02024A68; gUnknown_02024A60++)
+ for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++)
{
- r5 = battle_get_per_side_status(gUnknown_02024A60);
- switch (gUnknown_02024D1E[gUnknown_02024A60])
+ r5 = GetBankIdentity(gActiveBank);
+ switch (gBattleCommunication[gActiveBank])
{
case 0:
- ewram[0x016068 + gUnknown_02024A60] = 6;
+ ewram[0x016068 + gActiveBank] = 6;
if (!(gBattleTypeFlags & 0x40)
&& (r5 & 2)
- && !(ewram160A6 & gBitTable[battle_get_side_with_given_state(r5 ^ 2)])
- && gUnknown_02024D1E[battle_get_side_with_given_state(r5)] != 4)
+ && !(ewram160A6 & gBitTable[GetBankByPlayerAI(r5 ^ 2)])
+ && gBattleCommunication[GetBankByPlayerAI(r5)] != 4)
break;
//_080123F8
- if (ewram160A6 & gBitTable[gUnknown_02024A60])
+ if (ewram160A6 & gBitTable[gActiveBank])
{
- gUnknown_02024C18[gUnknown_02024A60] = 13;
+ gActionForBanks[gActiveBank] = 13;
if (!(gBattleTypeFlags & 0x40))
- gUnknown_02024D1E[gUnknown_02024A60] = 4;
+ gBattleCommunication[gActiveBank] = 4;
//_08012454
else
- gUnknown_02024D1E[gUnknown_02024A60] = 3;
+ gBattleCommunication[gActiveBank] = 3;
break;
}
//_08012468
- if ((gBattleMons[gUnknown_02024A60].status2 & 0x1000)
- || (gBattleMons[gUnknown_02024A60].status2 & 0x10000000))
+ if ((gBattleMons[gActiveBank].status2 & 0x1000)
+ || (gBattleMons[gActiveBank].status2 & 0x10000000))
{
- gUnknown_02024C18[gUnknown_02024A60] = 0;
- gUnknown_02024D1E[gUnknown_02024A60] = 3;
+ gActionForBanks[gActiveBank] = 0;
+ gBattleCommunication[gActiveBank] = 3;
}
else
{
- dp01_build_cmdbuf_x12_a_bb(0, gUnknown_02024C18[0], gUnknown_02024260[0][1] | (gUnknown_02024260[0][2] << 8));
- dp01_battle_side_mark_buffer_for_execution(gUnknown_02024A60);
- gUnknown_02024D1E[gUnknown_02024A60]++;
+ dp01_build_cmdbuf_x12_a_bb(0, gActionForBanks[0], gBattleBufferB[0][1] | (gBattleBufferB[0][2] << 8));
+ MarkBufferBankForExecution(gActiveBank);
+ gBattleCommunication[gActiveBank]++;
}
break;
case 1:
diff --git a/src/battle_6.c b/src/battle_6.c
index bc540ce72..9ea3f240a 100644
--- a/src/battle_6.c
+++ b/src/battle_6.c
@@ -1,28 +1,74 @@
#include "global.h"
-#include "asm.h"
+#include "battle.h"
+#include "battle_interface.h"
+#include "battle_message.h"
+#include "data2.h"
#include "menu_cursor.h"
+#include "palette.h"
+#include "pokemon.h"
+#include "rom3.h"
+#include "songs.h"
+#include "sound.h"
+#include "sprite.h"
+#include "string_util.h"
+#include "task.h"
#include "text.h"
+#include "util.h"
+
+//Possibly PokemonSubstruct1
+struct UnknownStruct3
+{
+ u16 moves[4];
+ u8 pp[4];
+ u8 ppBonuses;
+};
extern u16 gUnknown_030042A4;
extern u16 gUnknown_030042A0;
extern struct Window gUnknown_03004210;
-extern void (*gUnknown_03004330[])(void);
-
-extern u8 gUnknown_02024A60;
-extern u8 gUnknown_02024E60[];
-extern u8 gUnknown_020238CC[];
+extern void (*gBattleBankFunc[])(void);
-extern u16 gUnknown_030042C0;
-extern u16 gUnknown_030041B4;
-extern u16 gUnknown_03004288;
-extern u16 gUnknown_03004280;
+extern u8 gActiveBank;
+extern u8 gActionSelectionCursor[];
+extern u8 gDisplayedStringBattle[];
+extern u8 gMoveSelectionCursor[];
+extern u8 gBattleBufferA[][0x200];
+extern u8 gBankInMenu;
+extern u16 gBattlePartyID[];
+extern u8 gHealthboxIDs[];
+extern u8 gDoingBattleAnim;
+extern u8 gObjectBankIDs[];
+extern u16 gBattleTypeFlags;
+extern u8 gBattleOutcome;
+extern void (*gAnimScriptCallback)(void);
+extern bool8 gAnimScriptActive;
+extern u16 gMovePowerMoveAnim;
+extern u32 gMoveDmgMoveAnim;
+extern u8 gHappinessMoveAnim;
+extern u16 gWeatherMoveAnim;
+extern u32 *gDisableStructMoveAnim;
+extern u32 gPID_perBank[];
+extern u8 gBattleMonForms[];
+extern u16 gUnknown_02024DE8;
+extern u8 gUnknown_02024E68[];
+extern struct SpriteTemplate gUnknown_02024E8C;
+extern u8 gUnknown_0202F7C4;
+extern u8 gUnknown_02038470[];
extern u16 gUnknown_030041B0;
+extern u16 gUnknown_030041B4;
extern u16 gUnknown_030041B8;
+extern u16 gUnknown_03004280;
+extern u16 gUnknown_03004288;
+extern u16 gUnknown_030042A4;
+extern u16 gUnknown_030042C0;
+extern u8 gUnknown_03004344;
+extern u8 gUnknown_0300434C[];
extern const u8 gUnknown_08400CA8[];
extern const u8 gUnknown_08400CF3[];
+extern const u8 gUnknown_08400D38[];
#if ENGLISH
#define SUB_803037C_TILE_DATA_OFFSET 440
@@ -30,7 +76,952 @@ extern const u8 gUnknown_08400CF3[];
#define SUB_803037C_TILE_DATA_OFFSET 444
#endif
-void sub_803037C(void) {
+extern void sub_802C68C(void);
+extern void sub_802E1B0(void);
+extern void sub_802E3B4();
+extern void sub_802E220();
+extern void sub_802E2D4();
+extern void sub_802E004(void);
+extern void sub_802DF30(void);
+extern void sub_80325B8(void);
+extern void PlayerBufferExecCompleted(void);
+extern void bx_t1_healthbar_update(void);
+extern void nullsub_91(void);
+extern void sub_802D924(u8);
+extern void sub_802E434(void);
+extern bool8 mplay_80342A4(u8);
+extern void move_anim_start_t2_for_situation();
+extern void bx_blink_t1(void);
+extern void sub_8047858();
+extern u8 GetBankSide(u8);
+extern void sub_80E43C0();
+extern void oamt_add_pos2_onto_pos1();
+extern void sub_8078B34(struct Sprite *);
+extern void oamt_set_x3A_32();
+extern void sub_80318FC();
+extern bool8 IsDoubleBattle(void);
+extern void sub_802D500(void);
+extern void dp11b_obj_free();
+extern bool8 sub_8078874(u8);
+extern bool8 move_anim_start_t3();
+extern void sub_802E460(void);
+extern void b_link_standby_message(void);
+extern void sub_802D18C(void);
+extern void sub_802DF18(void);
+extern void BufferStringBattle();
+extern void sub_80326EC();
+extern void ExecuteMoveAnim();
+extern void sub_8031F24(void);
+extern void sub_80324BC();
+extern u8 sub_8031720();
+extern void bx_wait_t1(void);
+extern u8 GetBankByPlayerAI(u8);
+extern void sub_802DE10(void);
+extern void sub_80105EC(struct Sprite *);
+extern void sub_802D274(void);
+extern void sub_802D23C(void);
+extern u8 GetBankIdentity(u8);
+extern void sub_8031AF4();
+extern void sub_80313A0(struct Sprite *);
+extern void sub_802D204(void);
+extern u8 sub_8079E90();
+extern void sub_802DEAC(void);
+extern void sub_80312F0(struct Sprite *);
+extern u8 sub_8077ABC();
+extern u8 sub_8077F68();
+extern u8 sub_8046400();
+extern void sub_802D798(void);
+extern void bx_0802E404(void);
+
+u32 dp01_getattr_by_ch1_for_player_pokemon_(u8, u8 *);
+void dp01_setattr_by_ch1_for_player_pokemon(u8);
+void sub_802F934(u8, u8);
+void sub_802FB2C(void);
+void sub_8030190(void);
+void sub_80304A8(void);
+void sub_8030E38(struct Sprite *);
+void task05_08033660(u8);
+void sub_8031064(void);
+
+void PlayerHandleGetAttributes(void)
+{
+ u8 unkData[0x100];
+ u32 offset = 0;
+ u8 r4;
+ s32 i;
+
+ if (gBattleBufferA[gActiveBank][2] == 0)
+ {
+ offset += dp01_getattr_by_ch1_for_player_pokemon_(gBattlePartyID[gActiveBank], unkData);
+ }
+ else
+ {
+ r4 = gBattleBufferA[gActiveBank][2];
+ for (i = 0; i < 6; i++)
+ {
+ if (r4 & 1)
+ offset += dp01_getattr_by_ch1_for_player_pokemon_(i, unkData + offset);
+ r4 >>= 1;
+ }
+ }
+ dp01_build_cmdbuf_x1D_1D_numargs_varargs(1, offset, unkData);
+ PlayerBufferExecCompleted();
+}
+
+// Duplicate of dp01_getattr_by_ch1_for_player_pokemon
+u32 dp01_getattr_by_ch1_for_player_pokemon_(u8 a, u8 *buffer)
+{
+ struct BattlePokemon battlePokemon;
+ struct UnknownStruct3 moveData;
+ u8 nickname[20];
+ u8 *src;
+ s16 data16;
+ u32 data32;
+ s32 size = 0;
+
+ switch (gBattleBufferA[gActiveBank][1])
+ {
+ case 0:
+ battlePokemon.species = GetMonData(&gPlayerParty[a], MON_DATA_SPECIES);
+ battlePokemon.item = GetMonData(&gPlayerParty[a], MON_DATA_HELD_ITEM);
+ for (size = 0; size < 4; size++)
+ {
+ battlePokemon.moves[size] = GetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + size);
+ battlePokemon.pp[size] = GetMonData(&gPlayerParty[a], MON_DATA_PP1 + size);
+ }
+ battlePokemon.ppBonuses = GetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES);
+ battlePokemon.friendship = GetMonData(&gPlayerParty[a], MON_DATA_FRIENDSHIP);
+ battlePokemon.experience = GetMonData(&gPlayerParty[a], MON_DATA_EXP);
+ battlePokemon.hpIV = GetMonData(&gPlayerParty[a], MON_DATA_HP_IV);
+ battlePokemon.attackIV = GetMonData(&gPlayerParty[a], MON_DATA_ATK_IV);
+ battlePokemon.defenseIV = GetMonData(&gPlayerParty[a], MON_DATA_DEF_IV);
+ battlePokemon.speedIV = GetMonData(&gPlayerParty[a], MON_DATA_SPD_IV);
+ battlePokemon.spAttackIV = GetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV);
+ battlePokemon.spDefenseIV = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV);
+ battlePokemon.personality = GetMonData(&gPlayerParty[a], MON_DATA_PERSONALITY);
+ battlePokemon.status1 = GetMonData(&gPlayerParty[a], MON_DATA_STATUS);
+ battlePokemon.level = GetMonData(&gPlayerParty[a], MON_DATA_LEVEL);
+ battlePokemon.hp = GetMonData(&gPlayerParty[a], MON_DATA_HP);
+ battlePokemon.maxHP = GetMonData(&gPlayerParty[a], MON_DATA_MAX_HP);
+ battlePokemon.attack = GetMonData(&gPlayerParty[a], MON_DATA_ATK);
+ battlePokemon.defense = GetMonData(&gPlayerParty[a], MON_DATA_DEF);
+ battlePokemon.speed = GetMonData(&gPlayerParty[a], MON_DATA_SPD);
+ battlePokemon.spAttack = GetMonData(&gPlayerParty[a], MON_DATA_SPATK);
+ battlePokemon.spDefense = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF);
+ battlePokemon.isEgg = GetMonData(&gPlayerParty[a], MON_DATA_IS_EGG);
+ battlePokemon.altAbility = GetMonData(&gPlayerParty[a], MON_DATA_ALT_ABILITY);
+ battlePokemon.otId = GetMonData(&gPlayerParty[a], MON_DATA_OT_ID);
+ GetMonData(&gPlayerParty[a], MON_DATA_NICKNAME, nickname);
+ StringCopy10(battlePokemon.nickname, nickname);
+ GetMonData(&gPlayerParty[a], MON_DATA_OT_NAME, battlePokemon.otName);
+ src = (u8 *)&battlePokemon;
+ for (size = 0; size < sizeof(battlePokemon); size++)
+ buffer[size] = src[size];
+ break;
+ case 1:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_SPECIES);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 2:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_HELD_ITEM);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 3:
+ for (size = 0; size < 4; size++)
+ {
+ moveData.moves[size] = GetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + size);
+ moveData.pp[size] = GetMonData(&gPlayerParty[a], MON_DATA_PP1 + size);
+ }
+ moveData.ppBonuses = GetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES);
+ src = (u8 *)&moveData;
+ for (size = 0; size < sizeof(moveData); size++)
+ buffer[size] = src[size];
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + gBattleBufferA[gActiveBank][1] - 4);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 8:
+ for (size = 0; size < 4; size++)
+ buffer[size] = GetMonData(&gPlayerParty[a], MON_DATA_PP1 + size);
+ buffer[size] = GetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES);
+ size++;
+ break;
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_PP1 + gBattleBufferA[gActiveBank][1] - 9);
+ size = 1;
+ break;
+ case 17:
+ data32 = GetMonData(&gPlayerParty[a], MON_DATA_OT_ID);
+ buffer[0] = (data32 & 0x000000FF);
+ buffer[1] = (data32 & 0x0000FF00) >> 8;
+ buffer[2] = (data32 & 0x00FF0000) >> 16;
+ size = 3;
+ break;
+ case 18:
+ data32 = GetMonData(&gPlayerParty[a], MON_DATA_EXP);
+ buffer[0] = (data32 & 0x000000FF);
+ buffer[1] = (data32 & 0x0000FF00) >> 8;
+ buffer[2] = (data32 & 0x00FF0000) >> 16;
+ size = 3;
+ break;
+ case 19:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_HP_EV);
+ size = 1;
+ break;
+ case 20:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_ATK_EV);
+ size = 1;
+ break;
+ case 21:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_DEF_EV);
+ size = 1;
+ break;
+ case 22:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPD_EV);
+ size = 1;
+ break;
+ case 23:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPATK_EV);
+ size = 1;
+ break;
+ case 24:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF_EV);
+ size = 1;
+ break;
+ case 25:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_FRIENDSHIP);
+ size = 1;
+ break;
+ case 26:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_POKERUS);
+ size = 1;
+ break;
+ case 27:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_MET_LOCATION);
+ size = 1;
+ break;
+ case 28:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_MET_LEVEL);
+ size = 1;
+ break;
+ case 29:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_MET_GAME);
+ size = 1;
+ break;
+ case 30:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_POKEBALL);
+ size = 1;
+ break;
+ case 31:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_HP_IV);
+ buffer[1] = GetMonData(&gPlayerParty[a], MON_DATA_ATK_IV);
+ buffer[2] = GetMonData(&gPlayerParty[a], MON_DATA_DEF_IV);
+ buffer[3] = GetMonData(&gPlayerParty[a], MON_DATA_SPD_IV);
+ buffer[4] = GetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV);
+ buffer[5] = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV);
+ size = 6;
+ break;
+ case 32:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_HP_IV);
+ size = 1;
+ break;
+ case 33:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_ATK_IV);
+ size = 1;
+ break;
+ case 34:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_DEF_IV);
+ size = 1;
+ break;
+ case 35:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPD_IV);
+ size = 1;
+ break;
+ case 36:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV);
+ size = 1;
+ break;
+ case 37:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV);
+ size = 1;
+ break;
+ case 38:
+ data32 = GetMonData(&gPlayerParty[a], MON_DATA_PERSONALITY);
+ buffer[0] = (data32 & 0x000000FF);
+ buffer[1] = (data32 & 0x0000FF00) >> 8;
+ buffer[2] = (data32 & 0x00FF0000) >> 16;
+ buffer[3] = (data32 & 0xFF000000) >> 24;
+ size = 4;
+ break;
+ case 39:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_CHECKSUM);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 40:
+ data32 = GetMonData(&gPlayerParty[a], MON_DATA_STATUS);
+ buffer[0] = (data32 & 0x000000FF);
+ buffer[1] = (data32 & 0x0000FF00) >> 8;
+ buffer[2] = (data32 & 0x00FF0000) >> 16;
+ buffer[3] = (data32 & 0xFF000000) >> 24;
+ size = 4;
+ break;
+ case 41:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_LEVEL);
+ size = 1;
+ break;
+ case 42:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_HP);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 43:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_MAX_HP);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 44:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_ATK);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 45:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_DEF);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 46:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_SPD);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 47:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_SPATK);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 48:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 49:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_COOL);
+ size = 1;
+ break;
+ case 50:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_BEAUTY);
+ size = 1;
+ break;
+ case 51:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_CUTE);
+ size = 1;
+ break;
+ case 52:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SMART);
+ size = 1;
+ break;
+ case 53:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_TOUGH);
+ size = 1;
+ break;
+ case 54:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SHEEN);
+ size = 1;
+ break;
+ case 55:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_COOL_RIBBON);
+ size = 1;
+ break;
+ case 56:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_BEAUTY_RIBBON);
+ size = 1;
+ break;
+ case 57:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_CUTE_RIBBON);
+ size = 1;
+ break;
+ case 58:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SMART_RIBBON);
+ size = 1;
+ break;
+ case 59:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_TOUGH_RIBBON);
+ size = 1;
+ break;
+ }
+ return size;
+}
+
+void sub_802ECF0(void)
+{
+ struct BattlePokemon battleMon; // I think this is a BattlePokemon
+ u8 *src = (u8 *)&gPlayerParty[gBattlePartyID[gActiveBank]] + gBattleBufferA[gActiveBank][1];
+ u8 *dst = (u8 *)&battleMon + gBattleBufferA[gActiveBank][1];
+ u8 i;
+
+ for (i = 0; i < gBattleBufferA[gActiveBank][2]; i++)
+ dst[i] = src[i];
+ dp01_build_cmdbuf_x1D_1D_numargs_varargs(1, gBattleBufferA[gActiveBank][2], dst);
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleSetAttributes(void)
+{
+ u8 r4;
+ u8 i;
+
+ if (gBattleBufferA[gActiveBank][2] == 0)
+ {
+ dp01_setattr_by_ch1_for_player_pokemon(gBattlePartyID[gActiveBank]);
+ }
+ else
+ {
+ r4 = gBattleBufferA[gActiveBank][2];
+ for (i = 0; i < 6; i++)
+ {
+ if (r4 & 1)
+ dp01_setattr_by_ch1_for_player_pokemon(i);
+ r4 >>= 1;
+ }
+ }
+ PlayerBufferExecCompleted();
+}
+
+// Duplicate of sub_811EC68
+void dp01_setattr_by_ch1_for_player_pokemon(u8 a)
+{
+ struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBank][3];
+ struct UnknownStruct3 *moveData = (struct UnknownStruct3 *)&gBattleBufferA[gActiveBank][3];
+ s32 i;
+
+ switch (gBattleBufferA[gActiveBank][1])
+ {
+ case 0:
+ {
+ u8 iv;
+
+ SetMonData(&gPlayerParty[a], MON_DATA_SPECIES, (u8 *)&battlePokemon->species);
+ SetMonData(&gPlayerParty[a], MON_DATA_HELD_ITEM, (u8 *)&battlePokemon->item);
+ for (i = 0; i < 4; i++)
+ {
+ SetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + i, (u8 *)&battlePokemon->moves[i]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP1 + i, (u8 *)&battlePokemon->pp[i]);
+ }
+ SetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES, (u8 *)&battlePokemon->ppBonuses);
+ SetMonData(&gPlayerParty[a], MON_DATA_FRIENDSHIP, (u8 *)&battlePokemon->friendship);
+ SetMonData(&gPlayerParty[a], MON_DATA_EXP, (u8 *)&battlePokemon->experience);
+ iv = battlePokemon->hpIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_IV, (u8 *)&iv);
+ iv = battlePokemon->attackIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_IV, (u8 *)&iv);
+ iv = battlePokemon->defenseIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_IV, (u8 *)&iv);
+ iv = battlePokemon->speedIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_IV, (u8 *)&iv);
+ iv = battlePokemon->spAttackIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV, (u8 *)&iv);
+ iv = battlePokemon->spDefenseIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV, (u8 *)&iv);
+ SetMonData(&gPlayerParty[a], MON_DATA_PERSONALITY, (u8 *)&battlePokemon->personality);
+ SetMonData(&gPlayerParty[a], MON_DATA_STATUS, (u8 *)&battlePokemon->status1);
+ SetMonData(&gPlayerParty[a], MON_DATA_LEVEL, (u8 *)&battlePokemon->level);
+ SetMonData(&gPlayerParty[a], MON_DATA_HP, (u8 *)&battlePokemon->hp);
+ SetMonData(&gPlayerParty[a], MON_DATA_MAX_HP, (u8 *)&battlePokemon->maxHP);
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK, (u8 *)&battlePokemon->attack);
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF, (u8 *)&battlePokemon->defense);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD, (u8 *)&battlePokemon->speed);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK, (u8 *)&battlePokemon->spAttack);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF, (u8 *)&battlePokemon->spDefense);
+ }
+ break;
+ case 1:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPECIES, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 2:
+ SetMonData(&gPlayerParty[a], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 3:
+ for (i = 0; i < 4; i++)
+ {
+ SetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + i, (u8 *)&moveData->moves[i]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP1 + i, (u8 *)&moveData->pp[i]);
+ }
+ SetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES, &moveData->ppBonuses);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ SetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + gBattleBufferA[gActiveBank][1] - 4, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 8:
+ SetMonData(&gPlayerParty[a], MON_DATA_PP1, &gBattleBufferA[gActiveBank][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP2, &gBattleBufferA[gActiveBank][4]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP3, &gBattleBufferA[gActiveBank][5]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP4, &gBattleBufferA[gActiveBank][6]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES, &gBattleBufferA[gActiveBank][7]);
+ break;
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ SetMonData(&gPlayerParty[a], MON_DATA_PP1 + gBattleBufferA[gActiveBank][1] - 9, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 17:
+ SetMonData(&gPlayerParty[a], MON_DATA_OT_ID, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 18:
+ SetMonData(&gPlayerParty[a], MON_DATA_EXP, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 19:
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 20:
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 21:
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 22:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 23:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 24:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 25:
+ SetMonData(&gPlayerParty[a], MON_DATA_FRIENDSHIP, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 26:
+ SetMonData(&gPlayerParty[a], MON_DATA_POKERUS, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 27:
+ SetMonData(&gPlayerParty[a], MON_DATA_MET_LOCATION, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 28:
+ SetMonData(&gPlayerParty[a], MON_DATA_MET_LEVEL, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 29:
+ SetMonData(&gPlayerParty[a], MON_DATA_MET_GAME, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 30:
+ SetMonData(&gPlayerParty[a], MON_DATA_POKEBALL, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 31:
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_IV, &gBattleBufferA[gActiveBank][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_IV, &gBattleBufferA[gActiveBank][4]);
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_IV, &gBattleBufferA[gActiveBank][5]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_IV, &gBattleBufferA[gActiveBank][6]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV, &gBattleBufferA[gActiveBank][7]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBank][8]);
+ break;
+ case 32:
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 33:
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 34:
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 35:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 36:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 37:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 38:
+ SetMonData(&gPlayerParty[a], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 39:
+ SetMonData(&gPlayerParty[a], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 40:
+ SetMonData(&gPlayerParty[a], MON_DATA_STATUS, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 41:
+ SetMonData(&gPlayerParty[a], MON_DATA_LEVEL, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 42:
+ SetMonData(&gPlayerParty[a], MON_DATA_HP, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 43:
+ SetMonData(&gPlayerParty[a], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 44:
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 45:
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 46:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 47:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 48:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 49:
+ SetMonData(&gPlayerParty[a], MON_DATA_COOL, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 50:
+ SetMonData(&gPlayerParty[a], MON_DATA_BEAUTY, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 51:
+ SetMonData(&gPlayerParty[a], MON_DATA_CUTE, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 52:
+ SetMonData(&gPlayerParty[a], MON_DATA_SMART, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 53:
+ SetMonData(&gPlayerParty[a], MON_DATA_TOUGH, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 54:
+ SetMonData(&gPlayerParty[a], MON_DATA_SHEEN, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 55:
+ SetMonData(&gPlayerParty[a], MON_DATA_COOL_RIBBON, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 56:
+ SetMonData(&gPlayerParty[a], MON_DATA_BEAUTY_RIBBON, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 57:
+ SetMonData(&gPlayerParty[a], MON_DATA_CUTE_RIBBON, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 58:
+ SetMonData(&gPlayerParty[a], MON_DATA_SMART_RIBBON, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 59:
+ SetMonData(&gPlayerParty[a], MON_DATA_TOUGH_RIBBON, &gBattleBufferA[gActiveBank][3]);
+ break;
+ }
+ sub_80324F8(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+}
+
+void sub_802F7CC(void)
+{
+ u8 *dst = (u8 *)&gPlayerParty[gBattlePartyID[gActiveBank]] + gBattleBufferA[gActiveBank][1];
+ u8 i;
+
+ for (i = 0; i < gBattleBufferA[gActiveBank][2]; i++)
+ dst[i] = gBattleBufferA[gActiveBank][3 + i];
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleLoadPokeSprite(void)
+{
+ sub_80318FC(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+ gSprites[gObjectBankIDs[gActiveBank]].oam.paletteNum = gActiveBank;
+ gBattleBankFunc[gActiveBank] = bx_0802E404;
+}
+
+void PlayerHandleSendOutPoke(void)
+{
+ sub_8032AA8(gActiveBank, gBattleBufferA[gActiveBank][2]);
+ gBattlePartyID[gActiveBank] = gBattleBufferA[gActiveBank][1];
+ sub_80318FC(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+ gActionSelectionCursor[gActiveBank] = 0;
+ gMoveSelectionCursor[gActiveBank] = 0;
+ sub_802F934(gActiveBank, gBattleBufferA[gActiveBank][2]);
+ gBattleBankFunc[gActiveBank] = sub_802D798;
+}
+
+void sub_802F934(u8 bank, u8 b)
+{
+ u16 species;
+
+ sub_8032AA8(bank, b);
+ gBattlePartyID[bank] = gBattleBufferA[bank][1];
+ species = GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_SPECIES);
+ gUnknown_0300434C[bank] = CreateInvisibleSpriteWithCallback(sub_80312F0);
+ GetMonSpriteTemplate_803C56C(species, GetBankIdentity(bank));
+ gObjectBankIDs[bank] = CreateSprite(
+ &gUnknown_02024E8C,
+ sub_8077ABC(bank, 2),
+ sub_8077F68(bank),
+ sub_8079E90(bank));
+ gSprites[gUnknown_0300434C[bank]].data1 = gObjectBankIDs[bank];
+ gSprites[gObjectBankIDs[bank]].data0 = bank;
+ gSprites[gObjectBankIDs[bank]].data2 = species;
+ gSprites[gObjectBankIDs[bank]].oam.paletteNum = bank;
+ StartSpriteAnim(&gSprites[gObjectBankIDs[bank]], gBattleMonForms[bank]);
+ gSprites[gObjectBankIDs[bank]].invisible = TRUE;
+ gSprites[gObjectBankIDs[bank]].callback = SpriteCallbackDummy;
+ gSprites[gUnknown_0300434C[bank]].data0 = sub_8046400(0, 0xFF);
+}
+
+void PlayerHandleReturnPokeToBall(void)
+{
+ if (gBattleBufferA[gActiveBank][1] == 0)
+ {
+ ewram17810[gActiveBank].unk4 = 0;
+ gBattleBankFunc[gActiveBank] = sub_802FB2C;
+ }
+ else
+ {
+ FreeSpriteOamMatrix(&gSprites[gObjectBankIDs[gActiveBank]]);
+ DestroySprite(&gSprites[gObjectBankIDs[gActiveBank]]);
+ sub_8043DB0(gHealthboxIDs[gActiveBank]);
+ PlayerBufferExecCompleted();
+ }
+}
+
+void sub_802FB2C(void)
+{
+ switch (ewram17810[gActiveBank].unk4)
+ {
+ case 0:
+ if (ewram17800[gActiveBank].unk0_2)
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 5);
+ ewram17810[gActiveBank].unk4 = 1;
+ break;
+ case 1:
+ if (!ewram17810[gActiveBank].unk0_6)
+ {
+ ewram17810[gActiveBank].unk4 = 0;
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 1);
+ gBattleBankFunc[gActiveBank] = sub_802DEAC;
+ }
+ }
+}
+
+void PlayerHandleTrainerThrow(void)
+{
+ s16 r7;
+
+ if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
+ {
+ if (GetBankIdentity(gActiveBank) & 2)
+ r7 = 16;
+ else
+ r7 = -16;
+ }
+ else
+ {
+ r7 = 0;
+ }
+ sub_8031AF4(gSaveBlock2.playerGender, gActiveBank);
+ GetMonSpriteTemplate_803C5A0(gSaveBlock2.playerGender, GetBankIdentity(gActiveBank));
+ gObjectBankIDs[gActiveBank] = CreateSprite(
+ &gUnknown_02024E8C,
+ r7 + 80,
+ (8 - gTrainerBackPicCoords[gSaveBlock2.playerGender].coords) * 4 + 80,
+ sub_8079E90(gActiveBank));
+ gSprites[gObjectBankIDs[gActiveBank]].oam.paletteNum = gActiveBank;
+ gSprites[gObjectBankIDs[gActiveBank]].pos2.x = 240;
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = -2;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_80313A0;
+ gBattleBankFunc[gActiveBank] = sub_802D204;
+}
+
+void PlayerHandleTrainerSlide(void)
+{
+ sub_8031AF4(gSaveBlock2.playerGender, gActiveBank);
+ GetMonSpriteTemplate_803C5A0(gSaveBlock2.playerGender, GetBankIdentity(gActiveBank));
+ gObjectBankIDs[gActiveBank] = CreateSprite(
+ &gUnknown_02024E8C,
+ 80,
+ (8 - gTrainerBackPicCoords[gSaveBlock2.playerGender].coords) * 4 + 80,
+ 30);
+ gSprites[gObjectBankIDs[gActiveBank]].oam.paletteNum = gActiveBank;
+ gSprites[gObjectBankIDs[gActiveBank]].pos2.x = -96;
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = 2;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_80313A0;
+ gBattleBankFunc[gActiveBank] = sub_802D23C;
+}
+
+void PlayerHandleTrainerSlideBack(void)
+{
+ oamt_add_pos2_onto_pos1(&gSprites[gObjectBankIDs[gActiveBank]]);
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = 50;
+ gSprites[gObjectBankIDs[gActiveBank]].data2 = -40;
+ gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34;
+ oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], SpriteCallbackDummy);
+ StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], 1);
+ gBattleBankFunc[gActiveBank] = sub_802D274;
+}
+
+void sub_802FE7C(void)
+{
+ if (ewram17810[gActiveBank].unk4 == 0)
+ {
+ if (ewram17800[gActiveBank].unk0_2)
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 5);
+ ewram17810[gActiveBank].unk4++;
+ }
+ else
+ {
+ if (ewram17810[gActiveBank].unk0_6 == 0)
+ {
+ ewram17810[gActiveBank].unk4 = 0;
+ sub_80324F8(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+ PlaySE12WithPanning(SE_POKE_DEAD, -64);
+ gSprites[gObjectBankIDs[gActiveBank]].data1 = 0;
+ gSprites[gObjectBankIDs[gActiveBank]].data2 = 5;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_80105EC;
+ gBattleBankFunc[gActiveBank] = sub_802DE10;
+ }
+ }
+}
+
+void sub_802FF60(void)
+{
+ BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, 0);
+ PlayerBufferExecCompleted();
+}
+
+void sub_802FF80(void)
+{
+ ewram17840.unk8 = 4;
+ gDoingBattleAnim = 1;
+ move_anim_start_t4(gActiveBank, gActiveBank, GetBankByPlayerAI(1), 3);
+ gBattleBankFunc[gActiveBank] = bx_wait_t1;
+}
+
+void PlayerHandleBallThrow(void)
+{
+ u8 var = gBattleBufferA[gActiveBank][1];
+
+ ewram17840.unk8 = var;
+ gDoingBattleAnim = 1;
+ move_anim_start_t4(gActiveBank, gActiveBank, GetBankByPlayerAI(1), 3);
+ gBattleBankFunc[gActiveBank] = bx_wait_t1;
+}
+
+void PlayerHandlePuase(void)
+{
+ u8 var = gBattleBufferA[gActiveBank][1];
+
+ // WTF is this??
+ while (var != 0)
+ var--;
+
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleMoveAnimation(void)
+{
+ if (!mplay_80342A4(gActiveBank))
+ {
+ u16 r0 = gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8);
+
+ gUnknown_0202F7C4 = gBattleBufferA[gActiveBank][3];
+ gMovePowerMoveAnim = gBattleBufferA[gActiveBank][4] | (gBattleBufferA[gActiveBank][5] << 8);
+ gMoveDmgMoveAnim = gBattleBufferA[gActiveBank][6] | (gBattleBufferA[gActiveBank][7] << 8) | (gBattleBufferA[gActiveBank][8] << 16) | (gBattleBufferA[gActiveBank][9] << 24);
+ gHappinessMoveAnim = gBattleBufferA[gActiveBank][10];
+ gWeatherMoveAnim = gBattleBufferA[gActiveBank][12] | (gBattleBufferA[gActiveBank][13] << 8);
+ gDisableStructMoveAnim = (u32 *)&gBattleBufferA[gActiveBank][16];
+ gPID_perBank[gActiveBank] = *gDisableStructMoveAnim;
+ if (sub_8031720(r0, gUnknown_0202F7C4) != 0)
+ {
+ // Dead code. sub_8031720 always returns 0.
+ PlayerBufferExecCompleted();
+ }
+ else
+ {
+ ewram17810[gActiveBank].unk4 = 0;
+ gBattleBankFunc[gActiveBank] = sub_8030190;
+ }
+ }
+}
+
+void sub_8030190(void)
+{
+ u16 r4 = gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8);
+ u8 r7 = gBattleBufferA[gActiveBank][11];
+
+ switch (ewram17810[gActiveBank].unk4)
+ {
+ case 0:
+ if (ewram17800[gActiveBank].unk0_2 == 1 && ewram17800[gActiveBank].unk0_3 == 0)
+ {
+ ewram17800[gActiveBank].unk0_3 = 1;
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 5);
+ }
+ ewram17810[gActiveBank].unk4 = 1;
+ break;
+ case 1:
+ if (ewram17810[gActiveBank].unk0_6 == 0)
+ {
+ sub_80326EC(0);
+ ExecuteMoveAnim(r4);
+ ewram17810[gActiveBank].unk4 = 2;
+ }
+ break;
+ case 2:
+ gAnimScriptCallback();
+ if (!gAnimScriptActive)
+ {
+ sub_80326EC(1);
+ if (ewram17800[gActiveBank].unk0_2 == 1 && r7 < 2)
+ {
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 6);
+ ewram17800[gActiveBank].unk0_3 = 0;
+ }
+ ewram17810[gActiveBank].unk4 = 3;
+ }
+ break;
+ case 3:
+ if (ewram17810[gActiveBank].unk0_6 == 0)
+ {
+ sub_8031F24();
+ sub_80324BC(gActiveBank, gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8));
+ ewram17810[gActiveBank].unk4 = 0;
+ PlayerBufferExecCompleted();
+ }
+ break;
+ }
+}
+
+void PlayerHandlePrintString(void)
+{
+ gUnknown_030042A4 = 0;
+ gUnknown_030042A0 = 0;
+ BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBank][2]);
+ sub_8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 0x90, 2, 15);
+ gBattleBankFunc[gActiveBank] = sub_802DF18;
+}
+
+void PlayerHandlePrintStringPlayerOnly(void)
+{
+ if (GetBankSide(gActiveBank) == 0)
+ PlayerHandlePrintString();
+ else
+ PlayerBufferExecCompleted();
+}
+
+void sub_803037C(void)
+{
int r4;
gUnknown_030042A4 = 0;
@@ -38,20 +1029,479 @@ void sub_803037C(void) {
FillWindowRect(&gUnknown_03004210, 10, 2, 15, 27, 18);
FillWindowRect(&gUnknown_03004210, 10, 2, 35, 16, 38);
- gUnknown_03004330[gUnknown_02024A60] = sub_802C098;
+ gBattleBankFunc[gActiveBank] = sub_802C098;
InitWindow(&gUnknown_03004210, gUnknown_08400CF3, 400, 18, 35);
sub_8002F44(&gUnknown_03004210);
sub_814A5C0(0, 0xFFFF, 12, 11679, 0);
for (r4 = 0; r4 < 4; r4++)
- {
nullsub_8(r4);
- }
- sub_802E3E4(gUnknown_02024E60[gUnknown_02024A60], 0);
+ sub_802E3E4(gActionSelectionCursor[gActiveBank], 0);
- get_battle_strings_((u8 *) gUnknown_08400CA8);
- InitWindow(&gUnknown_03004210, gUnknown_020238CC, SUB_803037C_TILE_DATA_OFFSET, 2, 35);
+ StrCpyDecodeToDisplayedStringBattle((u8 *) gUnknown_08400CA8);
+ InitWindow(&gUnknown_03004210, gDisplayedStringBattle, SUB_803037C_TILE_DATA_OFFSET, 2, 35);
sub_8002F44(&gUnknown_03004210);
}
+
+void nullsub_42()
+{
+}
+
+void sub_8030468(void)
+{
+ sub_814A5C0(0, 0xFFFF, 12, 0x2D9F, 0);
+ sub_80304A8();
+ gBattleBankFunc[gActiveBank] = sub_802C68C;
+}
+
+void sub_80304A8(void)
+{
+ gUnknown_030042A4 = 0;
+ gUnknown_030042A0 = 320;
+ sub_802E1B0();
+ gUnknown_03004344 = 0xFF;
+ sub_802E3B4(gMoveSelectionCursor[gActiveBank], 0);
+ if (gBattleBufferA[gActiveBank][2] != 1)
+ {
+ InitWindow(&gUnknown_03004210, gUnknown_08400D38, 656, 23, 55);
+ sub_8002F44(&gUnknown_03004210);
+ }
+ sub_802E220();
+ sub_802E2D4();
+}
+
+void PlayerHandleOpenBag(void)
+{
+ s32 i;
+
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
+ gBattleBankFunc[gActiveBank] = sub_802E004;
+ gBankInMenu = gActiveBank;
+ for (i = 0; i < 3; i++)
+ gUnknown_02038470[i] = gBattleBufferA[gActiveBank][1 + i];
+}
+
+void sub_8030594(void)
+{
+ s32 i;
+
+ gUnknown_0300434C[gActiveBank] = CreateTask(TaskDummy, 0xFF);
+ gTasks[gUnknown_0300434C[gActiveBank]].data[0] = gBattleBufferA[gActiveBank][1] & 0xF;
+ ewram[0x16054] = gBattleBufferA[gActiveBank][1] >> 4;
+ ewram[0x1609D] = gBattleBufferA[gActiveBank][2];
+ ewram[0x160C0] = gBattleBufferA[gActiveBank][3];
+ for (i = 0; i < 3; i++)
+ gUnknown_02038470[i] = gBattleBufferA[gActiveBank][4 + i];
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
+ gBattleBankFunc[gActiveBank] = sub_802DF30;
+ gBankInMenu = gActiveBank;
+}
+
+void sub_8030674(void)
+{
+ sub_80325B8();
+ BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, 0);
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleHealthBarUpdate(void)
+{
+ s16 r7;
+
+ load_gfxc_health_bar(0);
+ r7 = gBattleBufferA[gActiveBank][2] | (gBattleBufferA[gActiveBank][3] << 8);
+ if (r7 != 0x7FFF)
+ {
+ u32 maxHP = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_MAX_HP);
+ u32 curHP = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_HP);
+
+ sub_8043D84(gActiveBank, gHealthboxIDs[gActiveBank], maxHP, curHP, r7);
+ }
+ else
+ {
+ u32 maxHP = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_MAX_HP);
+
+ sub_8043D84(gActiveBank, gHealthboxIDs[gActiveBank], maxHP, 0, r7);
+ sub_80440EC(gHealthboxIDs[gActiveBank], 0, 0);
+ }
+ gBattleBankFunc[gActiveBank] = bx_t1_healthbar_update;
+}
+
+void PlayerHandleExpBarUpdate(void)
+{
+ u8 r7 = gBattleBufferA[gActiveBank][1];
+
+ if (GetMonData(&gPlayerParty[r7], MON_DATA_LEVEL) >= 100)
+ {
+ PlayerBufferExecCompleted();
+ }
+ else
+ {
+ u16 r4;
+ u8 taskId;
+
+ load_gfxc_health_bar(1);
+ GetMonData(&gPlayerParty[r7], MON_DATA_SPECIES); // unused return value
+ r4 = gBattleBufferA[gActiveBank][2] | (gBattleBufferA[gActiveBank][3] << 8);
+ taskId = CreateTask(sub_802D924, 10);
+ gTasks[taskId].data[0] = r7;
+ gTasks[taskId].data[1] = r4;
+ gTasks[taskId].data[2] = gActiveBank;
+ gBattleBankFunc[gActiveBank] = nullsub_91;
+ }
+}
+
+void PlayerHandleStatusIconUpdate(void)
+{
+ if (!mplay_80342A4(gActiveBank))
+ {
+ sub_8045A5C(gHealthboxIDs[gActiveBank], &gPlayerParty[gBattlePartyID[gActiveBank]], 9);
+ ewram17810[gActiveBank].unk0_4 = 0;
+ gBattleBankFunc[gActiveBank] = sub_802E434;
+ }
+}
+
+void PlayerHandleStatusAnimation(void)
+{
+ if (!mplay_80342A4(gActiveBank))
+ {
+ move_anim_start_t2_for_situation(
+ gBattleBufferA[gActiveBank][1],
+ gBattleBufferA[gActiveBank][2] | (gBattleBufferA[gActiveBank][3] << 8) | (gBattleBufferA[gActiveBank][4] << 16) | (gBattleBufferA[gActiveBank][5] << 24));
+ gBattleBankFunc[gActiveBank] = sub_802E434;
+ }
+}
+
+void PlayerHandleStatusXor(void)
+{
+ u8 val = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_STATUS) ^ gBattleBufferA[gActiveBank][1];
+
+ SetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_STATUS, &val);
+ PlayerBufferExecCompleted();
+}
+
+void sub_803097C(void)
+{
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleDMATransfer(void)
+{
+ u32 val1 = gBattleBufferA[gActiveBank][1]
+ | (gBattleBufferA[gActiveBank][2] << 8)
+ | (gBattleBufferA[gActiveBank][3] << 16)
+ | (gBattleBufferA[gActiveBank][4] << 24);
+ u16 val2 = gBattleBufferA[gActiveBank][5] | (gBattleBufferA[gActiveBank][6] << 8);
+
+ const u8 *src = &gBattleBufferA[gActiveBank][7];
+ u8 *dst = (u8 *)val1;
+ u32 size = val2;
+
+ while (1)
+ {
+ if (size <= 0x1000)
+ {
+ DmaCopy16(3, src, dst, size);
+ break;
+ }
+ DmaCopy16(3, src, dst, 0x1000);
+ src += 0x1000;
+ dst += 0x1000;
+ size -= 0x1000;
+ }
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030A3C(void)
+{
+ PlayBGM(gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8));
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030A6C(void)
+{
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030A78(void)
+{
+ dp01_build_cmdbuf_x21_a_bb(1, 0, 0);
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030A8C(void)
+{
+ dp01_build_cmdbuf_x22_a_three_bytes(1, 0, 0);
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030AA0(void)
+{
+ dp01_build_cmdbuf_x23_aa_0(1, 0);
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030AB4(void)
+{
+ dp01_build_cmdbuf_x24_aa_0(1, 0);
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030AC8(void)
+{
+ gUnknown_020238C8.unk0_0 = 0;
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030AE4(void)
+{
+ gUnknown_020238C8.unk0_0 = gBattleBufferA[gActiveBank][1];
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030B1C(void)
+{
+ gUnknown_020238C8.unk0_7 = 0;
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030B34(void)
+{
+ gUnknown_020238C8.unk0_7 ^= 1;
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleHitAnimation(void)
+{
+ if (gSprites[gObjectBankIDs[gActiveBank]].invisible == TRUE)
+ {
+ PlayerBufferExecCompleted();
+ }
+ else
+ {
+ gDoingBattleAnim = 1;
+ gSprites[gObjectBankIDs[gActiveBank]].data1 = 0;
+ sub_8047858(gActiveBank);
+ gBattleBankFunc[gActiveBank] = bx_blink_t1;
+ }
+}
+
+void sub_8030BCC(void)
+{
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleEffectivenessSound(void)
+{
+ s8 pan;
+
+ if (GetBankSide(gActiveBank) == 0)
+ pan = -64;
+ else
+ pan = 63;
+ PlaySE12WithPanning(gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8), pan);
+ PlayerBufferExecCompleted();
+}
+
+void sub_8030C1C(void)
+{
+ PlayFanfare(gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8));
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleFaintingCry(void)
+{
+ u16 species = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES);
+
+ PlayCry3(species, -25, 5);
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleIntroSlide(void)
+{
+ sub_80E43C0(gBattleBufferA[gActiveBank][1]);
+ gUnknown_02024DE8 |= 1;
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleTrainerBallThrow(void)
+{
+ u8 paletteNum;
+ u8 taskId;
+
+ oamt_add_pos2_onto_pos1(&gSprites[gObjectBankIDs[gActiveBank]]);
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = 50;
+ gSprites[gObjectBankIDs[gActiveBank]].data2 = -40;
+ gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34;
+ gSprites[gObjectBankIDs[gActiveBank]].data5 = gActiveBank;
+ oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], sub_8030E38);
+ StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], 1);
+ paletteNum = AllocSpritePalette(0xD6F8);
+ LoadCompressedPalette(gTrainerBackPicPaletteTable[gSaveBlock2.playerGender].data, 0x100 + paletteNum * 16, 32);
+ gSprites[gObjectBankIDs[gActiveBank]].oam.paletteNum = paletteNum;
+ taskId = CreateTask(task05_08033660, 5);
+ gTasks[taskId].data[0] = gActiveBank;
+ if (ewram17810[gActiveBank].unk0_0)
+ gTasks[gUnknown_02024E68[gActiveBank]].func = sub_8044CA0;
+ ewram17810[4].unk9 |= 1;
+ gBattleBankFunc[gActiveBank] = nullsub_91;
+}
+
+void sub_8030E38(struct Sprite *sprite)
+{
+ u8 r4 = sprite->data5;
+
+ FreeSpriteOamMatrix(sprite);
+ FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(sprite->oam.paletteNum));
+ DestroySprite(sprite);
+ sub_80318FC(&gPlayerParty[gBattlePartyID[r4]], r4);
+ StartSpriteAnim(&gSprites[gObjectBankIDs[r4]], 0);
+}
+
+void task05_08033660(u8 taskId)
+{
+ if (gTasks[taskId].data[1] < 31)
+ {
+ gTasks[taskId].data[1]++;
+ }
+ else
+ {
+ u8 savedActiveBank = gActiveBank;
+
+ gActiveBank = gTasks[taskId].data[0];
+ if (!IsDoubleBattle() || (gBattleTypeFlags & 0x40))
+ {
+ gBattleBufferA[gActiveBank][1] = gBattlePartyID[gActiveBank];
+ sub_802F934(gActiveBank, 0);
+ }
+ else
+ {
+ gBattleBufferA[gActiveBank][1] = gBattlePartyID[gActiveBank];
+ sub_802F934(gActiveBank, 0);
+ gActiveBank ^= 2;
+ gBattleBufferA[gActiveBank][1] = gBattlePartyID[gActiveBank];
+ sub_80318FC(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+ sub_802F934(gActiveBank, 0);
+ gActiveBank ^= 2;
+ }
+ gBattleBankFunc[gActiveBank] = sub_802D500;
+ gActiveBank = savedActiveBank;
+ DestroyTask(taskId);
+ }
+}
+
+void sub_8030FAC(void)
+{
+ if (gBattleBufferA[gActiveBank][1] != 0 && GetBankSide(gActiveBank) == 0)
+ {
+ PlayerBufferExecCompleted();
+ }
+ else
+ {
+ ewram17810[gActiveBank].unk0_0 = 1;
+ gUnknown_02024E68[gActiveBank] = sub_8044804(gActiveBank, (struct BattleInterfaceStruct2 *)&gBattleBufferA[gActiveBank][4], gBattleBufferA[gActiveBank][1], gBattleBufferA[gActiveBank][2]);
+ ewram17810[gActiveBank].unk5 = 0;
+ if (gBattleBufferA[gActiveBank][2] != 0)
+ ewram17810[gActiveBank].unk5 = 0x5D;
+ gBattleBankFunc[gActiveBank] = sub_8031064;
+ }
+}
+
+void sub_8031064(void)
+{
+ if (ewram17810[gActiveBank].unk5++ > 0x5C)
+ {
+ ewram17810[gActiveBank].unk5 = 0;
+ PlayerBufferExecCompleted();
+ }
+}
+
+void sub_80310A4(void)
+{
+ if (ewram17810[gActiveBank].unk0_0)
+ gTasks[gUnknown_02024E68[gActiveBank]].func = sub_8044CA0;
+ PlayerBufferExecCompleted();
+}
+
+void sub_80310F0(void)
+{
+ dp11b_obj_free(gActiveBank, 1);
+ dp11b_obj_free(gActiveBank, 0);
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleSpriteInvisibility(void)
+{
+ if (sub_8078874(gActiveBank))
+ {
+ gSprites[gObjectBankIDs[gActiveBank]].invisible = gBattleBufferA[gActiveBank][1];
+ sub_8031F88(gActiveBank);
+ }
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleBattleAnimation(void)
+{
+ if (!mplay_80342A4(gActiveBank))
+ {
+ u8 val2 = gBattleBufferA[gActiveBank][1];
+ u16 val = gBattleBufferA[gActiveBank][2] | (gBattleBufferA[gActiveBank][3] << 8);
+
+ if (move_anim_start_t3(gActiveBank, gActiveBank, gActiveBank, val2, val))
+ PlayerBufferExecCompleted();
+ else
+ gBattleBankFunc[gActiveBank] = sub_802E460;
+ }
+}
+
+void PlayerHandleLinkStandbyMsg(void)
+{
+ switch (gBattleBufferA[gActiveBank][1])
+ {
+ case 0:
+ b_link_standby_message();
+ // fall through
+ case 1:
+ dp11b_obj_free(gActiveBank, 1);
+ dp11b_obj_free(gActiveBank, 0);
+ break;
+ case 2:
+ b_link_standby_message();
+ break;
+ }
+ PlayerBufferExecCompleted();
+}
+
+void PlayerHandleResetActionMoveSelection(void)
+{
+ switch (gBattleBufferA[gActiveBank][1])
+ {
+ case 0:
+ gActionSelectionCursor[gActiveBank] = 0;
+ gMoveSelectionCursor[gActiveBank] = 0;
+ break;
+ case 1:
+ gActionSelectionCursor[gActiveBank] = 0;
+ break;
+ case 2:
+ gMoveSelectionCursor[gActiveBank] = 0;
+ break;
+ }
+ PlayerBufferExecCompleted();
+}
+
+void sub_80312A0(void)
+{
+ gBattleOutcome = gBattleBufferA[gActiveBank][1];
+ FadeOutMapMusic(5);
+ BeginFastPaletteFade(3);
+ PlayerBufferExecCompleted();
+ gBattleBankFunc[gActiveBank] = sub_802D18C;
+}
+
+void nullsub_43(void)
+{
+}
diff --git a/src/battle_7.c b/src/battle_7.c
index 50f348406..a93237608 100644
--- a/src/battle_7.c
+++ b/src/battle_7.c
@@ -1,5 +1,4 @@
#include "global.h"
-#include "asm.h"
#include "battle.h"
#include "battle_anim.h"
#include "battle_interface.h"
@@ -10,6 +9,8 @@
#include "m4a.h"
#include "palette.h"
#include "pokemon.h"
+#include "rom_8077ABC.h"
+#include "rom_8094928.h"
#include "songs.h"
#include "sound.h"
#include "species.h"
@@ -28,19 +29,19 @@ struct Struct2019348
u32 unk10;
};
-extern u8 gUnknown_02023A60[][0x200];
-extern u8 gUnknown_02024A60;
-extern u32 gUnknown_02024A64;
-extern u8 gUnknown_02024A68;
-extern u16 gUnknown_02024A6A[];
-extern u8 gUnknown_02024A72[];
-extern u8 gUnknown_02024BE0[];
+extern u8 gBattleBufferA[][0x200];
+extern u8 gActiveBank;
+extern u32 gBattleExecBuffer;
+extern u8 gNoOfAllBanks;
+extern u16 gBattlePartyID[];
+extern u8 gBanksBySide[];
+extern u8 gObjectBankIDs[];
extern u16 gUnknown_02024DE8;
-extern u8 gUnknown_02024E6D;
-extern u32 gUnknown_02024E70[];
+extern u8 gDoingBattleAnim;
+extern u32 gPID_perBank[];
extern struct Window gUnknown_03004210;
-extern void (*gUnknown_03004330[])(void);
-extern u8 gUnknown_03004340[];
+extern void (*gBattleBankFunc[])(void);
+extern u8 gHealthboxIDs[];
extern u8 gUnknown_0300434C[];
extern struct MusicPlayerInfo gMPlay_SE1;
extern struct MusicPlayerInfo gMPlay_SE2;
@@ -54,21 +55,21 @@ extern void (*gAnimScriptCallback)(void);
extern u8 gAnimScriptActive;
extern const u8 *const gBattleAnims_Unknown1[];
extern const u8 *const gBattleAnims_Unknown2[];
-extern const struct SpriteSheet gTrainerFrontPicTable[];
+extern const struct CompressedSpriteSheet gTrainerFrontPicTable[];
extern const struct MonCoords gTrainerFrontPicCoords[];
-extern const struct SpritePalette gTrainerFrontPicPaletteTable[];
+extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
extern const u8 gSubstituteDollTilemap[];
extern const u8 gSubstituteDollGfx[];
extern const u8 gSubstituteDollPal[];
-extern const struct SpriteSheet gUnknown_081FAF24;
+extern const struct CompressedSpriteSheet gUnknown_081FAF24;
extern const struct SpriteTemplate gSpriteTemplate_81FAF34;
-extern void (*const gUnknown_081FAF5C[])(void);
-extern const struct SpriteSheet gUnknown_0820A47C;
-extern const struct SpriteSheet gUnknown_0820A484;
-extern const struct SpriteSheet gUnknown_0820A48C[];
-extern const struct SpriteSheet gUnknown_0820A49C[];
-extern const struct SpriteSheet gUnknown_0820A4AC;
-extern const struct SpriteSheet gUnknown_0820A4B4[];
+extern void (*const gOpponentBufferCommands[])(void);
+extern const struct CompressedSpriteSheet gUnknown_0820A47C;
+extern const struct CompressedSpriteSheet gUnknown_0820A484;
+extern const struct CompressedSpriteSheet gUnknown_0820A48C[];
+extern const struct CompressedSpriteSheet gUnknown_0820A49C[];
+extern const struct CompressedSpriteSheet gUnknown_0820A4AC;
+extern const struct CompressedSpriteSheet gUnknown_0820A4B4[];
extern const struct SpritePalette gUnknown_0820A4D4[];
extern const u8 gUnknown_08D09C48[];
@@ -83,10 +84,8 @@ extern u8 sub_8078874(u8);
extern u8 sub_8077F68(u8);
extern u8 sub_8077F7C(u8);
extern void sub_8094958(void);
-extern const u16 *pokemon_get_pal(struct Pokemon *);
extern void sub_80105DC(struct Sprite *);
extern void move_anim_start_t2();
-extern const u16 *species_and_otid_get_pal();
void sub_80315E8(u8);
u8 sub_803163C(u8);
@@ -97,9 +96,9 @@ void sub_80324E0(u8 a);
void sub_80327CC(void);
void sub_8032978(struct Sprite *);
void sub_80328A4(struct Sprite *);
-void sub_8032AFC(void);
+void OpponentBufferRunCommand(void);
void sub_80332D0(void);
-void sub_80334EC(void);
+void OpponentBufferExecCompleted(void);
void sub_80312F0(struct Sprite *sprite)
{
@@ -141,36 +140,36 @@ void sub_80313A0(struct Sprite *sprite)
void move_anim_start_t2_for_situation(u8 a, u32 b)
{
- ewram17810[gUnknown_02024A60].unk0_4 = 1;
+ ewram17810[gActiveBank].unk0_4 = 1;
if (a == 0)
{
if (b == 0x20)
- move_anim_start_t2(gUnknown_02024A60, 6);
+ move_anim_start_t2(gActiveBank, 6);
else if (b == 8 || (b & 0x80))
- move_anim_start_t2(gUnknown_02024A60, 0);
+ move_anim_start_t2(gActiveBank, 0);
else if (b == 0x10)
- move_anim_start_t2(gUnknown_02024A60, 2);
+ move_anim_start_t2(gActiveBank, 2);
else if (b & 7)
- move_anim_start_t2(gUnknown_02024A60, 4);
+ move_anim_start_t2(gActiveBank, 4);
else if (b == 0x40)
- move_anim_start_t2(gUnknown_02024A60, 5);
+ move_anim_start_t2(gActiveBank, 5);
else
- ewram17810[gUnknown_02024A60].unk0_4 = 0;
+ ewram17810[gActiveBank].unk0_4 = 0;
}
else
{
if (b & 0x000F0000)
- move_anim_start_t2(gUnknown_02024A60, 3);
+ move_anim_start_t2(gActiveBank, 3);
else if (b & 7)
- move_anim_start_t2(gUnknown_02024A60, 1);
+ move_anim_start_t2(gActiveBank, 1);
else if (b & 0x10000000)
- move_anim_start_t2(gUnknown_02024A60, 7);
+ move_anim_start_t2(gActiveBank, 7);
else if (b & 0x08000000)
- move_anim_start_t2(gUnknown_02024A60, 8);
+ move_anim_start_t2(gActiveBank, 8);
else if (b & 0x0000E000)
- move_anim_start_t2(gUnknown_02024A60, 9);
+ move_anim_start_t2(gActiveBank, 9);
else
- ewram17810[gUnknown_02024A60].unk0_4 = 0;
+ ewram17810[gActiveBank].unk0_4 = 0;
}
}
@@ -185,9 +184,9 @@ bool8 move_anim_start_t3(u8 a, u8 b, u8 c, u8 d, u16 e)
}
if (ewram17800[a].unk0_2 && sub_803163C(d) == 0)
return TRUE;
- if (ewram17800[a].unk0_2 && d == 2 && gSprites[gUnknown_02024BE0[a]].invisible)
+ if (ewram17800[a].unk0_2 && d == 2 && gSprites[gObjectBankIDs[a]].invisible)
{
- refresh_graphics_maybe(a, 1, gUnknown_02024BE0[a]);
+ refresh_graphics_maybe(a, 1, gObjectBankIDs[a]);
sub_80324E0(a);
return TRUE;
}
@@ -261,7 +260,7 @@ bool8 mplay_80342A4(u8 a)
if (IsSEPlaying())
{
ewram17810[a].unk8++;
- if (ewram17810[gUnknown_02024A60].unk8 < 30)
+ if (ewram17810[gActiveBank].unk8 < 30)
return TRUE;
m4aMPlayStop(&gMPlay_SE1);
m4aMPlayStop(&gMPlay_SE2);
@@ -282,7 +281,7 @@ void sub_8031794(struct Pokemon *pkmn, u8 b)
u32 otId;
u8 var;
u16 paletteOffset;
- const u16 *palette;
+ const u8 *lzPaletteData;
personalityValue = GetMonData(pkmn, MON_DATA_PERSONALITY);
if (ewram17800[b].unk2 == 0)
@@ -293,10 +292,10 @@ void sub_8031794(struct Pokemon *pkmn, u8 b)
else
{
species = ewram17800[b].unk2;
- r7 = gUnknown_02024E70[b];
+ r7 = gPID_perBank[b];
}
otId = GetMonData(pkmn, MON_DATA_OT_ID);
- var = battle_get_per_side_status(b);
+ var = GetBankIdentity(b);
HandleLoadSpecialPokePic(
&gMonFrontPicTable[species],
gMonFrontPicCoords[species].coords,
@@ -307,16 +306,16 @@ void sub_8031794(struct Pokemon *pkmn, u8 b)
r7);
paletteOffset = 0x100 + b * 16;
if (ewram17800[b].unk2 == 0)
- palette = pokemon_get_pal(pkmn);
+ lzPaletteData = pokemon_get_pal(pkmn);
else
- palette = species_and_otid_get_pal(species, otId, personalityValue);
- sub_800D238(palette, ewram);
+ lzPaletteData = species_and_otid_get_pal(species, otId, personalityValue);
+ sub_800D238(lzPaletteData, ewram);
LoadPalette(ewram, paletteOffset, 0x20);
LoadPalette(ewram, 0x80 + b * 16, 0x20);
if (species == SPECIES_CASTFORM)
{
paletteOffset = 0x100 + b * 16;
- sub_800D238(palette, ewram + 0x16400);
+ sub_800D238(lzPaletteData, ewram + 0x16400);
LoadPalette(ewram + 0x16400 + gBattleMonForms[b] * 32, paletteOffset, 0x20);
}
if (ewram17800[b].unk2 != 0)
@@ -334,7 +333,7 @@ void sub_80318FC(struct Pokemon *pkmn, u8 b)
u32 otId;
u8 var;
u16 paletteOffset;
- const u16 *palette;
+ const u8 *lzPaletteData;
personalityValue = GetMonData(pkmn, MON_DATA_PERSONALITY);
if (ewram17800[b].unk2 == 0)
@@ -345,10 +344,10 @@ void sub_80318FC(struct Pokemon *pkmn, u8 b)
else
{
species = ewram17800[b].unk2;
- r7 = gUnknown_02024E70[b];
+ r7 = gPID_perBank[b];
}
otId = GetMonData(pkmn, MON_DATA_OT_ID);
- var = battle_get_per_side_status(b);
+ var = GetBankIdentity(b);
HandleLoadSpecialPokePic(
&gMonBackPicTable[species],
gMonBackPicCoords[species].coords,
@@ -359,16 +358,16 @@ void sub_80318FC(struct Pokemon *pkmn, u8 b)
r7);
paletteOffset = 0x100 + b * 16;
if (ewram17800[b].unk2 == 0)
- palette = pokemon_get_pal(pkmn);
+ lzPaletteData = pokemon_get_pal(pkmn);
else
- palette = species_and_otid_get_pal(species, otId, personalityValue);
- sub_800D238(palette, ewram);
+ lzPaletteData = species_and_otid_get_pal(species, otId, personalityValue);
+ sub_800D238(lzPaletteData, ewram);
LoadPalette(ewram, paletteOffset, 0x20);
LoadPalette(ewram, 0x80 + b * 16, 0x20);
if (species == SPECIES_CASTFORM)
{
paletteOffset = 0x100 + b * 16;
- sub_800D238(palette, ewram + 0x16400);
+ sub_800D238(lzPaletteData, ewram + 0x16400);
LoadPalette(ewram + 0x16400 + gBattleMonForms[b] * 32, paletteOffset, 0x20);
}
if (ewram17800[b].unk2 != 0)
@@ -389,9 +388,9 @@ void nullsub_9(u16 unused)
void sub_8031A6C(u16 a, u8 b)
{
u8 status;
- struct SpriteSheet spriteSheet;
+ struct CompressedSpriteSheet spriteSheet;
- status = battle_get_per_side_status(b);
+ status = GetBankIdentity(b);
DecompressPicFromTable_2(
&gTrainerFrontPicTable[a],
gTrainerFrontPicCoords[a].coords,
@@ -410,7 +409,7 @@ void sub_8031AF4(u16 a, u8 b)
{
u8 status;
- status = battle_get_per_side_status(b);
+ status = GetBankIdentity(b);
DecompressPicFromTable_2(
&gTrainerBackPicTable[a],
gTrainerBackPicCoords[a].coords,
@@ -453,7 +452,7 @@ void unref_sub_8031BA0(void)
count = 4;
}
for (i = 0; i < count; i++)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gUnknown_02024A72[i]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[i]]);
}
bool8 sub_8031C30(u8 a)
@@ -479,9 +478,9 @@ bool8 sub_8031C30(u8 a)
else if (a == 3)
LoadCompressedObjectPic(&gUnknown_0820A484);
else if (a == 4)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gUnknown_02024A72[0]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[0]]);
else if (a == 5)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gUnknown_02024A72[1]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[1]]);
else
retVal = TRUE;
}
@@ -496,13 +495,13 @@ bool8 sub_8031C30(u8 a)
else if (a == 5)
LoadCompressedObjectPic(&gUnknown_0820A49C[1]);
else if (a == 6)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gUnknown_02024A72[0]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[0]]);
else if (a == 7)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gUnknown_02024A72[1]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[1]]);
else if (a == 8)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gUnknown_02024A72[2]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[2]]);
else if (a == 9)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gUnknown_02024A72[3]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[3]]);
else
retVal = TRUE;
}
@@ -541,11 +540,11 @@ u8 battle_load_something(u8 *pState, u8 *b)
break;
case 3:
if ((gBattleTypeFlags & 0x80) && *b == 0)
- gUnknown_03004340[*b] = battle_make_oam_safari_battle();
+ gHealthboxIDs[*b] = battle_make_oam_safari_battle();
else
- gUnknown_03004340[*b] = battle_make_oam_normal_battle(*b);
+ gHealthboxIDs[*b] = battle_make_oam_normal_battle(*b);
(*b)++;
- if (*b == gUnknown_02024A68)
+ if (*b == gNoOfAllBanks)
{
*b = 0;
(*pState)++;
@@ -553,30 +552,30 @@ u8 battle_load_something(u8 *pState, u8 *b)
break;
case 4:
sub_8043F44(*b);
- if (gUnknown_02024A72[*b] <= 1)
- nullsub_11(gUnknown_03004340[*b], 0);
+ if (gBanksBySide[*b] <= 1)
+ nullsub_11(gHealthboxIDs[*b], 0);
else
- nullsub_11(gUnknown_03004340[*b], 1);
+ nullsub_11(gHealthboxIDs[*b], 1);
(*b)++;
- if (*b == gUnknown_02024A68)
+ if (*b == gNoOfAllBanks)
{
*b = 0;
(*pState)++;
}
break;
case 5:
- if (battle_side_get_owner(*b) == 0)
+ if (GetBankSide(*b) == 0)
{
if (!(gBattleTypeFlags & 0x80))
- sub_8045A5C(gUnknown_03004340[*b], &gPlayerParty[gUnknown_02024A6A[*b]], 0);
+ sub_8045A5C(gHealthboxIDs[*b], &gPlayerParty[gBattlePartyID[*b]], 0);
}
else
{
- sub_8045A5C(gUnknown_03004340[*b], &gEnemyParty[gUnknown_02024A6A[*b]], 0);
+ sub_8045A5C(gHealthboxIDs[*b], &gEnemyParty[gBattlePartyID[*b]], 0);
}
- sub_8043DB0(gUnknown_03004340[*b]);
+ sub_8043DB0(gHealthboxIDs[*b]);
(*b)++;
- if (*b == gUnknown_02024A68)
+ if (*b == gNoOfAllBanks)
{
*b = 0;
(*pState)++;
@@ -607,13 +606,13 @@ void sub_8031F24(void)
{
s32 i;
- for (i = 0; i < gUnknown_02024A68; i++)
- ewram17800[i].unk0_0 = gSprites[gUnknown_02024BE0[i]].invisible;
+ for (i = 0; i < gNoOfAllBanks; i++)
+ ewram17800[i].unk0_0 = gSprites[gObjectBankIDs[i]].invisible;
}
void sub_8031F88(u8 a)
{
- ewram17800[a].unk0_0 = gSprites[gUnknown_02024BE0[a]].invisible;
+ ewram17800[a].unk0_0 = gSprites[gObjectBankIDs[a]].invisible;
}
void sub_8031FC4(u8 a, u8 b, bool8 c)
@@ -623,11 +622,11 @@ void sub_8031FC4(u8 a, u8 b, bool8 c)
u32 personalityValue;
u32 otId;
u8 r10;
- const u16 *palette;
+ const u8 *lzPaletteData;
if (c)
{
- StartSpriteAnim(&gSprites[gUnknown_02024BE0[a]], ewram17840.unk0);
+ StartSpriteAnim(&gSprites[gObjectBankIDs[a]], ewram17840.unk0);
paletteOffset = 0x100 + a * 16;
LoadPalette(ewram + 0x16400 + ewram17840.unk0 * 32, paletteOffset, 32);
gBattleMonForms[a] = ewram17840.unk0;
@@ -636,7 +635,7 @@ void sub_8031FC4(u8 a, u8 b, bool8 c)
BlendPalette(paletteOffset, 16, 6, 0x7FFF);
CpuCopy32(gPlttBufferFaded + paletteOffset, gPlttBufferUnfaded + paletteOffset, 32);
}
- gSprites[gUnknown_02024BE0[a]].pos1.y = sub_8077F68(a);
+ gSprites[gObjectBankIDs[a]].pos1.y = sub_8077F68(a);
}
else
{
@@ -660,15 +659,15 @@ void sub_8031FC4(u8 a, u8 b, bool8 c)
}
else
{
- r10 = battle_get_per_side_status(a);
- if (battle_side_get_owner(b) == 1)
- species = GetMonData(&gEnemyParty[gUnknown_02024A6A[b]], MON_DATA_SPECIES);
+ r10 = GetBankIdentity(a);
+ if (GetBankSide(b) == 1)
+ species = GetMonData(&gEnemyParty[gBattlePartyID[b]], MON_DATA_SPECIES);
else
- species = GetMonData(&gPlayerParty[gUnknown_02024A6A[b]], MON_DATA_SPECIES);
- if (battle_side_get_owner(a) == 0)
+ species = GetMonData(&gPlayerParty[gBattlePartyID[b]], MON_DATA_SPECIES);
+ if (GetBankSide(a) == 0)
{
- personalityValue = GetMonData(&gPlayerParty[gUnknown_02024A6A[a]], MON_DATA_PERSONALITY);
- otId = GetMonData(&gPlayerParty[gUnknown_02024A6A[a]], MON_DATA_OT_ID);
+ personalityValue = GetMonData(&gPlayerParty[gBattlePartyID[a]], MON_DATA_PERSONALITY);
+ otId = GetMonData(&gPlayerParty[gBattlePartyID[a]], MON_DATA_OT_ID);
HandleLoadSpecialPokePic(
&gMonBackPicTable[species],
gMonBackPicCoords[species].coords,
@@ -676,12 +675,12 @@ void sub_8031FC4(u8 a, u8 b, bool8 c)
0x02000000,
gUnknown_081FAF4C[r10],
species,
- gUnknown_02024E70[a]);
+ gPID_perBank[a]);
}
else
{
- personalityValue = GetMonData(&gEnemyParty[gUnknown_02024A6A[a]], MON_DATA_PERSONALITY);
- otId = GetMonData(&gEnemyParty[gUnknown_02024A6A[a]], MON_DATA_OT_ID);
+ personalityValue = GetMonData(&gEnemyParty[gBattlePartyID[a]], MON_DATA_PERSONALITY);
+ otId = GetMonData(&gEnemyParty[gBattlePartyID[a]], MON_DATA_OT_ID);
HandleLoadSpecialPokePic(
&gMonFrontPicTable[species],
gMonFrontPicCoords[species].coords,
@@ -689,21 +688,21 @@ void sub_8031FC4(u8 a, u8 b, bool8 c)
0x02000000,
gUnknown_081FAF4C[r10],
species,
- gUnknown_02024E70[a]);
+ gPID_perBank[a]);
}
}
src = gUnknown_081FAF4C[r10];
- dst = (void *)(VRAM + 0x10000 + gSprites[gUnknown_02024BE0[a]].oam.tileNum * 32);
+ dst = (void *)(VRAM + 0x10000 + gSprites[gObjectBankIDs[a]].oam.tileNum * 32);
DmaCopy32(3, src, dst, 0x800);
paletteOffset = 0x100 + a * 16;
- palette = species_and_otid_get_pal(species, otId, personalityValue);
- sub_800D238(palette, ewram);
+ lzPaletteData = species_and_otid_get_pal(species, otId, personalityValue);
+ sub_800D238(lzPaletteData, ewram);
LoadPalette(ewram, paletteOffset, 32);
if (species == SPECIES_CASTFORM)
{
u16 *paletteSrc = (u16 *)(ewram + 0x16400);
- sub_800D238(palette, paletteSrc);
+ sub_800D238(lzPaletteData, paletteSrc);
LoadPalette(paletteSrc + gBattleMonForms[b] * 16, paletteOffset, 32);
}
BlendPalette(paletteOffset, 16, 6, 0x7FFF);
@@ -713,8 +712,8 @@ void sub_8031FC4(u8 a, u8 b, bool8 c)
ewram17800[a].unk2 = species;
gBattleMonForms[a] = gBattleMonForms[b];
}
- gSprites[gUnknown_02024BE0[a]].pos1.y = sub_8077F68(a);
- StartSpriteAnim(&gSprites[gUnknown_02024BE0[a]], gBattleMonForms[a]);
+ gSprites[gObjectBankIDs[a]].pos1.y = sub_8077F68(a);
+ StartSpriteAnim(&gSprites[gObjectBankIDs[a]], gBattleMonForms[a]);
}
}
@@ -731,10 +730,10 @@ void sub_8032350(u8 a, u8 b)
if (IsContest())
r4 = 0;
else
- r4 = battle_get_per_side_status(a);
+ r4 = GetBankIdentity(a);
if (IsContest())
LZDecompressVram(gSubstituteDollTilemap, gUnknown_081FAF4C[r4]);
- else if (battle_side_get_owner(a) != 0)
+ else if (GetBankSide(a) != 0)
LZDecompressVram(gSubstituteDollGfx, gUnknown_081FAF4C[r4]);
else
LZDecompressVram(gSubstituteDollTilemap, gUnknown_081FAF4C[r4]);
@@ -750,10 +749,10 @@ void sub_8032350(u8 a, u8 b)
{
if (!IsContest())
{
- if (battle_side_get_owner(a) != 0)
- sub_8031794(&gEnemyParty[gUnknown_02024A6A[a]], a);
+ if (GetBankSide(a) != 0)
+ sub_8031794(&gEnemyParty[gBattlePartyID[a]], a);
else
- sub_80318FC(&gPlayerParty[gUnknown_02024A6A[a]], a);
+ sub_80318FC(&gPlayerParty[gBattlePartyID[a]], a);
}
}
}
@@ -811,7 +810,7 @@ void sub_80324F8(struct Pokemon *pkmn, u8 b)
void sub_80325B8(void)
{
- u8 r4 = battle_get_side_with_given_state(0);
+ u8 r4 = GetBankByPlayerAI(0);
ewram17800[r4].unk0_1 = 0;
if (IsDoubleBattle())
@@ -831,10 +830,10 @@ void sub_8032638(void)
{
if (gMain.inBattle)
{
- u8 r8 = battle_get_side_with_given_state(0);
- u8 r9 = battle_get_side_with_given_state(2);
- u8 r4 = pokemon_order_func(gUnknown_02024A6A[r8]);
- u8 r5 = pokemon_order_func(gUnknown_02024A6A[r9]);
+ u8 r8 = GetBankByPlayerAI(0);
+ u8 r9 = GetBankByPlayerAI(2);
+ u8 r4 = pokemon_order_func(gBattlePartyID[r8]);
+ u8 r5 = pokemon_order_func(gBattlePartyID[r9]);
if (GetMonData(&gPlayerParty[r4], MON_DATA_HP) != 0)
sub_80324F8(&gPlayerParty[r4], r8);
@@ -850,19 +849,19 @@ void sub_80326EC(u8 a)
{
s32 i;
- for (i = 0; i < gUnknown_02024A68; i++)
+ for (i = 0; i < gNoOfAllBanks; i++)
{
if (sub_8078874(i) != 0)
{
- gSprites[gUnknown_02024BE0[i]].oam.affineMode = a;
+ gSprites[gObjectBankIDs[i]].oam.affineMode = a;
if (a == 0)
{
- ewram17810[i].unk6 = gSprites[gUnknown_02024BE0[i]].oam.matrixNum;
- gSprites[gUnknown_02024BE0[i]].oam.matrixNum = 0;
+ ewram17810[i].unk6 = gSprites[gObjectBankIDs[i]].oam.matrixNum;
+ gSprites[gObjectBankIDs[i]].oam.matrixNum = 0;
}
else
{
- gSprites[gUnknown_02024BE0[i]].oam.matrixNum = ewram17810[i].unk6;
+ gSprites[gObjectBankIDs[i]].oam.matrixNum = ewram17810[i].unk6;
}
}
}
@@ -873,12 +872,12 @@ void sub_80327CC(void)
u8 r5;
LoadCompressedObjectPic(&gUnknown_081FAF24);
- r5 = battle_get_side_with_given_state(1);
+ r5 = GetBankByPlayerAI(1);
ewram17810[r5].unk7 = CreateSprite(&gSpriteTemplate_81FAF34, sub_8077ABC(r5, 0), sub_8077ABC(r5, 1) + 32, 0xC8);
gSprites[ewram17810[r5].unk7].data0 = r5;
if (IsDoubleBattle())
{
- r5 = battle_get_side_with_given_state(3);
+ r5 = GetBankByPlayerAI(3);
ewram17810[r5].unk7 = CreateSprite(&gSpriteTemplate_81FAF34, sub_8077ABC(r5, 0), sub_8077ABC(r5, 1) + 32, 0xC8);
gSprites[ewram17810[r5].unk7].data0 = r5;
}
@@ -888,7 +887,7 @@ void sub_80328A4(struct Sprite *sprite)
{
bool8 invisible = FALSE;
u8 r4 = sprite->data0;
- struct Sprite *r7 = &gSprites[gUnknown_02024BE0[r4]];
+ struct Sprite *r7 = &gSprites[gObjectBankIDs[r4]];
if (!r7->inUse || sub_8078874(r4) == 0)
{
@@ -913,7 +912,7 @@ void sub_8032978(struct Sprite *sprite)
void sub_8032984(u8 a, u16 b)
{
- if (battle_side_get_owner(a) != 0)
+ if (GetBankSide(a) != 0)
{
if (ewram17800[a].unk2 != 0)
b = ewram17800[a].unk2;
@@ -964,53 +963,53 @@ void nullsub_45(void)
{
}
-void sub_8032AE0(void)
+void SetBankFuncToOpponentBufferRunCommand(void)
{
- gUnknown_03004330[gUnknown_02024A60] = sub_8032AFC;
+ gBattleBankFunc[gActiveBank] = OpponentBufferRunCommand;
}
-void sub_8032AFC(void)
+void OpponentBufferRunCommand(void)
{
- if (gUnknown_02024A64 & gBitTable[gUnknown_02024A60])
+ if (gBattleExecBuffer & gBitTable[gActiveBank])
{
- if (gUnknown_02023A60[gUnknown_02024A60][0] <= 0x38)
- gUnknown_081FAF5C[gUnknown_02023A60[gUnknown_02024A60][0]]();
+ if (gBattleBufferA[gActiveBank][0] <= 0x38)
+ gOpponentBufferCommands[gBattleBufferA[gActiveBank][0]]();
else
- sub_80334EC();
+ OpponentBufferExecCompleted();
}
}
void sub_8032B4C(void)
{
- if (gSprites[gUnknown_02024BE0[gUnknown_02024A60]].callback == SpriteCallbackDummy)
- sub_80334EC();
+ if (gSprites[gObjectBankIDs[gActiveBank]].callback == SpriteCallbackDummy)
+ OpponentBufferExecCompleted();
}
// Duplicate of sub_8032B4C
void sub_8032B84(void)
{
- if (gSprites[gUnknown_02024BE0[gUnknown_02024A60]].callback == SpriteCallbackDummy)
- sub_80334EC();
+ if (gSprites[gObjectBankIDs[gActiveBank]].callback == SpriteCallbackDummy)
+ OpponentBufferExecCompleted();
}
void sub_8032BBC(void)
{
- if (gSprites[gUnknown_02024BE0[gUnknown_02024A60]].callback == SpriteCallbackDummy)
+ if (gSprites[gObjectBankIDs[gActiveBank]].callback == SpriteCallbackDummy)
{
- sub_8031B74(gSprites[gUnknown_02024BE0[gUnknown_02024A60]].oam.affineParam);
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].oam.tileNum = gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data5;
- FreeSpriteOamMatrix(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- DestroySprite(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- sub_80334EC();
+ sub_8031B74(gSprites[gObjectBankIDs[gActiveBank]].oam.affineParam);
+ gSprites[gObjectBankIDs[gActiveBank]].oam.tileNum = gSprites[gObjectBankIDs[gActiveBank]].data5;
+ FreeSpriteOamMatrix(&gSprites[gObjectBankIDs[gActiveBank]]);
+ DestroySprite(&gSprites[gObjectBankIDs[gActiveBank]]);
+ OpponentBufferExecCompleted();
}
}
void sub_8032C4C(void)
{
- if ((--ewram17810[gUnknown_02024A60].unk9) == 0xFF)
+ if ((--ewram17810[gActiveBank].unk9) == 0xFF)
{
- ewram17810[gUnknown_02024A60].unk9 = 0;
- sub_80334EC();
+ ewram17810[gActiveBank].unk9 = 0;
+ OpponentBufferExecCompleted();
}
}
@@ -1020,89 +1019,89 @@ void sub_8032C88(void)
if (!IsDoubleBattle() || (IsDoubleBattle() && (gBattleTypeFlags & BATTLE_TYPE_MULTI)))
{
- if (gSprites[gUnknown_03004340[gUnknown_02024A60]].callback == SpriteCallbackDummy)
+ if (gSprites[gHealthboxIDs[gActiveBank]].callback == SpriteCallbackDummy)
r6 = TRUE;
}
else
{
- if (gSprites[gUnknown_03004340[gUnknown_02024A60]].callback == SpriteCallbackDummy
- && gSprites[gUnknown_03004340[gUnknown_02024A60 ^ 2]].callback == SpriteCallbackDummy)
+ if (gSprites[gHealthboxIDs[gActiveBank]].callback == SpriteCallbackDummy
+ && gSprites[gHealthboxIDs[gActiveBank ^ 2]].callback == SpriteCallbackDummy)
r6 = TRUE;
}
if (IsCryPlayingOrClearCrySongs())
r6 = FALSE;
- if (r6 && ewram17810[gUnknown_02024A60].unk1_0 && ewram17810[gUnknown_02024A60 ^ 2].unk1_0)
+ if (r6 && ewram17810[gActiveBank].unk1_0 && ewram17810[gActiveBank ^ 2].unk1_0)
{
- ewram17810[gUnknown_02024A60].unk0_7 = 0;
- ewram17810[gUnknown_02024A60].unk1_0 = 0;
- ewram17810[gUnknown_02024A60 ^ 2].unk0_7 = 0;
- ewram17810[gUnknown_02024A60 ^ 2].unk1_0 = 0;
+ ewram17810[gActiveBank].unk0_7 = 0;
+ ewram17810[gActiveBank].unk1_0 = 0;
+ ewram17810[gActiveBank ^ 2].unk0_7 = 0;
+ ewram17810[gActiveBank ^ 2].unk1_0 = 0;
FreeSpriteTilesByTag(0x27F9);
FreeSpritePaletteByTag(0x27F9);
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
m4aMPlayContinue(&gMPlay_BGM);
else
m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 256);
- ewram17810[gUnknown_02024A60].unk9 = 3;
- gUnknown_03004330[gUnknown_02024A60] = sub_8032C4C;
+ ewram17810[gActiveBank].unk9 = 3;
+ gBattleBankFunc[gActiveBank] = sub_8032C4C;
}
}
void sub_8032E2C(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_3 && !ewram17810[gUnknown_02024A60].unk0_7)
- sub_8141828(gUnknown_02024A60, &gEnemyParty[gUnknown_02024A6A[gUnknown_02024A60]]);
- if (!ewram17810[gUnknown_02024A60 ^ 2].unk0_3 && !ewram17810[gUnknown_02024A60 ^ 2].unk0_7)
- sub_8141828(gUnknown_02024A60 ^ 2, &gEnemyParty[gUnknown_02024A6A[gUnknown_02024A60 ^ 2]]);
- if (!ewram17810[gUnknown_02024A60].unk0_3 && !ewram17810[gUnknown_02024A60 ^ 2].unk0_3)
+ if (!ewram17810[gActiveBank].unk0_3 && !ewram17810[gActiveBank].unk0_7)
+ sub_8141828(gActiveBank, &gEnemyParty[gBattlePartyID[gActiveBank]]);
+ if (!ewram17810[gActiveBank ^ 2].unk0_3 && !ewram17810[gActiveBank ^ 2].unk0_7)
+ sub_8141828(gActiveBank ^ 2, &gEnemyParty[gBattlePartyID[gActiveBank ^ 2]]);
+ if (!ewram17810[gActiveBank].unk0_3 && !ewram17810[gActiveBank ^ 2].unk0_3)
{
if (IsDoubleBattle() && !(gBattleTypeFlags & BATTLE_TYPE_MULTI))
{
- DestroySprite(&gSprites[gUnknown_0300434C[gUnknown_02024A60 ^ 2]]);
+ DestroySprite(&gSprites[gUnknown_0300434C[gActiveBank ^ 2]]);
sub_8045A5C(
- gUnknown_03004340[gUnknown_02024A60 ^ 2],
- &gEnemyParty[gUnknown_02024A6A[gUnknown_02024A60 ^ 2]],
+ gHealthboxIDs[gActiveBank ^ 2],
+ &gEnemyParty[gBattlePartyID[gActiveBank ^ 2]],
0);
- sub_804777C(gUnknown_02024A60 ^ 2);
- sub_8043DFC(gUnknown_03004340[gUnknown_02024A60 ^ 2]);
+ sub_804777C(gActiveBank ^ 2);
+ sub_8043DFC(gHealthboxIDs[gActiveBank ^ 2]);
sub_8032984(
- gUnknown_02024A60 ^ 2,
- GetMonData(&gEnemyParty[gUnknown_02024A6A[gUnknown_02024A60 ^ 2]], MON_DATA_SPECIES));
+ gActiveBank ^ 2,
+ GetMonData(&gEnemyParty[gBattlePartyID[gActiveBank ^ 2]], MON_DATA_SPECIES));
}
- DestroySprite(&gSprites[gUnknown_0300434C[gUnknown_02024A60]]);
+ DestroySprite(&gSprites[gUnknown_0300434C[gActiveBank]]);
sub_8045A5C(
- gUnknown_03004340[gUnknown_02024A60],
- &gEnemyParty[gUnknown_02024A6A[gUnknown_02024A60]],
+ gHealthboxIDs[gActiveBank],
+ &gEnemyParty[gBattlePartyID[gActiveBank]],
0);
- sub_804777C(gUnknown_02024A60);
- sub_8043DFC(gUnknown_03004340[gUnknown_02024A60]);
+ sub_804777C(gActiveBank);
+ sub_8043DFC(gHealthboxIDs[gActiveBank]);
sub_8032984(
- gUnknown_02024A60,
- GetMonData(&gEnemyParty[gUnknown_02024A6A[gUnknown_02024A60]], MON_DATA_SPECIES));
+ gActiveBank,
+ GetMonData(&gEnemyParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES));
ewram17840.unk9_0 = 0;
- gUnknown_03004330[gUnknown_02024A60] = sub_8032C88;
+ gBattleBankFunc[gActiveBank] = sub_8032C88;
}
}
void sub_8033018(void)
{
- if (gSprites[gUnknown_02024BE0[gUnknown_02024A60]].animEnded == TRUE
- && gSprites[gUnknown_02024BE0[gUnknown_02024A60]].pos2.x == 0)
+ if (gSprites[gObjectBankIDs[gActiveBank]].animEnded == TRUE
+ && gSprites[gObjectBankIDs[gActiveBank]].pos2.x == 0)
{
- if (!ewram17810[gUnknown_02024A60].unk0_7)
+ if (!ewram17810[gActiveBank].unk0_7)
{
- sub_8141828(gUnknown_02024A60, &gEnemyParty[gUnknown_02024A6A[gUnknown_02024A60]]);
+ sub_8141828(gActiveBank, &gEnemyParty[gBattlePartyID[gActiveBank]]);
return;
}
- if (ewram17810[gUnknown_02024A60].unk1_0)
+ if (ewram17810[gActiveBank].unk1_0)
{
- ewram17810[gUnknown_02024A60].unk0_7 = 0;
- ewram17810[gUnknown_02024A60].unk1_0 = 0;
+ ewram17810[gActiveBank].unk0_7 = 0;
+ ewram17810[gActiveBank].unk1_0 = 0;
FreeSpriteTilesByTag(0x27F9);
FreeSpritePaletteByTag(0x27F9);
- sub_80334EC();
+ OpponentBufferExecCompleted();
return;
}
}
@@ -1110,52 +1109,52 @@ void sub_8033018(void)
void sub_80330C8(void)
{
- s16 r4 = sub_8045C78(gUnknown_02024A60, gUnknown_03004340[gUnknown_02024A60], 0, 0);
+ s16 r4 = sub_8045C78(gActiveBank, gHealthboxIDs[gActiveBank], 0, 0);
- sub_8043DFC(gUnknown_03004340[gUnknown_02024A60]);
+ sub_8043DFC(gHealthboxIDs[gActiveBank]);
if (r4 != -1)
- sub_80440EC(gUnknown_03004340[gUnknown_02024A60], r4, 0);
+ sub_80440EC(gHealthboxIDs[gActiveBank], r4, 0);
else
- sub_80334EC();
+ OpponentBufferExecCompleted();
}
void sub_803311C(void)
{
- if (!gSprites[gUnknown_02024BE0[gUnknown_02024A60]].inUse)
+ if (!gSprites[gObjectBankIDs[gActiveBank]].inUse)
{
- sub_8043DB0(gUnknown_03004340[gUnknown_02024A60]);
- sub_80334EC();
+ sub_8043DB0(gHealthboxIDs[gActiveBank]);
+ OpponentBufferExecCompleted();
}
}
void sub_8033160(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_6)
+ if (!ewram17810[gActiveBank].unk0_6)
{
- FreeSpriteOamMatrix(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- DestroySprite(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- sub_8032A08(gUnknown_02024A60);
- sub_8043DB0(gUnknown_03004340[gUnknown_02024A60]);
- sub_80334EC();
+ FreeSpriteOamMatrix(&gSprites[gObjectBankIDs[gActiveBank]]);
+ DestroySprite(&gSprites[gObjectBankIDs[gActiveBank]]);
+ sub_8032A08(gActiveBank);
+ sub_8043DB0(gHealthboxIDs[gActiveBank]);
+ OpponentBufferExecCompleted();
}
}
void sub_80331D0(void)
{
if (gUnknown_03004210.state == 0)
- sub_80334EC();
+ OpponentBufferExecCompleted();
}
void bx_blink_t7(void)
{
- u8 spriteId = gUnknown_02024BE0[gUnknown_02024A60];
+ u8 spriteId = gObjectBankIDs[gActiveBank];
if (gSprites[spriteId].data1 == 32)
{
gSprites[spriteId].data1 = 0;
gSprites[spriteId].invisible = FALSE;
- gUnknown_02024E6D = 0;
- sub_80334EC();
+ gDoingBattleAnim = 0;
+ OpponentBufferExecCompleted();
}
else
{
@@ -1167,70 +1166,70 @@ void bx_blink_t7(void)
void sub_8033264(void)
{
- if (gSprites[gUnknown_03004340[gUnknown_02024A60]].callback == SpriteCallbackDummy)
+ if (gSprites[gHealthboxIDs[gActiveBank]].callback == SpriteCallbackDummy)
{
- if (ewram17800[gUnknown_02024A60].unk0_2)
- move_anim_start_t4(gUnknown_02024A60, gUnknown_02024A60, gUnknown_02024A60, 6);
- gUnknown_03004330[gUnknown_02024A60] = sub_80332D0;
+ if (ewram17800[gActiveBank].unk0_2)
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 6);
+ gBattleBankFunc[gActiveBank] = sub_80332D0;
}
}
void sub_80332D0(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_6)
+ if (!ewram17810[gActiveBank].unk0_6)
{
CreateTask(c3_0802FDF4, 10);
- sub_80334EC();
+ OpponentBufferExecCompleted();
}
}
void sub_8033308(void)
{
- if (ewram17810[gUnknown_02024A60].unk1_0)
+ if (ewram17810[gActiveBank].unk1_0)
{
- ewram17810[gUnknown_02024A60].unk0_7 = 0;
- ewram17810[gUnknown_02024A60].unk1_0 = 0;
+ ewram17810[gActiveBank].unk0_7 = 0;
+ ewram17810[gActiveBank].unk1_0 = 0;
FreeSpriteTilesByTag(0x27F9);
FreeSpritePaletteByTag(0x27F9);
- StartSpriteAnim(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]], 0);
+ StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], 0);
sub_8045A5C(
- gUnknown_03004340[gUnknown_02024A60],
- &gEnemyParty[gUnknown_02024A6A[gUnknown_02024A60]],
+ gHealthboxIDs[gActiveBank],
+ &gEnemyParty[gBattlePartyID[gActiveBank]],
0);
- sub_804777C(gUnknown_02024A60);
- sub_8043DFC(gUnknown_03004340[gUnknown_02024A60]);
- sub_8031F88(gUnknown_02024A60);
- gUnknown_03004330[gUnknown_02024A60] = sub_8033264;
+ sub_804777C(gActiveBank);
+ sub_8043DFC(gHealthboxIDs[gActiveBank]);
+ sub_8031F88(gActiveBank);
+ gBattleBankFunc[gActiveBank] = sub_8033264;
}
}
void sub_80333D4(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_3 && !ewram17810[gUnknown_02024A60].unk0_7)
- sub_8141828(gUnknown_02024A60, &gEnemyParty[gUnknown_02024A6A[gUnknown_02024A60]]);
- if (gSprites[gUnknown_0300434C[gUnknown_02024A60]].callback == SpriteCallbackDummy
- && !ewram17810[gUnknown_02024A60].unk0_3)
+ if (!ewram17810[gActiveBank].unk0_3 && !ewram17810[gActiveBank].unk0_7)
+ sub_8141828(gActiveBank, &gEnemyParty[gBattlePartyID[gActiveBank]]);
+ if (gSprites[gUnknown_0300434C[gActiveBank]].callback == SpriteCallbackDummy
+ && !ewram17810[gActiveBank].unk0_3)
{
- DestroySprite(&gSprites[gUnknown_0300434C[gUnknown_02024A60]]);
- sub_8032984(gUnknown_02024A60, GetMonData(&gEnemyParty[gUnknown_02024A6A[gUnknown_02024A60]], MON_DATA_SPECIES));
- gUnknown_03004330[gUnknown_02024A60] = sub_8033308;
+ DestroySprite(&gSprites[gUnknown_0300434C[gActiveBank]]);
+ sub_8032984(gActiveBank, GetMonData(&gEnemyParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES));
+ gBattleBankFunc[gActiveBank] = sub_8033308;
}
}
void sub_8033494(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_4)
- sub_80334EC();
+ if (!ewram17810[gActiveBank].unk0_4)
+ OpponentBufferExecCompleted();
}
void sub_80334C0(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_5)
- sub_80334EC();
+ if (!ewram17810[gActiveBank].unk0_5)
+ OpponentBufferExecCompleted();
}
-void sub_80334EC(void)
+void OpponentBufferExecCompleted(void)
{
- gUnknown_03004330[gUnknown_02024A60] = sub_8032AFC;
- gUnknown_02024A64 &= ~gBitTable[gUnknown_02024A60];
+ gBattleBankFunc[gActiveBank] = OpponentBufferRunCommand;
+ gBattleExecBuffer &= ~gBitTable[gActiveBank];
}
diff --git a/src/battle_811DA74.c b/src/battle_811DA74.c
index 439e6b3c6..42c700844 100644
--- a/src/battle_811DA74.c
+++ b/src/battle_811DA74.c
@@ -1,18 +1,24 @@
#include "global.h"
-#include "asm.h"
#include "battle.h"
#include "battle_interface.h"
#include "data2.h"
+#include "battle_811DA74.h"
+#include "battle_anim_813F0F4.h"
#include "link.h"
#include "m4a.h"
#include "main.h"
#include "palette.h"
+#include "pokeball.h"
#include "pokemon.h"
+#include "rom3.h"
+#include "rom_8077ABC.h"
#include "sound.h"
#include "songs.h"
#include "sprite.h"
#include "string_util.h"
+#include "task.h"
#include "text.h"
+#include "util.h"
struct UnknownStruct1
{
@@ -29,45 +35,36 @@ struct UnknownStruct3
u8 ppBonuses;
};
-struct UnknownStruct5
-{
- u8 unk0_0:7;
- u8 unk0_7:1;
-};
-
-extern u32 gBitTable[];
extern u16 gBattleTypeFlags;
-
-extern struct UnknownStruct5 gUnknown_020238C8;
-extern u8 gUnknown_020238CC[];
-extern u8 gUnknown_02023A60[][0x200];
-extern u8 gUnknown_02024A60;
-extern u32 gUnknown_02024A64;
-extern u16 gUnknown_02024A6A[];
-extern u8 gUnknown_02024BE0[];
-extern u8 gUnknown_02024D26;
+extern u8 gDisplayedStringBattle[];
+extern u8 gBattleBufferA[][0x200];
+extern u8 gActiveBank;
+extern u32 gBattleExecBuffer;
+extern u16 gBattlePartyID[];
+extern u8 gObjectBankIDs[];
+extern u8 gBattleOutcome;
extern u16 gUnknown_02024DE8;
extern u8 gUnknown_02024E68[];
-extern u8 gUnknown_02024E6D;
-extern u32 gUnknown_02024E70[];
+extern u8 gDoingBattleAnim;
+extern u32 gPID_perBank[];
extern struct SpriteTemplate gUnknown_02024E8C;
-extern u32 *gUnknown_0202F7B4;
-extern u32 gUnknown_0202F7B8;
-extern u16 gUnknown_0202F7BC;
-extern u8 gUnknown_0202F7BE;
-extern u16 gUnknown_0202F7C0;
+extern u32 *gDisableStructMoveAnim;
+extern u32 gMoveDmgMoveAnim;
+extern u16 gMovePowerMoveAnim;
+extern u8 gHappinessMoveAnim;
+extern u16 gWeatherMoveAnim;
extern u8 gUnknown_0202F7C4;
extern struct Window gUnknown_03004210;
extern u16 gUnknown_030042A0;
extern u16 gUnknown_030042A4;
-extern MainCallback gUnknown_030042D0;
-extern void (*gUnknown_03004330[])(void);
-extern u8 gUnknown_03004340[];
+extern MainCallback gPreBattleCallback1;
+extern void (*gBattleBankFunc[])(void);
+extern u8 gHealthboxIDs[];
extern u8 gUnknown_0300434C[];
extern u8 gBattleMonForms[];
extern u8 gAnimScriptActive;
extern void (*gAnimScriptCallback)(void);
-extern void (*const gUnknown_083FE4F4[])(void);
+extern void (*const gLinkPartnerBufferCommands[])(void);
extern u8 move_anim_start_t3();
extern u8 sub_8078874();
@@ -78,7 +75,7 @@ extern void sub_8047858();
extern void move_anim_start_t2_for_situation();
extern void load_gfxc_health_bar();
extern void sub_8043D84();
-extern void sub_8120AA8();
+extern void BufferStringBattle();
extern void sub_8031F24(void);
extern void sub_80326EC();
extern void ExecuteMoveAnim();
@@ -113,12 +110,10 @@ extern void c3_0802FDF4(u8);
extern void sub_8031F88();
extern void sub_8141828();
extern void c2_8011A1C(void);
-extern void dp01_prepare_buffer_wireless_probably();
-extern void dp01_build_cmdbuf_x1D_1D_numargs_varargs(int, u16, void *);
-void sub_811DA94(void);
+void LinkPartnerBufferRunCommand(void);
void sub_811E0A0(void);
-void dp01_tbl3_exec_completed(void);
+void LinkPartnerBufferExecCompleted(void);
u32 dp01_getattr_by_ch1_for_player_pokemon(u8 a, u8 *b);
void sub_811EC68(u8);
void sub_811F864(u8, u8);
@@ -127,49 +122,50 @@ void sub_811FF30(void);
void sub_812071C(u8);
void sub_81208E0(void);
+
void nullsub_74(void)
{
}
-void sub_811DA78(void)
+void SetBankFuncToLinkPartnerBufferRunCommand(void)
{
- gUnknown_03004330[gUnknown_02024A60] = sub_811DA94;
+ gBattleBankFunc[gActiveBank] = LinkPartnerBufferRunCommand;
}
-void sub_811DA94(void)
+void LinkPartnerBufferRunCommand(void)
{
- if (gUnknown_02024A64 & gBitTable[gUnknown_02024A60])
+ if (gBattleExecBuffer & gBitTable[gActiveBank])
{
- if (gUnknown_02023A60[gUnknown_02024A60][0] <= 0x38)
- gUnknown_083FE4F4[gUnknown_02023A60[gUnknown_02024A60][0]]();
+ if (gBattleBufferA[gActiveBank][0] <= 0x38)
+ gLinkPartnerBufferCommands[gBattleBufferA[gActiveBank][0]]();
else
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
}
void sub_811DAE4(void)
{
- if (gSprites[gUnknown_02024BE0[gUnknown_02024A60]].callback == SpriteCallbackDummy)
- dp01_tbl3_exec_completed();
+ if (gSprites[gObjectBankIDs[gActiveBank]].callback == SpriteCallbackDummy)
+ LinkPartnerBufferExecCompleted();
}
void sub_811DB1C(void)
{
- if (gSprites[gUnknown_02024BE0[gUnknown_02024A60]].callback == SpriteCallbackDummy)
+ if (gSprites[gObjectBankIDs[gActiveBank]].callback == SpriteCallbackDummy)
{
nullsub_10(0);
- FreeSpriteOamMatrix(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- DestroySprite(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- dp01_tbl3_exec_completed();
+ FreeSpriteOamMatrix(&gSprites[gObjectBankIDs[gActiveBank]]);
+ DestroySprite(&gSprites[gObjectBankIDs[gActiveBank]]);
+ LinkPartnerBufferExecCompleted();
}
}
void sub_811DB84(void)
{
- if ((--ewram17810[gUnknown_02024A60].unk9) == 0xFF)
+ if ((--ewram17810[gActiveBank].unk9) == 0xFF)
{
- ewram17810[gUnknown_02024A60].unk9 = 0;
- dp01_tbl3_exec_completed();
+ ewram17810[gActiveBank].unk9 = 0;
+ LinkPartnerBufferExecCompleted();
}
}
@@ -179,21 +175,21 @@ void sub_811DBC0(void)
if (!IsDoubleBattle() || (IsDoubleBattle() && (gBattleTypeFlags & 0x40)))
{
- if (gSprites[gUnknown_03004340[gUnknown_02024A60]].callback == SpriteCallbackDummy)
+ if (gSprites[gHealthboxIDs[gActiveBank]].callback == SpriteCallbackDummy)
r6 = TRUE;
}
else
{
- if (gSprites[gUnknown_03004340[gUnknown_02024A60]].callback == SpriteCallbackDummy
- && gSprites[gUnknown_03004340[gUnknown_02024A60 ^ 2]].callback == SpriteCallbackDummy)
+ if (gSprites[gHealthboxIDs[gActiveBank]].callback == SpriteCallbackDummy
+ && gSprites[gHealthboxIDs[gActiveBank ^ 2]].callback == SpriteCallbackDummy)
r6 = TRUE;
}
if (IsCryPlayingOrClearCrySongs())
r6 = FALSE;
if (r6)
{
- ewram17810[gUnknown_02024A60].unk9 = 3;
- gUnknown_03004330[gUnknown_02024A60] = sub_811DB84;
+ ewram17810[gActiveBank].unk9 = 3;
+ gBattleBankFunc[gActiveBank] = sub_811DB84;
}
}
@@ -201,92 +197,92 @@ void sub_811DCA0(void)
{
u8 r2;
- if (!ewram17810[gUnknown_02024A60].unk0_3)
+ if (!ewram17810[gActiveBank].unk0_3)
{
// I couldn't get it to work as a bitfield here
- r2 = *((u8 *)&ewram17810[gUnknown_02024A60 ^ 2]) & 8;
- if (!r2 && (++ewram17810[gUnknown_02024A60].unk9) != 1)
+ r2 = *((u8 *)&ewram17810[gActiveBank ^ 2]) & 8;
+ if (!r2 && (++ewram17810[gActiveBank].unk9) != 1)
{
- ewram17810[gUnknown_02024A60].unk9 = r2;
+ ewram17810[gActiveBank].unk9 = r2;
if (IsDoubleBattle() && !(gBattleTypeFlags & 0x40))
{
- DestroySprite(&gSprites[gUnknown_0300434C[gUnknown_02024A60 ^ 2]]);
- sub_8045A5C(gUnknown_03004340[gUnknown_02024A60 ^ 2], &gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60 ^ 2]], 0);
- sub_804777C(gUnknown_02024A60 ^ 2);
- sub_8043DFC(gUnknown_03004340[gUnknown_02024A60 ^ 2]);
+ DestroySprite(&gSprites[gUnknown_0300434C[gActiveBank ^ 2]]);
+ sub_8045A5C(gHealthboxIDs[gActiveBank ^ 2], &gPlayerParty[gBattlePartyID[gActiveBank ^ 2]], 0);
+ sub_804777C(gActiveBank ^ 2);
+ sub_8043DFC(gHealthboxIDs[gActiveBank ^ 2]);
}
- DestroySprite(&gSprites[gUnknown_0300434C[gUnknown_02024A60]]);
- sub_8045A5C(gUnknown_03004340[gUnknown_02024A60], &gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], 0);
- sub_804777C(gUnknown_02024A60);
- sub_8043DFC(gUnknown_03004340[gUnknown_02024A60]);
+ DestroySprite(&gSprites[gUnknown_0300434C[gActiveBank]]);
+ sub_8045A5C(gHealthboxIDs[gActiveBank], &gPlayerParty[gBattlePartyID[gActiveBank]], 0);
+ sub_804777C(gActiveBank);
+ sub_8043DFC(gHealthboxIDs[gActiveBank]);
(s8)ewram17810[4].unk9 &= ~1;
- gUnknown_03004330[gUnknown_02024A60] = sub_811DBC0;
+ gBattleBankFunc[gActiveBank] = sub_811DBC0;
}
}
}
void sub_811DDE8(void)
{
- if (gSprites[gUnknown_02024BE0[gUnknown_02024A60]].animEnded
- && gSprites[gUnknown_02024BE0[gUnknown_02024A60]].pos2.x == 0)
- dp01_tbl3_exec_completed();
+ if (gSprites[gObjectBankIDs[gActiveBank]].animEnded
+ && gSprites[gObjectBankIDs[gActiveBank]].pos2.x == 0)
+ LinkPartnerBufferExecCompleted();
}
void bx_t3_healthbar_update(void)
{
s16 r4;
- r4 = sub_8045C78(gUnknown_02024A60, gUnknown_03004340[gUnknown_02024A60], 0, 0);
- sub_8043DFC(gUnknown_03004340[gUnknown_02024A60]);
+ r4 = sub_8045C78(gActiveBank, gHealthboxIDs[gActiveBank], 0, 0);
+ sub_8043DFC(gHealthboxIDs[gActiveBank]);
if (r4 != -1)
{
- sub_80440EC(gUnknown_03004340[gUnknown_02024A60], r4, 0);
+ sub_80440EC(gHealthboxIDs[gActiveBank], r4, 0);
}
else
{
- sub_80324F8(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], gUnknown_02024A60);
- dp01_tbl3_exec_completed();
+ sub_80324F8(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+ LinkPartnerBufferExecCompleted();
}
}
void sub_811DE98(void)
{
- if (gSprites[gUnknown_02024BE0[gUnknown_02024A60]].pos1.y + gSprites[gUnknown_02024BE0[gUnknown_02024A60]].pos2.y > 160)
+ if (gSprites[gObjectBankIDs[gActiveBank]].pos1.y + gSprites[gObjectBankIDs[gActiveBank]].pos2.y > 160)
{
- nullsub_9(GetMonData(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], MON_DATA_SPECIES));
- FreeOamMatrix(gSprites[gUnknown_02024BE0[gUnknown_02024A60]].oam.matrixNum);
- DestroySprite(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- sub_8043DB0(gUnknown_03004340[gUnknown_02024A60]);
- dp01_tbl3_exec_completed();
+ nullsub_9(GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES));
+ FreeOamMatrix(gSprites[gObjectBankIDs[gActiveBank]].oam.matrixNum);
+ DestroySprite(&gSprites[gObjectBankIDs[gActiveBank]]);
+ sub_8043DB0(gHealthboxIDs[gActiveBank]);
+ LinkPartnerBufferExecCompleted();
}
}
void sub_811DF34(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_6)
+ if (!ewram17810[gActiveBank].unk0_6)
{
- FreeSpriteOamMatrix(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- DestroySprite(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- sub_8043DB0(gUnknown_03004340[gUnknown_02024A60]);
- dp01_tbl3_exec_completed();
+ FreeSpriteOamMatrix(&gSprites[gObjectBankIDs[gActiveBank]]);
+ DestroySprite(&gSprites[gObjectBankIDs[gActiveBank]]);
+ sub_8043DB0(gHealthboxIDs[gActiveBank]);
+ LinkPartnerBufferExecCompleted();
}
}
void sub_811DFA0(void)
{
if (gUnknown_03004210.state == 0)
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void bx_blink_t3(void)
{
- u8 spriteId = gUnknown_02024BE0[gUnknown_02024A60];
+ u8 spriteId = gObjectBankIDs[gActiveBank];
if (gSprites[spriteId].data1 == 32)
{
gSprites[spriteId].data1 = 0;
gSprites[spriteId].invisible = FALSE;
- gUnknown_02024E6D = 0;
- dp01_tbl3_exec_completed();
+ gDoingBattleAnim = 0;
+ LinkPartnerBufferExecCompleted();
}
else
{
@@ -300,48 +296,48 @@ void bx_blink_t3(void)
void sub_811E034(void)
{
- if (gSprites[gUnknown_03004340[gUnknown_02024A60]].callback == SpriteCallbackDummy)
+ if (gSprites[gHealthboxIDs[gActiveBank]].callback == SpriteCallbackDummy)
{
- if (ewram17800[gUnknown_02024A60].unk0_2)
- move_anim_start_t4(gUnknown_02024A60, gUnknown_02024A60, gUnknown_02024A60, 6);
- gUnknown_03004330[gUnknown_02024A60] = sub_811E0A0;
+ if (ewram17800[gActiveBank].unk0_2)
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 6);
+ gBattleBankFunc[gActiveBank] = sub_811E0A0;
}
}
void sub_811E0A0(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_6)
- dp01_tbl3_exec_completed();
+ if (!ewram17810[gActiveBank].unk0_6)
+ LinkPartnerBufferExecCompleted();
}
void sub_811E0CC(void)
{
- if (ewram17810[gUnknown_02024A60].unk1_0)
+ if (ewram17810[gActiveBank].unk1_0)
{
- ewram17810[gUnknown_02024A60].unk0_7 = 0;
- ewram17810[gUnknown_02024A60].unk1_0 = 0;
+ ewram17810[gActiveBank].unk0_7 = 0;
+ ewram17810[gActiveBank].unk1_0 = 0;
FreeSpriteTilesByTag(0x27F9);
FreeSpritePaletteByTag(0x27F9);
CreateTask(c3_0802FDF4, 10);
- sub_80324F8(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], gUnknown_02024A60);
- StartSpriteAnim(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]], 0);
- sub_8045A5C(gUnknown_03004340[gUnknown_02024A60], &gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], 0);
- sub_804777C(gUnknown_02024A60);
- sub_8043DFC(gUnknown_03004340[gUnknown_02024A60]);
- sub_8031F88(gUnknown_02024A60);
- gUnknown_03004330[gUnknown_02024A60] = sub_811E034;
+ sub_80324F8(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+ StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], 0);
+ sub_8045A5C(gHealthboxIDs[gActiveBank], &gPlayerParty[gBattlePartyID[gActiveBank]], 0);
+ sub_804777C(gActiveBank);
+ sub_8043DFC(gHealthboxIDs[gActiveBank]);
+ sub_8031F88(gActiveBank);
+ gBattleBankFunc[gActiveBank] = sub_811E034;
}
}
void sub_811E1BC(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_3 && !ewram17810[gUnknown_02024A60].unk0_7)
- sub_8141828(gUnknown_02024A60, &gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]]);
- if (gSprites[gUnknown_0300434C[gUnknown_02024A60]].callback == SpriteCallbackDummy
- && !ewram17810[gUnknown_02024A60].unk0_3)
+ if (!ewram17810[gActiveBank].unk0_3 && !ewram17810[gActiveBank].unk0_7)
+ sub_8141828(gActiveBank, &gPlayerParty[gBattlePartyID[gActiveBank]]);
+ if (gSprites[gUnknown_0300434C[gActiveBank]].callback == SpriteCallbackDummy
+ && !ewram17810[gActiveBank].unk0_3)
{
- DestroySprite(&gSprites[gUnknown_0300434C[gUnknown_02024A60]]);
- gUnknown_03004330[gUnknown_02024A60] = sub_811E0CC;
+ DestroySprite(&gSprites[gUnknown_0300434C[gActiveBank]]);
+ gBattleBankFunc[gActiveBank] = sub_811E0CC;
}
}
@@ -351,7 +347,7 @@ void sub_811E258(void)
{
m4aSongNumStop(0x5A);
gMain.inBattle = FALSE;
- gMain.callback1 = gUnknown_030042D0;
+ gMain.callback1 = gPreBattleCallback1;
SetMainCallback2(c2_8011A1C);
}
}
@@ -363,60 +359,60 @@ void sub_811E29C(void)
if (gBattleTypeFlags & 2)
{
sub_800832C();
- gUnknown_03004330[gUnknown_02024A60] = sub_811E258;
+ gBattleBankFunc[gActiveBank] = sub_811E258;
}
else
{
m4aSongNumStop(0x5A);
gMain.inBattle = FALSE;
- gMain.callback1 = gUnknown_030042D0;
+ gMain.callback1 = gPreBattleCallback1;
SetMainCallback2(gMain.savedCallback);
}
}
}
-void dp01_tbl3_exec_completed(void)
+void LinkPartnerBufferExecCompleted(void)
{
u8 multiplayerId;
- gUnknown_03004330[gUnknown_02024A60] = sub_811DA94;
+ gBattleBankFunc[gActiveBank] = LinkPartnerBufferRunCommand;
if (gBattleTypeFlags & 2)
{
multiplayerId = GetMultiplayerId();
dp01_prepare_buffer_wireless_probably(2, 4, &multiplayerId);
- gUnknown_02023A60[gUnknown_02024A60][0] = 0x38;
+ gBattleBufferA[gActiveBank][0] = 0x38;
}
else
{
- gUnknown_02024A64 &= ~gBitTable[gUnknown_02024A60];
+ gBattleExecBuffer &= ~gBitTable[gActiveBank];
}
}
void sub_811E38C(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_4)
- dp01_tbl3_exec_completed();
+ if (!ewram17810[gActiveBank].unk0_4)
+ LinkPartnerBufferExecCompleted();
}
void sub_811E3B8(void)
{
- if (!ewram17810[gUnknown_02024A60].unk0_5)
- dp01_tbl3_exec_completed();
+ if (!ewram17810[gActiveBank].unk0_5)
+ LinkPartnerBufferExecCompleted();
}
-void dp01t_00_3_getattr(void)
+void LinkPartnerHandleGetAttributes(void)
{
u8 unk[256];
int r6 = 0;
s32 i;
- if (gUnknown_02023A60[gUnknown_02024A60][2] == 0)
+ if (gBattleBufferA[gActiveBank][2] == 0)
{
- r6 = dp01_getattr_by_ch1_for_player_pokemon(gUnknown_02024A6A[gUnknown_02024A60], unk);
+ r6 = dp01_getattr_by_ch1_for_player_pokemon(gBattlePartyID[gActiveBank], unk);
}
else
{
- u8 r4 = gUnknown_02023A60[gUnknown_02024A60][2];
+ u8 r4 = gBattleBufferA[gActiveBank][2];
for (i = 0; i < 6; i++)
{
@@ -426,9 +422,10 @@ void dp01t_00_3_getattr(void)
}
}
dp01_build_cmdbuf_x1D_1D_numargs_varargs(1, r6, unk);
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
+// Duplicate of dp01_getattr_by_ch1_for_player_pokemon_
u32 dp01_getattr_by_ch1_for_player_pokemon(u8 a, u8 *buffer)
{
struct BattlePokemon battlePokemon;
@@ -439,7 +436,7 @@ u32 dp01_getattr_by_ch1_for_player_pokemon(u8 a, u8 *buffer)
u32 data32;
s32 size = 0;
- switch (gUnknown_02023A60[gUnknown_02024A60][1])
+ switch (gBattleBufferA[gActiveBank][1])
{
case 0:
battlePokemon.species = GetMonData(&gPlayerParty[a], MON_DATA_SPECIES);
@@ -505,7 +502,7 @@ u32 dp01_getattr_by_ch1_for_player_pokemon(u8 a, u8 *buffer)
case 5:
case 6:
case 7:
- data16 = GetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + gUnknown_02023A60[gUnknown_02024A60][1] - 4);
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + gBattleBufferA[gActiveBank][1] - 4);
buffer[0] = data16;
buffer[1] = data16 >> 8;
size = 2;
@@ -520,7 +517,7 @@ u32 dp01_getattr_by_ch1_for_player_pokemon(u8 a, u8 *buffer)
case 10:
case 11:
case 12:
- buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_PP1 + gUnknown_02023A60[gUnknown_02024A60][1] - 9);
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_PP1 + gBattleBufferA[gActiveBank][1] - 9);
size = 1;
break;
case 17:
@@ -736,21 +733,21 @@ u32 dp01_getattr_by_ch1_for_player_pokemon(u8 a, u8 *buffer)
void sub_811EC04(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
-void sub_811EC10(void)
+void LinkPartnerHandleSetAttributes(void)
{
u8 i;
u8 r4;
- if (gUnknown_02023A60[gUnknown_02024A60][2] == 0)
+ if (gBattleBufferA[gActiveBank][2] == 0)
{
- sub_811EC68(gUnknown_02024A6A[gUnknown_02024A60]);
+ sub_811EC68(gBattlePartyID[gActiveBank]);
}
else
{
- r4 = gUnknown_02023A60[gUnknown_02024A60][2];
+ r4 = gBattleBufferA[gActiveBank][2];
for (i = 0; i < 6; i++)
{
if (r4 & 1)
@@ -758,16 +755,17 @@ void sub_811EC10(void)
r4 >>= 1;
}
}
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
+// Duplicate of dp01_setattr_by_ch1_for_player_pokemon
void sub_811EC68(u8 a)
{
- struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gUnknown_02023A60[gUnknown_02024A60][3];
- struct UnknownStruct3 *moveData = (struct UnknownStruct3 *)&gUnknown_02023A60[gUnknown_02024A60][3];
+ struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBank][3];
+ struct UnknownStruct3 *moveData = (struct UnknownStruct3 *)&gBattleBufferA[gActiveBank][3];
s32 i;
- switch (gUnknown_02023A60[gUnknown_02024A60][1])
+ switch (gBattleBufferA[gActiveBank][1])
{
case 0:
{
@@ -808,10 +806,10 @@ void sub_811EC68(u8 a)
}
break;
case 1:
- SetMonData(&gPlayerParty[a], MON_DATA_SPECIES, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPECIES, &gBattleBufferA[gActiveBank][3]);
break;
case 2:
- SetMonData(&gPlayerParty[a], MON_DATA_HELD_ITEM, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBank][3]);
break;
case 3:
for (i = 0; i < 4; i++)
@@ -825,157 +823,157 @@ void sub_811EC68(u8 a)
case 5:
case 6:
case 7:
- SetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + gUnknown_02023A60[gUnknown_02024A60][1] - 4, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + gBattleBufferA[gActiveBank][1] - 4, &gBattleBufferA[gActiveBank][3]);
break;
case 8:
- SetMonData(&gPlayerParty[a], MON_DATA_PP1, &gUnknown_02023A60[gUnknown_02024A60][3]);
- SetMonData(&gPlayerParty[a], MON_DATA_PP2, &gUnknown_02023A60[gUnknown_02024A60][4]);
- SetMonData(&gPlayerParty[a], MON_DATA_PP3, &gUnknown_02023A60[gUnknown_02024A60][5]);
- SetMonData(&gPlayerParty[a], MON_DATA_PP4, &gUnknown_02023A60[gUnknown_02024A60][6]);
- SetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES, &gUnknown_02023A60[gUnknown_02024A60][7]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP1, &gBattleBufferA[gActiveBank][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP2, &gBattleBufferA[gActiveBank][4]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP3, &gBattleBufferA[gActiveBank][5]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP4, &gBattleBufferA[gActiveBank][6]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES, &gBattleBufferA[gActiveBank][7]);
break;
case 9:
case 10:
case 11:
case 12:
- SetMonData(&gPlayerParty[a], MON_DATA_PP1 + gUnknown_02023A60[gUnknown_02024A60][1] - 9, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP1 + gBattleBufferA[gActiveBank][1] - 9, &gBattleBufferA[gActiveBank][3]);
break;
case 17:
- SetMonData(&gPlayerParty[a], MON_DATA_OT_ID, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_OT_ID, &gBattleBufferA[gActiveBank][3]);
break;
case 18:
- SetMonData(&gPlayerParty[a], MON_DATA_EXP, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_EXP, &gBattleBufferA[gActiveBank][3]);
break;
case 19:
- SetMonData(&gPlayerParty[a], MON_DATA_HP_EV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_EV, &gBattleBufferA[gActiveBank][3]);
break;
case 20:
- SetMonData(&gPlayerParty[a], MON_DATA_ATK_EV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_EV, &gBattleBufferA[gActiveBank][3]);
break;
case 21:
- SetMonData(&gPlayerParty[a], MON_DATA_DEF_EV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_EV, &gBattleBufferA[gActiveBank][3]);
break;
case 22:
- SetMonData(&gPlayerParty[a], MON_DATA_SPD_EV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_EV, &gBattleBufferA[gActiveBank][3]);
break;
case 23:
- SetMonData(&gPlayerParty[a], MON_DATA_SPATK_EV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_EV, &gBattleBufferA[gActiveBank][3]);
break;
case 24:
- SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_EV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_EV, &gBattleBufferA[gActiveBank][3]);
break;
case 25:
- SetMonData(&gPlayerParty[a], MON_DATA_FRIENDSHIP, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_FRIENDSHIP, &gBattleBufferA[gActiveBank][3]);
break;
case 26:
- SetMonData(&gPlayerParty[a], MON_DATA_POKERUS, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_POKERUS, &gBattleBufferA[gActiveBank][3]);
break;
case 27:
- SetMonData(&gPlayerParty[a], MON_DATA_MET_LOCATION, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_MET_LOCATION, &gBattleBufferA[gActiveBank][3]);
break;
case 28:
- SetMonData(&gPlayerParty[a], MON_DATA_MET_LEVEL, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_MET_LEVEL, &gBattleBufferA[gActiveBank][3]);
break;
case 29:
- SetMonData(&gPlayerParty[a], MON_DATA_MET_GAME, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_MET_GAME, &gBattleBufferA[gActiveBank][3]);
break;
case 30:
- SetMonData(&gPlayerParty[a], MON_DATA_POKEBALL, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_POKEBALL, &gBattleBufferA[gActiveBank][3]);
break;
case 31:
- SetMonData(&gPlayerParty[a], MON_DATA_HP_IV, &gUnknown_02023A60[gUnknown_02024A60][3]);
- SetMonData(&gPlayerParty[a], MON_DATA_ATK_IV, &gUnknown_02023A60[gUnknown_02024A60][4]);
- SetMonData(&gPlayerParty[a], MON_DATA_DEF_IV, &gUnknown_02023A60[gUnknown_02024A60][5]);
- SetMonData(&gPlayerParty[a], MON_DATA_SPD_IV, &gUnknown_02023A60[gUnknown_02024A60][6]);
- SetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV, &gUnknown_02023A60[gUnknown_02024A60][7]);
- SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV, &gUnknown_02023A60[gUnknown_02024A60][8]);
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_IV, &gBattleBufferA[gActiveBank][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_IV, &gBattleBufferA[gActiveBank][4]);
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_IV, &gBattleBufferA[gActiveBank][5]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_IV, &gBattleBufferA[gActiveBank][6]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV, &gBattleBufferA[gActiveBank][7]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBank][8]);
break;
case 32:
- SetMonData(&gPlayerParty[a], MON_DATA_HP_IV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_IV, &gBattleBufferA[gActiveBank][3]);
break;
case 33:
- SetMonData(&gPlayerParty[a], MON_DATA_ATK_IV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_IV, &gBattleBufferA[gActiveBank][3]);
break;
case 34:
- SetMonData(&gPlayerParty[a], MON_DATA_DEF_IV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_IV, &gBattleBufferA[gActiveBank][3]);
break;
case 35:
- SetMonData(&gPlayerParty[a], MON_DATA_SPD_IV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_IV, &gBattleBufferA[gActiveBank][3]);
break;
case 36:
- SetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV, &gBattleBufferA[gActiveBank][3]);
break;
case 37:
- SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBank][3]);
break;
case 38:
- SetMonData(&gPlayerParty[a], MON_DATA_PERSONALITY, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBank][3]);
break;
case 39:
- SetMonData(&gPlayerParty[a], MON_DATA_CHECKSUM, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBank][3]);
break;
case 40:
- SetMonData(&gPlayerParty[a], MON_DATA_STATUS, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_STATUS, &gBattleBufferA[gActiveBank][3]);
break;
case 41:
- SetMonData(&gPlayerParty[a], MON_DATA_LEVEL, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_LEVEL, &gBattleBufferA[gActiveBank][3]);
break;
case 42:
- SetMonData(&gPlayerParty[a], MON_DATA_HP, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_HP, &gBattleBufferA[gActiveBank][3]);
break;
case 43:
- SetMonData(&gPlayerParty[a], MON_DATA_MAX_HP, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBank][3]);
break;
case 44:
- SetMonData(&gPlayerParty[a], MON_DATA_ATK, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK, &gBattleBufferA[gActiveBank][3]);
break;
case 45:
- SetMonData(&gPlayerParty[a], MON_DATA_DEF, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF, &gBattleBufferA[gActiveBank][3]);
break;
case 46:
- SetMonData(&gPlayerParty[a], MON_DATA_SPD, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD, &gBattleBufferA[gActiveBank][3]);
break;
case 47:
- SetMonData(&gPlayerParty[a], MON_DATA_SPATK, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK, &gBattleBufferA[gActiveBank][3]);
break;
case 48:
- SetMonData(&gPlayerParty[a], MON_DATA_SPDEF, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF, &gBattleBufferA[gActiveBank][3]);
break;
case 49:
- SetMonData(&gPlayerParty[a], MON_DATA_COOL, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_COOL, &gBattleBufferA[gActiveBank][3]);
break;
case 50:
- SetMonData(&gPlayerParty[a], MON_DATA_BEAUTY, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_BEAUTY, &gBattleBufferA[gActiveBank][3]);
break;
case 51:
- SetMonData(&gPlayerParty[a], MON_DATA_CUTE, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_CUTE, &gBattleBufferA[gActiveBank][3]);
break;
case 52:
- SetMonData(&gPlayerParty[a], MON_DATA_SMART, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SMART, &gBattleBufferA[gActiveBank][3]);
break;
case 53:
- SetMonData(&gPlayerParty[a], MON_DATA_TOUGH, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_TOUGH, &gBattleBufferA[gActiveBank][3]);
break;
case 54:
- SetMonData(&gPlayerParty[a], MON_DATA_SHEEN, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SHEEN, &gBattleBufferA[gActiveBank][3]);
break;
case 55:
- SetMonData(&gPlayerParty[a], MON_DATA_COOL_RIBBON, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_COOL_RIBBON, &gBattleBufferA[gActiveBank][3]);
break;
case 56:
- SetMonData(&gPlayerParty[a], MON_DATA_BEAUTY_RIBBON, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_BEAUTY_RIBBON, &gBattleBufferA[gActiveBank][3]);
break;
case 57:
- SetMonData(&gPlayerParty[a], MON_DATA_CUTE_RIBBON, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_CUTE_RIBBON, &gBattleBufferA[gActiveBank][3]);
break;
case 58:
- SetMonData(&gPlayerParty[a], MON_DATA_SMART_RIBBON, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SMART_RIBBON, &gBattleBufferA[gActiveBank][3]);
break;
case 59:
- SetMonData(&gPlayerParty[a], MON_DATA_TOUGH_RIBBON, &gUnknown_02023A60[gUnknown_02024A60][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_TOUGH_RIBBON, &gBattleBufferA[gActiveBank][3]);
break;
}
- sub_80324F8(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], gUnknown_02024A60);
+ sub_80324F8(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
}
void sub_811F664(void)
@@ -983,37 +981,37 @@ void sub_811F664(void)
u8 *dst;
u8 i;
- dst = (u8 *)&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]] + gUnknown_02023A60[gUnknown_02024A60][1];
- for (i = 0; i < gUnknown_02023A60[gUnknown_02024A60][2]; i++)
- dst[i] = gUnknown_02023A60[gUnknown_02024A60][3 + i];
- dp01_tbl3_exec_completed();
+ dst = (u8 *)&gPlayerParty[gBattlePartyID[gActiveBank]] + gBattleBufferA[gActiveBank][1];
+ for (i = 0; i < gBattleBufferA[gActiveBank][2]; i++)
+ dst[i] = gBattleBufferA[gActiveBank][3 + i];
+ LinkPartnerBufferExecCompleted();
}
void sub_811F6D8(void)
{
- sub_80318FC(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], gUnknown_02024A60);
+ sub_80318FC(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
GetMonSpriteTemplate_803C56C(
- GetMonData(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], MON_DATA_SPECIES),
- battle_get_per_side_status(gUnknown_02024A60));
- gUnknown_02024BE0[gUnknown_02024A60] = CreateSprite(
+ GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES),
+ GetBankIdentity(gActiveBank));
+ gObjectBankIDs[gActiveBank] = CreateSprite(
&gUnknown_02024E8C,
- sub_8077ABC(gUnknown_02024A60, 2),
- sub_8077F68(gUnknown_02024A60),
- sub_8079E90(gUnknown_02024A60));
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].pos2.x = -240;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data0 = gUnknown_02024A60;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].oam.paletteNum = gUnknown_02024A60;
- StartSpriteAnim(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]], gBattleMonForms[gUnknown_02024A60]);
- gUnknown_03004330[gUnknown_02024A60] = sub_811DDE8;
+ sub_8077ABC(gActiveBank, 2),
+ sub_8077F68(gActiveBank),
+ sub_8079E90(gActiveBank));
+ gSprites[gObjectBankIDs[gActiveBank]].pos2.x = -240;
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = gActiveBank;
+ gSprites[gObjectBankIDs[gActiveBank]].oam.paletteNum = gActiveBank;
+ StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], gBattleMonForms[gActiveBank]);
+ gBattleBankFunc[gActiveBank] = sub_811DDE8;
}
void sub_811F7F4(void)
{
- sub_8032AA8(gUnknown_02024A60, gUnknown_02023A60[gUnknown_02024A60][2]);
- gUnknown_02024A6A[gUnknown_02024A60] = gUnknown_02023A60[gUnknown_02024A60][1];
- sub_80318FC(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], gUnknown_02024A60);
- sub_811F864(gUnknown_02024A60, gUnknown_02023A60[gUnknown_02024A60][2]);
- gUnknown_03004330[gUnknown_02024A60] = sub_811E1BC;
+ sub_8032AA8(gActiveBank, gBattleBufferA[gActiveBank][2]);
+ gBattlePartyID[gActiveBank] = gBattleBufferA[gActiveBank][1];
+ sub_80318FC(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+ sub_811F864(gActiveBank, gBattleBufferA[gActiveBank][2]);
+ gBattleBankFunc[gActiveBank] = sub_811E1BC;
}
void sub_811F864(u8 a, u8 b)
@@ -1021,56 +1019,56 @@ void sub_811F864(u8 a, u8 b)
u16 species;
sub_8032AA8(a, b);
- gUnknown_02024A6A[a] = gUnknown_02023A60[a][1];
- species = GetMonData(&gPlayerParty[gUnknown_02024A6A[a]], MON_DATA_SPECIES);
+ gBattlePartyID[a] = gBattleBufferA[a][1];
+ species = GetMonData(&gPlayerParty[gBattlePartyID[a]], MON_DATA_SPECIES);
gUnknown_0300434C[a] = CreateInvisibleSpriteWithCallback(sub_80312F0);
- GetMonSpriteTemplate_803C56C(species, battle_get_per_side_status(a));
- gUnknown_02024BE0[a] = CreateSprite(
+ GetMonSpriteTemplate_803C56C(species, GetBankIdentity(a));
+ gObjectBankIDs[a] = CreateSprite(
&gUnknown_02024E8C,
sub_8077ABC(a, 2),
sub_8077F68(a),
sub_8079E90(a));
- gSprites[gUnknown_0300434C[a]].data1 = gUnknown_02024BE0[a];
- gSprites[gUnknown_02024BE0[a]].data0 = a;
- gSprites[gUnknown_02024BE0[a]].data2 = species;
- gSprites[gUnknown_02024BE0[a]].oam.paletteNum = a;
- StartSpriteAnim(&gSprites[gUnknown_02024BE0[a]], gBattleMonForms[a]);
- gSprites[gUnknown_02024BE0[a]].invisible = TRUE;
- gSprites[gUnknown_02024BE0[a]].callback = SpriteCallbackDummy;
+ gSprites[gUnknown_0300434C[a]].data1 = gObjectBankIDs[a];
+ gSprites[gObjectBankIDs[a]].data0 = a;
+ gSprites[gObjectBankIDs[a]].data2 = species;
+ gSprites[gObjectBankIDs[a]].oam.paletteNum = a;
+ StartSpriteAnim(&gSprites[gObjectBankIDs[a]], gBattleMonForms[a]);
+ gSprites[gObjectBankIDs[a]].invisible = TRUE;
+ gSprites[gObjectBankIDs[a]].callback = SpriteCallbackDummy;
gSprites[gUnknown_0300434C[a]].data0 = sub_8046400(0, 0xFF);
}
void sub_811F9D0(void)
{
- if (gUnknown_02023A60[gUnknown_02024A60][1] == 0)
+ if (gBattleBufferA[gActiveBank][1] == 0)
{
- ewram17810[gUnknown_02024A60].unk4 = 0;
- gUnknown_03004330[gUnknown_02024A60] = sub_811FA5C;
+ ewram17810[gActiveBank].unk4 = 0;
+ gBattleBankFunc[gActiveBank] = sub_811FA5C;
}
else
{
- FreeSpriteOamMatrix(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- DestroySprite(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- sub_8043DB0(gUnknown_03004340[gUnknown_02024A60]);
- dp01_tbl3_exec_completed();
+ FreeSpriteOamMatrix(&gSprites[gObjectBankIDs[gActiveBank]]);
+ DestroySprite(&gSprites[gObjectBankIDs[gActiveBank]]);
+ sub_8043DB0(gHealthboxIDs[gActiveBank]);
+ LinkPartnerBufferExecCompleted();
}
}
void sub_811FA5C(void)
{
- switch (ewram17810[gUnknown_02024A60].unk4)
+ switch (ewram17810[gActiveBank].unk4)
{
case 0:
- if (ewram17800[gUnknown_02024A60].unk0_2)
- move_anim_start_t4(gUnknown_02024A60, gUnknown_02024A60, gUnknown_02024A60, 5);
- ewram17810[gUnknown_02024A60].unk4 = 1;
+ if (ewram17800[gActiveBank].unk0_2)
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 5);
+ ewram17810[gActiveBank].unk4 = 1;
break;
case 1:
- if (!ewram17810[gUnknown_02024A60].unk0_6)
+ if (!ewram17810[gActiveBank].unk0_6)
{
- ewram17810[gUnknown_02024A60].unk4 = 0;
- move_anim_start_t4(gUnknown_02024A60, gUnknown_02024A60, gUnknown_02024A60, 1);
- gUnknown_03004330[gUnknown_02024A60] = sub_811DF34;
+ ewram17810[gActiveBank].unk4 = 0;
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 1);
+ gBattleBankFunc[gActiveBank] = sub_811DF34;
}
break;
}
@@ -1083,138 +1081,138 @@ void sub_811FAE4(void)
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
{
- if (battle_get_per_side_status(gUnknown_02024A60) & 2)
+ if (GetBankIdentity(gActiveBank) & 2)
xOffset = 16;
else
xOffset = -16;
- gender = gLinkPlayers[sub_803FC34(gUnknown_02024A60)].gender;
+ gender = gLinkPlayers[sub_803FC34(gActiveBank)].gender;
}
else
{
xOffset = 0;
gender = gLinkPlayers[GetMultiplayerId() ^ 1].gender;
}
- sub_8031AF4(gender, gUnknown_02024A60);
- GetMonSpriteTemplate_803C5A0(gender, battle_get_per_side_status(gUnknown_02024A60));
- gUnknown_02024BE0[gUnknown_02024A60] = CreateSprite(
+ sub_8031AF4(gender, gActiveBank);
+ GetMonSpriteTemplate_803C5A0(gender, GetBankIdentity(gActiveBank));
+ gObjectBankIDs[gActiveBank] = CreateSprite(
&gUnknown_02024E8C,
80 + xOffset, 80 + 4 * (8 - gTrainerBackPicCoords[gender].coords),
- sub_8079E90(gUnknown_02024A60));
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].oam.paletteNum = gUnknown_02024A60;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].pos2.x = 240;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data0 = -2;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].callback = sub_80313A0;
- gUnknown_03004330[gUnknown_02024A60] = sub_811DAE4;
+ sub_8079E90(gActiveBank));
+ gSprites[gObjectBankIDs[gActiveBank]].oam.paletteNum = gActiveBank;
+ gSprites[gObjectBankIDs[gActiveBank]].pos2.x = 240;
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = -2;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_80313A0;
+ gBattleBankFunc[gActiveBank] = sub_811DAE4;
}
void sub_811FC30(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_811FC3C(void)
{
- oamt_add_pos2_onto_pos1(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data0 = 35;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data2 = -40;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data4 = gSprites[gUnknown_02024BE0[gUnknown_02024A60]].pos1.y;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].callback = sub_8078B34;
- oamt_set_x3A_32(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]], SpriteCallbackDummy);
- gUnknown_03004330[gUnknown_02024A60] = sub_811DB1C;
+ oamt_add_pos2_onto_pos1(&gSprites[gObjectBankIDs[gActiveBank]]);
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = 35;
+ gSprites[gObjectBankIDs[gActiveBank]].data2 = -40;
+ gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34;
+ oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], SpriteCallbackDummy);
+ gBattleBankFunc[gActiveBank] = sub_811DB1C;
}
void sub_811FCE8(void)
{
- if (ewram17810[gUnknown_02024A60].unk4 == 0)
+ if (ewram17810[gActiveBank].unk4 == 0)
{
- if (ewram17800[gUnknown_02024A60].unk0_2)
- move_anim_start_t4(gUnknown_02024A60, gUnknown_02024A60, gUnknown_02024A60, 5);
- ewram17810[gUnknown_02024A60].unk4++;
+ if (ewram17800[gActiveBank].unk0_2)
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 5);
+ ewram17810[gActiveBank].unk4++;
}
- else if (!ewram17810[gUnknown_02024A60].unk0_6)
+ else if (!ewram17810[gActiveBank].unk0_6)
{
- ewram17810[gUnknown_02024A60].unk4 = 0;
- sub_80324F8(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], gUnknown_02024A60);
+ ewram17810[gActiveBank].unk4 = 0;
+ sub_80324F8(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
PlaySE12WithPanning(SE_POKE_DEAD, -64);
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data1 = 0;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data2 = 5;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].callback = sub_80105EC;
- gUnknown_03004330[gUnknown_02024A60] = sub_811DE98;
+ gSprites[gObjectBankIDs[gActiveBank]].data1 = 0;
+ gSprites[gObjectBankIDs[gActiveBank]].data2 = 5;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_80105EC;
+ gBattleBankFunc[gActiveBank] = sub_811DE98;
}
}
void sub_811FDCC(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_811FDD8(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_811FDE4(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_811FDF0(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_811FDFC(void)
{
- if (mplay_80342A4(gUnknown_02024A60) == 0)
+ if (mplay_80342A4(gActiveBank) == 0)
{
- u32 r0 = gUnknown_02023A60[gUnknown_02024A60][1]
- | (gUnknown_02023A60[gUnknown_02024A60][2] << 8);
-
- gUnknown_0202F7C4 = gUnknown_02023A60[gUnknown_02024A60][3];
- gUnknown_0202F7BC = gUnknown_02023A60[gUnknown_02024A60][4]
- | (gUnknown_02023A60[gUnknown_02024A60][5] << 8);
- gUnknown_0202F7B8 = gUnknown_02023A60[gUnknown_02024A60][6]
- | (gUnknown_02023A60[gUnknown_02024A60][7] << 8)
- | (gUnknown_02023A60[gUnknown_02024A60][8] << 16)
- | (gUnknown_02023A60[gUnknown_02024A60][9] << 24);
- gUnknown_0202F7BE = gUnknown_02023A60[gUnknown_02024A60][10];
- gUnknown_0202F7C0 = gUnknown_02023A60[gUnknown_02024A60][12]
- | (gUnknown_02023A60[gUnknown_02024A60][13] << 8);
- gUnknown_0202F7B4 = (u32 *)&gUnknown_02023A60[gUnknown_02024A60][16];
- gUnknown_02024E70[gUnknown_02024A60] = *gUnknown_0202F7B4;
+ u32 r0 = gBattleBufferA[gActiveBank][1]
+ | (gBattleBufferA[gActiveBank][2] << 8);
+
+ gUnknown_0202F7C4 = gBattleBufferA[gActiveBank][3];
+ gMovePowerMoveAnim = gBattleBufferA[gActiveBank][4]
+ | (gBattleBufferA[gActiveBank][5] << 8);
+ gMoveDmgMoveAnim = gBattleBufferA[gActiveBank][6]
+ | (gBattleBufferA[gActiveBank][7] << 8)
+ | (gBattleBufferA[gActiveBank][8] << 16)
+ | (gBattleBufferA[gActiveBank][9] << 24);
+ gHappinessMoveAnim = gBattleBufferA[gActiveBank][10];
+ gWeatherMoveAnim = gBattleBufferA[gActiveBank][12]
+ | (gBattleBufferA[gActiveBank][13] << 8);
+ gDisableStructMoveAnim = (u32 *)&gBattleBufferA[gActiveBank][16];
+ gPID_perBank[gActiveBank] = *gDisableStructMoveAnim;
if (sub_8031720(r0, gUnknown_0202F7C4) != 0)
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
else
{
- ewram17810[gUnknown_02024A60].unk4 = 0;
- gUnknown_03004330[gUnknown_02024A60] = sub_811FF30;
+ ewram17810[gActiveBank].unk4 = 0;
+ gBattleBankFunc[gActiveBank] = sub_811FF30;
}
}
}
void sub_811FF30(void)
{
- u16 r4 = gUnknown_02023A60[gUnknown_02024A60][1]
- | (gUnknown_02023A60[gUnknown_02024A60][2] << 8);
- u8 r7 = gUnknown_02023A60[gUnknown_02024A60][11];
+ u16 r4 = gBattleBufferA[gActiveBank][1]
+ | (gBattleBufferA[gActiveBank][2] << 8);
+ u8 r7 = gBattleBufferA[gActiveBank][11];
- switch (ewram17810[gUnknown_02024A60].unk4)
+ switch (ewram17810[gActiveBank].unk4)
{
case 0:
- if (ewram17800[gUnknown_02024A60].unk0_2 && !ewram17800[gUnknown_02024A60].unk0_3)
+ if (ewram17800[gActiveBank].unk0_2 && !ewram17800[gActiveBank].unk0_3)
{
- ewram17800[gUnknown_02024A60].unk0_3 = 1;
- move_anim_start_t4(gUnknown_02024A60, gUnknown_02024A60, gUnknown_02024A60, 5);
+ ewram17800[gActiveBank].unk0_3 = 1;
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 5);
}
- ewram17810[gUnknown_02024A60].unk4 = 1;
+ ewram17810[gActiveBank].unk4 = 1;
break;
case 1:
- if (!ewram17810[gUnknown_02024A60].unk0_6)
+ if (!ewram17810[gActiveBank].unk0_6)
{
sub_80326EC(0);
ExecuteMoveAnim(r4);
- ewram17810[gUnknown_02024A60].unk4 = 2;
+ ewram17810[gActiveBank].unk4 = 2;
}
break;
case 2:
@@ -1222,23 +1220,23 @@ void sub_811FF30(void)
if (!gAnimScriptActive)
{
sub_80326EC(1);
- if ((ewram17800[gUnknown_02024A60].unk0_2) && r7 <= 1)
+ if ((ewram17800[gActiveBank].unk0_2) && r7 <= 1)
{
- move_anim_start_t4(gUnknown_02024A60, gUnknown_02024A60, gUnknown_02024A60, 6);
- ewram17800[gUnknown_02024A60].unk0_3 = 0;
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 6);
+ ewram17800[gActiveBank].unk0_3 = 0;
}
- ewram17810[gUnknown_02024A60].unk4 = 3;
+ ewram17810[gActiveBank].unk4 = 3;
}
break;
case 3:
- if (!ewram17810[gUnknown_02024A60].unk0_6)
+ if (!ewram17810[gActiveBank].unk0_6)
{
sub_8031F24();
sub_80324BC(
- gUnknown_02024A60,
- gUnknown_02023A60[gUnknown_02024A60][1] | (gUnknown_02023A60[gUnknown_02024A60][2] << 8));
- ewram17810[gUnknown_02024A60].unk4 = 0;
- dp01_tbl3_exec_completed();
+ gActiveBank,
+ gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8));
+ ewram17810[gActiveBank].unk4 = 0;
+ LinkPartnerBufferExecCompleted();
}
break;
}
@@ -1248,215 +1246,215 @@ void sub_8120094(void)
{
gUnknown_030042A4 = 0;
gUnknown_030042A0 = 0;
- sub_8120AA8(*(u16 *)&gUnknown_02023A60[gUnknown_02024A60][2]);
- sub_8002EB0(&gUnknown_03004210, gUnknown_020238CC, 144, 2, 15);
- gUnknown_03004330[gUnknown_02024A60] = sub_811DFA0;
+ BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBank][2]);
+ sub_8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
+ gBattleBankFunc[gActiveBank] = sub_811DFA0;
}
void sub_81200F8(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120104(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120110(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_812011C(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120128(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120134(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120140(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
-void sub_812014C(void)
+void LinkPartnerHandleHealthBarUpdate(void)
{
s16 r7;
load_gfxc_health_bar(0);
- r7 = gUnknown_02023A60[gUnknown_02024A60][2] | (gUnknown_02023A60[gUnknown_02024A60][3] << 8);
+ r7 = gBattleBufferA[gActiveBank][2] | (gBattleBufferA[gActiveBank][3] << 8);
if (r7 != 0x7FFF)
{
- u32 maxHP = GetMonData(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], MON_DATA_MAX_HP);
- u32 hp = GetMonData(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], MON_DATA_HP);
+ u32 maxHP = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_MAX_HP);
+ u32 hp = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_HP);
- sub_8043D84(gUnknown_02024A60, gUnknown_03004340[gUnknown_02024A60], maxHP, hp, r7);
+ sub_8043D84(gActiveBank, gHealthboxIDs[gActiveBank], maxHP, hp, r7);
}
else
{
- u32 maxHP = GetMonData(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], MON_DATA_MAX_HP);
+ u32 maxHP = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_MAX_HP);
- sub_8043D84(gUnknown_02024A60, gUnknown_03004340[gUnknown_02024A60], maxHP, 0, r7);
+ sub_8043D84(gActiveBank, gHealthboxIDs[gActiveBank], maxHP, 0, r7);
}
- gUnknown_03004330[gUnknown_02024A60] = bx_t3_healthbar_update;
+ gBattleBankFunc[gActiveBank] = bx_t3_healthbar_update;
}
-void sub_812023C(void)
+void LinkPartnerHandleExpBarUpdate(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
-void sub_8120248(void)
+void LinkPartnerHandleStatusIconUpdate(void)
{
- if (mplay_80342A4(gUnknown_02024A60) == 0)
+ if (mplay_80342A4(gActiveBank) == 0)
{
- sub_8045A5C(gUnknown_03004340[gUnknown_02024A60], &gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], 9);
- ewram17810[gUnknown_02024A60].unk0_4 = 0;
- gUnknown_03004330[gUnknown_02024A60] = sub_811E38C;
+ sub_8045A5C(gHealthboxIDs[gActiveBank], &gPlayerParty[gBattlePartyID[gActiveBank]], 9);
+ ewram17810[gActiveBank].unk0_4 = 0;
+ gBattleBankFunc[gActiveBank] = sub_811E38C;
}
}
-void sub_81202BC(void)
+void LinkPartnerHandleStatusAnimation(void)
{
- if (mplay_80342A4(gUnknown_02024A60) == 0)
+ if (mplay_80342A4(gActiveBank) == 0)
{
move_anim_start_t2_for_situation(
- gUnknown_02023A60[gUnknown_02024A60][1],
- gUnknown_02023A60[gUnknown_02024A60][2]
- | (gUnknown_02023A60[gUnknown_02024A60][3] << 8)
- | (gUnknown_02023A60[gUnknown_02024A60][4] << 16)
- | (gUnknown_02023A60[gUnknown_02024A60][5] << 24));
- gUnknown_03004330[gUnknown_02024A60] = sub_811E38C;
+ gBattleBufferA[gActiveBank][1],
+ gBattleBufferA[gActiveBank][2]
+ | (gBattleBufferA[gActiveBank][3] << 8)
+ | (gBattleBufferA[gActiveBank][4] << 16)
+ | (gBattleBufferA[gActiveBank][5] << 24));
+ gBattleBankFunc[gActiveBank] = sub_811E38C;
}
}
void sub_8120324(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120330(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_812033C(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120348(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120354(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120360(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_812036C(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120378(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120384(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120390(void)
{
gUnknown_020238C8.unk0_0 = 0;
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_81203AC(void)
{
- gUnknown_020238C8.unk0_0 = gUnknown_02023A60[gUnknown_02024A60][1];
- dp01_tbl3_exec_completed();
+ gUnknown_020238C8.unk0_0 = gBattleBufferA[gActiveBank][1];
+ LinkPartnerBufferExecCompleted();
}
void sub_81203E4(void)
{
gUnknown_020238C8.unk0_7 = 0;
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_81203FC(void)
{
gUnknown_020238C8.unk0_7 ^= 1;
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
-void dp01t_29_3_blink(void)
+void LinkPartnerHandleHitAnimation(void)
{
- if (gSprites[gUnknown_02024BE0[gUnknown_02024A60]].invisible == TRUE)
- dp01_tbl3_exec_completed();
+ if (gSprites[gObjectBankIDs[gActiveBank]].invisible == TRUE)
+ LinkPartnerBufferExecCompleted();
else
{
- gUnknown_02024E6D = 1;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data1 = 0;
- sub_8047858(gUnknown_02024A60);
- gUnknown_03004330[gUnknown_02024A60] = bx_blink_t3;
+ gDoingBattleAnim = 1;
+ gSprites[gObjectBankIDs[gActiveBank]].data1 = 0;
+ sub_8047858(gActiveBank);
+ gBattleBankFunc[gActiveBank] = bx_blink_t3;
}
}
void sub_8120494(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
-void sub_81204A0(void)
+void LinkPartnerHandleEffectivenessSound(void)
{
s8 pan;
- if (battle_side_get_owner(gUnknown_02024A60) == 0)
+ if (GetBankSide(gActiveBank) == 0)
pan = -64;
else
pan = 63;
- PlaySE12WithPanning(gUnknown_02023A60[gUnknown_02024A60][1] | (gUnknown_02023A60[gUnknown_02024A60][2] << 8), pan);
- dp01_tbl3_exec_completed();
+ PlaySE12WithPanning(gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8), pan);
+ LinkPartnerBufferExecCompleted();
}
void sub_81204E4(void)
{
- PlayFanfare(gUnknown_02023A60[gUnknown_02024A60][1] | (gUnknown_02023A60[gUnknown_02024A60][2] << 8));
- dp01_tbl3_exec_completed();
+ PlayFanfare(gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8));
+ LinkPartnerBufferExecCompleted();
}
-void sub_8120514(void)
+void LinkPartnerHandleFaintingCry(void)
{
PlayCry3(
- GetMonData(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], MON_DATA_SPECIES),
+ GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES),
-25, 5);
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void dp01t_2E_3_battle_intro(void)
{
- sub_80E43C0(gUnknown_02023A60[gUnknown_02024A60][1]);
+ sub_80E43C0(gBattleBufferA[gActiveBank][1]);
gUnknown_02024DE8 |= 1;
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120588(void)
@@ -1464,25 +1462,25 @@ void sub_8120588(void)
u8 r4;
u8 taskId;
- oamt_add_pos2_onto_pos1(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]]);
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data0 = 50;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data2 = -40;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data4 = gSprites[gUnknown_02024BE0[gUnknown_02024A60]].pos1.y;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].callback = sub_8078B34;
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].data5 = gUnknown_02024A60;
- oamt_set_x3A_32(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]], sub_8030E38);
- StartSpriteAnim(&gSprites[gUnknown_02024BE0[gUnknown_02024A60]], 1);
+ oamt_add_pos2_onto_pos1(&gSprites[gObjectBankIDs[gActiveBank]]);
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = 50;
+ gSprites[gObjectBankIDs[gActiveBank]].data2 = -40;
+ gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34;
+ gSprites[gObjectBankIDs[gActiveBank]].data5 = gActiveBank;
+ oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], sub_8030E38);
+ StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], 1);
r4 = AllocSpritePalette(0xD6F9);
LoadCompressedPalette(
- gTrainerBackPicPaletteTable[gLinkPlayers[sub_803FC34(gUnknown_02024A60)].gender].data,
+ gTrainerBackPicPaletteTable[gLinkPlayers[sub_803FC34(gActiveBank)].gender].data,
0x100 + r4 * 16, 0x20);
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].oam.paletteNum = r4;
+ gSprites[gObjectBankIDs[gActiveBank]].oam.paletteNum = r4;
taskId = CreateTask(sub_812071C, 5);
- gTasks[taskId].data[0] = gUnknown_02024A60;
- if (ewram17810[gUnknown_02024A60].unk0_0)
- gTasks[gUnknown_02024E68[gUnknown_02024A60]].func = sub_8044CA0;
+ gTasks[taskId].data[0] = gActiveBank;
+ if (ewram17810[gActiveBank].unk0_0)
+ gTasks[gUnknown_02024E68[gActiveBank]].func = sub_8044CA0;
ewram17840.unk9_0 = 1;
- gUnknown_03004330[gUnknown_02024A60] = nullsub_74;
+ gBattleBankFunc[gActiveBank] = nullsub_74;
}
void sub_812071C(u8 taskId)
@@ -1495,111 +1493,111 @@ void sub_812071C(u8 taskId)
return;
}
- r9 = gUnknown_02024A60;
- gUnknown_02024A60 = gTasks[taskId].data[0];
+ r9 = gActiveBank;
+ gActiveBank = gTasks[taskId].data[0];
if (!IsDoubleBattle() || (gBattleTypeFlags & BATTLE_TYPE_MULTI))
{
- gUnknown_02023A60[gUnknown_02024A60][1] = gUnknown_02024A6A[gUnknown_02024A60];
- sub_811F864(gUnknown_02024A60, 0);
+ gBattleBufferA[gActiveBank][1] = gBattlePartyID[gActiveBank];
+ sub_811F864(gActiveBank, 0);
}
else
{
- gUnknown_02023A60[gUnknown_02024A60][1] = gUnknown_02024A6A[gUnknown_02024A60];
- sub_811F864(gUnknown_02024A60, 0);
- gUnknown_02024A60 ^= 2;
- gUnknown_02023A60[gUnknown_02024A60][1] = gUnknown_02024A6A[gUnknown_02024A60];
- sub_80318FC(&gPlayerParty[gUnknown_02024A6A[gUnknown_02024A60]], gUnknown_02024A60);
- sub_811F864(gUnknown_02024A60, 0);
- gUnknown_02024A60 ^= 2;
+ gBattleBufferA[gActiveBank][1] = gBattlePartyID[gActiveBank];
+ sub_811F864(gActiveBank, 0);
+ gActiveBank ^= 2;
+ gBattleBufferA[gActiveBank][1] = gBattlePartyID[gActiveBank];
+ sub_80318FC(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+ sub_811F864(gActiveBank, 0);
+ gActiveBank ^= 2;
}
- gUnknown_03004330[gUnknown_02024A60] = sub_811DCA0;
- gUnknown_02024A60 = r9;
+ gBattleBankFunc[gActiveBank] = sub_811DCA0;
+ gActiveBank = r9;
DestroyTask(taskId);
}
void dp01t_30_3_80EB11C(void)
{
- if (gUnknown_02023A60[gUnknown_02024A60][1] != 0 && battle_side_get_owner(gUnknown_02024A60) == 0)
+ if (gBattleBufferA[gActiveBank][1] != 0 && GetBankSide(gActiveBank) == 0)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
return;
}
- ewram17810[gUnknown_02024A60].unk0_0 = 1;
- gUnknown_02024E68[gUnknown_02024A60] = sub_8044804(
- gUnknown_02024A60,
- (struct BattleInterfaceStruct2 *)&gUnknown_02023A60[gUnknown_02024A60][4],
- gUnknown_02023A60[gUnknown_02024A60][1],
- gUnknown_02023A60[gUnknown_02024A60][2]);
- ewram17810[gUnknown_02024A60].unk5 = 0;
- if (gUnknown_02023A60[gUnknown_02024A60][2] != 0)
- ewram17810[gUnknown_02024A60].unk5 = 0x5D;
- gUnknown_03004330[gUnknown_02024A60] = sub_81208E0;
+ ewram17810[gActiveBank].unk0_0 = 1;
+ gUnknown_02024E68[gActiveBank] = sub_8044804(
+ gActiveBank,
+ (struct BattleInterfaceStruct2 *)&gBattleBufferA[gActiveBank][4],
+ gBattleBufferA[gActiveBank][1],
+ gBattleBufferA[gActiveBank][2]);
+ ewram17810[gActiveBank].unk5 = 0;
+ if (gBattleBufferA[gActiveBank][2] != 0)
+ ewram17810[gActiveBank].unk5 = 0x5D;
+ gBattleBankFunc[gActiveBank] = sub_81208E0;
}
void sub_81208E0(void)
{
- if (ewram17810[gUnknown_02024A60].unk5++ >= 93)
+ if (ewram17810[gActiveBank].unk5++ >= 93)
{
- ewram17810[gUnknown_02024A60].unk5 = 0;
- dp01_tbl3_exec_completed();
+ ewram17810[gActiveBank].unk5 = 0;
+ LinkPartnerBufferExecCompleted();
}
}
void sub_8120920(void)
{
- if (ewram17810[gUnknown_02024A60].unk0_0)
- gTasks[gUnknown_02024E68[gUnknown_02024A60]].func = sub_8044CA0;
- dp01_tbl3_exec_completed();
+ if (ewram17810[gActiveBank].unk0_0)
+ gTasks[gUnknown_02024E68[gActiveBank]].func = sub_8044CA0;
+ LinkPartnerBufferExecCompleted();
}
void sub_812096C(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120978(void)
{
- if (sub_8078874(gUnknown_02024A60) != 0)
+ if (sub_8078874(gActiveBank) != 0)
{
- gSprites[gUnknown_02024BE0[gUnknown_02024A60]].invisible = gUnknown_02023A60[gUnknown_02024A60][1];
- sub_8031F88(gUnknown_02024A60);
+ gSprites[gObjectBankIDs[gActiveBank]].invisible = gBattleBufferA[gActiveBank][1];
+ sub_8031F88(gActiveBank);
}
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_81209D8(void)
{
- if (mplay_80342A4(gUnknown_02024A60) == 0)
+ if (mplay_80342A4(gActiveBank) == 0)
{
- u8 r3 = gUnknown_02023A60[gUnknown_02024A60][1];
- u16 r4 = gUnknown_02023A60[gUnknown_02024A60][2] | (gUnknown_02023A60[gUnknown_02024A60][3] << 8);
- u8 var = gUnknown_02024A60;
+ u8 r3 = gBattleBufferA[gActiveBank][1];
+ u16 r4 = gBattleBufferA[gActiveBank][2] | (gBattleBufferA[gActiveBank][3] << 8);
+ u8 var = gActiveBank;
if (move_anim_start_t3(var, var, var, r3, r4) != 0)
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
else
- gUnknown_03004330[gUnknown_02024A60] = sub_811E3B8;
+ gBattleBankFunc[gActiveBank] = sub_811E3B8;
}
}
void sub_8120A40(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120A4C(void)
{
- dp01_tbl3_exec_completed();
+ LinkPartnerBufferExecCompleted();
}
void sub_8120A58(void)
{
- gUnknown_02024D26 = gUnknown_02023A60[gUnknown_02024A60][1];
+ gBattleOutcome = gBattleBufferA[gActiveBank][1];
FadeOutMapMusic(5);
BeginFastPaletteFade(3);
- dp01_tbl3_exec_completed();
- gUnknown_03004330[gUnknown_02024A60] = sub_811E29C;
+ LinkPartnerBufferExecCompleted();
+ gBattleBankFunc[gActiveBank] = sub_811E29C;
}
void nullsub_75(void)
diff --git a/src/battle_ai.c b/src/battle_ai.c
index 4f00cc7cb..fabe0b61d 100644
--- a/src/battle_ai.c
+++ b/src/battle_ai.c
@@ -1,7 +1,6 @@
#include "global.h"
#include "battle_ai.h"
#include "abilities.h"
-#include "asm.h"
#include "battle.h"
#include "battle_move_effects.h"
#include "data2.h"
@@ -9,35 +8,31 @@
#include "moves.h"
#include "pokemon.h"
#include "rng.h"
+#include "rom_8077ABC.h"
#include "species.h"
-
-extern void sub_801CAF8(u8, u8);
-
-extern void move_effectiveness_something(u16, u8, u8);
+#include "util.h"
extern u16 gBattleTypeFlags;
extern u16 gBattleWeather;
-extern u8 gUnknown_02024A60;
-extern u8 gUnknown_02024A6A[][2];
-extern u16 gUnknown_02024BE6;
+extern u8 gActiveBank;
+extern u8 gBattlePartyID[][2];
+extern u16 gCurrentMove;
extern int gBattleMoveDamage;
-extern u8 gPlayerMonIndex;
-extern u8 gEnemyMonIndex;
-extern u8 gUnknown_02024C0C;
+extern u8 gBankAttacker;
+extern u8 gBankTarget;
+extern u8 gAbsentBankFlags;
extern u8 gBattleMoveFlags;
-extern u16 gUnknown_02024DEC;
-extern u16 gUnknown_02024C34[];
+extern u16 gDynamicBasePower;
+extern u16 gLastUsedMove[];
extern u32 gUnknown_02024ACC[];
-extern u32 gUnknown_02024C98[];
-extern u16 gUnknown_02024C7A[];
+extern u32 gStatuses3[];
+extern u16 gSideAffecting[];
extern struct BattlePokemon gBattleMons[];
extern struct BattlePokemon gUnknown_02024A8C[];
-extern u8 gUnknown_030042E0[];
+extern u8 gBattleResults[];
extern u8 gCritMultiplier;
extern u16 gTrainerBattleOpponent;
-extern u32 gBitTable[];
extern u8 *BattleAIs[];
-extern struct BaseStats gBaseStats[];
/*
gAIScriptPtr is a pointer to the next battle AI cmd command to read.
@@ -301,7 +296,7 @@ void BattleAI_SetupAIData(void)
for (i = 0; i < MAX_MON_MOVES; i++)
AI_THINKING_STRUCT->score[i] = 100;
- r7 = sub_8015A98(gUnknown_02024A60, 0, 0xFF);
+ r7 = sub_8015A98(gActiveBank, 0, 0xFF);
// probably sets up the moves to consider and ignores non-valid moves such as NO_MOVE or glitch moves.
for (i = 0; i < MAX_MON_MOVES; i++)
@@ -314,17 +309,17 @@ void BattleAI_SetupAIData(void)
// clear AI stack.
AI_STACK->size = 0;
- gPlayerMonIndex = gUnknown_02024A60;
+ gBankAttacker = gActiveBank;
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
{
- gEnemyMonIndex = Random() & 2; // just pick somebody to target.
+ gBankTarget = Random() & 2; // just pick somebody to target.
- if (gUnknown_02024C0C & gBitTable[gEnemyMonIndex])
- gEnemyMonIndex ^= 2;
+ if (gAbsentBankFlags & gBitTable[gBankTarget])
+ gBankTarget ^= 2;
}
else
- gEnemyMonIndex = gUnknown_02024A60 ^ 1;
+ gBankTarget = gActiveBank ^ 1;
// special AI flag cases.
if (gBattleTypeFlags & BATTLE_TYPE_SAFARI)
@@ -399,13 +394,13 @@ void BattleAI_DoAIProcessing(void)
break;
case AIState_SettingUp:
gAIScriptPtr = BattleAIs[AI_THINKING_STRUCT->aiLogicId]; // set the AI ptr.
- if (gBattleMons[gPlayerMonIndex].pp[AI_THINKING_STRUCT->movesetIndex] == 0)
+ if (gBattleMons[gBankAttacker].pp[AI_THINKING_STRUCT->movesetIndex] == 0)
{
AI_THINKING_STRUCT->moveConsidered = MOVE_NONE; // don't consider a move you have 0 PP for, idiot.
}
else
{
- AI_THINKING_STRUCT->moveConsidered = gBattleMons[gPlayerMonIndex].moves[AI_THINKING_STRUCT->movesetIndex];
+ AI_THINKING_STRUCT->moveConsidered = gBattleMons[gBankAttacker].moves[AI_THINKING_STRUCT->movesetIndex];
}
AI_THINKING_STRUCT->aiState++;
break;
@@ -438,9 +433,9 @@ void sub_810745C(void)
for (i = 0; i < 8; i++)
{
- if (UNK_2016A00_STRUCT->movesUsed[gEnemyMonIndex >> 1][i] == 0)
+ if (UNK_2016A00_STRUCT->movesUsed[gBankTarget >> 1][i] == 0)
{
- UNK_2016A00_STRUCT->movesUsed[gEnemyMonIndex >> 1][i] = gUnknown_02024C34[gEnemyMonIndex];
+ UNK_2016A00_STRUCT->movesUsed[gBankTarget >> 1][i] = gLastUsedMove[gBankTarget];
return;
}
}
@@ -456,14 +451,14 @@ void unref_sub_81074A0(u8 a)
void sub_81074C4(u8 a, u8 b)
{
- if (battle_side_get_owner(a) == 0)
- UNK_2016A00_STRUCT->unk20[battle_get_per_side_status(a) & 1] = b;
+ if (GetBankSide(a) == 0)
+ UNK_2016A00_STRUCT->unk20[GetBankIdentity(a) & 1] = b;
}
void sub_81074F8(u8 a, u8 b)
{
- if (battle_side_get_owner(a) == 0)
- UNK_2016A00_STRUCT->unk22[battle_get_per_side_status(a) & 1] = b;
+ if (GetBankSide(a) == 0)
+ UNK_2016A00_STRUCT->unk22[GetBankIdentity(a) & 1] = b;
}
static void BattleAICmd_if_random_less_than(void)
@@ -513,9 +508,9 @@ static void BattleAICmd_if_hp_less_than(void)
u16 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) < gAIScriptPtr[2])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
@@ -528,9 +523,9 @@ static void BattleAICmd_if_hp_more_than(void)
u16 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) > gAIScriptPtr[2])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
@@ -543,9 +538,9 @@ static void BattleAICmd_if_hp_equal(void)
u16 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) == gAIScriptPtr[2])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
@@ -558,9 +553,9 @@ static void BattleAICmd_if_hp_not_equal(void)
u16 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) != gAIScriptPtr[2])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
@@ -574,9 +569,9 @@ static void BattleAICmd_if_status(void)
u32 arg;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
arg = AIScriptRead32(gAIScriptPtr + 2);
@@ -592,9 +587,9 @@ static void BattleAICmd_if_not_status(void)
u32 arg;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
arg = AIScriptRead32(gAIScriptPtr + 2);
@@ -610,9 +605,9 @@ static void BattleAICmd_if_status2(void)
u32 arg;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
arg = AIScriptRead32(gAIScriptPtr + 2);
@@ -628,9 +623,9 @@ static void BattleAICmd_if_not_status2(void)
u32 arg;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
arg = AIScriptRead32(gAIScriptPtr + 2);
@@ -646,13 +641,13 @@ static void BattleAICmd_if_status3(void)
u32 arg;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
arg = AIScriptRead32(gAIScriptPtr + 2);
- if ((gUnknown_02024C98[index] & arg) != 0)
+ if ((gStatuses3[index] & arg) != 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -664,13 +659,13 @@ static void BattleAICmd_if_not_status3(void)
u32 arg;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
arg = AIScriptRead32(gAIScriptPtr + 2);
- if ((gUnknown_02024C98[index] & arg) == 0)
+ if ((gStatuses3[index] & arg) == 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -682,14 +677,14 @@ static void BattleAICmd_if_status4(void)
u32 arg1, arg2;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
- arg1 = battle_get_per_side_status(index) & 1;
+ arg1 = GetBankIdentity(index) & 1;
arg2 = AIScriptRead32(gAIScriptPtr + 2);
- if ((gUnknown_02024C7A[arg1] & arg2) != 0)
+ if ((gSideAffecting[arg1] & arg2) != 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -701,14 +696,14 @@ static void BattleAICmd_if_not_status4(void)
u32 arg1, arg2;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
- arg1 = battle_get_per_side_status(index) & 1;
+ arg1 = GetBankIdentity(index) & 1;
arg2 = AIScriptRead32(gAIScriptPtr + 2);
- if ((gUnknown_02024C7A[arg1] & arg2) == 0)
+ if ((gSideAffecting[arg1] & arg2) == 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -876,8 +871,8 @@ static void BattleAICmd_if_user_can_damage(void)
for (i = 0; i < MAX_MON_MOVES; i++)
{
- if (gBattleMons[gPlayerMonIndex].moves[i] != 0
- && gBattleMoves[gBattleMons[gPlayerMonIndex].moves[i]].power != 0)
+ if (gBattleMons[gBankAttacker].moves[i] != 0
+ && gBattleMoves[gBattleMons[gBankAttacker].moves[i]].power != 0)
break;
}
if (i == MAX_MON_MOVES)
@@ -892,8 +887,8 @@ static void BattleAICmd_if_user_cant_damage(void)
for (i = 0; i < MAX_MON_MOVES; i++)
{
- if (gBattleMons[gPlayerMonIndex].moves[i] != 0
- && gBattleMoves[gBattleMons[gPlayerMonIndex].moves[i]].power != 0)
+ if (gBattleMons[gBankAttacker].moves[i] != 0
+ && gBattleMoves[gBattleMons[gBankAttacker].moves[i]].power != 0)
break;
}
if (i != MAX_MON_MOVES)
@@ -904,7 +899,7 @@ static void BattleAICmd_if_user_cant_damage(void)
static void BattleAICmd_get_turn_count(void)
{
- AI_THINKING_STRUCT->funcResult = gUnknown_030042E0[19];
+ AI_THINKING_STRUCT->funcResult = gBattleResults[19];
gAIScriptPtr += 1;
}
@@ -913,16 +908,16 @@ static void BattleAICmd_get_type(void)
switch (gAIScriptPtr[1])
{
case 1: // player primary type
- AI_THINKING_STRUCT->funcResult = gBattleMons[gPlayerMonIndex].type1;
+ AI_THINKING_STRUCT->funcResult = gBattleMons[gBankAttacker].type1;
break;
case 0: // enemy primary type
- AI_THINKING_STRUCT->funcResult = gBattleMons[gEnemyMonIndex].type1;
+ AI_THINKING_STRUCT->funcResult = gBattleMons[gBankTarget].type1;
break;
case 3: // player secondary type
- AI_THINKING_STRUCT->funcResult = gBattleMons[gPlayerMonIndex].type2;
+ AI_THINKING_STRUCT->funcResult = gBattleMons[gBankAttacker].type2;
break;
case 2: // enemy secondary type
- AI_THINKING_STRUCT->funcResult = gBattleMons[gEnemyMonIndex].type2;
+ AI_THINKING_STRUCT->funcResult = gBattleMons[gBankTarget].type2;
break;
case 4: // type of move being pointed to
AI_THINKING_STRUCT->funcResult = gBattleMoves[AI_THINKING_STRUCT->moveConsidered].type;
@@ -950,7 +945,7 @@ static void BattleAICmd_is_most_powerful_move(void)
if (gBattleMoves[AI_THINKING_STRUCT->moveConsidered].power > 1
&& sDiscouragedPowerfulMoveEffects[i] == 0xFFFF)
{
- gUnknown_02024DEC = 0;
+ gDynamicBasePower = 0;
unk_2000000[0x1601C] = 0; // why is this a manual array?
unk_2000000[0x1601F] = 1;
gBattleMoveFlags = 0;
@@ -960,18 +955,18 @@ static void BattleAICmd_is_most_powerful_move(void)
{
for (j = 0; sDiscouragedPowerfulMoveEffects[j] != 0xFFFF; j++)
{ // _08108276
- if (gBattleMoves[gBattleMons[gPlayerMonIndex].moves[i]].effect == sDiscouragedPowerfulMoveEffects[j])
+ if (gBattleMoves[gBattleMons[gBankAttacker].moves[i]].effect == sDiscouragedPowerfulMoveEffects[j])
break;
}
// _081082BA
- if (gBattleMons[gPlayerMonIndex].moves[i]
+ if (gBattleMons[gBankAttacker].moves[i]
&& sDiscouragedPowerfulMoveEffects[j] == 0xFFFF
- && gBattleMoves[gBattleMons[gPlayerMonIndex].moves[i]].power > 1)
+ && gBattleMoves[gBattleMons[gBankAttacker].moves[i]].power > 1)
{
- gUnknown_02024BE6 = gBattleMons[gPlayerMonIndex].moves[i];
- sub_801CAF8(gPlayerMonIndex, gEnemyMonIndex);
- move_effectiveness_something(gUnknown_02024BE6, gPlayerMonIndex, gEnemyMonIndex);
+ gCurrentMove = gBattleMons[gBankAttacker].moves[i];
+ sub_801CAF8(gBankAttacker, gBankTarget);
+ move_effectiveness_something(gCurrentMove, gBankAttacker, gBankTarget);
damages[i] = (gBattleMoveDamage * AI_THINKING_STRUCT->simulatedRNG[i]) / 100;
if (damages[i] == 0) // moves always do at least 1 damage.
@@ -1054,7 +1049,7 @@ _08108240:\n\
beq _08108250\n\
b _081083B2\n\
_08108250:\n\
- ldr r0, _08108338 @ =gUnknown_02024DEC\n\
+ ldr r0, _08108338 @ =gDynamicBasePower\n\
movs r1, 0\n\
strh r1, [r0]\n\
ldr r2, _0810833C @ =0xfffff81c\n\
@@ -1077,7 +1072,7 @@ _08108276:\n\
movs r3, 0\n\
ldr r5, _08108348 @ =gBattleMons\n\
lsls r4, r6, 1\n\
- ldr r7, _0810834C @ =gPlayerMonIndex\n\
+ ldr r7, _0810834C @ =gBankAttacker\n\
lsls r1, r6, 2\n\
mov r8, r1\n\
adds r2, r6, 0x1\n\
@@ -1135,10 +1130,10 @@ _081082BA:\n\
ldrb r0, [r1, 0x1]\n\
cmp r0, 0x1\n\
bls _0810835C\n\
- ldr r5, _08108350 @ =gUnknown_02024BE6\n\
+ ldr r5, _08108350 @ =gCurrentMove\n\
strh r2, [r5]\n\
ldrb r0, [r7]\n\
- ldr r4, _08108354 @ =gEnemyMonIndex\n\
+ ldr r4, _08108354 @ =gBankTarget\n\
ldrb r1, [r4]\n\
bl sub_801CAF8\n\
ldrh r0, [r5]\n\
@@ -1167,14 +1162,14 @@ _08108328: .4byte sDiscouragedPowerfulMoveEffects\n\
_0810832C: .4byte 0x0000ffff\n\
_08108330: .4byte gBattleMoves\n\
_08108334: .4byte 0x02016800\n\
-_08108338: .4byte gUnknown_02024DEC\n\
+_08108338: .4byte gDynamicBasePower\n\
_0810833C: .4byte 0xfffff81c\n\
_08108340: .4byte gBattleMoveFlags\n\
_08108344: .4byte gCritMultiplier\n\
_08108348: .4byte gBattleMons\n\
-_0810834C: .4byte gPlayerMonIndex\n\
-_08108350: .4byte gUnknown_02024BE6\n\
-_08108354: .4byte gEnemyMonIndex\n\
+_0810834C: .4byte gBankAttacker\n\
+_08108350: .4byte gCurrentMove\n\
+_08108354: .4byte gBankTarget\n\
_08108358: .4byte gBattleMoveDamage\n\
_0810835C:\n\
mov r1, sp\n\
@@ -1248,9 +1243,9 @@ _081083D0: .4byte gAIScriptPtr\n\
static void BattleAICmd_get_move(void)
{
if (gAIScriptPtr[1] == USER)
- AI_THINKING_STRUCT->funcResult = gUnknown_02024C34[gPlayerMonIndex];
+ AI_THINKING_STRUCT->funcResult = gLastUsedMove[gBankAttacker];
else
- AI_THINKING_STRUCT->funcResult = gUnknown_02024C34[gEnemyMonIndex];
+ AI_THINKING_STRUCT->funcResult = gLastUsedMove[gBankTarget];
gAIScriptPtr += 2;
}
@@ -1273,7 +1268,7 @@ static void BattleAICmd_if_arg_not_equal(void)
static void BattleAICmd_if_would_go_first(void)
{
- if (b_first_side(gPlayerMonIndex, gEnemyMonIndex, 1) == gAIScriptPtr[1])
+ if (b_first_side(gBankAttacker, gBankTarget, 1) == gAIScriptPtr[1])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
else
gAIScriptPtr += 6;
@@ -1281,7 +1276,7 @@ static void BattleAICmd_if_would_go_first(void)
static void BattleAICmd_if_would_not_go_first(void)
{
- if (b_first_side(gPlayerMonIndex, gEnemyMonIndex, 1) != gAIScriptPtr[1])
+ if (b_first_side(gBankAttacker, gBankTarget, 1) != gAIScriptPtr[1])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
else
gAIScriptPtr += 6;
@@ -1305,11 +1300,11 @@ static void BattleAICmd_count_alive_pokemon(void)
AI_THINKING_STRUCT->funcResult = 0;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
- if (battle_side_get_owner(index) == 0)
+ if (GetBankSide(index) == 0)
party = gPlayerParty;
else
party = gEnemyParty;
@@ -1317,14 +1312,14 @@ static void BattleAICmd_count_alive_pokemon(void)
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
{
u32 status;
- var = gUnknown_02024A6A[index][0];
- status = battle_get_per_side_status(index) ^ 2;
- var2 = gUnknown_02024A6A[battle_get_side_with_given_state(status)][0];
+ var = gBattlePartyID[index][0];
+ status = GetBankIdentity(index) ^ 2;
+ var2 = gBattlePartyID[GetBankByPlayerAI(status)][0];
}
else
{
- var = gUnknown_02024A6A[index][0];
- var2 = gUnknown_02024A6A[index][0];
+ var = gBattlePartyID[index][0];
+ var2 = gBattlePartyID[index][0];
}
for (i = 0; i < 6; i++)
@@ -1358,13 +1353,13 @@ static void BattleAICmd_get_ability(void)
u8 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
- if (battle_side_get_owner(index) == TARGET)
+ if (GetBankSide(index) == TARGET)
{
- u16 unk = battle_get_per_side_status(index) & 1;
+ u16 unk = GetBankIdentity(index) & 1;
if (UNK_2016A00_STRUCT->unk20[unk] != 0)
{
@@ -1419,7 +1414,7 @@ static void BattleAICmd_get_highest_possible_damage(void)
{
s32 i;
- gUnknown_02024DEC = 0;
+ gDynamicBasePower = 0;
BATTLE_STRUCT->unk.unk1 = 0;
BATTLE_STRUCT->unk.unk4 = 1;
gBattleMoveFlags = 0;
@@ -1429,11 +1424,11 @@ static void BattleAICmd_get_highest_possible_damage(void)
for (i = 0; i < MAX_MON_MOVES; i++)
{
gBattleMoveDamage = 40;
- gUnknown_02024BE6 = gBattleMons[gPlayerMonIndex].moves[i];
+ gCurrentMove = gBattleMons[gBankAttacker].moves[i];
- if (gUnknown_02024BE6)
+ if (gCurrentMove)
{
- move_effectiveness_something(gUnknown_02024BE6, gPlayerMonIndex, gEnemyMonIndex);
+ move_effectiveness_something(gCurrentMove, gBankAttacker, gBankTarget);
// reduce by 1/3.
if (gBattleMoveDamage == 120)
@@ -1459,16 +1454,16 @@ static void BattleAICmd_if_damage_bonus(void)
{
u8 damageVar;
- gUnknown_02024DEC = 0;
+ gDynamicBasePower = 0;
BATTLE_STRUCT->unk.unk1 = 0;
BATTLE_STRUCT->unk.unk4 = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
gBattleMoveDamage = 40;
- gUnknown_02024BE6 = AI_THINKING_STRUCT->moveConsidered;
+ gCurrentMove = AI_THINKING_STRUCT->moveConsidered;
- move_effectiveness_something(gUnknown_02024BE6, gPlayerMonIndex, gEnemyMonIndex);
+ move_effectiveness_something(gCurrentMove, gBankAttacker, gBankTarget);
if (gBattleMoveDamage == 120)
gBattleMoveDamage = 80;
@@ -1603,9 +1598,9 @@ static void BattleAICmd_if_stat_level_less_than(void)
u32 party;
if (gAIScriptPtr[1] == USER)
- party = gPlayerMonIndex;
+ party = gBankAttacker;
else
- party = gEnemyMonIndex;
+ party = gBankTarget;
if (gBattleMons[party].statStages[gAIScriptPtr[2]] < gAIScriptPtr[3])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4);
@@ -1618,9 +1613,9 @@ static void BattleAICmd_if_stat_level_more_than(void)
u32 party;
if (gAIScriptPtr[1] == USER)
- party = gPlayerMonIndex;
+ party = gBankAttacker;
else
- party = gEnemyMonIndex;
+ party = gBankTarget;
if (gBattleMons[party].statStages[gAIScriptPtr[2]] > gAIScriptPtr[3])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4);
@@ -1633,9 +1628,9 @@ static void BattleAICmd_if_stat_level_equal(void)
u32 party;
if (gAIScriptPtr[1] == USER)
- party = gPlayerMonIndex;
+ party = gBankAttacker;
else
- party = gEnemyMonIndex;
+ party = gBankTarget;
if (gBattleMons[party].statStages[gAIScriptPtr[2]] == gAIScriptPtr[3])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4);
@@ -1648,9 +1643,9 @@ static void BattleAICmd_if_stat_level_not_equal(void)
u32 party;
if (gAIScriptPtr[1] == USER)
- party = gPlayerMonIndex;
+ party = gBankAttacker;
else
- party = gEnemyMonIndex;
+ party = gBankTarget;
if (gBattleMons[party].statStages[gAIScriptPtr[2]] != gAIScriptPtr[3])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4);
@@ -1666,14 +1661,14 @@ static void BattleAICmd_if_can_faint(void)
return;
}
- gUnknown_02024DEC = 0;
+ gDynamicBasePower = 0;
BATTLE_STRUCT->unk.unk1 = 0;
BATTLE_STRUCT->unk.unk4 = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
- gUnknown_02024BE6 = AI_THINKING_STRUCT->moveConsidered;
- sub_801CAF8(gPlayerMonIndex, gEnemyMonIndex);
- move_effectiveness_something(gUnknown_02024BE6, gPlayerMonIndex, gEnemyMonIndex);
+ gCurrentMove = AI_THINKING_STRUCT->moveConsidered;
+ sub_801CAF8(gBankAttacker, gBankTarget);
+ move_effectiveness_something(gCurrentMove, gBankAttacker, gBankTarget);
gBattleMoveDamage = gBattleMoveDamage * AI_THINKING_STRUCT->simulatedRNG[AI_THINKING_STRUCT->movesetIndex] / 100;
@@ -1681,7 +1676,7 @@ static void BattleAICmd_if_can_faint(void)
if (gBattleMoveDamage == 0)
gBattleMoveDamage = 1;
- if (gBattleMons[gEnemyMonIndex].hp <= gBattleMoveDamage)
+ if (gBattleMons[gBankTarget].hp <= gBattleMoveDamage)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1);
else
gAIScriptPtr += 5;
@@ -1695,20 +1690,20 @@ static void BattleAICmd_if_cant_faint(void)
return;
}
- gUnknown_02024DEC = 0;
+ gDynamicBasePower = 0;
BATTLE_STRUCT->unk.unk1 = 0;
BATTLE_STRUCT->unk.unk4 = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
- gUnknown_02024BE6 = AI_THINKING_STRUCT->moveConsidered;
- sub_801CAF8(gPlayerMonIndex, gEnemyMonIndex);
- move_effectiveness_something(gUnknown_02024BE6, gPlayerMonIndex, gEnemyMonIndex);
+ gCurrentMove = AI_THINKING_STRUCT->moveConsidered;
+ sub_801CAF8(gBankAttacker, gBankTarget);
+ move_effectiveness_something(gCurrentMove, gBankAttacker, gBankTarget);
gBattleMoveDamage = gBattleMoveDamage * AI_THINKING_STRUCT->simulatedRNG[AI_THINKING_STRUCT->movesetIndex] / 100;
// this macro is missing the damage 0 = 1 assumption.
- if (gBattleMons[gEnemyMonIndex].hp > gBattleMoveDamage)
+ if (gBattleMons[gBankTarget].hp > gBattleMoveDamage)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1);
else
gAIScriptPtr += 5;
@@ -1725,7 +1720,7 @@ static void BattleAICmd_if_has_move(void)
case 3:
for (i = 0; i < MAX_MON_MOVES; i++)
{
- if (gBattleMons[gPlayerMonIndex].moves[i] == *temp_ptr)
+ if (gBattleMons[gBankAttacker].moves[i] == *temp_ptr)
break;
}
if (i == MAX_MON_MOVES)
@@ -1737,7 +1732,7 @@ static void BattleAICmd_if_has_move(void)
case 2:
for (i = 0; i < 8; i++)
{
- if (UNK_2016A00_STRUCT->movesUsed[gEnemyMonIndex >> 1][i] == *temp_ptr)
+ if (UNK_2016A00_STRUCT->movesUsed[gBankTarget >> 1][i] == *temp_ptr)
break;
}
if (i == 8)
@@ -1759,7 +1754,7 @@ static void BattleAICmd_if_dont_have_move(void)
case 3:
for (i = 0; i < MAX_MON_MOVES; i++)
{
- if (gBattleMons[gPlayerMonIndex].moves[i] == *temp_ptr)
+ if (gBattleMons[gBankAttacker].moves[i] == *temp_ptr)
break;
}
if (i != MAX_MON_MOVES)
@@ -1771,7 +1766,7 @@ static void BattleAICmd_if_dont_have_move(void)
case 2:
for (i = 0; i < 8; i++)
{
- if (UNK_2016A00_STRUCT->movesUsed[gEnemyMonIndex >> 1][i] == *temp_ptr)
+ if (UNK_2016A00_STRUCT->movesUsed[gBankTarget >> 1][i] == *temp_ptr)
break;
}
if (i != 8)
@@ -1792,7 +1787,7 @@ static void BattleAICmd_if_move_effect(void)
case 3:
for (i = 0; i < MAX_MON_MOVES; i++)
{
- if (gBattleMons[gPlayerMonIndex].moves[i] != 0 && gBattleMoves[gBattleMons[gPlayerMonIndex].moves[i]].effect == gAIScriptPtr[2])
+ if (gBattleMons[gBankAttacker].moves[i] != 0 && gBattleMoves[gBattleMons[gBankAttacker].moves[i]].effect == gAIScriptPtr[2])
break;
}
if (i != MAX_MON_MOVES)
@@ -1804,7 +1799,7 @@ static void BattleAICmd_if_move_effect(void)
case 2:
for (i = 0; i < 8; i++)
{
- if (gBattleMons[gPlayerMonIndex].moves[i] != 0 && gBattleMoves[UNK_2016A00_STRUCT->movesUsed[gEnemyMonIndex >> 1][i]].effect == gAIScriptPtr[2])
+ if (gBattleMons[gBankAttacker].moves[i] != 0 && gBattleMoves[UNK_2016A00_STRUCT->movesUsed[gBankTarget >> 1][i]].effect == gAIScriptPtr[2])
break;
}
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
@@ -1821,7 +1816,7 @@ static void BattleAICmd_if_not_move_effect(void)
case 3:
for (i = 0; i < MAX_MON_MOVES; i++)
{
- if (gBattleMons[gPlayerMonIndex].moves[i] != 0 && gBattleMoves[gBattleMons[gPlayerMonIndex].moves[i]].effect == gAIScriptPtr[2])
+ if (gBattleMons[gBankAttacker].moves[i] != 0 && gBattleMoves[gBattleMons[gBankAttacker].moves[i]].effect == gAIScriptPtr[2])
break;
}
if (i != MAX_MON_MOVES)
@@ -1833,7 +1828,7 @@ static void BattleAICmd_if_not_move_effect(void)
case 2:
for (i = 0; i < 8; i++)
{
- if (UNK_2016A00_STRUCT->movesUsed[gEnemyMonIndex >> 1][i] != 0 && gBattleMoves[UNK_2016A00_STRUCT->movesUsed[gEnemyMonIndex >> 1][i]].effect == gAIScriptPtr[2])
+ if (UNK_2016A00_STRUCT->movesUsed[gBankTarget >> 1][i] != 0 && gBattleMoves[UNK_2016A00_STRUCT->movesUsed[gBankTarget >> 1][i]].effect == gAIScriptPtr[2])
break;
}
gAIScriptPtr += 7;
@@ -1845,13 +1840,13 @@ static void BattleAICmd_if_last_move_did_damage(void)
u8 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
if (gAIScriptPtr[2] == 0)
{
- if (gUnknown_02024CA8[index].unk4 == 0)
+ if (gDisableStructs[index].unk4 == 0)
{
gAIScriptPtr += 7;
return;
@@ -1864,7 +1859,7 @@ static void BattleAICmd_if_last_move_did_damage(void)
gAIScriptPtr += 7;
return;
}
- else if (gUnknown_02024CA8[index].unk6 != 0)
+ else if (gDisableStructs[index].unk6 != 0)
{
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
return;
@@ -1877,7 +1872,7 @@ static void BattleAICmd_if_encored(void)
switch (gAIScriptPtr[1])
{
case 0: // _08109348
- if (gUnknown_02024CA8[gUnknown_02024A60].unk4 == AI_THINKING_STRUCT->moveConsidered)
+ if (gDisableStructs[gActiveBank].unk4 == AI_THINKING_STRUCT->moveConsidered)
{
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
return;
@@ -1885,7 +1880,7 @@ static void BattleAICmd_if_encored(void)
gAIScriptPtr += 6;
return;
case 1: // _08109370
- if (gUnknown_02024CA8[gUnknown_02024A60].unk6 == AI_THINKING_STRUCT->moveConsidered)
+ if (gDisableStructs[gActiveBank].unk6 == AI_THINKING_STRUCT->moveConsidered)
{
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
return;
@@ -1924,13 +1919,13 @@ static void BattleAICmd_get_hold_effect(void)
u16 status;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
- if (battle_side_get_owner(index) == 0)
+ if (GetBankSide(index) == 0)
{
- status = (battle_get_per_side_status(index) & 1);
+ status = (GetBankIdentity(index) & 1);
AI_THINKING_STRUCT->funcResult = UNK_2016A00_STRUCT->unk22[status];
}
else
@@ -1944,9 +1939,9 @@ static void BattleAICmd_get_gender(void)
u8 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
AI_THINKING_STRUCT->funcResult = GetGenderFromSpeciesAndPersonality(gBattleMons[index].species, gBattleMons[index].personality);
@@ -1958,11 +1953,11 @@ static void BattleAICmd_is_first_turn(void)
u8 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
- AI_THINKING_STRUCT->funcResult = gUnknown_02024CA8[index].unk16;
+ AI_THINKING_STRUCT->funcResult = gDisableStructs[index].unk16;
gAIScriptPtr += 2;
}
@@ -1972,11 +1967,11 @@ static void BattleAICmd_get_stockpile_count(void)
u8 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
- AI_THINKING_STRUCT->funcResult = gUnknown_02024CA8[index].unk9;
+ AI_THINKING_STRUCT->funcResult = gDisableStructs[index].unk9;
gAIScriptPtr += 2;
}
@@ -1993,9 +1988,9 @@ static void BattleAICmd_get_item(void)
u8 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
// this hack and a half matches. whatever. i dont care. someone else fix this mess later. PS: still cant fix this.
AI_THINKING_STRUCT->funcResult = ewram[0x160CC + (index * 2)];
@@ -2029,11 +2024,11 @@ static void BattleAICmd_get_protect_count(void)
u8 index;
if (gAIScriptPtr[1] == USER)
- index = gPlayerMonIndex;
+ index = gBankAttacker;
else
- index = gEnemyMonIndex;
+ index = gBankTarget;
- AI_THINKING_STRUCT->funcResult = gUnknown_02024CA8[index].unk8;
+ AI_THINKING_STRUCT->funcResult = gDisableStructs[index].unk8;
gAIScriptPtr += 2;
}
@@ -2084,7 +2079,7 @@ static void BattleAICmd_if_level_compare(void)
switch (gAIScriptPtr[1])
{
case 0: // greater than
- if (gBattleMons[gPlayerMonIndex].level > gBattleMons[gEnemyMonIndex].level)
+ if (gBattleMons[gBankAttacker].level > gBattleMons[gBankTarget].level)
{
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
return;
@@ -2092,7 +2087,7 @@ static void BattleAICmd_if_level_compare(void)
gAIScriptPtr += 6;
return;
case 1: // less than
- if (gBattleMons[gPlayerMonIndex].level < gBattleMons[gEnemyMonIndex].level)
+ if (gBattleMons[gBankAttacker].level < gBattleMons[gBankTarget].level)
{
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
return;
@@ -2100,7 +2095,7 @@ static void BattleAICmd_if_level_compare(void)
gAIScriptPtr += 6;
return;
case 2: // equal
- if (gBattleMons[gPlayerMonIndex].level == gBattleMons[gEnemyMonIndex].level)
+ if (gBattleMons[gBankAttacker].level == gBattleMons[gBankTarget].level)
{
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
return;
@@ -2112,7 +2107,7 @@ static void BattleAICmd_if_level_compare(void)
static void BattleAICmd_if_taunted(void)
{
- if (gUnknown_02024CA8[gEnemyMonIndex].taunt != 0)
+ if (gDisableStructs[gBankTarget].taunt != 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1);
else
gAIScriptPtr += 5;
@@ -2120,7 +2115,7 @@ static void BattleAICmd_if_taunted(void)
static void BattleAICmd_if_not_taunted(void)
{
- if (gUnknown_02024CA8[gEnemyMonIndex].taunt == 0)
+ if (gDisableStructs[gBankTarget].taunt == 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1);
else
gAIScriptPtr += 5;
diff --git a/src/battle_anim.c b/src/battle_anim.c
index bdb34365f..55ede1788 100644
--- a/src/battle_anim.c
+++ b/src/battle_anim.c
@@ -1,9 +1,14 @@
#include "global.h"
#include "battle_anim.h"
-#include "asm.h"
+#include "battle.h"
+#include "battle_anim_80CA710.h"
+#include "battle_interface.h"
+#include "contest.h"
#include "decompress.h"
#include "m4a.h"
+#include "main.h"
#include "palette.h"
+#include "rom_8077ABC.h"
#include "sound.h"
#include "sprite.h"
#include "task.h"
@@ -12,10 +17,10 @@
#define GET_TRUE_SPRITE_INDEX(i) (i - 10000)
extern u8 unk_2000000[];
-extern u16 gUnknown_02024A6A[4];
-extern u8 gUnknown_02024BE0[];
-extern u8 gPlayerMonIndex;
-extern u8 gEnemyMonIndex;
+extern u16 gBattlePartyID[4];
+extern u8 gObjectBankIDs[];
+extern u8 gBankAttacker;
+extern u8 gBankTarget;
EWRAM_DATA const u8 *gBattleAnimScriptPtr = NULL;
EWRAM_DATA const u8 *gBattleAnimScriptRetAddr = NULL;
EWRAM_DATA void (*gAnimScriptCallback)(void) = NULL;
@@ -23,11 +28,11 @@ EWRAM_DATA s8 gAnimFramesToWait = 0;
EWRAM_DATA u8 gAnimScriptActive = FALSE;
EWRAM_DATA u8 gAnimVisualTaskCount = 0;
EWRAM_DATA u8 gAnimSoundTaskCount = 0;
-EWRAM_DATA u32 gUnknown_0202F7B4 = 0;
-EWRAM_DATA u32 gUnknown_0202F7B8 = 0;
-EWRAM_DATA u16 gUnknown_0202F7BC = 0;
-EWRAM_DATA u8 gUnknown_0202F7BE = 0;
-EWRAM_DATA u16 gUnknown_0202F7C0 = 0;
+EWRAM_DATA u32 gDisableStructMoveAnim = 0;
+EWRAM_DATA u32 gMoveDmgMoveAnim = 0;
+EWRAM_DATA u16 gMovePowerMoveAnim = 0;
+EWRAM_DATA u8 gHappinessMoveAnim = 0;
+EWRAM_DATA u16 gWeatherMoveAnim = 0;
EWRAM_DATA u8 gMonAnimTaskIdArray[2] = {0};
EWRAM_DATA u8 gUnknown_0202F7C4 = 0;
EWRAM_DATA u8 gUnknown_0202F7C5 = 0;
@@ -53,24 +58,10 @@ extern struct MusicPlayerInfo gMPlay_SE2;
extern const u16 gUnknown_081C7160[];
extern const u8 *const gBattleAnims_Moves[];
-extern const struct SpriteSheet gBattleAnimPicTable[];
-extern const struct SpritePalette gBattleAnimPaletteTable[];
+extern const struct CompressedSpriteSheet gBattleAnimPicTable[];
+extern const struct CompressedSpritePalette gBattleAnimPaletteTable[];
extern const struct BattleAnimBackground gBattleAnimBackgroundTable[];
-extern void sub_8079E24();
-extern void sub_8043EB4();
-extern u8 sub_8079E90();
-extern u8 sub_8077ABC();
-extern u8 sub_8078874(u8);
-extern void sub_8078914();
-extern u8 sub_80AEB1C();
-extern void sub_80E4EF8(int, int, int, int, u16, u8, int);
-extern u8 sub_80789BC();
-extern void sub_80AB2AC(void);
-extern void sub_800D7B8(void);
-extern u8 obj_id_for_side_relative_to_move();
-extern u8 battle_get_per_side_status_permutated();
-
static void RunAnimScriptCommand(void);
static void ScriptCmd_loadsprite(void);
static void ScriptCmd_unloadsprite(void);
@@ -190,10 +181,10 @@ void battle_anim_clear_some_data(void)
gAnimScriptActive = FALSE;
gAnimVisualTaskCount = 0;
gAnimSoundTaskCount = 0;
- gUnknown_0202F7B4 = 0;
- gUnknown_0202F7B8 = 0;
- gUnknown_0202F7BC = 0;
- gUnknown_0202F7BE = 0;
+ gDisableStructMoveAnim = 0;
+ gMoveDmgMoveAnim = 0;
+ gMovePowerMoveAnim = 0;
+ gHappinessMoveAnim = 0;
// clear index array.
for (i = 0; i < 8; i++)
@@ -215,8 +206,8 @@ void battle_anim_clear_some_data(void)
void ExecuteMoveAnim(u16 move)
{
- gBattleAnimPlayerMonIndex = gPlayerMonIndex;
- gBattleAnimEnemyMonIndex = gEnemyMonIndex;
+ gBattleAnimPlayerMonIndex = gBankAttacker;
+ gBattleAnimEnemyMonIndex = gBankTarget;
DoMoveAnim(gBattleAnims_Moves, move, 1);
}
@@ -230,10 +221,10 @@ void DoMoveAnim(const u8 *const moveAnims[], u16 move, u8 c)
sub_8043EB4(0);
for (i = 0; i < 4; i++)
{
- if (battle_side_get_owner(i) != 0)
- gUnknown_0202F7CA[i] = GetMonData(&gEnemyParty[gUnknown_02024A6A[i]], MON_DATA_SPECIES);
+ if (GetBankSide(i) != 0)
+ gUnknown_0202F7CA[i] = GetMonData(&gEnemyParty[gBattlePartyID[i]], MON_DATA_SPECIES);
else
- gUnknown_0202F7CA[i] = GetMonData(&gPlayerParty[gUnknown_02024A6A[i]], MON_DATA_SPECIES);
+ gUnknown_0202F7CA[i] = GetMonData(&gPlayerParty[gBattlePartyID[i]], MON_DATA_SPECIES);
}
}
else
@@ -698,14 +689,14 @@ static void ScriptCmd_monbg(void)
r5 = gBattleAnimEnemyMonIndex;
if (b_side_obj__get_some_boolean(r5))
{
- r0 = battle_get_per_side_status(r5);
+ r0 = GetBankIdentity(r5);
r0 += 0xFF;
if (r0 <= 1 || IsContest() != 0)
r7 = 0;
else
r7 = 1;
sub_8076034(r5, r7);
- r4 = gUnknown_02024BE0[r5];
+ r4 = gObjectBankIDs[r5];
taskId = CreateTask(task_pA_ma0A_obj_to_bg_pal, 10);
gTasks[taskId].data[0] = r4;
gTasks[taskId].data[1] = gSprites[r4].pos1.x + gSprites[r4].pos2.x;
@@ -728,14 +719,14 @@ static void ScriptCmd_monbg(void)
r5 ^= 2;
if (r6 > 1 && b_side_obj__get_some_boolean(r5))
{
- r0 = battle_get_per_side_status(r5);
+ r0 = GetBankIdentity(r5);
r0 += 0xFF;
if (r0 <= 1 || IsContest() != 0)
r7 = 0;
else
r7 = 1;
sub_8076034(r5, r7);
- r4 = gUnknown_02024BE0[r5];
+ r4 = gObjectBankIDs[r5];
taskId = CreateTask(task_pA_ma0A_obj_to_bg_pal, 10);
gTasks[taskId].data[0] = r4;
gTasks[taskId].data[1] = gSprites[r4].pos1.x + gSprites[r4].pos2.x;
@@ -773,7 +764,7 @@ bool8 b_side_obj__get_some_boolean(u8 a)
return TRUE; // this line wont ever be reached.
if ((EWRAM_17800[a].unk0 & 1) == 0)
return TRUE;
- if (gSprites[gUnknown_02024BE0[a]].invisible)
+ if (gSprites[gObjectBankIDs[a]].invisible)
return FALSE;
return TRUE;
}
@@ -816,7 +807,7 @@ _08075FDC:\n\
cmp r0, 0\n\
beq _0807601C\n\
ldr r2, _08076024 @ =gSprites\n\
- ldr r0, _08076028 @ =gUnknown_02024BE0\n\
+ ldr r0, _08076028 @ =gObjectBankIDs\n\
adds r0, r5, r0\n\
ldrb r1, [r0]\n\
lsls r0, r1, 4\n\
@@ -834,7 +825,7 @@ _0807601C:\n\
.align 2, 0\n\
_08076020: .4byte 0x02017800\n\
_08076024: .4byte gSprites\n\
-_08076028: .4byte gUnknown_02024BE0\n\
+_08076028: .4byte gObjectBankIDs\n\
_0807602C:\n\
movs r0, 0\n\
_0807602E:\n\
@@ -882,12 +873,12 @@ void sub_8076034(u8 a, u8 b)
REG_BG1CNT_BITFIELD.screenSize = 1;
REG_BG1CNT_BITFIELD.areaOverflowMode = 0;
- spriteId = gUnknown_02024BE0[a];
+ spriteId = gObjectBankIDs[a];
gUnknown_030042C0 = -(gSprites[spriteId].pos1.x + gSprites[spriteId].pos2.x) + 32;
if (IsContest() != 0 && sub_80AEB1C(EWRAM_19348) != 0)
gUnknown_030042C0--;
gUnknown_030041B4 = -(gSprites[spriteId].pos1.y + gSprites[spriteId].pos2.y) + 32;
- gSprites[gUnknown_02024BE0[a]].invisible = TRUE;
+ gSprites[gObjectBankIDs[a]].invisible = TRUE;
REG_BG1HOFS = gUnknown_030042C0;
REG_BG1VOFS = gUnknown_030041B4;
@@ -899,7 +890,7 @@ void sub_8076034(u8 a, u8 b)
if (IsContest() != 0)
r2 = 0;
else
- r2 = battle_get_per_side_status(a);
+ r2 = GetBankIdentity(a);
sub_80E4EF8(0, 0, r2, s.unk8, (u32)s.unk0, (((s32)s.unk4 - VRAM) / 2048), REG_BG1CNT_BITFIELD.charBaseBlock);
if (IsContest() != 0)
sub_8076380();
@@ -932,10 +923,10 @@ void sub_8076034(u8 a, u8 b)
REG_BG2CNT_BITFIELD.screenSize = 1;
REG_BG2CNT_BITFIELD.areaOverflowMode = 0;
- spriteId = gUnknown_02024BE0[a];
+ spriteId = gObjectBankIDs[a];
gUnknown_03004288 = -(gSprites[spriteId].pos1.x + gSprites[spriteId].pos2.x) + 32;
gUnknown_03004280 = -(gSprites[spriteId].pos1.y + gSprites[spriteId].pos2.y) + 32;
- gSprites[gUnknown_02024BE0[a]].invisible = TRUE;
+ gSprites[gObjectBankIDs[a]].invisible = TRUE;
REG_BG2HOFS = gUnknown_03004288;
REG_BG2VOFS = gUnknown_03004280;
@@ -944,7 +935,7 @@ void sub_8076034(u8 a, u8 b)
addr3 = (void *)(PLTT + 0x120);
DmaCopy32(3, gPlttBufferUnfaded + 0x100 + a * 16, addr3, 32);
- sub_80E4EF8(0, 0, battle_get_per_side_status(a), 9, 0x6000, 0x1E, REG_BG2CNT_BITFIELD.charBaseBlock);
+ sub_80E4EF8(0, 0, GetBankIdentity(a), 9, 0x6000, 0x1E, REG_BG2CNT_BITFIELD.charBaseBlock);
}
}
@@ -1107,9 +1098,9 @@ static void ScriptCmd_clearmonbg(void)
else
r5 = gBattleAnimEnemyMonIndex;
if (gMonAnimTaskIdArray[0] != 0xFF)
- gSprites[gUnknown_02024BE0[r5]].invisible = FALSE;
+ gSprites[gObjectBankIDs[r5]].invisible = FALSE;
if (r4 > 1 && gMonAnimTaskIdArray[1] != 0xFF)
- gSprites[gUnknown_02024BE0[r5 ^ 2]].invisible = FALSE;
+ gSprites[gObjectBankIDs[r5 ^ 2]].invisible = FALSE;
else
r4 = 0;
taskId = CreateTask(sub_807672C, 5);
@@ -1126,7 +1117,7 @@ static void sub_807672C(u8 taskId)
gTasks[taskId].data[1]++;
if (gTasks[taskId].data[1] != 1)
{
- var = battle_get_per_side_status(gTasks[taskId].data[2]);
+ var = GetBankIdentity(gTasks[taskId].data[2]);
var += 0xFF;
if (var <= 1 || IsContest() != 0)
r4 = 0;
@@ -1167,26 +1158,26 @@ static void ScriptCmd_monbg_22(void)
r4 = gBattleAnimEnemyMonIndex;
if (b_side_obj__get_some_boolean(r4))
{
- r0 = battle_get_per_side_status(r4);
+ r0 = GetBankIdentity(r4);
r0 += 0xFF;
if (r0 <= 1 || IsContest() != 0)
r1 = 0;
else
r1 = 1;
sub_8076034(r4, r1);
- gSprites[gUnknown_02024BE0[r4]].invisible = FALSE;
+ gSprites[gObjectBankIDs[r4]].invisible = FALSE;
}
r4 ^= 2;
if (r5 > 1 && b_side_obj__get_some_boolean(r4))
{
- r0 = battle_get_per_side_status(r4);
+ r0 = GetBankIdentity(r4);
r0 += 0xFF;
if (r0 <= 1 || IsContest() != 0)
r1 = 0;
else
r1 = 1;
sub_8076034(r4, r1);
- gSprites[gUnknown_02024BE0[r4]].invisible = FALSE;
+ gSprites[gObjectBankIDs[r4]].invisible = FALSE;
}
gBattleAnimScriptPtr++;
}
@@ -1208,9 +1199,9 @@ static void ScriptCmd_clearmonbg_23(void)
else
r6 = gBattleAnimEnemyMonIndex;
if (b_side_obj__get_some_boolean(r6))
- gSprites[gUnknown_02024BE0[r6]].invisible = FALSE;
+ gSprites[gObjectBankIDs[r6]].invisible = FALSE;
if (r5 > 1 && b_side_obj__get_some_boolean(r6 ^ 2))
- gSprites[gUnknown_02024BE0[r6 ^ 2]].invisible = FALSE;
+ gSprites[gObjectBankIDs[r6 ^ 2]].invisible = FALSE;
else
r5 = 0;
taskId = CreateTask(sub_80769A4, 5);
@@ -1229,7 +1220,7 @@ static void sub_80769A4(u8 taskId)
if (gTasks[taskId].data[1] != 1)
{
r4 = gTasks[taskId].data[2];
- r0 = battle_get_per_side_status(r4);
+ r0 = GetBankIdentity(r4);
r0 += 0xFF;
if (r0 <= 1 || IsContest() != 0)
r5 = 0;
@@ -1378,7 +1369,7 @@ static void ScriptCmd_fadetobg_25(void)
taskId = CreateTask(task_p5_load_battle_screen_elements, 5);
if (IsContest() != 0)
gTasks[taskId].data[0] = r6;
- else if (battle_side_get_owner(gBattleAnimEnemyMonIndex) == 0)
+ else if (GetBankSide(gBattleAnimEnemyMonIndex) == 0)
gTasks[taskId].data[0] = r7;
else
gTasks[taskId].data[0] = r8;
@@ -1502,7 +1493,7 @@ s8 sub_8076F98(s8 a)
{
if (!IsContest() && (EWRAM_17810[gBattleAnimPlayerMonIndex].unk0 & 0x10))
{
- a = battle_side_get_owner(gBattleAnimPlayerMonIndex) ? 0xC0 : 0x3F;
+ a = GetBankSide(gBattleAnimPlayerMonIndex) ? 0xC0 : 0x3F;
}
//_08076FDC
else
@@ -1521,9 +1512,9 @@ s8 sub_8076F98(s8 a)
//_08077004
else
{
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex) == 0)
+ if (GetBankSide(gBattleAnimPlayerMonIndex) == 0)
{
- if (battle_side_get_owner(gBattleAnimEnemyMonIndex) == 0)
+ if (GetBankSide(gBattleAnimEnemyMonIndex) == 0)
}
//_08077042
else
@@ -1560,7 +1551,7 @@ s8 sub_8076F98(s8 a)
cmp r0, 0\n\
beq _08076FDC\n\
adds r0, r2, 0\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
movs r4, 0xC0\n\
cmp r0, 0\n\
@@ -1592,13 +1583,13 @@ _08077000: .4byte gBattleAnimEnemyMonIndex\n\
_08077004:\n\
ldr r0, _0807702C @ =gBattleAnimPlayerMonIndex\n\
ldrb r0, [r0]\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
cmp r0, 0\n\
bne _08077042\n\
ldr r0, _08077030 @ =gBattleAnimEnemyMonIndex\n\
ldrb r0, [r0]\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
cmp r0, 0\n\
bne _0807706E\n\
@@ -1622,7 +1613,7 @@ _08077034:\n\
_08077042:\n\
ldr r0, _08077064 @ =gBattleAnimEnemyMonIndex\n\
ldrb r0, [r0]\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
lsrs r0, 24\n\
cmp r0, 0x1\n\
@@ -1670,14 +1661,14 @@ s8 sub_8077094(s8 a)
{
if (!IsContest() && (EWRAM_17810[gBattleAnimPlayerMonIndex].unk0 & 0x10))
{
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex) != 0)
+ if (GetBankSide(gBattleAnimPlayerMonIndex) != 0)
a = 0x3F;
else
a = 0xC0;
}
else
{
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex) != 0 || IsContest() != 0)
+ if (GetBankSide(gBattleAnimPlayerMonIndex) != 0 || IsContest() != 0)
a = -a;
}
return a;
@@ -2138,7 +2129,7 @@ static void ScriptCmd_monbgprio_28(void)
r0 = gBattleAnimEnemyMonIndex;
else
r0 = gBattleAnimPlayerMonIndex;
- r4 = battle_get_per_side_status(r0);
+ r4 = GetBankIdentity(r0);
if (!IsContest() && (r4 == 0 || r4 == 3))
{
REG_BG1CNT_BITFIELD.priority = 1;
@@ -2164,13 +2155,13 @@ static void ScriptCmd_monbgprio_2A(void)
r6 = SCRIPT_READ_8(gBattleAnimScriptPtr + 1);
gBattleAnimScriptPtr += 2;
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex) != battle_side_get_owner(gBattleAnimEnemyMonIndex))
+ if (GetBankSide(gBattleAnimPlayerMonIndex) != GetBankSide(gBattleAnimEnemyMonIndex))
{
if (r6 != 0)
r0 = gBattleAnimEnemyMonIndex;
else
r0 = gBattleAnimPlayerMonIndex;
- r4 = battle_get_per_side_status(r0);
+ r4 = GetBankIdentity(r0);
if (!IsContest() && (r4 == 0 || r4 == 3))
{
REG_BG1CNT_BITFIELD.priority = 1;
@@ -2216,16 +2207,16 @@ static void ScriptCmd_doublebattle_2D(void)
r7 = SCRIPT_READ_8(gBattleAnimScriptPtr + 1);
gBattleAnimScriptPtr += 2;
if (!IsContest() && IsDoubleBattle()
- && battle_side_get_owner(gBattleAnimPlayerMonIndex) == battle_side_get_owner(gBattleAnimEnemyMonIndex))
+ && GetBankSide(gBattleAnimPlayerMonIndex) == GetBankSide(gBattleAnimEnemyMonIndex))
{
if (r7 == 0)
{
- r4 = battle_get_per_side_status_permutated(gBattleAnimPlayerMonIndex);
+ r4 = GetBankIdentity_permutated(gBattleAnimPlayerMonIndex);
spriteId = obj_id_for_side_relative_to_move(0);
}
else
{
- r4 = battle_get_per_side_status_permutated(gBattleAnimEnemyMonIndex);
+ r4 = GetBankIdentity_permutated(gBattleAnimEnemyMonIndex);
spriteId = obj_id_for_side_relative_to_move(1);
}
if (spriteId != 0xFF)
@@ -2250,16 +2241,16 @@ static void ScriptCmd_doublebattle_2E(void)
r7 = SCRIPT_READ_8(gBattleAnimScriptPtr + 1);
gBattleAnimScriptPtr += 2;
if (!IsContest() && IsDoubleBattle()
- && battle_side_get_owner(gBattleAnimPlayerMonIndex) == battle_side_get_owner(gBattleAnimEnemyMonIndex))
+ && GetBankSide(gBattleAnimPlayerMonIndex) == GetBankSide(gBattleAnimEnemyMonIndex))
{
if (r7 == 0)
{
- r4 = battle_get_per_side_status_permutated(gBattleAnimPlayerMonIndex);
+ r4 = GetBankIdentity_permutated(gBattleAnimPlayerMonIndex);
spriteId = obj_id_for_side_relative_to_move(0);
}
else
{
- r4 = battle_get_per_side_status_permutated(gBattleAnimEnemyMonIndex);
+ r4 = GetBankIdentity_permutated(gBattleAnimEnemyMonIndex);
spriteId = obj_id_for_side_relative_to_move(1);
}
if (spriteId != 0xFF && r4 == 2)
diff --git a/src/battle_anim_80A7E7C.c b/src/battle_anim_80A7E7C.c
index 285a782f3..34c11a352 100644
--- a/src/battle_anim_80A7E7C.c
+++ b/src/battle_anim_80A7E7C.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "battle_anim.h"
+#include "rom_8077ABC.h"
#include "sprite.h"
#include "task.h"
#include "trig.h"
@@ -9,26 +10,12 @@
extern s16 gBattleAnimArgs[8];
-extern u8 gUnknown_02024BE0[];
-extern s32 gUnknown_0202F7B8;
-extern u16 gUnknown_0202F7BC;
+extern u8 gObjectBankIDs[];
+extern s32 gMoveDmgMoveAnim;
+extern u16 gMovePowerMoveAnim;
extern u8 gBattleAnimPlayerMonIndex;
extern u8 gBattleAnimEnemyMonIndex;
-extern u8 obj_id_for_side_relative_to_move(u8 side);
-extern void DestroyAnimVisualTask(u8 task);
-extern u8 battle_get_side_with_given_state(u8 state);
-extern u8 battle_side_get_owner(u8 side);
-extern void oamt_set_x3A_32(struct Sprite *sprite, void(*callback)(struct Sprite*));
-extern void sub_8078458(struct Sprite *sprite);
-extern void move_anim_8072740(struct Sprite *sprite);
-extern void sub_8078A5C(struct Sprite *sprite);
-extern void sub_80784A8(struct Sprite *sprite);
-extern void sub_8078E70(u8 sprite, u8);
-extern void obj_id_set_rotscale(u8 sprite, int, int, u16);
-extern void sub_8078F40(u8 sprite);
-extern void sub_8078F9C(u8 sprite);
-
static void sub_80A7EF0(u8 task);
static void sub_80A808C(u8 task);
static void sub_80A81D8(u8 task);
@@ -122,28 +109,28 @@ void sub_80A7FA0(u8 task)
switch (gBattleAnimArgs[0])
{
case 4:
- side = battle_get_side_with_given_state(0);
+ side = GetBankByPlayerAI(0);
break;
case 5:
- side = battle_get_side_with_given_state(2);
+ side = GetBankByPlayerAI(2);
break;
case 6:
- side = battle_get_side_with_given_state(1);
+ side = GetBankByPlayerAI(1);
break;
case 7:
default:
- side = battle_get_side_with_given_state(3);
+ side = GetBankByPlayerAI(3);
break;
}
if (b_side_obj__get_some_boolean(side) == FALSE)
{
r6 = 1;
}
- sprite = gUnknown_02024BE0[side];
+ sprite = gObjectBankIDs[side];
}
else
{
- sprite = gUnknown_02024BE0[gBattleAnimPlayerMonIndex];
+ sprite = gObjectBankIDs[gBattleAnimPlayerMonIndex];
}
if (r6)
{
@@ -342,7 +329,7 @@ static void sub_80A8488(u8 task)
void sub_80A8500(u8 task)
{
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex))
+ if (GetBankSide(gBattleAnimPlayerMonIndex))
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
}
@@ -352,7 +339,7 @@ void sub_80A8500(u8 task)
void sub_80A8530(struct Sprite *sprite)
{
sprite->invisible = TRUE;
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex))
+ if (GetBankSide(gBattleAnimPlayerMonIndex))
{
sprite->data1 = -gBattleAnimArgs[1];
}
@@ -362,7 +349,7 @@ void sub_80A8530(struct Sprite *sprite)
}
sprite->data0 = gBattleAnimArgs[0];
sprite->data2 = 0;
- sprite->data3 = gUnknown_02024BE0[gBattleAnimPlayerMonIndex];
+ sprite->data3 = gObjectBankIDs[gBattleAnimPlayerMonIndex];
sprite->data4 = gBattleAnimArgs[0];
oamt_set_x3A_32(sprite, sub_80A85A4);
sprite->callback = sub_8078458;
@@ -404,11 +391,11 @@ void sub_80A8638(struct Sprite *sprite)
int spriteId;
if (!gBattleAnimArgs[0])
{
- spriteId = gUnknown_02024BE0[gBattleAnimPlayerMonIndex];
+ spriteId = gObjectBankIDs[gBattleAnimPlayerMonIndex];
}
else
{
- spriteId = gUnknown_02024BE0[gBattleAnimEnemyMonIndex];
+ spriteId = gObjectBankIDs[gBattleAnimEnemyMonIndex];
}
sprite->data0 = gBattleAnimArgs[2];
sprite->data1 = gSprites[spriteId].pos1.x + gSprites[spriteId].pos2.x;
@@ -477,8 +464,8 @@ void sub_80A8764(struct Sprite *sprite)
{
v1 = gBattleAnimEnemyMonIndex;
}
- spriteId = gUnknown_02024BE0[v1];
- if (battle_side_get_owner(v1))
+ spriteId = gObjectBankIDs[v1];
+ if (GetBankSide(v1))
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
if (gBattleAnimArgs[3] == 1)
@@ -513,8 +500,8 @@ void sub_80A8818(struct Sprite *sprite)
{
v1 = gBattleAnimEnemyMonIndex;
}
- spriteId = gUnknown_02024BE0[v1];
- if (battle_side_get_owner(v1))
+ spriteId = gObjectBankIDs[v1];
+ if (GetBankSide(v1))
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
if (gBattleAnimArgs[3] == 1)
@@ -555,7 +542,7 @@ void sub_80A8920(u8 task)
{
s16 r7;
r7 = 0x8000 / gBattleAnimArgs[3];
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex))
+ if (GetBankSide(gBattleAnimPlayerMonIndex))
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
gBattleAnimArgs[5] = -gBattleAnimArgs[5];
@@ -622,7 +609,7 @@ void sub_80A8A80(u8 task)
DestroyAnimVisualTask(task);
return;
}
- spriteId = gUnknown_02024BE0[gBattleAnimPlayerMonIndex ^ 2];
+ spriteId = gObjectBankIDs[gBattleAnimPlayerMonIndex ^ 2];
break;
case 3:
if (!b_side_obj__get_some_boolean(gBattleAnimEnemyMonIndex ^ 2))
@@ -630,14 +617,14 @@ void sub_80A8A80(u8 task)
DestroyAnimVisualTask(task);
return;
}
- spriteId = gUnknown_02024BE0[gBattleAnimEnemyMonIndex ^ 2];
+ spriteId = gObjectBankIDs[gBattleAnimEnemyMonIndex ^ 2];
break;
default:
DestroyAnimVisualTask(task);
return;
}
TASK.data[0] = spriteId;
- if (battle_side_get_owner(gBattleAnimEnemyMonIndex))
+ if (GetBankSide(gBattleAnimEnemyMonIndex))
{
TASK.data[1] = gBattleAnimArgs[1];
}
@@ -662,7 +649,7 @@ static void sub_80A8B3C(u8 task)
void sub_80A8B88(u8 task)
{
u8 spriteId;
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex))
+ if (GetBankSide(gBattleAnimPlayerMonIndex))
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
}
@@ -701,7 +688,7 @@ static void sub_80A8C0C(u8 task)
}
else
{
- if (battle_side_get_owner(TASK.data[5]) == 0)
+ if (GetBankSide(TASK.data[5]) == 0)
{
gSprites[spriteId].pos2.y = (y >= 0) ? y : -y;
}
@@ -791,11 +778,11 @@ void sub_80A8E04(u8 task)
{
if (gBattleAnimArgs[2] == 0)
{
- TASK.data[7] = !battle_side_get_owner(gBattleAnimPlayerMonIndex);
+ TASK.data[7] = !GetBankSide(gBattleAnimPlayerMonIndex);
}
else
{
- TASK.data[7] = !battle_side_get_owner(gBattleAnimEnemyMonIndex);
+ TASK.data[7] = !GetBankSide(gBattleAnimEnemyMonIndex);
}
}
if (TASK.data[7])
@@ -818,14 +805,14 @@ void sub_80A8EFC(u8 task)
TASK.data[2] = gBattleAnimArgs[0];
if (gBattleAnimArgs[2] == 0)
{
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex))
+ if (GetBankSide(gBattleAnimPlayerMonIndex))
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
}
}
else
{
- if (battle_side_get_owner(gBattleAnimEnemyMonIndex))
+ if (GetBankSide(gBattleAnimEnemyMonIndex))
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
}
@@ -878,7 +865,7 @@ void sub_80A9058(u8 task)
{
if (!gBattleAnimArgs[0])
{
- TASK.data[15] = gUnknown_0202F7BC / 12;
+ TASK.data[15] = gMovePowerMoveAnim / 12;
if (TASK.data[15] < 1)
{
TASK.data[15] = 1;
@@ -890,7 +877,7 @@ void sub_80A9058(u8 task)
}
else
{
- TASK.data[15] = gUnknown_0202F7B8 / 12;
+ TASK.data[15] = gMoveDmgMoveAnim / 12;
if (TASK.data[15] < 1)
{
TASK.data[15] = 1;
diff --git a/src/battle_anim_81258BC.c b/src/battle_anim_81258BC.c
index 42a685f4a..5bdbb4946 100644
--- a/src/battle_anim_81258BC.c
+++ b/src/battle_anim_81258BC.c
@@ -1,22 +1,22 @@
#include "global.h"
-#include "asm.h"
-#include "text.h"
+#include "battle_anim_81258BC.h"
+#include "battle.h"
+#include "battle_message.h"
#include "menu_cursor.h"
+#include "text.h"
extern struct Window gUnknown_03004210;
-extern u8 gUnknown_020238CC[];
-extern u8 gUnknown_02024E60[];
+extern u8 gDisplayedStringBattle[];
+extern u8 gActionSelectionCursor[];
extern const u8 gUnknown_08400CBB[];
-extern u8 gUnknown_02024A60;
+extern u8 gActiveBank;
extern const u8 gUnknown_08400D15[];
-extern void* gUnknown_03004330[];
+extern void *gBattleBankFunc[];
extern u16 gUnknown_030042A0;
extern u16 gUnknown_030042A4;
-void bx_battle_menu_t6_2(void);
-
#if ENGLISH
#define SUB_812BB10_TILE_DATA_OFFSET 440
#elif GERMAN
@@ -31,7 +31,7 @@ void sub_812BB10(void) {
gUnknown_03004210.paletteNum = 0;
FillWindowRect_DefaultPalette(&gUnknown_03004210, 10, 2, 15, 27, 18);
FillWindowRect_DefaultPalette(&gUnknown_03004210, 10, 2, 35, 16, 36);
- gUnknown_03004330[gUnknown_02024A60] = bx_battle_menu_t6_2;
+ gBattleBankFunc[gActiveBank] = bx_battle_menu_t6_2;
InitWindow(&gUnknown_03004210, gUnknown_08400D15, 400, 18, 35);
sub_8002F44(&gUnknown_03004210);
@@ -42,9 +42,9 @@ void sub_812BB10(void) {
nullsub_8(i);
}
- sub_802E3E4(gUnknown_02024E60[gUnknown_02024A60], 0);
- get_battle_strings_((u8 *) gUnknown_08400CBB);
+ sub_802E3E4(gActionSelectionCursor[gActiveBank], 0);
+ StrCpyDecodeToDisplayedStringBattle((u8 *) gUnknown_08400CBB);
- InitWindow(&gUnknown_03004210, gUnknown_020238CC, SUB_812BB10_TILE_DATA_OFFSET, 2, 35);
+ InitWindow(&gUnknown_03004210, gDisplayedStringBattle, SUB_812BB10_TILE_DATA_OFFSET, 2, 35);
sub_8002F44(&gUnknown_03004210);
} \ No newline at end of file
diff --git a/src/battle_anim_8137220.c b/src/battle_anim_8137220.c
new file mode 100644
index 000000000..42d6cb8da
--- /dev/null
+++ b/src/battle_anim_8137220.c
@@ -0,0 +1,1486 @@
+#include "global.h"
+#include "battle.h"
+#include "battle_interface.h"
+#include "battle_message.h"
+#include "data2.h"
+#include "link.h"
+#include "main.h"
+#include "menu_cursor.h"
+#include "palette.h"
+#include "pokemon.h"
+#include "rom3.h"
+#include "songs.h"
+#include "sound.h"
+#include "sprite.h"
+#include "string_util.h"
+#include "task.h"
+#include "text.h"
+#include "util.h"
+
+//Possibly PokemonSubstruct1
+struct UnknownStruct3
+{
+ u16 moves[4];
+ u8 pp[4];
+ u8 ppBonuses;
+};
+
+extern u8 gActiveBank;
+extern void (*gBattleBankFunc[])(void);
+extern u32 gBattleExecBuffer;
+extern void (*gWallyBufferCommands[])(void);
+extern u8 gBattleBufferA[][0x200];
+extern u8 gObjectBankIDs[];
+extern MainCallback gPreBattleCallback1;
+extern bool8 gDoingBattleAnim;
+extern u16 gScriptItemId;
+extern u16 gBattlePartyID[];
+extern u8 gHealthboxIDs[];
+extern u16 gBattleTypeFlags;
+extern u16 gMovePowerMoveAnim;
+extern u32 gMoveDmgMoveAnim;
+extern u8 gHappinessMoveAnim;
+extern u16 gWeatherMoveAnim;
+extern u32 *gDisableStructMoveAnim;
+extern u32 gPID_perBank[];
+extern void (*gAnimScriptCallback)(void);
+extern bool8 gAnimScriptActive;
+extern u8 gDisplayedStringBattle[];
+extern u8 gBankInMenu;
+extern u8 gBattleMonForms[];
+extern u8 gBattleOutcome;
+extern u16 gUnknown_02024DE8;
+extern u8 gUnknown_02024E68[];
+extern struct SpriteTemplate gUnknown_02024E8C;
+extern u8 gUnknown_0202F7C4;
+extern struct Window gUnknown_03004210;
+extern u16 gUnknown_030042A0;
+extern u16 gUnknown_030042A4;
+extern u8 gUnknown_0300434C[];
+extern const u8 gUnknown_08400CCC[];
+extern const u8 gUnknown_08400CF3[];
+
+// TODO: include rom3.h when my other PR gets merged
+extern void dp01_build_cmdbuf_x21_a_bb(u8, u8, u16);
+extern void dp01_build_cmdbuf_x23_aa_0(u8, u16);
+
+extern void nullsub_14(void);
+extern void PrepareBagForWallyTutorial(void);
+extern void sub_8141828();
+extern void sub_8045A5C();
+extern void sub_804777C();
+extern void sub_8043DFC();
+extern bool8 IsDoubleBattle(void);
+extern void c3_0802FDF4(u8);
+extern void sub_802ECF0(void);
+extern void sub_8031AF4();
+extern u8 GetBankIdentity(u8);
+extern void sub_80313A0(struct Sprite *);
+extern u8 GetBankByPlayerAI(u8);
+extern u8 sub_8031720();
+extern void ExecuteMoveAnim();
+extern void sub_80326EC();
+extern void sub_8031F24(void);
+extern void sub_80324BC();
+extern void BufferStringBattle();
+extern u8 GetBankSide(u8);
+extern void sub_80304A8(void);
+extern void sub_8047858();
+extern void sub_80E43C0();
+extern void oamt_add_pos2_onto_pos1();
+extern void sub_8078B34(struct Sprite *);
+extern void sub_8030E38(struct Sprite *);
+extern void oamt_set_x3A_32();
+extern u8 sub_8046400();
+extern u8 sub_8077ABC();
+extern u8 sub_8077F68();
+extern u8 sub_8079E90();
+extern void sub_80312F0(struct Sprite *);
+extern bool8 move_anim_start_t3();
+
+void WallyBufferRunCommand(void);
+void sub_81374FC(void);
+void sub_81376B8(void);
+void WallyBufferExecCompleted(void);
+u32 sub_8137A84(u8, u8 *);
+void sub_8138294(u8);
+void sub_81390D0(void);
+void sub_8139A2C(u8);
+
+void unref_sub_8137220(void)
+{
+}
+
+void SetBankFuncToWallyBufferRunCommand(void)
+{
+ gBattleBankFunc[gActiveBank] = WallyBufferRunCommand;
+ ewram[0x160A8] = 0;
+ ewram[0x160A9] = 0;
+ ewram[0x160AA] = 0;
+ ewram[0x160AB] = 0;
+}
+
+void WallyBufferRunCommand(void)
+{
+ if (gBattleExecBuffer & gBitTable[gActiveBank])
+ {
+ if (gBattleBufferA[gActiveBank][0] < 0x39)
+ gWallyBufferCommands[gBattleBufferA[gActiveBank][0]]();
+ else
+ WallyBufferExecCompleted();
+ }
+}
+
+void sub_81372BC(void)
+{
+ u8 r4;
+
+ switch (ewram[0x160A8])
+ {
+ case 0:
+ ewram[0x160AA] = 64;
+ ewram[0x160A8]++;
+ // fall through
+ case 1:
+ r4 = --ewram[0x160AA];
+ if (r4 == 0)
+ {
+ PlaySE(SE_SELECT);
+ dp01_build_cmdbuf_x21_a_bb(1, 0, 0);
+ WallyBufferExecCompleted();
+ ewram[0x160A8]++;
+ ewram[0x160A9] = r4;
+ ewram[0x160AA] = 64;
+ }
+ break;
+ case 2:
+ r4 = --ewram[0x160AA];
+ if (r4 == 0)
+ {
+ PlaySE(SE_SELECT);
+ dp01_build_cmdbuf_x21_a_bb(1, 0, 0);
+ WallyBufferExecCompleted();
+ ewram[0x160A8]++;
+ ewram[0x160A9] = r4;
+ ewram[0x160AA] = 64;
+ }
+ break;
+ case 3:
+ r4 = --ewram[0x160AA];
+ if (r4 == 0)
+ {
+ dp01_build_cmdbuf_x21_a_bb(1, 9, 0);
+ WallyBufferExecCompleted();
+ ewram[0x160A8]++;
+ ewram[0x160A9] = r4;
+ ewram[0x160AA] = 64;
+ }
+ break;
+ case 4:
+ if (--ewram[0x160AA] == 0)
+ {
+ PlaySE(SE_SELECT);
+ nullsub_8(0);
+ sub_802E3E4(1, 0);
+ ewram[0x160AA] = 64;
+ ewram[0x160A8]++;
+ }
+ break;
+ case 5:
+ if (--ewram[0x160AA] == 0)
+ {
+ PlaySE(SE_SELECT);
+ DestroyMenuCursor();
+ dp01_build_cmdbuf_x21_a_bb(1, 1, 0);
+ WallyBufferExecCompleted();
+ }
+ break;
+ }
+}
+
+void sub_813741C(void)
+{
+ if (gSprites[gObjectBankIDs[gActiveBank]].callback == SpriteCallbackDummy)
+ WallyBufferExecCompleted();
+}
+
+void sub_8137454(void)
+{
+ if (gUnknown_03004210.state == 0)
+ WallyBufferExecCompleted();
+}
+
+void sub_813746C(void)
+{
+ if (!gPaletteFade.active)
+ {
+ gMain.inBattle = FALSE;
+ gMain.callback1 = gPreBattleCallback1;
+ SetMainCallback2(gMain.savedCallback);
+ }
+}
+
+void bx_wait_t5(void)
+{
+ if (!gDoingBattleAnim)
+ WallyBufferExecCompleted();
+}
+
+void sub_81374C4(void)
+{
+ if (!gPaletteFade.active)
+ {
+ gBattleBankFunc[gActiveBank] = sub_81374FC;
+ nullsub_14();
+ PrepareBagForWallyTutorial();
+ }
+}
+
+void sub_81374FC(void)
+{
+ if (gMain.callback2 == sub_800F808
+ && !gPaletteFade.active)
+ {
+ dp01_build_cmdbuf_x23_aa_0(1, gScriptItemId);
+ WallyBufferExecCompleted();
+ }
+}
+
+void sub_8137538(void)
+{
+ if (!ewram17810[gActiveBank].unk0_3 && !ewram17810[gActiveBank].unk0_7)
+ sub_8141828(gActiveBank, &gPlayerParty[gBattlePartyID[gActiveBank]]);
+
+ if (!ewram17810[gActiveBank ^ 2].unk0_3 && !ewram17810[gActiveBank ^ 2].unk0_7)
+ sub_8141828(gActiveBank ^ 2, &gPlayerParty[gBattlePartyID[gActiveBank ^ 2]]);
+
+ if (!ewram17810[gActiveBank].unk0_3 && !ewram17810[gActiveBank ^ 2].unk0_3)
+ {
+ if (IsDoubleBattle() && !(gBattleTypeFlags & BATTLE_TYPE_MULTI))
+ {
+ DestroySprite(&gSprites[gUnknown_0300434C[gActiveBank ^ 2]]);
+ sub_8045A5C(gHealthboxIDs[gActiveBank ^ 2], &gPlayerParty[gBattlePartyID[gActiveBank ^ 2]], 0);
+ sub_804777C(gActiveBank ^ 2);
+ sub_8043DFC(gHealthboxIDs[gActiveBank ^ 2]);
+ }
+ DestroySprite(&gSprites[gUnknown_0300434C[gActiveBank]]);
+ sub_8045A5C(gHealthboxIDs[gActiveBank], &gPlayerParty[gBattlePartyID[gActiveBank]], 0);
+ sub_804777C(gActiveBank);
+ sub_8043DFC(gHealthboxIDs[gActiveBank]);
+ ewram17840.unk9_0 = 0;
+ gBattleBankFunc[gActiveBank] = sub_81376B8;
+ }
+}
+
+void sub_81376B8(void)
+{
+ bool8 r4 = FALSE;
+
+ if (gSprites[gHealthboxIDs[gActiveBank]].callback == SpriteCallbackDummy)
+ r4 = TRUE;
+ if (r4 && ewram17810[gActiveBank].unk1_0 && ewram17810[gActiveBank ^ 2].unk1_0)
+ {
+ ewram17810[gActiveBank].unk0_7 = 0;
+ ewram17810[gActiveBank].unk1_0 = 0;
+ ewram17810[gActiveBank ^ 2].unk0_7 = 0;
+ ewram17810[gActiveBank ^ 2].unk1_0 = 0;
+ FreeSpriteTilesByTag(0x27F9);
+ FreeSpritePaletteByTag(0x27F9);
+ CreateTask(c3_0802FDF4, 10);
+ sub_80324F8(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+ WallyBufferExecCompleted();
+ }
+}
+
+void sub_81377B0(void)
+{
+ s16 r4;
+
+ r4 = sub_8045C78(gActiveBank, gHealthboxIDs[gActiveBank], 0, 0);
+ sub_8043DFC(gHealthboxIDs[gActiveBank]);
+ if (r4 != -1)
+ {
+ sub_80440EC(gHealthboxIDs[gActiveBank], r4, 0);
+ }
+ else
+ {
+ sub_80324F8(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+ WallyBufferExecCompleted();
+ }
+}
+
+void bx_blink_t5(void)
+{
+ u8 spriteId = gObjectBankIDs[gActiveBank];
+
+ if (gSprites[spriteId].data1 == 32)
+ {
+ gSprites[spriteId].data1 = 0;
+ gSprites[spriteId].invisible = FALSE;
+ gDoingBattleAnim = FALSE;
+ WallyBufferExecCompleted();
+ }
+ else
+ {
+ if (((u16)gSprites[spriteId].data1 % 4) == 0)
+ gSprites[spriteId].invisible ^= 1;
+ gSprites[spriteId].data1++;
+ }
+}
+
+void sub_813789C(void)
+{
+ if (!ewram17810[gActiveBank].unk0_6)
+ {
+ FreeSpriteOamMatrix(&gSprites[gObjectBankIDs[gActiveBank]]);
+ DestroySprite(&gSprites[gObjectBankIDs[gActiveBank]]);
+ sub_8043DB0(gHealthboxIDs[gActiveBank]);
+ WallyBufferExecCompleted();
+ }
+}
+
+// Duplicate of sub_813741C
+void sub_8137908(void)
+{
+ if (gSprites[gObjectBankIDs[gActiveBank]].callback == SpriteCallbackDummy)
+ WallyBufferExecCompleted();
+}
+
+void sub_8137940(void)
+{
+ if (!ewram17810[gActiveBank].unk0_5)
+ WallyBufferExecCompleted();
+}
+
+void WallyBufferExecCompleted(void)
+{
+ gBattleBankFunc[gActiveBank] = WallyBufferRunCommand;
+ if (gBattleTypeFlags & BATTLE_TYPE_LINK)
+ {
+ u8 multiplayerId = GetMultiplayerId();
+
+ dp01_prepare_buffer_wireless_probably(2, 4, &multiplayerId);
+ gBattleBufferA[gActiveBank][0] = 0x38;
+ }
+ else
+ {
+ gBattleExecBuffer &= ~gBitTable[gActiveBank];
+ }
+}
+
+void unref_sub_81379E4(void)
+{
+ if (!ewram17810[gActiveBank].unk0_4)
+ WallyBufferExecCompleted();
+}
+
+void dp01t_00_5_getattr(void)
+{
+ u8 arr[0x100];
+ u32 r6 = 0;
+ u8 r4;
+ s32 i;
+
+ if (gBattleBufferA[gActiveBank][2] == 0)
+ {
+ r6 = sub_8137A84(gBattlePartyID[gActiveBank], arr);
+ }
+ else
+ {
+ r4 = gBattleBufferA[gActiveBank][2];
+ for (i = 0; i < 6; i++)
+ {
+ if (r4 & 1)
+ r6 += sub_8137A84(i, arr + r6);
+ r4 >>= 1;
+ }
+ }
+ dp01_build_cmdbuf_x1D_1D_numargs_varargs(1, r6, arr);
+ WallyBufferExecCompleted();
+}
+
+u32 sub_8137A84(u8 a, u8 *buffer)
+{
+ struct BattlePokemon battlePokemon;
+ struct UnknownStruct3 moveData;
+ u8 nickname[20];
+ u8 *src;
+ s16 data16;
+ u32 data32;
+ s32 size = 0;
+
+ switch (gBattleBufferA[gActiveBank][1])
+ {
+ case 0:
+ battlePokemon.species = GetMonData(&gPlayerParty[a], MON_DATA_SPECIES);
+ battlePokemon.item = GetMonData(&gPlayerParty[a], MON_DATA_HELD_ITEM);
+ for (size = 0; size < 4; size++)
+ {
+ battlePokemon.moves[size] = GetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + size);
+ battlePokemon.pp[size] = GetMonData(&gPlayerParty[a], MON_DATA_PP1 + size);
+ }
+ battlePokemon.ppBonuses = GetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES);
+ battlePokemon.friendship = GetMonData(&gPlayerParty[a], MON_DATA_FRIENDSHIP);
+ battlePokemon.experience = GetMonData(&gPlayerParty[a], MON_DATA_EXP);
+ battlePokemon.hpIV = GetMonData(&gPlayerParty[a], MON_DATA_HP_IV);
+ battlePokemon.attackIV = GetMonData(&gPlayerParty[a], MON_DATA_ATK_IV);
+ battlePokemon.defenseIV = GetMonData(&gPlayerParty[a], MON_DATA_DEF_IV);
+ battlePokemon.speedIV = GetMonData(&gPlayerParty[a], MON_DATA_SPD_IV);
+ battlePokemon.spAttackIV = GetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV);
+ battlePokemon.spDefenseIV = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV);
+ battlePokemon.personality = GetMonData(&gPlayerParty[a], MON_DATA_PERSONALITY);
+ battlePokemon.status1 = GetMonData(&gPlayerParty[a], MON_DATA_STATUS);
+ battlePokemon.level = GetMonData(&gPlayerParty[a], MON_DATA_LEVEL);
+ battlePokemon.hp = GetMonData(&gPlayerParty[a], MON_DATA_HP);
+ battlePokemon.maxHP = GetMonData(&gPlayerParty[a], MON_DATA_MAX_HP);
+ battlePokemon.attack = GetMonData(&gPlayerParty[a], MON_DATA_ATK);
+ battlePokemon.defense = GetMonData(&gPlayerParty[a], MON_DATA_DEF);
+ battlePokemon.speed = GetMonData(&gPlayerParty[a], MON_DATA_SPD);
+ battlePokemon.spAttack = GetMonData(&gPlayerParty[a], MON_DATA_SPATK);
+ battlePokemon.spDefense = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF);
+ battlePokemon.isEgg = GetMonData(&gPlayerParty[a], MON_DATA_IS_EGG);
+ battlePokemon.altAbility = GetMonData(&gPlayerParty[a], MON_DATA_ALT_ABILITY);
+ battlePokemon.otId = GetMonData(&gPlayerParty[a], MON_DATA_OT_ID);
+ GetMonData(&gPlayerParty[a], MON_DATA_NICKNAME, nickname);
+ StringCopy10(battlePokemon.nickname, nickname);
+ GetMonData(&gPlayerParty[a], MON_DATA_OT_NAME, battlePokemon.otName);
+ src = (u8 *)&battlePokemon;
+ for (size = 0; size < sizeof(battlePokemon); size++)
+ buffer[size] = src[size];
+ break;
+ case 1:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_SPECIES);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 2:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_HELD_ITEM);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 3:
+ for (size = 0; size < 4; size++)
+ {
+ moveData.moves[size] = GetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + size);
+ moveData.pp[size] = GetMonData(&gPlayerParty[a], MON_DATA_PP1 + size);
+ }
+ moveData.ppBonuses = GetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES);
+ src = (u8 *)&moveData;
+ for (size = 0; size < sizeof(moveData); size++)
+ buffer[size] = src[size];
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + gBattleBufferA[gActiveBank][1] - 4);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 8:
+ for (size = 0; size < 4; size++)
+ buffer[size] = GetMonData(&gPlayerParty[a], MON_DATA_PP1 + size);
+ buffer[size] = GetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES);
+ size++;
+ break;
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_PP1 + gBattleBufferA[gActiveBank][1] - 9);
+ size = 1;
+ break;
+ case 17:
+ data32 = GetMonData(&gPlayerParty[a], MON_DATA_OT_ID);
+ buffer[0] = (data32 & 0x000000FF);
+ buffer[1] = (data32 & 0x0000FF00) >> 8;
+ buffer[2] = (data32 & 0x00FF0000) >> 16;
+ size = 3;
+ break;
+ case 18:
+ data32 = GetMonData(&gPlayerParty[a], MON_DATA_EXP);
+ buffer[0] = (data32 & 0x000000FF);
+ buffer[1] = (data32 & 0x0000FF00) >> 8;
+ buffer[2] = (data32 & 0x00FF0000) >> 16;
+ size = 3;
+ break;
+ case 19:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_HP_EV);
+ size = 1;
+ break;
+ case 20:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_ATK_EV);
+ size = 1;
+ break;
+ case 21:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_DEF_EV);
+ size = 1;
+ break;
+ case 22:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPD_EV);
+ size = 1;
+ break;
+ case 23:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPATK_EV);
+ size = 1;
+ break;
+ case 24:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF_EV);
+ size = 1;
+ break;
+ case 25:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_FRIENDSHIP);
+ size = 1;
+ break;
+ case 26:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_POKERUS);
+ size = 1;
+ break;
+ case 27:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_MET_LOCATION);
+ size = 1;
+ break;
+ case 28:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_MET_LEVEL);
+ size = 1;
+ break;
+ case 29:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_MET_GAME);
+ size = 1;
+ break;
+ case 30:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_POKEBALL);
+ size = 1;
+ break;
+ case 31:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_HP_IV);
+ buffer[1] = GetMonData(&gPlayerParty[a], MON_DATA_ATK_IV);
+ buffer[2] = GetMonData(&gPlayerParty[a], MON_DATA_DEF_IV);
+ buffer[3] = GetMonData(&gPlayerParty[a], MON_DATA_SPD_IV);
+ buffer[4] = GetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV);
+ buffer[5] = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV);
+ size = 6;
+ break;
+ case 32:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_HP_IV);
+ size = 1;
+ break;
+ case 33:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_ATK_IV);
+ size = 1;
+ break;
+ case 34:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_DEF_IV);
+ size = 1;
+ break;
+ case 35:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPD_IV);
+ size = 1;
+ break;
+ case 36:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV);
+ size = 1;
+ break;
+ case 37:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV);
+ size = 1;
+ break;
+ case 38:
+ data32 = GetMonData(&gPlayerParty[a], MON_DATA_PERSONALITY);
+ buffer[0] = (data32 & 0x000000FF);
+ buffer[1] = (data32 & 0x0000FF00) >> 8;
+ buffer[2] = (data32 & 0x00FF0000) >> 16;
+ buffer[3] = (data32 & 0xFF000000) >> 24;
+ size = 4;
+ break;
+ case 39:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_CHECKSUM);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 40:
+ data32 = GetMonData(&gPlayerParty[a], MON_DATA_STATUS);
+ buffer[0] = (data32 & 0x000000FF);
+ buffer[1] = (data32 & 0x0000FF00) >> 8;
+ buffer[2] = (data32 & 0x00FF0000) >> 16;
+ buffer[3] = (data32 & 0xFF000000) >> 24;
+ size = 4;
+ break;
+ case 41:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_LEVEL);
+ size = 1;
+ break;
+ case 42:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_HP);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 43:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_MAX_HP);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 44:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_ATK);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 45:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_DEF);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 46:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_SPD);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 47:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_SPATK);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 48:
+ data16 = GetMonData(&gPlayerParty[a], MON_DATA_SPDEF);
+ buffer[0] = data16;
+ buffer[1] = data16 >> 8;
+ size = 2;
+ break;
+ case 49:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_COOL);
+ size = 1;
+ break;
+ case 50:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_BEAUTY);
+ size = 1;
+ break;
+ case 51:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_CUTE);
+ size = 1;
+ break;
+ case 52:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SMART);
+ size = 1;
+ break;
+ case 53:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_TOUGH);
+ size = 1;
+ break;
+ case 54:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SHEEN);
+ size = 1;
+ break;
+ case 55:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_COOL_RIBBON);
+ size = 1;
+ break;
+ case 56:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_BEAUTY_RIBBON);
+ size = 1;
+ break;
+ case 57:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_CUTE_RIBBON);
+ size = 1;
+ break;
+ case 58:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_SMART_RIBBON);
+ size = 1;
+ break;
+ case 59:
+ buffer[0] = GetMonData(&gPlayerParty[a], MON_DATA_TOUGH_RIBBON);
+ size = 1;
+ break;
+ }
+ return size;
+}
+
+void sub_8138230(void)
+{
+ sub_802ECF0();
+}
+
+void sub_813823C(void)
+{
+ u8 r4;
+ u8 i;
+
+ if (gBattleBufferA[gActiveBank][2] == 0)
+ {
+ sub_8138294(gBattlePartyID[gActiveBank]);
+ }
+ else
+ {
+ r4 = gBattleBufferA[gActiveBank][2];
+ for (i = 0; i < 6; i++)
+ {
+ if (r4 & 1)
+ sub_8138294(i);
+ r4 >>= 1;
+ }
+ }
+ WallyBufferExecCompleted();
+}
+
+void sub_8138294(u8 a)
+{
+ struct BattlePokemon *battlePokemon = (struct BattlePokemon *)&gBattleBufferA[gActiveBank][3];
+ struct UnknownStruct3 *moveData = (struct UnknownStruct3 *)&gBattleBufferA[gActiveBank][3];
+ s32 i;
+
+ switch (gBattleBufferA[gActiveBank][1])
+ {
+ case 0:
+ {
+ u8 iv;
+
+ SetMonData(&gPlayerParty[a], MON_DATA_SPECIES, (u8 *)&battlePokemon->species);
+ SetMonData(&gPlayerParty[a], MON_DATA_HELD_ITEM, (u8 *)&battlePokemon->item);
+ for (i = 0; i < 4; i++)
+ {
+ SetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + i, (u8 *)&battlePokemon->moves[i]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP1 + i, (u8 *)&battlePokemon->pp[i]);
+ }
+ SetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES, (u8 *)&battlePokemon->ppBonuses);
+ SetMonData(&gPlayerParty[a], MON_DATA_FRIENDSHIP, (u8 *)&battlePokemon->friendship);
+ SetMonData(&gPlayerParty[a], MON_DATA_EXP, (u8 *)&battlePokemon->experience);
+ iv = battlePokemon->hpIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_IV, (u8 *)&iv);
+ iv = battlePokemon->attackIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_IV, (u8 *)&iv);
+ iv = battlePokemon->defenseIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_IV, (u8 *)&iv);
+ iv = battlePokemon->speedIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_IV, (u8 *)&iv);
+ iv = battlePokemon->spAttackIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV, (u8 *)&iv);
+ iv = battlePokemon->spDefenseIV;
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV, (u8 *)&iv);
+ SetMonData(&gPlayerParty[a], MON_DATA_PERSONALITY, (u8 *)&battlePokemon->personality);
+ SetMonData(&gPlayerParty[a], MON_DATA_STATUS, (u8 *)&battlePokemon->status1);
+ SetMonData(&gPlayerParty[a], MON_DATA_LEVEL, (u8 *)&battlePokemon->level);
+ SetMonData(&gPlayerParty[a], MON_DATA_HP, (u8 *)&battlePokemon->hp);
+ SetMonData(&gPlayerParty[a], MON_DATA_MAX_HP, (u8 *)&battlePokemon->maxHP);
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK, (u8 *)&battlePokemon->attack);
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF, (u8 *)&battlePokemon->defense);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD, (u8 *)&battlePokemon->speed);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK, (u8 *)&battlePokemon->spAttack);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF, (u8 *)&battlePokemon->spDefense);
+ }
+ break;
+ case 1:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPECIES, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 2:
+ SetMonData(&gPlayerParty[a], MON_DATA_HELD_ITEM, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 3:
+ for (i = 0; i < 4; i++)
+ {
+ SetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + i, (u8 *)&moveData->moves[i]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP1 + i, (u8 *)&moveData->pp[i]);
+ }
+ SetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES, &moveData->ppBonuses);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ SetMonData(&gPlayerParty[a], MON_DATA_MOVE1 + gBattleBufferA[gActiveBank][1] - 4, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 8:
+ SetMonData(&gPlayerParty[a], MON_DATA_PP1, &gBattleBufferA[gActiveBank][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP2, &gBattleBufferA[gActiveBank][4]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP3, &gBattleBufferA[gActiveBank][5]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP4, &gBattleBufferA[gActiveBank][6]);
+ SetMonData(&gPlayerParty[a], MON_DATA_PP_BONUSES, &gBattleBufferA[gActiveBank][7]);
+ break;
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ SetMonData(&gPlayerParty[a], MON_DATA_PP1 + gBattleBufferA[gActiveBank][1] - 9, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 17:
+ SetMonData(&gPlayerParty[a], MON_DATA_OT_ID, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 18:
+ SetMonData(&gPlayerParty[a], MON_DATA_EXP, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 19:
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 20:
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 21:
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 22:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 23:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 24:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_EV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 25:
+ SetMonData(&gPlayerParty[a], MON_DATA_FRIENDSHIP, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 26:
+ SetMonData(&gPlayerParty[a], MON_DATA_POKERUS, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 27:
+ SetMonData(&gPlayerParty[a], MON_DATA_MET_LOCATION, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 28:
+ SetMonData(&gPlayerParty[a], MON_DATA_MET_LEVEL, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 29:
+ SetMonData(&gPlayerParty[a], MON_DATA_MET_GAME, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 30:
+ SetMonData(&gPlayerParty[a], MON_DATA_POKEBALL, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 31:
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_IV, &gBattleBufferA[gActiveBank][3]);
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_IV, &gBattleBufferA[gActiveBank][4]);
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_IV, &gBattleBufferA[gActiveBank][5]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_IV, &gBattleBufferA[gActiveBank][6]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV, &gBattleBufferA[gActiveBank][7]);
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBank][8]);
+ break;
+ case 32:
+ SetMonData(&gPlayerParty[a], MON_DATA_HP_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 33:
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 34:
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 35:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 36:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 37:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF_IV, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 38:
+ SetMonData(&gPlayerParty[a], MON_DATA_PERSONALITY, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 39:
+ SetMonData(&gPlayerParty[a], MON_DATA_CHECKSUM, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 40:
+ SetMonData(&gPlayerParty[a], MON_DATA_STATUS, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 41:
+ SetMonData(&gPlayerParty[a], MON_DATA_LEVEL, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 42:
+ SetMonData(&gPlayerParty[a], MON_DATA_HP, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 43:
+ SetMonData(&gPlayerParty[a], MON_DATA_MAX_HP, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 44:
+ SetMonData(&gPlayerParty[a], MON_DATA_ATK, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 45:
+ SetMonData(&gPlayerParty[a], MON_DATA_DEF, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 46:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPD, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 47:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPATK, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 48:
+ SetMonData(&gPlayerParty[a], MON_DATA_SPDEF, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 49:
+ SetMonData(&gPlayerParty[a], MON_DATA_COOL, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 50:
+ SetMonData(&gPlayerParty[a], MON_DATA_BEAUTY, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 51:
+ SetMonData(&gPlayerParty[a], MON_DATA_CUTE, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 52:
+ SetMonData(&gPlayerParty[a], MON_DATA_SMART, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 53:
+ SetMonData(&gPlayerParty[a], MON_DATA_TOUGH, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 54:
+ SetMonData(&gPlayerParty[a], MON_DATA_SHEEN, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 55:
+ SetMonData(&gPlayerParty[a], MON_DATA_COOL_RIBBON, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 56:
+ SetMonData(&gPlayerParty[a], MON_DATA_BEAUTY_RIBBON, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 57:
+ SetMonData(&gPlayerParty[a], MON_DATA_CUTE_RIBBON, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 58:
+ SetMonData(&gPlayerParty[a], MON_DATA_SMART_RIBBON, &gBattleBufferA[gActiveBank][3]);
+ break;
+ case 59:
+ SetMonData(&gPlayerParty[a], MON_DATA_TOUGH_RIBBON, &gBattleBufferA[gActiveBank][3]);
+ break;
+ }
+ sub_80324F8(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
+}
+
+void sub_8138C90(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8138C9C(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8138CA8(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8138CB4(void)
+{
+ if (gBattleBufferA[gActiveBank][1] == 0)
+ {
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 1);
+ gBattleBankFunc[gActiveBank] = sub_813789C;
+ }
+ else
+ {
+ FreeSpriteOamMatrix(&gSprites[gObjectBankIDs[gActiveBank]]);
+ DestroySprite(&gSprites[gObjectBankIDs[gActiveBank]]);
+ sub_8043DB0(gHealthboxIDs[gActiveBank]);
+ WallyBufferExecCompleted();
+ }
+}
+
+void sub_8138D38(void)
+{
+ sub_8031AF4(2, gActiveBank);
+ GetMonSpriteTemplate_803C5A0(2, GetBankIdentity(gActiveBank));
+ gObjectBankIDs[gActiveBank] = CreateSprite(
+ &gUnknown_02024E8C,
+ 80, 80 + 4 * (8 - gTrainerBackPicCoords[2].coords),
+ 30);
+ gSprites[gObjectBankIDs[gActiveBank]].oam.paletteNum = gActiveBank;
+ gSprites[gObjectBankIDs[gActiveBank]].pos2.x = 240;
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = -2;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_80313A0;
+ gBattleBankFunc[gActiveBank] = sub_813741C;
+}
+
+void sub_8138E04(void)
+{
+ sub_8031AF4(2, gActiveBank);
+ GetMonSpriteTemplate_803C5A0(2, GetBankIdentity(gActiveBank));
+ gObjectBankIDs[gActiveBank] = CreateSprite(
+ &gUnknown_02024E8C,
+ 80, 80 + 4 * (8 - gTrainerBackPicCoords[2].coords),
+ 30);
+ gSprites[gObjectBankIDs[gActiveBank]].oam.paletteNum = gActiveBank;
+ gSprites[gObjectBankIDs[gActiveBank]].pos2.x = -96;
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = 2;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_80313A0;
+ gBattleBankFunc[gActiveBank] = sub_8137908;
+}
+
+void sub_8138ED0(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8138EDC(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8138EE8(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8138EF4(void)
+{
+ ewram17840.unk8 = 4;
+ gDoingBattleAnim = TRUE;
+ move_anim_start_t4(gActiveBank, gActiveBank, GetBankByPlayerAI(1), 4);
+ gBattleBankFunc[gActiveBank] = bx_wait_t5;
+}
+
+void sub_8138F44(void)
+{
+ u8 val = gBattleBufferA[gActiveBank][1];
+
+ ewram17840.unk8 = val;
+ gDoingBattleAnim = TRUE;
+ move_anim_start_t4(gActiveBank, gActiveBank, GetBankByPlayerAI(1), 4);
+ gBattleBankFunc[gActiveBank] = bx_wait_t5;
+}
+
+void sub_8138FA0(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8138FAC(void)
+{
+ u16 r0 = gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8);
+
+ gUnknown_0202F7C4 = gBattleBufferA[gActiveBank][3];
+ gMovePowerMoveAnim = gBattleBufferA[gActiveBank][4] | (gBattleBufferA[gActiveBank][5] << 8);
+ gMoveDmgMoveAnim = gBattleBufferA[gActiveBank][6] | (gBattleBufferA[gActiveBank][7] << 8) | (gBattleBufferA[gActiveBank][8] << 16) | (gBattleBufferA[gActiveBank][9] << 24);
+ gHappinessMoveAnim = gBattleBufferA[gActiveBank][10];
+ gWeatherMoveAnim = gBattleBufferA[gActiveBank][12] | (gBattleBufferA[gActiveBank][13] << 8);
+ gDisableStructMoveAnim = (u32 *)&gBattleBufferA[gActiveBank][16];
+ gPID_perBank[gActiveBank] = *gDisableStructMoveAnim;
+ if (sub_8031720(r0, gUnknown_0202F7C4) != 0)
+ {
+ // Dead code. sub_8031720 always returns 0.
+ WallyBufferExecCompleted();
+ }
+ else
+ {
+ ewram17810[gActiveBank].unk4 = 0;
+ gBattleBankFunc[gActiveBank] = sub_81390D0;
+ }
+}
+
+void sub_81390D0(void)
+{
+ u16 r4 = gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8);
+
+#ifndef NONMATCHING
+ asm("":::"r6");
+#endif
+
+ switch (ewram17810[gActiveBank].unk4)
+ {
+ case 0:
+ if (ewram17800[gActiveBank].unk0_2 == 1)
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 5);
+ ewram17810[gActiveBank].unk4 = 1;
+ break;
+ case 1:
+ if (ewram17810[gActiveBank].unk0_6 == 0)
+ {
+ sub_80326EC(0);
+ ExecuteMoveAnim(r4);
+ ewram17810[gActiveBank].unk4 = 2;
+ }
+ break;
+ case 2:
+ gAnimScriptCallback();
+ if (!gAnimScriptActive)
+ {
+ sub_80326EC(1);
+ if (ewram17800[gActiveBank].unk0_2 == 1)
+ move_anim_start_t4(gActiveBank, gActiveBank, gActiveBank, 6);
+ ewram17810[gActiveBank].unk4 = 3;
+ }
+ break;
+ case 3:
+ if (ewram17810[gActiveBank].unk0_6 == 0)
+ {
+ sub_8031F24();
+ sub_80324BC(gActiveBank, gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8));
+ ewram17810[gActiveBank].unk4 = 0;
+ WallyBufferExecCompleted();
+ }
+ break;
+ }
+}
+
+void sub_8139208(void)
+{
+ u16 *ptr;
+
+ gUnknown_030042A4 = 0;
+ gUnknown_030042A0 = 0;
+ ptr = (u16 *)&gBattleBufferA[gActiveBank][2];
+ if (*ptr == 2)
+ DestroyMenuCursor();
+ BufferStringBattle(*ptr);
+ sub_8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 0x90, 2, 15);
+ gBattleBankFunc[gActiveBank] = sub_8137454;
+}
+
+void dp01t_11_5_message_for_player_only(void)
+{
+ if (GetBankSide(gActiveBank) == 0)
+ sub_8139208();
+ else
+ WallyBufferExecCompleted();
+}
+
+void sub_8139298(void)
+{
+ s32 i;
+
+ gUnknown_030042A4 = 0;
+ gUnknown_030042A0 = 160;
+ gUnknown_03004210.paletteNum = 0;
+ FillWindowRect_DefaultPalette(&gUnknown_03004210, 10, 2, 15, 27, 18);
+ FillWindowRect_DefaultPalette(&gUnknown_03004210, 10, 2, 35, 16, 36);
+ gBattleBankFunc[gActiveBank] = sub_81372BC;
+ InitWindow(&gUnknown_03004210, gUnknown_08400CF3, 400, 18, 35);
+ sub_8002F44(&gUnknown_03004210);
+ sub_814A5C0(0, 0xFFFF, 12, 0x2D9F, 0);
+ for (i = 0; i < 4; i++)
+ nullsub_8(i);
+ sub_802E3E4(0, 0);
+ StrCpyDecodeToDisplayedStringBattle(gUnknown_08400CCC);
+#ifdef ENGLISH
+ InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 440, 2, 35);
+#else
+ InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 444, 2, 35);
+#endif
+ sub_8002F44(&gUnknown_03004210);
+}
+
+void sub_8139378(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139384(void)
+{
+ switch (ewram[0x160A9])
+ {
+ case 0:
+ sub_80304A8();
+ ewram[0x160A9]++;
+ ewram[0x160AB] = 80;
+ // fall through
+ case 1:
+ ewram[0x160AB]--;
+ if (ewram[0x160AB] == 0)
+ {
+ DestroyMenuCursor();
+ PlaySE(SE_SELECT);
+ dp01_build_cmdbuf_x21_a_bb(1, 10, 256);
+ WallyBufferExecCompleted();
+ }
+ break;
+ }
+}
+
+void sub_81393EC(void)
+{
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
+ gBattleBankFunc[gActiveBank] = sub_81374C4;
+ gBankInMenu = gActiveBank;
+}
+
+void sub_813942C(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139438(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139444(void)
+{
+ s16 r7;
+
+ load_gfxc_health_bar(0);
+ r7 = gBattleBufferA[gActiveBank][2] | (gBattleBufferA[gActiveBank][3] << 8);
+ if (r7 != 0x7FFF)
+ {
+ u32 maxHP = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_MAX_HP);
+ u32 curHP = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_HP);
+
+ sub_8043D84(gActiveBank, gHealthboxIDs[gActiveBank], maxHP, curHP, r7);
+ }
+ else
+ {
+ u32 maxHP = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_MAX_HP);
+
+ sub_8043D84(gActiveBank, gHealthboxIDs[gActiveBank], maxHP, 0, r7);
+ sub_80440EC(gHealthboxIDs[gActiveBank], 0, 0);
+ }
+ gBattleBankFunc[gActiveBank] = sub_81377B0;
+}
+
+void sub_8139544(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139550(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_813955C(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139568(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139574(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139580(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_813958C(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139598(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_81395A4(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_81395B0(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_81395BC(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_81395C8(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_81395D4(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_81395E0(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_81395EC(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_81395F8(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139604(void)
+{
+ if (gSprites[gObjectBankIDs[gActiveBank]].invisible == TRUE)
+ {
+ WallyBufferExecCompleted();
+ }
+ else
+ {
+ gDoingBattleAnim = 1;
+ gSprites[gObjectBankIDs[gActiveBank]].data1 = 0;
+ sub_8047858(gActiveBank);
+ gBattleBankFunc[gActiveBank] = bx_blink_t5;
+ }
+}
+
+void sub_8139674(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139680(void)
+{
+ PlaySE(gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8));
+ WallyBufferExecCompleted();
+}
+
+void sub_81396B0(void)
+{
+ PlayFanfare(gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8));
+ WallyBufferExecCompleted();
+}
+
+void sub_81396E0(void)
+{
+ PlayCry1(GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES), 25);
+ WallyBufferExecCompleted();
+}
+
+void dp01t_2E_5_battle_intro(void)
+{
+ sub_80E43C0(gBattleBufferA[gActiveBank][1]);
+ gUnknown_02024DE8 |= 1;
+ WallyBufferExecCompleted();
+}
+
+void sub_8139750(void)
+{
+ u8 paletteNum;
+ u8 taskId;
+
+ oamt_add_pos2_onto_pos1(&gSprites[gObjectBankIDs[gActiveBank]]);
+ gSprites[gObjectBankIDs[gActiveBank]].data0 = 50;
+ gSprites[gObjectBankIDs[gActiveBank]].data2 = -40;
+ gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y;
+ gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34;
+ gSprites[gObjectBankIDs[gActiveBank]].data5 = gActiveBank;
+ oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], sub_8030E38);
+ StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], 1);
+ paletteNum = AllocSpritePalette(0xD6F8);
+ LoadCompressedPalette(gTrainerBackPicPaletteTable[2].data, 0x100 + paletteNum * 16, 32);
+ gSprites[gObjectBankIDs[gActiveBank]].oam.paletteNum = paletteNum;
+ taskId = CreateTask(sub_8139A2C, 5);
+ gTasks[taskId].data[0] = gActiveBank;
+ if (ewram17810[gActiveBank].unk0_0)
+ gTasks[gUnknown_02024E68[gActiveBank]].func = sub_8044CA0;
+ ewram17810[4].unk9 |= 1;
+ gBattleBankFunc[gActiveBank] = nullsub_91;
+}
+
+void sub_81398BC(u8 bank)
+{
+ u16 species;
+
+ ewram17800[bank].unk2 = 0;
+ gBattlePartyID[bank] = gBattleBufferA[bank][1];
+ species = GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_SPECIES);
+ gUnknown_0300434C[bank] = CreateInvisibleSpriteWithCallback(sub_80312F0);
+ GetMonSpriteTemplate_803C56C(species, GetBankIdentity(bank));
+ gObjectBankIDs[bank] = CreateSprite(
+ &gUnknown_02024E8C,
+ sub_8077ABC(bank, 2),
+ sub_8077F68(bank),
+ sub_8079E90(bank));
+ gSprites[gUnknown_0300434C[bank]].data1 = gObjectBankIDs[bank];
+ gSprites[gObjectBankIDs[bank]].data0 = bank;
+ gSprites[gObjectBankIDs[bank]].data2 = species;
+ gSprites[gObjectBankIDs[bank]].oam.paletteNum = bank;
+ StartSpriteAnim(&gSprites[gObjectBankIDs[bank]], gBattleMonForms[bank]);
+ gSprites[gObjectBankIDs[bank]].invisible = TRUE;
+ gSprites[gObjectBankIDs[bank]].callback = SpriteCallbackDummy;
+ gSprites[gUnknown_0300434C[bank]].data0 = sub_8046400(0, 0xFF);
+}
+
+void sub_8139A2C(u8 taskId)
+{
+ if (gTasks[taskId].data[1] < 31)
+ {
+ gTasks[taskId].data[1]++;
+ }
+ else
+ {
+ u8 savedActiveBank = gActiveBank;
+
+ gActiveBank = gTasks[taskId].data[0];
+ gBattleBufferA[gActiveBank][1] = gBattlePartyID[gActiveBank];
+ sub_81398BC(gActiveBank);
+ gBattleBankFunc[gActiveBank] = sub_8137538;
+ gActiveBank = savedActiveBank;
+ DestroyTask(taskId);
+ }
+}
+
+void sub_8139AA0(void)
+{
+ if (gBattleBufferA[gActiveBank][1] != 0 && GetBankSide(gActiveBank) == 0)
+ {
+ WallyBufferExecCompleted();
+ }
+ else
+ {
+ ewram17810[gActiveBank].unk0_0 = 1;
+ gUnknown_02024E68[gActiveBank] = sub_8044804(gActiveBank, (struct BattleInterfaceStruct2 *)&gBattleBufferA[gActiveBank][4], gBattleBufferA[gActiveBank][1], gBattleBufferA[gActiveBank][2]);
+ WallyBufferExecCompleted();
+ }
+}
+
+void sub_8139B20(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139B2C(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139B38(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139B44(void)
+{
+ u8 val2 = gBattleBufferA[gActiveBank][1];
+ u16 val = gBattleBufferA[gActiveBank][2] | (gBattleBufferA[gActiveBank][3] << 8);
+
+ if (move_anim_start_t3(gActiveBank, gActiveBank, gActiveBank, val2, val))
+ WallyBufferExecCompleted();
+ else
+ gBattleBankFunc[gActiveBank] = sub_8137940;
+}
+
+void sub_8139BA0(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139BAC(void)
+{
+ WallyBufferExecCompleted();
+}
+
+void sub_8139BB8(void)
+{
+ gBattleOutcome = gBattleBufferA[gActiveBank][1];
+ FadeOutMapMusic(5);
+ BeginFastPaletteFade(3);
+ WallyBufferExecCompleted();
+ if ((gBattleTypeFlags & BATTLE_TYPE_LINK) && !(gBattleTypeFlags & BATTLE_TYPE_WILD))
+ gBattleBankFunc[gActiveBank] = sub_813746C;
+}
+
+void nullsub_80(void)
+{
+}
diff --git a/src/battle_interface.c b/src/battle_interface.c
index c5d07e8e9..246bda62b 100644
--- a/src/battle_interface.c
+++ b/src/battle_interface.c
@@ -1,16 +1,18 @@
#include "global.h"
-#include "asm.h"
#include "battle.h"
-#include "sprite.h"
-#include "string_util.h"
-#include "text.h"
+#include "battle_interface.h"
#include "decompress.h"
-#include "sound.h"
-#include "songs.h"
-#include "battle.h"
#include "palette.h"
#include "pokedex.h"
-#include "battle_interface.h"
+#include "pokemon.h"
+#include "rom_8077ABC.h"
+#include "safari_zone.h"
+#include "songs.h"
+#include "sound.h"
+#include "sprite.h"
+#include "string_util.h"
+#include "task.h"
+#include "text.h"
struct UnknownStruct5
{
@@ -32,16 +34,14 @@ extern u8 ewram[];
#define ewram16089 (*(u8 *) (ewram + 0x16089))
#define ewram17850 ((struct UnknownStruct5 *)(ewram + 0x17850))
-extern u8 gUnknown_020238CC[];
-extern u8 gUnknown_02024A68;
-extern u16 gUnknown_02024A6A[];
-extern u8 gUnknown_02024A72[];
-extern u8 gUnknown_03004340[];
+extern u8 gDisplayedStringBattle[];
+extern u8 gNoOfAllBanks;
+extern u16 gBattlePartyID[];
+extern u8 gBanksBySide[];
+extern u8 gHealthboxIDs[];
extern u16 gBattleTypeFlags;
-extern u8 gNumSafariBalls;
-extern u32 gExperienceTables[8][101];
extern const struct SpriteTemplate gSpriteTemplate_820A4EC[];
extern const struct SpriteTemplate gSpriteTemplate_820A51C[];
extern const struct SpriteTemplate gSpriteTemplate_820A54C;
@@ -71,22 +71,17 @@ extern const u8 gUnknown_0820A81C[];
extern const u8 gUnknown_0820A864[];
extern const u8 gUnknown_0820A89C[];
extern const u8 gUnknown_0820A8B0[];
-extern const struct BaseStats gBaseStats[];
extern const u8 BattleText_SafariBalls[];
extern const u8 BattleText_SafariBallsLeft[];
extern const u8 BattleText_HighlightRed[];
extern const u8 gUnknown_08D1216C[][32];
-extern const u8 *const gNatureNames[];
extern const u16 gBattleInterfaceStatusIcons_DynPal[];
#define ABS(n) ((n) >= 0 ? (n) : -(n))
// Used for computing copy destination addresses
#define MACRO1(n) ((n) - (n) / 8 * 8) + 64 * ((n) / 8)
-extern int sub_8040D3C();
-extern void load_gfxc_health_bar();
-
static void sub_8043D5C(struct Sprite *);
static const void *sub_8043CDC(u8);
static void sub_8044210(u8, s16, u8);
@@ -429,7 +424,7 @@ u8 battle_make_oam_normal_battle(u8 a)
if (!IsDoubleBattle())
{
- if (battle_side_get_owner(a) == 0)
+ if (GetBankSide(a) == 0)
{
spriteId1 = CreateSprite(&gSpriteTemplate_820A4EC[0], 240, 160, 1);
spriteId2 = CreateSpriteAtEnd(&gSpriteTemplate_820A4EC[0], 240, 160, 1);
@@ -455,10 +450,10 @@ u8 battle_make_oam_normal_battle(u8 a)
//_08043A28
else
{
- if (battle_side_get_owner(a) == 0)
+ if (GetBankSide(a) == 0)
{
- spriteId1 = CreateSprite(&gSpriteTemplate_820A4EC[battle_get_per_side_status(a) / 2], 240, 160, 1);
- spriteId2 = CreateSpriteAtEnd(&gSpriteTemplate_820A4EC[battle_get_per_side_status(a) / 2], 240, 160, 1);
+ spriteId1 = CreateSprite(&gSpriteTemplate_820A4EC[GetBankIdentity(a) / 2], 240, 160, 1);
+ spriteId2 = CreateSpriteAtEnd(&gSpriteTemplate_820A4EC[GetBankIdentity(a) / 2], 240, 160, 1);
gSprites[spriteId1].oam.affineParam = spriteId2;
gSprites[spriteId2].data5 = spriteId1;
@@ -469,8 +464,8 @@ u8 battle_make_oam_normal_battle(u8 a)
//_08043ACC
else
{
- spriteId1 = CreateSprite(&gSpriteTemplate_820A51C[battle_get_per_side_status(a) / 2], 240, 160, 1);
- spriteId2 = CreateSpriteAtEnd(&gSpriteTemplate_820A51C[battle_get_per_side_status(a) / 2], 240, 160, 1);
+ spriteId1 = CreateSprite(&gSpriteTemplate_820A51C[GetBankIdentity(a) / 2], 240, 160, 1);
+ spriteId2 = CreateSpriteAtEnd(&gSpriteTemplate_820A51C[GetBankIdentity(a) / 2], 240, 160, 1);
gSprites[spriteId1].oam.affineParam = spriteId2;
gSprites[spriteId2].data5 = spriteId1;
@@ -482,9 +477,9 @@ u8 battle_make_oam_normal_battle(u8 a)
}
//_08043B50
- spriteId3 = CreateSpriteAtEnd(&gSpriteTemplate_820A56C[gUnknown_02024A72[a]], 140, 60, 0);
+ spriteId3 = CreateSpriteAtEnd(&gSpriteTemplate_820A56C[gBanksBySide[a]], 140, 60, 0);
sprite = &gSprites[spriteId3];
- SetSubspriteTables(sprite, &gSubspriteTables_820A684[battle_side_get_owner(a)]);
+ SetSubspriteTables(sprite, &gSubspriteTables_820A684[GetBankSide(a)]);
sprite->subspriteMode = 2;
sprite->oam.priority = 1;
CpuCopy32(sub_8043CDC(1), (void *)(OBJ_VRAM0 + sprite->oam.tileNum * 32), 64);
@@ -597,13 +592,13 @@ void sub_8043EB4(u8 priority)
{
s32 i;
- for (i = 0; i < gUnknown_02024A68; i++)
+ for (i = 0; i < gNoOfAllBanks; i++)
{
u8 spriteId1;
u8 spriteId2;
u8 spriteId3;
- spriteId1 = gUnknown_03004340[i];
+ spriteId1 = gHealthboxIDs[i];
spriteId2 = gSprites[spriteId1].oam.affineParam;
spriteId3 = gSprites[spriteId1].data5;
gSprites[spriteId1].oam.priority = priority;
@@ -619,7 +614,7 @@ void sub_8043F44(u8 a)
if (!IsDoubleBattle())
{
- if (battle_side_get_owner(a) != 0)
+ if (GetBankSide(a) != 0)
{
x = 44;
y = 30;
@@ -632,7 +627,7 @@ void sub_8043F44(u8 a)
}
else
{
- switch (battle_get_per_side_status(a))
+ switch (GetBankIdentity(a))
{
case 0:
x = 159;
@@ -652,7 +647,7 @@ void sub_8043F44(u8 a)
break;
}
}
- sub_8043E50(gUnknown_03004340[a], x, y);
+ sub_8043E50(gHealthboxIDs[a], x, y);
}
#if ENGLISH
@@ -673,14 +668,14 @@ static void sub_8043FC0(u8 a, u8 b)
memcpy(str, gUnknown_0820A81C, sizeof(str));
if (!IsDoubleBattle())
{
- if (battle_side_get_owner(gSprites[a].data6) == 0)
+ if (GetBankSide(gSprites[a].data6) == 0)
r7 = gUnknown_0820A804;
else
r7 = gUnknown_0820A80C;
}
else
{
- if (battle_side_get_owner(gSprites[a].data6) == 0)
+ if (GetBankSide(gSprites[a].data6) == 0)
r7 = gUnknown_0820A814;
else
r7 = gUnknown_0820A80C;
@@ -730,7 +725,7 @@ void sub_80440EC(u8 a, s16 b, u8 c)
memcpy(str, gUnknown_0820A864, sizeof(str));
foo = gSprites[a].data6;
- if (IsDoubleBattle() == TRUE || battle_side_get_owner(foo) == 1)
+ if (IsDoubleBattle() == TRUE || GetBankSide(foo) == 1)
{
//_08044136
sub_8044210(a, b, c);
@@ -740,7 +735,7 @@ void sub_80440EC(u8 a, s16 b, u8 c)
ptr = str + 6;
if (c == 0)
{
- if (battle_side_get_owner(gSprites[a].data6) == 0)
+ if (GetBankSide(gSprites[a].data6) == 0)
r4 = gUnknown_0820A83C;
else
r4 = gUnknown_0820A848;
@@ -752,7 +747,7 @@ void sub_80440EC(u8 a, s16 b, u8 c)
}
else
{
- if (battle_side_get_owner(gSprites[a].data6) == 0)
+ if (GetBankSide(gSprites[a].data6) == 0)
r4 = gUnknown_0820A854;
else
r4 = gUnknown_0820A85C;
@@ -802,7 +797,7 @@ void sub_80440EC(u8 a, s16 b, u8 c)
beq _08044136\n\
lsls r0, r5, 24\n\
lsrs r0, 24\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
lsrs r0, 24\n\
cmp r0, 0x1\n\
@@ -826,7 +821,7 @@ _0804414C:\n\
ldrh r0, [r4, 0x3A]\n\
lsls r0, 24\n\
lsrs r0, 24\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
ldr r4, _08044188 @ =gUnknown_0820A848\n\
cmp r0, 0\n\
@@ -854,7 +849,7 @@ _08044190:\n\
ldrh r0, [r4, 0x3A]\n\
lsls r0, 24\n\
lsrs r0, 24\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
ldr r4, _080441FC @ =gUnknown_0820A85C\n\
cmp r0, 0\n\
@@ -943,7 +938,7 @@ static void sub_8044210(u8 a, s16 b, u8 c)
r7 = gUnknown_0820A894;
r10 = 2;
sub_8003504(ptr, b, 0xF, 1);
- if (battle_side_get_owner(r4) == 0)
+ if (GetBankSide(r4) == 0)
{
CpuCopy32(sub_8043CDC(0x74), (void *)(OBJ_VRAM0 + (gSprites[a].oam.tileNum + 0x34) * 32), 32);
}
@@ -969,7 +964,7 @@ void sub_8044338(u8 a, struct Pokemon *pkmn)
// TODO: make this a local variable
memcpy(str, gUnknown_0820A864, sizeof(str));
- r6 = ewram520[battle_get_per_side_status(gSprites[a].data6)].filler0;
+ r6 = ewram520[GetBankIdentity(gSprites[a].data6)].filler0;
r8 = 5;
nature = GetNature(pkmn);
StringCopy(str + 6, gNatureNames[nature]);
@@ -1053,7 +1048,7 @@ void sub_8044338(u8 a, struct Pokemon *pkmn)
ldrh r0, [r0, 0x3A]\n\
lsls r0, 24\n\
lsrs r0, 24\n\
- bl battle_get_per_side_status\n\
+ bl GetBankIdentity\n\
lsls r0, 24\n\
lsrs r0, 24\n\
lsls r1, r0, 1\n\
@@ -1292,17 +1287,17 @@ void sub_804454C(void)
s32 i;
u8 spriteId;
- for (i = 0; i < gUnknown_02024A68; i++)
+ for (i = 0; i < gNoOfAllBanks; i++)
{
- if (gSprites[gUnknown_03004340[i]].callback == SpriteCallbackDummy
- && battle_side_get_owner(i) != 1
- && (IsDoubleBattle() || battle_side_get_owner(i) != 0))
+ if (gSprites[gHealthboxIDs[i]].callback == SpriteCallbackDummy
+ && GetBankSide(i) != 1
+ && (IsDoubleBattle() || GetBankSide(i) != 0))
{
u8 r6;
ewram17800[i].unk0_4 ^= 1;
r6 = ewram17800[i].unk0_4;
- if (battle_side_get_owner(i) == 0)
+ if (GetBankSide(i) == 0)
{
if (!IsDoubleBattle())
@@ -1312,17 +1307,17 @@ void sub_804454C(void)
if (r6 == 1)
{
- spriteId = gSprites[gUnknown_03004340[i]].data5;
+ spriteId = gSprites[gHealthboxIDs[i]].data5;
CpuFill32(0, (void *)(OBJ_VRAM0 + gSprites[spriteId].oam.tileNum * 32), 0x100);
- sub_8044210(gUnknown_03004340[i], GetMonData(&gPlayerParty[gUnknown_02024A6A[i]], MON_DATA_HP), 0);
- sub_8044210(gUnknown_03004340[i], GetMonData(&gPlayerParty[gUnknown_02024A6A[i]], MON_DATA_MAX_HP), 1);
+ sub_8044210(gHealthboxIDs[i], GetMonData(&gPlayerParty[gBattlePartyID[i]], MON_DATA_HP), 0);
+ sub_8044210(gHealthboxIDs[i], GetMonData(&gPlayerParty[gBattlePartyID[i]], MON_DATA_MAX_HP), 1);
}
else
{
- draw_status_ailment_maybe(gUnknown_03004340[i]);
- sub_8045A5C(gUnknown_03004340[i], &gPlayerParty[gUnknown_02024A6A[i]], 5);
- CpuCopy32(sub_8043CDC(0x75), (void *)(OBJ_VRAM0 + 0x680 + gSprites[gUnknown_03004340[i]].oam.tileNum * 32), 32);
+ draw_status_ailment_maybe(gHealthboxIDs[i]);
+ sub_8045A5C(gHealthboxIDs[i], &gPlayerParty[gBattlePartyID[i]], 5);
+ CpuCopy32(sub_8043CDC(0x75), (void *)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxIDs[i]].oam.tileNum * 32), 32);
}
}
else
@@ -1331,26 +1326,26 @@ void sub_804454C(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_SAFARI)
{
- sub_8044338(gUnknown_03004340[i], &gEnemyParty[gUnknown_02024A6A[i]]);
+ sub_8044338(gHealthboxIDs[i], &gEnemyParty[gBattlePartyID[i]]);
}
else
{
- spriteId = gSprites[gUnknown_03004340[i]].data5;
+ spriteId = gSprites[gHealthboxIDs[i]].data5;
CpuFill32(0, (void *)(OBJ_VRAM0 + gSprites[spriteId].oam.tileNum * 32), 0x100);
- sub_8044210(gUnknown_03004340[i], GetMonData(&gEnemyParty[gUnknown_02024A6A[i]], MON_DATA_HP), 0);
- sub_8044210(gUnknown_03004340[i], GetMonData(&gEnemyParty[gUnknown_02024A6A[i]], MON_DATA_MAX_HP), 1);
+ sub_8044210(gHealthboxIDs[i], GetMonData(&gEnemyParty[gBattlePartyID[i]], MON_DATA_HP), 0);
+ sub_8044210(gHealthboxIDs[i], GetMonData(&gEnemyParty[gBattlePartyID[i]], MON_DATA_MAX_HP), 1);
}
}
else
{
- draw_status_ailment_maybe(gUnknown_03004340[i]);
- sub_8045A5C(gUnknown_03004340[i], &gEnemyParty[gUnknown_02024A6A[i]], 5);
+ draw_status_ailment_maybe(gHealthboxIDs[i]);
+ sub_8045A5C(gHealthboxIDs[i], &gEnemyParty[gBattlePartyID[i]], 5);
if (gBattleTypeFlags & BATTLE_TYPE_SAFARI)
- sub_8045A5C(gUnknown_03004340[i], &gEnemyParty[gUnknown_02024A6A[i]], 4);
+ sub_8045A5C(gHealthboxIDs[i], &gEnemyParty[gBattlePartyID[i]], 4);
}
}
- gSprites[gUnknown_03004340[i]].data7 ^= 1;
+ gSprites[gHealthboxIDs[i]].data7 ^= 1;
}
}
}
@@ -1371,9 +1366,9 @@ u8 sub_8044804(u8 a, const struct BattleInterfaceStruct2 *b, u8 c, u8 d)
u8 sp18;
u8 taskId;
- if (c == 0 || battle_get_per_side_status(a) != 3)
+ if (c == 0 || GetBankIdentity(a) != 3)
{
- if (battle_side_get_owner(a) == 0)
+ if (GetBankSide(a) == 0)
{
r7 = 0;
x = 136;
@@ -1466,7 +1461,7 @@ u8 sub_8044804(u8 a, const struct BattleInterfaceStruct2 *b, u8 c, u8 d)
gSprites[sp[i]].data2 = r7;
}
//_08044A76
- if (battle_side_get_owner(a) == 0)
+ if (GetBankSide(a) == 0)
{
for (i = 0; i < 6; i++) //_08044A9A
{
@@ -1587,14 +1582,14 @@ u8 sub_8044804(u8 a, const struct BattleInterfaceStruct2 *b, u8 c, u8 d)
str r3, [sp, 0x10]\n\
cmp r4, 0\n\
beq _08044834\n\
- bl battle_get_per_side_status\n\
+ bl GetBankIdentity\n\
lsls r0, 24\n\
lsrs r0, 24\n\
cmp r0, 0x3\n\
beq _08044878\n\
_08044834:\n\
ldr r0, [sp, 0x8]\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
cmp r0, 0\n\
bne _08044854\n\
@@ -1876,7 +1871,7 @@ _08044A56:\n\
b _08044970\n\
_08044A76:\n\
ldr r0, [sp, 0x8]\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
cmp r0, 0\n\
bne _08044B5E\n\
@@ -2182,7 +2177,7 @@ void sub_8044CA0(u8 taskId)
{
for (i = 0; i < 6; i++)
{
- if (battle_side_get_owner(sp8) != 0)
+ if (GetBankSide(sp8) != 0)
{
gSprites[sp[5 - i]].data1 = 7 * i;
gSprites[sp[5 - i]].data3 = 0;
@@ -2380,10 +2375,10 @@ static void sub_80451A0(u8 a, struct Pokemon *pkmn)
s32 _7;
u8 *const *r1;
- StringCopy(gUnknown_020238CC, gUnknown_0820A8B0);
+ StringCopy(gDisplayedStringBattle, gUnknown_0820A8B0);
GetMonData(pkmn, MON_DATA_NICKNAME, nickname);
StringGetEnd10(nickname);
- ptr = StringCopy(gUnknown_020238CC + 3, nickname);
+ ptr = StringCopy(gDisplayedStringBattle + 3, nickname);
ptr[0] = EXT_CTRL_CODE_BEGIN;
ptr[1] = 3;
ptr[2] = 2;
@@ -2419,15 +2414,15 @@ static void sub_80451A0(u8 a, struct Pokemon *pkmn)
ptr[1] = 0x13;
ptr[2] = 0x37;
ptr[3] = EOS;
- ptr = (u8 *)0x02000520 + battle_get_per_side_status(gSprites[a].data6) * 0x180;
- sub_80034D4(ptr, gUnknown_020238CC);
+ ptr = (u8 *)0x02000520 + GetBankIdentity(gSprites[a].data6) * 0x180;
+ sub_80034D4(ptr, gDisplayedStringBattle);
i = 0;
_7 = 7;
if (GetMonData(pkmn, MON_DATA_LANGUAGE) == 1
&& GetMonData(pkmn, MON_DATA_IS_EGG) == 0)
{
- u8 *p = gUnknown_020238CC;
+ u8 *p = gDisplayedStringBattle;
while (*p != EOS)
{
@@ -2456,7 +2451,7 @@ static void sub_80451A0(u8 a, struct Pokemon *pkmn)
for (; i < _7; i++)
CpuCopy32(sub_8043CDC(0x2B), ptr + 64 * i, 32);
- if (battle_side_get_owner(gSprites[a].data6) == 0 && !IsDoubleBattle())
+ if (GetBankSide(gSprites[a].data6) == 0 && !IsDoubleBattle())
{
r1 = (u8 *const *)gUnknown_0820A8B4;
for (i = 0; i < _7; i++)
@@ -2474,7 +2469,7 @@ static void sub_80451A0(u8 a, struct Pokemon *pkmn)
}
else
{
- if (battle_side_get_owner(gSprites[a].data6) == 0)
+ if (GetBankSide(gSprites[a].data6) == 0)
r1 = (u8 *const *)gUnknown_0820A904;
else
r1 = (u8 *const *)gUnknown_0820A8DC;
@@ -2503,9 +2498,9 @@ static void sub_8045458(u8 a, u8 b)
return;
r4 = gSprites[a].data6;
- if (battle_side_get_owner(r4) != 0)
+ if (GetBankSide(r4) != 0)
{
- u16 species = GetMonData(&gEnemyParty[gUnknown_02024A6A[r4]], MON_DATA_SPECIES);
+ u16 species = GetMonData(&gEnemyParty[gBattlePartyID[r4]], MON_DATA_SPECIES);
if (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(species), 1) != 0)
{
r4 = gSprites[a].data5;
@@ -2530,9 +2525,9 @@ static void draw_status_ailment_maybe(u8 a)
r7 = gSprites[a].data6;
r10 = gSprites[a].data5;
- if (battle_side_get_owner(r7) == 0)
+ if (GetBankSide(r7) == 0)
{
- r4 = GetMonData(&gPlayerParty[gUnknown_02024A6A[r7]], MON_DATA_STATUS);
+ r4 = GetMonData(&gPlayerParty[gBattlePartyID[r7]], MON_DATA_STATUS);
if (!IsDoubleBattle())
r8 = 0x1A;
else
@@ -2540,7 +2535,7 @@ static void draw_status_ailment_maybe(u8 a)
}
else
{
- r4 = GetMonData(&gEnemyParty[gUnknown_02024A6A[r7]], MON_DATA_STATUS);
+ r4 = GetMonData(&gEnemyParty[gBattlePartyID[r7]], MON_DATA_STATUS);
r8 = 0x11;
}
if (r4 & 7)
@@ -2588,7 +2583,7 @@ static void draw_status_ailment_maybe(u8 a)
FillPalette(r0[gBattleInterfaceStatusIcons_DynPal], r4_2 + 0x100, 2);
CpuCopy16(gPlttBufferUnfaded + 0x100 + r4_2, (void *)(OBJ_PLTT + r4_2 * 2), 2);
CpuCopy32(r6, (void *)(OBJ_VRAM0 + (gSprites[a].oam.tileNum + r8) * 32), 96);
- if (IsDoubleBattle() == TRUE || battle_side_get_owner(r7) == TRUE)
+ if (IsDoubleBattle() == TRUE || GetBankSide(r7) == TRUE)
{
if (!ewram17800[r7].unk0_4)
{
@@ -2667,7 +2662,7 @@ static void sub_80458B0(u8 a)
s32 r7;
u8 *addr;
- r6 = (u8 *)0x02000520 + battle_get_per_side_status(gSprites[a].data6) * 0x180;
+ r6 = (u8 *)0x02000520 + GetBankIdentity(gSprites[a].data6) * 0x180;
r8 = 7;
sub_80034D4(r6, BattleText_SafariBalls);
for (i = 0; i < r8; i++)
@@ -2692,13 +2687,13 @@ static void sub_8045998(u8 a)
s32 r6;
s32 i;
- r7 = StringCopy(gUnknown_020238CC, BattleText_SafariBallsLeft);
+ r7 = StringCopy(gDisplayedStringBattle, BattleText_SafariBallsLeft);
r7 = sub_8003504(r7, gNumSafariBalls, 10, 1);
StringAppend(r7, BattleText_HighlightRed);
- status = battle_get_per_side_status(gSprites[a].data6);
+ status = GetBankIdentity(gSprites[a].data6);
r7 = (u8 *)0x02000520 + status * 0x180;
r6 = 5;
- sub_80034D4(r7, gUnknown_020238CC);
+ sub_80034D4(r7, gDisplayedStringBattle);
r7 = (u8 *)0x02000520 + status * 0x180 + 32;
for (i = 6; i < 6 + r6; i++)
{
@@ -2714,7 +2709,7 @@ void sub_8045A5C(u8 a, struct Pokemon *pkmn, u8 c)
u32 currhp;
r10 = gSprites[a].data6;
- if (battle_side_get_owner(r10) == 0)
+ if (GetBankSide(r10) == 0)
{
if (c == 3 || c == 0)
sub_8043FC0(a, GetMonData(pkmn, MON_DATA_LEVEL));
@@ -2833,7 +2828,7 @@ static void sub_8045D58(u8 a, u8 b)
break;
case 1:
sub_804602C(ewram17850[a].unk4, ewram17850[a].unk8, ewram17850[a].unkC, &ewram17850[a].unk10, sp8, 8);
- r0 = GetMonData(&gPlayerParty[gUnknown_02024A6A[a]], MON_DATA_LEVEL);
+ r0 = GetMonData(&gPlayerParty[gBattlePartyID[a]], MON_DATA_LEVEL);
if (r0 == 100)
{
for (i = 0; i < 8; i++)
diff --git a/src/battle_party_menu.c b/src/battle_party_menu.c
index 7b4eb0258..cf572642e 100644
--- a/src/battle_party_menu.c
+++ b/src/battle_party_menu.c
@@ -1,10 +1,16 @@
#include "global.h"
#include "battle_party_menu.h"
-#include "asm.h"
+#include "battle.h"
+#include "item_menu.h"
#include "main.h"
#include "menu.h"
+#include "menu_helpers.h"
#include "palette.h"
+#include "party_menu.h"
#include "pokemon.h"
+#include "pokemon_summary_screen.h"
+#include "rom_8077ABC.h"
+#include "rom_8094928.h"
#include "songs.h"
#include "sound.h"
#include "string_util.h"
@@ -12,28 +18,7 @@
#include "task.h"
#include "text.h"
-#define DATA_COUNT (6)
-
extern u8 ewram[];
-
-struct Unk201B000
-{
- //u8 filler0[0x260];
- struct Pokemon unk0[6];
- u8 filler258[1];
- u8 unk259;
- u8 filler25A[6];
- u8 unk260;
- u8 unk261;
- u8 filler262[2];
- s16 unk264[DATA_COUNT * 2]; // This may be a union
- u8 filler27C[2];
- s16 unk27E;
- s16 unk280;
- s16 unk282;
-};
-
-#define ewram1B000 (*(struct Unk201B000 *)(ewram + 0x1B000))
#define UNK_201606C_ARRAY (ewram + 0x1606C) // lazy define but whatever.
extern u8 IsLinkDoubleBattle(void);
@@ -61,7 +46,6 @@ extern void sub_806C994();
extern void sub_806BF74();
extern void sub_806AEDC(void);
extern TaskFunc PartyMenuGetPopupMenuFunc(u8, const struct PartyPopupMenu *, const struct PartyMenuItem *, u8);
-extern void ShowPokemonSummaryScreen(struct Pokemon *, u8, u8, void (*)(u8), int);
extern void sub_806E7D0(u8, const struct PartyPopupMenu *);
extern u8 *sub_8040D08();
extern void sub_8040B8C(void);
@@ -73,9 +57,9 @@ extern u8 sub_803FBBC(void);
extern u16 gScriptItemId;
extern u8 gPlayerPartyCount;
-extern u8 gUnknown_02024A68;
-extern u16 gUnknown_02024A6A[];
-extern u8 gUnknown_02024E6C;
+extern u8 gNoOfAllBanks;
+extern u16 gBattlePartyID[];
+extern u8 gBankInMenu;
extern u8 gUnknown_0202E8F4;
extern u8 gUnknown_0202E8F5;
extern u8 gUnknown_0202E8F6;
@@ -84,11 +68,13 @@ extern u8 gUnknown_02038473;
extern u8 gUnknown_020384F0;
extern void (*gUnknown_03004AE4)(); //don't know types yet
extern struct PokemonStorage gPokemonStorage;
+extern void nullsub_14();
void sub_8094C98(u8, u8);
+u8 pokemon_order_func(u8);
+
static void sub_8094998(u8[3], u8);
static void sub_8094A74(u8[3], u8, u32);
-u8 pokemon_order_func(u8);
static void sub_8094D60(void);
static void Task_809527C(u8);
static void Task_80952B4(u8);
@@ -162,7 +148,7 @@ static void sub_8094998(u8 arg[3], u8 player_number)
if (!IsDoubleBattle())
{
pos = 1;
- *temp = gUnknown_02024A6A[battle_get_side_with_given_state(0)];
+ *temp = gBattlePartyID[GetBankByPlayerAI(0)];
for (i = 0; i <= 5; i++)
if (i != *temp)
temp[pos++] = i;
@@ -170,8 +156,8 @@ static void sub_8094998(u8 arg[3], u8 player_number)
else
{
pos = 2;
- *temp = gUnknown_02024A6A[battle_get_side_with_given_state(0)];
- temp[1] = gUnknown_02024A6A[battle_get_side_with_given_state(2)];
+ *temp = gBattlePartyID[GetBankByPlayerAI(0)];
+ temp[1] = gBattlePartyID[GetBankByPlayerAI(2)];
for (i = 0; i <= 5; i++)
if ((i != *temp) && (i != temp[1]))
temp[pos++] = i;
@@ -185,15 +171,15 @@ static void sub_8094A74(u8 arg[3], u8 player_number, u32 arg3)
{
int i, j;
u8 temp[6];
- if (!battle_side_get_owner(arg3))
+ if (!GetBankSide(arg3))
{
- i = battle_get_side_with_given_state(0);
- j = battle_get_side_with_given_state(2);
+ i = GetBankByPlayerAI(0);
+ j = GetBankByPlayerAI(2);
}
else
{
- i = battle_get_side_with_given_state(1);
- j = battle_get_side_with_given_state(3);
+ i = GetBankByPlayerAI(1);
+ j = GetBankByPlayerAI(3);
}
if (IsLinkDoubleBattle() == TRUE)
{
@@ -215,7 +201,7 @@ static void sub_8094A74(u8 arg[3], u8 player_number, u32 arg3)
if (!IsDoubleBattle())
{
int pos = 1;
- *temp = gUnknown_02024A6A[i];
+ *temp = gBattlePartyID[i];
for (i = 0; i <= 5; i++)
if (i != *temp)
temp[pos++] = i;
@@ -223,8 +209,8 @@ static void sub_8094A74(u8 arg[3], u8 player_number, u32 arg3)
else
{
int pos = 2;
- *temp = gUnknown_02024A6A[i];
- temp[1] = gUnknown_02024A6A[j];
+ *temp = gBattlePartyID[i];
+ temp[1] = gBattlePartyID[j];
for (i = 0; i <= 5; i++)
if ((i != *temp) && (i != temp[1]))
temp[pos++] = i;
@@ -589,7 +575,7 @@ static void Task_8095330(u8 taskId)
}
}
-static void Task_809535C(u8 taskId)
+static void Task_809535C(void)
{
gPaletteFade.bufferTransferDisabled = TRUE;
sub_806AF4C(1, 0xFF, SetUpBattlePokemonMenu, 5);
@@ -701,10 +687,10 @@ static void Task_BattlePartyMenuShift(u8 taskId)
gTasks[taskId].func = Task_80954C0;
return;
}
- for (i = 0; i < gUnknown_02024A68; i++)
+ for (i = 0; i < gNoOfAllBanks; i++)
{
- if (battle_side_get_owner(i) == 0
- && sub_8094C20(partySelection) == gUnknown_02024A6A[i])
+ if (GetBankSide(i) == 0
+ && sub_8094C20(partySelection) == gBattlePartyID[i])
{
sub_806D5A4();
GetMonNickname(&gPlayerParty[partySelection], gStringVar1);
@@ -742,10 +728,10 @@ static void Task_BattlePartyMenuShift(u8 taskId)
if (gUnknown_02038473 == 2)
{
u8 r0;
- u8 r4 = gUnknown_02024E6C;
+ u8 r4 = gBankInMenu;
sub_806D5A4();
- r0 = pokemon_order_func(gUnknown_02024A6A[r4]);
+ r0 = pokemon_order_func(gBattlePartyID[r4]);
GetMonNickname(&gPlayerParty[r0], gStringVar1);
StringExpandPlaceholders(gStringVar4, gOtherText_CantBeSwitched);
sub_806E834(gStringVar4, 0);
@@ -754,7 +740,7 @@ static void Task_BattlePartyMenuShift(u8 taskId)
}
gUnknown_0202E8F5 = sub_8094C20(partySelection);
gUnknown_0202E8F4 = 1;
- r4 = pokemon_order_func(gUnknown_02024A6A[gUnknown_02024E6C]);
+ r4 = pokemon_order_func(gBattlePartyID[gBankInMenu]);
sub_8094C98(r4, partySelection);
sub_806E6F0(&gPlayerParty[r4], &gPlayerParty[partySelection]);
gTasks[taskId].func = Task_809527C;
diff --git a/src/battle_records.c b/src/battle_records.c
index 35fd3284b..cf86787f0 100644
--- a/src/battle_records.c
+++ b/src/battle_records.c
@@ -1,11 +1,8 @@
#include "global.h"
+#include "battle_records.h"
#include "menu.h"
#include "strings2.h"
-void PrintLinkBattleWinsLossesDraws(void *);
-
-void PrintLinkBattleRecord(void *, u8);
-
void ShowLinkBattleRecords(void) {
s32 i;
MenuDrawTextWindow(1, 0, 28, 18);
diff --git a/src/battle_setup.c b/src/battle_setup.c
index cb99bf5f5..adcbe8eaa 100644
--- a/src/battle_setup.c
+++ b/src/battle_setup.c
@@ -1,14 +1,17 @@
#include "global.h"
#include "battle_setup.h"
-#include "asm.h"
#include "battle.h"
+#include "battle_transition.h"
#include "data2.h"
#include "event_data.h"
#include "field_control_avatar.h"
+#include "field_fadetransition.h"
#include "field_map_obj_helpers.h"
#include "field_message_box.h"
#include "field_player_avatar.h"
#include "field_weather.h"
+#include "fieldmap.h"
+#include "fldeff_80C5CD4.h"
#include "main.h"
#include "map_constants.h"
#include "metatile_behavior.h"
@@ -19,6 +22,7 @@
#include "safari_zone.h"
#include "script.h"
#include "script_pokemon_80C4.h"
+#include "secret_base.h"
#include "songs.h"
#include "sound.h"
#include "species.h"
@@ -33,9 +37,6 @@ extern u16 gScriptResult;
extern void (*gFieldCallback)(void);
-extern struct Pokemon gEnemyParty[];
-extern struct Pokemon gPlayerParty[];
-
EWRAM_DATA u16 gTrainerBattleMode = 0;
EWRAM_DATA u16 gTrainerBattleOpponent = 0;
EWRAM_DATA u16 gTrainerMapObjectLocalId = 0;
@@ -48,7 +49,7 @@ EWRAM_DATA u8 *gTrainerBattleEndScript = NULL;
extern u16 gBattleTypeFlags;
extern u16 gScriptLastTalked;
-extern u8 gUnknown_02024D26;
+extern u8 gBattleOutcome;
extern struct MapObject gMapObjects[];
@@ -573,7 +574,7 @@ void HandleWildBattleEnd(void)
CpuFill16(0, (void *)BG_PLTT, BG_PLTT_SIZE);
ResetOamRange(0, 128);
- if (battle_exit_is_player_defeat(gUnknown_02024D26) == TRUE)
+ if (battle_exit_is_player_defeat(gBattleOutcome) == TRUE)
{
SetMainCallback2(CB2_WhiteOut);
}
@@ -589,7 +590,7 @@ void HandleScriptedWildBattleEnd(void)
CpuFill16(0, (void *)BG_PLTT, BG_PLTT_SIZE);
ResetOamRange(0, 128);
- if (battle_exit_is_player_defeat(gUnknown_02024D26) == TRUE)
+ if (battle_exit_is_player_defeat(gBattleOutcome) == TRUE)
SetMainCallback2(CB2_WhiteOut);
else
SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
@@ -1050,7 +1051,7 @@ void sub_808260C(void)
{
SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music); // link battle?
}
- else if (battle_exit_is_player_defeat(gUnknown_02024D26) == TRUE)
+ else if (battle_exit_is_player_defeat(gBattleOutcome) == TRUE)
{
SetMainCallback2(CB2_WhiteOut);
}
@@ -1067,7 +1068,7 @@ void do_choose_name_or_words_screen(void)
{
SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music); // link battle?
}
- else if (battle_exit_is_player_defeat(gUnknown_02024D26) == TRUE)
+ else if (battle_exit_is_player_defeat(gBattleOutcome) == TRUE)
{
SetMainCallback2(CB2_WhiteOut);
}
diff --git a/src/berry.c b/src/berry.c
index 257248e5c..d6fbb955e 100644
--- a/src/berry.c
+++ b/src/berry.c
@@ -1,8 +1,10 @@
#include "global.h"
#include "berry.h"
-#include "asm.h"
#include "field_control_avatar.h"
+#include "field_map_obj.h"
+#include "fieldmap.h"
#include "item.h"
+#include "item_menu.h"
#include "items.h"
#include "main.h"
#include "rng.h"
diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c
index 394a3691b..116ca2cca 100644
--- a/src/berry_tag_screen.c
+++ b/src/berry_tag_screen.c
@@ -1,11 +1,13 @@
#include "global.h"
#include "berry_tag_screen.h"
-#include "asm.h"
#include "berry.h"
#include "decompress.h"
+#include "field_map_obj.h"
+#include "item_menu.h"
#include "items.h"
#include "main.h"
#include "menu.h"
+#include "menu_helpers.h"
#include "palette.h"
#include "rom4.h"
#include "songs.h"
@@ -36,8 +38,8 @@ extern struct BerryTagStatus gUnknown_0203932E;
extern u16 gScriptItemId;
extern u16 gUnknown_030041B4;
-extern const struct SpriteSheet gUnknown_083C1F74;
-extern const struct SpritePalette gUnknown_083C1F7C;
+extern const struct CompressedSpriteSheet gUnknown_083C1F74;
+extern const struct CompressedSpritePalette gUnknown_083C1F7C;
extern u8 *gUnknown_0841192C[];
diff --git a/src/bike.c b/src/bike.c
index d7175b5e0..f37eb2144 100644
--- a/src/bike.c
+++ b/src/bike.c
@@ -1,8 +1,8 @@
#include "global.h"
#include "bike.h"
-#include "asm.h"
#include "field_map_obj.h"
#include "field_player_avatar.h"
+#include "fieldmap.h"
#include "flags.h"
#include "global.fieldmap.h"
#include "metatile_behavior.h"
diff --git a/src/birch_pc.c b/src/birch_pc.c
index f01107b3d..5fb6427c3 100644
--- a/src/birch_pc.c
+++ b/src/birch_pc.c
@@ -1,5 +1,4 @@
#include "global.h"
-#include "asm.h"
#include "event_data.h"
#include "field_message_box.h"
#include "pokedex.h"
diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c
index 2ee4f91bb..4de945b9c 100644
--- a/src/braille_puzzles.c
+++ b/src/braille_puzzles.c
@@ -1,10 +1,11 @@
#include "global.h"
#include "braille_puzzles.h"
-#include "asm.h"
#include "event_data.h"
#include "field_camera.h"
#include "field_effect.h"
+#include "fieldmap.h"
#include "flags.h"
+#include "main.h"
#include "map_obj_lock.h"
#include "menu.h"
#include "rom6.h"
diff --git a/src/cable_club.c b/src/cable_club.c
index 45fb347f3..70b372205 100644
--- a/src/cable_club.c
+++ b/src/cable_club.c
@@ -1,5 +1,5 @@
#include "global.h"
-#include "asm.h"
+#include "cable_club.h"
#include "field_message_box.h"
#include "link.h"
#include "main.h"
@@ -13,6 +13,7 @@
extern u16 gScriptResult;
extern struct TrainerCard gTrainerCards[4];
+extern struct LinkPlayer gLinkPlayers[];
extern u8 gUnknown_03004860;
extern u8 gFieldLinkPlayerCount;
@@ -20,20 +21,9 @@ extern u8 gFieldLinkPlayerCount;
extern u8 gUnknown_081A4932[];
extern const u8 gUnknown_081A4975[];
-void sub_8082D4C();
-void sub_8082D60(u8, u8);
-u16 sub_8082D9C(u8, u8);
-u32 sub_8082DF4(u8);
-u32 sub_8082E28(u8);
-u32 sub_8082EB8(u8);
-void sub_8082FEC(u8 taskId);
static void sub_80830E4(u8 taskId);
-void sub_8083188(u8 taskId);
static void sub_8083288(u8 taskId);
static void sub_8083314(u8 taskId);
-void sub_80833C4(u8 taskId);
-void sub_8083418(u8 taskId);
-u8 sub_8083444(u8 taskId);
void sub_808303C(u8 taskId) {
s32 linkPlayerCount;
@@ -57,6 +47,7 @@ void sub_808303C(u8 taskId) {
return;
}
+#if ENGLISH
if (linkPlayerCount < taskData[1])
{
return;
@@ -67,6 +58,17 @@ void sub_808303C(u8 taskId) {
ConvertIntToDecimalStringN(gStringVar1, linkPlayerCount, STR_CONV_MODE_LEFT_ALIGN, 1); // r5
ShowFieldAutoScrollMessage((u8 *) gUnknown_081A4975);
gTasks[taskId].func = sub_80830E4;
+#elif GERMAN
+ if ((gLinkType == 0x2255 && (u32) linkPlayerCount > 1) ||
+ (gLinkType != 0x2255 && taskData[1] <= linkPlayerCount))
+ {
+ sub_80081C8(linkPlayerCount);
+ sub_8082D4C();
+ ConvertIntToDecimalStringN(gStringVar1, linkPlayerCount, STR_CONV_MODE_LEFT_ALIGN, 1); // r5
+ ShowFieldAutoScrollMessage((u8 *) gUnknown_081A4975);
+ gTasks[taskId].func = sub_80830E4;
+ }
+#endif
}
#ifdef NONMATCHING
@@ -291,9 +293,21 @@ static void sub_8083314(u8 taskId) {
if (gScriptResult == 1)
{
+#if ENGLISH
u16 linkType;
linkType = gLinkType;
+ // FIXME: sub_8082D4C doesn't take any arguments
sub_8082D4C(0x00004411, linkType);
+#elif GERMAN
+ if (gLinkType != 0x4411)
+ {
+ if (gLinkType == 0x6601)
+ {
+ deUnkValue2 = 1;
+ }
+ }
+ sub_8082D4C();
+#endif
EnableBothScriptContexts();
DestroyTask(taskId);
return;
diff --git a/src/calculate_base_damage.c b/src/calculate_base_damage.c
index 1b4cd92c0..0f2605e5b 100644
--- a/src/calculate_base_damage.c
+++ b/src/calculate_base_damage.c
@@ -16,17 +16,15 @@
#include "text.h"
extern u8 gPlayerPartyCount;
-extern struct Pokemon gPlayerParty[6];
extern u8 gEnemyPartyCount;
-extern struct Pokemon gEnemyParty[6];
extern u16 unk_20160BC[];
extern struct SecretBaseRecord gSecretBaseRecord;
extern u32 dword_2017100[];
extern u16 gBattleTypeFlags;
extern struct BattlePokemon gBattleMons[4];
-extern u16 gUnknown_02024BE6;
-extern u8 byte_2024C06;
+extern u16 gCurrentMove;
+extern u8 gLastUsedAbility;
extern u8 gCritMultiplier;
extern u16 gBattleWeather;
extern struct BattleEnigmaBerry gEnigmaBerries[];
@@ -36,21 +34,14 @@ extern u16 gTrainerBattleOpponent;
extern struct PokemonStorage gPokemonStorage;
extern u8 gBadEggNickname[];
-extern u32 gBitTable[];
-extern struct BaseStats gBaseStats[];
extern struct SpriteTemplate gSpriteTemplate_8208288[];
extern u8 gTrainerClassToPicIndex[];
extern u8 gTrainerClassToNameIndex[];
-// extern u8 gSecretBaseTrainerClasses[];
extern u8 gUnknown_08208238[];
extern u8 gUnknown_0820823C[];
extern u8 gStatStageRatios[];
extern u8 gHoldEffectToType[][2];
-extern u8 battle_side_get_owner(u8);
-extern u8 sub_8018324(u8, u8, u8, u8, u16);
-extern u8 sub_803C348(u8);
-
#define APPLY_STAT_MOD(var, mon, stat, statIndex) \
{ \
(var) = (stat) * (gStatStageRatios)[(mon)->statStages[(statIndex)] * 2]; \
@@ -116,7 +107,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if ((gBattleTypeFlags & BATTLE_TYPE_TRAINER)
&& gTrainerBattleOpponent != 1024
&& FlagGet(BADGE01_GET)
- && !battle_side_get_owner(a7))
+ && !GetBankSide(a7))
attack = (110 * attack) / 100;
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_EREADER_TRAINER)))
@@ -124,7 +115,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if ((gBattleTypeFlags & BATTLE_TYPE_TRAINER)
&& gTrainerBattleOpponent != 1024
&& FlagGet(BADGE05_GET)
- && !battle_side_get_owner(a8))
+ && !GetBankSide(a8))
defense = (110 * defense) / 100;
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_EREADER_TRAINER)))
@@ -132,7 +123,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if ((gBattleTypeFlags & BATTLE_TYPE_TRAINER)
&& gTrainerBattleOpponent != 1024
&& FlagGet(BADGE07_GET)
- && !battle_side_get_owner(a7))
+ && !GetBankSide(a7))
spAttack = (110 * spAttack) / 100;
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_EREADER_TRAINER)))
@@ -140,7 +131,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if ((gBattleTypeFlags & BATTLE_TYPE_TRAINER)
&& gTrainerBattleOpponent != 1024
&& FlagGet(BADGE07_GET)
- && !battle_side_get_owner(a8))
+ && !GetBankSide(a8))
spDefense = (110 * spDefense) / 100;
}
}
@@ -180,17 +171,17 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
spAttack /= 2;
if (attacker->ability == ABILITY_HUSTLE)
attack = (150 * attack) / 100;
- if (attacker->ability == ABILITY_PLUS && sub_8018324(0xE, 0, ABILITY_MINUS, 0, 0))
+ if (attacker->ability == ABILITY_PLUS && AbilityBattleEffects(0xE, 0, ABILITY_MINUS, 0, 0))
spAttack = (150 * spAttack) / 100;
- if (attacker->ability == ABILITY_MINUS && sub_8018324(0xE, 0, ABILITY_PLUS, 0, 0))
+ if (attacker->ability == ABILITY_MINUS && AbilityBattleEffects(0xE, 0, ABILITY_PLUS, 0, 0))
spAttack = (150 * spAttack) / 100;
if (attacker->ability == ABILITY_GUTS && attacker->status1)
attack = (150 * attack) / 100;
if (defender->ability == ABILITY_MARVEL_SCALE && defender->status1)
defense = (150 * defense) / 100;
- if (type == TYPE_ELECTRIC && sub_8018324(0xE, 0, 0, 0xFD, 0))
+ if (type == TYPE_ELECTRIC && AbilityBattleEffects(0xE, 0, 0, 0xFD, 0))
gBattleMovePower /= 2;
- if (type == TYPE_FIRE && sub_8018324(0xE, 0, 0, 0xFE, 0))
+ if (type == TYPE_FIRE && AbilityBattleEffects(0xE, 0, 0, 0xFE, 0))
gBattleMovePower /= 2;
if (type == TYPE_GRASS && attacker->ability == ABILITY_OVERGROW && attacker->hp <= (attacker->maxHP / 3))
gBattleMovePower = (150 * gBattleMovePower) / 100;
@@ -200,7 +191,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
gBattleMovePower = (150 * gBattleMovePower) / 100;
if (type == TYPE_BUG && attacker->ability == ABILITY_SWARM && attacker->hp <= (attacker->maxHP / 3))
gBattleMovePower = (150 * gBattleMovePower) / 100;
- if (gBattleMoves[gUnknown_02024BE6].effect == 7)
+ if (gBattleMoves[gCurrentMove].effect == 7)
defense /= 2;
if (type < TYPE_MYSTERY) // is physical?
@@ -234,13 +225,13 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if ((a4 & 1) && gCritMultiplier == 1)
{
- if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && sub_803C348(2) == 2)
+ if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMons(2) == 2)
damage = 2 * (damage / 3);
else
damage /= 2;
}
- if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && sub_803C348(2) == 2)
+ if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && CountAliveMons(2) == 2)
damage /= 2;
// moves always do at least 1 damage.
@@ -279,17 +270,17 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if ((a4 & 2) && gCritMultiplier == 1)
{
- if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && sub_803C348(2) == 2)
+ if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMons(2) == 2)
damage = 2 * (damage / 3);
else
damage /= 2;
}
- if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && sub_803C348(2) == 2)
+ if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && CountAliveMons(2) == 2)
damage /= 2;
// are effects of weather negated with cloud nine or air lock?
- if (!sub_8018324(0xE, 0, ABILITY_CLOUD_NINE, 0, 0) && !sub_8018324(0xE, 0, ABILITY_AIR_LOCK, 0, 0))
+ if (!AbilityBattleEffects(0xE, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(0xE, 0, ABILITY_AIR_LOCK, 0, 0))
{
// rain?
if (gBattleWeather & 1)
@@ -301,7 +292,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
}
// does lack of sun half solar beam damage?
- if ((gBattleWeather & 0x9F) && gUnknown_02024BE6 == 76)
+ if ((gBattleWeather & 0x9F) && gCurrentMove == 76)
damage /= 2;
// sunny?
@@ -498,7 +489,7 @@ _0803BB5E:\n\
cmp r0, 0\n\
beq _0803BB98\n\
ldr r0, [sp, 0x10]\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
cmp r0, 0\n\
bne _0803BB98\n\
@@ -531,7 +522,7 @@ _0803BB98:\n\
cmp r0, 0\n\
beq _0803BBE2\n\
adds r0, r4, 0\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
cmp r0, 0\n\
bne _0803BBE2\n\
@@ -566,7 +557,7 @@ _0803BBE2:\n\
cmp r0, 0\n\
beq _0803BC2E\n\
ldr r0, [sp, 0x10]\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
cmp r0, 0\n\
bne _0803BC2E\n\
@@ -602,7 +593,7 @@ _0803BC2E:\n\
cmp r0, 0\n\
beq _0803BC78\n\
adds r0, r4, 0\n\
- bl battle_side_get_owner\n\
+ bl GetBankSide\n\
lsls r0, 24\n\
cmp r0, 0\n\
bne _0803BC78\n\
@@ -820,7 +811,7 @@ _0803BDFC:\n\
movs r1, 0\n\
movs r2, 0x3A\n\
movs r3, 0\n\
- bl sub_8018324\n\
+ bl AbilityBattleEffects\n\
lsls r0, 24\n\
cmp r0, 0\n\
beq _0803BE2A\n\
@@ -844,7 +835,7 @@ _0803BE2A:\n\
movs r1, 0\n\
movs r2, 0x39\n\
movs r3, 0\n\
- bl sub_8018324\n\
+ bl AbilityBattleEffects\n\
lsls r0, 24\n\
cmp r0, 0\n\
beq _0803BE5C\n\
@@ -898,7 +889,7 @@ _0803BE9A:\n\
movs r1, 0\n\
movs r2, 0\n\
movs r3, 0xFD\n\
- bl sub_8018324\n\
+ bl AbilityBattleEffects\n\
lsls r0, 24\n\
cmp r0, 0\n\
beq _0803BEBE\n\
@@ -916,7 +907,7 @@ _0803BEBE:\n\
movs r1, 0\n\
movs r2, 0\n\
movs r3, 0xFE\n\
- bl sub_8018324\n\
+ bl AbilityBattleEffects\n\
lsls r0, 24\n\
cmp r0, 0\n\
beq _0803BEE2\n\
@@ -1018,7 +1009,7 @@ _0803BF72:\n\
strh r0, [r4]\n\
_0803BFA2:\n\
ldr r2, _0803BFEC @ =gBattleMoves\n\
- ldr r0, _0803BFF0 @ =gUnknown_02024BE6\n\
+ ldr r0, _0803BFF0 @ =gCurrentMove\n\
ldrh r1, [r0]\n\
lsls r0, r1, 1\n\
adds r0, r1\n\
@@ -1053,7 +1044,7 @@ _0803BFE0: .4byte 0xfffffe69\n\
_0803BFE4: .4byte 0x00000175\n\
_0803BFE8: .4byte gBattleMovePower\n\
_0803BFEC: .4byte gBattleMoves\n\
-_0803BFF0: .4byte gUnknown_02024BE6\n\
+_0803BFF0: .4byte gCurrentMove\n\
_0803BFF4: .4byte gCritMultiplier\n\
_0803BFF8: .4byte gStatStageRatios\n\
_0803BFFC:\n\
@@ -1159,7 +1150,7 @@ _0803C0A8:\n\
cmp r1, 0\n\
beq _0803C0E4\n\
movs r0, 0x2\n\
- bl sub_803C348\n\
+ bl CountAliveMons\n\
lsls r0, 24\n\
lsrs r0, 24\n\
cmp r0, 0x2\n\
@@ -1193,7 +1184,7 @@ _0803C0EA:\n\
cmp r0, 0x8\n\
bne _0803C11C\n\
movs r0, 0x2\n\
- bl sub_803C348\n\
+ bl CountAliveMons\n\
lsls r0, 24\n\
lsrs r0, 24\n\
cmp r0, 0x2\n\
@@ -1319,7 +1310,7 @@ _0803C1D6:\n\
cmp r1, 0\n\
beq _0803C224\n\
movs r0, 0x2\n\
- bl sub_803C348\n\
+ bl CountAliveMons\n\
lsls r0, 24\n\
lsrs r0, 24\n\
cmp r0, 0x2\n\
@@ -1353,7 +1344,7 @@ _0803C22A:\n\
cmp r0, 0x8\n\
bne _0803C25C\n\
movs r0, 0x2\n\
- bl sub_803C348\n\
+ bl CountAliveMons\n\
lsls r0, 24\n\
lsrs r0, 24\n\
cmp r0, 0x2\n\
@@ -1368,7 +1359,7 @@ _0803C25C:\n\
movs r1, 0\n\
movs r2, 0xD\n\
movs r3, 0\n\
- bl sub_8018324\n\
+ bl AbilityBattleEffects\n\
lsls r0, 24\n\
lsrs r0, 24\n\
cmp r0, 0\n\
@@ -1378,7 +1369,7 @@ _0803C25C:\n\
movs r1, 0\n\
movs r2, 0x4D\n\
movs r3, 0\n\
- bl sub_8018324\n\
+ bl AbilityBattleEffects\n\
lsls r0, 24\n\
cmp r0, 0\n\
bne _0803C30C\n\
@@ -1416,7 +1407,7 @@ _0803C2C4:\n\
ands r0, r1\n\
cmp r0, 0\n\
beq _0803C2DC\n\
- ldr r0, _0803C2F4 @ =gUnknown_02024BE6\n\
+ ldr r0, _0803C2F4 @ =gCurrentMove\n\
ldrh r0, [r0]\n\
cmp r0, 0x4C\n\
bne _0803C2DC\n\
@@ -1436,7 +1427,7 @@ _0803C2DC:\n\
beq _0803C306\n\
b _0803C30C\n\
.align 2, 0\n\
-_0803C2F4: .4byte gUnknown_02024BE6\n\
+_0803C2F4: .4byte gCurrentMove\n\
_0803C2F8:\n\
lsls r0, r5, 4\n\
subs r0, r5\n\
diff --git a/src/choose_party.c b/src/choose_party.c
new file mode 100644
index 000000000..63e9c8477
--- /dev/null
+++ b/src/choose_party.c
@@ -0,0 +1,1071 @@
+#include "global.h"
+#include "decoration.h"
+#include "field_fadetransition.h"
+#include "main.h"
+#include "menu.h"
+#include "name_string_util.h"
+#include "palette.h"
+#include "party_menu.h"
+#include "pokemon.h"
+#include "pokemon_summary_screen.h"
+#include "rom4.h"
+#include "script.h"
+#include "songs.h"
+#include "sound.h"
+#include "strings.h"
+#include "string_util.h"
+#include "task.h"
+#include "text.h"
+
+struct UnknownPokemonStruct2
+{
+ /*0x00*/ u16 species;
+ /*0x02*/ u16 heldItem;
+ /*0x04*/ u8 nickname[11];
+ /*0x0F*/ u8 level;
+ /*0x10*/ u16 hp;
+ /*0x12*/ u16 maxhp;
+ /*0x14*/ u32 status;
+ /*0x18*/ u32 personality;
+ /*0x1C*/ u8 gender;
+ /*0x1D*/ u8 language;
+};
+
+extern u8 gSelectedOrderFromParty[];
+extern u8 gPlayerPartyCount;
+extern u8 gLastFieldPokeMenuOpened;
+extern u8 gUnknown_020384F0;
+extern struct UnknownPokemonStruct2 gUnknown_02023A00[];
+extern u8 gUnknown_0202E8F6;
+extern struct Pokemon gUnknown_030042FC[];
+extern const u16 gBattleTowerBanlist[];
+
+extern void OpenPartyMenu();
+extern void TryCreatePartyMenuMonIcon(u8, u8, struct Pokemon *);
+extern void LoadHeldItemIconGraphics(void);
+extern void CreateHeldItemIcons_806DC34();
+extern u8 sub_806BD58(u8, u8);
+extern void PartyMenuPrintMonsLevelOrStatus(void);
+extern void PrintPartyMenuMonNicknames(void);
+extern void sub_806BC3C(u8, u8);
+extern u8 sub_806B58C(u8);
+extern void sub_806D538();
+extern u16 sub_806BE38();
+extern u8 sub_806CA38();
+extern void sub_808B5B4();
+extern TaskFunc PartyMenuGetPopupMenuFunc(u8, const struct PartyPopupMenu *, const struct PartyMenuItem *, u8);
+extern u8 sub_806B124();
+extern void sub_806C994();
+extern void sub_806C658();
+extern void sub_806AEDC(void);
+extern void sub_806AF4C();
+extern void ShowPokemonSummaryScreen(struct Pokemon *, u8, u8, void (*)(void), int);
+extern void sub_806C890();
+extern void sub_806D5A4();
+extern void sub_806B908(void);
+extern void CreateMonIcon_806D99C(int, u8, int, struct UnknownPokemonStruct2 *);
+extern void sub_806D50C(int, u8);
+extern void CreatePartyMenuMonIcon();
+extern void CreateHeldItemIcon_806DCD4(int, u8, int);
+extern u8 GetMonStatusAndPokerus();
+extern void PartyMenuPrintHP();
+extern void PartyMenuPutStatusTilemap(u8, int, u8);
+extern void PartyMenuPrintLevel();
+extern void PartyMenuPutNicknameTilemap();
+extern void PrintPartyMenuMonNickname();
+extern void PartyMenuDrawHPBar();
+extern bool8 sub_80F9344(void);
+extern void sub_806D4AC();
+extern void sub_806D3B4();
+extern void PartyMenuDoPrintLevel(u8, u8, u8);
+extern void PartyMenuDoDrawHPBar(u8, u8, u16, u16);
+extern void PartyMenuDoPutNicknameTilemap(u16, u8, u8, u8, const u8 *);
+extern void box_print(u8, int, const u8 *);
+extern void sub_806BCE8(void);
+extern void sub_806E750(u8, const struct PartyPopupMenu *, const struct PartyMenuItem *, int);
+extern u16 sub_806BD80();
+extern void sub_806BF74();
+
+static void ClearPartySelection(void);
+static bool8 IsMonAllowedInBattleTower(struct Pokemon *);
+static void sub_812238C(u8);
+static void sub_8122450(u8);
+static void sub_81224A8(u8);
+static void sub_8122728(u8);
+static void BattleTowerEntryMenuCallback_Exit(u8);
+static void sub_81228E8(u8);
+static void sub_8122950(u8);
+static void sub_81229B8(void);
+static void sub_8122AB8(u8);
+static void sub_8122B10(u8);
+static void sub_8122C18(u8);
+static void Task_DaycareStorageMenu8122EAC(u8);
+void sub_8123138(u8);
+static void sub_8123170(u8);
+static void sub_81231AC(void);
+
+void sub_8121E10(void)
+{
+ ClearPartySelection();
+ ewram1B000.unk263 = 0;
+ OpenPartyMenu(4, 0);
+}
+
+void sub_8121E34(void)
+{
+ ClearPartySelection();
+ ewram1B000.unk263 = 1;
+ OpenPartyMenu(4, 0);
+}
+
+static void ClearPartySelection(void)
+{
+ u8 i;
+
+ for (i = 0; i < 3; i++)
+ gSelectedOrderFromParty[i] = 0;
+}
+
+bool8 sub_8121E78(void)
+{
+ u8 i;
+
+ switch (ewram1B000_alt.unk264)
+ {
+ case 0:
+ if (ewram1B000_alt.unk266 < gPlayerPartyCount)
+ {
+ TryCreatePartyMenuMonIcon(ewram1B000_alt.unk260, ewram1B000_alt.unk266, &gPlayerParty[ewram1B000_alt.unk266]);
+ ewram1B000_alt.unk266++;
+ }
+ else
+ {
+ ewram1B000_alt.unk266 = 0;
+ ewram1B000_alt.unk264++;
+ }
+ break;
+ case 1:
+ LoadHeldItemIconGraphics();
+ ewram1B000_alt.unk264++;
+ break;
+ case 2:
+ CreateHeldItemIcons_806DC34(ewram1B000_alt.unk260);
+ ewram1B000_alt.unk264++;
+ break;
+ case 3:
+ if (sub_806BD58(ewram1B000_alt.unk260, ewram1B000_alt.unk266) == 1)
+ {
+ ewram1B000_alt.unk266 = 0;
+ ewram1B000_alt.unk264++;
+ }
+ else
+ {
+ ewram1B000_alt.unk266++;
+ }
+ break;
+ case 4:
+ PartyMenuPrintMonsLevelOrStatus();
+ ewram1B000_alt.unk264++;
+ break;
+ case 5:
+ PrintPartyMenuMonNicknames();
+ ewram1B000_alt.unk264++;
+ break;
+ case 6:
+ for (i = 0; i < gPlayerPartyCount; i++)
+ {
+ u8 j;
+
+ for (j = 0; j < 3; j++)
+ {
+ if (gSelectedOrderFromParty[j] == i + 1)
+ {
+ sub_806BC3C(i, j * 14 + 0x1C);
+ break;
+ }
+ }
+ if (j == 3)
+ {
+ if (IsMonAllowedInBattleTower(&gPlayerParty[i]) == TRUE)
+ sub_806BC3C(i, 0x70);
+ else
+ sub_806BC3C(i, 0x7E);
+ }
+ }
+ ewram1B000_alt.unk264++;
+ break;
+ case 7:
+ if (sub_806B58C(ewram1B000_alt.unk266) == 1)
+ {
+ ewram1B000_alt.unk266 = 0;
+ ewram1B000_alt.unk264 = 0;
+ return TRUE;
+ }
+ else
+ {
+ ewram1B000_alt.unk266++;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+#ifdef NONMATCHING
+static bool8 IsMonAllowedInBattleTower(struct Pokemon *pkmn)
+{
+ u16 r3;
+ s32 i;
+
+ if (GetMonData(pkmn, MON_DATA_IS_EGG))
+ return FALSE;
+
+ if (ewram1B000.unk263 == 0)
+ {
+ if (GetMonData(pkmn, MON_DATA_HP) == 0)
+ return FALSE;
+ else
+ return TRUE;
+ }
+
+ if ((gSaveBlock2.filler_A8.var_4AC & 1) == 0
+ && GetMonData(pkmn, MON_DATA_LEVEL) > 50)
+ return FALSE;
+
+ r3 = GetMonData(pkmn, MON_DATA_SPECIES);
+ // Can't stop the compiler from optimizing out the first index
+ for (i = 0; gBattleTowerBanlist[i] != 0xFFFF; i++)
+ {
+ if (gBattleTowerBanlist[i] == r3)
+ return FALSE;
+ }
+ return TRUE;
+}
+#else
+__attribute__((naked))
+static bool8 IsMonAllowedInBattleTower(struct Pokemon *pkmn)
+{
+ asm_unified(
+ "push {r4,lr}\n\
+ adds r4, r0, 0\n\
+ movs r1, 0x2D\n\
+ bl GetMonData\n\
+ cmp r0, 0\n\
+ bne _0812207C\n\
+ ldr r0, _08122058 @ =0x0201b000\n\
+ ldr r1, _0812205C @ =0x00000263\n\
+ adds r0, r1\n\
+ ldrb r0, [r0]\n\
+ cmp r0, 0\n\
+ bne _08122060\n\
+ adds r0, r4, 0\n\
+ movs r1, 0x39\n\
+ bl GetMonData\n\
+ cmp r0, 0\n\
+ beq _0812207C\n\
+ b _081220B6\n\
+ .align 2, 0\n\
+_08122058: .4byte 0x0201b000\n\
+_0812205C: .4byte 0x00000263\n\
+_08122060:\n\
+ ldr r0, _08122080 @ =gSaveBlock2\n\
+ ldr r1, _08122084 @ =0x00000554\n\
+ adds r0, r1\n\
+ ldrb r1, [r0]\n\
+ movs r0, 0x1\n\
+ ands r0, r1\n\
+ cmp r0, 0\n\
+ bne _08122088\n\
+ adds r0, r4, 0\n\
+ movs r1, 0x38\n\
+ bl GetMonData\n\
+ cmp r0, 0x32\n\
+ bls _08122088\n\
+_0812207C:\n\
+ movs r0, 0\n\
+ b _081220B8\n\
+ .align 2, 0\n\
+_08122080: .4byte gSaveBlock2\n\
+_08122084: .4byte 0x00000554\n\
+_08122088:\n\
+ adds r0, r4, 0\n\
+ movs r1, 0xB\n\
+ bl GetMonData\n\
+ lsls r0, 16\n\
+ lsrs r3, r0, 16\n\
+ ldr r1, _081220C0 @ =gBattleTowerBanlist\n\
+ movs r0, 0\n\
+ lsls r0, 1\n\
+ adds r2, r0, r1\n\
+ ldrh r0, [r2]\n\
+ ldr r1, _081220C4 @ =0x0000ffff\n\
+ cmp r0, r1\n\
+ beq _081220B6\n\
+ adds r4, r1, 0\n\
+ adds r1, r2, 0\n\
+_081220A8:\n\
+ ldrh r0, [r1]\n\
+ cmp r0, r3\n\
+ beq _0812207C\n\
+ adds r1, 0x2\n\
+ ldrh r0, [r1]\n\
+ cmp r0, r4\n\
+ bne _081220A8\n\
+_081220B6:\n\
+ movs r0, 0x1\n\
+_081220B8:\n\
+ pop {r4}\n\
+ pop {r1}\n\
+ bx r1\n\
+ .align 2, 0\n\
+_081220C0: .4byte gBattleTowerBanlist\n\
+_081220C4: .4byte 0x0000ffff\n"
+ );
+}
+#endif
+
+static u8 sub_81220C8(void)
+{
+ u8 i;
+
+ if (ewram1B000.unk263 == 0)
+ return 0xFF;
+ if (gSelectedOrderFromParty[2] == 0)
+ return 0x11;
+ for (i = 0; i < 2; i++)
+ {
+ u8 j;
+
+ ewram1B000.unk282 = GetMonData(&gUnknown_030042FC[gSelectedOrderFromParty[i]], MON_DATA_SPECIES);
+ ewram1B000.unk280 = GetMonData(&gUnknown_030042FC[gSelectedOrderFromParty[i]], MON_DATA_HELD_ITEM);
+ for (j = i + 1; j < 3; j++)
+ {
+ if (ewram1B000.unk282 == GetMonData(&gUnknown_030042FC[gSelectedOrderFromParty[j]], MON_DATA_SPECIES))
+ return 0x12;
+ if (ewram1B000.unk280 != 0 && ewram1B000.unk280 == GetMonData(&gUnknown_030042FC[gSelectedOrderFromParty[j]], MON_DATA_HELD_ITEM))
+ return 0x13;
+ }
+ }
+ return 0xFF;
+}
+
+//------------------------------------------------------------------------------
+// Battle Tower Entry Menu
+//------------------------------------------------------------------------------
+
+static void BattleTowerEntryMenuCallback_Summary(u8);
+static void BattleTowerEntryMenuCallback_Enter(u8);
+static void BattleTowerEntryMenuCallback_NoEntry(u8);
+static void BattleTowerEntryMenuCallback_Exit(u8);
+
+static const struct PartyMenuItem sBattleTowerEntryMenuItems[] =
+{
+ {OtherText_Summary, BattleTowerEntryMenuCallback_Summary},
+ {OtherText_Enter2, BattleTowerEntryMenuCallback_Enter},
+ {OtherText_NoEntry, BattleTowerEntryMenuCallback_NoEntry},
+ {gUnknownText_Exit, BattleTowerEntryMenuCallback_Exit},
+};
+
+static const u8 gUnknown_084017D0[] = {1, 0, 3};
+static const u8 gUnknown_084017D3[] = {2, 0, 3};
+static const u8 gUnknown_084017D6[] = {0, 3};
+
+static const struct PartyPopupMenu sBattleTowerEntryMenu[] =
+{
+ {ARRAY_COUNT(gUnknown_084017D0), 9, gUnknown_084017D0},
+ {ARRAY_COUNT(gUnknown_084017D3), 9, gUnknown_084017D3},
+ {ARRAY_COUNT(gUnknown_084017D6), 9, gUnknown_084017D6},
+};
+
+
+static bool8 IsPartyMemberAlreadySelected(u8 partyMember)
+{
+ u8 i;
+
+ for (i = 0; i < 3; i++)
+ {
+ if (gSelectedOrderFromParty[i] == partyMember)
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void sub_81221F8(u8 taskId)
+{
+ sub_806D538(5, 1);
+ if (IsMonAllowedInBattleTower(&gPlayerParty[gLastFieldPokeMenuOpened]) == TRUE)
+ {
+ if (IsPartyMemberAlreadySelected(gLastFieldPokeMenuOpened + 1) == TRUE)
+ {
+ gTasks[taskId].data[4] = 1;
+ sub_806E750(1, sBattleTowerEntryMenu, sBattleTowerEntryMenuItems, 0);
+ }
+ else
+ {
+ gTasks[taskId].data[4] = 0;
+ sub_806E750(0, sBattleTowerEntryMenu, sBattleTowerEntryMenuItems, 0);
+ }
+ }
+ else
+ {
+ gTasks[taskId].data[4] = 2;
+ sub_806E750(2, sBattleTowerEntryMenu, sBattleTowerEntryMenuItems, 0);
+ }
+}
+
+void sub_81222B0(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ switch (sub_806BE38(taskId))
+ {
+ case 1:
+ PlaySE(SE_SELECT);
+ gLastFieldPokeMenuOpened = sub_806CA38(taskId);
+ if (gLastFieldPokeMenuOpened != 6)
+ {
+ GetMonNickname(&gPlayerParty[gLastFieldPokeMenuOpened], gStringVar1);
+ sub_81221F8(taskId);
+ gTasks[taskId].func = sub_812238C;
+ }
+ else
+ {
+ gTasks[taskId].func = sub_81224A8;
+ }
+ sub_808B5B4(taskId);
+ break;
+ case 2:
+ PlaySE(SE_SELECT);
+ ClearPartySelection();
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
+ gTasks[taskId].func = sub_8122450;
+ break;
+ }
+ }
+}
+
+// Handle input
+static void sub_812238C(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ if (gMain.newAndRepeatedKeys & 0x40)
+ {
+ if (GetMenuCursorPos() != 0)
+ {
+ PlaySE(SE_SELECT);
+ MoveMenuCursor(-1);
+ }
+ return;
+ }
+ if (gMain.newAndRepeatedKeys & 0x80)
+ {
+ if (GetMenuCursorPos() != 3)
+ {
+ PlaySE(SE_SELECT);
+ MoveMenuCursor(1);
+ }
+ return;
+ }
+ if (gMain.newKeys & A_BUTTON)
+ {
+ TaskFunc popupMenuFunc;
+
+ PlaySE(SE_SELECT);
+ popupMenuFunc = PartyMenuGetPopupMenuFunc(
+ gTasks[taskId].data[4],
+ sBattleTowerEntryMenu,
+ sBattleTowerEntryMenuItems,
+ GetMenuCursorPos());
+ popupMenuFunc(taskId);
+ return;
+ }
+ if (gMain.newKeys & B_BUTTON)
+ {
+ BattleTowerEntryMenuCallback_Exit(taskId);
+ return;
+ }
+ }
+}
+
+// Return from menu?
+static void sub_8122450(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ SetMainCallback2(gMain.savedCallback);
+ DestroyTask(taskId);
+ }
+}
+
+// Wait for A or B press
+static void sub_8122480(u8 taskId)
+{
+ if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
+ BattleTowerEntryMenuCallback_Exit(taskId);
+}
+
+static void sub_81224A8(u8 taskId)
+{
+ u8 val = sub_81220C8();
+
+ if (val != 0xFF)
+ {
+ sub_806D538(val, 0);
+ gTasks[taskId].func = sub_8122480;
+ }
+ else
+ {
+ if (gSelectedOrderFromParty[0] != 0)
+ {
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
+ gTasks[taskId].func = sub_8122450;
+ }
+ else
+ {
+ PlaySE(SE_HAZURE);
+ sub_806D538(14, 0);
+ gTasks[taskId].func = sub_8122480;
+ }
+ }
+}
+
+// CB2 for menu?
+static void sub_8122530(void)
+{
+ while (1)
+ {
+ if (sub_806B124() == 1)
+ {
+ sub_806C994(ewram1B000.unk260, gUnknown_020384F0);
+ sub_806C658(ewram1B000.unk260, 0);
+ GetMonNickname(&gPlayerParty[gUnknown_020384F0], gStringVar1);
+ gLastFieldPokeMenuOpened = gUnknown_020384F0;
+ sub_81221F8(ewram1B000.unk260);
+ SetMainCallback2(sub_806AEDC);
+ break;
+ }
+ if (sub_80F9344() == 1)
+ break;
+ }
+}
+
+static void sub_81225A4(void)
+{
+ gPaletteFade.bufferTransferDisabled = TRUE;
+ sub_806AF4C(4, 0xFF, sub_812238C, 5);
+ SetMainCallback2(sub_8122530);
+}
+
+// Wait for fade, then show summary screen
+static void sub_81225D4(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ u8 r4 = gSprites[gTasks[taskId].data[3] >> 8].data0;
+
+ DestroyTask(taskId);
+ ewram1B000.unk262 = 1;
+ ShowPokemonSummaryScreen(gPlayerParty, r4, gPlayerPartyCount - 1, sub_81225A4, 0);
+ }
+}
+
+// Summary callback?
+static void BattleTowerEntryMenuCallback_Summary(u8 taskId)
+{
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
+ gTasks[taskId].func = sub_81225D4;
+}
+
+static void BattleTowerEntryMenuCallback_Enter(u8 taskId)
+{
+ u8 i;
+
+ for (i = 0; i < 3; i++)
+ {
+ if (gSelectedOrderFromParty[i] == 0)
+ {
+ gSelectedOrderFromParty[i] = gLastFieldPokeMenuOpened + 1;
+ sub_806BC3C(gLastFieldPokeMenuOpened, i * 14 + 0x1C);
+ if (i == 2)
+ sub_806C890(taskId);
+ BattleTowerEntryMenuCallback_Exit(taskId);
+ return;
+ }
+ }
+ PlaySE(SE_HAZURE);
+ MenuZeroFillWindowRect(20, 10, 29, 19);
+ HandleDestroyMenuCursors();
+ sub_806D5A4();
+ sub_806E834(gOtherText_NoMoreThreePoke, 1);
+ gTasks[taskId].func = sub_8122728;
+}
+
+static void sub_8122728(u8 taskId)
+{
+ if (gUnknown_0202E8F6 == 1)
+ return;
+
+ if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
+ {
+ MenuZeroFillWindowRect(0, 14, 29, 19);
+ HandleDestroyMenuCursors();
+ BattleTowerEntryMenuCallback_Exit(taskId);
+ }
+}
+
+static void BattleTowerEntryMenuCallback_NoEntry(u8 taskId)
+{
+ u8 i;
+
+ for (i = 0; i < 3; i++)
+ {
+ if (gSelectedOrderFromParty[i] == gLastFieldPokeMenuOpened + 1)
+ {
+ gSelectedOrderFromParty[i] = 0;
+ switch (i)
+ {
+ case 0:
+ gSelectedOrderFromParty[0] = gSelectedOrderFromParty[1];
+ gSelectedOrderFromParty[1] = gSelectedOrderFromParty[2];
+ gSelectedOrderFromParty[2] = 0;
+ break;
+ case 1:
+ gSelectedOrderFromParty[1] = gSelectedOrderFromParty[2];
+ gSelectedOrderFromParty[2] = 0;
+ break;
+ }
+ break; // exit loop
+ }
+ }
+ sub_806BC3C(gLastFieldPokeMenuOpened, 0x70);
+ if (gSelectedOrderFromParty[0] != 0)
+ sub_806BC3C(gSelectedOrderFromParty[0] - 1, 0x1C);
+ if (gSelectedOrderFromParty[1] != 0)
+ sub_806BC3C(gSelectedOrderFromParty[1] - 1, 0x2A);
+ BattleTowerEntryMenuCallback_Exit(taskId);
+}
+
+static void sub_81227FC(u8 taskId)
+{
+ MenuZeroFillWindowRect(20, 10, 29, 19);
+ HandleDestroyMenuCursors();
+ sub_806D538(0, 0);
+ gTasks[taskId].func = sub_81222B0;
+}
+
+static void BattleTowerEntryMenuCallback_Exit(u8 taskId)
+{
+ PlaySE(SE_SELECT);
+ sub_81227FC(taskId);
+}
+
+bool8 sub_8122854(void)
+{
+ switch (ewram1B000_alt.unk264)
+ {
+ case 0:
+ sub_81228E8(ewram1B000_alt.unk260);
+ ewram1B000_alt.unk264++;
+ break;
+ case 1:
+ LoadHeldItemIconGraphics();
+ ewram1B000_alt.unk264++;
+ break;
+ case 2:
+ sub_8122950(ewram1B000_alt.unk260);
+ ewram1B000_alt.unk264++;
+ break;
+ case 3:
+ sub_81229B8();
+ ewram1B000_alt.unk264++;
+ break;
+ case 4:
+ sub_806B908();
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void sub_81228E8(u8 a)
+{
+ u8 i;
+
+ for (i = 0; i < 3; i++)
+ {
+ if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != 0)
+ CreatePartyMenuMonIcon(a, i, 3, &gPlayerParty[i]);
+ if (gUnknown_02023A00[i].species != 0)
+ {
+ CreateMonIcon_806D99C(a, i + 3, 3, &gUnknown_02023A00[i]);
+ sub_806D50C(a, i + 3);
+ }
+ }
+}
+
+static void sub_8122950(u8 a)
+{
+ u8 i;
+
+ for (i = 0; i < 3; i++)
+ {
+ if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != 0)
+ {
+ u16 item = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
+
+ CreateHeldItemIcon_806DCD4(a, i, item);
+ }
+ if (gUnknown_02023A00[i].species != 0)
+ CreateHeldItemIcon_806DCD4(a, i + 3, gUnknown_02023A00[i].heldItem);
+ }
+}
+
+static void sub_81229B8(void)
+{
+ u8 i;
+
+ for (i = 0; i < 3; i++)
+ {
+ if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != 0)
+ {
+ u8 status;
+
+ PartyMenuPrintHP(i, 3, &gPlayerParty[i]);
+ status = GetMonStatusAndPokerus(&gPlayerParty[i]);
+ if (status != 0 && status != 6)
+ PartyMenuPutStatusTilemap(i, 3, status - 1);
+ else
+ PartyMenuPrintLevel(i, 3, &gPlayerParty[i]);
+ PartyMenuPutNicknameTilemap(i, 3, &gPlayerParty[i]);
+ PrintPartyMenuMonNickname(i, 3, &gPlayerParty[i]);
+ PartyMenuDrawHPBar(i, 3, &gPlayerParty[i]);
+ }
+ }
+}
+
+void sub_8122A48(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ gTasks[taskId].data[0] = 30;
+ sub_806D4AC(taskId, gUnknown_02023A00[0].species, 0);
+ sub_806D4AC(taskId, gUnknown_02023A00[1].species, 1);
+ sub_806D4AC(taskId, gUnknown_02023A00[2].species, 2);
+ gTasks[taskId].func = sub_8122AB8;
+ ewram1B000.unk261 = 1;
+ }
+}
+
+static void sub_8122AB8(u8 taskId)
+{
+ sub_806D3B4(taskId, gUnknown_02023A00[1].species, gUnknown_02023A00[2].species);
+ if (gTasks[taskId].data[0] == 0)
+ {
+ gTasks[taskId].func = sub_8122B10;
+ ewram1B000.unk261 = 2;
+ PlaySE(SE_W231);
+ }
+}
+
+static void sub_8122B10(u8 taskId)
+{
+ u8 i;
+
+ for (i = 0; i < 3; i++)
+ {
+ if (gUnknown_02023A00[i].species != 0)
+ {
+ u8 r2;
+
+ PartyMenuDoPrintHP(i + 3, 3, gUnknown_02023A00[i].hp, gUnknown_02023A00[i].maxhp);
+ if (gUnknown_02023A00[i].hp == 0)
+ r2 = 7;
+ else
+ r2 = pokemon_ailments_get_primary(gUnknown_02023A00[i].status);
+ if (r2 != 0)
+ PartyMenuPutStatusTilemap(i + 3, 3, r2 - 1);
+ else
+ PartyMenuDoPrintLevel(i + 3, 3, gUnknown_02023A00[i].level);
+ PartyMenuDoPutNicknameTilemap(gUnknown_02023A00[i].species, gUnknown_02023A00[i].gender, 3, i + 3, gUnknown_02023A00[i].nickname);
+ StringCopy(gStringVar1, gUnknown_02023A00[i].nickname);
+ StringGetEnd10(gStringVar1);
+ SanitizeNameString(gStringVar1);
+ box_print(i + 3, 3, gStringVar1);
+ PartyMenuDoDrawHPBar(i + 3, 3, gUnknown_02023A00[i].hp, gUnknown_02023A00[i].maxhp);
+ }
+ }
+ gTasks[taskId].func = sub_8122C18;
+ gTasks[taskId].data[0] = 0;
+}
+
+static void sub_8122C18(u8 taskId)
+{
+ gTasks[taskId].data[0]++;
+ if (gTasks[taskId].data[0] == 256)
+ {
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
+ gTasks[taskId].func = sub_8122450;
+ }
+}
+
+// Exactly the same as sub_8121E78 except for case 6
+bool8 unref_sub_8122C60(void)
+{
+ switch (ewram1B000_alt.unk264)
+ {
+ case 0:
+ if (ewram1B000_alt.unk266 < gPlayerPartyCount)
+ {
+ TryCreatePartyMenuMonIcon(ewram1B000_alt.unk260, ewram1B000_alt.unk266, &gPlayerParty[ewram1B000_alt.unk266]);
+ ewram1B000_alt.unk266++;
+ }
+ else
+ {
+ ewram1B000_alt.unk266 = 0;
+ ewram1B000_alt.unk264++;
+ }
+ break;
+ case 1:
+ LoadHeldItemIconGraphics();
+ ewram1B000_alt.unk264++;
+ break;
+ case 2:
+ CreateHeldItemIcons_806DC34(ewram1B000_alt.unk260);
+ ewram1B000_alt.unk264++;
+ break;
+ case 3:
+ if (sub_806BD58(ewram1B000_alt.unk260, ewram1B000_alt.unk266) == 1)
+ {
+ ewram1B000_alt.unk266 = 0;
+ ewram1B000_alt.unk264++;
+ }
+ else
+ {
+ ewram1B000_alt.unk266++;
+ }
+ break;
+ case 4:
+ PartyMenuPrintMonsLevelOrStatus();
+ ewram1B000_alt.unk264++;
+ break;
+ case 5:
+ PrintPartyMenuMonNicknames();
+ ewram1B000_alt.unk264++;
+ break;
+ case 6:
+ sub_806BCE8();
+ ewram1B000_alt.unk264++;
+ break;
+ case 7:
+ if (sub_806B58C(ewram1B000_alt.unk266) == 1)
+ {
+ ewram1B000_alt.unk266 = 0;
+ ewram1B000_alt.unk264 = 0;
+ return TRUE;
+ }
+ else
+ {
+ ewram1B000_alt.unk266++;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+//------------------------------------------------------------------------------
+// Daycare Pokemon Storage Menu
+//------------------------------------------------------------------------------
+
+static void DaycareStorageMenuCallback_Store(u8);
+static void DaycareStorageMenuCallback_Summary(u8);
+static void DaycareStorageMenuCallback_Exit(u8);
+
+static const struct PartyMenuItem sDaycareStorageMenuItems[] =
+{
+ {OtherText_Store, DaycareStorageMenuCallback_Store},
+ {OtherText_Summary, DaycareStorageMenuCallback_Summary},
+ {gUnknownText_Exit, DaycareStorageMenuCallback_Exit},
+};
+
+static const u8 gUnknown_08401808[] = {0, 1, 2};
+static const u8 gUnknown_0840180B[] = {1, 2};
+
+static const struct PartyPopupMenu sDaycareStorageMenus[] =
+{
+ {ARRAY_COUNT(gUnknown_08401808), 9, gUnknown_08401808},
+ {ARRAY_COUNT(gUnknown_0840180B), 9, gUnknown_0840180B},
+};
+
+static void sub_8122D94(u8 taskId)
+{
+ if (!GetMonData(&gPlayerParty[gLastFieldPokeMenuOpened], MON_DATA_IS_EGG))
+ {
+ gTasks[taskId].data[4] = 0;
+ sub_806E750(0, sDaycareStorageMenus, sDaycareStorageMenuItems, 0);
+ }
+ else
+ {
+ gTasks[taskId].data[4] = 1;
+ sub_806E750(1, sDaycareStorageMenus, sDaycareStorageMenuItems, 0);
+ }
+}
+
+void sub_8122E0C(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ switch (sub_806BD80(taskId))
+ {
+ case 1:
+ PlaySE(SE_SELECT);
+ gLastFieldPokeMenuOpened = sub_806CA38(taskId);
+ GetMonNickname(&gPlayerParty[gLastFieldPokeMenuOpened], gStringVar1);
+ sub_8122D94(taskId);
+ gTasks[taskId].func = Task_DaycareStorageMenu8122EAC;
+ break;
+ case 2:
+ PlaySE(SE_SELECT);
+ gLastFieldPokeMenuOpened = 0xFF;
+ gSpecialVar_0x8004 = 0xFF;
+ sub_8123138(taskId);
+ break;
+ }
+ }
+}
+
+static void Task_DaycareStorageMenu8122EAC(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ if (gMain.newAndRepeatedKeys & 0x40)
+ {
+ if (GetMenuCursorPos() != 0)
+ {
+ PlaySE(SE_SELECT);
+ MoveMenuCursor(-1);
+ }
+ return;
+ }
+ if (gMain.newAndRepeatedKeys & 0x80)
+ {
+ if (GetMenuCursorPos() != 3)
+ {
+ PlaySE(SE_SELECT);
+ MoveMenuCursor(1);
+ }
+ return;
+ }
+ if (gMain.newKeys & A_BUTTON)
+ {
+ TaskFunc popupMenuFunc;
+
+ PlaySE(SE_SELECT);
+ popupMenuFunc = PartyMenuGetPopupMenuFunc(
+ gTasks[taskId].data[4],
+ sDaycareStorageMenus,
+ sDaycareStorageMenuItems,
+ GetMenuCursorPos());
+ popupMenuFunc(taskId);
+ return;
+ }
+ if (gMain.newKeys & B_BUTTON)
+ {
+ DaycareStorageMenuCallback_Exit(taskId);
+ return;
+ }
+ }
+}
+
+static void DaycareStorageMenuCallback_Store(u8 taskId)
+{
+ gSpecialVar_0x8004 = gLastFieldPokeMenuOpened;
+ sub_8123138(taskId);
+}
+
+static void sub_8122F90(void)
+{
+ while (1)
+ {
+ if (sub_806B124() == 1)
+ {
+ sub_806C994(ewram1B000.unk260, gUnknown_020384F0);
+ sub_806BF74(ewram1B000.unk260, 0);
+ GetMonNickname(&gPlayerParty[gUnknown_020384F0], gStringVar1);
+ gLastFieldPokeMenuOpened = gUnknown_020384F0;
+ sub_8122D94(ewram1B000.unk260);
+ SetMainCallback2(sub_806AEDC);
+ break;
+ }
+ if (sub_80F9344() == 1)
+ break;
+ }
+}
+
+static void sub_8123004(void)
+{
+ gPaletteFade.bufferTransferDisabled = TRUE;
+ sub_806AF4C(6, 0xFF, Task_DaycareStorageMenu8122EAC, 5);
+ SetMainCallback2(sub_8122F90);
+}
+
+static void sub_8123034(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ u8 r4 = gSprites[gTasks[taskId].data[3] >> 8].data0;
+
+ DestroyTask(taskId);
+ ewram1B000.unk262 = 1;
+ ShowPokemonSummaryScreen(gPlayerParty, r4, gPlayerPartyCount - 1, sub_8123004, 0);
+ }
+}
+
+static void DaycareStorageMenuCallback_Summary(u8 taskId)
+{
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
+ gTasks[taskId].func = sub_8123034;
+}
+
+static void DaycareStorageMenuCallback_Exit(u8 taskId)
+{
+ PlaySE(SE_SELECT);
+ MenuZeroFillWindowRect(20, 10, 29, 19);
+ HandleDestroyMenuCursors();
+ sub_806D538(15, 0);
+ gTasks[taskId].func = sub_8122E0C;
+}
+
+void sub_8123138(u8 taskId)
+{
+ BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
+ gTasks[taskId].func = sub_8123170;
+}
+
+static void sub_8123170(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ gFieldCallback = sub_81231AC;
+ SetMainCallback2(c2_exit_to_overworld_2_switch);
+ DestroyTask(taskId);
+ }
+}
+
+// Do these last two functions really belong in here?
+
+static void sub_81231C4(u8);
+
+void sub_81231AC(void)
+{
+ pal_fill_black();
+ CreateTask(sub_81231C4, 10);
+}
+
+static void sub_81231C4(u8 taskId)
+{
+ if (sub_807D770() == TRUE)
+ {
+ DestroyTask(taskId);
+ ScriptContext2_Disable();
+ EnableBothScriptContexts();
+ }
+}
diff --git a/src/clear_save_data_menu.c b/src/clear_save_data_menu.c
index 690ce3f55..498562fe0 100644
--- a/src/clear_save_data_menu.c
+++ b/src/clear_save_data_menu.c
@@ -10,8 +10,6 @@
#include "strings2.h"
#include "task.h"
-extern const struct MenuAction gMenuYesNoItems[];
-
static void VBlankCB_ClearSaveDataScreen(void);
static void Task_InitMenu(u8);
static void Task_ProcessMenuInput(u8);
diff --git a/src/clock.c b/src/clock.c
index b263e99ae..1f2aac9fd 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -1,21 +1,18 @@
#include "global.h"
#include "clock.h"
#include "berry.h"
+#include "dewford_trend.h"
#include "event_data.h"
+#include "field_specials.h"
+#include "field_weather.h"
#include "lottery_corner.h"
#include "main.h"
#include "rom4.h"
#include "rtc.h"
+#include "time_events.h"
+#include "tv.h"
#include "wallclock.h"
-extern void UpdateDewfordTrendPerDay(u16);
-extern void UpdateTVShowsPerDay(u16);
-extern void UpdateWeatherPerDay(u16);
-extern void UpdatePartyPokerusTime(u16);
-extern void UpdateMirageRnd(u16);
-extern void UpdateBirchState(u16);
-extern void SetShoalItemFlag(u16);
-
static void InitTimeBasedEvents(void);
static void UpdatePerDay(struct Time *time);
static void UpdatePerMinute(struct Time *time);
diff --git a/src/contest_link_80C857C.c b/src/contest_link_80C857C.c
new file mode 100644
index 000000000..0ae98af09
--- /dev/null
+++ b/src/contest_link_80C857C.c
@@ -0,0 +1,55 @@
+#include "global.h"
+#include "link.h"
+
+#if GERMAN
+
+void de_sub_80C9274(bool32 arg0) {
+ if (deUnkValue2 != 1)
+ {
+ return;
+ }
+
+ if (arg0)
+ {
+ deUnkValue2 = 3;
+ }
+ else
+ {
+ deUnkValue2 = 2;
+ }
+}
+
+void de_sub_80C9294(bool32 arg0) {
+ if (deUnkValue2 == 1)
+ {
+ if (arg0)
+ {
+ deUnkValue2 = 3;
+ }
+ else
+ {
+ deUnkValue2 = 2;
+ }
+
+ return;
+ }
+
+
+ if (deUnkValue2 == 2)
+ {
+ SendBlock(0, sBlockRequestLookupTable[deUnkValue1].address, sBlockRequestLookupTable[deUnkValue1].size);
+
+ if (arg0)
+ {
+ deUnkValue2 = 0;
+ }
+ else
+ {
+ deUnkValue2 = 1;
+ }
+
+ return;
+ }
+}
+
+#endif
diff --git a/src/contest_painting.c b/src/contest_painting.c
index d7bacb905..d75947e05 100644
--- a/src/contest_painting.c
+++ b/src/contest_painting.c
@@ -1,6 +1,6 @@
#include "global.h"
#include "contest_painting.h"
-#include "asm.h"
+#include "cute_sketch.h"
#include "data2.h"
#include "decompress.h"
#include "main.h"
@@ -11,6 +11,7 @@
#include "string_util.h"
#include "strings.h"
#include "text.h"
+#include "unknown_task.h"
extern u8 unk_2000000[];
extern u8 gUnknown_03000750;
@@ -105,11 +106,6 @@ static void VBlankCB_ContestPainting(void);
void sub_8106B90(); //should be static
static void sub_8107090(u8 arg0, u8 arg1);
-extern void sub_80FC7A0(struct Unk03005E20*);
-extern void sub_80FDA18(struct Unk03005E20*);
-extern void sub_80FD8CC(struct Unk03005E20*);
-extern void *species_and_otid_get_pal();
-
__attribute__((naked))
void sub_8106630(u32 arg0)
{
@@ -267,15 +263,23 @@ static void ContestPaintingPrintCaption(u8 contestType, u8 arg1)
{
ptr = StringCopy(ptr, gUnknown_083F60AC[type]);
ptr = StringCopy(ptr, gContestText_ContestWinner);
+#if ENGLISH
ptr = StringCopy(ptr, gUnknown_03005E8C->trainer_name);
+#elif GERMAN
+ ptr = StringCopy10(ptr, gUnknown_03005E8C->pokemon_name);
+#endif
- // {ENG}
+ // {LATIN}
ptr[0] = 0xFC;
ptr[1] = 0x16;
ptr += 2;
ptr = StringCopy(ptr, gOtherText_Unknown1);
+#if ENGLISH
ptr = StringCopy10(ptr, gUnknown_03005E8C->pokemon_name);
+#elif GERMAN
+ ptr = StringCopy(ptr, gUnknown_03005E8C->trainer_name);
+#endif
xPos = 6;
yPos = 14;
diff --git a/src/coord_event_weather.c b/src/coord_event_weather.c
index f033e5391..9c5a1ca4d 100644
--- a/src/coord_event_weather.c
+++ b/src/coord_event_weather.c
@@ -1,5 +1,6 @@
#include "global.h"
-#include "asm.h"
+#include "coord_event_weather.h"
+#include "field_weather.h"
struct CoordEventWeather
{
diff --git a/src/credits.c b/src/credits.c
index c8de577fc..8ec126a41 100644
--- a/src/credits.c
+++ b/src/credits.c
@@ -1,8 +1,9 @@
#include "global.h"
-#include "asm.h"
#include "data2.h"
#include "decompress.h"
#include "event_data.h"
+#include "hall_of_fame.h"
+#include "intro_credits_graphics.h"
#include "m4a.h"
#include "main.h"
#include "menu.h"
@@ -13,6 +14,7 @@
#include "sound.h"
#include "species.h"
#include "starter_choose.h"
+#include "task.h"
#include "trig.h"
asm(".set REG_BASE, 0x4000000");
@@ -21,8 +23,6 @@ asm(".set OFFSET_REG_BLDALPHA, 0x52");
asm(".set REG_BLDCNT, REG_BASE + OFFSET_REG_BLDCNT");
asm(".set REG_BLDALPHA, REG_BASE + OFFSET_REG_BLDALPHA");
-extern void *species_and_otid_get_pal(u32, u16, u16);
-
enum
{
PAGE_TITLE,
@@ -187,11 +187,6 @@ extern s16 gUnknown_0203935C;
extern u8 gReservedSpritePaletteCount;
-// data/starter_choose
-extern u16 gBirchBagGrassPal[32];
-extern u8 gBirchGrassTilemap[];
-extern u8 gBirchHelpGfx[];
-
// data/hall_of_fame
extern void *gUnknown_0840B5A0[];
@@ -211,14 +206,6 @@ extern const union AnimCmd *const gSpriteAnimTable_0840CA54[];
extern const union AnimCmd *const gSpriteAnimTable_0840CA94[];
extern struct SpriteTemplate gSpriteTemplate_840CAEC;
-// data/intro_credits_graphics
-extern const struct SpriteSheet gIntro2BrendanSpriteSheet;
-extern const struct SpriteSheet gIntro2MaySpriteSheet;
-extern const struct SpriteSheet gIntro2BicycleSpriteSheet;
-extern const struct SpritePalette gIntro2SpritePalettes[];
-extern const struct SpriteSheet gUnknown_08416E24;
-extern const struct SpriteSheet gUnknown_08416E34;
-
// graphics
extern u8 gCreditsCopyrightEnd_Gfx[];
extern u16 gIntroCopyright_Pal[16];
@@ -246,7 +233,7 @@ static void sub_8145128(u16, u16, u16);
static void sub_81452D0(u16 arg0, u16 palette);
static void spritecb_player_8145378(struct Sprite *sprite);
static void spritecb_rival_8145420(struct Sprite *sprite);
-static u8 sub_81456B4(u16 nationalNum, u16 x, u16 y, u16 position);
+static u8 sub_81456B4(u16 species, u16 x, u16 y, u16 position);
static void sub_81458DC(void);
static void vblank_8143948(void)
@@ -461,7 +448,7 @@ void task_a_8143D04(u8 taskIdA)
gReservedSpritePaletteCount = 8;
LZ77UnCompVram(&gBirchHelpGfx, (void *)VRAM);
LZ77UnCompVram(&gBirchGrassTilemap, (void *)(VRAM + 0x3800));
- LoadPalette(gBirchBagGrassPal + 1, 1, 31 * 2);
+ LoadPalette(gBirchBagGrassPal[0] + 1, 1, 31 * 2);
for (i = 0; i < 0x800; i++)
HALL_OF_FAME_SHEET_0[i] = 0x11;
@@ -1508,7 +1495,7 @@ void spritecb_81454E0(struct Sprite *sprite) {
static u8 sub_81456B4(u16 species, u16 x, u16 y, u16 position)
{
u32 personality;
- void *palette;
+ const u8 *lzPaletteData;
u8 spriteId;
u8 spriteId2;
@@ -1540,8 +1527,8 @@ static u8 sub_81456B4(u16 species, u16 x, u16 y, u16 position)
1
);
- palette = species_and_otid_get_pal(species, 0, 0xFFFF);
- LoadCompressedPalette(palette, 0x100 + (position * 16), 0x20);
+ lzPaletteData = species_and_otid_get_pal(species, 0, 0xFFFF);
+ LoadCompressedPalette(lzPaletteData, 0x100 + (position * 16), 0x20);
sub_8143648(position, position);
spriteId = CreateSprite(&gUnknown_02024E8C, x, y, 0);
diff --git a/src/data/.clang-format b/src/data/.clang-format
new file mode 100644
index 000000000..036aa7d76
--- /dev/null
+++ b/src/data/.clang-format
@@ -0,0 +1,22 @@
+BasedOnStyle: LLVM
+AllowShortFunctionsOnASingleLine: None
+BreakBeforeBraces: Allman
+ColumnLimit: 0
+UseTab: Never
+IndentWidth: 4
+TabWidth: 4
+AlignAfterOpenBracket: DontAlign
+Cpp11BracedListStyle: false
+BreakStringLiterals: false
+IndentCaseLabels: false
+IncludeCategories:
+ - Regex: '^"gba/types\.h"$'
+ Priority: -4
+ - Regex: '^"global\.h"$'
+ Priority: -3
+ - Regex: '^"gba/gba\.h"$'
+ Priority: -2
+ - Regex: '^"gba/'
+ Priority: -1
+ - Regex: '.\*'
+ Priority: 1
diff --git a/src/data/decoration/decorations.h b/src/data/decoration/decorations.h
new file mode 100644
index 000000000..a25f3408f
--- /dev/null
+++ b/src/data/decoration/decorations.h
@@ -0,0 +1,1212 @@
+const struct Decoration gDecorations[] = {
+ {
+ .id = DECOR_NONE,
+ .name = DECORNAME_SMALL_DESK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DESK,
+ .price = 0,
+ .description = DecorDesc_SMALL_DESK,
+ .tiles = DecorGfx_SMALL_DESK,
+ },
+ {
+ .id = DECOR_SMALL_DESK,
+ .name = DECORNAME_SMALL_DESK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DESK,
+ .price = 3000,
+ .description = DecorDesc_SMALL_DESK,
+ .tiles = DecorGfx_SMALL_DESK,
+ },
+ {
+ .id = DECOR_POKEMON_DESK,
+ .name = DECORNAME_POKEMON_DESK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DESK,
+ .price = 3000,
+ .description = DecorDesc_POKEMON_DESK,
+ .tiles = DecorGfx_POKEMON_DESK,
+ },
+ {
+ .id = DECOR_HEAVY_DESK,
+ .name = DECORNAME_HEAVY_DESK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_3x2,
+ .category = DECORCAT_DESK,
+ .price = 6000,
+ .description = DecorDesc_HEAVY_DESK,
+ .tiles = DecorGfx_HEAVY_DESK,
+ },
+ {
+ .id = DECOR_RAGGED_DESK,
+ .name = DECORNAME_RAGGED_DESK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_3x2,
+ .category = DECORCAT_DESK,
+ .price = 6000,
+ .description = DecorDesc_RAGGED_DESK,
+ .tiles = DecorGfx_RAGGED_DESK,
+ },
+ {
+ .id = DECOR_COMFORT_DESK,
+ .name = DECORNAME_COMFORT_DESK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_3x2,
+ .category = DECORCAT_DESK,
+ .price = 6000,
+ .description = DecorDesc_COMFORT_DESK,
+ .tiles = DecorGfx_COMFORT_DESK,
+ },
+ {
+ .id = DECOR_PRETTY_DESK,
+ .name = DECORNAME_PRETTY_DESK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_DESK,
+ .price = 9000,
+ .description = DecorDesc_PRETTY_DESK,
+ .tiles = DecorGfx_PRETTY_DESK,
+ },
+ {
+ .id = DECOR_BRICK_DESK,
+ .name = DECORNAME_BRICK_DESK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_DESK,
+ .price = 9000,
+ .description = DecorDesc_BRICK_DESK,
+ .tiles = DecorGfx_BRICK_DESK,
+ },
+ {
+ .id = DECOR_CAMP_DESK,
+ .name = DECORNAME_CAMP_DESK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_DESK,
+ .price = 9000,
+ .description = DecorDesc_CAMP_DESK,
+ .tiles = DecorGfx_CAMP_DESK,
+ },
+ {
+ .id = DECOR_HARD_DESK,
+ .name = DECORNAME_HARD_DESK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_DESK,
+ .price = 9000,
+ .description = DecorDesc_HARD_DESK,
+ .tiles = DecorGfx_HARD_DESK,
+ },
+ {
+ .id = DECOR_SMALL_CHAIR,
+ .name = DECORNAME_SMALL_CHAIR,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CHAIR,
+ .price = 2000,
+ .description = DecorDesc_SMALL_CHAIR,
+ .tiles = DecorGfx_SMALL_CHAIR,
+ },
+ {
+ .id = DECOR_POKEMON_CHAIR,
+ .name = DECORNAME_POKEMON_CHAIR,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CHAIR,
+ .price = 2000,
+ .description = DecorDesc_POKEMON_CHAIR,
+ .tiles = DecorGfx_POKEMON_CHAIR,
+ },
+ {
+ .id = DECOR_HEAVY_CHAIR,
+ .name = DECORNAME_HEAVY_CHAIR,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CHAIR,
+ .price = 2000,
+ .description = DecorDesc_HEAVY_CHAIR,
+ .tiles = DecorGfx_HEAVY_CHAIR,
+ },
+ {
+ .id = DECOR_PRETTY_CHAIR,
+ .name = DECORNAME_PRETTY_CHAIR,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CHAIR,
+ .price = 2000,
+ .description = DecorDesc_PRETTY_CHAIR,
+ .tiles = DecorGfx_PRETTY_CHAIR,
+ },
+ {
+ .id = DECOR_COMFORT_CHAIR,
+ .name = DECORNAME_COMFORT_CHAIR,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CHAIR,
+ .price = 2000,
+ .description = DecorDesc_COMFORT_CHAIR,
+ .tiles = DecorGfx_COMFORT_CHAIR,
+ },
+ {
+ .id = DECOR_RAGGED_CHAIR,
+ .name = DECORNAME_RAGGED_CHAIR,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CHAIR,
+ .price = 2000,
+ .description = DecorDesc_RAGGED_CHAIR,
+ .tiles = DecorGfx_RAGGED_CHAIR,
+ },
+ {
+ .id = DECOR_BRICK_CHAIR,
+ .name = DECORNAME_BRICK_CHAIR,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CHAIR,
+ .price = 2000,
+ .description = DecorDesc_BRICK_CHAIR,
+ .tiles = DecorGfx_BRICK_CHAIR,
+ },
+ {
+ .id = DECOR_CAMP_CHAIR,
+ .name = DECORNAME_CAMP_CHAIR,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CHAIR,
+ .price = 2000,
+ .description = DecorDesc_CAMP_CHAIR,
+ .tiles = DecorGfx_CAMP_CHAIR,
+ },
+ {
+ .id = DECOR_HARD_CHAIR,
+ .name = DECORNAME_HARD_CHAIR,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CHAIR,
+ .price = 2000,
+ .description = DecorDesc_HARD_CHAIR,
+ .tiles = DecorGfx_HARD_CHAIR,
+ },
+ {
+ .id = DECOR_RED_PLANT,
+ .name = DECORNAME_RED_PLANT,
+ .permission = DECORPERM_BEHIND_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_PLANT,
+ .price = 3000,
+ .description = DecorDesc_RED_PLANT,
+ .tiles = DecorGfx_RED_PLANT,
+ },
+ {
+ .id = DECOR_TROPICAL_PLANT,
+ .name = DECORNAME_TROPICAL_PLANT,
+ .permission = DECORPERM_BEHIND_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_PLANT,
+ .price = 3000,
+ .description = DecorDesc_TROPICAL_PLANT,
+ .tiles = DecorGfx_TROPICAL_PLANT,
+ },
+ {
+ .id = DECOR_PRETTY_FLOWERS,
+ .name = DECORNAME_PRETTY_FLOWERS,
+ .permission = DECORPERM_BEHIND_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_PLANT,
+ .price = 3000,
+ .description = DecorDesc_PRETTY_FLOWERS,
+ .tiles = DecorGfx_PRETTY_FLOWERS,
+ },
+ {
+ .id = DECOR_COLORFUL_PLANT,
+ .name = DECORNAME_COLORFUL_PLANT,
+ .permission = DECORPERM_BEHIND_FLOOR,
+ .shape = DECORSHAPE_2x2,
+ .category = DECORCAT_PLANT,
+ .price = 5000,
+ .description = DecorDesc_COLORFUL_PLANT,
+ .tiles = DecorGfx_COLORFUL_PLANT,
+ },
+ {
+ .id = DECOR_BIG_PLANT,
+ .name = DECORNAME_BIG_PLANT,
+ .permission = DECORPERM_BEHIND_FLOOR,
+ .shape = DECORSHAPE_2x2,
+ .category = DECORCAT_PLANT,
+ .price = 5000,
+ .description = DecorDesc_BIG_PLANT,
+ .tiles = DecorGfx_BIG_PLANT,
+ },
+ {
+ .id = DECOR_GORGEOUS_PLANT,
+ .name = DECORNAME_GORGEOUS_PLANT,
+ .permission = DECORPERM_BEHIND_FLOOR,
+ .shape = DECORSHAPE_2x2,
+ .category = DECORCAT_PLANT,
+ .price = 5000,
+ .description = DecorDesc_GORGEOUS_PLANT,
+ .tiles = DecorGfx_GORGEOUS_PLANT,
+ },
+ {
+ .id = DECOR_RED_BRICK,
+ .name = DECORNAME_RED_BRICK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 500,
+ .description = DecorDesc_RED_BRICK,
+ .tiles = DecorGfx_RED_BRICK,
+ },
+ {
+ .id = DECOR_YELLOW_BRICK,
+ .name = DECORNAME_YELLOW_BRICK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 500,
+ .description = DecorDesc_YELLOW_BRICK,
+ .tiles = DecorGfx_YELLOW_BRICK,
+ },
+ {
+ .id = DECOR_BLUE_BRICK,
+ .name = DECORNAME_BLUE_BRICK,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 500,
+ .description = DecorDesc_BLUE_BRICK,
+ .tiles = DecorGfx_BLUE_BRICK,
+ },
+ {
+ .id = DECOR_RED_BALLOON,
+ .name = DECORNAME_RED_BALLOON,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_ORNAMENT,
+ .price = 500,
+ .description = DecorDesc_RED_BALLOON,
+ .tiles = DecorGfx_RED_BALLOON,
+ },
+ {
+ .id = DECOR_BLUE_BALLOON,
+ .name = DECORNAME_BLUE_BALLOON,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_ORNAMENT,
+ .price = 500,
+ .description = DecorDesc_BLUE_BALLOON,
+ .tiles = DecorGfx_BLUE_BALLOON,
+ },
+ {
+ .id = DECOR_YELLOW_BALLOON,
+ .name = DECORNAME_YELLOW_BALLOON,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_ORNAMENT,
+ .price = 500,
+ .description = DecorDesc_YELLOW_BALLOON,
+ .tiles = DecorGfx_YELLOW_BALLOON,
+ },
+ {
+ .id = DECOR_RED_TENT,
+ .name = DECORNAME_RED_TENT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_ORNAMENT,
+ .price = 10000,
+ .description = DecorDesc_RED_TENT,
+ .tiles = DecorGfx_RED_TENT,
+ },
+ {
+ .id = DECOR_BLUE_TENT,
+ .name = DECORNAME_BLUE_TENT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_ORNAMENT,
+ .price = 10000,
+ .description = DecorDesc_BLUE_TENT,
+ .tiles = DecorGfx_BLUE_TENT,
+ },
+ {
+ .id = DECOR_SOLID_BOARD,
+ .name = DECORNAME_SOLID_BOARD,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 3000,
+ .description = DecorDesc_SOLID_BOARD,
+ .tiles = DecorGfx_SOLID_BOARD,
+ },
+ {
+ .id = DECOR_SLIDE,
+ .name = DECORNAME_SLIDE,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_2x4,
+ .category = DECORCAT_ORNAMENT,
+ .price = 8000,
+ .description = DecorDesc_SLIDE,
+ .tiles = DecorGfx_SLIDE,
+ },
+ {
+ .id = DECOR_FENCE_LENGTH,
+ .name = DECORNAME_FENCE_LENGTH,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_ORNAMENT,
+ .price = 500,
+ .description = DecorDesc_FENCE_LENGTH,
+ .tiles = DecorGfx_FENCE_LENGTH,
+ },
+ {
+ .id = DECOR_FENCE_WIDTH,
+ .name = DECORNAME_FENCE_WIDTH,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_ORNAMENT,
+ .price = 500,
+ .description = DecorDesc_FENCE_WIDTH,
+ .tiles = DecorGfx_FENCE_WIDTH,
+ },
+ {
+ .id = DECOR_TIRE,
+ .name = DECORNAME_TIRE,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_2x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 800,
+ .description = DecorDesc_TIRE,
+ .tiles = DecorGfx_TIRE,
+ },
+ {
+ .id = DECOR_STAND,
+ .name = DECORNAME_STAND,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_4x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 7000,
+ .description = DecorDesc_STAND,
+ .tiles = DecorGfx_STAND,
+ },
+ {
+ .id = DECOR_MUD_BALL,
+ .name = DECORNAME_MUD_BALL,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_ORNAMENT,
+ .price = 200,
+ .description = DecorDesc_MUD_BALL,
+ .tiles = DecorGfx_MUD_BALL,
+ },
+ {
+ .id = DECOR_BREAKABLE_DOOR,
+ .name = DECORNAME_BREAKABLE_DOOR,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 3000,
+ .description = DecorDesc_BREAKABLE_DOOR,
+ .tiles = DecorGfx_BREAKABLE_DOOR,
+ },
+ {
+ .id = DECOR_SAND_ORNAMENT,
+ .name = DECORNAME_SAND_ORNAMENT,
+ .permission = DECORPERM_BEHIND_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 3000,
+ .description = DecorDesc_SAND_ORNAMENT,
+ .tiles = DecorGfx_SAND_ORNAMENT,
+ },
+ {
+ .id = DECOR_SILVER_SHIELD,
+ .name = DECORNAME_SILVER_SHIELD,
+ .permission = DECORPERM_BEHIND_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 0,
+ .description = DecorDesc_SILVER_SHIELD,
+ .tiles = DecorGfx_SILVER_SHIELD,
+ },
+ {
+ .id = DECOR_GOLD_SHIELD,
+ .name = DECORNAME_GOLD_SHIELD,
+ .permission = DECORPERM_BEHIND_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 0,
+ .description = DecorDesc_GOLD_SHIELD,
+ .tiles = DecorGfx_GOLD_SHIELD,
+ },
+ {
+ .id = DECOR_GLASS_ORNAMENT,
+ .name = DECORNAME_GLASS_ORNAMENT,
+ .permission = DECORPERM_BEHIND_FLOOR,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_ORNAMENT,
+ .price = 0,
+ .description = DecorDesc_GLASS_ORNAMENT,
+ .tiles = DecorGfx_GLASS_ORNAMENT,
+ },
+ {
+ .id = DECOR_TV,
+ .name = DECORNAME_TV,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_ORNAMENT,
+ .price = 3000,
+ .description = DecorDesc_TV,
+ .tiles = DecorGfx_TV,
+ },
+ {
+ .id = DECOR_ROUND_TV,
+ .name = DECORNAME_ROUND_TV,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_ORNAMENT,
+ .price = 4000,
+ .description = DecorDesc_ROUND_TV,
+ .tiles = DecorGfx_ROUND_TV,
+ },
+ {
+ .id = DECOR_CUTE_TV,
+ .name = DECORNAME_CUTE_TV,
+ .permission = DECORPERM_SOLID_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_ORNAMENT,
+ .price = 4000,
+ .description = DecorDesc_CUTE_TV,
+ .tiles = DecorGfx_CUTE_TV,
+ },
+ {
+ .id = DECOR_GLITTER_MAT,
+ .name = DECORNAME_GLITTER_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 2000,
+ .description = DecorDesc_GLITTER_MAT,
+ .tiles = DecorGfx_GLITTER_MAT,
+ },
+ {
+ .id = DECOR_JUMP_MAT,
+ .name = DECORNAME_JUMP_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 2000,
+ .description = DecorDesc_JUMP_MAT,
+ .tiles = DecorGfx_JUMP_MAT,
+ },
+ {
+ .id = DECOR_SPIN_MAT,
+ .name = DECORNAME_SPIN_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 2000,
+ .description = DecorDesc_SPIN_MAT,
+ .tiles = DecorGfx_SPIN_MAT,
+ },
+ {
+ .id = DECOR_C_LOW_NOTE_MAT,
+ .name = DECORNAME_C_LOW_NOTE_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 500,
+ .description = DecorDesc_C_LOW_NOTE_MAT,
+ .tiles = DecorGfx_C_LOW_NOTE_MAT,
+ },
+ {
+ .id = DECOR_D_NOTE_MAT,
+ .name = DECORNAME_D_NOTE_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 500,
+ .description = DecorDesc_D_NOTE_MAT,
+ .tiles = DecorGfx_D_NOTE_MAT,
+ },
+ {
+ .id = DECOR_E_NOTE_MAT,
+ .name = DECORNAME_E_NOTE_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 500,
+ .description = DecorDesc_E_NOTE_MAT,
+ .tiles = DecorGfx_E_NOTE_MAT,
+ },
+ {
+ .id = DECOR_F_NOTE_MAT,
+ .name = DECORNAME_F_NOTE_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 500,
+ .description = DecorDesc_F_NOTE_MAT,
+ .tiles = DecorGfx_F_NOTE_MAT,
+ },
+ {
+ .id = DECOR_G_NOTE_MAT,
+ .name = DECORNAME_G_NOTE_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 500,
+ .description = DecorDesc_G_NOTE_MAT,
+ .tiles = DecorGfx_G_NOTE_MAT,
+ },
+ {
+ .id = DECOR_A_NOTE_MAT,
+ .name = DECORNAME_A_NOTE_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 500,
+ .description = DecorDesc_A_NOTE_MAT,
+ .tiles = DecorGfx_A_NOTE_MAT,
+ },
+ {
+ .id = DECOR_B_NOTE_MAT,
+ .name = DECORNAME_B_NOTE_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 500,
+ .description = DecorDesc_B_NOTE_MAT,
+ .tiles = DecorGfx_B_NOTE_MAT,
+ },
+ {
+ .id = DECOR_C_HIGH_NOTE_MAT,
+ .name = DECORNAME_C_HIGH_NOTE_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_MAT,
+ .price = 500,
+ .description = DecorDesc_C_HIGH_NOTE_MAT,
+ .tiles = DecorGfx_C_HIGH_NOTE_MAT,
+ },
+ {
+ .id = DECOR_SURF_MAT,
+ .name = DECORNAME_SURF_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_MAT,
+ .price = 4000,
+ .description = DecorDesc_SURF_MAT,
+ .tiles = DecorGfx_SURF_MAT,
+ },
+ {
+ .id = DECOR_THUNDER_MAT,
+ .name = DECORNAME_THUNDER_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_MAT,
+ .price = 4000,
+ .description = DecorDesc_THUNDER_MAT,
+ .tiles = DecorGfx_THUNDER_MAT,
+ },
+ {
+ .id = DECOR_FIRE_BLAST_MAT,
+ .name = DECORNAME_FIRE_BLAST_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_MAT,
+ .price = 4000,
+ .description = DecorDesc_FIRE_BLAST_MAT,
+ .tiles = DecorGfx_FIRE_BLAST_MAT,
+ },
+ {
+ .id = DECOR_POWDER_SNOW_MAT,
+ .name = DECORNAME_POWDER_SNOW_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_MAT,
+ .price = 4000,
+ .description = DecorDesc_POWDER_SNOW_MAT,
+ .tiles = DecorGfx_POWDER_SNOW_MAT,
+ },
+ {
+ .id = DECOR_ATTRACT_MAT,
+ .name = DECORNAME_ATTRACT_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_MAT,
+ .price = 4000,
+ .description = DecorDesc_ATTRACT_MAT,
+ .tiles = DecorGfx_ATTRACT_MAT,
+ },
+ {
+ .id = DECOR_FISSURE_MAT,
+ .name = DECORNAME_FISSURE_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_MAT,
+ .price = 4000,
+ .description = DecorDesc_FISSURE_MAT,
+ .tiles = DecorGfx_FISSURE_MAT,
+ },
+ {
+ .id = DECOR_SPIKES_MAT,
+ .name = DECORNAME_SPIKES_MAT,
+ .permission = DECORPERM_PASS_FLOOR,
+ .shape = DECORSHAPE_3x3,
+ .category = DECORCAT_MAT,
+ .price = 4000,
+ .description = DecorDesc_SPIKES_MAT,
+ .tiles = DecorGfx_SPIKES_MAT,
+ },
+ {
+ .id = DECOR_BALL_POSTER,
+ .name = DECORNAME_BALL_POSTER,
+ .permission = DECORPERM_NA_WALL,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_POSTER,
+ .price = 1000,
+ .description = DecorDesc_BALL_POSTER,
+ .tiles = DecorGfx_BALL_POSTER,
+ },
+ {
+ .id = DECOR_GREEN_POSTER,
+ .name = DECORNAME_GREEN_POSTER,
+ .permission = DECORPERM_NA_WALL,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_POSTER,
+ .price = 1000,
+ .description = DecorDesc_GREEN_POSTER,
+ .tiles = DecorGfx_GREEN_POSTER,
+ },
+ {
+ .id = DECOR_RED_POSTER,
+ .name = DECORNAME_RED_POSTER,
+ .permission = DECORPERM_NA_WALL,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_POSTER,
+ .price = 1000,
+ .description = DecorDesc_RED_POSTER,
+ .tiles = DecorGfx_RED_POSTER,
+ },
+ {
+ .id = DECOR_BLUE_POSTER,
+ .name = DECORNAME_BLUE_POSTER,
+ .permission = DECORPERM_NA_WALL,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_POSTER,
+ .price = 1000,
+ .description = DecorDesc_BLUE_POSTER,
+ .tiles = DecorGfx_BLUE_POSTER,
+ },
+ {
+ .id = DECOR_CUTE_POSTER,
+ .name = DECORNAME_CUTE_POSTER,
+ .permission = DECORPERM_NA_WALL,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_POSTER,
+ .price = 1000,
+ .description = DecorDesc_CUTE_POSTER,
+ .tiles = DecorGfx_CUTE_POSTER,
+ },
+ {
+ .id = DECOR_PIKA_POSTER,
+ .name = DECORNAME_PIKA_POSTER,
+ .permission = DECORPERM_NA_WALL,
+ .shape = DECORSHAPE_2x1,
+ .category = DECORCAT_POSTER,
+ .price = 1500,
+ .description = DecorDesc_PIKA_POSTER,
+ .tiles = DecorGfx_PIKA_POSTER,
+ },
+ {
+ .id = DECOR_LONG_POSTER,
+ .name = DECORNAME_LONG_POSTER,
+ .permission = DECORPERM_NA_WALL,
+ .shape = DECORSHAPE_2x1,
+ .category = DECORCAT_POSTER,
+ .price = 1500,
+ .description = DecorDesc_LONG_POSTER,
+ .tiles = DecorGfx_LONG_POSTER,
+ },
+ {
+ .id = DECOR_SEA_POSTER,
+ .name = DECORNAME_SEA_POSTER,
+ .permission = DECORPERM_NA_WALL,
+ .shape = DECORSHAPE_2x1,
+ .category = DECORCAT_POSTER,
+ .price = 1500,
+ .description = DecorDesc_SEA_POSTER,
+ .tiles = DecorGfx_SEA_POSTER,
+ },
+ {
+ .id = DECOR_SKY_POSTER,
+ .name = DECORNAME_SKY_POSTER,
+ .permission = DECORPERM_NA_WALL,
+ .shape = DECORSHAPE_2x1,
+ .category = DECORCAT_POSTER,
+ .price = 1500,
+ .description = DecorDesc_SKY_POSTER,
+ .tiles = DecorGfx_SKY_POSTER,
+ },
+ {
+ .id = DECOR_KISS_POSTER,
+ .name = DECORNAME_KISS_POSTER,
+ .permission = DECORPERM_NA_WALL,
+ .shape = DECORSHAPE_2x1,
+ .category = DECORCAT_POSTER,
+ .price = 1500,
+ .description = DecorDesc_KISS_POSTER,
+ .tiles = DecorGfx_KISS_POSTER,
+ },
+ {
+ .id = DECOR_PICHU_DOLL,
+ .name = DECORNAME_PICHU_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_PICHU_DOLL,
+ .tiles = DecorGfx_PICHU_DOLL,
+ },
+ {
+ .id = DECOR_PIKACHU_DOLL,
+ .name = DECORNAME_PIKACHU_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_PIKACHU_DOLL,
+ .tiles = DecorGfx_PIKACHU_DOLL,
+ },
+ {
+ .id = DECOR_MARILL_DOLL,
+ .name = DECORNAME_MARILL_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_MARILL_DOLL,
+ .tiles = DecorGfx_MARILL_DOLL,
+ },
+ {
+ .id = DECOR_TOGEPI_DOLL,
+ .name = DECORNAME_TOGEPI_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_TOGEPI_DOLL,
+ .tiles = DecorGfx_TOGEPI_DOLL,
+ },
+ {
+ .id = DECOR_CYNDAQUIL_DOLL,
+ .name = DECORNAME_CYNDAQUIL_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_CYNDAQUIL_DOLL,
+ .tiles = DecorGfx_CYNDAQUIL_DOLL,
+ },
+ {
+ .id = DECOR_CHIKORITA_DOLL,
+ .name = DECORNAME_CHIKORITA_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_CHIKORITA_DOLL,
+ .tiles = DecorGfx_CHIKORITA_DOLL,
+ },
+ {
+ .id = DECOR_TOTODILE_DOLL,
+ .name = DECORNAME_TOTODILE_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_TOTODILE_DOLL,
+ .tiles = DecorGfx_TOTODILE_DOLL,
+ },
+ {
+ .id = DECOR_JIGGLYPUFF_DOLL,
+ .name = DECORNAME_JIGGLYPUFF_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_JIGGLYPUFF_DOLL,
+ .tiles = DecorGfx_JIGGLYPUFF_DOLL,
+ },
+ {
+ .id = DECOR_MEOWTH_DOLL,
+ .name = DECORNAME_MEOWTH_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_MEOWTH_DOLL,
+ .tiles = DecorGfx_MEOWTH_DOLL,
+ },
+ {
+ .id = DECOR_CLEFAIRY_DOLL,
+ .name = DECORNAME_CLEFAIRY_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_CLEFAIRY_DOLL,
+ .tiles = DecorGfx_CLEFAIRY_DOLL,
+ },
+ {
+ .id = DECOR_DITTO_DOLL,
+ .name = DECORNAME_DITTO_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_DITTO_DOLL,
+ .tiles = DecorGfx_DITTO_DOLL,
+ },
+ {
+ .id = DECOR_SMOOCHUM_DOLL,
+ .name = DECORNAME_SMOOCHUM_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_SMOOCHUM_DOLL,
+ .tiles = DecorGfx_SMOOCHUM_DOLL,
+ },
+ {
+ .id = DECOR_TREECKO_DOLL,
+ .name = DECORNAME_TREECKO_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_TREECKO_DOLL,
+ .tiles = DecorGfx_TREECKO_DOLL,
+ },
+ {
+ .id = DECOR_TORCHIC_DOLL,
+ .name = DECORNAME_TORCHIC_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_TORCHIC_DOLL,
+ .tiles = DecorGfx_TORCHIC_DOLL,
+ },
+ {
+ .id = DECOR_MUDKIP_DOLL,
+ .name = DECORNAME_MUDKIP_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_MUDKIP_DOLL,
+ .tiles = DecorGfx_MUDKIP_DOLL,
+ },
+ {
+ .id = DECOR_DUSKULL_DOLL,
+ .name = DECORNAME_DUSKULL_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_DUSKULL_DOLL,
+ .tiles = DecorGfx_DUSKULL_DOLL,
+ },
+ {
+ .id = DECOR_WYNAUT_DOLL,
+ .name = DECORNAME_WYNAUT_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_WYNAUT_DOLL,
+ .tiles = DecorGfx_WYNAUT_DOLL,
+ },
+ {
+ .id = DECOR_BALTOY_DOLL,
+ .name = DECORNAME_BALTOY_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_BALTOY_DOLL,
+ .tiles = DecorGfx_BALTOY_DOLL,
+ },
+ {
+ .id = DECOR_KECLEON_DOLL,
+ .name = DECORNAME_KECLEON_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_KECLEON_DOLL,
+ .tiles = DecorGfx_KECLEON_DOLL,
+ },
+ {
+ .id = DECOR_AZURILL_DOLL,
+ .name = DECORNAME_AZURILL_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_AZURILL_DOLL,
+ .tiles = DecorGfx_AZURILL_DOLL,
+ },
+ {
+ .id = DECOR_SKITTY_DOLL,
+ .name = DECORNAME_SKITTY_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_SKITTY_DOLL,
+ .tiles = DecorGfx_SKITTY_DOLL,
+ },
+ {
+ .id = DECOR_SWABLU_DOLL,
+ .name = DECORNAME_SWABLU_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_SWABLU_DOLL,
+ .tiles = DecorGfx_SWABLU_DOLL,
+ },
+ {
+ .id = DECOR_GULPIN_DOLL,
+ .name = DECORNAME_GULPIN_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_GULPIN_DOLL,
+ .tiles = DecorGfx_GULPIN_DOLL,
+ },
+ {
+ .id = DECOR_LOTAD_DOLL,
+ .name = DECORNAME_LOTAD_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_LOTAD_DOLL,
+ .tiles = DecorGfx_LOTAD_DOLL,
+ },
+ {
+ .id = DECOR_SEEDOT_DOLL,
+ .name = DECORNAME_SEEDOT_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_DOLL,
+ .price = 3000,
+ .description = DecorDesc_SEEDOT_DOLL,
+ .tiles = DecorGfx_SEEDOT_DOLL,
+ },
+ {
+ .id = DECOR_PIKA_CUSHION,
+ .name = DECORNAME_PIKA_CUSHION,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CUSHION,
+ .price = 2000,
+ .description = DecorDesc_PIKA_CUSHION,
+ .tiles = DecorGfx_PIKA_CUSHION,
+ },
+ {
+ .id = DECOR_ROUND_CUSHION,
+ .name = DECORNAME_ROUND_CUSHION,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CUSHION,
+ .price = 2000,
+ .description = DecorDesc_ROUND_CUSHION,
+ .tiles = DecorGfx_ROUND_CUSHION,
+ },
+ {
+ .id = DECOR_KISS_CUSHION,
+ .name = DECORNAME_KISS_CUSHION,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CUSHION,
+ .price = 2000,
+ .description = DecorDesc_KISS_CUSHION,
+ .tiles = DecorGfx_KISS_CUSHION,
+ },
+ {
+ .id = DECOR_ZIGZAG_CUSHION,
+ .name = DECORNAME_ZIGZAG_CUSHION,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CUSHION,
+ .price = 2000,
+ .description = DecorDesc_ZIGZAG_CUSHION,
+ .tiles = DecorGfx_ZIGZAG_CUSHION,
+ },
+ {
+ .id = DECOR_SPIN_CUSHION,
+ .name = DECORNAME_SPIN_CUSHION,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CUSHION,
+ .price = 2000,
+ .description = DecorDesc_SPIN_CUSHION,
+ .tiles = DecorGfx_SPIN_CUSHION,
+ },
+ {
+ .id = DECOR_DIAMOND_CUSHION,
+ .name = DECORNAME_DIAMOND_CUSHION,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CUSHION,
+ .price = 2000,
+ .description = DecorDesc_DIAMOND_CUSHION,
+ .tiles = DecorGfx_DIAMOND_CUSHION,
+ },
+ {
+ .id = DECOR_BALL_CUSHION,
+ .name = DECORNAME_BALL_CUSHION,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CUSHION,
+ .price = 2000,
+ .description = DecorDesc_BALL_CUSHION,
+ .tiles = DecorGfx_BALL_CUSHION,
+ },
+ {
+ .id = DECOR_GRASS_CUSHION,
+ .name = DECORNAME_GRASS_CUSHION,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CUSHION,
+ .price = 2000,
+ .description = DecorDesc_GRASS_CUSHION,
+ .tiles = DecorGfx_GRASS_CUSHION,
+ },
+ {
+ .id = DECOR_FIRE_CUSHION,
+ .name = DECORNAME_FIRE_CUSHION,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CUSHION,
+ .price = 2000,
+ .description = DecorDesc_FIRE_CUSHION,
+ .tiles = DecorGfx_FIRE_CUSHION,
+ },
+ {
+ .id = DECOR_WATER_CUSHION,
+ .name = DECORNAME_WATER_CUSHION,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x1,
+ .category = DECORCAT_CUSHION,
+ .price = 2000,
+ .description = DecorDesc_WATER_CUSHION,
+ .tiles = DecorGfx_WATER_CUSHION,
+ },
+ {
+ .id = DECOR_SNORLAX_DOLL,
+ .name = DECORNAME_SNORLAX_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_DOLL,
+ .price = 10000,
+ .description = DecorDesc_SNORLAX_DOLL,
+ .tiles = DecorGfx_SNORLAX_DOLL,
+ },
+ {
+ .id = DECOR_RHYDON_DOLL,
+ .name = DECORNAME_RHYDON_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_DOLL,
+ .price = 10000,
+ .description = DecorDesc_RHYDON_DOLL,
+ .tiles = DecorGfx_RHYDON_DOLL,
+ },
+ {
+ .id = DECOR_LAPRAS_DOLL,
+ .name = DECORNAME_LAPRAS_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_DOLL,
+ .price = 10000,
+ .description = DecorDesc_LAPRAS_DOLL,
+ .tiles = DecorGfx_LAPRAS_DOLL,
+ },
+ {
+ .id = DECOR_VENUSAUR_DOLL,
+ .name = DECORNAME_VENUSAUR_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_DOLL,
+ .price = 10000,
+ .description = DecorDesc_VENUSAUR_DOLL,
+ .tiles = DecorGfx_VENUSAUR_DOLL,
+ },
+ {
+ .id = DECOR_CHARIZARD_DOLL,
+ .name = DECORNAME_CHARIZARD_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_DOLL,
+ .price = 10000,
+ .description = DecorDesc_CHARIZARD_DOLL,
+ .tiles = DecorGfx_CHARIZARD_DOLL,
+ },
+ {
+ .id = DECOR_BLASTOISE_DOLL,
+ .name = DECORNAME_BLASTOISE_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_DOLL,
+ .price = 10000,
+ .description = DecorDesc_BLASTOISE_DOLL,
+ .tiles = DecorGfx_BLASTOISE_DOLL,
+ },
+ {
+ .id = DECOR_WAILMER_DOLL,
+ .name = DECORNAME_WAILMER_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_DOLL,
+ .price = 10000,
+ .description = DecorDesc_WAILMER_DOLL,
+ .tiles = DecorGfx_WAILMER_DOLL,
+ },
+ {
+ .id = DECOR_REGIROCK_DOLL,
+ .name = DECORNAME_REGIROCK_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_DOLL,
+ .price = 10000,
+ .description = DecorDesc_REGIROCK_DOLL,
+ .tiles = DecorGfx_REGIROCK_DOLL,
+ },
+ {
+ .id = DECOR_REGICE_DOLL,
+ .name = DECORNAME_REGICE_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_DOLL,
+ .price = 10000,
+ .description = DecorDesc_REGICE_DOLL,
+ .tiles = DecorGfx_REGICE_DOLL,
+ },
+ {
+ .id = DECOR_REGISTEEL_DOLL,
+ .name = DECORNAME_REGISTEEL_DOLL,
+ .permission = DECORPERM_SOLID_MAT,
+ .shape = DECORSHAPE_1x2,
+ .category = DECORCAT_DOLL,
+ .price = 10000,
+ .description = DecorDesc_REGISTEEL_DOLL,
+ .tiles = DecorGfx_REGISTEEL_DOLL,
+ }
+};
diff --git a/src/data/decoration/descriptions_de.h b/src/data/decoration/descriptions_de.h
new file mode 100644
index 000000000..4c5559044
--- /dev/null
+++ b/src/data/decoration/descriptions_de.h
@@ -0,0 +1,699 @@
+const u8 DecorDesc_SMALL_DESK[] = _(
+ "Ein kleiner Tisch\n"
+ "für eine Person.");
+
+const u8 DecorDesc_POKEMON_DESK[] = _(
+ "Ein kleiner Tisch,\n"
+ "geformt wie ein\n"
+ "POKéBALL.");
+
+const u8 DecorDesc_HEAVY_DESK[] = _(
+ "Ein großer Tisch\n"
+ "aus Stahl. Für\n"
+ "Dekorationen.");
+
+const u8 DecorDesc_RAGGED_DESK[] = _(
+ "Ein großer Tisch\n"
+ "aus Holz. Für\n"
+ "Dekorationen.");
+
+const u8 DecorDesc_COMFORT_DESK[] = _(
+ "Ein riesiger Tisch\n"
+ "aus Blättern. Für\n"
+ "Dekorationen.");
+
+const u8 DecorDesc_PRETTY_DESK[] = _(
+ "Ein riesiger Tisch\n"
+ "aus Glas. Trägt\n"
+ "viele Dekorationen.");
+
+const u8 DecorDesc_BRICK_DESK[] = _(
+ "Ein riesiger Tisch\n"
+ "aus Backstein. Für\n"
+ "viele Dekorationen.");
+
+const u8 DecorDesc_CAMP_DESK[] = _(
+ "Ein riesiger Tisch\n"
+ "aus Baumstämmen.\n"
+ "Für Dekorationen.");
+
+const u8 DecorDesc_HARD_DESK[] = _(
+ "Ein riesiger Tisch\n"
+ "aus Stein. Trägt\n"
+ "viele Dekorationen.");
+
+const u8 DecorDesc_SMALL_CHAIR[] = _(
+ "Ein kleiner Stuhl\n"
+ "für eine Person.");
+
+const u8 DecorDesc_POKEMON_CHAIR[] = _(
+ "Ein kleiner Stuhl\n"
+ "in der Form eines\n"
+ "POKéBALLS.");
+
+const u8 DecorDesc_HEAVY_CHAIR[] = _(
+ "Ein kleiner Stuhl\n"
+ "aus Stahl.");
+
+const u8 DecorDesc_PRETTY_CHAIR[] = _(
+ "Ein kleiner Stuhl\n"
+ "aus Glas.");
+
+const u8 DecorDesc_COMFORT_CHAIR[] = _(
+ "Ein kleiner Stuhl\n"
+ "aus Blättern.");
+
+const u8 DecorDesc_RAGGED_CHAIR[] = _(
+ "Ein kleiner Stuhl\n"
+ "aus Holz.");
+
+const u8 DecorDesc_BRICK_CHAIR[] = _(
+ "Ein kleiner Stuhl\n"
+ "aus Backstein.");
+
+const u8 DecorDesc_CAMP_CHAIR[] = _(
+ "Ein kleiner Stuhl\n"
+ "aus Baumstämmen.");
+
+const u8 DecorDesc_HARD_CHAIR[] = _(
+ "Ein kleiner Stuhl\n"
+ "aus Stein.");
+
+const u8 DecorDesc_RED_PLANT[] = _(
+ "Eine leuchtend\n"
+ "rote Pflanze.");
+
+const u8 DecorDesc_TROPICAL_PLANT[] = _(
+ "Eine blühende,\n"
+ "tropische Pflanze\n"
+ "in einem Übertopf.");
+
+const u8 DecorDesc_PRETTY_FLOWERS[] = _(
+ "Ein Topf mit\n"
+ "hübschen Blumen.");
+
+const u8 DecorDesc_COLORFUL_PLANT[] = _(
+ "Ein großer Topf mit\n"
+ "vielen, farben-\n"
+ "prächtigen Blumen.");
+
+const u8 DecorDesc_BIG_PLANT[] = _(
+ "Eine große, schirm-\n"
+ "förmige Pflanze in\n"
+ "einem großen Topf.");
+
+const u8 DecorDesc_GORGEOUS_PLANT[] = _(
+ "Eine beeindruckend\n"
+ "große Pflanze in\n"
+ "einem großen Topf.");
+
+const u8 DecorDesc_RED_BRICK[] = _(
+ "Ein roter Back-\n"
+ "stein. Stelle Deko-\n"
+ "rationen darauf.");
+
+const u8 DecorDesc_YELLOW_BRICK[] = _(
+ "Ein gelber Back-\n"
+ "stein. Stelle Deko-\n"
+ "rationen darauf.");
+
+const u8 DecorDesc_BLUE_BRICK[] = _(
+ "Ein blauer Back-\n"
+ "stein. Stelle Deko-\n"
+ "rationen darauf.");
+
+const u8 DecorDesc_RED_BALLOON[] = _(
+ "Ein roter Ballon mit\n"
+ "Wasser. Platzt beim\n"
+ "Drauftreten.");
+
+const u8 DecorDesc_BLUE_BALLOON[] = _(
+ "Ein blauer Ballon\n"
+ "mit Wasser. Platzt\n"
+ "beim Drauftreten.");
+
+const u8 DecorDesc_YELLOW_BALLOON[] = _(
+ "Ein gelber Ballon\n"
+ "mit Wasser. Platzt\n"
+ "beim Drauftreten.");
+
+const u8 DecorDesc_RED_TENT[] = _(
+ "Ein großes, rotes\n"
+ "Zelt. Darin kann man\n"
+ "sich verstecken.");
+
+const u8 DecorDesc_BLUE_TENT[] = _(
+ "Ein großes, blaues\n"
+ "Zelt. Darin kann man\n"
+ "sich verstecken.");
+
+const u8 DecorDesc_SOLID_BOARD[] = _(
+ "Leg es über ein\n"
+ "Loch, um die andere\n"
+ "Seite zu erreichen.");
+
+const u8 DecorDesc_SLIDE[] = _(
+ "Nützlich, um von der\n"
+ "Plattform hinab-\n"
+ "gleiten zu können.");
+
+const u8 DecorDesc_FENCE_LENGTH[] = _(
+ "Ein kleiner Zaun,\n"
+ "der den Durchgang\n"
+ "versperrt.");
+
+const u8 DecorDesc_FENCE_WIDTH[] = _(
+ "Ein kleiner Zaun,\n"
+ "der den Durchgang\n"
+ "versperrt.");
+
+const u8 DecorDesc_TIRE[] = _(
+ "Ein großer, alter\n"
+ "Reifen. Für\n"
+ "Dekorationen.");
+
+const u8 DecorDesc_STAND[] = _(
+ "Ein Podest mit\n"
+ "Stufen.");
+
+const u8 DecorDesc_MUD_BALL[] = _(
+ "Ein großer Ball aus\n"
+ "Lehm. Geht kaputt\n"
+ "beim Drauftreten.");
+
+const u8 DecorDesc_BREAKABLE_DOOR[] = _(
+ "Eine verrückte Tür,\n"
+ "durch die man hin-\n"
+ "durchlaufen kann.");
+
+const u8 DecorDesc_SAND_ORNAMENT[] = _(
+ "Ein Ornament aus\n"
+ "Sand. Fällt bei\n"
+ "Kontakt zusammen.");
+
+const u8 DecorDesc_SILVER_SHIELD[] = _(
+ "Belohnung für\n"
+ "50 Siege in Folge im\n"
+ "DUELLTURM.");
+
+const u8 DecorDesc_GOLD_SHIELD[] = _(
+ "Belohnung für\n"
+ "100 Siege in Folge\n"
+ "im DUELLTURM.");
+
+const u8 DecorDesc_GLASS_ORNAMENT[] = _(
+ "Das Replikat einer\n"
+ "berühmten Skulptur\n"
+ "des KUNSTMUSEUMS.");
+
+const u8 DecorDesc_TV[] = _(
+ "Ein kleiner, grauer\n"
+ "Spielzeug-\n"
+ "Fernseher.");
+
+const u8 DecorDesc_ROUND_TV[] = _(
+ "Ein Spielzeug-\n"
+ "Fernseher in der\n"
+ "Form von SAMURZEL.");
+
+const u8 DecorDesc_CUTE_TV[] = _(
+ "Ein Spielzeug-\n"
+ "Fernseher in der\n"
+ "Form eines ENECO.");
+
+const u8 DecorDesc_GLITTER_MAT[] = _(
+ "Eine seltsame\n"
+ "Matte. Glitzert\n"
+ "beim Drauftreten.");
+
+const u8 DecorDesc_JUMP_MAT[] = _(
+ "Eine Trick-Matte,\n"
+ "die hüpft, wenn man\n"
+ "drauftritt.");
+
+const u8 DecorDesc_SPIN_MAT[] = _(
+ "Eine Trick-Matte,\n"
+ "die sich beim\n"
+ "Drauftreten dreht.");
+
+const u8 DecorDesc_C_LOW_NOTE_MAT[] = _(
+ "Eine Matte, die das\n"
+ "tiefe C spielt, wenn\n"
+ "man drauftritt.");
+
+const u8 DecorDesc_D_NOTE_MAT[] = _(
+ "Eine Matte, die\n"
+ "ein D spielt, wenn\n"
+ "man drauftritt.");
+
+const u8 DecorDesc_E_NOTE_MAT[] = _(
+ "Eine Matte, die\n"
+ "ein E spielt, wenn\n"
+ "man drauftritt.");
+
+const u8 DecorDesc_F_NOTE_MAT[] = _(
+ "Eine Matte, die\n"
+ "ein F spielt, wenn\n"
+ "man drauftritt.");
+
+const u8 DecorDesc_G_NOTE_MAT[] = _(
+ "Eine Matte, die\n"
+ "ein G spielt, wenn\n"
+ "man drauftritt.");
+
+const u8 DecorDesc_A_NOTE_MAT[] = _(
+ "Eine Matte, die\n"
+ "ein A spielt, wenn\n"
+ "man drauftritt.");
+
+const u8 DecorDesc_B_NOTE_MAT[] = _(
+ "Eine Matte, die\n"
+ "ein H spielt, wenn\n"
+ "man drauftritt.");
+
+const u8 DecorDesc_C_HIGH_NOTE_MAT[] = _(
+ "Eine Matte, die das\n"
+ "hohe C spielt, wenn\n"
+ "man drauftritt.");
+
+const u8 DecorDesc_SURF_MAT[] = _(
+ "Eine Matte mit\n"
+ "einem SURFER-\n"
+ "Muster. Für Items.");
+
+const u8 DecorDesc_THUNDER_MAT[] = _(
+ "Eine Matte mit\n"
+ "einem DONNER-\n"
+ "Muster. Für Items.");
+
+const u8 DecorDesc_FIRE_BLAST_MAT[] = _(
+ "Eine Matte mit\n"
+ "FEUERSTURM-\n"
+ "Muster. Für Items.");
+
+const u8 DecorDesc_POWDER_SNOW_MAT[] = _(
+ "Eine Matte mit\n"
+ "PULVERSCHNEE-\n"
+ "Muster. Für Items.");
+
+const u8 DecorDesc_ATTRACT_MAT[] = _(
+ "Eine Matte mit\n"
+ "ANZIEHUNG-\n"
+ "Muster. Für Items.");
+
+const u8 DecorDesc_FISSURE_MAT[] = _(
+ "Eine Matte mit\n"
+ "GEOFISSUR-\n"
+ "Muster. Für Items.");
+
+const u8 DecorDesc_SPIKES_MAT[] = _(
+ "Eine Matte mit\n"
+ "STACHLER-\n"
+ "Muster. Für Items.");
+
+const u8 DecorDesc_BALL_POSTER[] = _(
+ "Ein kleines Poster\n"
+ "von POKéBÄLLEN.");
+
+const u8 DecorDesc_GREEN_POSTER[] = _(
+ "Ein kleines Poster\n"
+ "von GECKARBOR.");
+
+const u8 DecorDesc_RED_POSTER[] = _(
+ "Ein kleines Poster\n"
+ "von FLEMMLI.");
+
+const u8 DecorDesc_BLUE_POSTER[] = _(
+ "Ein kleines Poster\n"
+ "von HYDROPI.");
+
+const u8 DecorDesc_CUTE_POSTER[] = _(
+ "Ein kleines Poster\n"
+ "von AZURILL.");
+
+const u8 DecorDesc_PIKA_POSTER[] = _(
+ "Ein großes Poster\n"
+ "von PIKACHU und\n"
+ "PICHU.");
+
+const u8 DecorDesc_LONG_POSTER[] = _(
+ "Ein großes Poster\n"
+ "von VIPITIS.");
+
+const u8 DecorDesc_SEA_POSTER[] = _(
+ "Ein großes Poster\n"
+ "von RELICANTH.");
+
+const u8 DecorDesc_SKY_POSTER[] = _(
+ "Ein großes Poster\n"
+ "von WINGULL.");
+
+const u8 DecorDesc_KISS_POSTER[] = _(
+ "Ein großes Poster\n"
+ "von KUSSILLA.");
+
+const u8 DecorDesc_PICHU_DOLL[] = _(
+ "PICHU-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_PIKACHU_DOLL[] = _(
+ "PIKACHU-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_MARILL_DOLL[] = _(
+ "MARILL-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_TOGEPI_DOLL[] = _(
+ "TOGEPI-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_CYNDAQUIL_DOLL[] = _(
+ "FEURIGEL-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_CHIKORITA_DOLL[] = _(
+ "ENDIVIE-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_TOTODILE_DOLL[] = _(
+ "KARNIMANI-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_JIGGLYPUFF_DOLL[] = _(
+ "PUMMELUFF-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_MEOWTH_DOLL[] = _(
+ "MAUZI-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_CLEFAIRY_DOLL[] = _(
+ "PIEPI-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_DITTO_DOLL[] = _(
+ "DITTO-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_SMOOCHUM_DOLL[] = _(
+ "KUSSILLA-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_TREECKO_DOLL[] = _(
+ "GECKARBOR-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_TORCHIC_DOLL[] = _(
+ "FLEMMLI-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_MUDKIP_DOLL[] = _(
+ "HYDROPI-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_DUSKULL_DOLL[] = _(
+ "ZWIRRLICHT-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_WYNAUT_DOLL[] = _(
+ "ISSO-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_BALTOY_DOLL[] = _(
+ "PUPPANCE-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_KECLEON_DOLL[] = _(
+ "KECLEON-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_AZURILL_DOLL[] = _(
+ "AZURILL-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_SKITTY_DOLL[] = _(
+ "ENECO-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_SWABLU_DOLL[] = _(
+ "WABLU-Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder einen Tisch.");
+
+const u8 DecorDesc_GULPIN_DOLL[] = _(
+ "SCHLUPPUCK-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_LOTAD_DOLL[] = _(
+ "LOTURZEL-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_SEEDOT_DOLL[] = _(
+ "SAMURZEL-Puppe.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_PIKA_CUSHION[] = _(
+ "PIKACHU-Kissen.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_ROUND_CUSHION[] = _(
+ "MARILL-Kissen.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_KISS_CUSHION[] = _(
+ "KUSSILLA-Kissen.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_ZIGZAG_CUSHION[] = _(
+ "ZIGZACHS-Kissen.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_SPIN_CUSHION[] = _(
+ "PANDIR-Kissen.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_DIAMOND_CUSHION[] = _(
+ "ZOBIRIS-Kissen.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_BALL_CUSHION[] = _(
+ "BALL-Kissen.\n"
+ "Für eine Matte oder\n"
+ "den Tisch.");
+
+const u8 DecorDesc_GRASS_CUSHION[] = _(
+ "Kissen mit Gras-\n"
+ "muster. Für\n"
+ "Matte oder Tisch.");
+
+const u8 DecorDesc_FIRE_CUSHION[] = _(
+ "Kissen mit Feuer-\n"
+ "muster. Für\n"
+ "Matte oder Tisch.");
+
+const u8 DecorDesc_WATER_CUSHION[] = _(
+ "Kissen mit Wasser-\n"
+ "muster. Für\n"
+ "Matte oder Tisch.");
+
+const u8 DecorDesc_SNORLAX_DOLL[] = _(
+ "Große Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder den Tisch.");
+
+const u8 DecorDesc_RHYDON_DOLL[] = _(
+ "Große Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder den Tisch.");
+
+const u8 DecorDesc_LAPRAS_DOLL[] = _(
+ "Große Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder den Tisch.");
+
+const u8 DecorDesc_VENUSAUR_DOLL[] = _(
+ "Große Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder den Tisch.");
+
+const u8 DecorDesc_CHARIZARD_DOLL[] = _(
+ "Große Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder den Tisch.");
+
+const u8 DecorDesc_BLASTOISE_DOLL[] = _(
+ "Große Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder den Tisch.");
+
+const u8 DecorDesc_WAILMER_DOLL[] = _(
+ "Große Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder den Tisch.");
+
+const u8 DecorDesc_REGIROCK_DOLL[] = _(
+ "Große Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder den Tisch.");
+
+const u8 DecorDesc_REGICE_DOLL[] = _(
+ "Große Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder den Tisch.");
+
+const u8 DecorDesc_REGISTEEL_DOLL[] = _(
+ "Große Puppe. Leg\n"
+ "sie auf eine Matte\n"
+ "oder den Tisch.");
+
+#define DECORNAME_SMALL_DESK _("KLEINER TISCH")
+#define DECORNAME_POKEMON_DESK _("POKéMONTISCH")
+#define DECORNAME_HEAVY_DESK _("SCHWERER TISCH")
+#define DECORNAME_RAGGED_DESK _("INTARSIENTISCH")
+#define DECORNAME_COMFORT_DESK _("NATURTISCH")
+#define DECORNAME_PRETTY_DESK _("EDLER TISCH")
+#define DECORNAME_BRICK_DESK _("BACKSTEINTISCH")
+#define DECORNAME_CAMP_DESK _("CAMPINGTISCH")
+#define DECORNAME_HARD_DESK _("MASSIVER TISCH")
+#define DECORNAME_SMALL_CHAIR _("KLEINER STUHL")
+#define DECORNAME_POKEMON_CHAIR _("POKéMON STUHL")
+#define DECORNAME_HEAVY_CHAIR _("SCHWERER STUHL")
+#define DECORNAME_PRETTY_CHAIR _("EDLER STUHL")
+#define DECORNAME_COMFORT_CHAIR _("NATURSTUHL")
+#define DECORNAME_RAGGED_CHAIR _("INTARSIENSTUHL")
+#define DECORNAME_BRICK_CHAIR _("BACKSTEINSTUHL")
+#define DECORNAME_CAMP_CHAIR _("CAMPINGSTUHL")
+#define DECORNAME_HARD_CHAIR _("MASSIVER STUHL")
+#define DECORNAME_RED_PLANT _("ROTE PFLANZE")
+#define DECORNAME_TROPICAL_PLANT _("TROPENPFLANZE")
+#define DECORNAME_PRETTY_FLOWERS _("HÜBSCHE BLUMEN")
+#define DECORNAME_COLORFUL_PLANT _("BUNTE PFLANZE")
+#define DECORNAME_BIG_PLANT _("GROSSE PFLANZE")
+#define DECORNAME_GORGEOUS_PLANT _("ZIERPFLANZE")
+#define DECORNAME_RED_BRICK _("ROTER STEIN")
+#define DECORNAME_YELLOW_BRICK _("GELBER STEIN")
+#define DECORNAME_BLUE_BRICK _("BLAUER STEIN")
+#define DECORNAME_RED_BALLOON _("ROTER BALLON")
+#define DECORNAME_BLUE_BALLOON _("BLAUER BALLON")
+#define DECORNAME_YELLOW_BALLOON _("GELBER BALLON")
+#define DECORNAME_RED_TENT _("ROTES ZELT")
+#define DECORNAME_BLUE_TENT _("BLAUES ZELT")
+#define DECORNAME_SOLID_BOARD _("SOLIDES BRETT")
+#define DECORNAME_SLIDE _("RUTSCHE")
+#define DECORNAME_FENCE_LENGTH _("ZAUN VERTIKAL")
+#define DECORNAME_FENCE_WIDTH _("ZAUN HORIZONTAL")
+#define DECORNAME_TIRE _("REIFEN")
+#define DECORNAME_STAND _("PODEST")
+#define DECORNAME_MUD_BALL _("LEHMBALL")
+#define DECORNAME_BREAKABLE_DOOR _("BRECHBARE TÜR")
+#define DECORNAME_SAND_ORNAMENT _("SANDORNAMENT")
+#define DECORNAME_SILVER_SHIELD _("SILBERSCHILD")
+#define DECORNAME_GOLD_SHIELD _("GOLDSCHILD")
+#define DECORNAME_GLASS_ORNAMENT _("GLASORNAMENT")
+#define DECORNAME_TV _("FERNSEHER")
+#define DECORNAME_ROUND_TV _("RUNDER TV")
+#define DECORNAME_CUTE_TV _("HÜBSCHER TV")
+#define DECORNAME_GLITTER_MAT _("GLITZER-MATTE")
+#define DECORNAME_JUMP_MAT _("SPRUNG-MATTE")
+#define DECORNAME_SPIN_MAT _("DREH-MATTE")
+#define DECORNAME_C_LOW_NOTE_MAT _("Tiefes C-MATTE")
+#define DECORNAME_D_NOTE_MAT _("D-MATTE")
+#define DECORNAME_E_NOTE_MAT _("E-MATTE")
+#define DECORNAME_F_NOTE_MAT _("F-MATTE")
+#define DECORNAME_G_NOTE_MAT _("G-MATTE")
+#define DECORNAME_A_NOTE_MAT _("A-MATTE")
+#define DECORNAME_B_NOTE_MAT _("H-MATTE")
+#define DECORNAME_C_HIGH_NOTE_MAT _("Hohes C-MATTE")
+#define DECORNAME_SURF_MAT _("SURFER-MATTE")
+#define DECORNAME_THUNDER_MAT _("DONNER-MATTE")
+#define DECORNAME_FIRE_BLAST_MAT _("FEUER-MATTE")
+#define DECORNAME_POWDER_SNOW_MAT _("SCHNEE-MATTE")
+#define DECORNAME_ATTRACT_MAT _("ANZIEHUNG-MAT.")
+#define DECORNAME_FISSURE_MAT _("GEOFISSUR-MAT.")
+#define DECORNAME_SPIKES_MAT _("STACHLER-MATTE")
+#define DECORNAME_BALL_POSTER _("BALLPOSTER")
+#define DECORNAME_GREEN_POSTER _("GRÜNES POSTER")
+#define DECORNAME_RED_POSTER _("ROTES POSTER")
+#define DECORNAME_BLUE_POSTER _("BLAUES POSTER")
+#define DECORNAME_CUTE_POSTER _("HÜBSCHES POSTER")
+#define DECORNAME_PIKA_POSTER _("PICHUKA-POSTER")
+#define DECORNAME_LONG_POSTER _("SCHLANG-POSTER")
+#define DECORNAME_SEA_POSTER _("MEER-POSTER")
+#define DECORNAME_SKY_POSTER _("HIMMEL-POSTER")
+#define DECORNAME_KISS_POSTER _("KUSS-POSTER")
+#define DECORNAME_PICHU_DOLL _("PICHU-PUPPE")
+#define DECORNAME_PIKACHU_DOLL _("PIKACHU-PUPPE")
+#define DECORNAME_MARILL_DOLL _("MARILL-PUPPE")
+#define DECORNAME_TOGEPI_DOLL _("TOGEPI-PUPPE")
+#define DECORNAME_CYNDAQUIL_DOLL _("FEURIGEL-PUPPE")
+#define DECORNAME_CHIKORITA_DOLL _("ENDIVIE-PUPPE")
+#define DECORNAME_TOTODILE_DOLL _("KARNIMANIPUPPE")
+#define DECORNAME_JIGGLYPUFF_DOLL _("PUMMELUFFPUPPE")
+#define DECORNAME_MEOWTH_DOLL _("MAUZI-PUPPE")
+#define DECORNAME_CLEFAIRY_DOLL _("PIEPI-PUPPE")
+#define DECORNAME_DITTO_DOLL _("DITTO-PUPPE")
+#define DECORNAME_SMOOCHUM_DOLL _("KUSSILLA-PUPPE")
+#define DECORNAME_TREECKO_DOLL _("GECKARBOR-PUPP.")
+#define DECORNAME_TORCHIC_DOLL _("FLEMMLI-PUPPE")
+#define DECORNAME_MUDKIP_DOLL _("HYDROPI-PUPPE")
+#define DECORNAME_DUSKULL_DOLL _("ZWIRRLICHTPUP.")
+#define DECORNAME_WYNAUT_DOLL _("ISSO-PUPPE")
+#define DECORNAME_BALTOY_DOLL _("PUPPANCE-PUPPE")
+#define DECORNAME_KECLEON_DOLL _("KECLEON-PUPPE")
+#define DECORNAME_AZURILL_DOLL _("AZURILL-PUPPE")
+#define DECORNAME_SKITTY_DOLL _("ENECO-PUPPE")
+#define DECORNAME_SWABLU_DOLL _("WABLU-PUPPE")
+#define DECORNAME_GULPIN_DOLL _("SCHLUPPUCKPUP.")
+#define DECORNAME_LOTAD_DOLL _("LOTURZEL-PUPPE")
+#define DECORNAME_SEEDOT_DOLL _("SAMURZEL-PUPPE")
+#define DECORNAME_PIKA_CUSHION _("PIKA-KISSEN")
+#define DECORNAME_ROUND_CUSHION _("RUNDES KISSEN")
+#define DECORNAME_KISS_CUSHION _("KUSS-KISSEN")
+#define DECORNAME_ZIGZAG_CUSHION _("ZIGZACHS-KISS.")
+#define DECORNAME_SPIN_CUSHION _("KREISEL-KISSEN")
+#define DECORNAME_DIAMOND_CUSHION _("DIAMANT-KISSEN")
+#define DECORNAME_BALL_CUSHION _("BALL-KISSEN")
+#define DECORNAME_GRASS_CUSHION _("PFLANZEN-KISS.")
+#define DECORNAME_FIRE_CUSHION _("FEUER-KISSEN")
+#define DECORNAME_WATER_CUSHION _("WASSER-KISSEN")
+#define DECORNAME_SNORLAX_DOLL _("RELAXO-PUPPE")
+#define DECORNAME_RHYDON_DOLL _("RIZEROS-PUPPE")
+#define DECORNAME_LAPRAS_DOLL _("LAPRAS-PUPPE")
+#define DECORNAME_VENUSAUR_DOLL _("BISAFLOR-PUPPE")
+#define DECORNAME_CHARIZARD_DOLL _("GLURAK-PUPPE")
+#define DECORNAME_BLASTOISE_DOLL _("TURTOK-PUPPE")
+#define DECORNAME_WAILMER_DOLL _("WAILMER-PUPPE")
+#define DECORNAME_REGIROCK_DOLL _("REGIROCK-PUPPE")
+#define DECORNAME_REGICE_DOLL _("REGICE-PUPPE")
+#define DECORNAME_REGISTEEL_DOLL _("REGISTEEL-PUPP.")
diff --git a/src/data/pokedex_entries_de.h b/src/data/pokedex_entries_de.h
new file mode 100644
index 000000000..38263ec6e
--- /dev/null
+++ b/src/data/pokedex_entries_de.h
@@ -0,0 +1,7955 @@
+static const u8 DexDescription_Dummy_1[] = _(
+ "Dieses POKéMON wurde erst vor kurzem \n"
+ "entdeckt und wird noch erforscht.");
+static const u8 DexDescription_Dummy_2[] = _(
+ "Zur Zeit sind keine genauen\n"
+ "Informationen über dieses\n"
+ "POKéMON vorhanden.");
+
+static const u8 DexDescription_Bisasam_1[] = _(
+ "BISASAM macht gern einmal ein\n"
+ "Nickerchen im Sonnenschein.\n"
+ "Auf seinem Rücken trägt es einen Samen.");
+static const u8 DexDescription_Bisasam_2[] = _(
+ "Indem es Sonnenstrahlen aufsaugt,\n"
+ "wird der Samen zunehmend größer.");
+
+static const u8 DexDescription_Bisaknosp_1[] = _(
+ "BISAKNOSP hat eine Knospe auf seinem\n"
+ "Rücken. Beine und Rumpf sind kräftig\n"
+ "genug, um sein Gewicht zu tragen.");
+static const u8 DexDescription_Bisaknosp_2[] = _(
+ "Wenn es lange in der Sonne liegt, ist das\n"
+ "ein Anzeichen dafür, dass die Knospe\n"
+ "bald blüht.");
+
+static const u8 DexDescription_Bisaflor_1[] = _(
+ "BISAFLOR hat eine Blume auf seinem\n"
+ "Rücken. Wenn sie viel Nahrung und Sonne\n"
+ "aufnimmt, verfärbt sie sich bunt.");
+static const u8 DexDescription_Bisaflor_2[] = _(
+ "Der Duft der Blume mildert die Emotionen\n"
+ "der Menschen.");
+
+static const u8 DexDescription_Glumanda_1[] = _(
+ "Die Flamme auf seiner Schweifspitze\n"
+ "zeigt seine Gefühlslage an. Sie\n"
+ "flackert, wenn GLUMANDA zufrieden ist.");
+static const u8 DexDescription_Glumanda_2[] = _(
+ "Wenn dieses POKéMON wütend wird, lodert\n"
+ "die Flamme gewaltig.");
+
+static const u8 DexDescription_Glutexo_1[] = _(
+ "Gnadenlos besiegt GLUTEXO seine Geg-\n"
+ "ner mit seinen scharfen Klauen. Wenn es \n"
+ "auf starke Gegner trifft, wird es");
+static const u8 DexDescription_Glutexo_2[] = _(
+ "wütend und die Flamme auf seiner\n"
+ "Schweifspitze flackert in einem\n"
+ "bläulichen Ton.");
+
+static const u8 DexDescription_Glurak_1[] = _(
+ "GLURAK fliegt durch die Lüfte, um\n"
+ "starke Gegner aufzuspüren. Sein heißer\n"
+ "Feueratem bringt alles zum Schmelzen.");
+static const u8 DexDescription_Glurak_2[] = _(
+ "Aber es richtet seinen Feueratem nie\n"
+ "auf schwächere Gegner.");
+
+static const u8 DexDescription_Schiggy_1[] = _(
+ "SCHIGGYs Panzer dient nicht nur zum\n"
+ "Schutz. Die runde Form und die Furchen\n"
+ "auf der Oberfläche verringern den");
+static const u8 DexDescription_Schiggy_2[] = _(
+ "Widerstand im Wasser, so dass dieses\n"
+ "POKéMON sehr schnell schwimmen kann.");
+
+static const u8 DexDescription_Schillok_1[] = _(
+ "SCHILLOK hat einen langen, buschigen\n"
+ "Schweif, dessen Farbe intensiver wird,\n"
+ "wenn es altert.");
+static const u8 DexDescription_Schillok_2[] = _(
+ "Die Kratzer auf seinem Panzer zeugen\n"
+ "von seiner Kampfkraft.");
+
+static const u8 DexDescription_Turtok_1[] = _(
+ "TURTOK besitzt Wasserdüsen, die aus\n"
+ "seinem Panzer herausragen. Diese sind\n"
+ "sehr präzise.");
+static const u8 DexDescription_Turtok_2[] = _(
+ "Es kann Wassergeschosse so genau\n"
+ "verschießen, dass es damit aus fast\n"
+ "50 Metern leere Dosen trifft.");
+
+static const u8 DexDescription_Raupy_1[] = _(
+ "RAUPY ist sehr gefräßig, es kann\n"
+ "Blätter verschlingen, die größer sind\n"
+ "als es selbst.");
+static const u8 DexDescription_Raupy_2[] = _(
+ "Seine Antennen sondern einen\n"
+ "übel riechenden Gestank ab.");
+
+static const u8 DexDescription_Safcon_1[] = _(
+ "Der Panzer dieses POKéMON ist hart wie\n"
+ "Stahl. SAFCON bewegt sich kaum,");
+static const u8 DexDescription_Safcon_2[] = _(
+ "da es das weiche Innere unter seiner\n"
+ "harten Schale auf seine Entwicklung \n"
+ "vorbereitet.");
+
+static const u8 DexDescription_Smettbo_1[] = _(
+ "SMETTBOs größte Fähigkeit ist das Auf-\n"
+ "spüren köstlichen Blütenhonigs.");
+static const u8 DexDescription_Smettbo_2[] = _(
+ "Es findet sogar Honig in Blumen, die\n"
+ "fast 10 km von seinem Nest entfernt\n"
+ "blühen.");
+
+static const u8 DexDescription_Hornliu_1[] = _(
+ "HORNLIU verfügt über einen ausge-\n"
+ "zeichneten Geruchssinn. So kann es\n"
+ "seine Lieblingsblätter von denen");
+static const u8 DexDescription_Hornliu_2[] = _(
+ "unterscheiden, die es nicht mag, indem\n"
+ "es mit seiner großen roten Nase daran\n"
+ "schnuppert.");
+
+static const u8 DexDescription_Kokuna_1[] = _(
+ "KOKUNA bewegt sich kaum, wenn es an\n"
+ "einem Baum haftet. In seinem Inneren\n"
+ "jedoch regt sich einiges, da es sich auf");
+static const u8 DexDescription_Kokuna_2[] = _(
+ "seine bevorstehende Entwicklung vor-\n"
+ "bereitet. Dabei wird seine Schale sehr\n"
+ "heiß.");
+
+static const u8 DexDescription_Bibor_1[] = _(
+ "BIBOR sind sehr wehrhaft. Es sollte sich\n"
+ "besser niemand ihrem Nest nähern.");
+static const u8 DexDescription_Bibor_2[] = _(
+ "Wenn man sie ärgert, greifen sie in\n"
+ "Schwärmen an.");
+
+static const u8 DexDescription_Taubsi_1[] = _(
+ "TAUBSI verfügt über einen sehr ge-\n"
+ "schulten Orientierungssinn. Es kehrt \n"
+ "zielsicher zu seinem Nest zurück,");
+static const u8 DexDescription_Taubsi_2[] = _(
+ "egal, wie weit es sich von seiner\n"
+ "gewohnten Umgebung entfernt hat.");
+
+static const u8 DexDescription_Tauboga_1[] = _(
+ "TAUBOGA nennt ein großes Gebiet sein\n"
+ "Eigen. Es fliegt umher und kontrolliert\n"
+ "seinen Lebensraum.");
+static const u8 DexDescription_Tauboga_2[] = _(
+ "Wenn jemand sein Gebiet betritt, zeigt\n"
+ "es keine Gnade und greift seine Gegner\n"
+ "mit seinen scharfen Krallen an.");
+
+static const u8 DexDescription_Tauboss_1[] = _(
+ "Dieses POKéMON hat ein wunderschönes, \n"
+ "glänzendes Gefieder.\n"
+ "Viele TRAINER sind von der auffälligen");
+static const u8 DexDescription_Tauboss_2[] = _(
+ "Schönheit seines Federkleids begeis-\n"
+ "tert, so dass sie TAUBOSS als ihr\n"
+ "POKéMON wählen.");
+
+static const u8 DexDescription_Rattfratz_1[] = _(
+ "RATTFRATZ ist extrem vorsichtig. Sogar\n"
+ "im Schlaf nimmt es alles wahr, indem es\n"
+ "seine Ohren bewegt.");
+static const u8 DexDescription_Rattfratz_2[] = _(
+ "Es stellt keine großen Ansprüche an\n"
+ "seinen Lebensraum und richtet sein\n"
+ "Nest überall ein.");
+
+static const u8 DexDescription_Rattikarl_1[] = _(
+ "RATTIKARLs kräftige Zähne wachsen\n"
+ "ständig. Deshalb nagt es unablässig\n"
+ "Steine und Baumstämme an,");
+static const u8 DexDescription_Rattikarl_2[] = _(
+ "um sie abzuwetzen. Manchmal knabbert\n"
+ "es sogar Hauswände an.");
+
+static const u8 DexDescription_Habitak_1[] = _(
+ "HABITAK kann einen sehr lauten Schrei\n"
+ "ausstoßen, den man über die Entfernung\n"
+ "von 1 km vernehmen kann.");
+static const u8 DexDescription_Habitak_2[] = _(
+ "Durch das Echo seiner hohen, wehklagen-\n"
+ "den Schreie warnt dieses POKéMON seine\n"
+ "Artgenossen vor drohender Gefahr.");
+
+static const u8 DexDescription_Ibitak_1[] = _(
+ "IBITAK erkennt man an seinem langen \n"
+ "Hals und Schnabel. \n"
+ "Er ist hervorragend dafür geeignet,");
+static const u8 DexDescription_Ibitak_2[] = _(
+ "im Erdreich oder im Wasser Beute zu\n"
+ "jagen. Es setzt seinen langen, dünnen\n"
+ "Schnabel dabei sehr geschickt ein.");
+
+static const u8 DexDescription_Rettan_1[] = _(
+ "RETTAN rollt sich zu einer Spirale zu-\n"
+ "sammen, wenn es sich ausruht.\n"
+ "Aus dieser Haltung kann es blitzschnell");
+static const u8 DexDescription_Rettan_2[] = _(
+ "auf Bedrohungen aus allen Richtungen\n"
+ "reagieren, indem es seinen Kopf hebt.");
+
+static const u8 DexDescription_Arbok_1[] = _(
+ "Dieses POKéMON ist unheimlich stark. Es\n"
+ "kann seine Beute mit seinem Körper um-\n"
+ "wickeln und sogar Ölfässer zerdrücken.");
+static const u8 DexDescription_Arbok_2[] = _(
+ "Wenn ARBOK einen Gegner umwickelt, ist\n"
+ "es unmöglich, seinem Würgegriff zu ent-\n"
+ "kommen.");
+
+static const u8 DexDescription_Pikachu_1[] = _(
+ "Immer wenn PIKACHU auf etwas Neues\n"
+ "stößt, jagt es einen Elektroschock \n"
+ "hindurch.");
+static const u8 DexDescription_Pikachu_2[] = _(
+ "Wenn du eine verkohlte Beere findest,\n"
+ "hat dieses POKéMON seine elektrische\n"
+ "Ladung falsch eingeschätzt.");
+
+static const u8 DexDescription_Raichu_1[] = _(
+ "Wenn seine elektrische Ladung zu groß\n"
+ "wird, entlädt RAICHU seine Energie ins\n"
+ "Erdreich.");
+static const u8 DexDescription_Raichu_2[] = _(
+ "Neben dem Nest dieses POKéMON findet\n"
+ "man häufig versengtes Erdreich.");
+
+static const u8 DexDescription_Sandan_1[] = _(
+ "SANDANs Körper kann sehr viel Wasser\n"
+ "aufnehmen, so dass es auch in der\n"
+ "Wüste überleben kann.");
+static const u8 DexDescription_Sandan_2[] = _(
+ "Dieses POKéMON rollt sich zusammen, um\n"
+ "sich vor Feinden zu schützen.");
+
+static const u8 DexDescription_Sandamer_1[] = _(
+ "SANDAMERs Körper ist übersät\n"
+ "mit spitzen Stacheln, die eigentlich\n"
+ "Hauthärtungen darstellen.");
+static const u8 DexDescription_Sandamer_2[] = _(
+ "Einmal im Jahr fallen die alten Stacheln\n"
+ "aus und werden durch neue ersetzt.");
+
+static const u8 DexDescription_NidoranF_1[] = _(
+ "NIDORAN besitzt Widerhaken, die ein\n"
+ "starkes Gift ausstoßen. Sie sind ver-\n"
+ "mutlich zum Schutz dieses");
+static const u8 DexDescription_NidoranF_2[] = _(
+ "schmächtigen POKéMON entstanden.\n"
+ "Wenn es wütend wird, stößt es ein\n"
+ "gefährliches Gift aus seinem Horn aus.");
+
+static const u8 DexDescription_Nidorina_1[] = _(
+ "Wenn NIDORINA mit seinen Freunden oder\n"
+ "seiner Familie zusammen ist, zieht\n"
+ "es seine Widerhaken ein, damit es");
+static const u8 DexDescription_Nidorina_2[] = _(
+ "niemanden verletzt. Dieses\n"
+ "POKéMON wird nervös, wenn man es\n"
+ "von seinen Artgenossen trennt.");
+
+static const u8 DexDescription_Nidoqueen_1[] = _(
+ "NIDOQUEENs Körper ist mit sehr harten\n"
+ "Schuppen bedeckt. Es ist sehr ge-\n"
+ "schickt darin, Gegner mit starken");
+static const u8 DexDescription_Nidoqueen_2[] = _(
+ "Attacken wegzuschleudern.\n"
+ "Dieses POKéMON entwickelt am meisten\n"
+ "Kraft, wenn es seine Jungen verteidigt.");
+
+static const u8 DexDescription_NidoranM_1[] = _(
+ "Das männliche NIDORAN hat Muskeln ent-\n"
+ "wickelt, um seine Ohren bewegen zu kön-\n"
+ "nen. Dadurch kann es sie in jede beliebi-");
+static const u8 DexDescription_NidoranM_2[] = _(
+ "ge Richtung drehen. Diesem POKéMON \n"
+ "entgeht nicht einmal das leiseste Ge-\n"
+ "räusch.");
+
+static const u8 DexDescription_Nidorino_1[] = _(
+ "NIDORINO besitzt ein Horn, das sogar\n"
+ "härter ist als ein Diamant. Wenn es\n"
+ "einen Feind wahrnimmt, stellen sich");
+static const u8 DexDescription_Nidorino_2[] = _(
+ "all die Widerhaken auf seinem Rücken\n"
+ "auf und es schlägt den Gegner mit aller\n"
+ "Kraft in die Flucht.");
+
+static const u8 DexDescription_Nidoking_1[] = _(
+ "NIDOKINGs Schweif ist enorm stark. Mit\n"
+ "einer Bewegung kann es einen metalle-\n"
+ "nen Sendemast zum Einsturz bringen.");
+static const u8 DexDescription_Nidoking_2[] = _(
+ "Wenn es in Rage gerät, ist es nur schwer\n"
+ "aufzuhalten.");
+
+static const u8 DexDescription_Piepi_1[] = _(
+ "In Vollmondnächten sammeln sich einige\n"
+ "dieser POKéMON, um zu spielen. Wird es \n"
+ "Tag, kehrt PIEPI zu seinem Zufluchts-");
+static const u8 DexDescription_Piepi_2[] = _(
+ "ort in den Bergen zurück und\n"
+ "schläft eingekuschelt neben\n"
+ "seinen Artgenossen ein.");
+
+static const u8 DexDescription_Pixi_1[] = _(
+ "PIXI bewegt sich fort, indem es leicht\n"
+ "mit den Flügeln schlägt. Durch seinen\n"
+ "federnden Gang kann es sogar über");
+static const u8 DexDescription_Pixi_2[] = _(
+ "Wasser gehen. Bei Mondschein \n"
+ "unternimmt es Spaziergänge auf Seen.");
+
+static const u8 DexDescription_Vulpix_1[] = _(
+ "VULPIX kommt mit einem weißen Schweif\n"
+ "zur Welt. Dieser teilt sich sechsfach, \n"
+ "wenn das POKéMON von seinem TRAINER");
+static const u8 DexDescription_Vulpix_2[] = _(
+ "viel Zuneigung bekommt.\n"
+ "Seine sechs Schweife kräuseln sich\n"
+ "schließlich.");
+
+static const u8 DexDescription_Vulnona_1[] = _(
+ "VULNONA sendet einen unheimlichen\n"
+ "Lichtstrahl aus seinen hellroten Augen\n"
+ "aus, um totale Kontrolle über die");
+static const u8 DexDescription_Vulnona_2[] = _(
+ "Gedanken seines Gegners zu erlangen.\n"
+ "Man sagt, dieses POKéMON könne 1000\n"
+ "Jahre leben.");
+
+static const u8 DexDescription_Pummeluff_1[] = _(
+ "PUMMELUFFs Stimmbänder können die\n"
+ "Tonlage seiner Stimme beliebig vari-\n"
+ "ieren. Dieses POKéMON benutzt diese");
+static const u8 DexDescription_Pummeluff_2[] = _(
+ "Fähigkeit, um seine Gegner mit monoto-\n"
+ "nem Gesang in Tiefschlaf zu versetzen.");
+
+static const u8 DexDescription_Knuddeluff_1[] = _(
+ "KNUDDELUFF hat handtellergroße Augen,\n"
+ "die immer mit Tränenflüssigkeit bedeckt\n"
+ "sind. Gerät Staub in die Augen dieses");
+static const u8 DexDescription_Knuddeluff_2[] = _(
+ "POKéMON, so wird dieser sofort ausge-\n"
+ "spült.");
+
+static const u8 DexDescription_Zubat_1[] = _(
+ "Tagsüber bleibt ZUBAT an einem dunklen\n"
+ "Ort und bewegt sich kaum. Wenn es dem \n"
+ "Sonnenlicht längere Zeit ausgesetzt");
+static const u8 DexDescription_Zubat_2[] = _(
+ "wird, zieht es sich Verbrennungen an\n"
+ "seinem Körper zu.");
+
+static const u8 DexDescription_Golbat_1[] = _(
+ "GOLBAT hat es auf das Blut von Lebe-\n"
+ "wesen abgesehen. Im Schutze der Nacht\n"
+ "wird es besonders aktiv.");
+static const u8 DexDescription_Golbat_2[] = _(
+ "Dieses POKéMON fliegt durch die\n"
+ "Nacht, um nach frischem Blut zu\n"
+ "suchen.");
+
+static const u8 DexDescription_Myrapla_1[] = _(
+ "Am Tage vergräbt sich MYRAPLA im Boden,\n"
+ "um mit seinem ganzen Körper Nahrung\n"
+ "aufzunehmen.");
+static const u8 DexDescription_Myrapla_2[] = _(
+ "Je fruchtbarer der Boden ist, desto\n"
+ "glänzender werden seine Blätter.");
+
+static const u8 DexDescription_Duflor_1[] = _(
+ "DUFLOR produziert einen Ekel\n"
+ "erregenden Gestank aus dem Stempel\n"
+ "seiner Blume. Wenn es in Gefahr gerät,");
+static const u8 DexDescription_Duflor_2[] = _(
+ "wird der Gestank noch unerträglicher. \n"
+ "Wenn sich dieses POKéMON in Sicherheit\n"
+ "befindet, stößt es keinen Gestank aus.");
+
+static const u8 DexDescription_Giflor_1[] = _(
+ "GIFLORs giftige Pollen rufen böse\n"
+ "allergische Anfälle hervor. Deshalb ist\n"
+ "es ratsam, sich keiner schönen Blume im");
+static const u8 DexDescription_Giflor_2[] = _(
+ "Dschungel zu nähern, so anziehend sie\n"
+ "auch sein mag.");
+
+static const u8 DexDescription_Paras_1[] = _(
+ "Auf PARAS’ Rücken wachsen parasitäre\n"
+ "Pilze, die Tochukaso genannt werden.\n"
+ "Sie wachsen, indem sie dem");
+static const u8 DexDescription_Paras_2[] = _(
+ "KÄFER/PFLANZEN-PKMN Nährstoffe\n"
+ "entziehen. Sie sind sehr wertvoll als\n"
+ "lebensverlängernde Medizin.");
+
+static const u8 DexDescription_Parasek_1[] = _(
+ "PARASEK sucht große Bäume heim und\n"
+ "entzieht Nährstoffe aus Stamm und \n"
+ "Wurzeln.");
+static const u8 DexDescription_Parasek_2[] = _(
+ "Wenn ein befallener Baum stirbt, sucht\n"
+ "es sich zusammen mit seinen Artge-\n"
+ "nossen einen neuen Wirt.");
+
+static const u8 DexDescription_Bluzuk_1[] = _(
+ "BLUZUK hat einen Pelz aus dünnen\n"
+ "Borsten entwickelt, der dem Schutz\n"
+ "seines Körpers dient.");
+static const u8 DexDescription_Bluzuk_2[] = _(
+ "Es hat große Augen, denen auch winzig\n"
+ "kleine Beute nicht entgeht.");
+
+static const u8 DexDescription_Omot_1[] = _(
+ "OMOT ist ein nachtaktives POKéMON.\n"
+ "Kleine Insekten, die vom Licht in der\n"
+ "Dunkelheit angezogen Straßenlaternen");
+static const u8 DexDescription_Omot_2[] = _(
+ "umschwärmen, sind seine bevorzugte\n"
+ "Beute.");
+
+static const u8 DexDescription_Digda_1[] = _(
+ "DIGDA wird zumeist auf Farmen\n"
+ "gezüchtet. Denn wo auch immer dieses\n"
+ "POKéMON zu graben beginnt, hinterlässt");
+static const u8 DexDescription_Digda_2[] = _(
+ "es Erde, die für das Anpflanzen von\n"
+ "Feldfrüchten perfekt geeignet und für\n"
+ "den Anbau köstlichen Gemüses ideal ist.");
+
+static const u8 DexDescription_Digdri_1[] = _(
+ "DIGDRI sind Drillinge, die aus einem\n"
+ "Körper entstanden sind. Daher denken\n"
+ "alle Köpfe gleich.");
+static const u8 DexDescription_Digdri_2[] = _(
+ "Sie arbeiten so gut zusammen, dass sie \n"
+ "endlos graben können.");
+
+static const u8 DexDescription_Mauzi_1[] = _(
+ "MAUZI zieht seine scharfen Krallen ein,\n"
+ "um umherschleichen zu können, ohne\n"
+ "verräterische Spuren zu hinterlassen.");
+static const u8 DexDescription_Mauzi_2[] = _(
+ "Dieses POKéMON hat eine Vorliebe für\n"
+ "Münzen, die im Licht glitzern.");
+
+static const u8 DexDescription_Snobilikat_1[] = _(
+ "SNOBILIKAT hat sechs dicke Schnurr-\n"
+ "haare, wodurch es Furcht einflößend\n"
+ "wirkt. Durch diese nimmt es wahr, wenn");
+static const u8 DexDescription_Snobilikat_2[] = _(
+ "sich etwas in seiner Nähe bewegt. Es\n"
+ "wird sehr zutraulich, wenn man es an den\n"
+ "Schnurrhaaren berührt.");
+
+static const u8 DexDescription_Enton_1[] = _(
+ "ENTON verwendet eine geheimnisvolle\n"
+ "Kraft. Dabei erzeugt es Gehirnströme,\n"
+ "die man sonst nur von Schlafenden");
+static const u8 DexDescription_Enton_2[] = _(
+ "kennt. Diese Entdeckung führte zu \n"
+ "einer umstrittenen Diskussion unter\n"
+ "Wissenschaftlern.");
+
+static const u8 DexDescription_Entoron_1[] = _(
+ "Die schwimmhäutigen Flossen an seinen\n"
+ "Vorder- und Hinterbeinen und der \n"
+ "stromlinienförmige Körper machen");
+static const u8 DexDescription_Entoron_2[] = _(
+ "ENTORON unheimlich schnell. Dieses\n"
+ "POKéMON ist auf jeden Fall schneller als\n"
+ "die meisten Hochleistungsschwimmer.");
+
+static const u8 DexDescription_Menki_1[] = _(
+ "Wenn MENKI sich schüttelt und schwer\n"
+ "durch die Nase atmet, dann ist es \n"
+ "wütend. Da es blitzartig in Raserei");
+static const u8 DexDescription_Menki_2[] = _(
+ "gerät, ist es unmöglich seinem Zorn\n"
+ "zu entkommen.");
+
+static const u8 DexDescription_Rasaff_1[] = _(
+ "Wenn RASAFF wütend ist, wird seine Blut-\n"
+ "zirkulation gesteigert und seine Mus-\n"
+ "keln werden noch stärker.");
+static const u8 DexDescription_Rasaff_2[] = _(
+ "Allerdings mindert das auch die \n"
+ "Fähigkeit zum logischen Denken.");
+
+static const u8 DexDescription_Fukano_1[] = _(
+ "FUKANO hat einen ausgezeichneten Ge-\n"
+ "ruchssinn. Wenn dieses POKéMON ein-\n"
+ "mal einen Geruch wahrgenommen hat,");
+static const u8 DexDescription_Fukano_2[] = _(
+ "vergisst es ihn nicht mehr. Es benutzt\n"
+ "diese Fähigkeit dazu, die Gefühlslage\n"
+ "von Lebewesen auszuloten.");
+
+static const u8 DexDescription_Arkani_1[] = _(
+ "ARKANI ist sehr schnell. Es kann an\n"
+ "einem Tag fast 10.000 km zurücklegen.\n"
+ "Das Feuer, das im Innern dieses POKéMON");
+static const u8 DexDescription_Arkani_2[] = _(
+ "lodert, dient ihm als Energiequelle.");
+
+static const u8 DexDescription_Quapsel_1[] = _(
+ "QUAPSEL hat eine sehr dünne Haut.\n"
+ "Durch sie hindurch kann man sogar sein\n"
+ "spiralförmiges Inneres sehen.");
+static const u8 DexDescription_Quapsel_2[] = _(
+ "Obwohl seine Haut so dünn ist, ist sie\n"
+ "sehr elastisch. Selbst scharfe Reiß-\n"
+ "zähne können sie nicht durchdringen.");
+
+static const u8 DexDescription_Quaputzi_1[] = _(
+ "QUAPUTZIs Körper ist immer feucht und\n"
+ "glitschig. Dadurch kann es während\n"
+ "eines Kampfes leicht der Umklammerung");
+static const u8 DexDescription_Quaputzi_2[] = _(
+ "eines Gegners entkommen.");
+
+static const u8 DexDescription_Quappo_1[] = _(
+ "QUAPPO besitzt hochentwickelte, starke\n"
+ "Muskeln, die niemals ermüden, egal, wie\n"
+ "sehr es sie auch beansprucht.");
+static const u8 DexDescription_Quappo_2[] = _(
+ "Es ist so kräftig, dass es mühelos den\n"
+ "Pazifik durchschwimmen kann.");
+
+static const u8 DexDescription_Abra_1[] = _(
+ "ABRA schläft 18 Stunden am Tag.\n"
+ "Es nimmt die Gegenwart von Feinden\n"
+ "aber auch im Schlaf wahr.");
+static const u8 DexDescription_Abra_2[] = _(
+ "In einer solchen Situation bringt es\n"
+ "sich umgehend mit TELEPORT in\n"
+ "Sicherheit.");
+
+static const u8 DexDescription_Kadabra_1[] = _(
+ "KADABRA sendet Alphawellen aus, wenn es\n"
+ "Kopfschmerzen hat. Nur wer eine beson-\n"
+ "ders starke Psyche hat, kann");
+static const u8 DexDescription_Kadabra_2[] = _(
+ "dieses POKéMON unter seine Fittiche\n"
+ "nehmen.");
+
+static const u8 DexDescription_Simsala_1[] = _(
+ "SIMSALAs Gehirn hört nicht auf zu\n"
+ "wachsen, so dass sein Kopf zu schwer\n"
+ "für seine Nackenmuskulatur wird.");
+static const u8 DexDescription_Simsala_2[] = _(
+ "Dieses POKéMON hält seinen Kopf mit\n"
+ "psychokinetischer Energie aufrecht.");
+
+static const u8 DexDescription_Machollo_1[] = _(
+ "MACHOLLOs Muskeln sind etwas Beson-\n"
+ "deres. Sie schmerzen nie, egal, wie sehr\n"
+ "sie beansprucht werden.");
+static const u8 DexDescription_Machollo_2[] = _(
+ "Dieses POKéMON hat genug Kraft, um 100\n"
+ "Erwachsene umherzuwerfen.");
+
+static const u8 DexDescription_Maschock_1[] = _(
+ "MASCHOCKs starke Muskeln sind so hart\n"
+ "wie Stahl. Dieses POKéMON hat so viel\n"
+ "Kraft, dass es mit nur einem Finger");
+static const u8 DexDescription_Maschock_2[] = _(
+ "einen Sumo-Ringer in der Luft halten\n"
+ "kann.");
+
+static const u8 DexDescription_Machomei_1[] = _(
+ "MACHOMEI hat genug Kraft, um alles \n"
+ "Mögliche zu stemmen. Bei Tätigkeiten,\n"
+ "die Geschick und Sorgfalt erfordern,");
+static const u8 DexDescription_Machomei_2[] = _(
+ "machen es ihm seine Arme jedoch nicht\n"
+ "leicht. Dieses POKéMON neigt dazu,\n"
+ "zuerst zu handeln und dann zu denken.");
+
+static const u8 DexDescription_Knofensa_1[] = _(
+ "KNOFENSAs schlanker und elastischer\n"
+ "Körper ermöglicht es ihm, jedem\n"
+ "Angriff auszuweichen, so heftig dieser");
+static const u8 DexDescription_Knofensa_2[] = _(
+ "auch sein mag. Dieses POKéMON spuckt\n"
+ "eine ätzende Flüssigkeit aus, die sogar\n"
+ "Eisen zersetzen kann.");
+
+static const u8 DexDescription_Ultrigaria_1[] = _(
+ "ULTRIGARIA hat einen großen Haken\n"
+ "an seinem Hinterteil. Nachts hängt\n"
+ "sich dieses POKéMON zum Schlafen an");
+static const u8 DexDescription_Ultrigaria_2[] = _(
+ "einen Ast. Wenn es sich im Schlaf be-\n"
+ "wegt, kann es passieren, dass es auf\n"
+ "dem Boden wieder aufwacht.");
+
+static const u8 DexDescription_Sarzenia_1[] = _(
+ "Aus SARZENIAs Kopf ragt eine lange\n"
+ "Ranke hervor. Diese schwingt hin und \n"
+ "her, als ob sie etwas fangen");
+static const u8 DexDescription_Sarzenia_2[] = _(
+ "möchte. Wenn sich ahnungslose Beute \n"
+ "nähert, wird sie von diesem POKéMON\n"
+ "im Ganzen verschlungen.");
+
+static const u8 DexDescription_Tentacha_1[] = _(
+ "TENTACHAs Körper setzt sich zum größ-\n"
+ "ten Teil aus Wasser zusammen. Wenn es\n"
+ "das Meer verlässt, vertrocknet es.");
+static const u8 DexDescription_Tentacha_2[] = _(
+ "Wenn dieses POKéMON auszutrocknen be-\n"
+ "ginnt, sollte man es schnell wieder ins\n"
+ "Wasser zurückbringen.");
+
+static const u8 DexDescription_Tentoxa_1[] = _(
+ "TENTOXA hat große, rote Kugeln auf \n"
+ "seinem Kopf. Sie glühen auf, bevor sie \n"
+ "seine Gegner mit Ultraschall");
+static const u8 DexDescription_Tentoxa_2[] = _(
+ "erschüttern. Ein Ausbruch dieses \n"
+ "POKéMON erzeugt starke Wellen \n"
+ "in seiner Umgebung.");
+
+static const u8 DexDescription_Kleinstein_1[] = _(
+ "Je länger ein KLEINSTEIN lebt, desto\n"
+ "mehr wird seine raue Oberfläche ab-\n"
+ "geschliffen, so dass es runder wird.");
+static const u8 DexDescription_Kleinstein_2[] = _(
+ "Das Herz dieses POKéMON bleibt aber\n"
+ "für immer versteinert, hart und rau.");
+
+static const u8 DexDescription_Georok_1[] = _(
+ "GEOROK wächst, indem es sich von Stei-\n"
+ "nen ernährt. Am liebsten mag es Steine,\n"
+ "die mit Moos überzogen sind.");
+static const u8 DexDescription_Georok_2[] = _(
+ "Dieses POKéMON frisst sich täglich\n"
+ "durch eine riesige Menge von Steinen.");
+
+static const u8 DexDescription_Geowaz_1[] = _(
+ "GEOWAZ lebt hoch in den Bergen. Gibt es \n"
+ "ein starkes Erdbeben, rollt dieses\n"
+ "POKéMON so lange den Berg hinunter,");
+static const u8 DexDescription_Geowaz_2[] = _(
+ "bis es schließlich unten angekommen ist.");
+
+static const u8 DexDescription_Ponita_1[] = _(
+ "Nach seiner Geburt ist PONITA so\n"
+ "schwach, dass es kaum von alleine\n"
+ "aufstehen kann. Dieses POKéMON wird");
+static const u8 DexDescription_Ponita_2[] = _(
+ "dadurch schnell stärker, dass es sich\n"
+ "beim Versuch, mit seinen Eltern Schritt\n"
+ "zu halten, immer wieder aufrappeln muss.");
+
+static const u8 DexDescription_Gallopa_1[] = _(
+ "Man kann GALLOPA dabei beobachten, \n"
+ "wie es lässig über Felder und Wiesen\n"
+ "galoppiert. Wenn dieses POKéMON");
+static const u8 DexDescription_Gallopa_2[] = _(
+ "jedoch Ernst macht, erreicht es bis zu\n"
+ "240 km/h. Dann beginnt seine Mähne\n"
+ "zu lodern.");
+
+static const u8 DexDescription_Flegmon_1[] = _(
+ "FLEGMON benutzt seinen Schweif, um \n"
+ "Beute zu fangen, indem es ihn an einem \n"
+ "Flussufer ins Wasser taucht.");
+static const u8 DexDescription_Flegmon_2[] = _(
+ "Dieses POKéMON vergisst häufig, was es\n"
+ "gerade tun wollte, und verbringt ganze \n"
+ "Tage damit, am Ufer herumzutrödeln.");
+
+static const u8 DexDescription_Lahmus_1[] = _(
+ "An LAHMUS’ Rute hat sich ein MUSCHAS\n"
+ "festgebissen. Daher kann es ihn nicht\n"
+ "mehr zum Angeln benutzen");
+static const u8 DexDescription_Lahmus_2[] = _(
+ "und es ist dazu gezwungen, umherzu-\n"
+ "schwimmen und nach Beute Ausschau\n"
+ "zu halten.");
+
+static const u8 DexDescription_Magnetilo_1[] = _(
+ "MAGNETILO ernährt sich von Elektri-\n"
+ "zität aus Stromleitungen. Dieses\n"
+ "POKéMON hängt sich gern an");
+static const u8 DexDescription_Magnetilo_2[] = _(
+ "Sicherungskästen. Wenn es in deinem\n"
+ "Haus zu einem Stromausfall kommt,\n"
+ "solltest du die Sicherungen überprüfen.");
+
+static const u8 DexDescription_Magneton_1[] = _(
+ "MAGNETON erzeugt ein sehr starkes Mag-\n"
+ "netfeld, das Maschinen zerstören kann.\n"
+ "Deshalb hört man in großen Städten oft");
+static const u8 DexDescription_Magneton_2[] = _(
+ "Sirenen, die die Bürger vor Scharen\n"
+ "dieses POKéMON warnen sollen.");
+
+static const u8 DexDescription_Porenta_1[] = _(
+ "PORENTA trifft man immer mit einer\n"
+ "Lauchstange an. Es gibt gute und\n"
+ "schlechte Stangen.");
+static const u8 DexDescription_Porenta_2[] = _(
+ "Dieses POKéMON kämpft mit Hilfe seiner\n"
+ "Stange gegen seine Gegner.");
+
+static const u8 DexDescription_Dodu_1[] = _(
+ "DODU hat zwei Köpfe, die nie zur \n"
+ "selben Zeit, sondern abwechselnd\n"
+ "schlafen. Während ein Kopf schläft,");
+static const u8 DexDescription_Dodu_2[] = _(
+ "hält der andere Ausschau nach Feinden.");
+
+static const u8 DexDescription_Dodri_1[] = _(
+ "DODRIs drei Köpfe blicken in drei ver-\n"
+ "schiedene Richtungen. Es ist immer auf\n"
+ "der Hut.");
+static const u8 DexDescription_Dodri_2[] = _(
+ "Du solltest dich diesem POKéMON nicht\n"
+ "nähern, wenn es bereits misstrauisch \n"
+ "ist. Es könnte nach dir hacken.");
+
+static const u8 DexDescription_Jurob_1[] = _(
+ "JUROB jagt unter der eisigen Ober-\n"
+ "fläche des Eismeeres nach Beute. Zum\n"
+ "Luft holen schlägt es mit dem");
+static const u8 DexDescription_Jurob_2[] = _(
+ "vorstehenden Teil seines Kopfes ein \n"
+ "Loch ins Eis.");
+
+static const u8 DexDescription_Jugong_1[] = _(
+ "JUGONG liebt es, auf bitterkalten Eis-\n"
+ "schollen ein Nickerchen zu machen.\n"
+ "Ein Seemann, der einmal ein solches");
+static const u8 DexDescription_Jugong_2[] = _(
+ "POKéMON schlafend auf einem\n"
+ "Eisberg sah, hielt es irrtümlicherweise\n"
+ "für eine Meerjungfrau.");
+
+static const u8 DexDescription_Sleima_1[] = _(
+ "SLEIMAs glitschiger, gummiartiger\n"
+ "Körper passt durch jede noch so kleine\n"
+ "Öffnung. Dieses POKéMON steigt in die");
+static const u8 DexDescription_Sleima_2[] = _(
+ "Kanalisation hinab, um fauliges\n"
+ "Abwasser zu trinken.");
+
+static const u8 DexDescription_Sleimok_1[] = _(
+ "SLEIMOK scheidet eine widerlich\n"
+ "stinkende Substanz aus. Ein einziger\n"
+ "Tropfen seiner Körpersubstanz reicht");
+static const u8 DexDescription_Sleimok_2[] = _(
+ "aus, um ein Gewässer zu verseuchen.");
+
+static const u8 DexDescription_Muschas_1[] = _(
+ "Nachts benutzt dieses POKéMON seine\n"
+ "breite Zunge, um ein Loch in den \n"
+ "Meeresboden zu graben.");
+static const u8 DexDescription_Muschas_2[] = _(
+ "Darin schläft es. Dabei schließt es\n"
+ "seine Schale, aber die Zunge hängt\n"
+ "heraus.");
+
+static const u8 DexDescription_Austos_1[] = _(
+ "AUSTOS kann im Meerwasser schwimmen,\n"
+ "indem es Wasser schluckt und wieder\n"
+ "herausspritzt.");
+static const u8 DexDescription_Austos_2[] = _(
+ "Dieses POKéMON kann sich auch ver- \n"
+ "teidigen, indem es spitze Stacheln mit\n"
+ "Hilfe des Wasserdrucks verschießt.");
+
+static const u8 DexDescription_Nebulak_1[] = _(
+ "NEBULAK hat einen gasförmigen Körper.\n"
+ "Wenn es starkem Wind ausgesetzt wird,\n"
+ "kann es davongeweht werden.");
+static const u8 DexDescription_Nebulak_2[] = _(
+ "Scharen dieses POKéMON sammeln sich\n"
+ "unter Dachrinnen, um sich vor dem\n"
+ "gefährlichen Wind zu schützen.");
+
+static const u8 DexDescription_Alpollo_1[] = _(
+ "ALPOLLO ist ein gefährliches POKéMON.\n"
+ "Wenn es dich zu sich lockt, während es\n"
+ "durch die Dunkelheit schwebt, darfst");
+static const u8 DexDescription_Alpollo_2[] = _(
+ "du ihm keinesfalls zu nahe kommen.\n"
+ "Dieses POKéMON wird versuchen, an dir\n"
+ "zu lecken und dein Leben zu stehlen.");
+
+static const u8 DexDescription_Gengar_1[] = _(
+ "Nachts kann es passieren, dass dich\n"
+ "dein Schatten im Licht einer\n"
+ "Straßenlaterne plötzlich überholt.");
+static const u8 DexDescription_Gengar_2[] = _(
+ "Dann ist es ein GENGAR, das an dir\n"
+ "vorbeiläuft und sich als dein Schatten\n"
+ "ausgibt.");
+
+static const u8 DexDescription_Onix_1[] = _(
+ "ONIX hat einen Magneten in seinem\n"
+ "Gehirn. Er dient ihm als Kompass,\n"
+ "so dass es beim Graben von Tunneln");
+static const u8 DexDescription_Onix_2[] = _(
+ "nicht die Orientierung verliert. Wenn es\n"
+ "älter wird, wird sein Körper immer\n"
+ "runder und glatter.");
+
+static const u8 DexDescription_Traumato_1[] = _(
+ "Wenn dir im Schlaf die Nase juckt, ist\n"
+ "das ein sicheres Zeichen dafür, dass\n"
+ "eines dieser POKéMON auf deinem");
+static const u8 DexDescription_Traumato_2[] = _(
+ "Kissen sitzt, um deinen Traum durch\n"
+ "deine Nasenlöcher hindurch zu\n"
+ "verspeisen.");
+
+static const u8 DexDescription_Hypno_1[] = _(
+ "HYPNO hält ein Pendel in der Hand. Das\n"
+ "Schwingen und Glitzern des Pendels \n"
+ "versetzt seine Feinde in eine tiefe");
+static const u8 DexDescription_Hypno_2[] = _(
+ "Hypnose. Während dieses POKéMON auf \n"
+ "der Suche nach Beute ist, poliert es \n"
+ "sein Pendel.");
+
+static const u8 DexDescription_Krabby_1[] = _(
+ "KRABBY lebt an Stränden, in Löchern im \n"
+ "Sand. An Sandstränden, an denen es\n"
+ "wenig Nahrung findet, sieht man dieses");
+static const u8 DexDescription_Krabby_2[] = _(
+ "POKéMON mit Artgenossen um sein\n"
+ "Revier streiten.");
+
+static const u8 DexDescription_Kingler_1[] = _(
+ "KINGLER hat eine riesige Schere. Es\n"
+ "winkt damit, um mit anderen zu \n"
+ "kommunizieren.");
+static const u8 DexDescription_Kingler_2[] = _(
+ "Da seine Schere aber so schwer ist, wird\n"
+ "dieses POKéMON schnell müde.");
+
+static const u8 DexDescription_Voltobal_1[] = _(
+ "VOLTOBAL wurde zuerst bei einer Firma\n"
+ "beobachtet, die POKéBÄLLE herstellt.\n"
+ "Der Zusammenhang zwischen dieser");
+static const u8 DexDescription_Voltobal_2[] = _(
+ "Beobachtung und der Tatsache, dass\n"
+ "dieses POKéMON wie ein POKéBALL\n"
+ "aussieht, ist noch ungeklärt.");
+
+static const u8 DexDescription_Lektrobal_1[] = _(
+ "LEKTROBAL ernährt sich von\n"
+ "Elektrizität aus der Atmosphäre. An\n"
+ "Tagen, an denen es blitzt, explodiert");
+static const u8 DexDescription_Lektrobal_2[] = _(
+ "dieses POKéMON dauernd, da es zu viel\n"
+ "Elektrizität zu sich nimmt.");
+
+static const u8 DexDescription_Owei_1[] = _(
+ "Dieses POKéMON besteht aus sechs\n"
+ "Eiern, die ein engmaschiges Netz\n"
+ "bilden. Die sechs Eier ziehen sich");
+static const u8 DexDescription_Owei_2[] = _(
+ "gegenseitig an und drehen sich. Wenn\n"
+ "die Eier Risse bekommen, steht OWEI\n"
+ "kurz vor seiner Entwicklung.");
+
+static const u8 DexDescription_Kokowei_1[] = _(
+ "KOKOWEI stammt ursprünglich aus den\n"
+ "Tropen. Seine Köpfe wachsen stetig,\n"
+ "wenn es starkem Sonnenlicht");
+static const u8 DexDescription_Kokowei_2[] = _(
+ "ausgesetzt ist. Wenn seine Köpfe\n"
+ "abfallen, bilden sie zusammen ein OWEI.");
+
+static const u8 DexDescription_Tragosso_1[] = _(
+ "TRAGOSSO sehnt sich nach seiner\n"
+ "Mutter, die nicht mehr da ist. Wenn es\n"
+ "im Vollmond das Ebenbild seiner Mutter");
+static const u8 DexDescription_Tragosso_2[] = _(
+ "erblickt, muss es weinen. Die Flecken\n"
+ "auf dem Totenkopf, den es trägt,\n"
+ "stammen von vergossenen Tränen.");
+
+static const u8 DexDescription_Knogga_1[] = _(
+ "KNOGGA ist eine entwickelte Form von\n"
+ "TRAGOSSO, die den Verlust der Mutter\n"
+ "überwunden hat und stärker geworden");
+static const u8 DexDescription_Knogga_2[] = _(
+ "ist. Die temperamentvolle und\n"
+ "gestärkte Seele dieses POKéMON ist\n"
+ "nur schwer zu brechen.");
+
+static const u8 DexDescription_Kicklee_1[] = _(
+ "KICKLEE kann seine Beine ausfahren\n"
+ "und einziehen. Es verblüfft seine\n"
+ "Gegner mit brutalen Tritten.");
+static const u8 DexDescription_Kicklee_2[] = _(
+ "Nach einem Kampf massiert es seine\n"
+ "Beine und lockert die Muskeln, um der\n"
+ "Erschöpfung vorzubeugen.");
+
+static const u8 DexDescription_Nockchan_1[] = _(
+ "NOCKCHAN besitzt das Herz eines\n"
+ "Boxers, der sich auf eine\n"
+ "Weltmeisterschaft vorbereitet.");
+static const u8 DexDescription_Nockchan_2[] = _(
+ "Dieses POKéMON hat einen unbeugsamen\n"
+ "Willen und gibt niemals auf.");
+
+static const u8 DexDescription_Schlurp_1[] = _(
+ "Wenn SCHLURP etwas Neues entdeckt,\n"
+ "leckt es daran. Es merkt sich \n"
+ "Gegenstände anhand der Struktur und");
+static const u8 DexDescription_Schlurp_2[] = _(
+ "des Geschmacks.\n"
+ "Saure Sachen schrecken es eher ab.");
+
+static const u8 DexDescription_Smogon_1[] = _(
+ "Wenn SMOGON sich aufregt, lässt es\n"
+ "das giftige Gas in seinem Inneren\n"
+ "entweichen. Wenn es sich zu sehr");
+static const u8 DexDescription_Smogon_2[] = _(
+ "aufbläht, explodiert dieses POKéMON.");
+
+static const u8 DexDescription_Smogmog_1[] = _(
+ "SMOGMOG liebt die Gase verrottender,\n"
+ "fauler Küchenabfälle. Dieses POKéMON\n"
+ "sucht sich ein vernachlässigtes,");
+static const u8 DexDescription_Smogmog_2[] = _(
+ "schmutziges Gebäude und richtet sich\n"
+ "dort häuslich ein. Nachts, wenn die\n"
+ "Menschen schlafen, wühlt es im Müll.");
+
+static const u8 DexDescription_Rihorn_1[] = _(
+ "RIHORN läuft immer geradeaus und\n"
+ "zerstampft alles, was ihm in die Quere\n"
+ "kommt. Es macht ihm auch nichts aus,");
+static const u8 DexDescription_Rihorn_2[] = _(
+ "wenn es mit dem Kopf voran gegen einen\n"
+ "Stahlklotz rennt. Am nächsten Tag\n"
+ "allerdings könnte es Schmerzen haben.");
+
+static const u8 DexDescription_Rizeros_1[] = _(
+ "Mit seinem Horn kann RIZEROS selbst\n"
+ "Diamanten zerbrechen. Ein einziger\n"
+ "Hieb mit seinem Schweif kann ein Haus");
+static const u8 DexDescription_Rizeros_2[] = _(
+ "zum Einsturz bringen. Die Haut dieses\n"
+ "POKéMON ist so hart, dass nicht einmal\n"
+ "Kanonenkugeln Kratzer hinterlassen.");
+
+static const u8 DexDescription_Chaneira_1[] = _(
+ "CHANEIRA legt täglich ausgesprochen\n"
+ "nahrhafte Eier. Sie sind so köstlich,\n"
+ "dass sie sogar von Menschen verspeist");
+static const u8 DexDescription_Chaneira_2[] = _(
+ "werden, die gar keinen Appetit haben.");
+
+static const u8 DexDescription_Tangela_1[] = _(
+ "Wenn man TANGELAs Ranken berührt, \n"
+ "fallen diese sofort ab. Das tut ihm\n"
+ "aber nicht weh und es kann");
+static const u8 DexDescription_Tangela_2[] = _(
+ "sich schnell in Sicherheit bringen. \n"
+ "Verliert es Ranken, werden diese am\n"
+ "nächsten Tag durch neue ersetzt.");
+
+static const u8 DexDescription_Kangama_1[] = _(
+ "Wenn du auf ein spielendes KANGAMA\n"
+ "stößt, solltest du es nicht stören oder\n"
+ "versuchen, es einzufangen.");
+static const u8 DexDescription_Kangama_2[] = _(
+ "Die Mutter dieses Baby-POKéMON ist\n"
+ "bestimmt in Reichweite und könnte\n"
+ "sehr wütend auf dich werden.");
+
+static const u8 DexDescription_Seeper_1[] = _(
+ "SEEPER ernährt sich von kleinen\n"
+ "Insekten und dem Moos auf Steinen.\n"
+ "Bei unruhiger See verankert sich");
+static const u8 DexDescription_Seeper_2[] = _(
+ "dieses POKéMON mit seinem Schweif an\n"
+ "Steinen oder Korallen, damit es nicht\n"
+ "weggespült wird.");
+
+static const u8 DexDescription_Seemon_1[] = _(
+ "Sobald sich SEEMON um eine Koralle\n"
+ "gewickelt hat, schläft es. Von Zeit zu\n"
+ "Zeit werden Menschen durch die");
+static const u8 DexDescription_Seemon_2[] = _(
+ "Widerhaken dieses POKéMON verletzt, \n"
+ "wenn sie versuchen, Korallen zu ernten\n"
+ "und es dabei nicht bemerken.");
+
+static const u8 DexDescription_Goldini_1[] = _(
+ "GOLDINI ist ein wunderschönes POKéMON,\n"
+ "dessen Flossen sich elegant im Wasser\n"
+ "wiegen. Aber man muss auf dieses");
+static const u8 DexDescription_Goldini_2[] = _(
+ "POKéMON Acht geben. Es könnte einen\n"
+ "sonst heftig mit seinem Horn rammen.");
+
+static const u8 DexDescription_Golking_1[] = _(
+ "Im Herbst kann man männliche GOLKING\n"
+ "dabei beobachten, wie sie Balztänze in \n"
+ "Flussbetten aufführen, um die");
+static const u8 DexDescription_Golking_2[] = _(
+ "weiblichen Exemplare zu beeindrucken.\n"
+ "Während dieser Zeit ist die Farbe\n"
+ "dieser POKéMON am schönsten.");
+
+static const u8 DexDescription_Sterndu_1[] = _(
+ "In STERNDUs Körpermitte befindet sich\n"
+ "ein hellrot leuchtendes Organ - \n"
+ "sein Kern. Wenn du im Spätsommer");
+static const u8 DexDescription_Sterndu_2[] = _(
+ "an einen Strand gehst, sehen die\n"
+ "leuchtenden Kerne dieser POKéMON aus\n"
+ "wie Sterne.");
+
+static const u8 DexDescription_Starmie_1[] = _(
+ "STARMIEs Mittelteil, sein Kern, leuchtet\n"
+ "in sieben Farben. Aufgrund dieser\n"
+ "Eigenschaft wird es auch");
+static const u8 DexDescription_Starmie_2[] = _(
+ "“Juwel des Meeres” genannt.");
+
+static const u8 DexDescription_Pantimos_1[] = _(
+ "PANTIMOS ist ein Meister der Pantomime.\n"
+ "Seine Gesten und Bewegungen machen\n"
+ "den Zuschauer glauben, dass etwas");
+static const u8 DexDescription_Pantimos_2[] = _(
+ "Unsichtbares tatsächlich existiert.\n"
+ "Wenn ein Objekt für real gehalten wird,\n"
+ "beginnt es wirklich zu existieren.");
+
+static const u8 DexDescription_Sichlor_1[] = _(
+ "SICHLOR ist unheimlich schnell. Dadurch\n"
+ "werden die beiden Sensen an seinen\n"
+ "Unterarmen noch effektiver.");
+static const u8 DexDescription_Sichlor_2[] = _(
+ "Dieses POKéMON kann mit seinen Sensen\n"
+ "in Sekundenschnelle Baumstämme\n"
+ "zerteilen.");
+
+static const u8 DexDescription_Rossana_1[] = _(
+ "ROSSANA bewegt sich rhythmisch fort.\n"
+ "Es wiegt und schwingt seine Hüften, als\n"
+ "würde es tanzen. Seine Bewegungen");
+static const u8 DexDescription_Rossana_2[] = _(
+ "wirken so anziehend auf Menschen, dass\n"
+ "diese beginnen, mit den Hüften zu\n"
+ "schwingen, ohne darüber nachzudenken.");
+
+static const u8 DexDescription_Elektek_1[] = _(
+ "Bei Gewitter konkurrieren diese\n"
+ "POKéMON darum, wie viele\n"
+ "Spannungseinheiten sie erreichen,");
+static const u8 DexDescription_Elektek_2[] = _(
+ "wenn sie vom Blitz getroffen werden.\n"
+ "Einige Ortschaften benutzen ELEKTEK\n"
+ "an Stelle von Blitzableitern.");
+
+static const u8 DexDescription_Magmar_1[] = _(
+ "Im Kampf stößt MAGMAR glühend heiße\n"
+ "Flammen aus, um seinen Gegner\n"
+ "einzuschüchtern.");
+static const u8 DexDescription_Magmar_2[] = _(
+ "Diese Feuersalven erzeugen Hitzewellen,\n"
+ "die das Gras und die Bäume der Umgebung\n"
+ "in Brand setzen.");
+
+static const u8 DexDescription_Pinsir_1[] = _(
+ "PINSIR ist erstaunlich stark. Es kann\n"
+ "einen Feind, der doppelt so viel wiegt\n"
+ "wie es selbst, mit seinen Hörnern");
+static const u8 DexDescription_Pinsir_2[] = _(
+ "packen und hochheben. Bei niedrigen\n"
+ "Temperaturen werden die Bewegungen\n"
+ "dieses POKéMON schwerfällig.");
+
+static const u8 DexDescription_Tauros_1[] = _(
+ "Dieses POKéMON ist nur zufrieden, wenn\n"
+ "es kämpfen kann. Wenn TAUROS keinen\n"
+ "Gegner findet, sucht es sich starke");
+static const u8 DexDescription_Tauros_2[] = _(
+ "Bäume und lässt sich an ihnen aus,\n"
+ "um sich abzureagieren.");
+
+static const u8 DexDescription_Karpador_1[] = _(
+ "KARPADOR ist ein armseliges POKéMON,\n"
+ "das nur platschen kann. Sein\n"
+ "merkwürdiges Verhalten hat so manchen");
+static const u8 DexDescription_Karpador_2[] = _(
+ "Wissenschaftler zum Forschen\n"
+ "angeregt.");
+
+static const u8 DexDescription_Garados_1[] = _(
+ "Wenn sich KARPADOR zu GARADOS\n"
+ "entwickelt, durchlaufen seine\n"
+ "Gehirnzellen eine strukturelle");
+static const u8 DexDescription_Garados_2[] = _(
+ "Veränderung, was wohl der Grund für die\n"
+ "zügellose, gewalttätige Natur dieses\n"
+ "POKéMON ist.");
+
+static const u8 DexDescription_Lapras_1[] = _(
+ "Die Menschen sind dafür verantwortlich,\n"
+ "dass LAPRAS fast ausgestorben wäre.\n"
+ "Abends singt es traurige Klagelieder,");
+static const u8 DexDescription_Lapras_2[] = _(
+ "da nur noch wenige seiner Artgenossen\n"
+ "übrig sind.");
+
+static const u8 DexDescription_Ditto_1[] = _(
+ "DITTO verändert seine Zellstruktur, um\n"
+ "sich in eine andere Form zu verwandeln.\n"
+ "Wenn es sich dabei jedoch auf sein");
+static const u8 DexDescription_Ditto_2[] = _(
+ "Gedächtnis verlässt, unterlaufen \n"
+ "diesem POKéMON schon mal Fehler.");
+
+static const u8 DexDescription_Evoli_1[] = _(
+ "EVOLIs genetisches Erbmaterial ist so\n"
+ "instabil, dass die Umgebung plötzliche\n"
+ "Mutationen auslösen kann.");
+static const u8 DexDescription_Evoli_2[] = _(
+ "Die Wirkung verschiedener \n"
+ "STEINE führt zur Entwicklung dieses \n"
+ "POKéMON.");
+
+static const u8 DexDescription_Aquana_1[] = _(
+ "AQUANA hat eine spontane Mutation\n"
+ "durchgemacht und ihm sind Flossen und \n"
+ "Kiemen gewachsen. Dadurch kann es");
+static const u8 DexDescription_Aquana_2[] = _(
+ "unter Wasser leben.\n"
+ "Dieses POKéMON kann Wasser nach\n"
+ "Belieben manipulieren.");
+
+static const u8 DexDescription_Blitza_1[] = _(
+ "BLITZAs Zellen erzeugen schwache\n"
+ "Elektrizität. Diese wird aber durch die\n"
+ "statische Aufladung seines Fells");
+static const u8 DexDescription_Blitza_2[] = _(
+ "verstärkt, so dass es Blitzschläge\n"
+ "erzeugen kann. Sein Fell besteht aus \n"
+ "elektrisch geladenen Nadeln.");
+
+static const u8 DexDescription_Flamara_1[] = _(
+ "FLAMARAs flauschiges Fell dient einem\n"
+ "besonderen Zweck. Es gibt Hitze an die\n"
+ "Luft ab, damit sein Körper nicht");
+static const u8 DexDescription_Flamara_2[] = _(
+ "zu heiß wird. Die Körpertemperatur \n"
+ "dieses POKéMON kann bis auf 900 Grad\n"
+ "ansteigen.");
+
+static const u8 DexDescription_Porygon_1[] = _(
+ "PORYGON ist in der Lage, sich in Daten\n"
+ "zurückzuverwandeln und in den\n"
+ "Cyberspace zu gelangen.");
+static const u8 DexDescription_Porygon_2[] = _(
+ "Dieses POKéMON ist kopiergeschützt, so\n"
+ "dass es durch Kopieren nicht\n"
+ "vervielfältigt werden kann.");
+
+static const u8 DexDescription_Amonitas_1[] = _(
+ "AMONITAS ist ein POKéMON, das seit\n"
+ "langer Zeit ausgestorben war, aber\n"
+ "von den Menschen aus Fossilien");
+static const u8 DexDescription_Amonitas_2[] = _(
+ "reproduziert wurde. Wenn es von einem\n"
+ "Feind angegriffen wird, zieht es sich in\n"
+ "sein hartes Gehäuse zurück.");
+
+static const u8 DexDescription_Amoroso_1[] = _(
+ "AMOROSO benutzt seine Tentakel, um\n"
+ "Beute einzufangen. Man nimmt an,\n"
+ "dass es ausgestorben ist, weil seine");
+static const u8 DexDescription_Amoroso_2[] = _(
+ "Schale zu groß und zu schwer geworden\n"
+ "war, so dass seine Bewegungen immer\n"
+ "langsamer und schwerfälliger wurden.");
+
+static const u8 DexDescription_Kabuto_1[] = _(
+ "KABUTO ist ein POKéMON, das aus einem\n"
+ "Fossil reproduziert wurde. Höchst\n"
+ "selten wurden lebende Exemplare dieser");
+static const u8 DexDescription_Kabuto_2[] = _(
+ "Art entdeckt.\n"
+ "Dieses POKéMON hat sich seit 300 Mio.\n"
+ "Jahren überhaupt nicht verändert.");
+
+static const u8 DexDescription_Kabutops_1[] = _(
+ "In der Antike jagte KABUTOPS unter\n"
+ "Wasser nach Beute. Es hat sich von\n"
+ "einem Meeresbewohner zu einem Land-");
+static const u8 DexDescription_Kabutops_2[] = _(
+ "bewohner entwickelt, was man an den\n"
+ "Veränderungen seiner Kiemen und\n"
+ "Beine sehen kann.");
+
+static const u8 DexDescription_Aerodactyl_1[] = _(
+ "AERODACTYL ist ein POKéMON aus dem\n"
+ "Zeitalter der Dinosaurier. Es wurde aus\n"
+ "genetischem Material reproduziert, das");
+static const u8 DexDescription_Aerodactyl_2[] = _(
+ "aus Bernstein gewonnen wurde.\n"
+ "Man geht davon aus, dass es in der\n"
+ "Antike der König der Lüfte war.");
+
+static const u8 DexDescription_Relaxo_1[] = _(
+ "Der typische Tagesablauf von RELAXO\n"
+ "besteht lediglich aus Essen und\n"
+ "Schlafen. Es ist so zutraulich, dass");
+static const u8 DexDescription_Relaxo_2[] = _(
+ "Kinder seinen dicken Bauch als Platz\n"
+ "zum Spielen nutzen.");
+
+static const u8 DexDescription_Arktos_1[] = _(
+ "ARKTOS ist ein sagenumwobenes\n"
+ "Vogel-POKéMON, das Eis manipulieren\n"
+ "kann. Das Schlagen seiner Flügel");
+static const u8 DexDescription_Arktos_2[] = _(
+ "bringt die Luft zum Gefrieren. Es wird\n"
+ "behauptet, dass es zu schneien\n"
+ "beginnt, wenn dieses POKéMON fliegt.");
+
+static const u8 DexDescription_Zapdos_1[] = _(
+ "ZAPDOS ist ein legendäres\n"
+ "Vogel-POKéMON, das die Fähigkeit\n"
+ "besitzt, Elektrizität zu manipulieren.");
+static const u8 DexDescription_Zapdos_2[] = _(
+ "Es lebt in Gewitterwolken.\n"
+ "Dieses POKéMON nimmt Energie auf,\n"
+ "wenn es vom Blitz getroffen wird.");
+
+static const u8 DexDescription_Lavados_1[] = _(
+ "LAVADOS ist ein legendäres\n"
+ "Vogel-POKéMON, das Feuer manipulieren\n"
+ "kann. Wenn es verletzt wird, taucht es");
+static const u8 DexDescription_Lavados_2[] = _(
+ "seinen Körper in das Magma eines\n"
+ "Vulkans, um sich zu verbrennen\n"
+ "und selbst zu heilen.");
+
+static const u8 DexDescription_Dratini_1[] = _(
+ "DRATINI häutet sich ständig und\n"
+ "entledigt sich so seiner Haut, da die\n"
+ "Lebensenergie in seinem Körper");
+static const u8 DexDescription_Dratini_2[] = _(
+ "stetig und unkontrollierbar ansteigt.");
+
+static const u8 DexDescription_Dragonir_1[] = _(
+ "DRAGONIR speichert eine enorme Menge\n"
+ "an Energie in seinem Körper. Es kann die\n"
+ "Witterung in seiner Umgebung ändern,");
+static const u8 DexDescription_Dragonir_2[] = _(
+ "indem es Energie aus den Kristallen an\n"
+ "seinem Nacken und an seinem Schweif\n"
+ "entlädt.");
+
+static const u8 DexDescription_Dragoran_1[] = _(
+ "DRAGORAN kann die Welt innerhalb\n"
+ "von 16 Stunden umkreisen.\n"
+ "Es ist ein gutherziges POKéMON, das");
+static const u8 DexDescription_Dragoran_2[] = _(
+ "vermisste und sinkende Schiffe bei\n"
+ "Unwetter sicher an Land zurückbringt.");
+
+static const u8 DexDescription_Mewtu_1[] = _(
+ "MEWTU ist ein POKéMON, das durch\n"
+ "Genmanipulation entstanden ist. Die\n"
+ "Menschen haben es zwar mit ihrem");
+static const u8 DexDescription_Mewtu_2[] = _(
+ "wissenschaftlichen Sachverstand\n"
+ "erzeugt, aber nicht mit einem\n"
+ "mitfühlenden Herzen ausgestattet.");
+
+static const u8 DexDescription_Mew_1[] = _(
+ "MEW soll die genetische\n"
+ "Zusammensetzung aller POKéMON\n"
+ "besitzen. Es kann sich unsichtbar");
+static const u8 DexDescription_Mew_2[] = _(
+ "machen, so dass es sich auch Menschen\n"
+ "nähern kann, ohne bemerkt zu werden.");
+
+static const u8 DexDescription_Endivie_1[] = _(
+ "Im Kampf wedelt ENDIVIE mit seinem\n"
+ "Blatt, um den Feind fern zu halten. Von\n"
+ "dem Blatt geht auch ein süßlicher Duft");
+static const u8 DexDescription_Endivie_2[] = _(
+ "aus, der die kämpfenden POKéMON\n"
+ "beruhigt und eine gemütliche,\n"
+ "freundliche Atmosphäre schafft.");
+
+static const u8 DexDescription_Lorblatt_1[] = _(
+ "LORBLATTs Nacken ist mit\n"
+ "zusammengerollten Blättern behangen.\n"
+ "In jedem Blatt befindet sich ein kleiner");
+static const u8 DexDescription_Lorblatt_2[] = _(
+ "Trieb eines Baumes.\n"
+ "Der Duft dieses Triebes bringt\n"
+ "Menschen auf Trab.");
+
+static const u8 DexDescription_Meganie_1[] = _(
+ "Der Duft von MEGANIEs Blume besänftigt\n"
+ "Gemüter. Im Kampf gibt dieses POKéMON\n"
+ "mehr von seinem beruhigenden");
+static const u8 DexDescription_Meganie_2[] = _(
+ "Duftstoff ab, um den Kampfgeist des\n"
+ "Gegners zu schwächen.");
+
+static const u8 DexDescription_Feurigel_1[] = _(
+ "FEURIGEL lässt Flammen aus seinem\n"
+ "Rücken lodern, wenn es sich schützen\n"
+ "muss. Die Flammen sind sehr verzehrend,");
+static const u8 DexDescription_Feurigel_2[] = _(
+ "wenn dieses POKéMON wütend ist. Ist es\n"
+ "aber müde, flackern die Flammen nur\n"
+ "unregelmäßig und schwach.");
+
+static const u8 DexDescription_Igelavar_1[] = _(
+ "IGELAVAR hält seine Gegner mit Flammen\n"
+ "und Böen heißer Luft auf Distanz.\n"
+ "Dieses POKéMON nutzt seine");
+static const u8 DexDescription_Igelavar_2[] = _(
+ "außergewöhnliche Gewandtheit dazu,\n"
+ "Angriffen auszuweichen und seinen\n"
+ "Gegner gleichzeitig zu versengen.");
+
+static const u8 DexDescription_Tornupto_1[] = _(
+ "TORNUPTO versteckt sich hinter einem\n"
+ "flimmernden Hitzeschild, den es mit\n"
+ "Hilfe seiner heißen Flammen erzeugt.");
+static const u8 DexDescription_Tornupto_2[] = _(
+ "Dieses POKéMON erzeugt Explosionen,\n"
+ "die alles in Schutt und Asche\n"
+ "legen.");
+
+static const u8 DexDescription_Karnimani_1[] = _(
+ "KARNIMANI ist zwar sehr klein, aber\n"
+ "seine Kiefer sind sehr stark. Wenn\n"
+ "die POKéMON denken, dass es nur");
+static const u8 DexDescription_Karnimani_2[] = _(
+ "spielerisch an ihnen knabbert, sollten\n"
+ "sie vorsichtig sein, denn sein Biss \n"
+ "kann zu schweren Verletzungen führen.");
+
+static const u8 DexDescription_Tyracroc_1[] = _(
+ "Wenn TYRACROC einen Feind mit seinen\n"
+ "Kiefern eingeklemmt hat, lässt es ihn\n"
+ "nicht mehr los. Da seine Zahnspitzen");
+static const u8 DexDescription_Tyracroc_2[] = _(
+ "wie Angelhaken gebogen sind, kann man\n"
+ "sie nicht mehr entfernen, wenn sie\n"
+ "sich verfangen haben.");
+
+static const u8 DexDescription_Impergator_1[] = _(
+ "IMPERGATOR schüchtert seine Feinde\n"
+ "dadurch ein, dass es sein riesiges Maul\n"
+ "aufreißt. Im Kampf erschüttert es den");
+static const u8 DexDescription_Impergator_2[] = _(
+ "Boden mit seinen kräftigen Hinterbei-\n"
+ "nen, wenn es mit unglaublicher Geschwin-\n"
+ "digkeit auf seinen Gegner losrennt.");
+
+static const u8 DexDescription_Wiesor_1[] = _(
+ "Wenn WIESOR schläft, hält immer jemand\n"
+ "Wache. Beim ersten Anflug von Gefahr\n"
+ "weckt die Wache die anderen auf.");
+static const u8 DexDescription_Wiesor_2[] = _(
+ "Wenn dieses POKéMON von seinen\n"
+ "Artgenossen getrennt wird, kann es\n"
+ "vor Angst nicht mehr schlafen.");
+
+static const u8 DexDescription_Wiesenior_1[] = _(
+ "WIESENIOR ist sehr schlank. Wenn es\n"
+ "angegriffen wird, kann es sich durch\n"
+ "enge Zwischenräume schlängeln und");
+static const u8 DexDescription_Wiesenior_2[] = _(
+ "entkommen. Trotz seiner kurzen\n"
+ "Gliedmaßen ist dieses POKéMON sehr\n"
+ "wendig und flink.");
+
+static const u8 DexDescription_Hoothoot_1[] = _(
+ "HOOTHOOT besitzt ein inneres Organ, das\n"
+ "die Erdumdrehung wahrnimmt. Dieses\n"
+ "besondere Organ ermöglicht es diesem");
+static const u8 DexDescription_Hoothoot_2[] = _(
+ "POKéMON, jeden Tag zur selben Zeit zu\n"
+ "schreien.");
+
+static const u8 DexDescription_Noctuh_1[] = _(
+ "Dank seines hervorragenden\n"
+ "Sehvermögens, mit dem es auch bei\n"
+ "geringer Beleuchtung sehen kann, und");
+static const u8 DexDescription_Noctuh_2[] = _(
+ "dank seiner geschmeidigen Flügel,\n"
+ "mit denen es geräuschlos fliegt,\n"
+ "entgeht NOCTUH keine Beute.");
+
+static const u8 DexDescription_Ledyba_1[] = _(
+ "LEDYBA sondert eine duftende\n"
+ "Flüssigkeit ab. Darüber kommuniziert\n"
+ "es mit anderen. Dieses POKéMON");
+static const u8 DexDescription_Ledyba_2[] = _(
+ "übermittelt seine Gefühle, indem es die\n"
+ "Duftnote des Sekrets verändert.");
+
+static const u8 DexDescription_Ledian_1[] = _(
+ "In Ländern mit frischer Luft und\n"
+ "Sternen am Himmel leben unzählig viele\n"
+ "LEDIAN.");
+static const u8 DexDescription_Ledian_2[] = _(
+ "Dafür gibt es einen guten Grund:\n"
+ "Dieses POKéMON nutzt das Licht der\n"
+ "Sterne als Energie.");
+
+static const u8 DexDescription_Webarak_1[] = _(
+ "Das von WEBARAK gesponnene Netz ist\n"
+ "sein zweites Nervensystem. Dieses\n"
+ "POKéMON kann anhand der feinen");
+static const u8 DexDescription_Webarak_2[] = _(
+ "Vibrationen der Netzfäden bestimmen,\n"
+ "welche Art Beute sich darauf befindet.");
+
+static const u8 DexDescription_Ariados_1[] = _(
+ "ARIADOS hat kleine hakenförmige Krallen\n"
+ "an seinen Füßen. Damit kann es an\n"
+ "Decken und Wänden entlang flitzen.");
+static const u8 DexDescription_Ariados_2[] = _(
+ "Dieses POKéMON erdrückt seine Gegner\n"
+ "mit starkem, dünnem Seidenfaden.");
+
+static const u8 DexDescription_Iksbat_1[] = _(
+ "Wenn IKSBAT fliegt, indem es nur ein \n"
+ "Paar Flügel, entweder an seinen Vorder-\n"
+ "oder Hinterbeinen bewegt, ist dies ein");
+static const u8 DexDescription_Iksbat_2[] = _(
+ "Anzeichen dafür, dass dieses POKéMON \n"
+ "bereits eine lange Strecke hinter sich\n"
+ "hat. Dann wechselt es die Flügel häufig.");
+
+static const u8 DexDescription_Lampi_1[] = _(
+ "LAMPI gibt positive und negative\n"
+ "elektrische Ladungen durch seine\n"
+ "Antennen ab, um seine Beute zu lähmen.");
+static const u8 DexDescription_Lampi_2[] = _(
+ "Dieses POKéMON lässt seine Lichter\n"
+ "aufflackern und tauscht Signale mit\n"
+ "seinen Artgenossen aus.");
+
+static const u8 DexDescription_Lanturn_1[] = _(
+ "LANTURN wird auch “Tiefseestern”\n"
+ "genannt, da es leuchtende Antennen\n"
+ "besitzt. Dieses POKéMON erzeugt Licht,");
+static const u8 DexDescription_Lanturn_2[] = _(
+ "indem es in den Antennen eine chemische\n"
+ "Reaktion zwischen Bakterien und seinen\n"
+ "Körperflüssigkeiten erzeugt.");
+
+static const u8 DexDescription_Pichu_1[] = _(
+ "An Gewittertagen oder Tagen, an denen\n"
+ "die Luft sehr trocken ist, kann sich\n"
+ "PICHU leichter mit Elektrizität");
+static const u8 DexDescription_Pichu_2[] = _(
+ "aufladen. Dann kann man das Knistern\n"
+ "statischer Aufladung hören.");
+
+static const u8 DexDescription_Pii_1[] = _(
+ "In Nächten mit vielen Sternschnuppen,\n"
+ "kann man PII im Kreis tanzen sehen. Es\n"
+ "tanzt die ganze Nacht hindurch und");
+static const u8 DexDescription_Pii_2[] = _(
+ "hört erst bei Sonnenaufgang auf, um\n"
+ "seinen Durst mit Morgentau zu stillen.");
+
+static const u8 DexDescription_Fluffeluff_1[] = _(
+ "FLUFFELUFFs Stimmbänder sind noch\n"
+ "nicht voll entwickelt. Wenn es zu viel\n"
+ "singt, schmerzt ihm die Kehle.");
+static const u8 DexDescription_Fluffeluff_2[] = _(
+ "Dieses POKéMON gurgelt mit Süßwasser\n"
+ "aus einem sauberen Fluss.");
+
+static const u8 DexDescription_Togepi_1[] = _(
+ "TOGEPI nutzt die positiven Emotionen,\n"
+ "wie Freude und Mitgefühl, von Menschen\n"
+ "und POKéMON als Energie.");
+static const u8 DexDescription_Togepi_2[] = _(
+ "Dieses POKéMON speichert Glücksgefühle\n"
+ "in seiner Schale und teilt sie mit\n"
+ "anderen.");
+
+static const u8 DexDescription_Togetic_1[] = _(
+ "TOGETIC ist ein POKéMON, das Glück\n"
+ "bringt. Wenn es jemanden trifft, der\n"
+ "reinen Herzens ist, zeigt es sich und");
+static const u8 DexDescription_Togetic_2[] = _(
+ "teilt sein Glück mit dieser Person.");
+
+static const u8 DexDescription_Natu_1[] = _(
+ "NATU kann nicht fliegen, da seine Flügel\n"
+ "noch nicht ausgewachsen sind. Wenn du\n"
+ "diesem POKéMON in die Augen schaust,");
+static const u8 DexDescription_Natu_2[] = _(
+ "starrt es dich konzentriert an. Wenn du\n"
+ "dich aber bewegst, hüpft es weg, um sich\n"
+ "in Sicherheit zu bringen.");
+
+static const u8 DexDescription_Xatu_1[] = _(
+ "XATU bleibt den ganzen Tag an ein und\n"
+ "demselben Ort wie angewurzelt stehen. \n"
+ "Die Menschen glauben, dass es dies aus");
+static const u8 DexDescription_Xatu_2[] = _(
+ "Angst vor den Dingen tut, die es für die\n"
+ "Zukunft vorausgesehen hat.");
+
+static const u8 DexDescription_Voltilamm_1[] = _(
+ "VOLTILAMMs flauschiges, wollenes Fell\n"
+ "erzeugt Reibung und statische\n"
+ "Aufladung. Je höher die elektrische");
+static const u8 DexDescription_Voltilamm_2[] = _(
+ "Ladung wird, desto heller leuchtet die\n"
+ "Glühbirne an seinem Schweif.");
+
+static const u8 DexDescription_Waaty_1[] = _(
+ "Die Qualität von WAATYs Wolle verändert\n"
+ "sich, so dass es mit nur wenig Wolle eine\n"
+ "große statische Aufladung erzeugen");
+static const u8 DexDescription_Waaty_2[] = _(
+ "kann. Die kahlen Stellen in seinem Fell\n"
+ "sind gegen Elektrizität abgeschirmt.");
+
+static const u8 DexDescription_Ampharos_1[] = _(
+ "AMPHAROS strahlt so viel Licht aus,\n"
+ "dass es sogar aus dem Weltraum noch \n"
+ "gesehen werden kann. In der Antike");
+static const u8 DexDescription_Ampharos_2[] = _(
+ "benutzten die Menschen das Licht\n"
+ "dieses POKéMON dazu, Signale über\n"
+ "weite Entfernungen auszutauschen.");
+
+static const u8 DexDescription_Blubella_1[] = _(
+ "Wenn BLUBELLA starkem Sonnenlicht\n"
+ "ausgesetzt ist, beginnen sich die Blät-\n"
+ "ter an seinem Körper zu drehen.");
+static const u8 DexDescription_Blubella_2[] = _(
+ "Der Tanz dieses POKéMON ist in\n"
+ "südlichen Ländern sehr bekannt.");
+
+static const u8 DexDescription_Marill_1[] = _(
+ "MARILLs Schweif ist mit Öl gefüllt und\n"
+ "dient ihm als eine Art Rettungsring.\n"
+ "Wenn nur sein Schweif an der");
+static const u8 DexDescription_Marill_2[] = _(
+ "Wasseroberfläche zu sehen ist, taucht\n"
+ "dieses POKéMON gerade, um sich von\n"
+ "Wasserpflanzen zu ernähren.");
+
+static const u8 DexDescription_Azumarill_1[] = _(
+ "AZUMARILLs lange Ohren dienen ihm\n"
+ "als unentbehrliche Sensoren. Wenn es\n"
+ "sein Gehör fokussiert, kann dieses");
+static const u8 DexDescription_Azumarill_2[] = _(
+ "POKéMON auch in reißenden Flüssen\n"
+ "identifizieren, welche Art von Beute\n"
+ "sich in seiner Nähe befindet.");
+
+static const u8 DexDescription_Mogelbaum_1[] = _(
+ "MOGELBAUM tarnt sich als Baum, um\n"
+ "Angriffen von Feinden aus dem Weg\n"
+ "zu gehen. Da seine Vorderbeine aber");
+static const u8 DexDescription_Mogelbaum_2[] = _(
+ "das ganze Jahr über grün bleiben, fällt\n"
+ "seine Tarnung im Winter leicht auf.");
+
+static const u8 DexDescription_Quaxo_1[] = _(
+ "QUAXO hat gelocktes Haar, das ihm den\n"
+ "Status eines Königs bescheinigt. Je\n"
+ "länger und lockiger sein Haar ist, desto");
+static const u8 DexDescription_Quaxo_2[] = _(
+ "mehr Respekt erntet dieses POKéMON\n"
+ "von seinen Artgenossen.");
+
+static const u8 DexDescription_Hoppspross_1[] = _(
+ "HOPPSPROSS lässt sich vom Wind\n"
+ "treiben. Wenn es bemerkt, dass ein\n"
+ "Sturm aufkommt, verbindet es seine");
+static const u8 DexDescription_Hoppspross_2[] = _(
+ "Blätter mit anderen HOPPSPROSS,\n"
+ "damit es nicht davongeweht wird.");
+
+static const u8 DexDescription_Hubelupf_1[] = _(
+ "HUBELUPFs Blume beginnt zu blühen, wenn\n"
+ "die Temperatur über 18 Grad steigt. Wie\n"
+ "weit sich die Blüte öffnet, hängt von");
+static const u8 DexDescription_Hubelupf_2[] = _(
+ "der Höhe der Temperatur ab. Daher wird\n"
+ "dieses POKéMON manchmal als\n"
+ "Thermometer eingesetzt.");
+
+static const u8 DexDescription_Papungha_1[] = _(
+ "PAPUNGHA nutzt den Südwind, um das\n"
+ "Meer zu überqueren und in ferne\n"
+ "Länder zu fliegen. Dieses POKéMON");
+static const u8 DexDescription_Papungha_2[] = _(
+ "sinkt zu Boden, wenn es während seines\n"
+ "Fluges auf kalte Luftschichten stößt.");
+
+static const u8 DexDescription_Griffel_1[] = _(
+ "An GRIFFELs Schweif befindet sich ein\n"
+ "handähnliches Anhängsel, mit dem es\n"
+ "geschickt zu Werke gehen kann.");
+static const u8 DexDescription_Griffel_2[] = _(
+ "Da dieses POKéMON sehr häufig seinen\n"
+ "Schweif einsetzt, wirken seine Hände\n"
+ "eher plump.");
+
+static const u8 DexDescription_Sonnkern_1[] = _(
+ "SONNKERN versucht, sich so wenig wie\n"
+ "möglich zu bewegen, um alle\n"
+ "gespeicherten Nährstoffe für seine");
+static const u8 DexDescription_Sonnkern_2[] = _(
+ "Entwicklung aufzusparen. Außer\n"
+ "Morgentau nimmt es nichts weiter zu\n"
+ "sich.");
+
+static const u8 DexDescription_Sonnflora_1[] = _(
+ "SONNFLORA verwandelt Solarenergie in\n"
+ "Nährstoffe. Tagsüber, wenn es warm ist,\n"
+ "ist es sehr aktiv.");
+static const u8 DexDescription_Sonnflora_2[] = _(
+ "Wenn aber die Sonne untergegangen ist,\n"
+ "hört es auf sich zu bewegen.");
+
+static const u8 DexDescription_Yanma_1[] = _(
+ "YANMA hat einen Blickwinkel von 360\n"
+ "Grad, ohne die Augen bewegen zu müssen.\n"
+ "Es ist ein großartiger Flieger und geübt");
+static const u8 DexDescription_Yanma_2[] = _(
+ "darin, plötzlich anzuhalten oder\n"
+ "Wendemanöver vorzunehmen. So kann es\n"
+ "sich blitzschnell auf Beute stürzen.");
+
+static const u8 DexDescription_Felino_1[] = _(
+ "FELINO lebt eigentlich im Wasser.\n"
+ "Manchmal kommt es jedoch an Land, um \n"
+ "nach Nahrung zu suchen.");
+static const u8 DexDescription_Felino_2[] = _(
+ "An Land bedeckt es seinen Körper mit\n"
+ "einem schleimigen Giftfilm.");
+
+static const u8 DexDescription_Morlord_1[] = _(
+ "MORLORD jagt seine Nahrung, indem es im\n"
+ "Wasser sein Maul weit aufmacht und\n"
+ "auf unvorsichtige Beute wartet.");
+static const u8 DexDescription_Morlord_2[] = _(
+ "Da sich dieses POKéMON nicht bewegt,\n"
+ "wird es auch nicht besonders hungrig.");
+
+static const u8 DexDescription_Psiana_1[] = _(
+ "PSIANA ist jedem TRAINER treu, dem es\n"
+ "zugetan ist. Dieses POKéMON hat die\n"
+ "Fähigkeit der Prophezeiung entwickelt,");
+static const u8 DexDescription_Psiana_2[] = _(
+ "um seine TRAINER vor Unheil zu\n"
+ "bewahren.");
+
+static const u8 DexDescription_Nachtara_1[] = _(
+ "NACHTARA hat sich dadurch entwickelt,\n"
+ "dass es den Mondwellen ausgesetzt war.\n"
+ "Es versteckt sich im Schutze der");
+static const u8 DexDescription_Nachtara_2[] = _(
+ "Dunkelheit und wartet darauf, dass sich\n"
+ "ein Feind bewegt. Die Ringe an seinem\n"
+ "Körper leuchten auf, wenn es angreift.");
+
+static const u8 DexDescription_Kramurx_1[] = _(
+ "KRAMURX wurde als vermeintlicher\n"
+ "Überbringer des Unheils verabscheut\n"
+ "und gefürchtet. Dieses POKéMON hat");
+static const u8 DexDescription_Kramurx_2[] = _(
+ "ein großes Interesse an allem, was\n"
+ "funkelt und glitzert. Es stiehlt auch\n"
+ "Ringe von Frauen.");
+
+static const u8 DexDescription_Laschoking_1[] = _(
+ "LASCHOKING betreibt jeden Tag \n"
+ "Forschung, um die Geheimnisse der Welt\n"
+ "zu lüften. Dieses POKéMON vergisst aber");
+static const u8 DexDescription_Laschoking_2[] = _(
+ "alles, was es bereits herausgefunden\n"
+ "hat, wenn das MUSCHAS auf seinem\n"
+ "Kopf abfällt.");
+
+static const u8 DexDescription_Traunfugil_1[] = _(
+ "TRAUNFUGIL erschreckt Menschen mit\n"
+ "einem markerschütternden Schrei.\n"
+ "Dieses POKéMON verwendet seine roten");
+static const u8 DexDescription_Traunfugil_2[] = _(
+ "Kraftfelder dazu, die Ängste seiner\n"
+ "Feinde aufzunehmen und sie in\n"
+ "Nahrung umzuwandeln.");
+
+static const u8 DexDescription_Icognito_1[] = _(
+ "ICOGNITO hat die Form antiker\n"
+ "Schriftzeichen. Bis heute ist unklar,\n"
+ "was zuerst da war: Die antiken");
+static const u8 DexDescription_Icognito_2[] = _(
+ "Schriftzeichen oder die vielen unter-\n"
+ "schiedlichen ICOGNITO. Trotz umfang-\n"
+ "reicher Forschung bleiben Fragen offen.");
+
+static const u8 DexDescription_Woingenau_1[] = _(
+ "Wenn zwei oder mehr WOINGENAU \n"
+ "aufeinander treffen, versuchen sie,\n"
+ "gegenseitig ihre Geduld zu übertreffen.");
+static const u8 DexDescription_Woingenau_2[] = _(
+ "Sie möchten herausfinden, welches\n"
+ "POKéMON es am längsten ohne Nahrung\n"
+ "aushält. Darauf müssen Trainer achten.");
+
+static const u8 DexDescription_Girafarig_1[] = _(
+ "Der Kopf an GIRAFARIGs Hinterteil hat\n"
+ "ein eigenes Gehirn. Er reagiert mit\n"
+ "Angriffen auf Gerüche und Geräusche.");
+static const u8 DexDescription_Girafarig_2[] = _(
+ "Wenn man sich diesem POKéMON von\n"
+ "hinten nähert, könnte der hintere Kopf\n"
+ "plötzlich vorschnellen und zubeißen.");
+
+static const u8 DexDescription_Tannza_1[] = _(
+ "TANNZA hängt an Ästen und wartet auf\n"
+ "Beute. Wenn man dieses POKéMON bei\n"
+ "einer Mahlzeit stört, indem man den");
+static const u8 DexDescription_Tannza_2[] = _(
+ "Baum, auf dem es sich befindet,\n"
+ "schüttelt, fällt es herunter und\n"
+ "explodiert ohne Vorwarnung.");
+
+static const u8 DexDescription_Forstellka_1[] = _(
+ "FORSTELLKA versteckt sich in seiner\n"
+ "stahlharten Schale. Die Schale öffnet\n"
+ "sich, wenn es nach Beute schnappt.");
+static const u8 DexDescription_Forstellka_2[] = _(
+ "Dies geht jedoch so schnell, dass man\n"
+ "das Innere der Schale nicht zu Gesicht\n"
+ "bekommt.");
+
+static const u8 DexDescription_Dummisel_1[] = _(
+ "DUMMISEL hat einen Bohrer als Schweif.\n"
+ "Diesen benutzt es, um sich rückwärts in\n"
+ "den Boden einzugraben.");
+static const u8 DexDescription_Dummisel_2[] = _(
+ "Dieses POKéMON baut seinen \n"
+ "Nestkomplex tief unter der\n"
+ "Erdoberfläche auf.");
+
+static const u8 DexDescription_Skorgla_1[] = _(
+ "SKORGLA segelt lautlos durch die Lüfte.\n"
+ "Es verankert sich mit Hilfe der Krallen\n"
+ "an seinen Hinterbeinen und der riesigen");
+static const u8 DexDescription_Skorgla_2[] = _(
+ "Scheren an seinen Vorderbeinen am\n"
+ "Gesicht eines Feindes fest und\n"
+ "vergiftet ihn mit seinem Giftstachel.");
+
+static const u8 DexDescription_Stahlos_1[] = _(
+ "STAHLOS lebt noch tiefer unter der Erde\n"
+ "als ONIX. Dieses POKéMON gräbt immer\n"
+ "in Richtung des Erdkerns.");
+static const u8 DexDescription_Stahlos_2[] = _(
+ "Nachweislich hat dieses POKéMON\n"
+ "bereits Tiefen von einem Kilometer\n"
+ "erreicht.");
+
+static const u8 DexDescription_Snubbull_1[] = _(
+ "Indem es seine Zähne fletscht und\n"
+ "ein Furcht erregendes Gesicht macht,\n"
+ "schlägt SNUBBULL kleinere POKéMON");
+static const u8 DexDescription_Snubbull_2[] = _(
+ "in die Flucht. Es scheint darüber jedoch\n"
+ "etwas traurig zu sein.");
+
+static const u8 DexDescription_Granbull_1[] = _(
+ "GRANBULL besitzt einen besonders\n"
+ "ausgeprägten Unterkiefer. Wegen seiner\n"
+ "schweren Zähne wackelt es mit dem Kopf.");
+static const u8 DexDescription_Granbull_2[] = _(
+ "Es beißt nur zu, wenn es erschreckt\n"
+ "wird.");
+
+static const u8 DexDescription_Baldorfish_1[] = _(
+ "BALDORFISH saugt Wasser ein, um sich\n"
+ "aufzublasen. Dieses POKéMON nutzt den\n"
+ "Druck des Wassers dazu, giftige");
+static const u8 DexDescription_Baldorfish_2[] = _(
+ "Stacheln aus seinem Körper zu\n"
+ "verschießen. Es betrachtet Schwimmen\n"
+ "als eine echte Herausforderung.");
+
+static const u8 DexDescription_Scherox_1[] = _(
+ "SCHEROX’ Körper ist hart wie Stahl.\n"
+ "Gewöhnliche Angriffe jagen ihm keine\n"
+ "Angst ein. Dieses POKéMON schlägt");
+static const u8 DexDescription_Scherox_2[] = _(
+ "mit den Flügeln, um seine\n"
+ "Körpertemperatur zu regulieren.");
+
+static const u8 DexDescription_Pottrott_1[] = _(
+ "POTTROTT versteckt sich leise unter\n"
+ "Steinen und verbirgt seinen Körper in\n"
+ "seiner harten Schale, wenn es");
+static const u8 DexDescription_Pottrott_2[] = _(
+ "gesammelte Beeren zu sich nimmt. Die\n"
+ "Beeren vermischen sich mit seinen\n"
+ "Körperflüssigkeiten zu einem Saft.");
+
+static const u8 DexDescription_Skaraborn_1[] = _(
+ "SKARABORN geht direkt auf seinen\n"
+ "Gegner los, rutscht auf ihn zu, um ihn\n"
+ "auszuhebeln und mit seinem mächtigen");
+static const u8 DexDescription_Skaraborn_2[] = _(
+ "Horn wegzuschleudern. Dieses POKéMON\n"
+ "hat genug Kraft, um einen massigen\n"
+ "Baum umzustoßen.");
+
+static const u8 DexDescription_Sniebel_1[] = _(
+ "SNIEBEL klettert an Bäumen hoch, indem\n"
+ "es seine hakenförmigen Krallen in die\n"
+ "Rinde schlägt. Dieses POKéMON sucht");
+static const u8 DexDescription_Sniebel_2[] = _(
+ "nach unbewachten Nestern und stiehlt\n"
+ "die Eier, wenn die Eltern auf Nahrungs-\n"
+ "suche sind. Davon ernährt es sich.");
+
+static const u8 DexDescription_Teddiursa_1[] = _(
+ "TEDDIURSA leckt gern seine mit Honig\n"
+ "bedeckten Pranken ab. Dieses POKéMON\n"
+ "bereitet seinen eigenen Honig zu, indem");
+static const u8 DexDescription_Teddiursa_2[] = _(
+ "es die von BIBOR gesammelten Früchte\n"
+ "und Pollen miteinander vermengt.");
+
+static const u8 DexDescription_Ursaring_1[] = _(
+ "In den von URSARING bewohnten Wäldern\n"
+ "gibt es viele Flüsse und hohe Bäume, in\n"
+ "denen es Nahrung findet. Dieses");
+static const u8 DexDescription_Ursaring_2[] = _(
+ "POKéMON läuft täglich durch den Wald,\n"
+ "um nach Essbarem zu suchen.");
+
+static const u8 DexDescription_Schneckmag_1[] = _(
+ "Durch SCHNECKMAGs Kreislaufsystem\n"
+ "fließt Magma. Wenn dieses POKéMON\n"
+ "erkältet ist, kühlt das Magma");
+static const u8 DexDescription_Schneckmag_2[] = _(
+ "aus und erhärtet. Sein Körper wird\n"
+ "spröde und es brechen Stücke heraus,\n"
+ "so dass es kleiner wird.");
+
+static const u8 DexDescription_Magcargo_1[] = _(
+ "MAGCARGOs Schale ist eigentlich seine\n"
+ "Haut, die erhärtet ist, als es auskühlte.\n"
+ "Seine Schale ist sehr spröde und");
+static const u8 DexDescription_Magcargo_2[] = _(
+ "zerbrechlich. Schon bei einer leichten\n"
+ "Berührung bricht sie auseinander. Dann\n"
+ "muss es ein Bad in Magma nehmen.");
+
+static const u8 DexDescription_Quiekel_1[] = _(
+ "Auf Nahrungssuche schnüffelt QUIEKEL\n"
+ "am Boden entlang. Seine \n"
+ "Lieblingsspeise ist ein Pilz, der unter");
+static const u8 DexDescription_Quiekel_2[] = _(
+ "verwesendem Gras wächst. \n"
+ "Manchmal spürt dieses POKéMON heiße\n"
+ "Quellen auf.");
+
+static const u8 DexDescription_Keifel_1[] = _(
+ "KEIFEL hat ein dichtes Fell aus langen\n"
+ "Haaren. Dadurch ist es gegen eisige\n"
+ "Kälte gewappnet.");
+static const u8 DexDescription_Keifel_2[] = _(
+ "Dieses POKéMON benutzt seine\n"
+ "Hauer, um an Nahrung zu gelangen, die\n"
+ "unter dem Eis eingeschlossen ist.");
+
+static const u8 DexDescription_Corasonn_1[] = _(
+ "Wenn CORASONNs Arme Sonnenlicht\n"
+ "abbekommen, glitzern sie wunderschön\n"
+ "in sieben Farben. Wenn ein Arm");
+static const u8 DexDescription_Corasonn_2[] = _(
+ "abbricht, wächst über Nacht ein neuer\n"
+ "nach.");
+
+static const u8 DexDescription_Remoraid_1[] = _(
+ "REMORAID saugt Wasser ein und spritzt\n"
+ "es unter Einsatz seiner Bauchmuskeln\n"
+ "mit Hochdruck wieder heraus. So schießt");
+static const u8 DexDescription_Remoraid_2[] = _(
+ "es fliegende Beute ab. Wenn seine\n"
+ "Entwicklung näher rückt, wandert\n"
+ "dieses POKéMON flussabwärts.");
+
+static const u8 DexDescription_Octillery_1[] = _(
+ "OCTILLERY saugt sich mit seinen\n"
+ "Tentakeln an einem Feind fest. Dieses\n"
+ "POKéMON betäubt seinen Gegner,");
+static const u8 DexDescription_Octillery_2[] = _(
+ "bevor es ihm den Rest gibt.\n"
+ "Wenn ein Feind zu stark ist, speit es\n"
+ "Tinte aus und flüchtet.");
+
+static const u8 DexDescription_Botogel_1[] = _(
+ "BOTOGEL sammelt seine Nahrung in\n"
+ "seinem Schweif. Es gab einmal einen\n"
+ "berühmten Entdecker, der es dank eines");
+static const u8 DexDescription_Botogel_2[] = _(
+ "BOTOGELs geschafft hat, einen der\n"
+ "höchsten Berge der Welt zu besteigen.\n"
+ "Es hatte seine Nahrung mit ihm geteilt.");
+
+static const u8 DexDescription_Mantax_1[] = _(
+ "An schönen Tagen sieht man Schwärme\n"
+ "von MANTAX elegant über die Wellen des\n"
+ "Ozeans springen.");
+static const u8 DexDescription_Mantax_2[] = _(
+ "Durch REMORAID, die an ihm haften\n"
+ "und ihn begleiten, fühlt sich dieses\n"
+ "POKéMON nicht belästigt.");
+
+static const u8 DexDescription_Panzaeron_1[] = _(
+ "PANZAERON ist komplett in einen harten,\n"
+ "schützenden Panzer eingehüllt. Dieses\n"
+ "POKéMON fliegt 300 km/h.");
+static const u8 DexDescription_Panzaeron_2[] = _(
+ "Es greift seine Feinde mit seinen\n"
+ "messerscharfen Flügeln an.");
+
+static const u8 DexDescription_Hunduster_1[] = _(
+ "HUNDUSTER jagen in Gruppen. Sie\n"
+ "kommunizieren miteinander über\n"
+ "verschiedene Arten von Geheul und");
+static const u8 DexDescription_Hunduster_2[] = _(
+ "treiben ihre Feinde in die Enge.\n"
+ "Die Zusammenarbeit dieser POKéMON\n"
+ "ist einzigartig.");
+
+static const u8 DexDescription_Hundemon_1[] = _(
+ "In einer Gruppe von HUNDEMON ist\n"
+ "dasjenige mit den nach hinten\n"
+ "gebogenen Hörnern der Anführer.");
+static const u8 DexDescription_Hundemon_2[] = _(
+ "Diese POKéMON bestimmen ihren Anführer\n"
+ "durch das Ausfechten von Kämpfen\n"
+ "untereinander.");
+
+static const u8 DexDescription_Seedraking_1[] = _(
+ "SEEDRAKING lebt in den Tiefen des\n"
+ "Ozeans, die ansonsten verwaist sind.\n"
+ "Lange hat man geglaubt, dass das");
+static const u8 DexDescription_Seedraking_2[] = _(
+ "Gähnen dieses POKéMON Strudel auslöst.");
+
+static const u8 DexDescription_Phanpy_1[] = _(
+ "Um sich ein Nest zu bauen, gräbt\n"
+ "PHANPY am Flussufer ein Loch ins\n"
+ "Erdreich. Es markiert die Umgebung");
+static const u8 DexDescription_Phanpy_2[] = _(
+ "seines Nests mit Hilfe seines Rüssels,\n"
+ "damit seine Artgenossen wissen, dass\n"
+ "dieses Gebiet vergeben ist.");
+
+static const u8 DexDescription_Donphan_1[] = _(
+ "DONPHANs Lieblingsattacke ist es, als\n"
+ "Ball zusammengerollt mit voller Wucht\n"
+ "gegen seine Gegner zu krachen.");
+static const u8 DexDescription_Donphan_2[] = _(
+ "Wenn es erst einmal rollt, ist dieses\n"
+ "POKéMON nur schwer aufzuhalten.");
+
+static const u8 DexDescription_Porygon2_1[] = _(
+ "PORYGON2 wurde in einem\n"
+ "wissenschaftlichen Experiment von\n"
+ "Menschen erzeugt. Es verfügt über");
+static const u8 DexDescription_Porygon2_2[] = _(
+ "künstliche Intelligenz, wodurch es \n"
+ "selbstständig neue Gesten und Gefühle\n"
+ "erlernen kann.");
+
+static const u8 DexDescription_Damhirplex_1[] = _(
+ "DAMHIRPLEX hat ein prächtiges Geweih,\n"
+ "für das hohe Preise gezahlt werden, da\n"
+ "sie als Kunstwerke gelten.");
+static const u8 DexDescription_Damhirplex_2[] = _(
+ "Daher wurde dieses POKéMON gejagt und\n"
+ "wäre beinahe ausgestorben.");
+
+static const u8 DexDescription_Farbeagle_1[] = _(
+ "FARBEAGLE markiert sein Revier mit\n"
+ "einer Flüssigkeit, die aus seiner\n"
+ "Schweifspitze austritt.");
+static const u8 DexDescription_Farbeagle_2[] = _(
+ "Es wurden über 5000 unterschiedliche\n"
+ "Markierungen entdeckt, die dieses\n"
+ "POKéMON hinterlassen hat.");
+
+static const u8 DexDescription_Rabauz_1[] = _(
+ "RABAUZ muss jeden Tag trainieren,\n"
+ "sonst ist es nicht ausgelastet und\n"
+ "reagiert gestresst. Wenn man dieses");
+static const u8 DexDescription_Rabauz_2[] = _(
+ "POKéMON trainiert, muss man\n"
+ "zahlreiche Trainingsmethoden\n"
+ "einsetzen und sie ständig ausbauen.");
+
+static const u8 DexDescription_Kapoera_1[] = _(
+ "KAPOERA dreht sich auf dem Kopf\n"
+ "stehend um die eigene Achse und teilt\n"
+ "Tritte aus. Seine Technik ist eine");
+static const u8 DexDescription_Kapoera_2[] = _(
+ "bemerkenswerte Mischung aus Angriff \n"
+ "und Verteidigung. Es bewegt sich \n"
+ "drehend schneller voran als laufend.");
+
+static const u8 DexDescription_Kussilla_1[] = _(
+ "KUSSILLA läuft hektisch umher, fällt\n"
+ "aber auch ziemlich oft hin. Es lässt\n"
+ "keine Möglichkeit aus sein Spiegelbild");
+static const u8 DexDescription_Kussilla_2[] = _(
+ "zu betrachten, um sicherzustellen,\n"
+ "dass sein Gesicht nicht schmutzig\n"
+ "geworden ist.");
+
+static const u8 DexDescription_Elekid_1[] = _(
+ "ELEKID speichert Elektrizität in seinem\n"
+ "Körper. Wenn es Metall berührt und\n"
+ "versehentlich die aufgestaute Energie");
+static const u8 DexDescription_Elekid_2[] = _(
+ "entlädt, rotiert es mit den Armen, um\n"
+ "sich wieder aufzuladen.");
+
+static const u8 DexDescription_Magby_1[] = _(
+ "MAGBYs Gesundheitszustand kann man\n"
+ "am Feuer erkennen, das es ausatmet.\n"
+ "Wenn es gelbe Flammen ausstößt, ist es");
+static const u8 DexDescription_Magby_2[] = _(
+ "in guter Verfassung. Ist es erschöpft,\n"
+ "vermischen sich die Flammen mit\n"
+ "schwarzem Rauch.");
+
+static const u8 DexDescription_Miltank_1[] = _(
+ "MILTANK gibt täglich 20 Liter Milch.\n"
+ "Sie ist süßlich und wird von Kindern und\n"
+ "Erwachsenen gleichermaßen genossen.");
+static const u8 DexDescription_Miltank_2[] = _(
+ "Menschen, die keine Milch trinken,\n"
+ "essen sie stattdessen als Joghurt.");
+
+static const u8 DexDescription_Heiteira_1[] = _(
+ "HEITEIRA nimmt mit seinem flauschigen\n"
+ "Fell Traurigkeit wahr. Es hastet zu\n"
+ "einer traurigen Person, egal, wie weit");
+static const u8 DexDescription_Heiteira_2[] = _(
+ "diese entfernt ist und teilt ein \n"
+ "GLÜCKS-EI mit ihr, um sie zum Lächeln\n"
+ "zu bringen.");
+
+static const u8 DexDescription_Raikou_1[] = _(
+ "RAIKOU ist so schnell wie der Blitz. Das\n"
+ "Gebrüll dieses POKéMON sendet\n"
+ "Schockwellen aus, die wie Donnerschläge");
+static const u8 DexDescription_Raikou_2[] = _(
+ "durch die Luft beben und den Boden\n"
+ "erschüttern.");
+
+static const u8 DexDescription_Entei_1[] = _(
+ "ENTEI verfügt über die Leidenschaft\n"
+ "von Magma. Dieses POKéMON wurde\n"
+ "bei einem Vulkanausbruch geboren");
+static const u8 DexDescription_Entei_2[] = _(
+ "und bringt Feuersbrünste hervor, die\n"
+ "alles auslöschen, was mit ihnen in\n"
+ "Kontakt kommt.");
+
+static const u8 DexDescription_Suicune_1[] = _(
+ "SUICUNE wohnt die Reinheit einer\n"
+ "Quelle inne. Es bewegt sich graziös und \n"
+ "hat die Macht, schmutziges Wasser zu");
+static const u8 DexDescription_Suicune_2[] = _(
+ "reinigen.");
+
+static const u8 DexDescription_Larvitar_1[] = _(
+ "LARVITAR wurde tief unter der Erde\n"
+ "geboren. Um an die Oberfläche zu\n"
+ "gelangen, muss es sich durch das");
+static const u8 DexDescription_Larvitar_2[] = _(
+ "Erdreich fressen. Erst dann bekommt es\n"
+ "seine Eltern zu Gesicht.");
+
+static const u8 DexDescription_Pupitar_1[] = _(
+ "PUPITAR erzeugt in seinem Körper ein\n"
+ "Gas, das es komprimiert und kraftvoll\n"
+ "ausstößt, um sich wie ein");
+static const u8 DexDescription_Pupitar_2[] = _(
+ "Düsenflugzeug anzutreiben. Sein\n"
+ "Körper ist sehr robust und er hält\n"
+ "auch massivem Stahl stand.");
+
+static const u8 DexDescription_Despotar_1[] = _(
+ "DESPOTAR ist erstaunlich stark. Es\n"
+ "kann einen ganzen Berg vernichten, um\n"
+ "sein Nest zu bauen. Dieses POKéMON");
+static const u8 DexDescription_Despotar_2[] = _(
+ "wandert in den Bergen umher und sucht\n"
+ "nach Gegnern für einen Kampf.");
+
+static const u8 DexDescription_Lugia_1[] = _(
+ "LUGIAs Flügel haben eine\n"
+ "zerstörerische Kraft. Bereits ein\n"
+ "leichtes Flattern kann Häuser");
+static const u8 DexDescription_Lugia_2[] = _(
+ "hinfortwehen. Daher hat sich dieses\n"
+ "POKéMON dafür entschieden, tief unter\n"
+ "dem Meer zu leben, wo es niemand sieht.");
+
+static const u8 DexDescription_HoOh_1[] = _(
+ "HO-OHs Federn leuchten in sieben\n"
+ "Farben, je nachdem aus welchem Winkel\n"
+ "das Licht auf sie fällt.");
+static const u8 DexDescription_HoOh_2[] = _(
+ "Die Federn sollen ihrem Besitzer Glück\n"
+ "bringen. Dieses POKéMON lebt am Fuße\n"
+ "eines Regenbogens.");
+
+static const u8 DexDescription_Celebi_1[] = _(
+ "Dieses POKéMON kommt aus der Zukunft\n"
+ "und ist durch die Zeit gereist. Solange\n"
+ "CELEBI auftaucht,");
+static const u8 DexDescription_Celebi_2[] = _(
+ "ist der Menschheit angeblich eine\n"
+ "rosige Zukunft beschieden.");
+
+static const u8 DexDescription_Geckarbor_1[] = _(
+ "Mit den kleinen Haken unter seinen\n"
+ "Füßen kann GECKARBOR an Wänden\n"
+ "hochklettern. Dieses POKéMON greift");
+static const u8 DexDescription_Geckarbor_2[] = _(
+ "Feinde an, indem es mit seinem\n"
+ "mächtigen Schweif zuschlägt.");
+
+static const u8 DexDescription_Reptain_1[] = _(
+ "REPTAIN kann sich mit den Blättern, die\n"
+ "aus seinem Körper herauswachsen, im\n"
+ "Wald hervorragend tarnen.");
+static const u8 DexDescription_Reptain_2[] = _(
+ "Dieses POKéMON ist ein wahrer Meister\n"
+ "darin, auf die Bäume des Dschungels zu\n"
+ "klettern.");
+
+static const u8 DexDescription_Gewaldro_1[] = _(
+ "Die Blätter, die auf GEWALDROs Körper\n"
+ "wachsen, sind sehr scharfkantig. Dieses\n"
+ "POKéMON ist sehr agil. Es hüpft von");
+static const u8 DexDescription_Gewaldro_2[] = _(
+ "Ast zu Ast und springt seine Feinde\n"
+ "von oben oder hinten an.");
+
+static const u8 DexDescription_Flemmli_1[] = _(
+ "FLEMMLI hängt an seinem Trainer wie\n"
+ "eine Klette. Es schlurft immer hinter ihm\n"
+ "her. Dieses POKéMON spuckt 1000 Grad");
+static const u8 DexDescription_Flemmli_2[] = _(
+ "heißes Feuer, das seinen Feinden\n"
+ "ordentlich einheizt.");
+
+static const u8 DexDescription_Jungglut_1[] = _(
+ "JUNGGLUT trainiert seine Beine und\n"
+ "Oberschenkel, indem es über Felder und\n"
+ "Berge läuft. Die Beine dieses POKéMON");
+static const u8 DexDescription_Jungglut_2[] = _(
+ "sind sowohl schnell als auch kräftig,\n"
+ "so dass es 10 Tritte pro Sekunde\n"
+ "ausführen kann.");
+
+static const u8 DexDescription_Lohgock_1[] = _(
+ "LOHGOCK stößt heftige Flammen aus\n"
+ "seinen Handgelenken aus und greift\n"
+ "seine Feinde mutig an. Je stärker ein");
+static const u8 DexDescription_Lohgock_2[] = _(
+ "Feind ist, desto stärker lodern die\n"
+ "Handgelenke dieses POKéMON.");
+
+static const u8 DexDescription_Hydropi_1[] = _(
+ "Die Flosse an HYDROPIs Kopf dient als\n"
+ "hochempfindliches Radar. Damit kann es\n"
+ "Bewegungen im Wasser und in der Luft");
+static const u8 DexDescription_Hydropi_2[] = _(
+ "wahrnehmen. So weiß es jederzeit, was\n"
+ "in seiner Umgebung passiert, ohne\n"
+ "dabei seine Augen zu benutzen.");
+
+static const u8 DexDescription_Moorabbel_1[] = _(
+ "MOORABBELs Körper ist mit einem\n"
+ "klebrigen Film überzogen, durch den es\n"
+ "an Land überleben kann. Dieses POKéMON");
+static const u8 DexDescription_Moorabbel_2[] = _(
+ "spielt bei Ebbe in den Schlammpfützen\n"
+ "am Strand.");
+
+static const u8 DexDescription_Sumpex_1[] = _(
+ "SUMPEX ist sehr stark. Es kann mit\n"
+ "Leichtigkeit einen Felsblock bewegen,\n"
+ "der über eine Tonne wiegt.");
+static const u8 DexDescription_Sumpex_2[] = _(
+ "Weiterhin ist es mit einem exzellenten\n"
+ "Sehvermögen ausgestattet, wodurch es\n"
+ "auch in trüben Gewässern sehen kann.");
+
+static const u8 DexDescription_Fiffyen_1[] = _(
+ "Sobald FIFFYEN eine Bewegung wahr-\n"
+ "nimmt, schnappt es zu. Es jagt seine\n"
+ "Beute so lange, bis sie vollkommen");
+static const u8 DexDescription_Fiffyen_2[] = _(
+ "erschöpft ist. Wenn sich die Beute\n"
+ "allerdings wehrt, kann es passieren, \n"
+ "dass FIFFYEN klein beigibt und flieht.");
+
+static const u8 DexDescription_Magnayen_1[] = _(
+ "MAGNAYEN sendet deutliche Signale\n"
+ "aus, wenn es sich auf einen Angriff\n"
+ "vorbereitet. Es knurrt heftig und macht");
+static const u8 DexDescription_Magnayen_2[] = _(
+ "sich flach. Dieses POKéMON kann mit\n"
+ "seinen spitzen Zähnen brutal zubeißen.");
+
+static const u8 DexDescription_Zigzachs_1[] = _(
+ "ZIGZACHS ist ein rastloser Wanderer.\n"
+ "Dieses POKéMON ist nämlich sehr\n"
+ "neugierig und es inspiziert alles,");
+static const u8 DexDescription_Zigzachs_2[] = _(
+ "was ihm zufällig begegnet.");
+
+static const u8 DexDescription_Geradaks_1[] = _(
+ "GERADAKS rennt immer mit vollem Tempo\n"
+ "und nie im Zickzack, sondern nur gerade.\n"
+ "Wenn ihm ein Hindernis im Weg ist,");
+static const u8 DexDescription_Geradaks_2[] = _(
+ "läuft es rechtwinklig daran vorbei. Für\n"
+ "dieses POKéMON stellen leichte Kurven\n"
+ "eine große Herausforderung dar.");
+
+static const u8 DexDescription_Waumpel_1[] = _(
+ "WAUMPEL kann mit den Stacheln an\n"
+ "seinem Hinterteil die Rinde von Bäumen\n"
+ "entfernen und ernährt sich von dem");
+static const u8 DexDescription_Waumpel_2[] = _(
+ "austretenden Saft. An den Füßen dieses\n"
+ "POKéMON befinden sich Saugnäpfe, mit\n"
+ "denen es auch an Glas nicht abrutscht.");
+
+static const u8 DexDescription_Schaloko_1[] = _(
+ "SCHALOKO bindet sich mit einem\n"
+ "Seidenfaden an einen Ast. Es baumelt\n"
+ "dort und wartet auf seine Entwicklung.");
+static const u8 DexDescription_Schaloko_2[] = _(
+ "Durch ein kleines Loch in seinem\n"
+ "Seidenkokon lugt es heraus.");
+
+static const u8 DexDescription_Papinella_1[] = _(
+ "PAPINELLAs Lieblingsspeise ist\n"
+ "Blütenstaub. Wenn du dieses POKéMON\n"
+ "beobachten möchtest, musst du bloß");
+static const u8 DexDescription_Papinella_2[] = _(
+ "einen Blumentopf vor ein geöffnetes\n"
+ "Fenster stellen. PAPINELLA wird sich\n"
+ "diese Leckerei nicht entgehen lassen.");
+
+static const u8 DexDescription_Panekon_1[] = _(
+ "PANEKON baut seinen schützenden\n"
+ "Kokon, indem es seinen Körper mit\n"
+ "feiner Seide einwickelt, die aus seinem");
+static const u8 DexDescription_Panekon_2[] = _(
+ "Mund austritt. Wenn sein Körper mit\n"
+ "Seide bedeckt ist, wird diese hart. Im\n"
+ "Kokon wartet es auf seine Entwicklung.");
+
+static const u8 DexDescription_Pudox_1[] = _(
+ "PUDOX wird instinktiv vom Licht\n"
+ "angezogen. In hell erleuchteten \n"
+ "Städten kann man Scharen dieses");
+static const u8 DexDescription_Pudox_2[] = _(
+ "POKéMON dabei beobachten, die\n"
+ "großen Schaden anrichten, indem sie die\n"
+ "Blätter von Bäumen abfressen.");
+
+static const u8 DexDescription_Loturzel_1[] = _(
+ "LOTURZEL lebt auf der Wasseroberfläche\n"
+ "von Teichen oder Seen. Es wird\n"
+ "schwächer, wenn sein breites Blatt");
+static const u8 DexDescription_Loturzel_2[] = _(
+ "abstirbt. Nur selten geht dieses\n"
+ "POKéMON an Land, um nach sauberem\n"
+ "Wasser Ausschau zu halten.");
+
+static const u8 DexDescription_Lombrero_1[] = _(
+ "LOMBRERO liebt die Nacht und wird mit\n"
+ "Einbruch der Dunkelheit aktiv. Es spielt\n"
+ "auch gerne Streiche.");
+static const u8 DexDescription_Lombrero_2[] = _(
+ "Wenn es Angler sieht, zieht es unter\n"
+ "Wasser an ihren Angelschnüren und\n"
+ "erfreut sich an ihrer Entrüstung.");
+
+static const u8 DexDescription_Kappalores_1[] = _(
+ "KAPPALORES fängt sofort zu tanzen an,\n"
+ "wenn es stimmungsvolle, feierliche Musik\n"
+ "vernimmt. Dieses POKéMON erscheint");
+static const u8 DexDescription_Kappalores_2[] = _(
+ "angeblich, wenn es Kinder auf \n"
+ "Wanderausflügen singen hört.");
+
+static const u8 DexDescription_Samurzel_1[] = _(
+ "SAMURZEL hängt sich mit dem Kopf an\n"
+ "einen Ast. Dabei entzieht es dem Baum\n"
+ "Feuchtigkeit. Je mehr Wasser es trinkt,");
+static const u8 DexDescription_Samurzel_2[] = _(
+ "desto glänzender wird der Körper dieses\n"
+ "POKéMON.");
+
+static const u8 DexDescription_Blanas_1[] = _(
+ "BLANAS lebt in dichten Wäldern.\n"
+ "Manchmal wagt es sich aus dem Wald\n"
+ "heraus, um Menschen zu erschrecken.");
+static const u8 DexDescription_Blanas_2[] = _(
+ "Dieses POKéMON mag es überhaupt nicht,\n"
+ "wenn man seine lange Nase zwickt.");
+
+static const u8 DexDescription_Tengulist_1[] = _(
+ "TENGULIST ist ein geheimnisvolles\n"
+ "POKéMON, das angeblich auf hohen\n"
+ "Bäumen lebt, die tausende von Jahren");
+static const u8 DexDescription_Tengulist_2[] = _(
+ "alt sind. Mit den Blätterventilatoren an\n"
+ "seinen Händen kann es heftige Stürme\n"
+ "erzeugen.");
+
+static const u8 DexDescription_Schwalbini_1[] = _(
+ "Mutig behauptet SCHWALBINI sein\n"
+ "Territorium gegen Eindringlinge, so\n"
+ "stark diese auch sein mögen.");
+static const u8 DexDescription_Schwalbini_2[] = _(
+ "Dieses unerschrockene POKéMON bleibt\n"
+ "trotz einer Niederlage angriffslustig,\n"
+ "heult aber laut, wenn es Hunger hat.");
+
+static const u8 DexDescription_Schwalboss_1[] = _(
+ "Dieses POKéMON taucht in einem steilen\n"
+ "Winkel ab, sobald es Beute wahrgenommen\n"
+ "hat. Es packt seine Beute mit");
+static const u8 DexDescription_Schwalboss_2[] = _(
+ "seinen Krallen und lässt sie\n"
+ "nicht mehr entkommen.");
+
+static const u8 DexDescription_Wingull_1[] = _(
+ "Man sieht WINGULL oft mit seiner\n"
+ "Beute oder seinen Besitztümern im\n"
+ "Schnabel herumfliegen auf der Suche");
+static const u8 DexDescription_Wingull_2[] = _(
+ "nach geeigneten Verstecken. Dieses\n"
+ "POKéMON fliegt durch die Lüfte, als\n"
+ "würde es gleiten.");
+
+static const u8 DexDescription_Pelipper_1[] = _(
+ "PELIPPER transportiert kleine POKéMON\n"
+ "und Eier in seinem riesigen Schnabel\n"
+ "durch die Lüfte. Dieses POKéMON baut");
+static const u8 DexDescription_Pelipper_2[] = _(
+ "sein Nest auf steilen Klippen am Meer.");
+
+static const u8 DexDescription_Trasla_1[] = _(
+ "TRASLA nimmt mit den Hörnern an seinem\n"
+ "Kopf die Gefühle von Menschen wahr.\n"
+ "Menschen bekommen dieses POKéMON");
+static const u8 DexDescription_Trasla_2[] = _(
+ "nur selten zu Gesicht. Wenn es bemerkt,\n"
+ "dass eine Person gut gelaunt ist, traut\n"
+ "es sich näher an sie heran.");
+
+static const u8 DexDescription_Kirlia_1[] = _(
+ "Man sagt, dass ein KIRLIA, das häufig\n"
+ "positive Emotionen seines TRAINERs\n"
+ "wahrnimmt, sehr schön wird.");
+static const u8 DexDescription_Kirlia_2[] = _(
+ "Dieses POKéMON kontrolliert\n"
+ "psychokinetische Energie mit seinem\n"
+ "hochentwickelten Gehirn.");
+
+static const u8 DexDescription_Guardevoir_1[] = _(
+ "GUARDEVOIR kann in die Zukunft\n"
+ "schauen. Wenn es eine Gefahr für seinen\n"
+ "TRAINER voraussieht, entlädt es seine");
+static const u8 DexDescription_Guardevoir_2[] = _(
+ "psychokinetische Energie mit voller\n"
+ "Kraft.");
+
+static const u8 DexDescription_Gehweiher_1[] = _(
+ "GEHWEIHER scheidet aus seinen Zehen\n"
+ "ein Öl aus, das es ihm ermöglicht, über\n"
+ "Wasser zu gleiten. Dieses POKéMON");
+static const u8 DexDescription_Gehweiher_2[] = _(
+ "ernährt sich von Mikroorganismen aus\n"
+ "Teichen und Seen.");
+
+static const u8 DexDescription_Maskeregen_1[] = _(
+ "MASKEREGEN schüchtert seine Feinde\n"
+ "mit den augenähnlichen Mustern auf\n"
+ "seinen Antennen ein. Dieses POKéMON");
+static const u8 DexDescription_Maskeregen_2[] = _(
+ "kann mit seinen vier Flügeln wie ein\n"
+ "Hubschrauber in jede Richtung fliegen,\n"
+ "sogar seitwärts und rückwärts.");
+
+static const u8 DexDescription_Knilz_1[] = _(
+ "KNILZ lebt im feuchten Erdboden\n"
+ "finsterer Wälder. Es wird oft reglos\n"
+ "unter herabgefallenen Blättern");
+static const u8 DexDescription_Knilz_2[] = _(
+ "gefunden. Dieses POKéMON ernährt sich\n"
+ "von Kompost aus verrotteten Blättern.");
+
+static const u8 DexDescription_Kapilz_1[] = _(
+ "Mit leichtfüßiger Beinarbeit nähert \n"
+ "sich KAPILZ seinen Feinden und\n"
+ "schlägt dann mit seinen dehnbaren");
+static const u8 DexDescription_Kapilz_2[] = _(
+ "Armen um sich. Die Kampftechnik dieses\n"
+ "POKéMON treibt Profiboxern die\n"
+ "Schamesröte ins Gesicht.");
+
+static const u8 DexDescription_Bummelz_1[] = _(
+ "BUMMELZ geht zwanzig Stunden pro Tag\n"
+ "müßig. Da es sich sehr wenig bewegt,\n"
+ "braucht es auch nicht viel Nahrung.");
+static const u8 DexDescription_Bummelz_2[] = _(
+ "Seine Tagesration besteht lediglich aus\n"
+ "drei Blättern.");
+
+static const u8 DexDescription_Muntier_1[] = _(
+ "MUNTIER brennt darauf, sich\n"
+ "auszutoben. Es kann nicht einmal für\n"
+ "eine Minute stillsitzen. Es gerät in");
+static const u8 DexDescription_Muntier_2[] = _(
+ "Stress, wenn es sich nicht andauernd\n"
+ "bewegen kann.");
+
+static const u8 DexDescription_Letarking_1[] = _(
+ "LETARKING verbringt den Tag damit,\n"
+ "herumzuliegen und nichts zu tun. Es \n"
+ "ernährt sich von Gras, das in seiner");
+static const u8 DexDescription_Letarking_2[] = _(
+ "Reichweite wächst. Hat es alles\n"
+ "aufgefressen, so sucht es sich\n"
+ "widerwillig ein anderes Plätzchen.");
+
+static const u8 DexDescription_Nincada_1[] = _(
+ "NINCADA lebt viele Jahre in absoluter\n"
+ "Dunkelheit unter der Erde. Dieses\n"
+ "POKéMON nimmt Nährstoffe aus");
+static const u8 DexDescription_Nincada_2[] = _(
+ "Baumwurzeln auf. Es rührt sich nicht,\n"
+ "da es auf seine Entwicklung wartet.");
+
+static const u8 DexDescription_Ninjask_1[] = _(
+ "NINJASK bewegt sich so schnell, dass\n"
+ "man es nicht sehen kann. Seine Schreie\n"
+ "sind aber laut und deutlich zu hören.");
+static const u8 DexDescription_Ninjask_2[] = _(
+ "Deshalb hielt man dieses POKéMON lange\n"
+ "für unsichtbar.");
+
+static const u8 DexDescription_Ninjatom_1[] = _(
+ "NINJATOMs harter Körper bewegt sich\n"
+ "überhaupt nicht. Er scheint bloß eine\n"
+ "hohle Schale zu sein. Dieses POKéMON");
+static const u8 DexDescription_Ninjatom_2[] = _(
+ "soll angeblich die Seele eines jeden\n"
+ "stehlen, der hinterrücks einen Blick in\n"
+ "seinen hohlen Körper riskiert.");
+
+static const u8 DexDescription_Flurmel_1[] = _(
+ "Normalerweise ist FLURMELs Stimme sehr\n"
+ "leise, selbst mit größter Anstrengung\n"
+ "ist sie kaum hörbar. Wenn dieses");
+static const u8 DexDescription_Flurmel_2[] = _(
+ "POKéMON jedoch eine Gefahr wittert,\n"
+ "stößt es ohrenbetäubende Schreie aus.");
+
+static const u8 DexDescription_Krakeelo_1[] = _(
+ "KRAKEELOs Brüllen kann ein Holzhaus zum\n"
+ "Einsturz bringen. Es setzt seine Stimme\n"
+ "ein, um seine Gegner anzugreifen.");
+static const u8 DexDescription_Krakeelo_2[] = _(
+ "Die runden Ohren dieses POKéMON dienen\n"
+ "als Lautsprecher.");
+
+static const u8 DexDescription_Krawumms_1[] = _(
+ "KRAWUMMS kann durch sein Brüllen\n"
+ "Erdbeben auslösen. Wenn dieses\n"
+ "POKéMON durch seine Körperöffnungen");
+static const u8 DexDescription_Krawumms_2[] = _(
+ "kräftig einatmet, ist es kurz davor,\n"
+ "ein mächtiges Brüllen von sich zu geben.");
+
+static const u8 DexDescription_Makuhita_1[] = _(
+ "MAKUHITA ist sehr zäh. Selbst wenn es im\n"
+ "Kampf mehrfach niedergeschlagen\n"
+ "wurde, steht es immer wieder auf und");
+static const u8 DexDescription_Makuhita_2[] = _(
+ "greift seinen Gegner an. Bei jedem Mal\n"
+ "speichert es mehr Energie in seinem\n"
+ "Körper für seine Entwicklung.");
+
+static const u8 DexDescription_Hariyama_1[] = _(
+ "HARIYAMA führt seinen berüchtigten\n"
+ "Streckarm-Schlag überall aus. Ein Schlag\n"
+ "von diesem POKéMON reicht aus,");
+static const u8 DexDescription_Hariyama_2[] = _(
+ "um einen Strommast zu zerlegen.");
+
+static const u8 DexDescription_Azurill_1[] = _(
+ "AZURILL schleudert seinen Schweif wie\n"
+ "ein Lasso weit aus und fliegt dann \n"
+ "selbst hinterher. Ein AZURILL");
+static const u8 DexDescription_Azurill_2[] = _(
+ "hat es auf diese Weise geschafft, die\n"
+ "Rekordweite von 10 Metern\n"
+ "zurückzulegen.");
+
+static const u8 DexDescription_Nasgnet_1[] = _(
+ "NASGNET besitzt eine magnetische\n"
+ "Nase, die immer nach Norden zeigt. Wenn\n"
+ "sich zwei NASGNET treffen, können sie");
+static const u8 DexDescription_Nasgnet_2[] = _(
+ "sich einander nicht zuwenden, da ihre\n"
+ "magnetischen Nasen sich gegenseitig\n"
+ "abstoßen.");
+
+static const u8 DexDescription_Eneco_1[] = _(
+ "ENECO ist davon fasziniert,\n"
+ "Gegenstände zu bewegen und sie zu\n"
+ "jagen. Dieses POKéMON jagt häufig");
+static const u8 DexDescription_Eneco_2[] = _(
+ "seinen eigenen Schweif, so dass ihm\n"
+ "schwindlig wird.");
+
+static const u8 DexDescription_Enekoro_1[] = _(
+ "ENEKORO liebt seine Eigenständigkeit.\n"
+ "So kann es das tun, was es möchte, und\n"
+ "kann selbst das Tempo bestimmen.");
+static const u8 DexDescription_Enekoro_2[] = _(
+ "Da dieses POKéMON schläft und isst,\n"
+ "wenn es Lust dazu hat, ist sein\n"
+ "Tagesablauf eher zufälliger Natur.");
+
+static const u8 DexDescription_Zobiris_1[] = _(
+ "ZOBIRIS führt ein ruhiges, \n"
+ "zurückgezogenes Leben tief im Innern\n"
+ "einer Höhle. Es ist aber trotzdem sehr");
+static const u8 DexDescription_Zobiris_2[] = _(
+ "gefürchtet, da man sagt, es stehle die\n"
+ "Seelen der Menschen, wenn seine Augen\n"
+ "im Dunkeln Furcht erregend funkeln.");
+
+static const u8 DexDescription_Flunkifer_1[] = _(
+ "FLUNKIFERs sagenhafte Kiefer sind\n"
+ "eigentlich umgewandelte Stahlhörner.\n"
+ "Sein unterwürfiger Gesichtsausdruck");
+static const u8 DexDescription_Flunkifer_2[] = _(
+ "dient dazu, seinen Gegner in Sicherheit\n"
+ "zu wiegen, so dass er unaufmerksam\n"
+ "wird. Dann schnappt es zu!");
+
+static const u8 DexDescription_Stollunior_1[] = _(
+ "Dieses POKéMON hat einen Körper aus\n"
+ "Stahl. STOLLUNIOR ernährt sich von\n"
+ "Eisenerz aus den Bergen. Zuweilen");
+static const u8 DexDescription_Stollunior_2[] = _(
+ "richtet es großen Schaden an, weil es\n"
+ "Brücken und Bahngleise auffrisst.");
+
+static const u8 DexDescription_Stollrak_1[] = _(
+ "STOLLRAK temperiert seinen Körper,\n"
+ "indem es ausgesprochen nahrhaftes \n"
+ "Quellwasser trinkt, bis es völlig");
+static const u8 DexDescription_Stollrak_2[] = _(
+ "aufgebläht ist. Dieses POKéMON baut\n"
+ "sein Nest in der Nähe von Quellen, aus\n"
+ "denen köstliches Wasser sprudelt.");
+
+static const u8 DexDescription_Stolloss_1[] = _(
+ "STOLLOSS nennt einen ganzen Berg sein\n"
+ "Territorium. Gnadenlos schlägt es jeden\n"
+ "in die Flucht, der sein Reich betritt.");
+static const u8 DexDescription_Stolloss_2[] = _(
+ "Dieses POKéMON behält sein Territorium\n"
+ "jederzeit im Auge.");
+
+static const u8 DexDescription_Meditie_1[] = _(
+ "MEDITIE unterzieht sich einem\n"
+ "strikten mentalen Training tief in den\n"
+ "Bergen. Wenn es meditiert, verliert es");
+static const u8 DexDescription_Meditie_2[] = _(
+ "jedoch immer seine Konzentration.\n"
+ "Deshalb wird sein Training niemals\n"
+ "ein Ende haben.");
+
+static const u8 DexDescription_Meditalis_1[] = _(
+ "Mittels Meditation erhöht MEDITALIS\n"
+ "seine Körperenergie und schärft seinen\n"
+ "sechsten Sinn. Dieses POKéMON");
+static const u8 DexDescription_Meditalis_2[] = _(
+ "verbirgt sich, indem es eins mit den\n"
+ "Feldern und Bergen wird.");
+
+static const u8 DexDescription_Frizelbliz_1[] = _(
+ "FRIZELBLIZ speichert Elektrizität in\n"
+ "seiner langen Körperbehaarung. Dieses\n"
+ "POKéMON stimuliert seine");
+static const u8 DexDescription_Frizelbliz_2[] = _(
+ "Beinmuskulatur durch Stromstöße.\n"
+ "Dadurch ist es in der Lage, explosiv\n"
+ "zu beschleunigen.");
+
+static const u8 DexDescription_Voltenso_1[] = _(
+ "VOLTENSO entlädt ständig Elektrizität\n"
+ "aus seiner Mähne. Es fliegen dabei\n"
+ "Funken, die zuweilen zu Waldbränden");
+static const u8 DexDescription_Voltenso_2[] = _(
+ "führen. In einem Kampf erzeugt dieses\n"
+ "POKéMON Gewitterwolken.");
+
+static const u8 DexDescription_Plusle_1[] = _(
+ "PLUSLE dient seinen Artgenossen als\n"
+ "Cheerleader. Wenn ein Teamkamerad\n"
+ "im Kampf erfolgreich ist, erzeugt es");
+static const u8 DexDescription_Plusle_2[] = _(
+ "das prasselnde Geräusch von Funken, um\n"
+ "so seine Freude zu zeigen.");
+
+static const u8 DexDescription_Minun_1[] = _(
+ "MINUN kümmert sich mehr um das\n"
+ "Anfeuern seiner Partner als um seine\n"
+ "eigene Sicherheit. Es nutzt die");
+static const u8 DexDescription_Minun_2[] = _(
+ "Elektrizität in seinem Körper dazu,\n"
+ "einen Funkenregen zu erzeugen und\n"
+ "seine Teamkameraden anzufeuern.");
+
+static const u8 DexDescription_Volbeat_1[] = _(
+ "Wenn es Nacht wird, beginnt VOLBEATs\n"
+ "Schweif zu leuchten. Es kommuniziert\n"
+ "mit anderen, indem es die Helligkeit");
+static const u8 DexDescription_Volbeat_2[] = _(
+ "und das Blinken dieses Lichts reguliert.\n"
+ "Dieses POKéMON wird vom süßen Duft\n"
+ "der ILLUMISE angezogen.");
+
+static const u8 DexDescription_Illumise_1[] = _(
+ "ILLUMISE zieht ganze VOLBEAT-Scharen\n"
+ "mit seinem süßlichen Duft an. Dann\n"
+ "führt es diesen hell leuchtenden");
+static const u8 DexDescription_Illumise_2[] = _(
+ "Schwarm an, indem es geometrische\n"
+ "Figuren an den Nachthimmel malt.");
+
+static const u8 DexDescription_Roselia_1[] = _(
+ "ROSELIA verschießt scharfe Stacheln\n"
+ "auf jeden Feind, der versucht, die\n"
+ "Blumen an seinen Armen zu stehlen.");
+static const u8 DexDescription_Roselia_2[] = _(
+ "Der Duft dieses POKéMON beruhigt\n"
+ "Lebewesen.");
+
+static const u8 DexDescription_Schluppuck_1[] = _(
+ "Eigentlich besteht SCHLUPPUCKs Körper\n"
+ "nur aus einem Magen. Daher kann es\n"
+ "etwas verschlingen, das beinahe seine");
+static const u8 DexDescription_Schluppuck_2[] = _(
+ "Größe hat. Sein Magen enthält eine\n"
+ "spezielle Flüssigkeit, die wirklich alles\n"
+ "verdauen kann.");
+
+static const u8 DexDescription_Schlukwech_1[] = _(
+ "Wenn SCHLUKWECH Beute sichtet,\n"
+ "verspritzt es eine höchst giftige\n"
+ "Substanz aus seinen Poren und");
+static const u8 DexDescription_Schlukwech_2[] = _(
+ "besprüht damit sein Ziel. Wenn die Beute\n"
+ "geschwächt ist, schluckt es sie mit\n"
+ "seinem riesigen Maul im Ganzen herunter.");
+
+static const u8 DexDescription_Kanivanha_1[] = _(
+ "KANIVANHAs starke Kiefer und seine\n"
+ "spitzen Zähne verfügen über die \n"
+ "zerstörerische Kraft, Bootsrümpfe");
+static const u8 DexDescription_Kanivanha_2[] = _(
+ "verschlingen zu können. Dieses POKéMON\n"
+ "hat schon viele Boote versenkt.");
+
+static const u8 DexDescription_Tohaido_1[] = _(
+ "TOHAIDO trägt den Spitznamen\n"
+ "“Tyrann des Meeres” und ist\n"
+ "sehr gefürchtet. Seine grausamen Zähne");
+static const u8 DexDescription_Tohaido_2[] = _(
+ "wachsen sofort nach, wenn sie\n"
+ "ausgebrochen sind. Es kann sogar einen\n"
+ "Öltanker zerreißen.");
+
+static const u8 DexDescription_Wailmer_1[] = _(
+ "WAILMERs Nasenlöcher liegen über\n"
+ "seinen Augen. Dieses verspielte\n"
+ "POKéMON erschreckt gern Menschen,");
+static const u8 DexDescription_Wailmer_2[] = _(
+ "indem es das Meerwasser, das es in\n"
+ "seinem Körper speichert, mit aller Kraft\n"
+ "herausprustet.");
+
+static const u8 DexDescription_Wailord_1[] = _(
+ "WAILORD ist bisher das größte aller\n"
+ "identifizierten POKéMON. Es schwimmt\n"
+ "reglos auf dem offenen Meer und nimmt");
+static const u8 DexDescription_Wailord_2[] = _(
+ "mit seinem enormen Maul riesige Mengen\n"
+ "an Nahrung auf.");
+
+static const u8 DexDescription_Camaub_1[] = _(
+ "CAMAUB ist nicht besonders helle. Es\n"
+ "nimmt nicht einmal wahr, wenn es\n"
+ "getroffen wurde. Ein Hungergefühl");
+static const u8 DexDescription_Camaub_2[] = _(
+ "allerdings kann es nicht einmal eine\n"
+ "Sekunde lang aushalten. In seinem\n"
+ "Körper brodelt glühend heißes Magma.");
+
+static const u8 DexDescription_Camerupt_1[] = _(
+ "CAMERUPT trägt einen Vulkan in seinem\n"
+ "Körper. 10.000 Grad heißes Magma fließt\n"
+ "in ihm. Manchmal brechen die Höcker auf");
+static const u8 DexDescription_Camerupt_2[] = _(
+ "seinem Rücken aus und verspucken \n"
+ "glühend heißes Magma.");
+
+static const u8 DexDescription_Qurtel_1[] = _(
+ "QURTEL schaufelt sich auf der Suche\n"
+ "nach Kohle durch die Berge. Wenn es\n"
+ "welche findet, füllt es die Hohlräume");
+static const u8 DexDescription_Qurtel_2[] = _(
+ "seines Panzers mit Kohle und verbrennt\n"
+ "diese. Wenn es angegriffen wird, stößt\n"
+ "es dicken schwarzen Rauch aus.");
+
+static const u8 DexDescription_Spoink_1[] = _(
+ "SPOINK hüpft auf seinem Schweif durch\n"
+ "die Gegend. Die Erschütterung des\n"
+ "Hüpfens bringt sein Herz zum Schlagen.");
+static const u8 DexDescription_Spoink_2[] = _(
+ "Deshalb kann dieses POKéMON das Hüpfen\n"
+ "nicht sein lassen, ansonsten würde sein\n"
+ "Herz aufhören zu schlagen.");
+
+static const u8 DexDescription_Groink_1[] = _(
+ "GROINK benutzt die schwarzen Perlen\n"
+ "an seinem Körper dazu, die\n"
+ "psychischen Kraftwellen zu verstärken.");
+static const u8 DexDescription_Groink_2[] = _(
+ "Wenn es diese spezielle Fähigkeit nutzt,\n"
+ "wird sein schnaubender Atem\n"
+ "schwerfällig.");
+
+static const u8 DexDescription_Pandir_1[] = _(
+ "Jedes PANDIR auf der Welt soll ein\n"
+ "einzigartiges Fleckenmuster haben. Der\n"
+ "schwankende Gang dieses POKéMON");
+static const u8 DexDescription_Pandir_2[] = _(
+ "erweckt den Eindruck, es würde tanzen.");
+
+static const u8 DexDescription_Knacklion_1[] = _(
+ "KNACKLIONs Bau ist eine Art in den Sand\n"
+ "gegrabener Kessel. Dieses POKéMON\n"
+ "wartet geduldig auf Beute, um sie in");
+static const u8 DexDescription_Knacklion_2[] = _(
+ "seinen Bau zu werfen. Seine gigan-\n"
+ "tischen Kiefer verfügen über genügend\n"
+ "Kraft, um einen Felsen zu zerquetschen.");
+
+static const u8 DexDescription_Vibrava_1[] = _(
+ "Um seine Beute zu schwächen, erzeugt\n"
+ "VIBRAVA Ultraschallwellen, indem es\n"
+ "seine Flügel vibrieren lässt.");
+static const u8 DexDescription_Vibrava_2[] = _(
+ "Die Ultraschallwellen dieses POKéMON \n"
+ "sind so stark, dass sie bei Menschen\n"
+ "Kopfschmerzen verursachen können.");
+
+static const u8 DexDescription_Libelldra_1[] = _(
+ "LIBELLDRA wird auch “Geist der\n"
+ "Wüste” genannt. Da seine flatternden\n"
+ "Flügel eine Sandwolke aufwirbeln, ist");
+static const u8 DexDescription_Libelldra_2[] = _(
+ "dieses POKéMON beim Fliegen immer\n"
+ "von einem Sandsturm umgeben.");
+
+static const u8 DexDescription_Tuska_1[] = _(
+ "TUSKA lebt an trockenen Orten, z. B. in\n"
+ "Wüsten. Es versprüht einen starken\n"
+ "Duft aus seiner Blume, um Beute");
+static const u8 DexDescription_Tuska_2[] = _(
+ "anzuziehen. Wenn sich Beute nähert,\n"
+ "verschießt es scharfe Stacheln, um\n"
+ "seinen Gegner zu überwältigen.");
+
+static const u8 DexDescription_Noktuska_1[] = _(
+ "Am Tage bleibt NOKTUSKA reglos, damit es\n"
+ "in der brennenden Wüstenhitze keine\n"
+ "Feuchtigkeit verliert.");
+static const u8 DexDescription_Noktuska_2[] = _(
+ "Dieses POKéMON wird bei Nacht aktiv,\n"
+ "wenn die Temperatur sinkt.");
+
+static const u8 DexDescription_Wablu_1[] = _(
+ "WABLU hat leichte, flauschige Flügel,\n"
+ "die wie Schäfchenwolken aussehen.\n"
+ "Dieses POKéMON hat keine Angst vor");
+static const u8 DexDescription_Wablu_2[] = _(
+ "Menschen. Es landet auf ihren Köpfen \n"
+ "und bleibt dort sitzen wie ein \n"
+ "wattierter Hut.");
+
+static const u8 DexDescription_Altaria_1[] = _(
+ "ALTARIA tanzt und dreht sich in der\n"
+ "Luft durch viele Schäfchenwolken.\n"
+ "Indem es mit seiner kristallklaren");
+static const u8 DexDescription_Altaria_2[] = _(
+ "Stimme Melodien singt, versetzt es\n"
+ "seine Zuhörer in verträumtes\n"
+ "Erstaunen.");
+
+static const u8 DexDescription_Sengo_1[] = _(
+ "Die Erinnerungen an den Kampf mit\n"
+ "seinem Erzrivalen VIPITIS haben sich in\n"
+ "jede Zelle von SENGOs Körper");
+static const u8 DexDescription_Sengo_2[] = _(
+ "eingebrannt. Dieses POKéMON weicht\n"
+ "feindlichen Angriffen unheimlich\n"
+ "raffiniert und geschickt aus.");
+
+static const u8 DexDescription_Vipitis_1[] = _(
+ "VIPITIS lebt seit Generationen in\n"
+ "Fehde mit SENGO. Die Narben auf\n"
+ "seinem Körper sind Zeugen grausamer");
+static const u8 DexDescription_Vipitis_2[] = _(
+ "Kämpfe. Dieses POKéMON greift seine\n"
+ "Gegner mit seinem scharfkantigen\n"
+ "Schweif an.");
+
+static const u8 DexDescription_Lunastein_1[] = _(
+ "LUNASTEIN wurde in der Nähe eines\n"
+ "Meteoritenkraters entdeckt. Daher\n"
+ "nehmen einige Menschen an, dass");
+static const u8 DexDescription_Lunastein_2[] = _(
+ "dieses POKéMON aus dem Weltall stammt.\n"
+ "Diese Theorie konnte allerdings bisher\n"
+ "noch nicht belegt werden.");
+
+static const u8 DexDescription_Sonnfel_1[] = _(
+ "SONNFEL ist eine neue POKéMON-Spezies,\n"
+ "die angeblich aus dem Weltall\n"
+ "kam. Es gleitet durch die");
+static const u8 DexDescription_Sonnfel_2[] = _(
+ "Luft und bewegt sich leise. Im Kampf\n"
+ "setzt dieses POKéMON sehr helles Licht\n"
+ "ein.");
+
+static const u8 DexDescription_Schmerbe_1[] = _(
+ "SCHMERBEs empfindliche Barthaare\n"
+ "dienen ihm als hervorragendes\n"
+ "Radarsystem. Dieses POKéMON versteckt");
+static const u8 DexDescription_Schmerbe_2[] = _(
+ "sich im Schlamm, so dass nur noch seine\n"
+ "Barthaare herausgucken, und wartet\n"
+ "auf Beute.");
+
+static const u8 DexDescription_Welsar_1[] = _(
+ "WELSAR legt viel Wert auf sein\n"
+ "Territorium. Ein einzelnes POKéMON\n"
+ "dieser Art nennt einen Teich sein Eigen.");
+static const u8 DexDescription_Welsar_2[] = _(
+ "Wenn sich ein Feind nähert, schlägt es\n"
+ "um sich und verursacht ein gewaltiges\n"
+ "Erdbeben.");
+
+static const u8 DexDescription_Krebscorps_1[] = _(
+ "KREBSCORPS ist kein heimisches\n"
+ "POKéMON, sondern wurde als Haustier\n"
+ "importiert. Schließlich verwilderte es.");
+static const u8 DexDescription_Krebscorps_2[] = _(
+ "Dieses POKéMON ist mittlerweile sehr\n"
+ "robust und hat seine Population\n"
+ "vergrößert.");
+
+static const u8 DexDescription_Krebutack_1[] = _(
+ "KREBUTACK ist von Natur aus sehr\n"
+ "gewalttätig, so dass es dauernd andere\n"
+ "Lebewesen zum Kampf herausfordern");
+static const u8 DexDescription_Krebutack_2[] = _(
+ "muss. Andere Lebensformen lehnen es ab,\n"
+ "mit diesem POKéMON in ein und demselben\n"
+ "Teich zu leben.");
+
+static const u8 DexDescription_Puppance_1[] = _(
+ "PUPPANCE bewegt sich, indem es sich auf\n"
+ "seinem Fuß im Kreis dreht. In sehr alten\n"
+ "Ruinen wurden primitive Wandmalereien");
+static const u8 DexDescription_Puppance_2[] = _(
+ "entdeckt, die dieses POKéMON in\n"
+ "Begleitung von Menschen zeigen.");
+
+static const u8 DexDescription_Lepumentas_1[] = _(
+ "LEPUMENTAS sind aus Schlamm gefertigte\n"
+ "Puppen, die von primitiven Menschen\n"
+ "hergestellt und durch mysteriöse");
+static const u8 DexDescription_Lepumentas_2[] = _(
+ "Strahlen zum Leben erweckt wurden.\n"
+ "Diese POKéMON bewegen sich\n"
+ "schwebend fort.");
+
+static const u8 DexDescription_Liliep_1[] = _(
+ "Von LILIEP nahm man an, es sei seit\n"
+ "etwa hundert Millionen Jahren\n"
+ "ausgestorben. Mit seinen wie");
+static const u8 DexDescription_Liliep_2[] = _(
+ "Blütenblätter geformten Tentakeln\n"
+ "heftet es sich an einen Felsen auf dem\n"
+ "Meeresboden und fängt Beute.");
+
+static const u8 DexDescription_Wielie_1[] = _(
+ "WIELIE durchforstet den Meeresboden\n"
+ "nach Beute. Dieses POKéMON fährt\n"
+ "seinen baumstammartigen Nacken aus");
+static const u8 DexDescription_Wielie_2[] = _(
+ "und fängt mit seinen acht Tentakeln\n"
+ "Beute.");
+
+static const u8 DexDescription_Anorith_1[] = _(
+ "ANORITH wurde aus einem\n"
+ "prähistorischen Fossil erzeugt. Dieses\n"
+ "primitive POKéMON lebte einst in warmen");
+static const u8 DexDescription_Anorith_2[] = _(
+ "Gewässern. Es klemmt seine Beute\n"
+ "fest zwischen seine beiden riesigen\n"
+ "Klauen ein.");
+
+static const u8 DexDescription_Armaldo_1[] = _(
+ "Von ARMALDOs hartem Panzer prallen\n"
+ "alle Angriffe ab. Dieses POKéMON\n"
+ "hat zwei mächtige Klauen, die es");
+static const u8 DexDescription_Armaldo_2[] = _(
+ "ausfahren oder einziehen kann. Es hat\n"
+ "so viel Kraft, dass es damit eine\n"
+ "Stahlplatte pulverisieren kann.");
+
+static const u8 DexDescription_Barschwa_1[] = _(
+ "BARSCHWAs Flossen waren schon immer\n"
+ "zerfetzt. Wegen seines merkwürdigen\n"
+ "Aussehens wird dieses POKéMON");
+static const u8 DexDescription_Barschwa_2[] = _(
+ "weitgehend ignoriert. Es kann sowohl im\n"
+ "Meer als auch in Flüssen leben.");
+
+static const u8 DexDescription_Milotic_1[] = _(
+ "MILOTIC soll das Schönste aller\n"
+ "POKéMON sein. Es hat die Macht,\n"
+ "Emotionen wie Wut und Feindseligkeit zu");
+static const u8 DexDescription_Milotic_2[] = _(
+ "besänftigen und somit erbitterten\n"
+ "Streit zu vermeiden.");
+
+static const u8 DexDescription_Formeo_1[] = _(
+ "FORMEOs Erscheinung ändert sich\n"
+ "mit dem Wetter. Dieses POKéMON hat\n"
+ "die Fähigkeit erworben, die mächtige");
+static const u8 DexDescription_Formeo_2[] = _(
+ "Kraft der Natur zu nutzen, um seinen\n"
+ "winzigen Körper zu schützen.");
+
+static const u8 DexDescription_Kecleon_1[] = _(
+ "KECLEON kann die Farbe seines Körpers\n"
+ "bei Bedarf verändern, um sich seiner\n"
+ "Umgebung anzupassen. Es gibt allerdings");
+static const u8 DexDescription_Kecleon_2[] = _(
+ "eine Ausnahme: Das Zickzackmuster auf\n"
+ "seinem Bauch kann es nicht verändern.");
+
+static const u8 DexDescription_Shuppet_1[] = _(
+ "SHUPPET wird durch Gefühle wie Neid und\n"
+ "Rachsucht angezogen. Wenn jemand\n"
+ "starke Rachegelüste entwickelt,");
+static const u8 DexDescription_Shuppet_2[] = _(
+ "erscheint dieses POKéMON in Scharen\n"
+ "und reiht sich unter der Dachrinne der\n"
+ "Person auf.");
+
+static const u8 DexDescription_Banette_1[] = _(
+ "BANETTE belegt andere mit Flüchen,\n"
+ "indem es Nadeln in seinen eigenen\n"
+ "Körper sticht. Dieses POKéMON war");
+static const u8 DexDescription_Banette_2[] = _(
+ "ursprünglich eine Mitleid erregende\n"
+ "Plüschpuppe, die weggeworfen wurde.");
+
+static const u8 DexDescription_Zwirrlicht_1[] = _(
+ "ZWIRRLICHT kann durch jede Wand gehen,\n"
+ "egal, wie dick diese ist. Wenn dieses\n"
+ "POKéMON sich ein Ziel gesucht hat,");
+static const u8 DexDescription_Zwirrlicht_2[] = _(
+ "verfolgt es seinen Feind unnachgiebig\n"
+ "bis zum Sonnenaufgang.");
+
+static const u8 DexDescription_Zwirrklop_1[] = _(
+ "ZWIRRKLOPs Körper ist komplett hohl. Es\n"
+ "wird auch mit einem Schwarzen Loch\n"
+ "verglichen. Dieses POKéMON nimmt alles");
+static const u8 DexDescription_Zwirrklop_2[] = _(
+ "in seinem Körper auf, es kommt jedoch\n"
+ "nichts wieder heraus.");
+
+static const u8 DexDescription_Tropius_1[] = _(
+ "Die Früchte am Nacken von TROPIUS\n"
+ "sind bei Kindern sehr beliebt. Dieses\n"
+ "POKéMON liebt Früchte und isst sie");
+static const u8 DexDescription_Tropius_2[] = _(
+ "ständig. Offensichtlich sind ihm wegen\n"
+ "dieser Vorliebe selber Früchte\n"
+ "gewachsen.");
+
+static const u8 DexDescription_Palimpalim_1[] = _(
+ "PALIMPALIMs Schreie hallen durch\n"
+ "seinen hohlen Körper. Wenn dieses\n"
+ "POKéMON wütend wird, erzeugen");
+static const u8 DexDescription_Palimpalim_2[] = _(
+ "seine Schreie Ultraschallwellen, die\n"
+ "seine Feinde buchstäblich wegfegen\n"
+ "können.");
+
+static const u8 DexDescription_Absol_1[] = _(
+ "Jedes Mal, wenn ABSOL sich den Menschen\n"
+ "zeigt, endet dies in einer Katastrophe\n"
+ "wie Erdbeben oder Sturmflut.");
+static const u8 DexDescription_Absol_2[] = _(
+ "Deswegen ist es auch als das\n"
+ "Katastrophen-POKéMON bekannt.");
+
+static const u8 DexDescription_Isso_1[] = _(
+ "ISSO hat immer ein breites, fröhliches\n"
+ "Lächeln auf seinem Gesicht. Um \n"
+ "festzustellen, ob es wütend ist, muss");
+static const u8 DexDescription_Isso_2[] = _(
+ "man seinen Schweif betrachten. Wenn es\n"
+ "wütend ist, schlägt es damit auf den\n"
+ "Boden.");
+
+static const u8 DexDescription_Schneppke_1[] = _(
+ "SCHNEPPKE lebt in Gebieten mit heftigem\n"
+ "Schneefall. In Jahreszeiten, in denen es\n"
+ "nicht schneit, wie im Frühling oder im");
+static const u8 DexDescription_Schneppke_2[] = _(
+ "Sommer, nimmt das POKéMON Reißaus, um\n"
+ "in einer Höhle ein ruhiges Leben unter\n"
+ "Stalaktiten und Stalagmiten zu führen.");
+
+static const u8 DexDescription_Firnontor_1[] = _(
+ "FIRNONTOR hat einen Körper aus Stein,\n"
+ "den es mit einem Panzer aus Eis noch\n"
+ "verstärkt. Dieses POKéMON kann");
+static const u8 DexDescription_Firnontor_2[] = _(
+ "die Luftfeuchtigkeit der Atmosphäre\n"
+ "einfrieren und in jegliche Form\n"
+ "verwandeln.");
+
+static const u8 DexDescription_Seemops_1[] = _(
+ "SEEMOPS kann schneller rollen als laufen.\n"
+ "Wenn Gruppen dieses POKéMON \n"
+ "zusammen essen, klatschen sie");
+static const u8 DexDescription_Seemops_2[] = _(
+ "gleichzeitig, um ihre Freude zu zeigen.\n"
+ "Deswegen sind ihre Mahlzeiten sehr\n"
+ "laut.");
+
+static const u8 DexDescription_Seejong_1[] = _(
+ "SEEJONG hat die Angewohnheit, alles,\n"
+ "was es zum ersten Mal sieht, auf seiner \n"
+ "Nasenspitze zu jonglieren. Dieses");
+static const u8 DexDescription_Seejong_2[] = _(
+ "POKéMON hält sich bei Laune, indem es\n"
+ "manchmal ein SEEMOPS auf seiner Nase\n"
+ "balanciert und hin- und herrollt.");
+
+static const u8 DexDescription_Walraisa_1[] = _(
+ "WALRAISA hat zwei massive Stoßzähne,\n"
+ "die mit einem Hieb Eisblöcke\n"
+ "zertrümmern können, die bis zu");
+static const u8 DexDescription_Walraisa_2[] = _(
+ "10 Tonnen wiegen. Es besitzt eine dicke\n"
+ "Speckschicht, die es vor eisigen\n"
+ "Temperaturen schützt.");
+
+static const u8 DexDescription_Perlu_1[] = _(
+ "PERLUs kräftige Schale dient nicht\n"
+ "nur dem Schutz, es nutzt sie auch zum\n"
+ "Fangen von Beute. Die ausgewachsene");
+static const u8 DexDescription_Perlu_2[] = _(
+ "Schale eines PERLU weist viele\n"
+ "Kerben und Kratzer auf.");
+
+static const u8 DexDescription_Aalabyss_1[] = _(
+ "AALABYSS entging lange der\n"
+ "Aufmerksamkeit des Menschen, da es in\n"
+ "extremen Tiefen des Meeres lebt.");
+static const u8 DexDescription_Aalabyss_2[] = _(
+ "Die Augen dieses POKéMON können\n"
+ "selbst in den dunklen und trüben Tiefen\n"
+ "des Meeres einwandfrei sehen.");
+
+static const u8 DexDescription_Saganabyss_1[] = _(
+ "SAGANABYSS lebt in extremen Tiefen des\n"
+ "Südmeeres. Sein Körper ist so angelegt,\n"
+ "dass er dem enormen Wasserdruck dieser");
+static const u8 DexDescription_Saganabyss_2[] = _(
+ "unglaublichen Tiefe standhalten kann.\n"
+ "Daher übersteht dieses POKéMON\n"
+ "gewöhnliche Attacken unbeschadet.");
+
+static const u8 DexDescription_Relicanth_1[] = _(
+ "RELICANTH ist eine POKéMON-Spezies,\n"
+ "die vor hundert Millionen Jahren\n"
+ "existierte, ohne jemals ihre Form zu");
+static const u8 DexDescription_Relicanth_2[] = _(
+ "verändern. Dieses antike POKéMON\n"
+ "hat ein zahnloses Maul und ernährt sich\n"
+ "von Mikroorganismen.");
+
+static const u8 DexDescription_Liebiskus_1[] = _(
+ "LIEBISKUS lebt in den seichten\n"
+ "Gewässern der Tropen. Dieses herz-\n"
+ "förmige POKéMON verdankt seinen Namen");
+static const u8 DexDescription_Liebiskus_2[] = _(
+ "der Tatsache, dass es hinter Liebes-\n"
+ "paaren herschwamm, die es in den Wellen\n"
+ "des Ozeans beobachtet hatte.");
+
+static const u8 DexDescription_Kindwurm_1[] = _(
+ "KINDWURM hat den Traum, fliegen zu\n"
+ "können. In zahlreichen vergeblichen\n"
+ "Versuchen stürzte es sich die Klippen");
+static const u8 DexDescription_Kindwurm_2[] = _(
+ "herunter. Daher ist sein Kopf sehr\n"
+ "robust und so hart wie Stahl geworden.");
+
+static const u8 DexDescription_Draschel_1[] = _(
+ "In DRASCHELs panzerartiger Schale\n"
+ "vollziehen seine Zellen eine\n"
+ "Transformation, um einen völlig neuen");
+static const u8 DexDescription_Draschel_2[] = _(
+ "Körper zu bilden. Die Schale dieses\n"
+ "POKéMON ist ausgesprochen schwer, so\n"
+ "dass seine Bewegungen träge wirken.");
+
+static const u8 DexDescription_Brutalanda_1[] = _(
+ "BRUTALANDA träumte sehr lange davon,\n"
+ "dass ihm Flügel wachsen mögen. Dieser\n"
+ "sehnliche Wunsch hat wohl eine");
+static const u8 DexDescription_Brutalanda_2[] = _(
+ "plötzliche Mutation in den Zellen dieses\n"
+ "POKéMON hervorgerufen, so dass ihm\n"
+ "plötzlich prächtige Flügel wuchsen.");
+
+static const u8 DexDescription_Tanhel_1[] = _(
+ "Anstelle von Blut fließt eine starke\n"
+ "magnetische Energie durch TANHELs\n"
+ "Körper. Dieses POKéMON kommuniziert");
+static const u8 DexDescription_Tanhel_2[] = _(
+ "mit anderen, indem es kontrollierte\n"
+ "magnetische Impulse aussendet.");
+
+static const u8 DexDescription_Metang_1[] = _(
+ "Wenn zwei TANHEL miteinander\n"
+ "verschmelzen, entsteht daraus METANG.\n"
+ "Die Gehirne der TANHEL werden mit");
+static const u8 DexDescription_Metang_2[] = _(
+ "einem magnetischen Nervensystem\n"
+ "verbunden. Dadurch erzeugt es starke\n"
+ "psychokinetische Energie.");
+
+static const u8 DexDescription_Metagross_1[] = _(
+ "METAGROSS hat insgesamt vier Gehirne.\n"
+ "Diese können schwierige Berechnungen\n"
+ "schneller lösen als ein Supercomputer.");
+static const u8 DexDescription_Metagross_2[] = _(
+ "Dieses POKéMON kann durch die Lüfte\n"
+ "schweben, indem es seine vier Beine\n"
+ "einklappt.");
+
+static const u8 DexDescription_Regirock_1[] = _(
+ "REGIROCK wurde vor langer Zeit von\n"
+ "Menschen weggeschlossen. Wenn der\n"
+ "Körper dieses POKéMON im Kampf");
+static const u8 DexDescription_Regirock_2[] = _(
+ "Schaden nimmt, sucht es nach\n"
+ "passenden Steinen, um sich selber zu\n"
+ "reparieren.");
+
+static const u8 DexDescription_Regice_1[] = _(
+ "REGICEs tiefgefrorener Körper\n"
+ "entstand während der Eiszeit. Es kann\n"
+ "nicht einmal durch Feuer geschmolzen");
+static const u8 DexDescription_Regice_2[] = _(
+ "werden. Dieses POKéMON kontrolliert\n"
+ "eisige Luft von minus 200 Grad.");
+
+static const u8 DexDescription_Registeel_1[] = _(
+ "REGISTEEL hat einen Körper, der härter\n"
+ "ist als jede Art von Metall. Sein Körper\n"
+ "scheint hohl zu sein.");
+static const u8 DexDescription_Registeel_2[] = _(
+ "Niemand hat eine Ahnung, was dieses\n"
+ "POKéMON wohl frisst.");
+
+static const u8 DexDescription_Latias_1[] = _(
+ "LATIAS ist in höchstem Maße empfindlich\n"
+ "gegenüber den Emotionen der Menschen.\n"
+ "Wenn es den Anflug von Feindseligkeit");
+static const u8 DexDescription_Latias_2[] = _(
+ "wahrnimmt, werden seine Federn\n"
+ "zerzaust und es stößt schrille Schreie\n"
+ "aus, um seinen Gegner einzuschüchtern.");
+
+static const u8 DexDescription_Latios_1[] = _(
+ "LATIOS kann seinem Feind ein Bild\n"
+ "von etwas, das dieser einmal gesehen\n"
+ "hat, in den Kopf projizieren. Dieses");
+static const u8 DexDescription_Latios_2[] = _(
+ "POKéMON ist intelligent und es versteht\n"
+ "die menschliche Sprache.");
+
+static const u8 DexDescription_Kyogre_1[] = _(
+ "KYOGRE kann riesige Regenwolken\n"
+ "erzeugen, die den gesamten Himmel\n"
+ "bedecken, und wolkenbruchartige");
+static const u8 DexDescription_Kyogre_2[] = _(
+ "Niederschläge hervorrufen. Dieses\n"
+ "POKéMON hat vielen Menschen das Leben\n"
+ "gerettet, die unter einer Dürre litten.");
+
+static const u8 DexDescription_Groudon_1[] = _(
+ "GROUDON wurde lange Zeit in der\n"
+ "Mythologie als ein POKéMON\n"
+ "beschrieben, das Land erschaffen und");
+static const u8 DexDescription_Groudon_2[] = _(
+ "Kontinente vergrößern kann. Dieses\n"
+ "POKéMON fiel nach einem erbitterten\n"
+ "Kampf mit KYOGRE in den Schlaf.");
+
+static const u8 DexDescription_Rayquaza_1[] = _(
+ "RAYQUAZA lebte für hunderte Millionen\n"
+ "Jahre in der Ozonschicht und stieg nie\n"
+ "zur Erde hinab. Dieses POKéMON");
+static const u8 DexDescription_Rayquaza_2[] = _(
+ "lebt von Wasser und Partikeln aus der\n"
+ "Atmosphäre.");
+
+static const u8 DexDescription_Jirachi_1[] = _(
+ "Einer Legende nach erfüllt JIRACHI\n"
+ "jeden Wunsch, der auf einen Notizzettel\n"
+ "an seinem Kopf geschrieben wird. Wenn");
+static const u8 DexDescription_Jirachi_2[] = _(
+ "dieses POKéMON Gefahr wittert, kämpft\n"
+ "es bereits, bevor es überhaupt\n"
+ "aufgewacht ist.");
+
+static const u8 DexDescription_Deoxys_1[] = _(
+ "Die DNS eines Weltraumvirus hat eine\n"
+ "spontane Mutation erfahren, da sie\n"
+ "einem Laserstrahl ausgesetzt wurde.");
+static const u8 DexDescription_Deoxys_2[] = _(
+ "Daraus entstand DEOXYS. \n"
+ "Das kristallartige Organ auf der Brust\n"
+ "dieses POKéMON ist sein Gehirn.");
+
+static const struct PokedexEntry gPokedexEntries[] = {
+ {
+ // Dummy
+ .categoryName = _("UNBEKANNT"),
+ .height = 0,
+ .weight = 0,
+ .descriptionPage1 = DexDescription_Dummy_1,
+ .descriptionPage2 = DexDescription_Dummy_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Bisasam
+ .categoryName = _("SAMEN"),
+ .height = 7,
+ .weight = 69,
+ .descriptionPage1 = DexDescription_Bisasam_1,
+ .descriptionPage2 = DexDescription_Bisasam_2,
+ .pokemonScale = 356,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Bisaknosp
+ .categoryName = _("SAMEN"),
+ .height = 10,
+ .weight = 130,
+ .descriptionPage1 = DexDescription_Bisaknosp_1,
+ .descriptionPage2 = DexDescription_Bisaknosp_2,
+ .pokemonScale = 335,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Bisaflor
+ .categoryName = _("SAMEN"),
+ .height = 20,
+ .weight = 1000,
+ .descriptionPage1 = DexDescription_Bisaflor_1,
+ .descriptionPage2 = DexDescription_Bisaflor_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 388,
+ .trainerOffset = 6,
+ },
+ {
+ // Glumanda
+ .categoryName = _("ECHSE"),
+ .height = 6,
+ .weight = 85,
+ .descriptionPage1 = DexDescription_Glumanda_1,
+ .descriptionPage2 = DexDescription_Glumanda_2,
+ .pokemonScale = 444,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Glutexo
+ .categoryName = _("FLAMME"),
+ .height = 11,
+ .weight = 190,
+ .descriptionPage1 = DexDescription_Glutexo_1,
+ .descriptionPage2 = DexDescription_Glutexo_2,
+ .pokemonScale = 302,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Glurak
+ .categoryName = _("FLAMME"),
+ .height = 17,
+ .weight = 905,
+ .descriptionPage1 = DexDescription_Glurak_1,
+ .descriptionPage2 = DexDescription_Glurak_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 302,
+ .trainerOffset = 3,
+ },
+ {
+ // Schiggy
+ .categoryName = _("MINIKRÖTE"),
+ .height = 5,
+ .weight = 90,
+ .descriptionPage1 = DexDescription_Schiggy_1,
+ .descriptionPage2 = DexDescription_Schiggy_2,
+ .pokemonScale = 412,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Schillok
+ .categoryName = _("KRÖTE"),
+ .height = 10,
+ .weight = 225,
+ .descriptionPage1 = DexDescription_Schillok_1,
+ .descriptionPage2 = DexDescription_Schillok_2,
+ .pokemonScale = 332,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Turtok
+ .categoryName = _("PANZERTIER"),
+ .height = 16,
+ .weight = 855,
+ .descriptionPage1 = DexDescription_Turtok_1,
+ .descriptionPage2 = DexDescription_Turtok_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 65535,
+ .trainerScale = 293,
+ .trainerOffset = 2,
+ },
+ {
+ // Raupy
+ .categoryName = _("WURM"),
+ .height = 3,
+ .weight = 29,
+ .descriptionPage1 = DexDescription_Raupy_1,
+ .descriptionPage2 = DexDescription_Raupy_2,
+ .pokemonScale = 549,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Safcon
+ .categoryName = _("KOKON"),
+ .height = 7,
+ .weight = 99,
+ .descriptionPage1 = DexDescription_Safcon_1,
+ .descriptionPage2 = DexDescription_Safcon_2,
+ .pokemonScale = 350,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Smettbo
+ .categoryName = _("FALTER"),
+ .height = 11,
+ .weight = 320,
+ .descriptionPage1 = DexDescription_Smettbo_1,
+ .descriptionPage2 = DexDescription_Smettbo_2,
+ .pokemonScale = 312,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Hornliu
+ .categoryName = _("RAUPE"),
+ .height = 3,
+ .weight = 32,
+ .descriptionPage1 = DexDescription_Hornliu_1,
+ .descriptionPage2 = DexDescription_Hornliu_2,
+ .pokemonScale = 455,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kokuna
+ .categoryName = _("KOKON"),
+ .height = 6,
+ .weight = 100,
+ .descriptionPage1 = DexDescription_Kokuna_1,
+ .descriptionPage2 = DexDescription_Kokuna_2,
+ .pokemonScale = 424,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Bibor
+ .categoryName = _("GIFTBIENE"),
+ .height = 10,
+ .weight = 295,
+ .descriptionPage1 = DexDescription_Bibor_1,
+ .descriptionPage2 = DexDescription_Bibor_2,
+ .pokemonScale = 366,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Taubsi
+ .categoryName = _("KLEINVOGEL"),
+ .height = 3,
+ .weight = 18,
+ .descriptionPage1 = DexDescription_Taubsi_1,
+ .descriptionPage2 = DexDescription_Taubsi_2,
+ .pokemonScale = 508,
+ .pokemonOffset = 65533,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Tauboga
+ .categoryName = _("VOGEL"),
+ .height = 11,
+ .weight = 300,
+ .descriptionPage1 = DexDescription_Tauboga_1,
+ .descriptionPage2 = DexDescription_Tauboga_2,
+ .pokemonScale = 331,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Tauboss
+ .categoryName = _("VOGEL"),
+ .height = 15,
+ .weight = 395,
+ .descriptionPage1 = DexDescription_Tauboss_1,
+ .descriptionPage2 = DexDescription_Tauboss_2,
+ .pokemonScale = 269,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Rattfratz
+ .categoryName = _("MAUS"),
+ .height = 3,
+ .weight = 35,
+ .descriptionPage1 = DexDescription_Rattfratz_1,
+ .descriptionPage2 = DexDescription_Rattfratz_2,
+ .pokemonScale = 481,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Rattikarl
+ .categoryName = _("MAUS"),
+ .height = 7,
+ .weight = 185,
+ .descriptionPage1 = DexDescription_Rattikarl_1,
+ .descriptionPage2 = DexDescription_Rattikarl_2,
+ .pokemonScale = 459,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Habitak
+ .categoryName = _("KLEINVOGEL"),
+ .height = 3,
+ .weight = 20,
+ .descriptionPage1 = DexDescription_Habitak_1,
+ .descriptionPage2 = DexDescription_Habitak_2,
+ .pokemonScale = 571,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Ibitak
+ .categoryName = _("PICKVOGEL"),
+ .height = 12,
+ .weight = 380,
+ .descriptionPage1 = DexDescription_Ibitak_1,
+ .descriptionPage2 = DexDescription_Ibitak_2,
+ .pokemonScale = 278,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Rettan
+ .categoryName = _("SCHLANGE"),
+ .height = 20,
+ .weight = 69,
+ .descriptionPage1 = DexDescription_Rettan_1,
+ .descriptionPage2 = DexDescription_Rettan_2,
+ .pokemonScale = 298,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Arbok
+ .categoryName = _("KOBRA"),
+ .height = 35,
+ .weight = 650,
+ .descriptionPage1 = DexDescription_Arbok_1,
+ .descriptionPage2 = DexDescription_Arbok_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 296,
+ .trainerOffset = 2,
+ },
+ {
+ // Pikachu
+ .categoryName = _("MAUS"),
+ .height = 4,
+ .weight = 60,
+ .descriptionPage1 = DexDescription_Pikachu_1,
+ .descriptionPage2 = DexDescription_Pikachu_2,
+ .pokemonScale = 479,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Raichu
+ .categoryName = _("MAUS"),
+ .height = 8,
+ .weight = 300,
+ .descriptionPage1 = DexDescription_Raichu_1,
+ .descriptionPage2 = DexDescription_Raichu_2,
+ .pokemonScale = 426,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sandan
+ .categoryName = _("MAUS"),
+ .height = 6,
+ .weight = 120,
+ .descriptionPage1 = DexDescription_Sandan_1,
+ .descriptionPage2 = DexDescription_Sandan_2,
+ .pokemonScale = 365,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sandamer
+ .categoryName = _("MAUS"),
+ .height = 10,
+ .weight = 295,
+ .descriptionPage1 = DexDescription_Sandamer_1,
+ .descriptionPage2 = DexDescription_Sandamer_2,
+ .pokemonScale = 341,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Nidoran♀
+ .categoryName = _("GIFTDORN"),
+ .height = 4,
+ .weight = 70,
+ .descriptionPage1 = DexDescription_NidoranF_1,
+ .descriptionPage2 = DexDescription_NidoranF_2,
+ .pokemonScale = 488,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Nidorina
+ .categoryName = _("GIFTDORN"),
+ .height = 8,
+ .weight = 200,
+ .descriptionPage1 = DexDescription_Nidorina_1,
+ .descriptionPage2 = DexDescription_Nidorina_2,
+ .pokemonScale = 381,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Nidoqueen
+ .categoryName = _("BOHRER"),
+ .height = 13,
+ .weight = 600,
+ .descriptionPage1 = DexDescription_Nidoqueen_1,
+ .descriptionPage2 = DexDescription_Nidoqueen_2,
+ .pokemonScale = 293,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Nidoran♂
+ .categoryName = _("GIFTDORN"),
+ .height = 5,
+ .weight = 90,
+ .descriptionPage1 = DexDescription_NidoranM_1,
+ .descriptionPage2 = DexDescription_NidoranM_2,
+ .pokemonScale = 511,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Nidorino
+ .categoryName = _("GIFTDORN"),
+ .height = 9,
+ .weight = 195,
+ .descriptionPage1 = DexDescription_Nidorino_1,
+ .descriptionPage2 = DexDescription_Nidorino_2,
+ .pokemonScale = 408,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Nidoking
+ .categoryName = _("BOHRER"),
+ .height = 14,
+ .weight = 620,
+ .descriptionPage1 = DexDescription_Nidoking_1,
+ .descriptionPage2 = DexDescription_Nidoking_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Piepi
+ .categoryName = _("FEE"),
+ .height = 6,
+ .weight = 75,
+ .descriptionPage1 = DexDescription_Piepi_1,
+ .descriptionPage2 = DexDescription_Piepi_2,
+ .pokemonScale = 441,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pixi
+ .categoryName = _("FEE"),
+ .height = 13,
+ .weight = 400,
+ .descriptionPage1 = DexDescription_Pixi_1,
+ .descriptionPage2 = DexDescription_Pixi_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Vulpix
+ .categoryName = _("FUCHS"),
+ .height = 6,
+ .weight = 99,
+ .descriptionPage1 = DexDescription_Vulpix_1,
+ .descriptionPage2 = DexDescription_Vulpix_2,
+ .pokemonScale = 542,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Vulnona
+ .categoryName = _("FUCHS"),
+ .height = 11,
+ .weight = 199,
+ .descriptionPage1 = DexDescription_Vulnona_1,
+ .descriptionPage2 = DexDescription_Vulnona_2,
+ .pokemonScale = 339,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pummeluff
+ .categoryName = _("BALLON"),
+ .height = 5,
+ .weight = 55,
+ .descriptionPage1 = DexDescription_Pummeluff_1,
+ .descriptionPage2 = DexDescription_Pummeluff_2,
+ .pokemonScale = 433,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Knuddeluff
+ .categoryName = _("BALLON"),
+ .height = 10,
+ .weight = 120,
+ .descriptionPage1 = DexDescription_Knuddeluff_1,
+ .descriptionPage2 = DexDescription_Knuddeluff_2,
+ .pokemonScale = 328,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Zubat
+ .categoryName = _("FLEDERMAUS"),
+ .height = 8,
+ .weight = 75,
+ .descriptionPage1 = DexDescription_Zubat_1,
+ .descriptionPage2 = DexDescription_Zubat_2,
+ .pokemonScale = 362,
+ .pokemonOffset = 65531,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Golbat
+ .categoryName = _("FLEDERMAUS"),
+ .height = 16,
+ .weight = 550,
+ .descriptionPage1 = DexDescription_Golbat_1,
+ .descriptionPage2 = DexDescription_Golbat_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Myrapla
+ .categoryName = _("UNKRAUT"),
+ .height = 5,
+ .weight = 54,
+ .descriptionPage1 = DexDescription_Myrapla_1,
+ .descriptionPage2 = DexDescription_Myrapla_2,
+ .pokemonScale = 423,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Duflor
+ .categoryName = _("UNKRAUT"),
+ .height = 8,
+ .weight = 86,
+ .descriptionPage1 = DexDescription_Duflor_1,
+ .descriptionPage2 = DexDescription_Duflor_2,
+ .pokemonScale = 329,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Giflor
+ .categoryName = _("BLUME"),
+ .height = 12,
+ .weight = 186,
+ .descriptionPage1 = DexDescription_Giflor_1,
+ .descriptionPage2 = DexDescription_Giflor_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Paras
+ .categoryName = _("PILZ"),
+ .height = 3,
+ .weight = 54,
+ .descriptionPage1 = DexDescription_Paras_1,
+ .descriptionPage2 = DexDescription_Paras_2,
+ .pokemonScale = 593,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Parasek
+ .categoryName = _("PILZ"),
+ .height = 10,
+ .weight = 295,
+ .descriptionPage1 = DexDescription_Parasek_1,
+ .descriptionPage2 = DexDescription_Parasek_2,
+ .pokemonScale = 307,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Bluzuk
+ .categoryName = _("INSEKT"),
+ .height = 10,
+ .weight = 300,
+ .descriptionPage1 = DexDescription_Bluzuk_1,
+ .descriptionPage2 = DexDescription_Bluzuk_2,
+ .pokemonScale = 360,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 65535,
+ },
+ {
+ // Omot
+ .categoryName = _("GIFTMOTTE"),
+ .height = 15,
+ .weight = 125,
+ .descriptionPage1 = DexDescription_Omot_1,
+ .descriptionPage2 = DexDescription_Omot_2,
+ .pokemonScale = 285,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 1,
+ },
+ {
+ // Digda
+ .categoryName = _("MAULWURF"),
+ .height = 2,
+ .weight = 8,
+ .descriptionPage1 = DexDescription_Digda_1,
+ .descriptionPage2 = DexDescription_Digda_2,
+ .pokemonScale = 833,
+ .pokemonOffset = 25,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Digdri
+ .categoryName = _("MAULWURF"),
+ .height = 7,
+ .weight = 333,
+ .descriptionPage1 = DexDescription_Digdri_1,
+ .descriptionPage2 = DexDescription_Digdri_2,
+ .pokemonScale = 406,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Mauzi
+ .categoryName = _("KATZE"),
+ .height = 4,
+ .weight = 42,
+ .descriptionPage1 = DexDescription_Mauzi_1,
+ .descriptionPage2 = DexDescription_Mauzi_2,
+ .pokemonScale = 480,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Snobilikat
+ .categoryName = _("RASSEKATZE"),
+ .height = 10,
+ .weight = 320,
+ .descriptionPage1 = DexDescription_Snobilikat_1,
+ .descriptionPage2 = DexDescription_Snobilikat_2,
+ .pokemonScale = 320,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Enton
+ .categoryName = _("ENTE"),
+ .height = 8,
+ .weight = 196,
+ .descriptionPage1 = DexDescription_Enton_1,
+ .descriptionPage2 = DexDescription_Enton_2,
+ .pokemonScale = 369,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Entoron
+ .categoryName = _("ENTE"),
+ .height = 17,
+ .weight = 766,
+ .descriptionPage1 = DexDescription_Entoron_1,
+ .descriptionPage2 = DexDescription_Entoron_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 273,
+ .trainerOffset = 1,
+ },
+ {
+ // Menki
+ .categoryName = _("SCHW./ AFFE"),
+ .height = 5,
+ .weight = 280,
+ .descriptionPage1 = DexDescription_Menki_1,
+ .descriptionPage2 = DexDescription_Menki_2,
+ .pokemonScale = 404,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Rasaff
+ .categoryName = _("SCHW./ AFFE"),
+ .height = 10,
+ .weight = 320,
+ .descriptionPage1 = DexDescription_Rasaff_1,
+ .descriptionPage2 = DexDescription_Rasaff_2,
+ .pokemonScale = 326,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Fukano
+ .categoryName = _("HUND"),
+ .height = 7,
+ .weight = 190,
+ .descriptionPage1 = DexDescription_Fukano_1,
+ .descriptionPage2 = DexDescription_Fukano_2,
+ .pokemonScale = 346,
+ .pokemonOffset = 14,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Arkani
+ .categoryName = _("LEGENDÄR"),
+ .height = 19,
+ .weight = 1550,
+ .descriptionPage1 = DexDescription_Arkani_1,
+ .descriptionPage2 = DexDescription_Arkani_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 312,
+ .trainerOffset = 4,
+ },
+ {
+ // Quapsel
+ .categoryName = _("KAULQUAPPE"),
+ .height = 6,
+ .weight = 124,
+ .descriptionPage1 = DexDescription_Quapsel_1,
+ .descriptionPage2 = DexDescription_Quapsel_2,
+ .pokemonScale = 369,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Quaputzi
+ .categoryName = _("KAULQUAPPE"),
+ .height = 10,
+ .weight = 200,
+ .descriptionPage1 = DexDescription_Quaputzi_1,
+ .descriptionPage2 = DexDescription_Quaputzi_2,
+ .pokemonScale = 288,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Quappo
+ .categoryName = _("KAULQUAPPE"),
+ .height = 13,
+ .weight = 540,
+ .descriptionPage1 = DexDescription_Quappo_1,
+ .descriptionPage2 = DexDescription_Quappo_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Abra
+ .categoryName = _("PSI"),
+ .height = 9,
+ .weight = 195,
+ .descriptionPage1 = DexDescription_Abra_1,
+ .descriptionPage2 = DexDescription_Abra_2,
+ .pokemonScale = 363,
+ .pokemonOffset = 14,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kadabra
+ .categoryName = _("PSI"),
+ .height = 13,
+ .weight = 565,
+ .descriptionPage1 = DexDescription_Kadabra_1,
+ .descriptionPage2 = DexDescription_Kadabra_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Simsala
+ .categoryName = _("PSI"),
+ .height = 15,
+ .weight = 480,
+ .descriptionPage1 = DexDescription_Simsala_1,
+ .descriptionPage2 = DexDescription_Simsala_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Machollo
+ .categoryName = _("KRAFTPROTZ"),
+ .height = 8,
+ .weight = 195,
+ .descriptionPage1 = DexDescription_Machollo_1,
+ .descriptionPage2 = DexDescription_Machollo_2,
+ .pokemonScale = 342,
+ .pokemonOffset = 14,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Maschock
+ .categoryName = _("KRAFTPROTZ"),
+ .height = 15,
+ .weight = 705,
+ .descriptionPage1 = DexDescription_Maschock_1,
+ .descriptionPage2 = DexDescription_Maschock_2,
+ .pokemonScale = 323,
+ .pokemonOffset = 9,
+ .trainerScale = 257,
+ .trainerOffset = 0,
+ },
+ {
+ // Machomei
+ .categoryName = _("KRAFTPROTZ"),
+ .height = 16,
+ .weight = 1300,
+ .descriptionPage1 = DexDescription_Machomei_1,
+ .descriptionPage2 = DexDescription_Machomei_2,
+ .pokemonScale = 280,
+ .pokemonOffset = 1,
+ .trainerScale = 269,
+ .trainerOffset = 65535,
+ },
+ {
+ // Knofensa
+ .categoryName = _("BLUME"),
+ .height = 7,
+ .weight = 40,
+ .descriptionPage1 = DexDescription_Knofensa_1,
+ .descriptionPage2 = DexDescription_Knofensa_2,
+ .pokemonScale = 354,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Ultrigaria
+ .categoryName = _("FLIEGENTOT"),
+ .height = 10,
+ .weight = 64,
+ .descriptionPage1 = DexDescription_Ultrigaria_1,
+ .descriptionPage2 = DexDescription_Ultrigaria_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sarzenia
+ .categoryName = _("FLIEGENTOT"),
+ .height = 17,
+ .weight = 155,
+ .descriptionPage1 = DexDescription_Sarzenia_1,
+ .descriptionPage2 = DexDescription_Sarzenia_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 312,
+ .trainerOffset = 3,
+ },
+ {
+ // Tentacha
+ .categoryName = _("QUALLE"),
+ .height = 9,
+ .weight = 455,
+ .descriptionPage1 = DexDescription_Tentacha_1,
+ .descriptionPage2 = DexDescription_Tentacha_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Tentoxa
+ .categoryName = _("QUALLE"),
+ .height = 16,
+ .weight = 550,
+ .descriptionPage1 = DexDescription_Tentoxa_1,
+ .descriptionPage2 = DexDescription_Tentoxa_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 312,
+ .trainerOffset = 1,
+ },
+ {
+ // Kleinstein
+ .categoryName = _("GESTEIN"),
+ .height = 4,
+ .weight = 200,
+ .descriptionPage1 = DexDescription_Kleinstein_1,
+ .descriptionPage2 = DexDescription_Kleinstein_2,
+ .pokemonScale = 347,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Georok
+ .categoryName = _("GESTEIN"),
+ .height = 10,
+ .weight = 1050,
+ .descriptionPage1 = DexDescription_Georok_1,
+ .descriptionPage2 = DexDescription_Georok_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Geowaz
+ .categoryName = _("URGESTEIN"),
+ .height = 14,
+ .weight = 3000,
+ .descriptionPage1 = DexDescription_Geowaz_1,
+ .descriptionPage2 = DexDescription_Geowaz_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 296,
+ .trainerOffset = 2,
+ },
+ {
+ // Ponita
+ .categoryName = _("FEUERPFERD"),
+ .height = 10,
+ .weight = 300,
+ .descriptionPage1 = DexDescription_Ponita_1,
+ .descriptionPage2 = DexDescription_Ponita_2,
+ .pokemonScale = 283,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Gallopa
+ .categoryName = _("FEUERPFERD"),
+ .height = 17,
+ .weight = 950,
+ .descriptionPage1 = DexDescription_Gallopa_1,
+ .descriptionPage2 = DexDescription_Gallopa_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 289,
+ .trainerOffset = 1,
+ },
+ {
+ // Flegmon
+ .categoryName = _("SCHNARCHER"),
+ .height = 12,
+ .weight = 360,
+ .descriptionPage1 = DexDescription_Flegmon_1,
+ .descriptionPage2 = DexDescription_Flegmon_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Lahmus
+ .categoryName = _("SYMBIOSE"),
+ .height = 16,
+ .weight = 785,
+ .descriptionPage1 = DexDescription_Lahmus_1,
+ .descriptionPage2 = DexDescription_Lahmus_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 296,
+ .trainerOffset = 2,
+ },
+ {
+ // Magnetilo
+ .categoryName = _("MAGNET"),
+ .height = 3,
+ .weight = 60,
+ .descriptionPage1 = DexDescription_Magnetilo_1,
+ .descriptionPage2 = DexDescription_Magnetilo_2,
+ .pokemonScale = 288,
+ .pokemonOffset = 65527,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Magneton
+ .categoryName = _("MAGNET"),
+ .height = 10,
+ .weight = 600,
+ .descriptionPage1 = DexDescription_Magneton_1,
+ .descriptionPage2 = DexDescription_Magneton_2,
+ .pokemonScale = 292,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Porenta
+ .categoryName = _("WILDENTE"),
+ .height = 8,
+ .weight = 150,
+ .descriptionPage1 = DexDescription_Porenta_1,
+ .descriptionPage2 = DexDescription_Porenta_2,
+ .pokemonScale = 330,
+ .pokemonOffset = 2,
+ .trainerScale = 293,
+ .trainerOffset = 2,
+ },
+ {
+ // Dodu
+ .categoryName = _("DUOVOGEL"),
+ .height = 14,
+ .weight = 392,
+ .descriptionPage1 = DexDescription_Dodu_1,
+ .descriptionPage2 = DexDescription_Dodu_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 257,
+ .trainerOffset = 65535,
+ },
+ {
+ // Dodri
+ .categoryName = _("TRIVOGEL"),
+ .height = 18,
+ .weight = 852,
+ .descriptionPage1 = DexDescription_Dodri_1,
+ .descriptionPage2 = DexDescription_Dodri_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 268,
+ .trainerOffset = 0,
+ },
+ {
+ // Jurob
+ .categoryName = _("SEEHUND"),
+ .height = 11,
+ .weight = 900,
+ .descriptionPage1 = DexDescription_Jurob_1,
+ .descriptionPage2 = DexDescription_Jurob_2,
+ .pokemonScale = 297,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Jugong
+ .categoryName = _("SEEHUND"),
+ .height = 17,
+ .weight = 1200,
+ .descriptionPage1 = DexDescription_Jugong_1,
+ .descriptionPage2 = DexDescription_Jugong_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 275,
+ .trainerOffset = 0,
+ },
+ {
+ // Sleima
+ .categoryName = _("SCHLAMM"),
+ .height = 9,
+ .weight = 300,
+ .descriptionPage1 = DexDescription_Sleima_1,
+ .descriptionPage2 = DexDescription_Sleima_2,
+ .pokemonScale = 258,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sleimok
+ .categoryName = _("SCHLAMM"),
+ .height = 12,
+ .weight = 300,
+ .descriptionPage1 = DexDescription_Sleimok_1,
+ .descriptionPage2 = DexDescription_Sleimok_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Muschas
+ .categoryName = _("MUSCHEL"),
+ .height = 3,
+ .weight = 40,
+ .descriptionPage1 = DexDescription_Muschas_1,
+ .descriptionPage2 = DexDescription_Muschas_2,
+ .pokemonScale = 675,
+ .pokemonOffset = 24,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Austos
+ .categoryName = _("MUSCHEL"),
+ .height = 15,
+ .weight = 1325,
+ .descriptionPage1 = DexDescription_Austos_1,
+ .descriptionPage2 = DexDescription_Austos_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 269,
+ .trainerOffset = 1,
+ },
+ {
+ // Nebulak
+ .categoryName = _("GAS"),
+ .height = 13,
+ .weight = 1,
+ .descriptionPage1 = DexDescription_Nebulak_1,
+ .descriptionPage2 = DexDescription_Nebulak_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Alpollo
+ .categoryName = _("GAS"),
+ .height = 16,
+ .weight = 1,
+ .descriptionPage1 = DexDescription_Alpollo_1,
+ .descriptionPage2 = DexDescription_Alpollo_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 293,
+ .trainerOffset = 2,
+ },
+ {
+ // Gengar
+ .categoryName = _("SCHATTEN"),
+ .height = 15,
+ .weight = 405,
+ .descriptionPage1 = DexDescription_Gengar_1,
+ .descriptionPage2 = DexDescription_Gengar_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 302,
+ .trainerOffset = 2,
+ },
+ {
+ // Onix
+ .categoryName = _("FELSNATTER"),
+ .height = 88,
+ .weight = 2100,
+ .descriptionPage1 = DexDescription_Onix_1,
+ .descriptionPage2 = DexDescription_Onix_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 515,
+ .trainerOffset = 14,
+ },
+ {
+ // Traumato
+ .categoryName = _("HYPNOSE"),
+ .height = 10,
+ .weight = 324,
+ .descriptionPage1 = DexDescription_Traumato_1,
+ .descriptionPage2 = DexDescription_Traumato_2,
+ .pokemonScale = 274,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Hypno
+ .categoryName = _("HYPNOSE"),
+ .height = 16,
+ .weight = 756,
+ .descriptionPage1 = DexDescription_Hypno_1,
+ .descriptionPage2 = DexDescription_Hypno_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 257,
+ .trainerOffset = 0,
+ },
+ {
+ // Krabby
+ .categoryName = _("KRABBE"),
+ .height = 4,
+ .weight = 65,
+ .descriptionPage1 = DexDescription_Krabby_1,
+ .descriptionPage2 = DexDescription_Krabby_2,
+ .pokemonScale = 469,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kingler
+ .categoryName = _("KNEIFER"),
+ .height = 13,
+ .weight = 600,
+ .descriptionPage1 = DexDescription_Kingler_1,
+ .descriptionPage2 = DexDescription_Kingler_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Voltobal
+ .categoryName = _("BALL"),
+ .height = 5,
+ .weight = 104,
+ .descriptionPage1 = DexDescription_Voltobal_1,
+ .descriptionPage2 = DexDescription_Voltobal_2,
+ .pokemonScale = 364,
+ .pokemonOffset = 65528,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Lektrobal
+ .categoryName = _("BALL"),
+ .height = 12,
+ .weight = 666,
+ .descriptionPage1 = DexDescription_Lektrobal_1,
+ .descriptionPage2 = DexDescription_Lektrobal_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Owei
+ .categoryName = _("EI"),
+ .height = 4,
+ .weight = 25,
+ .descriptionPage1 = DexDescription_Owei_1,
+ .descriptionPage2 = DexDescription_Owei_2,
+ .pokemonScale = 489,
+ .pokemonOffset = 65532,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kokowei
+ .categoryName = _("PALMFRUCHT"),
+ .height = 20,
+ .weight = 1200,
+ .descriptionPage1 = DexDescription_Kokowei_1,
+ .descriptionPage2 = DexDescription_Kokowei_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 309,
+ .trainerOffset = 5,
+ },
+ {
+ // Tragosso
+ .categoryName = _("EINSAM"),
+ .height = 4,
+ .weight = 65,
+ .descriptionPage1 = DexDescription_Tragosso_1,
+ .descriptionPage2 = DexDescription_Tragosso_2,
+ .pokemonScale = 545,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Knogga
+ .categoryName = _("KNOCHENFAN"),
+ .height = 10,
+ .weight = 450,
+ .descriptionPage1 = DexDescription_Knogga_1,
+ .descriptionPage2 = DexDescription_Knogga_2,
+ .pokemonScale = 293,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kicklee
+ .categoryName = _("KICKER"),
+ .height = 15,
+ .weight = 498,
+ .descriptionPage1 = DexDescription_Kicklee_1,
+ .descriptionPage2 = DexDescription_Kicklee_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 259,
+ .trainerOffset = 1,
+ },
+ {
+ // Nockchan
+ .categoryName = _("PUNCHER"),
+ .height = 14,
+ .weight = 502,
+ .descriptionPage1 = DexDescription_Nockchan_1,
+ .descriptionPage2 = DexDescription_Nockchan_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 277,
+ .trainerOffset = 2,
+ },
+ {
+ // Schlurp
+ .categoryName = _("SCHLECKER"),
+ .height = 12,
+ .weight = 655,
+ .descriptionPage1 = DexDescription_Schlurp_1,
+ .descriptionPage2 = DexDescription_Schlurp_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Smogon
+ .categoryName = _("GIFTWOLKE"),
+ .height = 6,
+ .weight = 10,
+ .descriptionPage1 = DexDescription_Smogon_1,
+ .descriptionPage2 = DexDescription_Smogon_2,
+ .pokemonScale = 369,
+ .pokemonOffset = 65535,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Smogmog
+ .categoryName = _("GIFTWOLKE"),
+ .height = 12,
+ .weight = 95,
+ .descriptionPage1 = DexDescription_Smogmog_1,
+ .descriptionPage2 = DexDescription_Smogmog_2,
+ .pokemonScale = 305,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Rihorn
+ .categoryName = _("STACHLER"),
+ .height = 10,
+ .weight = 1150,
+ .descriptionPage1 = DexDescription_Rihorn_1,
+ .descriptionPage2 = DexDescription_Rihorn_2,
+ .pokemonScale = 267,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Rizeros
+ .categoryName = _("BOHRER"),
+ .height = 19,
+ .weight = 1200,
+ .descriptionPage1 = DexDescription_Rizeros_1,
+ .descriptionPage2 = DexDescription_Rizeros_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 299,
+ .trainerOffset = 2,
+ },
+ {
+ // Chaneira
+ .categoryName = _("EI"),
+ .height = 11,
+ .weight = 346,
+ .descriptionPage1 = DexDescription_Chaneira_1,
+ .descriptionPage2 = DexDescription_Chaneira_2,
+ .pokemonScale = 257,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Tangela
+ .categoryName = _("RANKE"),
+ .height = 10,
+ .weight = 350,
+ .descriptionPage1 = DexDescription_Tangela_1,
+ .descriptionPage2 = DexDescription_Tangela_2,
+ .pokemonScale = 304,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kangama
+ .categoryName = _("MUTTERTIER"),
+ .height = 22,
+ .weight = 800,
+ .descriptionPage1 = DexDescription_Kangama_1,
+ .descriptionPage2 = DexDescription_Kangama_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 387,
+ .trainerOffset = 8,
+ },
+ {
+ // Seeper
+ .categoryName = _("DRACHE"),
+ .height = 4,
+ .weight = 80,
+ .descriptionPage1 = DexDescription_Seeper_1,
+ .descriptionPage2 = DexDescription_Seeper_2,
+ .pokemonScale = 399,
+ .pokemonOffset = 65535,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Seemon
+ .categoryName = _("DRACHE"),
+ .height = 12,
+ .weight = 250,
+ .descriptionPage1 = DexDescription_Seemon_1,
+ .descriptionPage2 = DexDescription_Seemon_2,
+ .pokemonScale = 299,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Goldini
+ .categoryName = _("GOLDFISCH"),
+ .height = 6,
+ .weight = 150,
+ .descriptionPage1 = DexDescription_Goldini_1,
+ .descriptionPage2 = DexDescription_Goldini_2,
+ .pokemonScale = 379,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Golking
+ .categoryName = _("GOLDFISCH"),
+ .height = 13,
+ .weight = 390,
+ .descriptionPage1 = DexDescription_Golking_1,
+ .descriptionPage2 = DexDescription_Golking_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sterndu
+ .categoryName = _("STERNFORM"),
+ .height = 8,
+ .weight = 345,
+ .descriptionPage1 = DexDescription_Sterndu_1,
+ .descriptionPage2 = DexDescription_Sterndu_2,
+ .pokemonScale = 326,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Starmie
+ .categoryName = _("MYSTERIÖS"),
+ .height = 11,
+ .weight = 800,
+ .descriptionPage1 = DexDescription_Starmie_1,
+ .descriptionPage2 = DexDescription_Starmie_2,
+ .pokemonScale = 301,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pantimos
+ .categoryName = _("SPERRE"),
+ .height = 13,
+ .weight = 545,
+ .descriptionPage1 = DexDescription_Pantimos_1,
+ .descriptionPage2 = DexDescription_Pantimos_2,
+ .pokemonScale = 258,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sichlor
+ .categoryName = _("MANTIS"),
+ .height = 15,
+ .weight = 560,
+ .descriptionPage1 = DexDescription_Sichlor_1,
+ .descriptionPage2 = DexDescription_Sichlor_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 1,
+ .trainerScale = 293,
+ .trainerOffset = 2,
+ },
+ {
+ // Rossana
+ .categoryName = _("HUMANOTYP"),
+ .height = 14,
+ .weight = 406,
+ .descriptionPage1 = DexDescription_Rossana_1,
+ .descriptionPage2 = DexDescription_Rossana_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 300,
+ .trainerOffset = 1,
+ },
+ {
+ // Elektek
+ .categoryName = _("ELEKTRO"),
+ .height = 11,
+ .weight = 300,
+ .descriptionPage1 = DexDescription_Elektek_1,
+ .descriptionPage2 = DexDescription_Elektek_2,
+ .pokemonScale = 351,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Magmar
+ .categoryName = _("BRENNER"),
+ .height = 13,
+ .weight = 445,
+ .descriptionPage1 = DexDescription_Magmar_1,
+ .descriptionPage2 = DexDescription_Magmar_2,
+ .pokemonScale = 277,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pinsir
+ .categoryName = _("KNEIFKÄFER"),
+ .height = 15,
+ .weight = 550,
+ .descriptionPage1 = DexDescription_Pinsir_1,
+ .descriptionPage2 = DexDescription_Pinsir_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 257,
+ .trainerOffset = 0,
+ },
+ {
+ // Tauros
+ .categoryName = _("WILDBULLE"),
+ .height = 14,
+ .weight = 884,
+ .descriptionPage1 = DexDescription_Tauros_1,
+ .descriptionPage2 = DexDescription_Tauros_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Karpador
+ .categoryName = _("FISCH"),
+ .height = 9,
+ .weight = 100,
+ .descriptionPage1 = DexDescription_Karpador_1,
+ .descriptionPage2 = DexDescription_Karpador_2,
+ .pokemonScale = 310,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Garados
+ .categoryName = _("GRAUSAM"),
+ .height = 65,
+ .weight = 2350,
+ .descriptionPage1 = DexDescription_Garados_1,
+ .descriptionPage2 = DexDescription_Garados_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 481,
+ .trainerOffset = 13,
+ },
+ {
+ // Lapras
+ .categoryName = _("TRANSPORT"),
+ .height = 25,
+ .weight = 2200,
+ .descriptionPage1 = DexDescription_Lapras_1,
+ .descriptionPage2 = DexDescription_Lapras_2,
+ .pokemonScale = 257,
+ .pokemonOffset = 10,
+ .trainerScale = 423,
+ .trainerOffset = 8,
+ },
+ {
+ // Ditto
+ .categoryName = _("TRANSFORM"),
+ .height = 3,
+ .weight = 40,
+ .descriptionPage1 = DexDescription_Ditto_1,
+ .descriptionPage2 = DexDescription_Ditto_2,
+ .pokemonScale = 633,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Evoli
+ .categoryName = _("EVOLUTION"),
+ .height = 3,
+ .weight = 65,
+ .descriptionPage1 = DexDescription_Evoli_1,
+ .descriptionPage2 = DexDescription_Evoli_2,
+ .pokemonScale = 476,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Aquana
+ .categoryName = _("BLUBBLASE"),
+ .height = 10,
+ .weight = 290,
+ .descriptionPage1 = DexDescription_Aquana_1,
+ .descriptionPage2 = DexDescription_Aquana_2,
+ .pokemonScale = 316,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Blitza
+ .categoryName = _("BLITZ"),
+ .height = 8,
+ .weight = 245,
+ .descriptionPage1 = DexDescription_Blitza_1,
+ .descriptionPage2 = DexDescription_Blitza_2,
+ .pokemonScale = 283,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Flamara
+ .categoryName = _("FEUER"),
+ .height = 9,
+ .weight = 250,
+ .descriptionPage1 = DexDescription_Flamara_1,
+ .descriptionPage2 = DexDescription_Flamara_2,
+ .pokemonScale = 306,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Porygon
+ .categoryName = _("VIRTUELL"),
+ .height = 8,
+ .weight = 365,
+ .descriptionPage1 = DexDescription_Porygon_1,
+ .descriptionPage2 = DexDescription_Porygon_2,
+ .pokemonScale = 328,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Amonitas
+ .categoryName = _("SPIRALE"),
+ .height = 4,
+ .weight = 75,
+ .descriptionPage1 = DexDescription_Amonitas_1,
+ .descriptionPage2 = DexDescription_Amonitas_2,
+ .pokemonScale = 521,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Amoroso
+ .categoryName = _("SPIRALE"),
+ .height = 10,
+ .weight = 350,
+ .descriptionPage1 = DexDescription_Amoroso_1,
+ .descriptionPage2 = DexDescription_Amoroso_2,
+ .pokemonScale = 307,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kabuto
+ .categoryName = _("PANZERTIER"),
+ .height = 5,
+ .weight = 115,
+ .descriptionPage1 = DexDescription_Kabuto_1,
+ .descriptionPage2 = DexDescription_Kabuto_2,
+ .pokemonScale = 454,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kabutops
+ .categoryName = _("PANZERTIER"),
+ .height = 13,
+ .weight = 405,
+ .descriptionPage1 = DexDescription_Kabutops_1,
+ .descriptionPage2 = DexDescription_Kabutops_2,
+ .pokemonScale = 271,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Aerodactyl
+ .categoryName = _("FOSSIL"),
+ .height = 18,
+ .weight = 590,
+ .descriptionPage1 = DexDescription_Aerodactyl_1,
+ .descriptionPage2 = DexDescription_Aerodactyl_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 302,
+ .trainerOffset = 4,
+ },
+ {
+ // Relaxo
+ .categoryName = _("TAGTRÄUMER"),
+ .height = 21,
+ .weight = 4600,
+ .descriptionPage1 = DexDescription_Relaxo_1,
+ .descriptionPage2 = DexDescription_Relaxo_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 423,
+ .trainerOffset = 11,
+ },
+ {
+ // Arktos
+ .categoryName = _("EIS"),
+ .height = 17,
+ .weight = 554,
+ .descriptionPage1 = DexDescription_Arktos_1,
+ .descriptionPage2 = DexDescription_Arktos_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 309,
+ .trainerOffset = 2,
+ },
+ {
+ // Zapdos
+ .categoryName = _("ELEKTRO"),
+ .height = 16,
+ .weight = 526,
+ .descriptionPage1 = DexDescription_Zapdos_1,
+ .descriptionPage2 = DexDescription_Zapdos_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 318,
+ .trainerOffset = 3,
+ },
+ {
+ // Lavados
+ .categoryName = _("FLAMME"),
+ .height = 20,
+ .weight = 600,
+ .descriptionPage1 = DexDescription_Lavados_1,
+ .descriptionPage2 = DexDescription_Lavados_2,
+ .pokemonScale = 270,
+ .pokemonOffset = 0,
+ .trainerScale = 387,
+ .trainerOffset = 8,
+ },
+ {
+ // Dratini
+ .categoryName = _("DRACHE"),
+ .height = 18,
+ .weight = 33,
+ .descriptionPage1 = DexDescription_Dratini_1,
+ .descriptionPage2 = DexDescription_Dratini_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 8,
+ .trainerScale = 386,
+ .trainerOffset = 6,
+ },
+ {
+ // Dragonir
+ .categoryName = _("DRACHE"),
+ .height = 40,
+ .weight = 165,
+ .descriptionPage1 = DexDescription_Dragonir_1,
+ .descriptionPage2 = DexDescription_Dragonir_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 411,
+ .trainerOffset = 5,
+ },
+ {
+ // Dragoran
+ .categoryName = _("DRACHE"),
+ .height = 22,
+ .weight = 2100,
+ .descriptionPage1 = DexDescription_Dragoran_1,
+ .descriptionPage2 = DexDescription_Dragoran_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 309,
+ .trainerOffset = 4,
+ },
+ {
+ // Mewtu
+ .categoryName = _("GENMUTANT"),
+ .height = 20,
+ .weight = 1220,
+ .descriptionPage1 = DexDescription_Mewtu_1,
+ .descriptionPage2 = DexDescription_Mewtu_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 309,
+ .trainerOffset = 4,
+ },
+ {
+ // Mew
+ .categoryName = _("NEUE ART"),
+ .height = 4,
+ .weight = 40,
+ .descriptionPage1 = DexDescription_Mew_1,
+ .descriptionPage2 = DexDescription_Mew_2,
+ .pokemonScale = 457,
+ .pokemonOffset = 65534,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Endivie
+ .categoryName = _("LAUB"),
+ .height = 9,
+ .weight = 64,
+ .descriptionPage1 = DexDescription_Endivie_1,
+ .descriptionPage2 = DexDescription_Endivie_2,
+ .pokemonScale = 512,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Lorblatt
+ .categoryName = _("LAUB"),
+ .height = 12,
+ .weight = 158,
+ .descriptionPage1 = DexDescription_Lorblatt_1,
+ .descriptionPage2 = DexDescription_Lorblatt_2,
+ .pokemonScale = 296,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Meganie
+ .categoryName = _("KRÄUTER"),
+ .height = 18,
+ .weight = 1005,
+ .descriptionPage1 = DexDescription_Meganie_1,
+ .descriptionPage2 = DexDescription_Meganie_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 277,
+ .trainerOffset = 1,
+ },
+ {
+ // Feurigel
+ .categoryName = _("FEUERMAUS"),
+ .height = 5,
+ .weight = 79,
+ .descriptionPage1 = DexDescription_Feurigel_1,
+ .descriptionPage2 = DexDescription_Feurigel_2,
+ .pokemonScale = 539,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Igelavar
+ .categoryName = _("VULKAN"),
+ .height = 9,
+ .weight = 190,
+ .descriptionPage1 = DexDescription_Igelavar_1,
+ .descriptionPage2 = DexDescription_Igelavar_2,
+ .pokemonScale = 329,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Tornupto
+ .categoryName = _("VULKAN"),
+ .height = 17,
+ .weight = 795,
+ .descriptionPage1 = DexDescription_Tornupto_1,
+ .descriptionPage2 = DexDescription_Tornupto_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 268,
+ .trainerOffset = 1,
+ },
+ {
+ // Karnimani
+ .categoryName = _("GROSSMAUL"),
+ .height = 6,
+ .weight = 95,
+ .descriptionPage1 = DexDescription_Karnimani_1,
+ .descriptionPage2 = DexDescription_Karnimani_2,
+ .pokemonScale = 487,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Tyracroc
+ .categoryName = _("GROSSMAUL"),
+ .height = 11,
+ .weight = 250,
+ .descriptionPage1 = DexDescription_Tyracroc_1,
+ .descriptionPage2 = DexDescription_Tyracroc_2,
+ .pokemonScale = 378,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Impergator
+ .categoryName = _("GROSSMAUL"),
+ .height = 23,
+ .weight = 888,
+ .descriptionPage1 = DexDescription_Impergator_1,
+ .descriptionPage2 = DexDescription_Impergator_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 342,
+ .trainerOffset = 7,
+ },
+ {
+ // Wiesor
+ .categoryName = _("SPÄHER"),
+ .height = 8,
+ .weight = 60,
+ .descriptionPage1 = DexDescription_Wiesor_1,
+ .descriptionPage2 = DexDescription_Wiesor_2,
+ .pokemonScale = 439,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Wiesenior
+ .categoryName = _("LANGLEIB"),
+ .height = 18,
+ .weight = 325,
+ .descriptionPage1 = DexDescription_Wiesenior_1,
+ .descriptionPage2 = DexDescription_Wiesenior_2,
+ .pokemonScale = 346,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Hoothoot
+ .categoryName = _("EULE"),
+ .height = 7,
+ .weight = 212,
+ .descriptionPage1 = DexDescription_Hoothoot_1,
+ .descriptionPage2 = DexDescription_Hoothoot_2,
+ .pokemonScale = 380,
+ .pokemonOffset = 65534,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Noctuh
+ .categoryName = _("EULE"),
+ .height = 16,
+ .weight = 408,
+ .descriptionPage1 = DexDescription_Noctuh_1,
+ .descriptionPage2 = DexDescription_Noctuh_2,
+ .pokemonScale = 278,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Ledyba
+ .categoryName = _("FÜNF-PUNKT"),
+ .height = 10,
+ .weight = 108,
+ .descriptionPage1 = DexDescription_Ledyba_1,
+ .descriptionPage2 = DexDescription_Ledyba_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Ledian
+ .categoryName = _("FÜNF-PUNKT"),
+ .height = 14,
+ .weight = 356,
+ .descriptionPage1 = DexDescription_Ledian_1,
+ .descriptionPage2 = DexDescription_Ledian_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Webarak
+ .categoryName = _("FADENWURF"),
+ .height = 5,
+ .weight = 85,
+ .descriptionPage1 = DexDescription_Webarak_1,
+ .descriptionPage2 = DexDescription_Webarak_2,
+ .pokemonScale = 414,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Ariados
+ .categoryName = _("LANGBEIN"),
+ .height = 11,
+ .weight = 335,
+ .descriptionPage1 = DexDescription_Ariados_1,
+ .descriptionPage2 = DexDescription_Ariados_2,
+ .pokemonScale = 316,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Iksbat
+ .categoryName = _("FLEDERMAUS"),
+ .height = 18,
+ .weight = 750,
+ .descriptionPage1 = DexDescription_Iksbat_1,
+ .descriptionPage2 = DexDescription_Iksbat_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 281,
+ .trainerOffset = 1,
+ },
+ {
+ // Lampi
+ .categoryName = _("ANGLER"),
+ .height = 5,
+ .weight = 120,
+ .descriptionPage1 = DexDescription_Lampi_1,
+ .descriptionPage2 = DexDescription_Lampi_2,
+ .pokemonScale = 424,
+ .pokemonOffset = 65534,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Lanturn
+ .categoryName = _("LEUCHTE"),
+ .height = 12,
+ .weight = 225,
+ .descriptionPage1 = DexDescription_Lanturn_1,
+ .descriptionPage2 = DexDescription_Lanturn_2,
+ .pokemonScale = 269,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pichu
+ .categoryName = _("BABYMAUS"),
+ .height = 3,
+ .weight = 20,
+ .descriptionPage1 = DexDescription_Pichu_1,
+ .descriptionPage2 = DexDescription_Pichu_2,
+ .pokemonScale = 508,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pii
+ .categoryName = _("STERNFORM"),
+ .height = 3,
+ .weight = 30,
+ .descriptionPage1 = DexDescription_Pii_1,
+ .descriptionPage2 = DexDescription_Pii_2,
+ .pokemonScale = 462,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Fluffeluff
+ .categoryName = _("BALLON"),
+ .height = 3,
+ .weight = 10,
+ .descriptionPage1 = DexDescription_Fluffeluff_1,
+ .descriptionPage2 = DexDescription_Fluffeluff_2,
+ .pokemonScale = 457,
+ .pokemonOffset = 65535,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Togepi
+ .categoryName = _("ZACKENBALL"),
+ .height = 3,
+ .weight = 15,
+ .descriptionPage1 = DexDescription_Togepi_1,
+ .descriptionPage2 = DexDescription_Togepi_2,
+ .pokemonScale = 507,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Togetic
+ .categoryName = _("FREUDE"),
+ .height = 6,
+ .weight = 32,
+ .descriptionPage1 = DexDescription_Togetic_1,
+ .descriptionPage2 = DexDescription_Togetic_2,
+ .pokemonScale = 424,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Natu
+ .categoryName = _("KLEINVOGEL"),
+ .height = 2,
+ .weight = 20,
+ .descriptionPage1 = DexDescription_Natu_1,
+ .descriptionPage2 = DexDescription_Natu_2,
+ .pokemonScale = 610,
+ .pokemonOffset = 25,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Xatu
+ .categoryName = _("MYSTIK"),
+ .height = 15,
+ .weight = 150,
+ .descriptionPage1 = DexDescription_Xatu_1,
+ .descriptionPage2 = DexDescription_Xatu_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 318,
+ .trainerOffset = 4,
+ },
+ {
+ // Voltilamm
+ .categoryName = _("WOLLE"),
+ .height = 6,
+ .weight = 78,
+ .descriptionPage1 = DexDescription_Voltilamm_1,
+ .descriptionPage2 = DexDescription_Voltilamm_2,
+ .pokemonScale = 379,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Waaty
+ .categoryName = _("WOLLE"),
+ .height = 8,
+ .weight = 133,
+ .descriptionPage1 = DexDescription_Waaty_1,
+ .descriptionPage2 = DexDescription_Waaty_2,
+ .pokemonScale = 372,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Ampharos
+ .categoryName = _("LEUCHTE"),
+ .height = 14,
+ .weight = 615,
+ .descriptionPage1 = DexDescription_Ampharos_1,
+ .descriptionPage2 = DexDescription_Ampharos_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Blubella
+ .categoryName = _("BLUME"),
+ .height = 4,
+ .weight = 58,
+ .descriptionPage1 = DexDescription_Blubella_1,
+ .descriptionPage2 = DexDescription_Blubella_2,
+ .pokemonScale = 472,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Marill
+ .categoryName = _("AQUAMAUS"),
+ .height = 4,
+ .weight = 85,
+ .descriptionPage1 = DexDescription_Marill_1,
+ .descriptionPage2 = DexDescription_Marill_2,
+ .pokemonScale = 476,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Azumarill
+ .categoryName = _("AQUAHASE"),
+ .height = 8,
+ .weight = 285,
+ .descriptionPage1 = DexDescription_Azumarill_1,
+ .descriptionPage2 = DexDescription_Azumarill_2,
+ .pokemonScale = 448,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Mogelbaum
+ .categoryName = _("IMITATION"),
+ .height = 12,
+ .weight = 380,
+ .descriptionPage1 = DexDescription_Mogelbaum_1,
+ .descriptionPage2 = DexDescription_Mogelbaum_2,
+ .pokemonScale = 305,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Quaxo
+ .categoryName = _("FROSCH"),
+ .height = 11,
+ .weight = 339,
+ .descriptionPage1 = DexDescription_Quaxo_1,
+ .descriptionPage2 = DexDescription_Quaxo_2,
+ .pokemonScale = 289,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Hoppspross
+ .categoryName = _("LÖWENZAHN"),
+ .height = 4,
+ .weight = 5,
+ .descriptionPage1 = DexDescription_Hoppspross_1,
+ .descriptionPage2 = DexDescription_Hoppspross_2,
+ .pokemonScale = 562,
+ .pokemonOffset = 65529,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Hubelupf
+ .categoryName = _("LÖWENZAHN"),
+ .height = 6,
+ .weight = 10,
+ .descriptionPage1 = DexDescription_Hubelupf_1,
+ .descriptionPage2 = DexDescription_Hubelupf_2,
+ .pokemonScale = 387,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Papungha
+ .categoryName = _("LÖWENZAHN"),
+ .height = 8,
+ .weight = 30,
+ .descriptionPage1 = DexDescription_Papungha_1,
+ .descriptionPage2 = DexDescription_Papungha_2,
+ .pokemonScale = 418,
+ .pokemonOffset = 65532,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Griffel
+ .categoryName = _("LANGSCHWEIF"),
+ .height = 8,
+ .weight = 115,
+ .descriptionPage1 = DexDescription_Griffel_1,
+ .descriptionPage2 = DexDescription_Griffel_2,
+ .pokemonScale = 363,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sonnkern
+ .categoryName = _("SAMEN"),
+ .height = 3,
+ .weight = 18,
+ .descriptionPage1 = DexDescription_Sonnkern_1,
+ .descriptionPage2 = DexDescription_Sonnkern_2,
+ .pokemonScale = 541,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sonnflora
+ .categoryName = _("SONNE"),
+ .height = 8,
+ .weight = 85,
+ .descriptionPage1 = DexDescription_Sonnflora_1,
+ .descriptionPage2 = DexDescription_Sonnflora_2,
+ .pokemonScale = 444,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Yanma
+ .categoryName = _("LIBELLE"),
+ .height = 12,
+ .weight = 380,
+ .descriptionPage1 = DexDescription_Yanma_1,
+ .descriptionPage2 = DexDescription_Yanma_2,
+ .pokemonScale = 274,
+ .pokemonOffset = 65535,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Felino
+ .categoryName = _("FISCH"),
+ .height = 4,
+ .weight = 85,
+ .descriptionPage1 = DexDescription_Felino_1,
+ .descriptionPage2 = DexDescription_Felino_2,
+ .pokemonScale = 479,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Morlord
+ .categoryName = _("FISCH"),
+ .height = 14,
+ .weight = 750,
+ .descriptionPage1 = DexDescription_Morlord_1,
+ .descriptionPage2 = DexDescription_Morlord_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Psiana
+ .categoryName = _("SONNE"),
+ .height = 9,
+ .weight = 265,
+ .descriptionPage1 = DexDescription_Psiana_1,
+ .descriptionPage2 = DexDescription_Psiana_2,
+ .pokemonScale = 363,
+ .pokemonOffset = 14,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Nachtara
+ .categoryName = _("MONDSCHEIN"),
+ .height = 10,
+ .weight = 270,
+ .descriptionPage1 = DexDescription_Nachtara_1,
+ .descriptionPage2 = DexDescription_Nachtara_2,
+ .pokemonScale = 317,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kramurx
+ .categoryName = _("FINSTERNIS"),
+ .height = 5,
+ .weight = 21,
+ .descriptionPage1 = DexDescription_Kramurx_1,
+ .descriptionPage2 = DexDescription_Kramurx_2,
+ .pokemonScale = 401,
+ .pokemonOffset = 65528,
+ .trainerScale = 256,
+ .trainerOffset = 1,
+ },
+ {
+ // Laschoking
+ .categoryName = _("MONARCH"),
+ .height = 20,
+ .weight = 795,
+ .descriptionPage1 = DexDescription_Laschoking_1,
+ .descriptionPage2 = DexDescription_Laschoking_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 309,
+ .trainerOffset = 5,
+ },
+ {
+ // Traunfugil
+ .categoryName = _("KREISCHER"),
+ .height = 7,
+ .weight = 10,
+ .descriptionPage1 = DexDescription_Traunfugil_1,
+ .descriptionPage2 = DexDescription_Traunfugil_2,
+ .pokemonScale = 407,
+ .pokemonOffset = 65528,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Icognito
+ .categoryName = _("SYMBOL"),
+ .height = 5,
+ .weight = 50,
+ .descriptionPage1 = DexDescription_Icognito_1,
+ .descriptionPage2 = DexDescription_Icognito_2,
+ .pokemonScale = 411,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Woingenau
+ .categoryName = _("GEDULD"),
+ .height = 13,
+ .weight = 285,
+ .descriptionPage1 = DexDescription_Woingenau_1,
+ .descriptionPage2 = DexDescription_Woingenau_2,
+ .pokemonScale = 274,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Girafarig
+ .categoryName = _("LANGHALS"),
+ .height = 15,
+ .weight = 415,
+ .descriptionPage1 = DexDescription_Girafarig_1,
+ .descriptionPage2 = DexDescription_Girafarig_2,
+ .pokemonScale = 281,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Tannza
+ .categoryName = _("BEUTELWURM"),
+ .height = 6,
+ .weight = 72,
+ .descriptionPage1 = DexDescription_Tannza_1,
+ .descriptionPage2 = DexDescription_Tannza_2,
+ .pokemonScale = 445,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Forstellka
+ .categoryName = _("BEUTELWURM"),
+ .height = 12,
+ .weight = 1258,
+ .descriptionPage1 = DexDescription_Forstellka_1,
+ .descriptionPage2 = DexDescription_Forstellka_2,
+ .pokemonScale = 293,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Dummisel
+ .categoryName = _("SCHLANGE"),
+ .height = 15,
+ .weight = 140,
+ .descriptionPage1 = DexDescription_Dummisel_1,
+ .descriptionPage2 = DexDescription_Dummisel_2,
+ .pokemonScale = 316,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Skorgla
+ .categoryName = _("FLUGSKORPI"),
+ .height = 11,
+ .weight = 648,
+ .descriptionPage1 = DexDescription_Skorgla_1,
+ .descriptionPage2 = DexDescription_Skorgla_2,
+ .pokemonScale = 350,
+ .pokemonOffset = 65535,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Stahlos
+ .categoryName = _("STAHLBOA"),
+ .height = 92,
+ .weight = 4000,
+ .descriptionPage1 = DexDescription_Stahlos_1,
+ .descriptionPage2 = DexDescription_Stahlos_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 516,
+ .trainerOffset = 13,
+ },
+ {
+ // Snubbull
+ .categoryName = _("FEE"),
+ .height = 6,
+ .weight = 78,
+ .descriptionPage1 = DexDescription_Snubbull_1,
+ .descriptionPage2 = DexDescription_Snubbull_2,
+ .pokemonScale = 465,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Granbull
+ .categoryName = _("FEE"),
+ .height = 14,
+ .weight = 487,
+ .descriptionPage1 = DexDescription_Granbull_1,
+ .descriptionPage2 = DexDescription_Granbull_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Baldorfish
+ .categoryName = _("BALLON"),
+ .height = 5,
+ .weight = 39,
+ .descriptionPage1 = DexDescription_Baldorfish_1,
+ .descriptionPage2 = DexDescription_Baldorfish_2,
+ .pokemonScale = 430,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Scherox
+ .categoryName = _("KNEIFER"),
+ .height = 18,
+ .weight = 1180,
+ .descriptionPage1 = DexDescription_Scherox_1,
+ .descriptionPage2 = DexDescription_Scherox_2,
+ .pokemonScale = 278,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pottrott
+ .categoryName = _("SCHIMMEL"),
+ .height = 6,
+ .weight = 205,
+ .descriptionPage1 = DexDescription_Pottrott_1,
+ .descriptionPage2 = DexDescription_Pottrott_2,
+ .pokemonScale = 485,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Skaraborn
+ .categoryName = _("EINZELHORN"),
+ .height = 15,
+ .weight = 540,
+ .descriptionPage1 = DexDescription_Skaraborn_1,
+ .descriptionPage2 = DexDescription_Skaraborn_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sniebel
+ .categoryName = _("STICHKLAUE"),
+ .height = 9,
+ .weight = 280,
+ .descriptionPage1 = DexDescription_Sniebel_1,
+ .descriptionPage2 = DexDescription_Sniebel_2,
+ .pokemonScale = 413,
+ .pokemonOffset = 65533,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Teddiursa
+ .categoryName = _("KLEINBÄR"),
+ .height = 6,
+ .weight = 88,
+ .descriptionPage1 = DexDescription_Teddiursa_1,
+ .descriptionPage2 = DexDescription_Teddiursa_2,
+ .pokemonScale = 455,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Ursaring
+ .categoryName = _("SCHLÄFER"),
+ .height = 18,
+ .weight = 1258,
+ .descriptionPage1 = DexDescription_Ursaring_1,
+ .descriptionPage2 = DexDescription_Ursaring_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Schneckmag
+ .categoryName = _("LAVA"),
+ .height = 7,
+ .weight = 350,
+ .descriptionPage1 = DexDescription_Schneckmag_1,
+ .descriptionPage2 = DexDescription_Schneckmag_2,
+ .pokemonScale = 329,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Magcargo
+ .categoryName = _("LAVA"),
+ .height = 8,
+ .weight = 550,
+ .descriptionPage1 = DexDescription_Magcargo_1,
+ .descriptionPage2 = DexDescription_Magcargo_2,
+ .pokemonScale = 332,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Quiekel
+ .categoryName = _("FERKEL"),
+ .height = 4,
+ .weight = 65,
+ .descriptionPage1 = DexDescription_Quiekel_1,
+ .descriptionPage2 = DexDescription_Quiekel_2,
+ .pokemonScale = 324,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Keifel
+ .categoryName = _("SCHWEIN"),
+ .height = 11,
+ .weight = 558,
+ .descriptionPage1 = DexDescription_Keifel_1,
+ .descriptionPage2 = DexDescription_Keifel_2,
+ .pokemonScale = 306,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Corasonn
+ .categoryName = _("KORALLE"),
+ .height = 6,
+ .weight = 50,
+ .descriptionPage1 = DexDescription_Corasonn_1,
+ .descriptionPage2 = DexDescription_Corasonn_2,
+ .pokemonScale = 410,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Remoraid
+ .categoryName = _("HOCHDRUCK"),
+ .height = 6,
+ .weight = 120,
+ .descriptionPage1 = DexDescription_Remoraid_1,
+ .descriptionPage2 = DexDescription_Remoraid_2,
+ .pokemonScale = 316,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Octillery
+ .categoryName = _("HOCHDRUCK"),
+ .height = 9,
+ .weight = 285,
+ .descriptionPage1 = DexDescription_Octillery_1,
+ .descriptionPage2 = DexDescription_Octillery_2,
+ .pokemonScale = 296,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Botogel
+ .categoryName = _("LIEFERANT"),
+ .height = 9,
+ .weight = 160,
+ .descriptionPage1 = DexDescription_Botogel_1,
+ .descriptionPage2 = DexDescription_Botogel_2,
+ .pokemonScale = 293,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Mantax
+ .categoryName = _("FLUGROCHEN"),
+ .height = 21,
+ .weight = 2200,
+ .descriptionPage1 = DexDescription_Mantax_1,
+ .descriptionPage2 = DexDescription_Mantax_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 342,
+ .trainerOffset = 7,
+ },
+ {
+ // Panzaeron
+ .categoryName = _("FLUGSTAHL"),
+ .height = 17,
+ .weight = 505,
+ .descriptionPage1 = DexDescription_Panzaeron_1,
+ .descriptionPage2 = DexDescription_Panzaeron_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 271,
+ .trainerOffset = 1,
+ },
+ {
+ // Hunduster
+ .categoryName = _("HADES"),
+ .height = 6,
+ .weight = 108,
+ .descriptionPage1 = DexDescription_Hunduster_1,
+ .descriptionPage2 = DexDescription_Hunduster_2,
+ .pokemonScale = 393,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Hundemon
+ .categoryName = _("HADES"),
+ .height = 14,
+ .weight = 350,
+ .descriptionPage1 = DexDescription_Hundemon_1,
+ .descriptionPage2 = DexDescription_Hundemon_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Seedraking
+ .categoryName = _("DRACHE"),
+ .height = 18,
+ .weight = 1520,
+ .descriptionPage1 = DexDescription_Seedraking_1,
+ .descriptionPage2 = DexDescription_Seedraking_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 287,
+ .trainerOffset = 0,
+ },
+ {
+ // Phanpy
+ .categoryName = _("LANGRÜSSEL"),
+ .height = 5,
+ .weight = 335,
+ .descriptionPage1 = DexDescription_Phanpy_1,
+ .descriptionPage2 = DexDescription_Phanpy_2,
+ .pokemonScale = 465,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Donphan
+ .categoryName = _("PANZERTIER"),
+ .height = 11,
+ .weight = 1200,
+ .descriptionPage1 = DexDescription_Donphan_1,
+ .descriptionPage2 = DexDescription_Donphan_2,
+ .pokemonScale = 313,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Porygon2
+ .categoryName = _("VIRTUELL"),
+ .height = 6,
+ .weight = 325,
+ .descriptionPage1 = DexDescription_Porygon2_1,
+ .descriptionPage2 = DexDescription_Porygon2_2,
+ .pokemonScale = 320,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Damhirplex
+ .categoryName = _("VIELENDER"),
+ .height = 14,
+ .weight = 712,
+ .descriptionPage1 = DexDescription_Damhirplex_1,
+ .descriptionPage2 = DexDescription_Damhirplex_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Farbeagle
+ .categoryName = _("MALER"),
+ .height = 12,
+ .weight = 580,
+ .descriptionPage1 = DexDescription_Farbeagle_1,
+ .descriptionPage2 = DexDescription_Farbeagle_2,
+ .pokemonScale = 287,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Rabauz
+ .categoryName = _("RACKER"),
+ .height = 7,
+ .weight = 210,
+ .descriptionPage1 = DexDescription_Rabauz_1,
+ .descriptionPage2 = DexDescription_Rabauz_2,
+ .pokemonScale = 292,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kapoera
+ .categoryName = _("KOPFSTAND"),
+ .height = 14,
+ .weight = 480,
+ .descriptionPage1 = DexDescription_Kapoera_1,
+ .descriptionPage2 = DexDescription_Kapoera_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 257,
+ .trainerOffset = 0,
+ },
+ {
+ // Kussilla
+ .categoryName = _("KUSS"),
+ .height = 4,
+ .weight = 60,
+ .descriptionPage1 = DexDescription_Kussilla_1,
+ .descriptionPage2 = DexDescription_Kussilla_2,
+ .pokemonScale = 440,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Elekid
+ .categoryName = _("ELEKTRO"),
+ .height = 6,
+ .weight = 235,
+ .descriptionPage1 = DexDescription_Elekid_1,
+ .descriptionPage2 = DexDescription_Elekid_2,
+ .pokemonScale = 363,
+ .pokemonOffset = 14,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Magby
+ .categoryName = _("GLUTHERD"),
+ .height = 7,
+ .weight = 214,
+ .descriptionPage1 = DexDescription_Magby_1,
+ .descriptionPage2 = DexDescription_Magby_2,
+ .pokemonScale = 284,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Miltank
+ .categoryName = _("MILCHKUH"),
+ .height = 12,
+ .weight = 755,
+ .descriptionPage1 = DexDescription_Miltank_1,
+ .descriptionPage2 = DexDescription_Miltank_2,
+ .pokemonScale = 280,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Heiteira
+ .categoryName = _("FREUDE"),
+ .height = 15,
+ .weight = 468,
+ .descriptionPage1 = DexDescription_Heiteira_1,
+ .descriptionPage2 = DexDescription_Heiteira_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 310,
+ .trainerOffset = 3,
+ },
+ {
+ // Raikou
+ .categoryName = _("DONNER"),
+ .height = 19,
+ .weight = 1780,
+ .descriptionPage1 = DexDescription_Raikou_1,
+ .descriptionPage2 = DexDescription_Raikou_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 345,
+ .trainerOffset = 7,
+ },
+ {
+ // Entei
+ .categoryName = _("VULKAN"),
+ .height = 21,
+ .weight = 1980,
+ .descriptionPage1 = DexDescription_Entei_1,
+ .descriptionPage2 = DexDescription_Entei_2,
+ .pokemonScale = 259,
+ .pokemonOffset = 0,
+ .trainerScale = 345,
+ .trainerOffset = 7,
+ },
+ {
+ // Suicune
+ .categoryName = _("POLARLICHT"),
+ .height = 20,
+ .weight = 1870,
+ .descriptionPage1 = DexDescription_Suicune_1,
+ .descriptionPage2 = DexDescription_Suicune_2,
+ .pokemonScale = 269,
+ .pokemonOffset = 0,
+ .trainerScale = 345,
+ .trainerOffset = 7,
+ },
+ {
+ // Larvitar
+ .categoryName = _("FELSHAUT"),
+ .height = 6,
+ .weight = 720,
+ .descriptionPage1 = DexDescription_Larvitar_1,
+ .descriptionPage2 = DexDescription_Larvitar_2,
+ .pokemonScale = 472,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pupitar
+ .categoryName = _("HARTSCHALE"),
+ .height = 12,
+ .weight = 1520,
+ .descriptionPage1 = DexDescription_Pupitar_1,
+ .descriptionPage2 = DexDescription_Pupitar_2,
+ .pokemonScale = 292,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Despotar
+ .categoryName = _("PANZERTIER"),
+ .height = 20,
+ .weight = 2020,
+ .descriptionPage1 = DexDescription_Despotar_1,
+ .descriptionPage2 = DexDescription_Despotar_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 345,
+ .trainerOffset = 7,
+ },
+ {
+ // Lugia
+ .categoryName = _("TAUCHER"),
+ .height = 52,
+ .weight = 2160,
+ .descriptionPage1 = DexDescription_Lugia_1,
+ .descriptionPage2 = DexDescription_Lugia_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 721,
+ .trainerOffset = 19,
+ },
+ {
+ // Ho-oh
+ .categoryName = _("REGENBOGEN"),
+ .height = 38,
+ .weight = 1990,
+ .descriptionPage1 = DexDescription_HoOh_1,
+ .descriptionPage2 = DexDescription_HoOh_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 610,
+ .trainerOffset = 17,
+ },
+ {
+ // Celebi
+ .categoryName = _("ZEITREISE"),
+ .height = 6,
+ .weight = 50,
+ .descriptionPage1 = DexDescription_Celebi_1,
+ .descriptionPage2 = DexDescription_Celebi_2,
+ .pokemonScale = 393,
+ .pokemonOffset = 65526,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Geckarbor
+ .categoryName = _("WALDGECKO"),
+ .height = 5,
+ .weight = 50,
+ .descriptionPage1 = DexDescription_Geckarbor_1,
+ .descriptionPage2 = DexDescription_Geckarbor_2,
+ .pokemonScale = 541,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Reptain
+ .categoryName = _("WALDGECKO"),
+ .height = 9,
+ .weight = 216,
+ .descriptionPage1 = DexDescription_Reptain_1,
+ .descriptionPage2 = DexDescription_Reptain_2,
+ .pokemonScale = 360,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Gewaldro
+ .categoryName = _("DSCHUNGEL"),
+ .height = 17,
+ .weight = 522,
+ .descriptionPage1 = DexDescription_Gewaldro_1,
+ .descriptionPage2 = DexDescription_Gewaldro_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 65535,
+ .trainerScale = 275,
+ .trainerOffset = 2,
+ },
+ {
+ // Flemmli
+ .categoryName = _("KÜKEN"),
+ .height = 4,
+ .weight = 25,
+ .descriptionPage1 = DexDescription_Flemmli_1,
+ .descriptionPage2 = DexDescription_Flemmli_2,
+ .pokemonScale = 566,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Jungglut
+ .categoryName = _("KLEINHAHN"),
+ .height = 9,
+ .weight = 195,
+ .descriptionPage1 = DexDescription_Jungglut_1,
+ .descriptionPage2 = DexDescription_Jungglut_2,
+ .pokemonScale = 343,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Lohgock
+ .categoryName = _("GROSSBRAND"),
+ .height = 19,
+ .weight = 520,
+ .descriptionPage1 = DexDescription_Lohgock_1,
+ .descriptionPage2 = DexDescription_Lohgock_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 301,
+ .trainerOffset = 4,
+ },
+ {
+ // Hydropi
+ .categoryName = _("LEHMHÜPFER"),
+ .height = 4,
+ .weight = 76,
+ .descriptionPage1 = DexDescription_Hydropi_1,
+ .descriptionPage2 = DexDescription_Hydropi_2,
+ .pokemonScale = 535,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Moorabbel
+ .categoryName = _("LEHMHÜPFER"),
+ .height = 7,
+ .weight = 280,
+ .descriptionPage1 = DexDescription_Moorabbel_1,
+ .descriptionPage2 = DexDescription_Moorabbel_2,
+ .pokemonScale = 340,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sumpex
+ .categoryName = _("LEHMHÜPFER"),
+ .height = 15,
+ .weight = 819,
+ .descriptionPage1 = DexDescription_Sumpex_1,
+ .descriptionPage2 = DexDescription_Sumpex_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Fiffyen
+ .categoryName = _("BISS"),
+ .height = 5,
+ .weight = 136,
+ .descriptionPage1 = DexDescription_Fiffyen_1,
+ .descriptionPage2 = DexDescription_Fiffyen_2,
+ .pokemonScale = 481,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Magnayen
+ .categoryName = _("BISS"),
+ .height = 10,
+ .weight = 370,
+ .descriptionPage1 = DexDescription_Magnayen_1,
+ .descriptionPage2 = DexDescription_Magnayen_2,
+ .pokemonScale = 362,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Zigzachs
+ .categoryName = _("KLEINDACHS"),
+ .height = 4,
+ .weight = 175,
+ .descriptionPage1 = DexDescription_Zigzachs_1,
+ .descriptionPage2 = DexDescription_Zigzachs_2,
+ .pokemonScale = 560,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Geradaks
+ .categoryName = _("SPRINTER"),
+ .height = 5,
+ .weight = 325,
+ .descriptionPage1 = DexDescription_Geradaks_1,
+ .descriptionPage2 = DexDescription_Geradaks_2,
+ .pokemonScale = 321,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Waumpel
+ .categoryName = _("WURM"),
+ .height = 3,
+ .weight = 36,
+ .descriptionPage1 = DexDescription_Waumpel_1,
+ .descriptionPage2 = DexDescription_Waumpel_2,
+ .pokemonScale = 711,
+ .pokemonOffset = 24,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Schaloko
+ .categoryName = _("KOKON"),
+ .height = 6,
+ .weight = 100,
+ .descriptionPage1 = DexDescription_Schaloko_1,
+ .descriptionPage2 = DexDescription_Schaloko_2,
+ .pokemonScale = 431,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Papinella
+ .categoryName = _("FALTER"),
+ .height = 10,
+ .weight = 284,
+ .descriptionPage1 = DexDescription_Papinella_1,
+ .descriptionPage2 = DexDescription_Papinella_2,
+ .pokemonScale = 298,
+ .pokemonOffset = 65535,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Panekon
+ .categoryName = _("KOKON"),
+ .height = 7,
+ .weight = 115,
+ .descriptionPage1 = DexDescription_Panekon_1,
+ .descriptionPage2 = DexDescription_Panekon_2,
+ .pokemonScale = 391,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pudox
+ .categoryName = _("GIFTMOTTE"),
+ .height = 12,
+ .weight = 316,
+ .descriptionPage1 = DexDescription_Pudox_1,
+ .descriptionPage2 = DexDescription_Pudox_2,
+ .pokemonScale = 269,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Loturzel
+ .categoryName = _("WASSERLINSE"),
+ .height = 5,
+ .weight = 26,
+ .descriptionPage1 = DexDescription_Loturzel_1,
+ .descriptionPage2 = DexDescription_Loturzel_2,
+ .pokemonScale = 406,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Lombrero
+ .categoryName = _("FROHMUT"),
+ .height = 12,
+ .weight = 325,
+ .descriptionPage1 = DexDescription_Lombrero_1,
+ .descriptionPage2 = DexDescription_Lombrero_2,
+ .pokemonScale = 277,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kappalores
+ .categoryName = _("SORGLOS"),
+ .height = 15,
+ .weight = 550,
+ .descriptionPage1 = DexDescription_Kappalores_1,
+ .descriptionPage2 = DexDescription_Kappalores_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 268,
+ .trainerOffset = 65535,
+ },
+ {
+ // Samurzel
+ .categoryName = _("EICHELNUSS"),
+ .height = 5,
+ .weight = 40,
+ .descriptionPage1 = DexDescription_Samurzel_1,
+ .descriptionPage2 = DexDescription_Samurzel_2,
+ .pokemonScale = 472,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Blanas
+ .categoryName = _("HINTERLIST"),
+ .height = 10,
+ .weight = 280,
+ .descriptionPage1 = DexDescription_Blanas_1,
+ .descriptionPage2 = DexDescription_Blanas_2,
+ .pokemonScale = 299,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Tengulist
+ .categoryName = _("VERSCHLAGEN"),
+ .height = 13,
+ .weight = 596,
+ .descriptionPage1 = DexDescription_Tengulist_1,
+ .descriptionPage2 = DexDescription_Tengulist_2,
+ .pokemonScale = 290,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Schwalbini
+ .categoryName = _("SCHWÄLBLEIN"),
+ .height = 3,
+ .weight = 23,
+ .descriptionPage1 = DexDescription_Schwalbini_1,
+ .descriptionPage2 = DexDescription_Schwalbini_2,
+ .pokemonScale = 465,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Schwalboss
+ .categoryName = _("SCHWALBE"),
+ .height = 7,
+ .weight = 198,
+ .descriptionPage1 = DexDescription_Schwalboss_1,
+ .descriptionPage2 = DexDescription_Schwalboss_2,
+ .pokemonScale = 428,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Wingull
+ .categoryName = _("SEEMÖWE"),
+ .height = 6,
+ .weight = 95,
+ .descriptionPage1 = DexDescription_Wingull_1,
+ .descriptionPage2 = DexDescription_Wingull_2,
+ .pokemonScale = 295,
+ .pokemonOffset = 65534,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pelipper
+ .categoryName = _("WASSERVOGEL"),
+ .height = 12,
+ .weight = 280,
+ .descriptionPage1 = DexDescription_Pelipper_1,
+ .descriptionPage2 = DexDescription_Pelipper_2,
+ .pokemonScale = 288,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Trasla
+ .categoryName = _("GEFÜHL"),
+ .height = 4,
+ .weight = 66,
+ .descriptionPage1 = DexDescription_Trasla_1,
+ .descriptionPage2 = DexDescription_Trasla_2,
+ .pokemonScale = 457,
+ .pokemonOffset = 65533,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kirlia
+ .categoryName = _("EMOTION"),
+ .height = 8,
+ .weight = 202,
+ .descriptionPage1 = DexDescription_Kirlia_1,
+ .descriptionPage2 = DexDescription_Kirlia_2,
+ .pokemonScale = 354,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Guardevoir
+ .categoryName = _("UMARMUNG"),
+ .height = 16,
+ .weight = 484,
+ .descriptionPage1 = DexDescription_Guardevoir_1,
+ .descriptionPage2 = DexDescription_Guardevoir_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Gehweiher
+ .categoryName = _("WASSERGEHER"),
+ .height = 5,
+ .weight = 17,
+ .descriptionPage1 = DexDescription_Gehweiher_1,
+ .descriptionPage2 = DexDescription_Gehweiher_2,
+ .pokemonScale = 375,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Maskeregen
+ .categoryName = _("AUGE"),
+ .height = 8,
+ .weight = 36,
+ .descriptionPage1 = DexDescription_Maskeregen_1,
+ .descriptionPage2 = DexDescription_Maskeregen_2,
+ .pokemonScale = 378,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Knilz
+ .categoryName = _("PILZ"),
+ .height = 4,
+ .weight = 45,
+ .descriptionPage1 = DexDescription_Knilz_1,
+ .descriptionPage2 = DexDescription_Knilz_2,
+ .pokemonScale = 513,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kapilz
+ .categoryName = _("PILZ"),
+ .height = 12,
+ .weight = 392,
+ .descriptionPage1 = DexDescription_Kapilz_1,
+ .descriptionPage2 = DexDescription_Kapilz_2,
+ .pokemonScale = 324,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Bummelz
+ .categoryName = _("FAULPELZ"),
+ .height = 8,
+ .weight = 240,
+ .descriptionPage1 = DexDescription_Bummelz_1,
+ .descriptionPage2 = DexDescription_Bummelz_2,
+ .pokemonScale = 291,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Muntier
+ .categoryName = _("WILDAFFE"),
+ .height = 14,
+ .weight = 465,
+ .descriptionPage1 = DexDescription_Muntier_1,
+ .descriptionPage2 = DexDescription_Muntier_2,
+ .pokemonScale = 301,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Letarking
+ .categoryName = _("MÜSSIG"),
+ .height = 20,
+ .weight = 1305,
+ .descriptionPage1 = DexDescription_Letarking_1,
+ .descriptionPage2 = DexDescription_Letarking_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 300,
+ .trainerOffset = 1,
+ },
+ {
+ // Nincada
+ .categoryName = _("VORBEREITER"),
+ .height = 5,
+ .weight = 55,
+ .descriptionPage1 = DexDescription_Nincada_1,
+ .descriptionPage2 = DexDescription_Nincada_2,
+ .pokemonScale = 405,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Ninjask
+ .categoryName = _("NINJA"),
+ .height = 8,
+ .weight = 120,
+ .descriptionPage1 = DexDescription_Ninjask_1,
+ .descriptionPage2 = DexDescription_Ninjask_2,
+ .pokemonScale = 383,
+ .pokemonOffset = 65527,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Ninjatom
+ .categoryName = _("HÄUTUNG"),
+ .height = 8,
+ .weight = 12,
+ .descriptionPage1 = DexDescription_Ninjatom_1,
+ .descriptionPage2 = DexDescription_Ninjatom_2,
+ .pokemonScale = 372,
+ .pokemonOffset = 65528,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Flurmel
+ .categoryName = _("FLÜSTER"),
+ .height = 6,
+ .weight = 163,
+ .descriptionPage1 = DexDescription_Flurmel_1,
+ .descriptionPage2 = DexDescription_Flurmel_2,
+ .pokemonScale = 373,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Krakeelo
+ .categoryName = _("LAUTHALS"),
+ .height = 10,
+ .weight = 405,
+ .descriptionPage1 = DexDescription_Krakeelo_1,
+ .descriptionPage2 = DexDescription_Krakeelo_2,
+ .pokemonScale = 356,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Krawumms
+ .categoryName = _("KRACH"),
+ .height = 15,
+ .weight = 840,
+ .descriptionPage1 = DexDescription_Krawumms_1,
+ .descriptionPage2 = DexDescription_Krawumms_2,
+ .pokemonScale = 284,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Makuhita
+ .categoryName = _("COURAGE"),
+ .height = 10,
+ .weight = 864,
+ .descriptionPage1 = DexDescription_Makuhita_1,
+ .descriptionPage2 = DexDescription_Makuhita_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Hariyama
+ .categoryName = _("ARMWURF"),
+ .height = 23,
+ .weight = 2538,
+ .descriptionPage1 = DexDescription_Hariyama_1,
+ .descriptionPage2 = DexDescription_Hariyama_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 343,
+ .trainerOffset = 7,
+ },
+ {
+ // Azurill
+ .categoryName = _("GEPUNKTET"),
+ .height = 2,
+ .weight = 20,
+ .descriptionPage1 = DexDescription_Azurill_1,
+ .descriptionPage2 = DexDescription_Azurill_2,
+ .pokemonScale = 603,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Nasgnet
+ .categoryName = _("KOMPASS"),
+ .height = 10,
+ .weight = 970,
+ .descriptionPage1 = DexDescription_Nasgnet_1,
+ .descriptionPage2 = DexDescription_Nasgnet_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 9,
+ .trainerScale = 289,
+ .trainerOffset = 3,
+ },
+ {
+ // Eneco
+ .categoryName = _("KÄTZCHEN"),
+ .height = 6,
+ .weight = 110,
+ .descriptionPage1 = DexDescription_Eneco_1,
+ .descriptionPage2 = DexDescription_Eneco_2,
+ .pokemonScale = 492,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Enekoro
+ .categoryName = _("EINGEBILDET"),
+ .height = 11,
+ .weight = 326,
+ .descriptionPage1 = DexDescription_Enekoro_1,
+ .descriptionPage2 = DexDescription_Enekoro_2,
+ .pokemonScale = 322,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Zobiris
+ .categoryName = _("FINSTERNIS"),
+ .height = 5,
+ .weight = 110,
+ .descriptionPage1 = DexDescription_Zobiris_1,
+ .descriptionPage2 = DexDescription_Zobiris_2,
+ .pokemonScale = 451,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Flunkifer
+ .categoryName = _("SCHWINDLER"),
+ .height = 6,
+ .weight = 115,
+ .descriptionPage1 = DexDescription_Flunkifer_1,
+ .descriptionPage2 = DexDescription_Flunkifer_2,
+ .pokemonScale = 466,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Stollunior
+ .categoryName = _("EISENPANZER"),
+ .height = 4,
+ .weight = 600,
+ .descriptionPage1 = DexDescription_Stollunior_1,
+ .descriptionPage2 = DexDescription_Stollunior_2,
+ .pokemonScale = 419,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Stollrak
+ .categoryName = _("EISENPANZER"),
+ .height = 9,
+ .weight = 1200,
+ .descriptionPage1 = DexDescription_Stollrak_1,
+ .descriptionPage2 = DexDescription_Stollrak_2,
+ .pokemonScale = 275,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Stolloss
+ .categoryName = _("EISENPANZER"),
+ .height = 21,
+ .weight = 3600,
+ .descriptionPage1 = DexDescription_Stolloss_1,
+ .descriptionPage2 = DexDescription_Stolloss_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 65535,
+ .trainerScale = 350,
+ .trainerOffset = 6,
+ },
+ {
+ // Meditie
+ .categoryName = _("MEDITATION"),
+ .height = 6,
+ .weight = 112,
+ .descriptionPage1 = DexDescription_Meditie_1,
+ .descriptionPage2 = DexDescription_Meditie_2,
+ .pokemonScale = 465,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Meditalis
+ .categoryName = _("MEDITATION"),
+ .height = 13,
+ .weight = 315,
+ .descriptionPage1 = DexDescription_Meditalis_1,
+ .descriptionPage2 = DexDescription_Meditalis_2,
+ .pokemonScale = 298,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Frizelbliz
+ .categoryName = _("GEWITTER"),
+ .height = 6,
+ .weight = 152,
+ .descriptionPage1 = DexDescription_Frizelbliz_1,
+ .descriptionPage2 = DexDescription_Frizelbliz_2,
+ .pokemonScale = 290,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Voltenso
+ .categoryName = _("ENTLADUNG"),
+ .height = 15,
+ .weight = 402,
+ .descriptionPage1 = DexDescription_Voltenso_1,
+ .descriptionPage2 = DexDescription_Voltenso_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 257,
+ .trainerOffset = 0,
+ },
+ {
+ // Plusle
+ .categoryName = _("JUBEL"),
+ .height = 4,
+ .weight = 42,
+ .descriptionPage1 = DexDescription_Plusle_1,
+ .descriptionPage2 = DexDescription_Plusle_2,
+ .pokemonScale = 515,
+ .pokemonOffset = 65527,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Minun
+ .categoryName = _("JUBEL"),
+ .height = 4,
+ .weight = 42,
+ .descriptionPage1 = DexDescription_Minun_1,
+ .descriptionPage2 = DexDescription_Minun_2,
+ .pokemonScale = 512,
+ .pokemonOffset = 65529,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Volbeat
+ .categoryName = _("LIBELLE"),
+ .height = 7,
+ .weight = 177,
+ .descriptionPage1 = DexDescription_Volbeat_1,
+ .descriptionPage2 = DexDescription_Volbeat_2,
+ .pokemonScale = 442,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Illumise
+ .categoryName = _("LIBELLE"),
+ .height = 6,
+ .weight = 177,
+ .descriptionPage1 = DexDescription_Illumise_1,
+ .descriptionPage2 = DexDescription_Illumise_2,
+ .pokemonScale = 572,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Roselia
+ .categoryName = _("DORN"),
+ .height = 3,
+ .weight = 20,
+ .descriptionPage1 = DexDescription_Roselia_1,
+ .descriptionPage2 = DexDescription_Roselia_2,
+ .pokemonScale = 677,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Schluppuck
+ .categoryName = _("MAGEN"),
+ .height = 4,
+ .weight = 103,
+ .descriptionPage1 = DexDescription_Schluppuck_1,
+ .descriptionPage2 = DexDescription_Schluppuck_2,
+ .pokemonScale = 593,
+ .pokemonOffset = 23,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Schlukwech
+ .categoryName = _("GIFTBEUTEL"),
+ .height = 17,
+ .weight = 800,
+ .descriptionPage1 = DexDescription_Schlukwech_1,
+ .descriptionPage2 = DexDescription_Schlukwech_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 345,
+ .trainerOffset = 3,
+ },
+ {
+ // Kanivanha
+ .categoryName = _("GNADENLOS"),
+ .height = 8,
+ .weight = 208,
+ .descriptionPage1 = DexDescription_Kanivanha_1,
+ .descriptionPage2 = DexDescription_Kanivanha_2,
+ .pokemonScale = 362,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Tohaido
+ .categoryName = _("BRUTAL"),
+ .height = 18,
+ .weight = 888,
+ .descriptionPage1 = DexDescription_Tohaido_1,
+ .descriptionPage2 = DexDescription_Tohaido_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 317,
+ .trainerOffset = 3,
+ },
+ {
+ // Wailmer
+ .categoryName = _("KUGELWAL"),
+ .height = 20,
+ .weight = 1300,
+ .descriptionPage1 = DexDescription_Wailmer_1,
+ .descriptionPage2 = DexDescription_Wailmer_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 493,
+ .trainerOffset = 0,
+ },
+ {
+ // Wailord
+ .categoryName = _("FLUTWAL"),
+ .height = 145,
+ .weight = 3980,
+ .descriptionPage1 = DexDescription_Wailord_1,
+ .descriptionPage2 = DexDescription_Wailord_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 1352,
+ .trainerOffset = 18,
+ },
+ {
+ // Camaub
+ .categoryName = _("TAUBHEIT"),
+ .height = 7,
+ .weight = 240,
+ .descriptionPage1 = DexDescription_Camaub_1,
+ .descriptionPage2 = DexDescription_Camaub_2,
+ .pokemonScale = 342,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Camerupt
+ .categoryName = _("AUSBRUCH"),
+ .height = 19,
+ .weight = 2200,
+ .descriptionPage1 = DexDescription_Camerupt_1,
+ .descriptionPage2 = DexDescription_Camerupt_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 7,
+ .trainerScale = 345,
+ .trainerOffset = 6,
+ },
+ {
+ // Qurtel
+ .categoryName = _("KOHLE"),
+ .height = 5,
+ .weight = 804,
+ .descriptionPage1 = DexDescription_Qurtel_1,
+ .descriptionPage2 = DexDescription_Qurtel_2,
+ .pokemonScale = 390,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Spoink
+ .categoryName = _("SPRUNGFEDER"),
+ .height = 7,
+ .weight = 306,
+ .descriptionPage1 = DexDescription_Spoink_1,
+ .descriptionPage2 = DexDescription_Spoink_2,
+ .pokemonScale = 423,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Groink
+ .categoryName = _("MANIPULATOR"),
+ .height = 9,
+ .weight = 715,
+ .descriptionPage1 = DexDescription_Groink_1,
+ .descriptionPage2 = DexDescription_Groink_2,
+ .pokemonScale = 358,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Pandir
+ .categoryName = _("PUNKT-PANDA"),
+ .height = 11,
+ .weight = 50,
+ .descriptionPage1 = DexDescription_Pandir_1,
+ .descriptionPage2 = DexDescription_Pandir_2,
+ .pokemonScale = 321,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Knacklion
+ .categoryName = _("AMEISENLÖWE"),
+ .height = 7,
+ .weight = 150,
+ .descriptionPage1 = DexDescription_Knacklion_1,
+ .descriptionPage2 = DexDescription_Knacklion_2,
+ .pokemonScale = 298,
+ .pokemonOffset = 17,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Vibrava
+ .categoryName = _("VIBRATION"),
+ .height = 11,
+ .weight = 153,
+ .descriptionPage1 = DexDescription_Vibrava_1,
+ .descriptionPage2 = DexDescription_Vibrava_2,
+ .pokemonScale = 370,
+ .pokemonOffset = 11,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Libelldra
+ .categoryName = _("MYSTIK"),
+ .height = 20,
+ .weight = 820,
+ .descriptionPage1 = DexDescription_Libelldra_1,
+ .descriptionPage2 = DexDescription_Libelldra_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 268,
+ .trainerOffset = 1,
+ },
+ {
+ // Tuska
+ .categoryName = _("KAKTUS"),
+ .height = 4,
+ .weight = 513,
+ .descriptionPage1 = DexDescription_Tuska_1,
+ .descriptionPage2 = DexDescription_Tuska_2,
+ .pokemonScale = 455,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Noktuska
+ .categoryName = _("VOGELSCHOCK"),
+ .height = 13,
+ .weight = 774,
+ .descriptionPage1 = DexDescription_Noktuska_1,
+ .descriptionPage2 = DexDescription_Noktuska_2,
+ .pokemonScale = 327,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Wablu
+ .categoryName = _("WOLLVOGEL"),
+ .height = 4,
+ .weight = 12,
+ .descriptionPage1 = DexDescription_Wablu_1,
+ .descriptionPage2 = DexDescription_Wablu_2,
+ .pokemonScale = 422,
+ .pokemonOffset = 65528,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Altaria
+ .categoryName = _("SUMMSEL"),
+ .height = 11,
+ .weight = 206,
+ .descriptionPage1 = DexDescription_Altaria_1,
+ .descriptionPage2 = DexDescription_Altaria_2,
+ .pokemonScale = 327,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sengo
+ .categoryName = _("FRETTKATZ"),
+ .height = 13,
+ .weight = 403,
+ .descriptionPage1 = DexDescription_Sengo_1,
+ .descriptionPage2 = DexDescription_Sengo_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Vipitis
+ .categoryName = _("REISSZAHN"),
+ .height = 27,
+ .weight = 525,
+ .descriptionPage1 = DexDescription_Vipitis_1,
+ .descriptionPage2 = DexDescription_Vipitis_2,
+ .pokemonScale = 275,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Lunastein
+ .categoryName = _("METEORIT"),
+ .height = 10,
+ .weight = 1680,
+ .descriptionPage1 = DexDescription_Lunastein_1,
+ .descriptionPage2 = DexDescription_Lunastein_2,
+ .pokemonScale = 300,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Sonnfel
+ .categoryName = _("METEORIT"),
+ .height = 12,
+ .weight = 1540,
+ .descriptionPage1 = DexDescription_Sonnfel_1,
+ .descriptionPage2 = DexDescription_Sonnfel_2,
+ .pokemonScale = 328,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Schmerbe
+ .categoryName = _("BARTHAAR"),
+ .height = 4,
+ .weight = 19,
+ .descriptionPage1 = DexDescription_Schmerbe_1,
+ .descriptionPage2 = DexDescription_Schmerbe_2,
+ .pokemonScale = 581,
+ .pokemonOffset = 65533,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Welsar
+ .categoryName = _("BARTHAAR"),
+ .height = 9,
+ .weight = 236,
+ .descriptionPage1 = DexDescription_Welsar_1,
+ .descriptionPage2 = DexDescription_Welsar_2,
+ .pokemonScale = 317,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Krebscorps
+ .categoryName = _("GROBIAN"),
+ .height = 6,
+ .weight = 115,
+ .descriptionPage1 = DexDescription_Krebscorps_1,
+ .descriptionPage2 = DexDescription_Krebscorps_2,
+ .pokemonScale = 484,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Krebutack
+ .categoryName = _("SCHLINGEL"),
+ .height = 11,
+ .weight = 328,
+ .descriptionPage1 = DexDescription_Krebutack_1,
+ .descriptionPage2 = DexDescription_Krebutack_2,
+ .pokemonScale = 365,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Puppance
+ .categoryName = _("LEHMPUPPE"),
+ .height = 5,
+ .weight = 215,
+ .descriptionPage1 = DexDescription_Puppance_1,
+ .descriptionPage2 = DexDescription_Puppance_2,
+ .pokemonScale = 457,
+ .pokemonOffset = 21,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Lepumentas
+ .categoryName = _("LEHMPUPPE"),
+ .height = 15,
+ .weight = 1080,
+ .descriptionPage1 = DexDescription_Lepumentas_1,
+ .descriptionPage2 = DexDescription_Lepumentas_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 280,
+ .trainerOffset = 1,
+ },
+ {
+ // Liliep
+ .categoryName = _("SEEANEMONE"),
+ .height = 10,
+ .weight = 238,
+ .descriptionPage1 = DexDescription_Liliep_1,
+ .descriptionPage2 = DexDescription_Liliep_2,
+ .pokemonScale = 305,
+ .pokemonOffset = 8,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Wielie
+ .categoryName = _("RANKFÜSSER"),
+ .height = 15,
+ .weight = 604,
+ .descriptionPage1 = DexDescription_Wielie_1,
+ .descriptionPage2 = DexDescription_Wielie_2,
+ .pokemonScale = 267,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Anorith
+ .categoryName = _("KREBSSENIOR"),
+ .height = 7,
+ .weight = 125,
+ .descriptionPage1 = DexDescription_Anorith_1,
+ .descriptionPage2 = DexDescription_Anorith_2,
+ .pokemonScale = 296,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Armaldo
+ .categoryName = _("SCHILD"),
+ .height = 15,
+ .weight = 682,
+ .descriptionPage1 = DexDescription_Armaldo_1,
+ .descriptionPage2 = DexDescription_Armaldo_2,
+ .pokemonScale = 312,
+ .pokemonOffset = 3,
+ .trainerScale = 271,
+ .trainerOffset = 0,
+ },
+ {
+ // Barschwa
+ .categoryName = _("FISCH"),
+ .height = 6,
+ .weight = 74,
+ .descriptionPage1 = DexDescription_Barschwa_1,
+ .descriptionPage2 = DexDescription_Barschwa_2,
+ .pokemonScale = 423,
+ .pokemonOffset = 65532,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Milotic
+ .categoryName = _("ZARTHEIT"),
+ .height = 62,
+ .weight = 1620,
+ .descriptionPage1 = DexDescription_Milotic_1,
+ .descriptionPage2 = DexDescription_Milotic_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 360,
+ .trainerOffset = 7,
+ },
+ {
+ // Formeo
+ .categoryName = _("WETTER"),
+ .height = 3,
+ .weight = 8,
+ .descriptionPage1 = DexDescription_Formeo_1,
+ .descriptionPage2 = DexDescription_Formeo_2,
+ .pokemonScale = 435,
+ .pokemonOffset = 65531,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kecleon
+ .categoryName = _("FARBENSPIEL"),
+ .height = 10,
+ .weight = 220,
+ .descriptionPage1 = DexDescription_Kecleon_1,
+ .descriptionPage2 = DexDescription_Kecleon_2,
+ .pokemonScale = 316,
+ .pokemonOffset = 10,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Shuppet
+ .categoryName = _("PUPPE"),
+ .height = 6,
+ .weight = 23,
+ .descriptionPage1 = DexDescription_Shuppet_1,
+ .descriptionPage2 = DexDescription_Shuppet_2,
+ .pokemonScale = 440,
+ .pokemonOffset = 20,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Banette
+ .categoryName = _("MARIONETTE"),
+ .height = 11,
+ .weight = 125,
+ .descriptionPage1 = DexDescription_Banette_1,
+ .descriptionPage2 = DexDescription_Banette_2,
+ .pokemonScale = 262,
+ .pokemonOffset = 9,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Zwirrlicht
+ .categoryName = _("REQUIEM"),
+ .height = 8,
+ .weight = 150,
+ .descriptionPage1 = DexDescription_Zwirrlicht_1,
+ .descriptionPage2 = DexDescription_Zwirrlicht_2,
+ .pokemonScale = 406,
+ .pokemonOffset = 65532,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Zwirrklop
+ .categoryName = _("WINK"),
+ .height = 16,
+ .weight = 306,
+ .descriptionPage1 = DexDescription_Zwirrklop_1,
+ .descriptionPage2 = DexDescription_Zwirrklop_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 299,
+ .trainerOffset = 1,
+ },
+ {
+ // Tropius
+ .categoryName = _("OBST"),
+ .height = 20,
+ .weight = 1000,
+ .descriptionPage1 = DexDescription_Tropius_1,
+ .descriptionPage2 = DexDescription_Tropius_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 344,
+ .trainerOffset = 7,
+ },
+ {
+ // Palimpalim
+ .categoryName = _("WINDSPIEL"),
+ .height = 6,
+ .weight = 10,
+ .descriptionPage1 = DexDescription_Palimpalim_1,
+ .descriptionPage2 = DexDescription_Palimpalim_2,
+ .pokemonScale = 505,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Absol
+ .categoryName = _("DESASTER"),
+ .height = 12,
+ .weight = 470,
+ .descriptionPage1 = DexDescription_Absol_1,
+ .descriptionPage2 = DexDescription_Absol_2,
+ .pokemonScale = 301,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Isso
+ .categoryName = _("STRAHLEKIND"),
+ .height = 6,
+ .weight = 140,
+ .descriptionPage1 = DexDescription_Isso_1,
+ .descriptionPage2 = DexDescription_Isso_2,
+ .pokemonScale = 484,
+ .pokemonOffset = 19,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Schneppke
+ .categoryName = _("SCHNEEHUT"),
+ .height = 7,
+ .weight = 168,
+ .descriptionPage1 = DexDescription_Schneppke_1,
+ .descriptionPage2 = DexDescription_Schneppke_2,
+ .pokemonScale = 380,
+ .pokemonOffset = 15,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Firnontor
+ .categoryName = _("ANTLITZ"),
+ .height = 15,
+ .weight = 2565,
+ .descriptionPage1 = DexDescription_Firnontor_1,
+ .descriptionPage2 = DexDescription_Firnontor_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 3,
+ .trainerScale = 344,
+ .trainerOffset = 0,
+ },
+ {
+ // Seemops
+ .categoryName = _("APPLAUS"),
+ .height = 8,
+ .weight = 395,
+ .descriptionPage1 = DexDescription_Seemops_1,
+ .descriptionPage2 = DexDescription_Seemops_2,
+ .pokemonScale = 315,
+ .pokemonOffset = 16,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Seejong
+ .categoryName = _("SPIELBALL"),
+ .height = 11,
+ .weight = 876,
+ .descriptionPage1 = DexDescription_Seejong_1,
+ .descriptionPage2 = DexDescription_Seejong_2,
+ .pokemonScale = 338,
+ .pokemonOffset = 13,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Walraisa
+ .categoryName = _("EISBRECHER"),
+ .height = 14,
+ .weight = 1506,
+ .descriptionPage1 = DexDescription_Walraisa_1,
+ .descriptionPage2 = DexDescription_Walraisa_2,
+ .pokemonScale = 316,
+ .pokemonOffset = 4,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Perlu
+ .categoryName = _("MUSCHEL"),
+ .height = 4,
+ .weight = 525,
+ .descriptionPage1 = DexDescription_Perlu_1,
+ .descriptionPage2 = DexDescription_Perlu_2,
+ .pokemonScale = 691,
+ .pokemonOffset = 22,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Aalabyss
+ .categoryName = _("TIEFSEE"),
+ .height = 17,
+ .weight = 270,
+ .descriptionPage1 = DexDescription_Aalabyss_1,
+ .descriptionPage2 = DexDescription_Aalabyss_2,
+ .pokemonScale = 307,
+ .pokemonOffset = 1,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Saganabyss
+ .categoryName = _("SÜDSEE"),
+ .height = 18,
+ .weight = 226,
+ .descriptionPage1 = DexDescription_Saganabyss_1,
+ .descriptionPage2 = DexDescription_Saganabyss_2,
+ .pokemonScale = 278,
+ .pokemonOffset = 5,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Relicanth
+ .categoryName = _("BESTAND"),
+ .height = 10,
+ .weight = 234,
+ .descriptionPage1 = DexDescription_Relicanth_1,
+ .descriptionPage2 = DexDescription_Relicanth_2,
+ .pokemonScale = 316,
+ .pokemonOffset = 7,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Liebiskus
+ .categoryName = _("RENDEZVOUS"),
+ .height = 6,
+ .weight = 87,
+ .descriptionPage1 = DexDescription_Liebiskus_1,
+ .descriptionPage2 = DexDescription_Liebiskus_2,
+ .pokemonScale = 371,
+ .pokemonOffset = 2,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Kindwurm
+ .categoryName = _("STEINHAUPT"),
+ .height = 6,
+ .weight = 421,
+ .descriptionPage1 = DexDescription_Kindwurm_1,
+ .descriptionPage2 = DexDescription_Kindwurm_2,
+ .pokemonScale = 448,
+ .pokemonOffset = 18,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Draschel
+ .categoryName = _("DURCHSTEHER"),
+ .height = 11,
+ .weight = 1105,
+ .descriptionPage1 = DexDescription_Draschel_1,
+ .descriptionPage2 = DexDescription_Draschel_2,
+ .pokemonScale = 311,
+ .pokemonOffset = 12,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Brutalanda
+ .categoryName = _("DRACHE"),
+ .height = 15,
+ .weight = 1026,
+ .descriptionPage1 = DexDescription_Brutalanda_1,
+ .descriptionPage2 = DexDescription_Brutalanda_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Tanhel
+ .categoryName = _("EISENKUGEL"),
+ .height = 6,
+ .weight = 952,
+ .descriptionPage1 = DexDescription_Tanhel_1,
+ .descriptionPage2 = DexDescription_Tanhel_2,
+ .pokemonScale = 414,
+ .pokemonOffset = 65535,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Metang
+ .categoryName = _("EISENKLAUE"),
+ .height = 12,
+ .weight = 2025,
+ .descriptionPage1 = DexDescription_Metang_1,
+ .descriptionPage2 = DexDescription_Metang_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 6,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Metagross
+ .categoryName = _("EISENFUSS"),
+ .height = 16,
+ .weight = 5500,
+ .descriptionPage1 = DexDescription_Metagross_1,
+ .descriptionPage2 = DexDescription_Metagross_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 4,
+ .trainerScale = 447,
+ .trainerOffset = 9,
+ },
+ {
+ // Regirock
+ .categoryName = _("STEINGIPFEL"),
+ .height = 17,
+ .weight = 2300,
+ .descriptionPage1 = DexDescription_Regirock_1,
+ .descriptionPage2 = DexDescription_Regirock_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 2,
+ .trainerScale = 309,
+ .trainerOffset = 1,
+ },
+ {
+ // Regice
+ .categoryName = _("EISBERG"),
+ .height = 18,
+ .weight = 1750,
+ .descriptionPage1 = DexDescription_Regice_1,
+ .descriptionPage2 = DexDescription_Regice_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 301,
+ .trainerOffset = 2,
+ },
+ {
+ // Registeel
+ .categoryName = _("EISEN"),
+ .height = 19,
+ .weight = 2050,
+ .descriptionPage1 = DexDescription_Registeel_1,
+ .descriptionPage2 = DexDescription_Registeel_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 359,
+ .trainerOffset = 6,
+ },
+ {
+ // Latias
+ .categoryName = _("ÄON"),
+ .height = 14,
+ .weight = 400,
+ .descriptionPage1 = DexDescription_Latias_1,
+ .descriptionPage2 = DexDescription_Latias_2,
+ .pokemonScale = 304,
+ .pokemonOffset = 3,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Latios
+ .categoryName = _("ÄON"),
+ .height = 20,
+ .weight = 600,
+ .descriptionPage1 = DexDescription_Latios_1,
+ .descriptionPage2 = DexDescription_Latios_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 294,
+ .trainerOffset = 3,
+ },
+ {
+ // Kyogre
+ .categoryName = _("SEEGRÜNDLER"),
+ .height = 45,
+ .weight = 3520,
+ .descriptionPage1 = DexDescription_Kyogre_1,
+ .descriptionPage2 = DexDescription_Kyogre_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 614,
+ .trainerOffset = 13,
+ },
+ {
+ // Groudon
+ .categoryName = _("KONTINENT"),
+ .height = 35,
+ .weight = 9500,
+ .descriptionPage1 = DexDescription_Groudon_1,
+ .descriptionPage2 = DexDescription_Groudon_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 515,
+ .trainerOffset = 14,
+ },
+ {
+ // Rayquaza
+ .categoryName = _("HIMMELHOCH"),
+ .height = 70,
+ .weight = 2065,
+ .descriptionPage1 = DexDescription_Rayquaza_1,
+ .descriptionPage2 = DexDescription_Rayquaza_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 448,
+ .trainerOffset = 12,
+ },
+ {
+ // Jirachi
+ .categoryName = _("WÜNSCHER"),
+ .height = 3,
+ .weight = 11,
+ .descriptionPage1 = DexDescription_Jirachi_1,
+ .descriptionPage2 = DexDescription_Jirachi_2,
+ .pokemonScale = 608,
+ .pokemonOffset = 65528,
+ .trainerScale = 256,
+ .trainerOffset = 0,
+ },
+ {
+ // Deoxys
+ .categoryName = _("DNS"),
+ .height = 17,
+ .weight = 608,
+ .descriptionPage1 = DexDescription_Deoxys_1,
+ .descriptionPage2 = DexDescription_Deoxys_2,
+ .pokemonScale = 256,
+ .pokemonOffset = 0,
+ .trainerScale = 290,
+ .trainerOffset = 2,
+ },
+};
diff --git a/src/data/pokedex_orders.h b/src/data/pokedex_orders.h
index 3577e6793..736c0df6a 100644
--- a/src/data/pokedex_orders.h
+++ b/src/data/pokedex_orders.h
@@ -1,3 +1,4 @@
+#if ENGLISH
static const u16 gPokedexOrder_Alphabetical[] =
{
387,
@@ -117,7 +118,7 @@ static const u16 gPokedexOrder_Alphabetical[] =
102, // Exeggcute
103, // Exeggutor
295, // Exploud
- 83, // Farfetchd
+ 83, // Farfetch'd
22, // Fearow
349, // Feebas
160, // Feraligatr
@@ -412,6 +413,422 @@ static const u16 gPokedexOrder_Alphabetical[] =
263, // Zigzagoon
41, // Zubat
};
+#elif GERMAN
+static const u16 gPokedexOrder_Alphabetical[] = {
+ 387,
+ 388,
+ 389,
+ 390,
+ 391,
+ 392,
+ 393,
+ 394,
+ 395,
+ 396,
+ 397,
+ 398,
+ 399,
+ 400,
+ 401,
+ 402,
+ 403,
+ 404,
+ 405,
+ 406,
+ 407,
+ 408,
+ 409,
+ 410,
+ 411,
+ 367, // Aalabyss
+ 63, // Abra
+ 359, // Absol
+ 142, // Aerodactyl
+ 93, // Alpollo
+ 334, // Altaria
+ 138, // Amonitas
+ 139, // Amoroso
+ 181, // Ampharos
+ 347, // Anorith
+ 134, // Aquana
+ 24, // Arbok
+ 168, // Ariados
+ 59, // Arkani
+ 144, // Arktos
+ 348, // Armaldo
+ 91, // Austos
+ 184, // Azumarill
+ 298, // Azurill
+ 211, // Baldorfish
+ 354, // Banette
+ 349, // Barschwa
+ 15, // Bibor
+ 3, // Bisaflor
+ 2, // Bisaknosp
+ 1, // Bisasam
+ 274, // Blanas
+ 135, // Blitza
+ 182, // Blubella
+ 48, // Bluzuk
+ 225, // Botogel
+ 373, // Brutalanda
+ 287, // Bummelz
+ 322, // Camaub
+ 323, // Camerupt
+ 251, // Celebi
+ 113, // Chaneira
+ 222, // Corasonn
+ 234, // Damhirplex
+ 386, // Deoxys
+ 248, // Despotar
+ 50, // Digda
+ 51, // Digdri
+ 132, // Ditto
+ 85, // Dodri
+ 84, // Dodu
+ 232, // Donphan
+ 148, // Dragonir
+ 149, // Dragoran
+ 372, // Draschel
+ 147, // Dratini
+ 44, // Duflor
+ 206, // Dummisel
+ 239, // Elekid
+ 125, // Elektek
+ 152, // Endivie
+ 300, // Eneco
+ 301, // Enekoro
+ 244, // Entei
+ 54, // Enton
+ 55, // Entoron
+ 133, // Evoli
+ 235, // Farbeagle
+ 194, // Felino
+ 155, // Feurigel
+ 261, // Fiffyen
+ 362, // Firnontor
+ 136, // Flamara
+ 79, // Flegmon
+ 255, // Flemmli
+ 174, // Fluffeluff
+ 303, // Flunkifer
+ 293, // Flurmel
+ 351, // Formeo
+ 205, // Forstellka
+ 309, // Frizelbliz
+ 58, // Fukano
+ 78, // Gallopa
+ 130, // Garados
+ 252, // Geckarbor
+ 283, // Gehweiher
+ 94, // Gengar
+ 75, // Georok
+ 76, // Geowaz
+ 264, // Geradaks
+ 254, // Gewaldro
+ 45, // Giflor
+ 203, // Girafarig
+ 4, // Glumanda
+ 6, // Glurak
+ 5, // Glutexo
+ 42, // Golbat
+ 118, // Goldini
+ 119, // Golking
+ 210, // Granbull
+ 190, // Griffel
+ 326, // Groink
+ 383, // Groudon
+ 282, // Guardevoir
+ 21, // Habitak
+ 297, // Hariyama
+ 242, // Heiteira
+ 250, // Ho-oh
+ 163, // Hoothoot
+ 187, // Hoppspross
+ 13, // Hornliu
+ 188, // Hubelupf
+ 229, // Hundemon
+ 228, // Hunduster
+ 258, // Hydropi
+ 97, // Hypno
+ 22, // Ibitak
+ 201, // Icognito
+ 156, // Igelavar
+ 169, // Iksbat
+ 314, // Illumise
+ 160, // Impergator
+ 360, // Isso
+ 385, // Jirachi
+ 87, // Jugong
+ 256, // Jungglut
+ 86, // Jurob
+ 140, // Kabuto
+ 141, // Kabutops
+ 64, // Kadabra
+ 115, // Kangama
+ 318, // Kanivanha
+ 286, // Kapilz
+ 237, // Kapoera
+ 272, // Kappalores
+ 158, // Karnimani
+ 129, // Karpador
+ 352, // Kecleon
+ 221, // Keifel
+ 106, // Kicklee
+ 371, // Kindwurm
+ 99, // Kingler
+ 281, // Kirlia
+ 74, // Kleinstein
+ 328, // Knacklion
+ 285, // Knilz
+ 69, // Knofensa
+ 105, // Knogga
+ 40, // Knuddeluff
+ 103, // Kokowei
+ 14, // Kokuna
+ 98, // Krabby
+ 294, // Krakeelo
+ 198, // Kramurx
+ 295, // Krawumms
+ 341, // Krebscorps
+ 342, // Krebutack
+ 238, // Kussilla
+ 382, // Kyogre
+ 80, // Lahmus
+ 170, // Lampi
+ 171, // Lanturn
+ 131, // Lapras
+ 246, // Larvitar
+ 199, // Laschoking
+ 380, // Latias
+ 381, // Latios
+ 146, // Lavados
+ 166, // Ledian
+ 165, // Ledyba
+ 101, // Lektrobal
+ 344, // Lepumentas
+ 289, // Letarking
+ 330, // Libelldra
+ 370, // Liebiskus
+ 345, // Liliep
+ 257, // Lohgock
+ 271, // Lombrero
+ 153, // Lorblatt
+ 270, // Loturzel
+ 249, // Lugia
+ 337, // Lunastein
+ 66, // Machollo
+ 68, // Machomei
+ 240, // Magby
+ 219, // Magcargo
+ 126, // Magmar
+ 262, // Magnayen
+ 81, // Magnetilo
+ 82, // Magneton
+ 296, // Makuhita
+ 226, // Mantax
+ 183, // Marill
+ 67, // Maschock
+ 284, // Maskeregen
+ 52, // Mauzi
+ 308, // Meditalis
+ 307, // Meditie
+ 154, // Meganie
+ 56, // Menki
+ 376, // Metagross
+ 375, // Metang
+ 151, // Mew
+ 150, // Mewtu
+ 350, // Milotic
+ 241, // Miltank
+ 312, // Minun
+ 185, // Mogelbaum
+ 259, // Moorabbel
+ 195, // Morlord
+ 288, // Muntier
+ 90, // Muschas
+ 43, // Myrapla
+ 197, // Nachtara
+ 299, // Nasgnet
+ 177, // Natu
+ 92, // Nebulak
+ 34, // Nidoking
+ 31, // Nidoqueen
+ 29, // Nidoran♀
+ 32, // Nidoran♂
+ 30, // Nidorina
+ 33, // Nidorino
+ 290, // Nincada
+ 291, // Ninjask
+ 292, // Ninjatom
+ 107, // Nockchan
+ 164, // Noctuh
+ 332, // Noktuska
+ 224, // Octillery
+ 49, // Omot
+ 95, // Onix
+ 102, // Owei
+ 358, // Palimpalim
+ 327, // Pandir
+ 268, // Panekon
+ 122, // Pantimos
+ 227, // Panzaeron
+ 267, // Papinella
+ 189, // Papungha
+ 46, // Paras
+ 47, // Parasek
+ 279, // Pelipper
+ 366, // Perlu
+ 231, // Phanpy
+ 172, // Pichu
+ 35, // Piepi
+ 173, // Pii
+ 25, // Pikachu
+ 127, // Pinsir
+ 36, // Pixi
+ 311, // Plusle
+ 77, // Ponita
+ 83, // Porenta
+ 137, // Porygon
+ 233, // Porygon2
+ 213, // Pottrott
+ 196, // Psiana
+ 269, // Pudox
+ 39, // Pummeluff
+ 247, // Pupitar
+ 343, // Puppance
+ 62, // Quappo
+ 60, // Quapsel
+ 61, // Quaputzi
+ 186, // Quaxo
+ 220, // Quiekel
+ 324, // Qurtel
+ 236, // Rabauz
+ 26, // Raichu
+ 243, // Raikou
+ 57, // Rasaff
+ 19, // Rattfratz
+ 20, // Rattikarl
+ 10, // Raupy
+ 384, // Rayquaza
+ 378, // Regice
+ 377, // Regirock
+ 379, // Registeel
+ 143, // Relaxo
+ 369, // Relicanth
+ 223, // Remoraid
+ 253, // Reptain
+ 23, // Rettan
+ 111, // Rihorn
+ 112, // Rizeros
+ 315, // Roselia
+ 124, // Rossana
+ 11, // Safcon
+ 368, // Saganabyss
+ 273, // Samurzel
+ 28, // Sandamer
+ 27, // Sandan
+ 71, // Sarzenia
+ 266, // Schaloko
+ 212, // Scherox
+ 7, // Schiggy
+ 8, // Schillok
+ 317, // Schlukwech
+ 316, // Schluppuck
+ 108, // Schlurp
+ 339, // Schmerbe
+ 218, // Schneckmag
+ 361, // Schneppke
+ 276, // Schwalbini
+ 277, // Schwalboss
+ 230, // Seedraking
+ 364, // Seejong
+ 117, // Seemon
+ 363, // Seemops
+ 116, // Seeper
+ 335, // Sengo
+ 353, // Shuppet
+ 123, // Sichlor
+ 65, // Simsala
+ 214, // Skaraborn
+ 207, // Skorgla
+ 88, // Sleima
+ 89, // Sleimok
+ 12, // Smettbo
+ 110, // Smogmog
+ 109, // Smogon
+ 215, // Sniebel
+ 53, // Snobilikat
+ 209, // Snubbull
+ 338, // Sonnfel
+ 192, // Sonnflora
+ 191, // Sonnkern
+ 325, // Spoink
+ 208, // Stahlos
+ 121, // Starmie
+ 120, // Sterndu
+ 306, // Stolloss
+ 305, // Stollrak
+ 304, // Stollunior
+ 245, // Suicune
+ 260, // Sumpex
+ 114, // Tangela
+ 374, // Tanhel
+ 204, // Tannza
+ 17, // Tauboga
+ 18, // Tauboss
+ 16, // Taubsi
+ 128, // Tauros
+ 216, // Teddiursa
+ 275, // Tengulist
+ 72, // Tentacha
+ 73, // Tentoxa
+ 175, // Togepi
+ 176, // Togetic
+ 319, // Tohaido
+ 157, // Tornupto
+ 104, // Tragosso
+ 280, // Trasla
+ 96, // Traumato
+ 200, // Traunfugil
+ 357, // Tropius
+ 9, // Turtok
+ 331, // Tuska
+ 159, // Tyracroc
+ 70, // Ultrigaria
+ 217, // Ursaring
+ 329, // Vibrava
+ 336, // Vipitis
+ 313, // Volbeat
+ 310, // Voltenso
+ 179, // Voltilamm
+ 100, // Voltobal
+ 38, // Vulnona
+ 37, // Vulpix
+ 180, // Waaty
+ 333, // Wablu
+ 320, // Wailmer
+ 321, // Wailord
+ 365, // Walraisa
+ 265, // Waumpel
+ 167, // Webarak
+ 340, // Welsar
+ 346, // Wielie
+ 162, // Wiesenior
+ 161, // Wiesor
+ 278, // Wingull
+ 202, // Woingenau
+ 178, // Xatu
+ 193, // Yanma
+ 145, // Zapdos
+ 263, // Zigzachs
+ 302, // Zobiris
+ 41, // Zubat
+ 356, // Zwirrklop
+ 355, // Zwirrlicht
+};
+#endif
+
static const u16 gPokedexOrder_Weight[] =
{
92, // Gastly
@@ -542,7 +959,7 @@ static const u16 gPokedexOrder_Weight[] =
206, // Dunsparce
178, // Xatu
355, // Duskull
- 83, // Farfetchd
+ 83, // Farfetch'd
328, // Trapinch
118, // Goldeen
309, // Electrike
@@ -956,7 +1373,7 @@ static const u16 gPokedexOrder_Height[] =
363, // Spheal
54, // Psyduck
219, // Magcargo
- 83, // Farfetchd
+ 83, // Farfetch'd
41, // Zubat
137, // Porygon
161, // Sentret
diff --git a/src/data/text/font0_widths.h b/src/data/text/font0_widths.h
new file mode 100644
index 000000000..a461eea5b
--- /dev/null
+++ b/src/data/text/font0_widths.h
@@ -0,0 +1,60 @@
+#if ENGLISH
+#if REVISION >= 1
+static const u8 sFont0Widths[] = {
+ 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8,
+ 8, 8, 8, 8, 8, 8, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4,
+ 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
+ 7, 7, 7, 7, 5, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
+ 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
+ 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+ 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
+};
+#else
+static const u8 sFont0Widths[] = {
+ 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 5, 8,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8,
+ 7, 7, 7, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 7, 6, 3, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 7, 7, 8, 8, 6,
+ 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
+ 7, 7, 7, 7, 7, 7, 7, 8, 6, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
+ 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
+ 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+ 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
+};
+#endif
+#elif GERMAN
+static const u8 sFont0Widths[] = {
+ 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
+ 8, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8,
+ 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8,
+ 8, 8, 8, 8, 8, 8, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4,
+ 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
+ 7, 7, 7, 7, 5, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
+ 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
+ 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+ 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
+};
+#endif
diff --git a/src/data/text/font1_widths.h b/src/data/text/font1_widths.h
new file mode 100644
index 000000000..7086628cb
--- /dev/null
+++ b/src/data/text/font1_widths.h
@@ -0,0 +1,35 @@
+#if REVISION >= 1 || GERMAN
+static const u8 sFont1Widths[] = {
+ 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 5,
+ 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 8, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 8, 4, 5, 5, 5, 5, 4, 8,
+ 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 6, 6,
+ 8, 7, 3, 5, 3, 3, 5, 4, 3, 6, 6, 6, 7, 7, 8, 5,
+ 5, 5, 3, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 4, 4, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6,
+ 7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
+ 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
+};
+#else
+static const u8 sFont1Widths[] = {
+ 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 5,
+ 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 8, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 8, 4, 5, 5, 5, 5, 4, 8,
+ 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6,
+ 8, 7, 6, 5, 3, 3, 5, 4, 3, 6, 6, 6, 7, 7, 8, 5,
+ 5, 5, 3, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 4, 4, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6,
+ 7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
+ 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
+};
+#endif
diff --git a/src/data/text/font3_widths.h b/src/data/text/font3_widths.h
new file mode 100644
index 000000000..2d088f136
--- /dev/null
+++ b/src/data/text/font3_widths.h
@@ -0,0 +1,60 @@
+#if ENGLISH
+#if REVISION >= 1
+static const u8 sFont3Widths[] = {
+ 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8,
+ 8, 8, 8, 8, 8, 8, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4,
+ 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
+ 7, 7, 7, 7, 5, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
+ 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
+ 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+ 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
+};
+#else
+static const u8 sFont3Widths[] = {
+ 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4,
+ 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
+ 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
+ 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
+ 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+ 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
+};
+#endif
+#elif GERMAN
+static const u8 sFont3Widths[] = {
+ 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
+ 8, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8,
+ 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8,
+ 8, 8, 8, 8, 8, 8, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4,
+ 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
+ 7, 7, 7, 7, 5, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
+ 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
+ 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+ 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
+};
+#endif
diff --git a/src/data/text/font4_widths.h b/src/data/text/font4_widths.h
new file mode 100644
index 000000000..4c8149b76
--- /dev/null
+++ b/src/data/text/font4_widths.h
@@ -0,0 +1,35 @@
+#if REVISION >= 1 || GERMAN
+static const u8 sFont4Widths[] = {
+ 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 5,
+ 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 8, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 8, 4, 5, 5, 5, 5, 4, 8,
+ 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 6, 6,
+ 8, 7, 3, 5, 3, 3, 5, 4, 3, 6, 6, 6, 7, 7, 8, 5,
+ 5, 5, 3, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 4, 4, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6,
+ 7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
+ 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
+};
+#else
+static const u8 sFont4Widths[] = {
+ 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 5,
+ 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 8, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 8, 4, 5, 5, 5, 5, 4, 8,
+ 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6,
+ 8, 7, 6, 5, 3, 3, 5, 4, 3, 6, 6, 6, 7, 7, 8, 5,
+ 5, 5, 3, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 4, 4, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6,
+ 7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
+ 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
+};
+#endif
diff --git a/src/data/text/type1_map.h b/src/data/text/type1_map.h
new file mode 100644
index 000000000..ff22e560a
--- /dev/null
+++ b/src/data/text/type1_map.h
@@ -0,0 +1,249 @@
+static const u8 sFontType1Map[] = {
+ 0xD4, 0xD4,
+ 0xD4, 0x31,
+ 0xD4, 0x32,
+ 0xD4, 0x33,
+ 0xD4, 0x34,
+ 0xD4, 0x35,
+ 0xD4, 0x36,
+ 0xD4, 0x37,
+ 0xD4, 0x38,
+ 0xD4, 0x39,
+ 0xD4, 0x3A,
+ 0xD4, 0x3B,
+ 0xD4, 0x3C,
+ 0xD4, 0x3D,
+ 0xD4, 0x3E,
+ 0xD4, 0x3F,
+ 0xD4, 0x40,
+ 0xD4, 0x41,
+ 0xD4, 0x42,
+ 0xD4, 0x43,
+ 0xD4, 0x44,
+ 0xD4, 0x45,
+ 0xD4, 0x46,
+ 0xD4, 0x47,
+ 0xD4, 0x48,
+ 0xD4, 0x49,
+ 0xD4, 0x4A,
+ 0xD4, 0x4B,
+ 0xD4, 0x4C,
+ 0xD4, 0x4D,
+ 0xD4, 0x4E,
+ 0xD4, 0x4F,
+ 0xD4, 0x50,
+ 0xD4, 0x51,
+ 0xD4, 0x52,
+ 0xD4, 0x53,
+ 0xD4, 0x54,
+ 0xD4, 0x55,
+ 0xD4, 0x56,
+ 0xD4, 0x57,
+ 0xD4, 0x58,
+ 0xD4, 0x59,
+ 0xD4, 0x5A,
+ 0xD4, 0x5B,
+ 0xD4, 0x5C,
+ 0xD4, 0x5D,
+ 0xD4, 0x5E,
+ 0xD4, 0x31,
+ 0xD4, 0x32,
+ 0xD4, 0x33,
+ 0xD4, 0x34,
+ 0xD4, 0x35,
+ 0xD4, 0x60,
+ 0xD4, 0x61,
+ 0xD4, 0x62,
+ 0x65, 0x36,
+ 0x65, 0x37,
+ 0x65, 0x38,
+ 0x65, 0x39,
+ 0x65, 0x3A,
+ 0x65, 0x3B,
+ 0x65, 0x3C,
+ 0x65, 0x3D,
+ 0x65, 0x3E,
+ 0x65, 0x3F,
+ 0x65, 0x40,
+ 0x65, 0x41,
+ 0x65, 0x42,
+ 0x65, 0x43,
+ 0x65, 0x44,
+ 0x65, 0x4A,
+ 0x65, 0x4B,
+ 0x65, 0x4C,
+ 0x65, 0x4D,
+ 0x65, 0x4E,
+ 0x64, 0x4A,
+ 0x64, 0x4B,
+ 0x64, 0x4C,
+ 0x64, 0x4D,
+ 0x64, 0x4E,
+ 0xD4, 0x5F,
+ 0xD4, 0x00,
+ 0xD4, 0x01,
+ 0xD4, 0x02,
+ 0xD4, 0x03,
+ 0xD4, 0x04,
+ 0xD4, 0x05,
+ 0xD4, 0x06,
+ 0xD4, 0x07,
+ 0xD4, 0x08,
+ 0xD4, 0x09,
+ 0xD4, 0x0A,
+ 0xD4, 0x0B,
+ 0xD4, 0x0C,
+ 0xD4, 0x0D,
+ 0xD4, 0x0E,
+ 0xD4, 0x0F,
+ 0xD4, 0x10,
+ 0xD4, 0x11,
+ 0xD4, 0x12,
+ 0xD4, 0x13,
+ 0xD4, 0x14,
+ 0xD4, 0x15,
+ 0xD4, 0x16,
+ 0xD4, 0x17,
+ 0xD4, 0x18,
+ 0xD4, 0x19,
+ 0xD4, 0x1A,
+ 0xD4, 0x1B,
+ 0xD4, 0x4D,
+ 0xD4, 0x1C,
+ 0xD4, 0x1D,
+ 0xD4, 0x1E,
+ 0xD4, 0x1F,
+ 0xD4, 0x20,
+ 0xD4, 0x21,
+ 0xD4, 0x22,
+ 0xD4, 0x23,
+ 0xD4, 0x24,
+ 0xD4, 0x25,
+ 0xD4, 0x58,
+ 0xD4, 0x26,
+ 0xD4, 0x27,
+ 0xD4, 0x28,
+ 0xD4, 0x29,
+ 0xD4, 0x2A,
+ 0xD4, 0x2B,
+ 0xD4, 0x69,
+ 0xD4, 0x30,
+ 0xD4, 0x6A,
+ 0xD4, 0x6B,
+ 0xD4, 0x74,
+ 0xD4, 0x2D,
+ 0xD4, 0x2E,
+ 0xD4, 0x2F,
+ 0x65, 0x05,
+ 0x65, 0x06,
+ 0x65, 0x07,
+ 0x65, 0x08,
+ 0x65, 0x09,
+ 0x65, 0x0A,
+ 0x65, 0x0B,
+ 0x65, 0x0C,
+ 0x65, 0x0D,
+ 0x65, 0x0E,
+ 0x65, 0x0F,
+ 0x65, 0x10,
+ 0x65, 0x11,
+ 0x65, 0x12,
+ 0x65, 0x13,
+ 0x65, 0x19,
+ 0x65, 0x1A,
+ 0x65, 0x1B,
+ 0x65, 0x4D,
+ 0x65, 0x1C,
+ 0x64, 0x19,
+ 0x64, 0x1A,
+ 0x64, 0x1B,
+ 0x64, 0x4D,
+ 0x64, 0x1C,
+ 0xD4, 0x2C,
+ 0xD4, 0x76,
+ 0xD4, 0x77,
+ 0xD4, 0x78,
+ 0xD4, 0x79,
+ 0xD4, 0x7A,
+ 0xD4, 0x7B,
+ 0xD4, 0x7C,
+ 0xD4, 0x7D,
+ 0xD4, 0x7E,
+ 0xD4, 0x7F,
+ 0xD4, 0x67,
+ 0xD4, 0x66,
+ 0xD4, 0x68,
+ 0xD4, 0x63,
+ 0xD4, 0xD2,
+ 0xD4, 0xD3,
+ 0xD4, 0xD0,
+ 0xD4, 0xD1,
+ 0xD4, 0xCE,
+ 0xD4, 0xCF,
+ 0xD4, 0x6F,
+ 0xD4, 0x75,
+ 0xD4, 0x70,
+ 0xD4, 0x72,
+ 0xD4, 0x71,
+ 0xD4, 0x73,
+ 0xD4, 0x80,
+ 0xD4, 0x81,
+ 0xD4, 0x82,
+ 0xD4, 0x83,
+ 0xD4, 0x84,
+ 0xD4, 0x85,
+ 0xD4, 0x86,
+ 0xD4, 0x87,
+ 0xD4, 0x88,
+ 0xD4, 0x89,
+ 0xD4, 0x8A,
+ 0xD4, 0x8B,
+ 0xD4, 0x8C,
+ 0xD4, 0x8D,
+ 0xD4, 0x8E,
+ 0xD4, 0x8F,
+ 0xD4, 0x90,
+ 0xD4, 0x91,
+ 0xD4, 0x92,
+ 0xD4, 0x93,
+ 0xD4, 0x94,
+ 0xD4, 0x95,
+ 0xD4, 0x96,
+ 0xD4, 0x97,
+ 0xD4, 0x98,
+ 0xD4, 0x99,
+ 0xD4, 0x9A,
+ 0xD4, 0x9B,
+ 0xD4, 0x9C,
+ 0xD4, 0x9D,
+ 0xD4, 0x9E,
+ 0xD4, 0x9F,
+ 0xD4, 0xA0,
+ 0xD4, 0xA1,
+ 0xD4, 0xA2,
+ 0xD4, 0xA3,
+ 0xD4, 0xA4,
+ 0xD4, 0xA5,
+ 0xD4, 0xA6,
+ 0xD4, 0xA7,
+ 0xD4, 0xA8,
+ 0xD4, 0xA9,
+ 0xD4, 0xAA,
+ 0xD4, 0xAB,
+ 0xD4, 0xAC,
+ 0xD4, 0xAD,
+ 0xD4, 0xAE,
+ 0xD4, 0xAF,
+ 0xD4, 0xB0,
+ 0xD4, 0xB1,
+ 0xD4, 0xB2,
+ 0xD4, 0xB3,
+ 0xD4, 0x6D,
+ 0xD4, 0xD5,
+ 0xD4, 0xD6,
+ 0xD4, 0xD7,
+ 0xD4, 0xD8,
+ 0xD4, 0xD9,
+ 0xD4, 0xDA,
+ 0xD4, 0xDB,
+};
diff --git a/src/data/text/type3_map.h b/src/data/text/type3_map.h
new file mode 100644
index 000000000..cb3694b39
--- /dev/null
+++ b/src/data/text/type3_map.h
@@ -0,0 +1,130 @@
+static const u8 sFontType3Map[] = {
+ 0x00, 0x10,
+ 0x01, 0x10,
+ 0x02, 0x10,
+ 0x03, 0x10,
+ 0x04, 0x11,
+ 0x05, 0x11,
+ 0x06, 0x11,
+ 0x07, 0x11,
+ 0x08, 0x12,
+ 0x09, 0x12,
+ 0x0A, 0x12,
+ 0x0B, 0x12,
+ 0x0C, 0x13,
+ 0x0D, 0x13,
+ 0x0E, 0x13,
+ 0x0F, 0x13,
+ 0x00, 0x14,
+ 0x01, 0x14,
+ 0x02, 0x14,
+ 0x03, 0x14,
+ 0x04, 0x15,
+ 0x05, 0x15,
+ 0x06, 0x15,
+ 0x07, 0x15,
+ 0x08, 0x16,
+ 0x09, 0x16,
+ 0x0A, 0x16,
+ 0x0B, 0x16,
+ 0x0C, 0x17,
+ 0x0D, 0x17,
+ 0x0E, 0x17,
+ 0x0F, 0x17,
+ 0x00, 0x18,
+ 0x01, 0x18,
+ 0x02, 0x18,
+ 0x03, 0x18,
+ 0x04, 0x19,
+ 0x05, 0x19,
+ 0x06, 0x19,
+ 0x07, 0x19,
+ 0x08, 0x1A,
+ 0x09, 0x1A,
+ 0x0A, 0x1A,
+ 0x0B, 0x1A,
+ 0x0C, 0x1B,
+ 0x0D, 0x1B,
+ 0x0E, 0x1B,
+ 0x0F, 0x1B,
+ 0x00, 0x1C,
+ 0x01, 0x1C,
+ 0x02, 0x1C,
+ 0x03, 0x1C,
+ 0x04, 0x1D,
+ 0x05, 0x1D,
+ 0x06, 0x1D,
+ 0x07, 0x1D,
+ 0x08, 0x1E,
+ 0x09, 0x1E,
+ 0x0A, 0x1E,
+ 0x0B, 0x1E,
+ 0x0C, 0x1F,
+ 0x0D, 0x1F,
+ 0x0E, 0x1F,
+ 0x0F, 0x1F,
+ 0x20, 0x24,
+ 0x20, 0x24,
+ 0x21, 0x24,
+ 0x21, 0x24,
+ 0x20, 0x24,
+ 0x20, 0x24,
+ 0x21, 0x24,
+ 0x21, 0x24,
+ 0x22, 0x25,
+ 0x22, 0x25,
+ 0x23, 0x25,
+ 0x23, 0x25,
+ 0x22, 0x25,
+ 0x22, 0x25,
+ 0x23, 0x25,
+ 0x23, 0x25,
+ 0x20, 0x24,
+ 0x20, 0x24,
+ 0x21, 0x24,
+ 0x21, 0x24,
+ 0x20, 0x24,
+ 0x20, 0x24,
+ 0x21, 0x24,
+ 0x21, 0x24,
+ 0x22, 0x25,
+ 0x22, 0x25,
+ 0x23, 0x25,
+ 0x23, 0x25,
+ 0x22, 0x25,
+ 0x22, 0x25,
+ 0x23, 0x25,
+ 0x23, 0x25,
+ 0x20, 0x26,
+ 0x20, 0x26,
+ 0x21, 0x26,
+ 0x21, 0x26,
+ 0x20, 0x26,
+ 0x20, 0x26,
+ 0x21, 0x26,
+ 0x21, 0x26,
+ 0x22, 0x27,
+ 0x22, 0x27,
+ 0x23, 0x27,
+ 0x23, 0x27,
+ 0x22, 0x27,
+ 0x22, 0x27,
+ 0x23, 0x27,
+ 0x23, 0x27,
+ 0x20, 0x26,
+ 0x20, 0x26,
+ 0x21, 0x26,
+ 0x21, 0x26,
+ 0x20, 0x26,
+ 0x20, 0x26,
+ 0x21, 0x26,
+ 0x21, 0x26,
+ 0x22, 0x27,
+ 0x22, 0x27,
+ 0x23, 0x27,
+ 0x23, 0x27,
+ 0x22, 0x27,
+ 0x22, 0x27,
+ 0x23, 0x27,
+ 0x23, 0x27,
+};
diff --git a/src/daycare.c b/src/daycare.c
index 381450a0b..cded18207 100755..100644
--- a/src/daycare.c
+++ b/src/daycare.c
@@ -1,9 +1,9 @@
#include "global.h"
+#include "daycare.h"
#include "pokemon.h"
#include "species.h"
#include "items.h"
#include "string_util.h"
-#include "asm.h"
extern u8 gLastFieldPokeMenuOpened;
diff --git a/src/de_rom_8040FE0.c b/src/de_rom_8040FE0.c
new file mode 100644
index 000000000..c618ebdb2
--- /dev/null
+++ b/src/de_rom_8040FE0.c
@@ -0,0 +1,272 @@
+#include "global.h"
+#include "battle.h"
+
+#if GERMAN
+
+enum {
+ TRAINER_CLASS_NAME_LEADER = 25,
+ TRAINER_CLASS_NAME_SCHOOL_KID = 26,
+ TRAINER_CLASS_NAME_EXPERT = 30,
+ TRAINER_CLASS_NAME_POKEMON_TRAINER_3 = 46,
+};
+
+enum {
+ TRAINER_CLASS_LEADER_F = 26,
+ TRAINER_CLASS_ELITE_FOUR_F = 25,
+ TRAINER_CLASS_SCHOOL_KID_F = 30,
+ TRAINER_CLASS_BIRD_KEEPER = 46,
+ TRAINER_CLASS_MAY_1 = 61,
+ TRAINER_CLASS_MAY_2 = 62,
+ TRAINER_CLASS_MAY_3 = 63,
+};
+
+extern struct SecretBaseRecord gSecretBaseRecord;
+
+extern u8 gTrainerClassNames[][13];
+extern struct Trainer gTrainers[];
+
+u8 *de_sub_8040FE0(u8 gender) {
+ if (gender)
+ {
+ gender++;
+
+ }
+
+ gender = TRAINER_CLASS_NAME_SCHOOL_KID;
+ return gTrainerClassNames[gender];
+}
+
+u8 *de_sub_8040FF4(u8 gender) {
+ if (gender) {
+ gender++;
+ }
+
+ gender = TRAINER_CLASS_NAME_POKEMON_TRAINER_3;
+ return gTrainerClassNames[gender];
+}
+
+u8 *de_sub_804100C(u8 gender) {
+ if (gender) {
+ gender++;
+ }
+
+ gender = TRAINER_CLASS_NAME_LEADER;
+ return gTrainerClassNames[gender];
+}
+
+#ifdef NONMATCHING
+
+u8 de_sub_81364AC(void);
+u8 get_trainer_class_name_index(void);
+u8 de_sub_81364F8(void);
+u8 sub_8135FD8(void);
+
+u8 *de_sub_8041024(s32 arg0, u32 arg1) {
+ u8 nameIndex, trainerClass, gender;
+ struct Trainer *trainer;
+ u8 local2;
+
+ switch (arg0)
+ {
+ case 0x400:
+ nameIndex = GetSecretBaseTrainerNameIndex();
+ gender = gSecretBaseRecord.gender;
+ if (nameIndex == TRAINER_CLASS_NAME_SCHOOL_KID)
+ {
+ return de_sub_8040FE0(gender);
+ }
+
+ return gTrainerClassNames[nameIndex];
+
+ case 0x100:
+ trainerClass = de_sub_81364AC();
+ nameIndex = get_trainer_class_name_index();
+ if (trainerClass == TRAINER_CLASS_SCHOOL_KID_F)
+ {
+ return de_sub_8040FE0(FEMALE);
+ }
+ if (trainerClass == TRAINER_CLASS_MAY_1 || trainerClass == TRAINER_CLASS_MAY_2 || trainerClass == TRAINER_CLASS_MAY_3)
+ {
+ return de_sub_8040FF4(FEMALE);
+ }
+
+ return gTrainerClassNames[nameIndex];
+
+ case 0x800:
+ trainerClass = de_sub_81364F8();
+ nameIndex = sub_8135FD8();
+ if (trainerClass == TRAINER_CLASS_SCHOOL_KID_F)
+ {
+ return de_sub_8040FE0(FEMALE);
+ }
+ if (trainerClass == TRAINER_CLASS_MAY_1 || trainerClass == TRAINER_CLASS_MAY_2 || trainerClass == TRAINER_CLASS_MAY_3)
+ {
+ return de_sub_8040FF4(FEMALE);
+ }
+
+ return gTrainerClassNames[nameIndex];
+
+ default:
+ trainer = &gTrainers[arg1];
+ trainerClass = trainer->trainerClass;
+ local2 = sub_803FC58(arg1);
+
+ if (trainerClass == TRAINER_CLASS_LEADER_F)
+ {
+ return de_sub_8040FE0(local2);
+ }
+
+ if (trainerClass == TRAINER_CLASS_BIRD_KEEPER && local2 == FEMALE)
+ {
+ return de_sub_8040FF4(FEMALE);
+ }
+
+ if (trainerClass == TRAINER_CLASS_ELITE_FOUR_F)
+ {
+ if (gTrainers[arg1].doubleBattle == TRUE)
+ {
+ return de_sub_804100C(FEMALE);
+ }
+ else
+ {
+ return de_sub_804100C(MALE);
+ }
+ }
+
+
+ return gTrainerClassNames[trainerClass];
+ }
+}
+#else
+
+__attribute__((naked))
+void de_sub_8041024(void) {
+ asm(".syntax unified\n\
+ push {r4-r6,lr}\n\
+ adds r2, r0, 0\n\
+ adds r6, r1, 0\n\
+ movs r0, 0x80\n\
+ lsls r0, 3\n\
+ cmp r2, r0\n\
+ beq _0804104A\n\
+ cmp r2, r0\n\
+ bgt _08041040\n\
+ movs r0, 0x80\n\
+ lsls r0, 1\n\
+ cmp r2, r0\n\
+ beq _08041064\n\
+ b _0804109C\n\
+_08041040:\n\
+ movs r0, 0x80\n\
+ lsls r0, 4\n\
+ cmp r2, r0\n\
+ beq _08041086\n\
+ b _0804109C\n\
+_0804104A:\n\
+ bl GetSecretBaseTrainerNameIndex\n\
+ lsls r0, 24\n\
+ lsrs r5, r0, 24\n\
+ ldr r0, _08041060 @ =0x02017000\n\
+ ldrb r0, [r0, 0x1]\n\
+ lsls r0, 27\n\
+ lsrs r2, r0, 31\n\
+ cmp r5, 0x1A\n\
+ beq _080410B8\n\
+ b _080410F8\n\
+ .align 2, 0\n\
+_08041060: .4byte 0x02017000\n\
+_08041064:\n\
+ bl de_sub_81364AC\n\
+ lsls r0, 24\n\
+ lsrs r4, r0, 24\n\
+ bl get_trainer_class_name_index\n\
+_08041070:\n\
+ lsls r0, 24\n\
+ lsrs r5, r0, 24\n\
+ cmp r4, 0x1E\n\
+ beq _08041094\n\
+ adds r0, r4, 0\n\
+ subs r0, 0x3D\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ cmp r0, 0x2\n\
+ bls _080410CC\n\
+ b _080410F8\n\
+_08041086:\n\
+ bl de_sub_81364F8\n\
+ lsls r0, 24\n\
+ lsrs r4, r0, 24\n\
+ bl sub_8135FD8\n\
+ b _08041070\n\
+_08041094:\n\
+ movs r0, 0x1\n\
+ bl de_sub_8040FE0\n\
+ b _08041102\n\
+_0804109C:\n\
+ ldr r1, _080410C0 @ =gTrainers\n\
+ lsls r4, r6, 2\n\
+ adds r0, r4, r6\n\
+ lsls r0, 3\n\
+ adds r0, r1\n\
+ ldrb r5, [r0, 0x1]\n\
+ lsls r0, r6, 16\n\
+ lsrs r0, 16\n\
+ bl sub_803FC58\n\
+ lsls r0, 24\n\
+ lsrs r2, r0, 24\n\
+ cmp r5, 0x1A\n\
+ bne _080410C4\n\
+_080410B8:\n\
+ adds r0, r2, 0\n\
+ bl de_sub_8040FE0\n\
+ b _08041102\n\
+ .align 2, 0\n\
+_080410C0: .4byte gTrainers\n\
+_080410C4:\n\
+ cmp r5, 0x2E\n\
+ bne _080410D4\n\
+ cmp r2, 0x1\n\
+ bne _080410D4\n\
+_080410CC:\n\
+ movs r0, 0x1\n\
+ bl de_sub_8040FF4\n\
+ b _08041102\n\
+_080410D4:\n\
+ cmp r5, 0x19\n\
+ bne _080410F8\n\
+ ldr r0, _080410F4 @ =gTrainers\n\
+ adds r1, r4, r6\n\
+ lsls r1, 3\n\
+ adds r1, r0\n\
+ ldrb r0, [r1, 0x18]\n\
+ movs r2, 0\n\
+ cmp r0, 0x1\n\
+ bne _080410EA\n\
+ movs r2, 0x1\n\
+_080410EA:\n\
+ adds r0, r2, 0\n\
+ bl de_sub_804100C\n\
+ b _08041102\n\
+ .align 2, 0\n\
+_080410F4: .4byte gTrainers\n\
+_080410F8:\n\
+ movs r0, 0xD\n\
+ adds r1, r5, 0\n\
+ muls r1, r0\n\
+ ldr r0, _08041108 @ =gTrainerClassNames\n\
+ adds r0, r1, r0\n\
+_08041102:\n\
+ pop {r4-r6}\n\
+ pop {r1}\n\
+ bx r1\n\
+ .align 2, 0\n\
+_08041108: .4byte gTrainerClassNames\n\
+ .syntax divided\n");
+}
+#endif
+
+u32 de_sub_804110C(u32 arg0, u32 arg1) {
+ return arg1;
+}
+
+#endif
diff --git a/src/decompress.c b/src/decompress.c
index 37aa1e8d5..d7f7087a7 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "decompress.h"
-#include "asm.h"
#include "data2.h"
#include "species.h"
#include "text.h"
@@ -17,57 +16,57 @@ void LZDecompressVram(const void *src, void *dest)
LZ77UnCompVram(src, dest);
}
-void LoadCompressedObjectPic(const struct SpriteSheet *a)
+void LoadCompressedObjectPic(const struct CompressedSpriteSheet *src)
{
- struct SpriteSheet spriteSheet;
+ struct SpriteSheet dest;
- LZ77UnCompWram(a->data, (void *)WRAM);
- spriteSheet.data = (void *)WRAM;
- spriteSheet.size = a->size;
- spriteSheet.tag = a->tag;
- LoadSpriteSheet(&spriteSheet);
+ LZ77UnCompWram(src->data, (void *)WRAM);
+ dest.data = (void *)WRAM;
+ dest.size = src->size;
+ dest.tag = src->tag;
+ LoadSpriteSheet(&dest);
}
-void LoadCompressedObjectPicOverrideBuffer(const struct SpriteSheet *a, void *buffer)
+void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer)
{
- struct SpriteSheet spriteSheet;
+ struct SpriteSheet dest;
- LZ77UnCompWram(a->data, buffer);
- spriteSheet.data = buffer;
- spriteSheet.size = a->size;
- spriteSheet.tag = a->tag;
- LoadSpriteSheet(&spriteSheet);
+ LZ77UnCompWram(src->data, buffer);
+ dest.data = buffer;
+ dest.size = src->size;
+ dest.tag = src->tag;
+ LoadSpriteSheet(&dest);
}
-void LoadCompressedObjectPalette(const struct SpritePalette *a)
+void LoadCompressedObjectPalette(const struct CompressedSpritePalette *src)
{
- struct SpritePalette spritePalette;
+ struct SpritePalette dest;
- LZ77UnCompWram(a->data, (void *)WRAM);
- spritePalette.data = (void *)WRAM;
- spritePalette.tag = a->tag;
- LoadSpritePalette(&spritePalette);
+ LZ77UnCompWram(src->data, (void *)WRAM);
+ dest.data = (void *)WRAM;
+ dest.tag = src->tag;
+ LoadSpritePalette(&dest);
}
-void LoadCompressedObjectPaletteOverrideBuffer(const struct SpritePalette *a, void *buffer)
+void LoadCompressedObjectPaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer)
{
- struct SpritePalette spritePalette;
+ struct SpritePalette dest;
LZ77UnCompWram(a->data, buffer);
- spritePalette.data = buffer;
- spritePalette.tag = a->tag;
- LoadSpritePalette(&spritePalette);
+ dest.data = buffer;
+ dest.tag = a->tag;
+ LoadSpritePalette(&dest);
}
-void DecompressPicFromTable_2(const struct SpriteSheet *a, u8 b, u8 c, void *d, void *e, s32 species)
+void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, u8 b, u8 c, void *d, void *buffer, s32 species)
{
if (species > SPECIES_EGG)
- LZ77UnCompWram(gMonFrontPicTable[0].data, e);
+ LZ77UnCompWram(gMonFrontPicTable[0].data, buffer);
else
- LZ77UnCompWram(a->data, e);
+ LZ77UnCompWram(src->data, buffer);
}
-void HandleLoadSpecialPokePic(const struct SpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g)
+void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g)
{
u32 frontOrBack;
@@ -77,10 +76,10 @@ void HandleLoadSpecialPokePic(const struct SpriteSheet *spriteSheet, u32 b, u32
else
frontOrBack = 1; // frontPic
- LoadSpecialPokePic(spriteSheet, b, c, d, dest, species, g, frontOrBack);
+ LoadSpecialPokePic(src, b, c, d, dest, species, g, frontOrBack);
}
-void LoadSpecialPokePic(const struct SpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g, u32 frontOrBack)
+void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g, u32 frontOrBack)
{
u8 frontOrBack8 = frontOrBack;
@@ -102,7 +101,7 @@ void LoadSpecialPokePic(const struct SpriteSheet *spriteSheet, u32 b, u32 c, u32
else if (species > SPECIES_EGG) // is species unknown? draw the ? icon
LZ77UnCompWram(gMonFrontPicTable[0].data, dest);
else
- LZ77UnCompWram(spriteSheet->data, dest);
+ LZ77UnCompWram(src->data, dest);
DrawSpindaSpots(species, g, dest, frontOrBack8);
}
diff --git a/src/decoration.c b/src/decoration.c
index 6974f7c92..9eba54ad7 100644
--- a/src/decoration.c
+++ b/src/decoration.c
@@ -1,5 +1,5 @@
#include "global.h"
-#include "asm.h"
+#include "main.h"
#include "map_object_constants.h"
#include "rom4.h"
#include "sound.h"
@@ -12,12 +12,14 @@
#include "palette.h"
#include "field_player_avatar.h"
#include "field_camera.h"
+#include "field_fadetransition.h"
#include "fieldmap.h"
#include "metatile_behavior.h"
#include "event_data.h"
#include "field_weather.h"
#include "decoration.h"
+#if ENGLISH
const u8 DecorDesc_SMALL_DESK[] = _(
"A small desk built\n"
"for one.");
@@ -595,6 +597,9 @@ const u8 DecorDesc_REGISTEEL_DOLL[] = _(
"A large doll.\n"
"Place it on a mat\n"
"or a desk.");
+#elif GERMAN
+#include "data/decoration/descriptions_de.h"
+#endif
const u16 DecorGfx_SMALL_DESK[] = {
0x87
@@ -1238,6 +1243,7 @@ const u16 DecorGfx_REGISTEEL_DOLL[] = {
MAP_OBJ_GFX_BIG_REGISTEEL_DOLL
};
+#if ENGLISH
const struct Decoration gDecorations[] = {
{DECOR_NONE, _("SMALL DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_DESK, 0, DecorDesc_SMALL_DESK, DecorGfx_SMALL_DESK},
{DECOR_SMALL_DESK, _("SMALL DESK"), DECORPERM_SOLID_FLOOR, DECORSHAPE_1x1, DECORCAT_DESK, 3000, DecorDesc_SMALL_DESK, DecorGfx_SMALL_DESK},
@@ -1361,6 +1367,9 @@ const struct Decoration gDecorations[] = {
{DECOR_REGICE_DOLL, _("REGICE DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_REGICE_DOLL, DecorGfx_REGICE_DOLL},
{DECOR_REGISTEEL_DOLL, _("REGISTEEL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_REGISTEEL_DOLL, DecorGfx_REGISTEEL_DOLL}
};
+#elif GERMAN
+#include "data/decoration/decorations.h"
+#endif
const u8 *const gUnknown_083EC5E4[] = {
SecretBaseText_Desk,
@@ -1783,7 +1792,14 @@ void sub_80FE7EC(u8 taskId)
sub_80FEC94(taskId);
sub_80FECB8(gUnknown_020388F6);
+#if ENGLISH
MenuDrawTextWindow(15, 12, 29, 19);
+#elif GERMAN
+ if ((gUnknown_020388F2 + gUnknown_020388F4) != gUnknown_020388D5)
+ {
+ MenuDrawTextWindow(15, 12, 29, 19);
+ }
+#endif
sub_80FECE0(gUnknown_020388F2 + gUnknown_020388F4);
InitMenu(0, 1, 2, gUnknown_020388F3 + 1, gUnknown_020388F2, 13);
@@ -1940,10 +1956,56 @@ void sub_80FECB8(u8 decoCat)
sub_80FE470(decoCat, 16, 1, 0xff);
}
+#if ENGLISH
void sub_80FECE0(u8 decoCat)
{
sub_8072AB0(gDecorations[gUnknown_020388D0[decoCat]].description, 0x80, 0x68, 0x68, 0x30, 0x1);
}
+#elif GERMAN
+__attribute__((naked))
+void sub_80FECE0(u8 decoCat)
+{
+ asm(".syntax unified\n\
+ push {lr}\n\
+ sub sp, 0x8\n\
+ lsls r0, 24\n\
+ lsrs r2, r0, 24\n\
+ ldr r0, _080FED18 @ =gUnknown_020388D5\n\
+ ldrb r0, [r0]\n\
+ cmp r2, r0\n\
+ beq _080FED24\n\
+ ldr r1, _080FED1C @ =gDecorations\n\
+ ldr r0, _080FED20 @ =gUnknown_020388D0\n\
+ ldr r0, [r0]\n\
+ adds r0, r2\n\
+ ldrb r0, [r0]\n\
+ lsls r0, 5\n\
+ adds r1, 0x18\n\
+ adds r0, r1\n\
+ ldr r0, [r0]\n\
+ movs r1, 0x30\n\
+ str r1, [sp]\n\
+ movs r1, 0x1\n\
+ str r1, [sp, 0x4]\n\
+ movs r1, 0x80\n\
+ movs r2, 0x68\n\
+ movs r3, 0x68\n\
+ bl sub_8072AB0\n\
+ movs r0, 0x1\n\
+ b _080FED26\n\
+ .align 2, 0\n\
+_080FED18: .4byte gUnknown_020388D5\n\
+_080FED1C: .4byte gDecorations\n\
+_080FED20: .4byte gUnknown_020388D0\n\
+_080FED24:\n\
+ movs r0, 0\n\
+_080FED26:\n\
+ add sp, 0x8\n\
+ pop {r1}\n\
+ bx r1\n\
+ .syntax divided\n");
+}
+#endif
void sub_80FED1C(void)
{
diff --git a/src/decoration_inventory.c b/src/decoration_inventory.c
index 6463f50dc..35ba7e228 100644
--- a/src/decoration_inventory.c
+++ b/src/decoration_inventory.c
@@ -100,7 +100,7 @@ bool8 sub_8134074(u8 decorIdx)
return TRUE;
}
-bool8 sub_81340A8(u8 decorIdx)
+s8 sub_81340A8(u8 decorIdx)
{
u8 i;
u8 invIdx;
diff --git a/src/dewford_trend.c b/src/dewford_trend.c
index e4ce0c0c7..aaf4dd66a 100644
--- a/src/dewford_trend.c
+++ b/src/dewford_trend.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "dewford_trend.h"
-#include "asm.h"
#include "easy_chat.h"
#include "event_data.h"
#include "link.h"
diff --git a/src/diploma.c b/src/diploma.c
index 80adac8f7..ba7de58aa 100644
--- a/src/diploma.c
+++ b/src/diploma.c
@@ -1,5 +1,5 @@
#include "global.h"
-#include "asm.h"
+#include "diploma.h"
#include "main.h"
#include "menu.h"
#include "palette.h"
@@ -10,6 +10,7 @@
#include "strings2.h"
#include "task.h"
#include "text.h"
+#include "unknown_task.h"
static void VBlankCB(void);
static void MainCB2(void);
diff --git a/src/easy_chat.c b/src/easy_chat.c
index e43ba751f..cc2cd7030 100644
--- a/src/easy_chat.c
+++ b/src/easy_chat.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "easy_chat.h"
-#include "asm.h"
#include "data2.h"
#include "event_data.h"
#include "field_message_box.h"
@@ -11,17 +10,9 @@
#include "strings2.h"
#include "text.h"
-u8 sub_80EB37C(u16);
-u8 sub_80EB8C0(void);
-u8 sub_80EB868(u8);
-u16 sub_80EAE88(u8);
-void sub_80EB890(u8);
-u16 sub_80EB784(u16 group);
-u8 sub_80EAD7C(u8 group);
static bool8 sub_80EB680(u16 *, u16, u16, u16);
static u16 sub_80EB9D8(void);
static u16 sub_80EB960(void);
-u16 sub_80EB72C(u16);
extern void *gEasyChatGroupWords[];
extern const u8 gEasyChatGroupSizes[];
diff --git a/src/field_camera.c b/src/field_camera.c
index df5ccc301..1aed1549b 100644
--- a/src/field_camera.c
+++ b/src/field_camera.c
@@ -1,9 +1,9 @@
#include "global.h"
#include "field_camera.h"
-#include "asm.h"
-#include "asm_fieldmap.h"
#include "berry.h"
#include "field_player_avatar.h"
+#include "fieldmap.h"
+#include "rotating_gate.h"
#include "sprite.h"
#include "text.h"
diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c
index 8220a144b..2d8140be5 100644
--- a/src/field_control_avatar.c
+++ b/src/field_control_avatar.c
@@ -1,17 +1,25 @@
#include "global.h"
#include "field_control_avatar.h"
-#include "asm.h"
#include "battle_setup.h"
#include "bike.h"
+#include "coord_event_weather.h"
+#include "daycare.h"
#include "event_data.h"
+#include "field_fadetransition.h"
#include "field_player_avatar.h"
+#include "field_poison.h"
+#include "field_specials.h"
+#include "fieldmap.h"
#include "flags.h"
+#include "item_menu.h"
#include "metatile_behavior.h"
#include "rom4.h"
#include "safari_zone.h"
#include "script.h"
+#include "secret_base.h"
#include "songs.h"
#include "sound.h"
+#include "start_menu.h"
#include "trainer_see.h"
#include "vars.h"
#include "wild_encounter.h"
@@ -22,7 +30,6 @@ struct Coords32
s32 y;
};
-extern const struct Coords32 gUnknown_0821664C[];
extern u16 gScriptLastTalked;
extern u16 gScriptFacing;
extern struct LinkPlayerMapObject gLinkPlayerMapObjects[];
@@ -82,14 +89,10 @@ static u8 *TryGetFieldMoveScript(struct MapPosition *, u8, u8);
static bool32 sub_8068770(void);
static bool32 sub_80687A4(void);
static bool8 sub_80687E4(struct MapPosition *, u16, u16);
-bool8 mapheader_trigger_activate_at__run_now(struct MapPosition *);
-bool8 sub_8068870(u16 a);
-bool8 sub_8068894(void);
static void happiness_algorithm_step(void);
static bool8 overworld_poison_step(void);
static bool8 is_it_battle_time_3(u16);
static bool8 mapheader_run_first_tag2_script_list_match_conditionally(struct MapPosition *, u16, u8);
-bool8 sub_8068A64(struct MapPosition *, u16);
static bool8 sub_8068B30(u16);
static bool8 is_non_stair_warp_tile(u16, u8);
static s8 map_warp_check_packed(struct MapHeader *, struct MapPosition *);
@@ -98,21 +101,6 @@ static bool8 map_warp_consider_2_to_inside(struct MapPosition *, u16, u8);
static s8 map_warp_check(struct MapHeader *, u16, u16, u8);
static u8 *mapheader_trigger_activate_at(struct MapHeader *, u16, u16, u8);
static struct BgEvent *FindInvisibleMapObjectByPosition(struct MapHeader *, u16, u16, u8);
-u8 sub_8068F18(void);
-
-extern u8 mapheader_run_first_tag2_script_list_match(void);
-extern void sub_8071310(void);
-extern int sub_80A6D1C(void);
-extern u8 sub_80BC050();
-extern u8 sub_80422A0(void);
-extern s32 overworld_poison(void);
-extern void sub_8080E88();
-extern void walkrun_find_lowest_active_bit_in_bitfield(void);
-extern void sub_8080F2C(u8);
-extern void sub_8080F48(void);
-extern void sub_8080F58(void);
-extern void sub_80BC038();
-extern void DoCoordEventWeather(u8);
void FieldClearPlayerInput(struct FieldInput *input)
{
diff --git a/src/field_door.c b/src/field_door.c
index fa763a5d6..791ed4c94 100644
--- a/src/field_door.c
+++ b/src/field_door.c
@@ -1,7 +1,7 @@
#include "global.h"
#include "field_door.h"
-#include "asm.h"
#include "field_camera.h"
+#include "fieldmap.h"
#include "metatile_behavior.h"
#include "task.h"
diff --git a/src/field_effect.c b/src/field_effect.c
index 3b6a2ff4c..889664dfa 100755..100644
--- a/src/field_effect.c
+++ b/src/field_effect.c
@@ -1,5 +1,4 @@
#include "global.h"
-#include "asm.h"
#include "data2.h"
#include "script.h"
#include "trig.h"
@@ -21,11 +20,14 @@
#include "metatile_behavior.h"
#include "field_camera.h"
#include "field_effect.h"
+#include "field_fadetransition.h"
+#include "fieldmap.h"
+#include "field_map_obj.h"
+#include "util.h"
+#include "field_effect_helpers.h"
#define subsprite_table(ptr) {.subsprites = ptr, .subspriteCount = (sizeof ptr) / (sizeof(struct Subsprite))}
-#define obj_frame_tiles(ptr) {.data = (u8 *)ptr, .size = sizeof ptr}
-
const u32 gSpriteImage_839DC14[] = INCBIN_U32("graphics/birch_speech/birch.4bpp");
const u16 gBirchPalette[16] = INCBIN_U16("graphics/birch_speech/birch.gbapal");
const u32 gSpriteImage_839E434[] = INCBIN_U32("graphics/misc/pokeball_glow.4bpp");
@@ -653,7 +655,8 @@ u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority)
u8 CreateMonSprite_FieldMove(u16 species, u32 d, u32 g, s16 x, s16 y, u8 subpriority)
{
- const struct SpritePalette *spritePalette;
+ const struct CompressedSpritePalette *spritePalette;
+
HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, (u32)gUnknown_081FAF4C[3] /* this is actually u8* or something, pointing to ewram */, gUnknown_081FAF4C[3], species, g);
spritePalette = sub_80409C8(species, d, g);
LoadCompressedObjectPalette(spritePalette);
diff --git a/src/field_fadetransition.c b/src/field_fadetransition.c
index b5e6c1039..364d55e51 100644
--- a/src/field_fadetransition.c
+++ b/src/field_fadetransition.c
@@ -1,25 +1,15 @@
#include "global.h"
#include "gba/syscall.h"
+#include "field_fadetransition.h"
+#include "field_player_avatar.h"
#include "field_weather.h"
+#include "fldeff_flash.h"
#include "global.fieldmap.h"
+#include "rom4.h"
#include "script.h"
#include "task.h"
-void palette_bg_fill_white(void);
-void palette_bg_fill_black(void);
-void pal_fill_black(void);
-void task0A_asap_script_env_2_enable_and_set_ctx_running(u8);
-
-extern u8 get_map_light_from_warp0(void);
-extern u8 sav1_map_get_light_level(void);
-extern u8 fade_type_for_given_maplight_pair(u8, u8);
extern u16 gPlttBufferFaded[];
-extern struct MapHeader * warp1_get_mapheader(void);
-extern void sub_8059B88(u8);
-extern void sub_8053E90(void);
-
-extern u8 sub_810CDB8(u8, u8);
-extern int sub_8080E70(void);
void palette_bg_fill_white(void)
{
diff --git a/src/field_ground_effect.c b/src/field_ground_effect.c
index 1aea8f52e..42862d0ff 100644
--- a/src/field_ground_effect.c
+++ b/src/field_ground_effect.c
@@ -1,26 +1,10 @@
#include "global.h"
-#include "asm_fieldmap.h"
+#include "field_ground_effect.h"
+#include "fieldmap.h"
#include "metatile_behavior.h"
extern u32 gUnknown_08376008[];
-void FieldObjectUpdateMetatileBehaviors(struct MapObject *);
-void GetGroundEffectFlags_Reflection(struct MapObject *, u32 *);
-void GetGroundEffectFlags_TallGrassOnSpawn(struct MapObject *, u32 *);
-void GetGroundEffectFlags_TallGrassOnBeginStep(struct MapObject *, u32 *);
-void GetGroundEffectFlags_LongGrassOnSpawn(struct MapObject *, u32 *);
-void GetGroundEffectFlags_LongGrassOnBeginStep(struct MapObject *, u32 *);
-void GetGroundEffectFlags_Tracks(struct MapObject *, u32 *);
-void GetGroundEffectFlags_SandPile(struct MapObject *, u32 *);
-void GetGroundEffectFlags_ShallowFlowingWater(struct MapObject *, u32 *);
-void GetGroundEffectFlags_Puddle(struct MapObject *, u32 *);
-void GetGroundEffectFlags_Ripple(struct MapObject *, u32 *);
-void GetGroundEffectFlags_ShortGrass(struct MapObject *, u32 *);
-void GetGroundEffectFlags_HotSprings(struct MapObject *, u32 *);
-void GetGroundEffectFlags_Seaweed(struct MapObject *, u32 *);
-void GetGroundEffectFlags_JumpLanding(struct MapObject *, u32 *);
-u8 FieldObjectCheckForReflectiveSurface(struct MapObject *);
-
void GetAllGroundEffectFlags_OnSpawn(struct MapObject *mapObj, u32 *flags)
{
FieldObjectUpdateMetatileBehaviors(mapObj);
diff --git a/src/field_map_obj.c b/src/field_map_obj.c
index 26cd1de02..dc5ee6afb 100644..100755
--- a/src/field_map_obj.c
+++ b/src/field_map_obj.c
@@ -1,25 +1,1894 @@
#include "global.h"
#include "field_map_obj.h"
-#include "field_map_obj_helpers.h"
-#include "fieldmap.h"
-#include "asm.h"
#include "berry.h"
#include "event_data.h"
-#include "field_player_avatar.h"
+#include "field_camera.h"
#include "field_effect.h"
+#include "field_effect_helpers.h"
#include "field_ground_effect.h"
+#include "field_map_obj_helpers.h"
+#include "field_player_avatar.h"
+#include "fieldmap.h"
#include "palette.h"
-#include "rom4.h"
#include "rng.h"
+#include "rom4.h"
#include "sprite.h"
-#include "field_camera.h"
#include "metatile_behavior.h"
#include "map_constants.h"
+#include "map_object_constants.h"
#include "trainer_see.h"
-#include "field_effect_helpers.h"
-extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[36];
+// rodata
+
+const u8 gUnknown_0830FD14[] = {1, 1, 6, 7, 8, 9, 6, 7, 8, 9, 11, 11, 0, 0, 0, 0};
+
+void ObjectCB_CameraObject(struct Sprite *sprite);
+const struct SpriteTemplate gSpriteTemplate_830FD24 = {0, 0xFFFF, &gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, ObjectCB_CameraObject};
+
+void CameraObject_0(struct Sprite *);
+void CameraObject_1(struct Sprite *);
+void CameraObject_2(struct Sprite *);
+void (*const gCameraObjectFuncs[])(struct Sprite *) = {
+ CameraObject_0,
+ CameraObject_1,
+ CameraObject_2,
+};
+
+const u32 gMapObjectPic_BrendanNormal_0[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/00.4bpp");
+const u32 gMapObjectPic_BrendanNormal_1[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/01.4bpp");
+const u32 gMapObjectPic_BrendanNormal_2[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/02.4bpp");
+const u32 gMapObjectPic_BrendanNormal_3[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/03.4bpp");
+const u32 gMapObjectPic_BrendanNormal_4[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/04.4bpp");
+const u32 gMapObjectPic_BrendanNormal_5[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/05.4bpp");
+const u32 gMapObjectPic_BrendanNormal_6[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/06.4bpp");
+const u32 gMapObjectPic_BrendanNormal_7[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/07.4bpp");
+const u32 gMapObjectPic_BrendanNormal_8[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/08.4bpp");
+const u32 gMapObjectPic_BrendanNormal_9[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/09.4bpp");
+const u32 gMapObjectPic_BrendanNormal_10[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/10.4bpp");
+const u32 gMapObjectPic_BrendanNormal_11[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/11.4bpp");
+const u32 gMapObjectPic_BrendanNormal_12[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/12.4bpp");
+const u32 gMapObjectPic_BrendanNormal_13[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/13.4bpp");
+const u32 gMapObjectPic_BrendanNormal_14[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/14.4bpp");
+const u32 gMapObjectPic_BrendanNormal_15[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/15.4bpp");
+const u32 gMapObjectPic_BrendanNormal_16[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/16.4bpp");
+const u32 gMapObjectPic_BrendanNormal_17[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/normal/17.4bpp");
+const u16 gMapObjectPalette8[] = INCBIN_U16("graphics/map_objects/palettes/08.gbapal");
+const u16 NullPalette_8310F68[16] = {};
+const u16 NullPalette_8310F88[16] = {};
+const u16 NullPalette_8310FA8[16] = {};
+const u16 NullPalette_8310FC8[16] = {};
+const u16 NullPalette_8310FE8[16] = {};
+const u16 NullPalette_8311008[16] = {};
+const u16 NullPalette_8311028[16] = {};
+const u16 NullPalette_8311048[16] = {};
+const u16 NullPalette_8311068[16] = {};
+const u16 NullPalette_8311088[16] = {};
+const u16 NullPalette_83110A8[16] = {};
+const u16 NullPalette_83110C8[16] = {};
+const u16 NullPalette_83110E8[16] = {};
+const u16 NullPalette_8311108[16] = {};
+const u16 NullPalette_8311128[16] = {};
+const u16 gMapObjectPalette9[] = INCBIN_U16("graphics/map_objects/palettes/09.gbapal");
+const u16 gMapObjectPalette10[] = INCBIN_U16("graphics/map_objects/palettes/10.gbapal");
+const u32 gMapObjectPic_BrendanFieldMove_0[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/field_move/0.4bpp");
+const u32 gMapObjectPic_BrendanFieldMove_1[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/field_move/1.4bpp");
+const u32 gMapObjectPic_BrendanFieldMove_2[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/field_move/2.4bpp");
+const u32 gMapObjectPic_BrendanFieldMove_3[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/field_move/3.4bpp");
+const u32 gMapObjectPic_BrendanFieldMove_4[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/field_move/4.4bpp");
+const u32 gMapObjectPic_BrendanSurfing_0[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/surfing/0.4bpp");
+const u32 gMapObjectPic_BrendanSurfing_3[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/surfing/3.4bpp");
+const u32 gMapObjectPic_BrendanSurfing_1[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/surfing/1.4bpp");
+const u32 gMapObjectPic_BrendanSurfing_4[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/surfing/4.4bpp");
+const u32 gMapObjectPic_BrendanSurfing_2[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/surfing/2.4bpp");
+const u32 gMapObjectPic_BrendanSurfing_5[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/surfing/5.4bpp");
+const u32 gMapObjectPic_BrendanMachBike_0[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/mach_bike/0.4bpp");
+const u32 gMapObjectPic_BrendanMachBike_1[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/mach_bike/1.4bpp");
+const u32 gMapObjectPic_BrendanMachBike_2[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/mach_bike/2.4bpp");
+const u32 gMapObjectPic_BrendanMachBike_3[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/mach_bike/3.4bpp");
+const u32 gMapObjectPic_BrendanMachBike_4[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/mach_bike/4.4bpp");
+const u32 gMapObjectPic_BrendanMachBike_5[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/mach_bike/5.4bpp");
+const u32 gMapObjectPic_BrendanMachBike_6[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/mach_bike/6.4bpp");
+const u32 gMapObjectPic_BrendanMachBike_7[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/mach_bike/7.4bpp");
+const u32 gMapObjectPic_BrendanMachBike_8[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/mach_bike/8.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_0[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/00.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_1[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/01.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_2[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/02.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_3[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/03.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_4[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/04.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_5[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/05.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_6[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/06.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_7[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/07.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_8[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/08.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_9[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/09.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_10[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/10.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_11[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/11.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_12[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/12.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_13[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/13.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_14[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/14.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_15[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/15.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_16[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/16.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_17[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/17.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_18[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/18.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_19[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/19.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_20[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/20.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_21[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/21.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_22[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/22.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_23[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/23.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_24[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/24.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_25[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/25.4bpp");
+const u32 gMapObjectPic_BrendanAcroBike_26[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/acro_bike/26.4bpp");
+const u32 gMapObjectPic_BrendanFishing_0[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/00.4bpp");
+const u32 gMapObjectPic_BrendanFishing_1[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/01.4bpp");
+const u32 gMapObjectPic_BrendanFishing_2[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/02.4bpp");
+const u32 gMapObjectPic_BrendanFishing_3[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/03.4bpp");
+const u32 gMapObjectPic_BrendanFishing_4[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/04.4bpp");
+const u32 gMapObjectPic_BrendanFishing_5[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/05.4bpp");
+const u32 gMapObjectPic_BrendanFishing_6[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/06.4bpp");
+const u32 gMapObjectPic_BrendanFishing_7[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/07.4bpp");
+const u32 gMapObjectPic_BrendanFishing_8[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/08.4bpp");
+const u32 gMapObjectPic_BrendanFishing_9[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/09.4bpp");
+const u32 gMapObjectPic_BrendanFishing_10[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/10.4bpp");
+const u32 gMapObjectPic_BrendanFishing_11[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/fishing/11.4bpp");
+const u32 gMapObjectPic_BrendanWatering_0[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/watering/0.4bpp");
+const u32 gMapObjectPic_BrendanWatering_3[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/watering/3.4bpp");
+const u32 gMapObjectPic_BrendanWatering_1[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/watering/1.4bpp");
+const u32 gMapObjectPic_BrendanWatering_4[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/watering/4.4bpp");
+const u32 gMapObjectPic_BrendanWatering_2[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/watering/2.4bpp");
+const u32 gMapObjectPic_BrendanWatering_5[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/watering/5.4bpp");
+const u32 gMapObjectPic_BrendanDecorating[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/decorating.4bpp");
+const u32 gMapObjectPic_MayDecorating[] = INCBIN_U32("graphics/map_objects/pics/people/may/decorating.4bpp");
+const u32 gMapObjectPic_BrendanUnderwater_0[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/underwater/0.4bpp");
+const u32 gMapObjectPic_BrendanUnderwater_1[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/underwater/1.4bpp");
+const u32 gMapObjectPic_BrendanUnderwater_2[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/underwater/2.4bpp");
+const u32 gMapObjectPic_BrendanUnderwater_3[] = INCBIN_U32("graphics/map_objects/pics/people/brendan/underwater/3.4bpp");
+const u32 gMapObjectPic_MayUnderwater_0[] = INCBIN_U32("graphics/map_objects/pics/people/may/underwater/0.4bpp");
+const u32 gMapObjectPic_MayUnderwater_1[] = INCBIN_U32("graphics/map_objects/pics/people/may/underwater/1.4bpp");
+const u32 gMapObjectPic_MayUnderwater_2[] = INCBIN_U32("graphics/map_objects/pics/people/may/underwater/2.4bpp");
+const u32 gMapObjectPic_MayUnderwater_3[] = INCBIN_U32("graphics/map_objects/pics/people/may/underwater/3.4bpp");
+const u16 gMapObjectPalette11[] = INCBIN_U16("graphics/map_objects/palettes/11.gbapal");
+const u32 gMapObjectPic_MayNormal_0[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/00.4bpp");
+const u32 gMapObjectPic_MayNormal_1[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/01.4bpp");
+const u32 gMapObjectPic_MayNormal_2[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/02.4bpp");
+const u32 gMapObjectPic_MayNormal_3[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/03.4bpp");
+const u32 gMapObjectPic_MayNormal_4[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/04.4bpp");
+const u32 gMapObjectPic_MayNormal_5[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/05.4bpp");
+const u32 gMapObjectPic_MayNormal_6[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/06.4bpp");
+const u32 gMapObjectPic_MayNormal_7[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/07.4bpp");
+const u32 gMapObjectPic_MayNormal_8[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/08.4bpp");
+const u32 gMapObjectPic_MayNormal_9[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/09.4bpp");
+const u32 gMapObjectPic_MayNormal_10[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/10.4bpp");
+const u32 gMapObjectPic_MayNormal_11[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/11.4bpp");
+const u32 gMapObjectPic_MayNormal_12[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/12.4bpp");
+const u32 gMapObjectPic_MayNormal_13[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/13.4bpp");
+const u32 gMapObjectPic_MayNormal_14[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/14.4bpp");
+const u32 gMapObjectPic_MayNormal_15[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/15.4bpp");
+const u32 gMapObjectPic_MayNormal_16[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/16.4bpp");
+const u32 gMapObjectPic_MayNormal_17[] = INCBIN_U32("graphics/map_objects/pics/people/may/normal/17.4bpp");
+const u16 gMapObjectPalette17[] = INCBIN_U16("graphics/map_objects/palettes/17.gbapal");
+const u16 gMapObjectPalette18[] = INCBIN_U16("graphics/map_objects/palettes/18.gbapal");
+const u16 NullPalette_831B7E8[16] = {};
+const u16 NullPalette_831B808[16] = {};
+const u16 NullPalette_831B828[16] = {};
+const u16 NullPalette_831B848[16] = {};
+const u16 NullPalette_831B868[16] = {};
+const u16 NullPalette_831B888[16] = {};
+const u16 NullPalette_831B8A8[16] = {};
+const u16 NullPalette_831B8C8[16] = {};
+const u16 NullPalette_831B8E8[16] = {};
+const u16 NullPalette_831B908[16] = {};
+const u16 NullPalette_831B928[16] = {};
+const u16 NullPalette_831B948[16] = {};
+const u16 NullPalette_831B968[16] = {};
+const u16 NullPalette_831B988[16] = {};
+const u32 gMapObjectPic_MayMachBike_0[] = INCBIN_U32("graphics/map_objects/pics/people/may/mach_bike/0.4bpp");
+const u32 gMapObjectPic_MayMachBike_1[] = INCBIN_U32("graphics/map_objects/pics/people/may/mach_bike/1.4bpp");
+const u32 gMapObjectPic_MayMachBike_2[] = INCBIN_U32("graphics/map_objects/pics/people/may/mach_bike/2.4bpp");
+const u32 gMapObjectPic_MayMachBike_3[] = INCBIN_U32("graphics/map_objects/pics/people/may/mach_bike/3.4bpp");
+const u32 gMapObjectPic_MayMachBike_4[] = INCBIN_U32("graphics/map_objects/pics/people/may/mach_bike/4.4bpp");
+const u32 gMapObjectPic_MayMachBike_5[] = INCBIN_U32("graphics/map_objects/pics/people/may/mach_bike/5.4bpp");
+const u32 gMapObjectPic_MayMachBike_6[] = INCBIN_U32("graphics/map_objects/pics/people/may/mach_bike/6.4bpp");
+const u32 gMapObjectPic_MayMachBike_7[] = INCBIN_U32("graphics/map_objects/pics/people/may/mach_bike/7.4bpp");
+const u32 gMapObjectPic_MayMachBike_8[] = INCBIN_U32("graphics/map_objects/pics/people/may/mach_bike/8.4bpp");
+const u32 gMapObjectPic_MayAcroBike_0[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/00.4bpp");
+const u32 gMapObjectPic_MayAcroBike_1[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/01.4bpp");
+const u32 gMapObjectPic_MayAcroBike_2[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/02.4bpp");
+const u32 gMapObjectPic_MayAcroBike_3[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/03.4bpp");
+const u32 gMapObjectPic_MayAcroBike_4[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/04.4bpp");
+const u32 gMapObjectPic_MayAcroBike_5[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/05.4bpp");
+const u32 gMapObjectPic_MayAcroBike_6[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/06.4bpp");
+const u32 gMapObjectPic_MayAcroBike_7[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/07.4bpp");
+const u32 gMapObjectPic_MayAcroBike_8[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/08.4bpp");
+const u32 gMapObjectPic_MayAcroBike_9[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/09.4bpp");
+const u32 gMapObjectPic_MayAcroBike_10[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/10.4bpp");
+const u32 gMapObjectPic_MayAcroBike_11[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/11.4bpp");
+const u32 gMapObjectPic_MayAcroBike_12[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/12.4bpp");
+const u32 gMapObjectPic_MayAcroBike_13[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/13.4bpp");
+const u32 gMapObjectPic_MayAcroBike_14[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/14.4bpp");
+const u32 gMapObjectPic_MayAcroBike_15[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/15.4bpp");
+const u32 gMapObjectPic_MayAcroBike_16[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/16.4bpp");
+const u32 gMapObjectPic_MayAcroBike_17[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/17.4bpp");
+const u32 gMapObjectPic_MayAcroBike_18[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/18.4bpp");
+const u32 gMapObjectPic_MayAcroBike_19[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/19.4bpp");
+const u32 gMapObjectPic_MayAcroBike_20[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/20.4bpp");
+const u32 gMapObjectPic_MayAcroBike_21[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/21.4bpp");
+const u32 gMapObjectPic_MayAcroBike_22[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/22.4bpp");
+const u32 gMapObjectPic_MayAcroBike_23[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/23.4bpp");
+const u32 gMapObjectPic_MayAcroBike_24[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/24.4bpp");
+const u32 gMapObjectPic_MayAcroBike_25[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/25.4bpp");
+const u32 gMapObjectPic_MayAcroBike_26[] = INCBIN_U32("graphics/map_objects/pics/people/may/acro_bike/26.4bpp");
+const u32 gMapObjectPic_MaySurfing_0[] = INCBIN_U32("graphics/map_objects/pics/people/may/surfing/0.4bpp");
+const u32 gMapObjectPic_MaySurfing_3[] = INCBIN_U32("graphics/map_objects/pics/people/may/surfing/3.4bpp");
+const u32 gMapObjectPic_MaySurfing_1[] = INCBIN_U32("graphics/map_objects/pics/people/may/surfing/1.4bpp");
+const u32 gMapObjectPic_MaySurfing_4[] = INCBIN_U32("graphics/map_objects/pics/people/may/surfing/4.4bpp");
+const u32 gMapObjectPic_MaySurfing_2[] = INCBIN_U32("graphics/map_objects/pics/people/may/surfing/2.4bpp");
+const u32 gMapObjectPic_MaySurfing_5[] = INCBIN_U32("graphics/map_objects/pics/people/may/surfing/5.4bpp");
+const u32 gMapObjectPic_MayFieldMove_0[] = INCBIN_U32("graphics/map_objects/pics/people/may/field_move/0.4bpp");
+const u32 gMapObjectPic_MayFieldMove_1[] = INCBIN_U32("graphics/map_objects/pics/people/may/field_move/1.4bpp");
+const u32 gMapObjectPic_MayFieldMove_2[] = INCBIN_U32("graphics/map_objects/pics/people/may/field_move/2.4bpp");
+const u32 gMapObjectPic_MayFieldMove_3[] = INCBIN_U32("graphics/map_objects/pics/people/may/field_move/3.4bpp");
+const u32 gMapObjectPic_MayFieldMove_4[] = INCBIN_U32("graphics/map_objects/pics/people/may/field_move/4.4bpp");
+const u32 gMapObjectPic_MayFishing_0[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/00.4bpp");
+const u32 gMapObjectPic_MayFishing_1[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/01.4bpp");
+const u32 gMapObjectPic_MayFishing_2[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/02.4bpp");
+const u32 gMapObjectPic_MayFishing_3[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/03.4bpp");
+const u32 gMapObjectPic_MayFishing_4[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/04.4bpp");
+const u32 gMapObjectPic_MayFishing_5[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/05.4bpp");
+const u32 gMapObjectPic_MayFishing_6[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/06.4bpp");
+const u32 gMapObjectPic_MayFishing_7[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/07.4bpp");
+const u32 gMapObjectPic_MayFishing_8[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/08.4bpp");
+const u32 gMapObjectPic_MayFishing_9[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/09.4bpp");
+const u32 gMapObjectPic_MayFishing_10[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/10.4bpp");
+const u32 gMapObjectPic_MayFishing_11[] = INCBIN_U32("graphics/map_objects/pics/people/may/fishing/11.4bpp");
+const u32 gMapObjectPic_MayWatering_0[] = INCBIN_U32("graphics/map_objects/pics/people/may/watering/0.4bpp");
+const u32 gMapObjectPic_MayWatering_3[] = INCBIN_U32("graphics/map_objects/pics/people/may/watering/3.4bpp");
+const u32 gMapObjectPic_MayWatering_1[] = INCBIN_U32("graphics/map_objects/pics/people/may/watering/1.4bpp");
+const u32 gMapObjectPic_MayWatering_4[] = INCBIN_U32("graphics/map_objects/pics/people/may/watering/4.4bpp");
+const u32 gMapObjectPic_MayWatering_2[] = INCBIN_U32("graphics/map_objects/pics/people/may/watering/2.4bpp");
+const u32 gMapObjectPic_MayWatering_5[] = INCBIN_U32("graphics/map_objects/pics/people/may/watering/5.4bpp");
+const u16 gMapObjectPalette0[] = INCBIN_U16("graphics/map_objects/palettes/00.gbapal");
+const u16 gMapObjectPalette1[] = INCBIN_U16("graphics/map_objects/palettes/01.gbapal");
+const u16 gMapObjectPalette2[] = INCBIN_U16("graphics/map_objects/palettes/02.gbapal");
+const u16 gMapObjectPalette3[] = INCBIN_U16("graphics/map_objects/palettes/03.gbapal");
+const u16 gMapObjectPalette4[] = INCBIN_U16("graphics/map_objects/palettes/04.gbapal");
+const u16 gMapObjectPalette5[] = INCBIN_U16("graphics/map_objects/palettes/05.gbapal");
+const u16 gMapObjectPalette6[] = INCBIN_U16("graphics/map_objects/palettes/06.gbapal");
+const u16 gMapObjectPalette7[] = INCBIN_U16("graphics/map_objects/palettes/07.gbapal");
+const u32 gMapObjectPic_LittleBoy1_0[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_1/0.4bpp");
+const u32 gMapObjectPic_LittleBoy1_1[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_1/1.4bpp");
+const u32 gMapObjectPic_LittleBoy1_2[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_1/2.4bpp");
+const u32 gMapObjectPic_LittleBoy1_3[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_1/3.4bpp");
+const u32 gMapObjectPic_LittleBoy1_4[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_1/4.4bpp");
+const u32 gMapObjectPic_LittleBoy1_5[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_1/5.4bpp");
+const u32 gMapObjectPic_LittleBoy1_6[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_1/6.4bpp");
+const u32 gMapObjectPic_LittleBoy1_7[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_1/7.4bpp");
+const u32 gMapObjectPic_LittleBoy1_8[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_1/8.4bpp");
+const u32 gMapObjectPic_LittleGirl1_0[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_1/0.4bpp");
+const u32 gMapObjectPic_LittleGirl1_1[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_1/1.4bpp");
+const u32 gMapObjectPic_LittleGirl1_2[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_1/2.4bpp");
+const u32 gMapObjectPic_LittleGirl1_3[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_1/3.4bpp");
+const u32 gMapObjectPic_LittleGirl1_4[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_1/4.4bpp");
+const u32 gMapObjectPic_LittleGirl1_5[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_1/5.4bpp");
+const u32 gMapObjectPic_LittleGirl1_6[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_1/6.4bpp");
+const u32 gMapObjectPic_LittleGirl1_7[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_1/7.4bpp");
+const u32 gMapObjectPic_LittleGirl1_8[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_1/8.4bpp");
+const u32 gMapObjectPic_Boy1_0[] = INCBIN_U32("graphics/map_objects/pics/people/boy_1/0.4bpp");
+const u32 gMapObjectPic_Boy1_1[] = INCBIN_U32("graphics/map_objects/pics/people/boy_1/1.4bpp");
+const u32 gMapObjectPic_Boy1_2[] = INCBIN_U32("graphics/map_objects/pics/people/boy_1/2.4bpp");
+const u32 gMapObjectPic_Boy1_3[] = INCBIN_U32("graphics/map_objects/pics/people/boy_1/3.4bpp");
+const u32 gMapObjectPic_Boy1_4[] = INCBIN_U32("graphics/map_objects/pics/people/boy_1/4.4bpp");
+const u32 gMapObjectPic_Boy1_5[] = INCBIN_U32("graphics/map_objects/pics/people/boy_1/5.4bpp");
+const u32 gMapObjectPic_Boy1_6[] = INCBIN_U32("graphics/map_objects/pics/people/boy_1/6.4bpp");
+const u32 gMapObjectPic_Boy1_7[] = INCBIN_U32("graphics/map_objects/pics/people/boy_1/7.4bpp");
+const u32 gMapObjectPic_Boy1_8[] = INCBIN_U32("graphics/map_objects/pics/people/boy_1/8.4bpp");
+const u32 gMapObjectPic_Girl1_0[] = INCBIN_U32("graphics/map_objects/pics/people/girl_1/0.4bpp");
+const u32 gMapObjectPic_Girl1_1[] = INCBIN_U32("graphics/map_objects/pics/people/girl_1/1.4bpp");
+const u32 gMapObjectPic_Girl1_2[] = INCBIN_U32("graphics/map_objects/pics/people/girl_1/2.4bpp");
+const u32 gMapObjectPic_Girl1_3[] = INCBIN_U32("graphics/map_objects/pics/people/girl_1/3.4bpp");
+const u32 gMapObjectPic_Girl1_4[] = INCBIN_U32("graphics/map_objects/pics/people/girl_1/4.4bpp");
+const u32 gMapObjectPic_Girl1_5[] = INCBIN_U32("graphics/map_objects/pics/people/girl_1/5.4bpp");
+const u32 gMapObjectPic_Girl1_6[] = INCBIN_U32("graphics/map_objects/pics/people/girl_1/6.4bpp");
+const u32 gMapObjectPic_Girl1_7[] = INCBIN_U32("graphics/map_objects/pics/people/girl_1/7.4bpp");
+const u32 gMapObjectPic_Girl1_8[] = INCBIN_U32("graphics/map_objects/pics/people/girl_1/8.4bpp");
+const u32 gMapObjectPic_Boy2_0[] = INCBIN_U32("graphics/map_objects/pics/people/boy_2/0.4bpp");
+const u32 gMapObjectPic_Boy2_1[] = INCBIN_U32("graphics/map_objects/pics/people/boy_2/1.4bpp");
+const u32 gMapObjectPic_Boy2_2[] = INCBIN_U32("graphics/map_objects/pics/people/boy_2/2.4bpp");
+const u32 gMapObjectPic_Boy2_3[] = INCBIN_U32("graphics/map_objects/pics/people/boy_2/3.4bpp");
+const u32 gMapObjectPic_Boy2_4[] = INCBIN_U32("graphics/map_objects/pics/people/boy_2/4.4bpp");
+const u32 gMapObjectPic_Boy2_5[] = INCBIN_U32("graphics/map_objects/pics/people/boy_2/5.4bpp");
+const u32 gMapObjectPic_Boy2_6[] = INCBIN_U32("graphics/map_objects/pics/people/boy_2/6.4bpp");
+const u32 gMapObjectPic_Boy2_7[] = INCBIN_U32("graphics/map_objects/pics/people/boy_2/7.4bpp");
+const u32 gMapObjectPic_Boy2_8[] = INCBIN_U32("graphics/map_objects/pics/people/boy_2/8.4bpp");
+const u32 gMapObjectPic_Girl2_0[] = INCBIN_U32("graphics/map_objects/pics/people/girl_2/0.4bpp");
+const u32 gMapObjectPic_Girl2_1[] = INCBIN_U32("graphics/map_objects/pics/people/girl_2/1.4bpp");
+const u32 gMapObjectPic_Girl2_2[] = INCBIN_U32("graphics/map_objects/pics/people/girl_2/2.4bpp");
+const u32 gMapObjectPic_Girl2_3[] = INCBIN_U32("graphics/map_objects/pics/people/girl_2/3.4bpp");
+const u32 gMapObjectPic_Girl2_4[] = INCBIN_U32("graphics/map_objects/pics/people/girl_2/4.4bpp");
+const u32 gMapObjectPic_Girl2_5[] = INCBIN_U32("graphics/map_objects/pics/people/girl_2/5.4bpp");
+const u32 gMapObjectPic_Girl2_6[] = INCBIN_U32("graphics/map_objects/pics/people/girl_2/6.4bpp");
+const u32 gMapObjectPic_Girl2_7[] = INCBIN_U32("graphics/map_objects/pics/people/girl_2/7.4bpp");
+const u32 gMapObjectPic_Girl2_8[] = INCBIN_U32("graphics/map_objects/pics/people/girl_2/8.4bpp");
+const u32 gMapObjectPic_LittleBoy2_0[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_2/0.4bpp");
+const u32 gMapObjectPic_LittleBoy2_1[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_2/1.4bpp");
+const u32 gMapObjectPic_LittleBoy2_2[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_2/2.4bpp");
+const u32 gMapObjectPic_LittleBoy2_3[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_2/3.4bpp");
+const u32 gMapObjectPic_LittleBoy2_4[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_2/4.4bpp");
+const u32 gMapObjectPic_LittleBoy2_5[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_2/5.4bpp");
+const u32 gMapObjectPic_LittleBoy2_6[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_2/6.4bpp");
+const u32 gMapObjectPic_LittleBoy2_7[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_2/7.4bpp");
+const u32 gMapObjectPic_LittleBoy2_8[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_2/8.4bpp");
+const u32 gMapObjectPic_LittleGirl2_0[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_2/0.4bpp");
+const u32 gMapObjectPic_LittleGirl2_1[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_2/1.4bpp");
+const u32 gMapObjectPic_LittleGirl2_2[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_2/2.4bpp");
+const u32 gMapObjectPic_LittleGirl2_3[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_2/3.4bpp");
+const u32 gMapObjectPic_LittleGirl2_4[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_2/4.4bpp");
+const u32 gMapObjectPic_LittleGirl2_5[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_2/5.4bpp");
+const u32 gMapObjectPic_LittleGirl2_6[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_2/6.4bpp");
+const u32 gMapObjectPic_LittleGirl2_7[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_2/7.4bpp");
+const u32 gMapObjectPic_LittleGirl2_8[] = INCBIN_U32("graphics/map_objects/pics/people/little_girl_2/8.4bpp");
+const u32 gMapObjectPic_Boy3_0[] = INCBIN_U32("graphics/map_objects/pics/people/boy_3/0.4bpp");
+const u32 gMapObjectPic_Boy3_1[] = INCBIN_U32("graphics/map_objects/pics/people/boy_3/1.4bpp");
+const u32 gMapObjectPic_Boy3_2[] = INCBIN_U32("graphics/map_objects/pics/people/boy_3/2.4bpp");
+const u32 gMapObjectPic_Boy3_3[] = INCBIN_U32("graphics/map_objects/pics/people/boy_3/3.4bpp");
+const u32 gMapObjectPic_Boy3_4[] = INCBIN_U32("graphics/map_objects/pics/people/boy_3/4.4bpp");
+const u32 gMapObjectPic_Boy3_5[] = INCBIN_U32("graphics/map_objects/pics/people/boy_3/5.4bpp");
+const u32 gMapObjectPic_Boy3_6[] = INCBIN_U32("graphics/map_objects/pics/people/boy_3/6.4bpp");
+const u32 gMapObjectPic_Boy3_7[] = INCBIN_U32("graphics/map_objects/pics/people/boy_3/7.4bpp");
+const u32 gMapObjectPic_Boy3_8[] = INCBIN_U32("graphics/map_objects/pics/people/boy_3/8.4bpp");
+const u32 gMapObjectPic_Girl3_0[] = INCBIN_U32("graphics/map_objects/pics/people/girl_3/0.4bpp");
+const u32 gMapObjectPic_Girl3_1[] = INCBIN_U32("graphics/map_objects/pics/people/girl_3/1.4bpp");
+const u32 gMapObjectPic_Girl3_2[] = INCBIN_U32("graphics/map_objects/pics/people/girl_3/2.4bpp");
+const u32 gMapObjectPic_Girl3_3[] = INCBIN_U32("graphics/map_objects/pics/people/girl_3/3.4bpp");
+const u32 gMapObjectPic_Girl3_4[] = INCBIN_U32("graphics/map_objects/pics/people/girl_3/4.4bpp");
+const u32 gMapObjectPic_Girl3_5[] = INCBIN_U32("graphics/map_objects/pics/people/girl_3/5.4bpp");
+const u32 gMapObjectPic_Girl3_6[] = INCBIN_U32("graphics/map_objects/pics/people/girl_3/6.4bpp");
+const u32 gMapObjectPic_Girl3_7[] = INCBIN_U32("graphics/map_objects/pics/people/girl_3/7.4bpp");
+const u32 gMapObjectPic_Girl3_8[] = INCBIN_U32("graphics/map_objects/pics/people/girl_3/8.4bpp");
+const u32 gMapObjectPic_Boy4_0[] = INCBIN_U32("graphics/map_objects/pics/people/boy_4/0.4bpp");
+const u32 gMapObjectPic_Boy4_1[] = INCBIN_U32("graphics/map_objects/pics/people/boy_4/1.4bpp");
+const u32 gMapObjectPic_Boy4_2[] = INCBIN_U32("graphics/map_objects/pics/people/boy_4/2.4bpp");
+const u32 gMapObjectPic_Boy4_3[] = INCBIN_U32("graphics/map_objects/pics/people/boy_4/3.4bpp");
+const u32 gMapObjectPic_Boy4_4[] = INCBIN_U32("graphics/map_objects/pics/people/boy_4/4.4bpp");
+const u32 gMapObjectPic_Boy4_5[] = INCBIN_U32("graphics/map_objects/pics/people/boy_4/5.4bpp");
+const u32 gMapObjectPic_Boy4_6[] = INCBIN_U32("graphics/map_objects/pics/people/boy_4/6.4bpp");
+const u32 gMapObjectPic_Boy4_7[] = INCBIN_U32("graphics/map_objects/pics/people/boy_4/7.4bpp");
+const u32 gMapObjectPic_Boy4_8[] = INCBIN_U32("graphics/map_objects/pics/people/boy_4/8.4bpp");
+const u32 gMapObjectPic_Woman1_0[] = INCBIN_U32("graphics/map_objects/pics/people/woman_1/0.4bpp");
+const u32 gMapObjectPic_Woman1_1[] = INCBIN_U32("graphics/map_objects/pics/people/woman_1/1.4bpp");
+const u32 gMapObjectPic_Woman1_2[] = INCBIN_U32("graphics/map_objects/pics/people/woman_1/2.4bpp");
+const u32 gMapObjectPic_Woman1_3[] = INCBIN_U32("graphics/map_objects/pics/people/woman_1/3.4bpp");
+const u32 gMapObjectPic_Woman1_4[] = INCBIN_U32("graphics/map_objects/pics/people/woman_1/4.4bpp");
+const u32 gMapObjectPic_Woman1_5[] = INCBIN_U32("graphics/map_objects/pics/people/woman_1/5.4bpp");
+const u32 gMapObjectPic_Woman1_6[] = INCBIN_U32("graphics/map_objects/pics/people/woman_1/6.4bpp");
+const u32 gMapObjectPic_Woman1_7[] = INCBIN_U32("graphics/map_objects/pics/people/woman_1/7.4bpp");
+const u32 gMapObjectPic_Woman1_8[] = INCBIN_U32("graphics/map_objects/pics/people/woman_1/8.4bpp");
+const u32 gMapObjectPic_FatMan_0[] = INCBIN_U32("graphics/map_objects/pics/people/fat_man/0.4bpp");
+const u32 gMapObjectPic_FatMan_1[] = INCBIN_U32("graphics/map_objects/pics/people/fat_man/1.4bpp");
+const u32 gMapObjectPic_FatMan_2[] = INCBIN_U32("graphics/map_objects/pics/people/fat_man/2.4bpp");
+const u32 gMapObjectPic_FatMan_3[] = INCBIN_U32("graphics/map_objects/pics/people/fat_man/3.4bpp");
+const u32 gMapObjectPic_FatMan_4[] = INCBIN_U32("graphics/map_objects/pics/people/fat_man/4.4bpp");
+const u32 gMapObjectPic_FatMan_5[] = INCBIN_U32("graphics/map_objects/pics/people/fat_man/5.4bpp");
+const u32 gMapObjectPic_FatMan_6[] = INCBIN_U32("graphics/map_objects/pics/people/fat_man/6.4bpp");
+const u32 gMapObjectPic_FatMan_7[] = INCBIN_U32("graphics/map_objects/pics/people/fat_man/7.4bpp");
+const u32 gMapObjectPic_FatMan_8[] = INCBIN_U32("graphics/map_objects/pics/people/fat_man/8.4bpp");
+const u32 gMapObjectPic_Woman2_0[] = INCBIN_U32("graphics/map_objects/pics/people/woman_2/0.4bpp");
+const u32 gMapObjectPic_Woman2_1[] = INCBIN_U32("graphics/map_objects/pics/people/woman_2/1.4bpp");
+const u32 gMapObjectPic_Woman2_2[] = INCBIN_U32("graphics/map_objects/pics/people/woman_2/2.4bpp");
+const u32 gMapObjectPic_Woman2_3[] = INCBIN_U32("graphics/map_objects/pics/people/woman_2/3.4bpp");
+const u32 gMapObjectPic_Woman2_4[] = INCBIN_U32("graphics/map_objects/pics/people/woman_2/4.4bpp");
+const u32 gMapObjectPic_Woman2_5[] = INCBIN_U32("graphics/map_objects/pics/people/woman_2/5.4bpp");
+const u32 gMapObjectPic_Woman2_6[] = INCBIN_U32("graphics/map_objects/pics/people/woman_2/6.4bpp");
+const u32 gMapObjectPic_Woman2_7[] = INCBIN_U32("graphics/map_objects/pics/people/woman_2/7.4bpp");
+const u32 gMapObjectPic_Woman2_8[] = INCBIN_U32("graphics/map_objects/pics/people/woman_2/8.4bpp");
+const u32 gMapObjectPic_Man1_0[] = INCBIN_U32("graphics/map_objects/pics/people/man_1/0.4bpp");
+const u32 gMapObjectPic_Man1_1[] = INCBIN_U32("graphics/map_objects/pics/people/man_1/1.4bpp");
+const u32 gMapObjectPic_Man1_2[] = INCBIN_U32("graphics/map_objects/pics/people/man_1/2.4bpp");
+const u32 gMapObjectPic_Man1_3[] = INCBIN_U32("graphics/map_objects/pics/people/man_1/3.4bpp");
+const u32 gMapObjectPic_Man1_4[] = INCBIN_U32("graphics/map_objects/pics/people/man_1/4.4bpp");
+const u32 gMapObjectPic_Man1_5[] = INCBIN_U32("graphics/map_objects/pics/people/man_1/5.4bpp");
+const u32 gMapObjectPic_Man1_6[] = INCBIN_U32("graphics/map_objects/pics/people/man_1/6.4bpp");
+const u32 gMapObjectPic_Man1_7[] = INCBIN_U32("graphics/map_objects/pics/people/man_1/7.4bpp");
+const u32 gMapObjectPic_Man1_8[] = INCBIN_U32("graphics/map_objects/pics/people/man_1/8.4bpp");
+const u32 gMapObjectPic_Woman3_0[] = INCBIN_U32("graphics/map_objects/pics/people/woman_3/0.4bpp");
+const u32 gMapObjectPic_Woman3_1[] = INCBIN_U32("graphics/map_objects/pics/people/woman_3/1.4bpp");
+const u32 gMapObjectPic_Woman3_2[] = INCBIN_U32("graphics/map_objects/pics/people/woman_3/2.4bpp");
+const u32 gMapObjectPic_Woman3_3[] = INCBIN_U32("graphics/map_objects/pics/people/woman_3/3.4bpp");
+const u32 gMapObjectPic_Woman3_4[] = INCBIN_U32("graphics/map_objects/pics/people/woman_3/4.4bpp");
+const u32 gMapObjectPic_Woman3_5[] = INCBIN_U32("graphics/map_objects/pics/people/woman_3/5.4bpp");
+const u32 gMapObjectPic_Woman3_6[] = INCBIN_U32("graphics/map_objects/pics/people/woman_3/6.4bpp");
+const u32 gMapObjectPic_Woman3_7[] = INCBIN_U32("graphics/map_objects/pics/people/woman_3/7.4bpp");
+const u32 gMapObjectPic_Woman3_8[] = INCBIN_U32("graphics/map_objects/pics/people/woman_3/8.4bpp");
+const u32 gMapObjectPic_OldMan1_0[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_1/0.4bpp");
+const u32 gMapObjectPic_OldMan1_1[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_1/1.4bpp");
+const u32 gMapObjectPic_OldMan1_2[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_1/2.4bpp");
+const u32 gMapObjectPic_OldMan1_3[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_1/3.4bpp");
+const u32 gMapObjectPic_OldMan1_4[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_1/4.4bpp");
+const u32 gMapObjectPic_OldMan1_5[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_1/5.4bpp");
+const u32 gMapObjectPic_OldMan1_6[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_1/6.4bpp");
+const u32 gMapObjectPic_OldMan1_7[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_1/7.4bpp");
+const u32 gMapObjectPic_OldMan1_8[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_1/8.4bpp");
+const u32 gMapObjectPic_OldWoman1_0[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_1/0.4bpp");
+const u32 gMapObjectPic_OldWoman1_1[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_1/1.4bpp");
+const u32 gMapObjectPic_OldWoman1_2[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_1/2.4bpp");
+const u32 gMapObjectPic_OldWoman1_3[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_1/3.4bpp");
+const u32 gMapObjectPic_OldWoman1_4[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_1/4.4bpp");
+const u32 gMapObjectPic_OldWoman1_5[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_1/5.4bpp");
+const u32 gMapObjectPic_OldWoman1_6[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_1/6.4bpp");
+const u32 gMapObjectPic_OldWoman1_7[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_1/7.4bpp");
+const u32 gMapObjectPic_OldWoman1_8[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_1/8.4bpp");
+const u32 gMapObjectPic_Man2_0[] = INCBIN_U32("graphics/map_objects/pics/people/man_2/0.4bpp");
+const u32 gMapObjectPic_Man2_1[] = INCBIN_U32("graphics/map_objects/pics/people/man_2/1.4bpp");
+const u32 gMapObjectPic_Man2_2[] = INCBIN_U32("graphics/map_objects/pics/people/man_2/2.4bpp");
+const u32 gMapObjectPic_Man2_3[] = INCBIN_U32("graphics/map_objects/pics/people/man_2/3.4bpp");
+const u32 gMapObjectPic_Man2_4[] = INCBIN_U32("graphics/map_objects/pics/people/man_2/4.4bpp");
+const u32 gMapObjectPic_Man2_5[] = INCBIN_U32("graphics/map_objects/pics/people/man_2/5.4bpp");
+const u32 gMapObjectPic_Man2_6[] = INCBIN_U32("graphics/map_objects/pics/people/man_2/6.4bpp");
+const u32 gMapObjectPic_Man2_7[] = INCBIN_U32("graphics/map_objects/pics/people/man_2/7.4bpp");
+const u32 gMapObjectPic_Man2_8[] = INCBIN_U32("graphics/map_objects/pics/people/man_2/8.4bpp");
+const u32 gMapObjectPic_Woman4_0[] = INCBIN_U32("graphics/map_objects/pics/people/woman_4/0.4bpp");
+const u32 gMapObjectPic_Woman4_1[] = INCBIN_U32("graphics/map_objects/pics/people/woman_4/1.4bpp");
+const u32 gMapObjectPic_Woman4_2[] = INCBIN_U32("graphics/map_objects/pics/people/woman_4/2.4bpp");
+const u32 gMapObjectPic_Woman4_3[] = INCBIN_U32("graphics/map_objects/pics/people/woman_4/3.4bpp");
+const u32 gMapObjectPic_Woman4_4[] = INCBIN_U32("graphics/map_objects/pics/people/woman_4/4.4bpp");
+const u32 gMapObjectPic_Woman4_5[] = INCBIN_U32("graphics/map_objects/pics/people/woman_4/5.4bpp");
+const u32 gMapObjectPic_Woman4_6[] = INCBIN_U32("graphics/map_objects/pics/people/woman_4/6.4bpp");
+const u32 gMapObjectPic_Woman4_7[] = INCBIN_U32("graphics/map_objects/pics/people/woman_4/7.4bpp");
+const u32 gMapObjectPic_Woman4_8[] = INCBIN_U32("graphics/map_objects/pics/people/woman_4/8.4bpp");
+const u32 gMapObjectPic_Man3_0[] = INCBIN_U32("graphics/map_objects/pics/people/man_3/0.4bpp");
+const u32 gMapObjectPic_Man3_1[] = INCBIN_U32("graphics/map_objects/pics/people/man_3/1.4bpp");
+const u32 gMapObjectPic_Man3_2[] = INCBIN_U32("graphics/map_objects/pics/people/man_3/2.4bpp");
+const u32 gMapObjectPic_Man3_3[] = INCBIN_U32("graphics/map_objects/pics/people/man_3/3.4bpp");
+const u32 gMapObjectPic_Man3_4[] = INCBIN_U32("graphics/map_objects/pics/people/man_3/4.4bpp");
+const u32 gMapObjectPic_Man3_5[] = INCBIN_U32("graphics/map_objects/pics/people/man_3/5.4bpp");
+const u32 gMapObjectPic_Man3_6[] = INCBIN_U32("graphics/map_objects/pics/people/man_3/6.4bpp");
+const u32 gMapObjectPic_Man3_7[] = INCBIN_U32("graphics/map_objects/pics/people/man_3/7.4bpp");
+const u32 gMapObjectPic_Man3_8[] = INCBIN_U32("graphics/map_objects/pics/people/man_3/8.4bpp");
+const u32 gMapObjectPic_Woman5_0[] = INCBIN_U32("graphics/map_objects/pics/people/woman_5/0.4bpp");
+const u32 gMapObjectPic_Woman5_1[] = INCBIN_U32("graphics/map_objects/pics/people/woman_5/1.4bpp");
+const u32 gMapObjectPic_Woman5_2[] = INCBIN_U32("graphics/map_objects/pics/people/woman_5/2.4bpp");
+const u32 gMapObjectPic_Woman5_3[] = INCBIN_U32("graphics/map_objects/pics/people/woman_5/3.4bpp");
+const u32 gMapObjectPic_Woman5_4[] = INCBIN_U32("graphics/map_objects/pics/people/woman_5/4.4bpp");
+const u32 gMapObjectPic_Woman5_5[] = INCBIN_U32("graphics/map_objects/pics/people/woman_5/5.4bpp");
+const u32 gMapObjectPic_Woman5_6[] = INCBIN_U32("graphics/map_objects/pics/people/woman_5/6.4bpp");
+const u32 gMapObjectPic_Woman5_7[] = INCBIN_U32("graphics/map_objects/pics/people/woman_5/7.4bpp");
+const u32 gMapObjectPic_Woman5_8[] = INCBIN_U32("graphics/map_objects/pics/people/woman_5/8.4bpp");
+const u32 gMapObjectPic_Cook_0[] = INCBIN_U32("graphics/map_objects/pics/people/cook/0.4bpp");
+const u32 gMapObjectPic_Cook_1[] = INCBIN_U32("graphics/map_objects/pics/people/cook/1.4bpp");
+const u32 gMapObjectPic_Cook_2[] = INCBIN_U32("graphics/map_objects/pics/people/cook/2.4bpp");
+const u32 gMapObjectPic_Woman6_0[] = INCBIN_U32("graphics/map_objects/pics/people/woman_6/0.4bpp");
+const u32 gMapObjectPic_Woman6_1[] = INCBIN_U32("graphics/map_objects/pics/people/woman_6/1.4bpp");
+const u32 gMapObjectPic_Woman6_2[] = INCBIN_U32("graphics/map_objects/pics/people/woman_6/2.4bpp");
+const u32 gMapObjectPic_Woman6_3[] = INCBIN_U32("graphics/map_objects/pics/people/woman_6/3.4bpp");
+const u32 gMapObjectPic_Woman6_4[] = INCBIN_U32("graphics/map_objects/pics/people/woman_6/4.4bpp");
+const u32 gMapObjectPic_Woman6_5[] = INCBIN_U32("graphics/map_objects/pics/people/woman_6/5.4bpp");
+const u32 gMapObjectPic_Woman6_6[] = INCBIN_U32("graphics/map_objects/pics/people/woman_6/6.4bpp");
+const u32 gMapObjectPic_Woman6_7[] = INCBIN_U32("graphics/map_objects/pics/people/woman_6/7.4bpp");
+const u32 gMapObjectPic_Woman6_8[] = INCBIN_U32("graphics/map_objects/pics/people/woman_6/8.4bpp");
+const u32 gMapObjectPic_OldMan2_0[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_2/0.4bpp");
+const u32 gMapObjectPic_OldMan2_1[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_2/1.4bpp");
+const u32 gMapObjectPic_OldMan2_2[] = INCBIN_U32("graphics/map_objects/pics/people/old_man_2/2.4bpp");
+const u32 gMapObjectPic_OldWoman2_0[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_2/0.4bpp");
+const u32 gMapObjectPic_OldWoman2_1[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_2/1.4bpp");
+const u32 gMapObjectPic_OldWoman2_2[] = INCBIN_U32("graphics/map_objects/pics/people/old_woman_2/2.4bpp");
+const u32 gMapObjectPic_Camper_0[] = INCBIN_U32("graphics/map_objects/pics/people/camper/0.4bpp");
+const u32 gMapObjectPic_Camper_1[] = INCBIN_U32("graphics/map_objects/pics/people/camper/1.4bpp");
+const u32 gMapObjectPic_Camper_2[] = INCBIN_U32("graphics/map_objects/pics/people/camper/2.4bpp");
+const u32 gMapObjectPic_Camper_3[] = INCBIN_U32("graphics/map_objects/pics/people/camper/3.4bpp");
+const u32 gMapObjectPic_Camper_4[] = INCBIN_U32("graphics/map_objects/pics/people/camper/4.4bpp");
+const u32 gMapObjectPic_Camper_5[] = INCBIN_U32("graphics/map_objects/pics/people/camper/5.4bpp");
+const u32 gMapObjectPic_Camper_6[] = INCBIN_U32("graphics/map_objects/pics/people/camper/6.4bpp");
+const u32 gMapObjectPic_Camper_7[] = INCBIN_U32("graphics/map_objects/pics/people/camper/7.4bpp");
+const u32 gMapObjectPic_Camper_8[] = INCBIN_U32("graphics/map_objects/pics/people/camper/8.4bpp");
+const u32 gMapObjectPic_Picnicker_0[] = INCBIN_U32("graphics/map_objects/pics/people/picnicker/0.4bpp");
+const u32 gMapObjectPic_Picnicker_1[] = INCBIN_U32("graphics/map_objects/pics/people/picnicker/1.4bpp");
+const u32 gMapObjectPic_Picnicker_2[] = INCBIN_U32("graphics/map_objects/pics/people/picnicker/2.4bpp");
+const u32 gMapObjectPic_Picnicker_3[] = INCBIN_U32("graphics/map_objects/pics/people/picnicker/3.4bpp");
+const u32 gMapObjectPic_Picnicker_4[] = INCBIN_U32("graphics/map_objects/pics/people/picnicker/4.4bpp");
+const u32 gMapObjectPic_Picnicker_5[] = INCBIN_U32("graphics/map_objects/pics/people/picnicker/5.4bpp");
+const u32 gMapObjectPic_Picnicker_6[] = INCBIN_U32("graphics/map_objects/pics/people/picnicker/6.4bpp");
+const u32 gMapObjectPic_Picnicker_7[] = INCBIN_U32("graphics/map_objects/pics/people/picnicker/7.4bpp");
+const u32 gMapObjectPic_Picnicker_8[] = INCBIN_U32("graphics/map_objects/pics/people/picnicker/8.4bpp");
+const u32 gMapObjectPic_Man4_0[] = INCBIN_U32("graphics/map_objects/pics/people/man_4/0.4bpp");
+const u32 gMapObjectPic_Man4_1[] = INCBIN_U32("graphics/map_objects/pics/people/man_4/1.4bpp");
+const u32 gMapObjectPic_Man4_2[] = INCBIN_U32("graphics/map_objects/pics/people/man_4/2.4bpp");
+const u32 gMapObjectPic_Man4_3[] = INCBIN_U32("graphics/map_objects/pics/people/man_4/3.4bpp");
+const u32 gMapObjectPic_Man4_4[] = INCBIN_U32("graphics/map_objects/pics/people/man_4/4.4bpp");
+const u32 gMapObjectPic_Man4_5[] = INCBIN_U32("graphics/map_objects/pics/people/man_4/5.4bpp");
+const u32 gMapObjectPic_Man4_6[] = INCBIN_U32("graphics/map_objects/pics/people/man_4/6.4bpp");
+const u32 gMapObjectPic_Man4_7[] = INCBIN_U32("graphics/map_objects/pics/people/man_4/7.4bpp");
+const u32 gMapObjectPic_Man4_8[] = INCBIN_U32("graphics/map_objects/pics/people/man_4/8.4bpp");
+const u32 gMapObjectPic_Woman7_0[] = INCBIN_U32("graphics/map_objects/pics/people/woman_7/0.4bpp");
+const u32 gMapObjectPic_Woman7_1[] = INCBIN_U32("graphics/map_objects/pics/people/woman_7/1.4bpp");
+const u32 gMapObjectPic_Woman7_2[] = INCBIN_U32("graphics/map_objects/pics/people/woman_7/2.4bpp");
+const u32 gMapObjectPic_Woman7_3[] = INCBIN_U32("graphics/map_objects/pics/people/woman_7/3.4bpp");
+const u32 gMapObjectPic_Woman7_4[] = INCBIN_U32("graphics/map_objects/pics/people/woman_7/4.4bpp");
+const u32 gMapObjectPic_Woman7_5[] = INCBIN_U32("graphics/map_objects/pics/people/woman_7/5.4bpp");
+const u32 gMapObjectPic_Woman7_6[] = INCBIN_U32("graphics/map_objects/pics/people/woman_7/6.4bpp");
+const u32 gMapObjectPic_Woman7_7[] = INCBIN_U32("graphics/map_objects/pics/people/woman_7/7.4bpp");
+const u32 gMapObjectPic_Woman7_8[] = INCBIN_U32("graphics/map_objects/pics/people/woman_7/8.4bpp");
+const u32 gMapObjectPic_Youngster_0[] = INCBIN_U32("graphics/map_objects/pics/people/youngster/0.4bpp");
+const u32 gMapObjectPic_Youngster_1[] = INCBIN_U32("graphics/map_objects/pics/people/youngster/1.4bpp");
+const u32 gMapObjectPic_Youngster_2[] = INCBIN_U32("graphics/map_objects/pics/people/youngster/2.4bpp");
+const u32 gMapObjectPic_Youngster_3[] = INCBIN_U32("graphics/map_objects/pics/people/youngster/3.4bpp");
+const u32 gMapObjectPic_Youngster_4[] = INCBIN_U32("graphics/map_objects/pics/people/youngster/4.4bpp");
+const u32 gMapObjectPic_Youngster_5[] = INCBIN_U32("graphics/map_objects/pics/people/youngster/5.4bpp");
+const u32 gMapObjectPic_Youngster_6[] = INCBIN_U32("graphics/map_objects/pics/people/youngster/6.4bpp");
+const u32 gMapObjectPic_Youngster_7[] = INCBIN_U32("graphics/map_objects/pics/people/youngster/7.4bpp");
+const u32 gMapObjectPic_Youngster_8[] = INCBIN_U32("graphics/map_objects/pics/people/youngster/8.4bpp");
+const u32 gMapObjectPic_BugCatcher_0[] = INCBIN_U32("graphics/map_objects/pics/people/bug_catcher/0.4bpp");
+const u32 gMapObjectPic_BugCatcher_1[] = INCBIN_U32("graphics/map_objects/pics/people/bug_catcher/1.4bpp");
+const u32 gMapObjectPic_BugCatcher_2[] = INCBIN_U32("graphics/map_objects/pics/people/bug_catcher/2.4bpp");
+const u32 gMapObjectPic_BugCatcher_3[] = INCBIN_U32("graphics/map_objects/pics/people/bug_catcher/3.4bpp");
+const u32 gMapObjectPic_BugCatcher_4[] = INCBIN_U32("graphics/map_objects/pics/people/bug_catcher/4.4bpp");
+const u32 gMapObjectPic_BugCatcher_5[] = INCBIN_U32("graphics/map_objects/pics/people/bug_catcher/5.4bpp");
+const u32 gMapObjectPic_BugCatcher_6[] = INCBIN_U32("graphics/map_objects/pics/people/bug_catcher/6.4bpp");
+const u32 gMapObjectPic_BugCatcher_7[] = INCBIN_U32("graphics/map_objects/pics/people/bug_catcher/7.4bpp");
+const u32 gMapObjectPic_BugCatcher_8[] = INCBIN_U32("graphics/map_objects/pics/people/bug_catcher/8.4bpp");
+const u32 gMapObjectPic_PsychicM_0[] = INCBIN_U32("graphics/map_objects/pics/people/psychic_m/0.4bpp");
+const u32 gMapObjectPic_PsychicM_1[] = INCBIN_U32("graphics/map_objects/pics/people/psychic_m/1.4bpp");
+const u32 gMapObjectPic_PsychicM_2[] = INCBIN_U32("graphics/map_objects/pics/people/psychic_m/2.4bpp");
+const u32 gMapObjectPic_PsychicM_3[] = INCBIN_U32("graphics/map_objects/pics/people/psychic_m/3.4bpp");
+const u32 gMapObjectPic_PsychicM_4[] = INCBIN_U32("graphics/map_objects/pics/people/psychic_m/4.4bpp");
+const u32 gMapObjectPic_PsychicM_5[] = INCBIN_U32("graphics/map_objects/pics/people/psychic_m/5.4bpp");
+const u32 gMapObjectPic_PsychicM_6[] = INCBIN_U32("graphics/map_objects/pics/people/psychic_m/6.4bpp");
+const u32 gMapObjectPic_PsychicM_7[] = INCBIN_U32("graphics/map_objects/pics/people/psychic_m/7.4bpp");
+const u32 gMapObjectPic_PsychicM_8[] = INCBIN_U32("graphics/map_objects/pics/people/psychic_m/8.4bpp");
+const u32 gMapObjectPic_SchoolKidM_0[] = INCBIN_U32("graphics/map_objects/pics/people/school_kid_m/0.4bpp");
+const u32 gMapObjectPic_SchoolKidM_1[] = INCBIN_U32("graphics/map_objects/pics/people/school_kid_m/1.4bpp");
+const u32 gMapObjectPic_SchoolKidM_2[] = INCBIN_U32("graphics/map_objects/pics/people/school_kid_m/2.4bpp");
+const u32 gMapObjectPic_SchoolKidM_3[] = INCBIN_U32("graphics/map_objects/pics/people/school_kid_m/3.4bpp");
+const u32 gMapObjectPic_SchoolKidM_4[] = INCBIN_U32("graphics/map_objects/pics/people/school_kid_m/4.4bpp");
+const u32 gMapObjectPic_SchoolKidM_5[] = INCBIN_U32("graphics/map_objects/pics/people/school_kid_m/5.4bpp");
+const u32 gMapObjectPic_SchoolKidM_6[] = INCBIN_U32("graphics/map_objects/pics/people/school_kid_m/6.4bpp");
+const u32 gMapObjectPic_SchoolKidM_7[] = INCBIN_U32("graphics/map_objects/pics/people/school_kid_m/7.4bpp");
+const u32 gMapObjectPic_SchoolKidM_8[] = INCBIN_U32("graphics/map_objects/pics/people/school_kid_m/8.4bpp");
+const u32 gMapObjectPic_Maniac_0[] = INCBIN_U32("graphics/map_objects/pics/people/maniac/0.4bpp");
+const u32 gMapObjectPic_Maniac_1[] = INCBIN_U32("graphics/map_objects/pics/people/maniac/1.4bpp");
+const u32 gMapObjectPic_Maniac_2[] = INCBIN_U32("graphics/map_objects/pics/people/maniac/2.4bpp");
+const u32 gMapObjectPic_Maniac_3[] = INCBIN_U32("graphics/map_objects/pics/people/maniac/3.4bpp");
+const u32 gMapObjectPic_Maniac_4[] = INCBIN_U32("graphics/map_objects/pics/people/maniac/4.4bpp");
+const u32 gMapObjectPic_Maniac_5[] = INCBIN_U32("graphics/map_objects/pics/people/maniac/5.4bpp");
+const u32 gMapObjectPic_Maniac_6[] = INCBIN_U32("graphics/map_objects/pics/people/maniac/6.4bpp");
+const u32 gMapObjectPic_Maniac_7[] = INCBIN_U32("graphics/map_objects/pics/people/maniac/7.4bpp");
+const u32 gMapObjectPic_Maniac_8[] = INCBIN_U32("graphics/map_objects/pics/people/maniac/8.4bpp");
+const u32 gMapObjectPic_HexManiac_0[] = INCBIN_U32("graphics/map_objects/pics/people/hex_maniac/0.4bpp");
+const u32 gMapObjectPic_HexManiac_1[] = INCBIN_U32("graphics/map_objects/pics/people/hex_maniac/1.4bpp");
+const u32 gMapObjectPic_HexManiac_2[] = INCBIN_U32("graphics/map_objects/pics/people/hex_maniac/2.4bpp");
+const u32 gMapObjectPic_HexManiac_3[] = INCBIN_U32("graphics/map_objects/pics/people/hex_maniac/3.4bpp");
+const u32 gMapObjectPic_HexManiac_4[] = INCBIN_U32("graphics/map_objects/pics/people/hex_maniac/4.4bpp");
+const u32 gMapObjectPic_HexManiac_5[] = INCBIN_U32("graphics/map_objects/pics/people/hex_maniac/5.4bpp");
+const u32 gMapObjectPic_HexManiac_6[] = INCBIN_U32("graphics/map_objects/pics/people/hex_maniac/6.4bpp");
+const u32 gMapObjectPic_HexManiac_7[] = INCBIN_U32("graphics/map_objects/pics/people/hex_maniac/7.4bpp");
+const u32 gMapObjectPic_HexManiac_8[] = INCBIN_U32("graphics/map_objects/pics/people/hex_maniac/8.4bpp");
+const u32 gMapObjectPic_Woman8_0[] = INCBIN_U32("graphics/map_objects/pics/people/woman_8/0.4bpp");
+const u32 gMapObjectPic_Woman8_1[] = INCBIN_U32("graphics/map_objects/pics/people/woman_8/1.4bpp");
+const u32 gMapObjectPic_Woman8_2[] = INCBIN_U32("graphics/map_objects/pics/people/woman_8/2.4bpp");
+const u32 gMapObjectPic_Woman8_3[] = INCBIN_U32("graphics/map_objects/pics/people/woman_8/3.4bpp");
+const u32 gMapObjectPic_Woman8_4[] = INCBIN_U32("graphics/map_objects/pics/people/woman_8/4.4bpp");
+const u32 gMapObjectPic_Woman8_5[] = INCBIN_U32("graphics/map_objects/pics/people/woman_8/5.4bpp");
+const u32 gMapObjectPic_Woman8_6[] = INCBIN_U32("graphics/map_objects/pics/people/woman_8/6.4bpp");
+const u32 gMapObjectPic_Woman8_7[] = INCBIN_U32("graphics/map_objects/pics/people/woman_8/7.4bpp");
+const u32 gMapObjectPic_Woman8_8[] = INCBIN_U32("graphics/map_objects/pics/people/woman_8/8.4bpp");
+const u32 gMapObjectPic_SwimmerM_0[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_m/0.4bpp");
+const u32 gMapObjectPic_SwimmerM_1[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_m/1.4bpp");
+const u32 gMapObjectPic_SwimmerM_2[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_m/2.4bpp");
+const u32 gMapObjectPic_SwimmerM_3[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_m/3.4bpp");
+const u32 gMapObjectPic_SwimmerM_4[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_m/4.4bpp");
+const u32 gMapObjectPic_SwimmerM_5[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_m/5.4bpp");
+const u32 gMapObjectPic_SwimmerM_6[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_m/6.4bpp");
+const u32 gMapObjectPic_SwimmerM_7[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_m/7.4bpp");
+const u32 gMapObjectPic_SwimmerM_8[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_m/8.4bpp");
+const u32 gMapObjectPic_SwimmerF_0[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_f/0.4bpp");
+const u32 gMapObjectPic_SwimmerF_1[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_f/1.4bpp");
+const u32 gMapObjectPic_SwimmerF_2[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_f/2.4bpp");
+const u32 gMapObjectPic_SwimmerF_3[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_f/3.4bpp");
+const u32 gMapObjectPic_SwimmerF_4[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_f/4.4bpp");
+const u32 gMapObjectPic_SwimmerF_5[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_f/5.4bpp");
+const u32 gMapObjectPic_SwimmerF_6[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_f/6.4bpp");
+const u32 gMapObjectPic_SwimmerF_7[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_f/7.4bpp");
+const u32 gMapObjectPic_SwimmerF_8[] = INCBIN_U32("graphics/map_objects/pics/people/swimmer_f/8.4bpp");
+const u32 gMapObjectPic_BlackBelt_0[] = INCBIN_U32("graphics/map_objects/pics/people/black_belt/0.4bpp");
+const u32 gMapObjectPic_BlackBelt_1[] = INCBIN_U32("graphics/map_objects/pics/people/black_belt/1.4bpp");
+const u32 gMapObjectPic_BlackBelt_2[] = INCBIN_U32("graphics/map_objects/pics/people/black_belt/2.4bpp");
+const u32 gMapObjectPic_BlackBelt_3[] = INCBIN_U32("graphics/map_objects/pics/people/black_belt/3.4bpp");
+const u32 gMapObjectPic_BlackBelt_4[] = INCBIN_U32("graphics/map_objects/pics/people/black_belt/4.4bpp");
+const u32 gMapObjectPic_BlackBelt_5[] = INCBIN_U32("graphics/map_objects/pics/people/black_belt/5.4bpp");
+const u32 gMapObjectPic_BlackBelt_6[] = INCBIN_U32("graphics/map_objects/pics/people/black_belt/6.4bpp");
+const u32 gMapObjectPic_BlackBelt_7[] = INCBIN_U32("graphics/map_objects/pics/people/black_belt/7.4bpp");
+const u32 gMapObjectPic_BlackBelt_8[] = INCBIN_U32("graphics/map_objects/pics/people/black_belt/8.4bpp");
+const u32 gMapObjectPic_Beauty_0[] = INCBIN_U32("graphics/map_objects/pics/people/beauty/0.4bpp");
+const u32 gMapObjectPic_Beauty_1[] = INCBIN_U32("graphics/map_objects/pics/people/beauty/1.4bpp");
+const u32 gMapObjectPic_Beauty_2[] = INCBIN_U32("graphics/map_objects/pics/people/beauty/2.4bpp");
+const u32 gMapObjectPic_Beauty_3[] = INCBIN_U32("graphics/map_objects/pics/people/beauty/3.4bpp");
+const u32 gMapObjectPic_Beauty_4[] = INCBIN_U32("graphics/map_objects/pics/people/beauty/4.4bpp");
+const u32 gMapObjectPic_Beauty_5[] = INCBIN_U32("graphics/map_objects/pics/people/beauty/5.4bpp");
+const u32 gMapObjectPic_Beauty_6[] = INCBIN_U32("graphics/map_objects/pics/people/beauty/6.4bpp");
+const u32 gMapObjectPic_Beauty_7[] = INCBIN_U32("graphics/map_objects/pics/people/beauty/7.4bpp");
+const u32 gMapObjectPic_Beauty_8[] = INCBIN_U32("graphics/map_objects/pics/people/beauty/8.4bpp");
+const u32 gMapObjectPic_Scientist1_0[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_1/0.4bpp");
+const u32 gMapObjectPic_Scientist1_1[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_1/1.4bpp");
+const u32 gMapObjectPic_Scientist1_2[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_1/2.4bpp");
+const u32 gMapObjectPic_Scientist1_3[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_1/3.4bpp");
+const u32 gMapObjectPic_Scientist1_4[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_1/4.4bpp");
+const u32 gMapObjectPic_Scientist1_5[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_1/5.4bpp");
+const u32 gMapObjectPic_Scientist1_6[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_1/6.4bpp");
+const u32 gMapObjectPic_Scientist1_7[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_1/7.4bpp");
+const u32 gMapObjectPic_Scientist1_8[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_1/8.4bpp");
+const u32 gMapObjectPic_Lass_0[] = INCBIN_U32("graphics/map_objects/pics/people/lass/0.4bpp");
+const u32 gMapObjectPic_Lass_1[] = INCBIN_U32("graphics/map_objects/pics/people/lass/1.4bpp");
+const u32 gMapObjectPic_Lass_2[] = INCBIN_U32("graphics/map_objects/pics/people/lass/2.4bpp");
+const u32 gMapObjectPic_Lass_3[] = INCBIN_U32("graphics/map_objects/pics/people/lass/3.4bpp");
+const u32 gMapObjectPic_Lass_4[] = INCBIN_U32("graphics/map_objects/pics/people/lass/4.4bpp");
+const u32 gMapObjectPic_Lass_5[] = INCBIN_U32("graphics/map_objects/pics/people/lass/5.4bpp");
+const u32 gMapObjectPic_Lass_6[] = INCBIN_U32("graphics/map_objects/pics/people/lass/6.4bpp");
+const u32 gMapObjectPic_Lass_7[] = INCBIN_U32("graphics/map_objects/pics/people/lass/7.4bpp");
+const u32 gMapObjectPic_Lass_8[] = INCBIN_U32("graphics/map_objects/pics/people/lass/8.4bpp");
+const u32 gMapObjectPic_Gentleman_0[] = INCBIN_U32("graphics/map_objects/pics/people/gentleman/0.4bpp");
+const u32 gMapObjectPic_Gentleman_1[] = INCBIN_U32("graphics/map_objects/pics/people/gentleman/1.4bpp");
+const u32 gMapObjectPic_Gentleman_2[] = INCBIN_U32("graphics/map_objects/pics/people/gentleman/2.4bpp");
+const u32 gMapObjectPic_Gentleman_3[] = INCBIN_U32("graphics/map_objects/pics/people/gentleman/3.4bpp");
+const u32 gMapObjectPic_Gentleman_4[] = INCBIN_U32("graphics/map_objects/pics/people/gentleman/4.4bpp");
+const u32 gMapObjectPic_Gentleman_5[] = INCBIN_U32("graphics/map_objects/pics/people/gentleman/5.4bpp");
+const u32 gMapObjectPic_Gentleman_6[] = INCBIN_U32("graphics/map_objects/pics/people/gentleman/6.4bpp");
+const u32 gMapObjectPic_Gentleman_7[] = INCBIN_U32("graphics/map_objects/pics/people/gentleman/7.4bpp");
+const u32 gMapObjectPic_Gentleman_8[] = INCBIN_U32("graphics/map_objects/pics/people/gentleman/8.4bpp");
+const u32 gMapObjectPic_Sailor_0[] = INCBIN_U32("graphics/map_objects/pics/people/sailor/0.4bpp");
+const u32 gMapObjectPic_Sailor_1[] = INCBIN_U32("graphics/map_objects/pics/people/sailor/1.4bpp");
+const u32 gMapObjectPic_Sailor_2[] = INCBIN_U32("graphics/map_objects/pics/people/sailor/2.4bpp");
+const u32 gMapObjectPic_Sailor_3[] = INCBIN_U32("graphics/map_objects/pics/people/sailor/3.4bpp");
+const u32 gMapObjectPic_Sailor_4[] = INCBIN_U32("graphics/map_objects/pics/people/sailor/4.4bpp");
+const u32 gMapObjectPic_Sailor_5[] = INCBIN_U32("graphics/map_objects/pics/people/sailor/5.4bpp");
+const u32 gMapObjectPic_Sailor_6[] = INCBIN_U32("graphics/map_objects/pics/people/sailor/6.4bpp");
+const u32 gMapObjectPic_Sailor_7[] = INCBIN_U32("graphics/map_objects/pics/people/sailor/7.4bpp");
+const u32 gMapObjectPic_Sailor_8[] = INCBIN_U32("graphics/map_objects/pics/people/sailor/8.4bpp");
+const u32 gMapObjectPic_Fisherman_0[] = INCBIN_U32("graphics/map_objects/pics/people/fisherman/0.4bpp");
+const u32 gMapObjectPic_Fisherman_1[] = INCBIN_U32("graphics/map_objects/pics/people/fisherman/1.4bpp");
+const u32 gMapObjectPic_Fisherman_2[] = INCBIN_U32("graphics/map_objects/pics/people/fisherman/2.4bpp");
+const u32 gMapObjectPic_Fisherman_3[] = INCBIN_U32("graphics/map_objects/pics/people/fisherman/3.4bpp");
+const u32 gMapObjectPic_Fisherman_4[] = INCBIN_U32("graphics/map_objects/pics/people/fisherman/4.4bpp");
+const u32 gMapObjectPic_Fisherman_5[] = INCBIN_U32("graphics/map_objects/pics/people/fisherman/5.4bpp");
+const u32 gMapObjectPic_Fisherman_6[] = INCBIN_U32("graphics/map_objects/pics/people/fisherman/6.4bpp");
+const u32 gMapObjectPic_Fisherman_7[] = INCBIN_U32("graphics/map_objects/pics/people/fisherman/7.4bpp");
+const u32 gMapObjectPic_Fisherman_8[] = INCBIN_U32("graphics/map_objects/pics/people/fisherman/8.4bpp");
+const u32 gMapObjectPic_RunningTriathleteM_0[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_m/0.4bpp");
+const u32 gMapObjectPic_RunningTriathleteM_1[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_m/1.4bpp");
+const u32 gMapObjectPic_RunningTriathleteM_2[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_m/2.4bpp");
+const u32 gMapObjectPic_RunningTriathleteM_3[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_m/3.4bpp");
+const u32 gMapObjectPic_RunningTriathleteM_4[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_m/4.4bpp");
+const u32 gMapObjectPic_RunningTriathleteM_5[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_m/5.4bpp");
+const u32 gMapObjectPic_RunningTriathleteM_6[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_m/6.4bpp");
+const u32 gMapObjectPic_RunningTriathleteM_7[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_m/7.4bpp");
+const u32 gMapObjectPic_RunningTriathleteM_8[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_m/8.4bpp");
+const u32 gMapObjectPic_RunningTriathleteF_0[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_f/0.4bpp");
+const u32 gMapObjectPic_RunningTriathleteF_1[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_f/1.4bpp");
+const u32 gMapObjectPic_RunningTriathleteF_2[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_f/2.4bpp");
+const u32 gMapObjectPic_RunningTriathleteF_3[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_f/3.4bpp");
+const u32 gMapObjectPic_RunningTriathleteF_4[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_f/4.4bpp");
+const u32 gMapObjectPic_RunningTriathleteF_5[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_f/5.4bpp");
+const u32 gMapObjectPic_RunningTriathleteF_6[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_f/6.4bpp");
+const u32 gMapObjectPic_RunningTriathleteF_7[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_f/7.4bpp");
+const u32 gMapObjectPic_RunningTriathleteF_8[] = INCBIN_U32("graphics/map_objects/pics/people/running_triathlete_f/8.4bpp");
+const u32 gMapObjectPic_TuberF_0[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_f/0.4bpp");
+const u32 gMapObjectPic_TuberF_1[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_f/1.4bpp");
+const u32 gMapObjectPic_TuberF_2[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_f/2.4bpp");
+const u32 gMapObjectPic_TuberF_3[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_f/3.4bpp");
+const u32 gMapObjectPic_TuberF_4[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_f/4.4bpp");
+const u32 gMapObjectPic_TuberF_5[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_f/5.4bpp");
+const u32 gMapObjectPic_TuberF_6[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_f/6.4bpp");
+const u32 gMapObjectPic_TuberF_7[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_f/7.4bpp");
+const u32 gMapObjectPic_TuberF_8[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_f/8.4bpp");
+const u32 gMapObjectPic_TuberM_0[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m/0.4bpp");
+const u32 gMapObjectPic_TuberM_1[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m/1.4bpp");
+const u32 gMapObjectPic_TuberM_2[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m/2.4bpp");
+const u32 gMapObjectPic_TuberM_3[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m/3.4bpp");
+const u32 gMapObjectPic_TuberM_4[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m/4.4bpp");
+const u32 gMapObjectPic_TuberM_5[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m/5.4bpp");
+const u32 gMapObjectPic_TuberM_6[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m/6.4bpp");
+const u32 gMapObjectPic_TuberM_7[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m/7.4bpp");
+const u32 gMapObjectPic_TuberM_8[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m/8.4bpp");
+const u32 gMapObjectPic_Hiker_0[] = INCBIN_U32("graphics/map_objects/pics/people/hiker/0.4bpp");
+const u32 gMapObjectPic_Hiker_1[] = INCBIN_U32("graphics/map_objects/pics/people/hiker/1.4bpp");
+const u32 gMapObjectPic_Hiker_2[] = INCBIN_U32("graphics/map_objects/pics/people/hiker/2.4bpp");
+const u32 gMapObjectPic_Hiker_3[] = INCBIN_U32("graphics/map_objects/pics/people/hiker/3.4bpp");
+const u32 gMapObjectPic_Hiker_4[] = INCBIN_U32("graphics/map_objects/pics/people/hiker/4.4bpp");
+const u32 gMapObjectPic_Hiker_5[] = INCBIN_U32("graphics/map_objects/pics/people/hiker/5.4bpp");
+const u32 gMapObjectPic_Hiker_6[] = INCBIN_U32("graphics/map_objects/pics/people/hiker/6.4bpp");
+const u32 gMapObjectPic_Hiker_7[] = INCBIN_U32("graphics/map_objects/pics/people/hiker/7.4bpp");
+const u32 gMapObjectPic_Hiker_8[] = INCBIN_U32("graphics/map_objects/pics/people/hiker/8.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteM_0[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_m/0.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteM_1[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_m/1.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteM_2[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_m/2.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteM_3[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_m/3.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteM_4[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_m/4.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteM_5[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_m/5.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteM_6[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_m/6.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteM_7[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_m/7.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteM_8[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_m/8.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteF_0[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_f/0.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteF_1[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_f/1.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteF_2[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_f/2.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteF_3[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_f/3.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteF_4[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_f/4.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteF_5[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_f/5.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteF_6[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_f/6.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteF_7[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_f/7.4bpp");
+const u32 gMapObjectPic_CyclingTriathleteF_8[] = INCBIN_U32("graphics/map_objects/pics/people/cycling_triathlete_f/8.4bpp");
+const u32 gMapObjectPic_Man5_0[] = INCBIN_U32("graphics/map_objects/pics/people/man_5/0.4bpp");
+const u32 gMapObjectPic_Man5_1[] = INCBIN_U32("graphics/map_objects/pics/people/man_5/1.4bpp");
+const u32 gMapObjectPic_Man5_2[] = INCBIN_U32("graphics/map_objects/pics/people/man_5/2.4bpp");
+const u32 gMapObjectPic_Man5_3[] = INCBIN_U32("graphics/map_objects/pics/people/man_5/3.4bpp");
+const u32 gMapObjectPic_Man5_4[] = INCBIN_U32("graphics/map_objects/pics/people/man_5/4.4bpp");
+const u32 gMapObjectPic_Man5_5[] = INCBIN_U32("graphics/map_objects/pics/people/man_5/5.4bpp");
+const u32 gMapObjectPic_Man5_6[] = INCBIN_U32("graphics/map_objects/pics/people/man_5/6.4bpp");
+const u32 gMapObjectPic_Man5_7[] = INCBIN_U32("graphics/map_objects/pics/people/man_5/7.4bpp");
+const u32 gMapObjectPic_Man5_8[] = INCBIN_U32("graphics/map_objects/pics/people/man_5/8.4bpp");
+const u32 gMapObjectPic_Man6_0[] = INCBIN_U32("graphics/map_objects/pics/people/man_6/0.4bpp");
+const u32 gMapObjectPic_Man6_1[] = INCBIN_U32("graphics/map_objects/pics/people/man_6/1.4bpp");
+const u32 gMapObjectPic_Man6_2[] = INCBIN_U32("graphics/map_objects/pics/people/man_6/2.4bpp");
+const u32 gMapObjectPic_Man6_3[] = INCBIN_U32("graphics/map_objects/pics/people/man_6/3.4bpp");
+const u32 gMapObjectPic_Man6_4[] = INCBIN_U32("graphics/map_objects/pics/people/man_6/4.4bpp");
+const u32 gMapObjectPic_Man6_5[] = INCBIN_U32("graphics/map_objects/pics/people/man_6/5.4bpp");
+const u32 gMapObjectPic_Man6_6[] = INCBIN_U32("graphics/map_objects/pics/people/man_6/6.4bpp");
+const u32 gMapObjectPic_Man6_7[] = INCBIN_U32("graphics/map_objects/pics/people/man_6/7.4bpp");
+const u32 gMapObjectPic_Man6_8[] = INCBIN_U32("graphics/map_objects/pics/people/man_6/8.4bpp");
+const u32 gMapObjectPic_Nurse_0[] = INCBIN_U32("graphics/map_objects/pics/people/nurse/0.4bpp");
+const u32 gMapObjectPic_Nurse_1[] = INCBIN_U32("graphics/map_objects/pics/people/nurse/1.4bpp");
+const u32 gMapObjectPic_Nurse_2[] = INCBIN_U32("graphics/map_objects/pics/people/nurse/2.4bpp");
+const u32 gMapObjectPic_Nurse_3[] = INCBIN_U32("graphics/map_objects/pics/people/nurse/3.4bpp");
+const u32 gMapObjectPic_Nurse_4[] = INCBIN_U32("graphics/map_objects/pics/people/nurse/4.4bpp");
+const u32 gMapObjectPic_Nurse_5[] = INCBIN_U32("graphics/map_objects/pics/people/nurse/5.4bpp");
+const u32 gMapObjectPic_Nurse_6[] = INCBIN_U32("graphics/map_objects/pics/people/nurse/6.4bpp");
+const u32 gMapObjectPic_Nurse_7[] = INCBIN_U32("graphics/map_objects/pics/people/nurse/7.4bpp");
+const u32 gMapObjectPic_Nurse_8[] = INCBIN_U32("graphics/map_objects/pics/people/nurse/8.4bpp");
+const u32 gMapObjectPic_Nurse_9[] = INCBIN_U32("graphics/map_objects/pics/people/nurse/9.4bpp");
+const u32 gMapObjectPic_ItemBall[] = INCBIN_U32("graphics/map_objects/pics/misc/item_ball.4bpp");
+const u32 gMapObjectPic_ProfBirch_0[] = INCBIN_U32("graphics/map_objects/pics/people/prof_birch/0.4bpp");
+const u32 gMapObjectPic_ProfBirch_1[] = INCBIN_U32("graphics/map_objects/pics/people/prof_birch/1.4bpp");
+const u32 gMapObjectPic_ProfBirch_2[] = INCBIN_U32("graphics/map_objects/pics/people/prof_birch/2.4bpp");
+const u32 gMapObjectPic_ProfBirch_3[] = INCBIN_U32("graphics/map_objects/pics/people/prof_birch/3.4bpp");
+const u32 gMapObjectPic_ProfBirch_4[] = INCBIN_U32("graphics/map_objects/pics/people/prof_birch/4.4bpp");
+const u32 gMapObjectPic_ProfBirch_5[] = INCBIN_U32("graphics/map_objects/pics/people/prof_birch/5.4bpp");
+const u32 gMapObjectPic_ProfBirch_6[] = INCBIN_U32("graphics/map_objects/pics/people/prof_birch/6.4bpp");
+const u32 gMapObjectPic_ProfBirch_7[] = INCBIN_U32("graphics/map_objects/pics/people/prof_birch/7.4bpp");
+const u32 gMapObjectPic_ProfBirch_8[] = INCBIN_U32("graphics/map_objects/pics/people/prof_birch/8.4bpp");
+const u32 gMapObjectPic_ReporterM_0[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_m/0.4bpp");
+const u32 gMapObjectPic_ReporterM_1[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_m/1.4bpp");
+const u32 gMapObjectPic_ReporterM_2[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_m/2.4bpp");
+const u32 gMapObjectPic_ReporterM_3[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_m/3.4bpp");
+const u32 gMapObjectPic_ReporterM_4[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_m/4.4bpp");
+const u32 gMapObjectPic_ReporterM_5[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_m/5.4bpp");
+const u32 gMapObjectPic_ReporterM_6[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_m/6.4bpp");
+const u32 gMapObjectPic_ReporterM_7[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_m/7.4bpp");
+const u32 gMapObjectPic_ReporterM_8[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_m/8.4bpp");
+const u32 gMapObjectPic_ReporterF_0[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_f/0.4bpp");
+const u32 gMapObjectPic_ReporterF_1[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_f/1.4bpp");
+const u32 gMapObjectPic_ReporterF_2[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_f/2.4bpp");
+const u32 gMapObjectPic_ReporterF_3[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_f/3.4bpp");
+const u32 gMapObjectPic_ReporterF_4[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_f/4.4bpp");
+const u32 gMapObjectPic_ReporterF_5[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_f/5.4bpp");
+const u32 gMapObjectPic_ReporterF_6[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_f/6.4bpp");
+const u32 gMapObjectPic_ReporterF_7[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_f/7.4bpp");
+const u32 gMapObjectPic_ReporterF_8[] = INCBIN_U32("graphics/map_objects/pics/people/reporter_f/8.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan1_0[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_1/0.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan1_1[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_1/1.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan1_2[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_1/2.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan1_3[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_1/3.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan1_4[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_1/4.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan1_5[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_1/5.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan1_6[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_1/6.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan1_7[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_1/7.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan1_8[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_1/8.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan2_0[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_2/0.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan2_1[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_2/1.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan2_2[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_2/2.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan2_3[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_2/3.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan2_4[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_2/4.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan2_5[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_2/5.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan2_6[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_2/6.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan2_7[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_2/7.4bpp");
+const u32 gMapObjectPic_MauvilleOldMan2_8[] = INCBIN_U32("graphics/map_objects/pics/people/mauville_old_man_2/8.4bpp");
+const u32 gMapObjectPic_MartEmployee_0[] = INCBIN_U32("graphics/map_objects/pics/people/mart_employee/0.4bpp");
+const u32 gMapObjectPic_MartEmployee_1[] = INCBIN_U32("graphics/map_objects/pics/people/mart_employee/1.4bpp");
+const u32 gMapObjectPic_MartEmployee_2[] = INCBIN_U32("graphics/map_objects/pics/people/mart_employee/2.4bpp");
+const u32 gMapObjectPic_MartEmployee_3[] = INCBIN_U32("graphics/map_objects/pics/people/mart_employee/3.4bpp");
+const u32 gMapObjectPic_MartEmployee_4[] = INCBIN_U32("graphics/map_objects/pics/people/mart_employee/4.4bpp");
+const u32 gMapObjectPic_MartEmployee_5[] = INCBIN_U32("graphics/map_objects/pics/people/mart_employee/5.4bpp");
+const u32 gMapObjectPic_MartEmployee_6[] = INCBIN_U32("graphics/map_objects/pics/people/mart_employee/6.4bpp");
+const u32 gMapObjectPic_MartEmployee_7[] = INCBIN_U32("graphics/map_objects/pics/people/mart_employee/7.4bpp");
+const u32 gMapObjectPic_MartEmployee_8[] = INCBIN_U32("graphics/map_objects/pics/people/mart_employee/8.4bpp");
+const u32 gMapObjectPic_RooftopSaleWoman_0[] = INCBIN_U32("graphics/map_objects/pics/people/rooftop_sale_woman/0.4bpp");
+const u32 gMapObjectPic_RooftopSaleWoman_1[] = INCBIN_U32("graphics/map_objects/pics/people/rooftop_sale_woman/1.4bpp");
+const u32 gMapObjectPic_RooftopSaleWoman_2[] = INCBIN_U32("graphics/map_objects/pics/people/rooftop_sale_woman/2.4bpp");
+const u32 gMapObjectPic_RooftopSaleWoman_3[] = INCBIN_U32("graphics/map_objects/pics/people/rooftop_sale_woman/3.4bpp");
+const u32 gMapObjectPic_RooftopSaleWoman_4[] = INCBIN_U32("graphics/map_objects/pics/people/rooftop_sale_woman/4.4bpp");
+const u32 gMapObjectPic_RooftopSaleWoman_5[] = INCBIN_U32("graphics/map_objects/pics/people/rooftop_sale_woman/5.4bpp");
+const u32 gMapObjectPic_RooftopSaleWoman_6[] = INCBIN_U32("graphics/map_objects/pics/people/rooftop_sale_woman/6.4bpp");
+const u32 gMapObjectPic_RooftopSaleWoman_7[] = INCBIN_U32("graphics/map_objects/pics/people/rooftop_sale_woman/7.4bpp");
+const u32 gMapObjectPic_RooftopSaleWoman_8[] = INCBIN_U32("graphics/map_objects/pics/people/rooftop_sale_woman/8.4bpp");
+const u32 gMapObjectPic_Teala_0[] = INCBIN_U32("graphics/map_objects/pics/people/teala/0.4bpp");
+const u32 gMapObjectPic_Teala_1[] = INCBIN_U32("graphics/map_objects/pics/people/teala/1.4bpp");
+const u32 gMapObjectPic_Teala_2[] = INCBIN_U32("graphics/map_objects/pics/people/teala/2.4bpp");
+const u32 gMapObjectPic_Teala_3[] = INCBIN_U32("graphics/map_objects/pics/people/teala/3.4bpp");
+const u32 gMapObjectPic_Teala_4[] = INCBIN_U32("graphics/map_objects/pics/people/teala/4.4bpp");
+const u32 gMapObjectPic_Teala_5[] = INCBIN_U32("graphics/map_objects/pics/people/teala/5.4bpp");
+const u32 gMapObjectPic_Teala_6[] = INCBIN_U32("graphics/map_objects/pics/people/teala/6.4bpp");
+const u32 gMapObjectPic_Teala_7[] = INCBIN_U32("graphics/map_objects/pics/people/teala/7.4bpp");
+const u32 gMapObjectPic_Teala_8[] = INCBIN_U32("graphics/map_objects/pics/people/teala/8.4bpp");
+const u32 gMapObjectPic_Artist_0[] = INCBIN_U32("graphics/map_objects/pics/people/artist/0.4bpp");
+const u32 gMapObjectPic_Artist_1[] = INCBIN_U32("graphics/map_objects/pics/people/artist/1.4bpp");
+const u32 gMapObjectPic_Artist_2[] = INCBIN_U32("graphics/map_objects/pics/people/artist/2.4bpp");
+const u32 gMapObjectPic_Artist_3[] = INCBIN_U32("graphics/map_objects/pics/people/artist/3.4bpp");
+const u32 gMapObjectPic_Artist_4[] = INCBIN_U32("graphics/map_objects/pics/people/artist/4.4bpp");
+const u32 gMapObjectPic_Artist_5[] = INCBIN_U32("graphics/map_objects/pics/people/artist/5.4bpp");
+const u32 gMapObjectPic_Artist_6[] = INCBIN_U32("graphics/map_objects/pics/people/artist/6.4bpp");
+const u32 gMapObjectPic_Artist_7[] = INCBIN_U32("graphics/map_objects/pics/people/artist/7.4bpp");
+const u32 gMapObjectPic_Artist_8[] = INCBIN_U32("graphics/map_objects/pics/people/artist/8.4bpp");
+const u32 gMapObjectPic_Cameraman_0[] = INCBIN_U32("graphics/map_objects/pics/people/cameraman/0.4bpp");
+const u32 gMapObjectPic_Cameraman_1[] = INCBIN_U32("graphics/map_objects/pics/people/cameraman/1.4bpp");
+const u32 gMapObjectPic_Cameraman_2[] = INCBIN_U32("graphics/map_objects/pics/people/cameraman/2.4bpp");
+const u32 gMapObjectPic_Cameraman_3[] = INCBIN_U32("graphics/map_objects/pics/people/cameraman/3.4bpp");
+const u32 gMapObjectPic_Cameraman_4[] = INCBIN_U32("graphics/map_objects/pics/people/cameraman/4.4bpp");
+const u32 gMapObjectPic_Cameraman_5[] = INCBIN_U32("graphics/map_objects/pics/people/cameraman/5.4bpp");
+const u32 gMapObjectPic_Cameraman_6[] = INCBIN_U32("graphics/map_objects/pics/people/cameraman/6.4bpp");
+const u32 gMapObjectPic_Cameraman_7[] = INCBIN_U32("graphics/map_objects/pics/people/cameraman/7.4bpp");
+const u32 gMapObjectPic_Cameraman_8[] = INCBIN_U32("graphics/map_objects/pics/people/cameraman/8.4bpp");
+const u32 gMapObjectPic_Scientist2_0[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_2/0.4bpp");
+const u32 gMapObjectPic_Scientist2_1[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_2/1.4bpp");
+const u32 gMapObjectPic_Scientist2_2[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_2/2.4bpp");
+const u32 gMapObjectPic_Scientist2_3[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_2/3.4bpp");
+const u32 gMapObjectPic_Scientist2_4[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_2/4.4bpp");
+const u32 gMapObjectPic_Scientist2_5[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_2/5.4bpp");
+const u32 gMapObjectPic_Scientist2_6[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_2/6.4bpp");
+const u32 gMapObjectPic_Scientist2_7[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_2/7.4bpp");
+const u32 gMapObjectPic_Scientist2_8[] = INCBIN_U32("graphics/map_objects/pics/people/scientist_2/8.4bpp");
+const u32 gMapObjectPic_Man7_0[] = INCBIN_U32("graphics/map_objects/pics/people/man_7/0.4bpp");
+const u32 gMapObjectPic_Man7_1[] = INCBIN_U32("graphics/map_objects/pics/people/man_7/1.4bpp");
+const u32 gMapObjectPic_Man7_2[] = INCBIN_U32("graphics/map_objects/pics/people/man_7/2.4bpp");
+const u32 gMapObjectPic_Man7_3[] = INCBIN_U32("graphics/map_objects/pics/people/man_7/3.4bpp");
+const u32 gMapObjectPic_Man7_4[] = INCBIN_U32("graphics/map_objects/pics/people/man_7/4.4bpp");
+const u32 gMapObjectPic_Man7_5[] = INCBIN_U32("graphics/map_objects/pics/people/man_7/5.4bpp");
+const u32 gMapObjectPic_Man7_6[] = INCBIN_U32("graphics/map_objects/pics/people/man_7/6.4bpp");
+const u32 gMapObjectPic_Man7_7[] = INCBIN_U32("graphics/map_objects/pics/people/man_7/7.4bpp");
+const u32 gMapObjectPic_Man7_8[] = INCBIN_U32("graphics/map_objects/pics/people/man_7/8.4bpp");
+const u32 gMapObjectPic_AquaMemberM_0[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_m/0.4bpp");
+const u32 gMapObjectPic_AquaMemberM_1[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_m/1.4bpp");
+const u32 gMapObjectPic_AquaMemberM_2[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_m/2.4bpp");
+const u32 gMapObjectPic_AquaMemberM_3[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_m/3.4bpp");
+const u32 gMapObjectPic_AquaMemberM_4[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_m/4.4bpp");
+const u32 gMapObjectPic_AquaMemberM_5[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_m/5.4bpp");
+const u32 gMapObjectPic_AquaMemberM_6[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_m/6.4bpp");
+const u32 gMapObjectPic_AquaMemberM_7[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_m/7.4bpp");
+const u32 gMapObjectPic_AquaMemberM_8[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_m/8.4bpp");
+const u32 gMapObjectPic_AquaMemberF_0[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_f/0.4bpp");
+const u32 gMapObjectPic_AquaMemberF_1[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_f/1.4bpp");
+const u32 gMapObjectPic_AquaMemberF_2[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_f/2.4bpp");
+const u32 gMapObjectPic_AquaMemberF_3[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_f/3.4bpp");
+const u32 gMapObjectPic_AquaMemberF_4[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_f/4.4bpp");
+const u32 gMapObjectPic_AquaMemberF_5[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_f/5.4bpp");
+const u32 gMapObjectPic_AquaMemberF_6[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_f/6.4bpp");
+const u32 gMapObjectPic_AquaMemberF_7[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_f/7.4bpp");
+const u32 gMapObjectPic_AquaMemberF_8[] = INCBIN_U32("graphics/map_objects/pics/people/aqua_member_f/8.4bpp");
+const u32 gMapObjectPic_MagmaMemberM_0[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_m/0.4bpp");
+const u32 gMapObjectPic_MagmaMemberM_1[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_m/1.4bpp");
+const u32 gMapObjectPic_MagmaMemberM_2[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_m/2.4bpp");
+const u32 gMapObjectPic_MagmaMemberM_3[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_m/3.4bpp");
+const u32 gMapObjectPic_MagmaMemberM_4[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_m/4.4bpp");
+const u32 gMapObjectPic_MagmaMemberM_5[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_m/5.4bpp");
+const u32 gMapObjectPic_MagmaMemberM_6[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_m/6.4bpp");
+const u32 gMapObjectPic_MagmaMemberM_7[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_m/7.4bpp");
+const u32 gMapObjectPic_MagmaMemberM_8[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_m/8.4bpp");
+const u32 gMapObjectPic_MagmaMemberF_0[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_f/0.4bpp");
+const u32 gMapObjectPic_MagmaMemberF_1[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_f/1.4bpp");
+const u32 gMapObjectPic_MagmaMemberF_2[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_f/2.4bpp");
+const u32 gMapObjectPic_MagmaMemberF_3[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_f/3.4bpp");
+const u32 gMapObjectPic_MagmaMemberF_4[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_f/4.4bpp");
+const u32 gMapObjectPic_MagmaMemberF_5[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_f/5.4bpp");
+const u32 gMapObjectPic_MagmaMemberF_6[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_f/6.4bpp");
+const u32 gMapObjectPic_MagmaMemberF_7[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_f/7.4bpp");
+const u32 gMapObjectPic_MagmaMemberF_8[] = INCBIN_U32("graphics/map_objects/pics/people/magma_member_f/8.4bpp");
+const u32 gMapObjectPic_Sidney_0[] = INCBIN_U32("graphics/map_objects/pics/people/sidney/0.4bpp");
+const u32 gMapObjectPic_Sidney_1[] = INCBIN_U32("graphics/map_objects/pics/people/sidney/1.4bpp");
+const u32 gMapObjectPic_Sidney_2[] = INCBIN_U32("graphics/map_objects/pics/people/sidney/2.4bpp");
+const u32 gMapObjectPic_Phoebe_0[] = INCBIN_U32("graphics/map_objects/pics/people/phoebe/0.4bpp");
+const u32 gMapObjectPic_Phoebe_1[] = INCBIN_U32("graphics/map_objects/pics/people/phoebe/1.4bpp");
+const u32 gMapObjectPic_Phoebe_2[] = INCBIN_U32("graphics/map_objects/pics/people/phoebe/2.4bpp");
+const u32 gMapObjectPic_Glacia_0[] = INCBIN_U32("graphics/map_objects/pics/people/glacia/0.4bpp");
+const u32 gMapObjectPic_Glacia_1[] = INCBIN_U32("graphics/map_objects/pics/people/glacia/1.4bpp");
+const u32 gMapObjectPic_Glacia_2[] = INCBIN_U32("graphics/map_objects/pics/people/glacia/2.4bpp");
+const u32 gMapObjectPic_Drake_0[] = INCBIN_U32("graphics/map_objects/pics/people/drake/0.4bpp");
+const u32 gMapObjectPic_Drake_1[] = INCBIN_U32("graphics/map_objects/pics/people/drake/1.4bpp");
+const u32 gMapObjectPic_Drake_2[] = INCBIN_U32("graphics/map_objects/pics/people/drake/2.4bpp");
+const u32 gMapObjectPic_Roxanne_0[] = INCBIN_U32("graphics/map_objects/pics/people/roxanne/0.4bpp");
+const u32 gMapObjectPic_Roxanne_1[] = INCBIN_U32("graphics/map_objects/pics/people/roxanne/1.4bpp");
+const u32 gMapObjectPic_Roxanne_2[] = INCBIN_U32("graphics/map_objects/pics/people/roxanne/2.4bpp");
+const u32 gMapObjectPic_Brawly_0[] = INCBIN_U32("graphics/map_objects/pics/people/brawly/0.4bpp");
+const u32 gMapObjectPic_Brawly_1[] = INCBIN_U32("graphics/map_objects/pics/people/brawly/1.4bpp");
+const u32 gMapObjectPic_Brawly_2[] = INCBIN_U32("graphics/map_objects/pics/people/brawly/2.4bpp");
+const u32 gMapObjectPic_Wattson_0[] = INCBIN_U32("graphics/map_objects/pics/people/wattson/0.4bpp");
+const u32 gMapObjectPic_Wattson_1[] = INCBIN_U32("graphics/map_objects/pics/people/wattson/1.4bpp");
+const u32 gMapObjectPic_Wattson_2[] = INCBIN_U32("graphics/map_objects/pics/people/wattson/2.4bpp");
+const u32 gMapObjectPic_Flannery_0[] = INCBIN_U32("graphics/map_objects/pics/people/flannery/0.4bpp");
+const u32 gMapObjectPic_Flannery_1[] = INCBIN_U32("graphics/map_objects/pics/people/flannery/1.4bpp");
+const u32 gMapObjectPic_Flannery_2[] = INCBIN_U32("graphics/map_objects/pics/people/flannery/2.4bpp");
+const u32 gMapObjectPic_Norman_0[] = INCBIN_U32("graphics/map_objects/pics/people/norman/0.4bpp");
+const u32 gMapObjectPic_Norman_1[] = INCBIN_U32("graphics/map_objects/pics/people/norman/1.4bpp");
+const u32 gMapObjectPic_Norman_2[] = INCBIN_U32("graphics/map_objects/pics/people/norman/2.4bpp");
+const u32 gMapObjectPic_Norman_3[] = INCBIN_U32("graphics/map_objects/pics/people/norman/3.4bpp");
+const u32 gMapObjectPic_Norman_4[] = INCBIN_U32("graphics/map_objects/pics/people/norman/4.4bpp");
+const u32 gMapObjectPic_Norman_5[] = INCBIN_U32("graphics/map_objects/pics/people/norman/5.4bpp");
+const u32 gMapObjectPic_Norman_6[] = INCBIN_U32("graphics/map_objects/pics/people/norman/6.4bpp");
+const u32 gMapObjectPic_Norman_7[] = INCBIN_U32("graphics/map_objects/pics/people/norman/7.4bpp");
+const u32 gMapObjectPic_Norman_8[] = INCBIN_U32("graphics/map_objects/pics/people/norman/8.4bpp");
+const u32 gMapObjectPic_Winona_0[] = INCBIN_U32("graphics/map_objects/pics/people/winona/0.4bpp");
+const u32 gMapObjectPic_Winona_1[] = INCBIN_U32("graphics/map_objects/pics/people/winona/1.4bpp");
+const u32 gMapObjectPic_Winona_2[] = INCBIN_U32("graphics/map_objects/pics/people/winona/2.4bpp");
+const u32 gMapObjectPic_Liza_0[] = INCBIN_U32("graphics/map_objects/pics/people/liza/0.4bpp");
+const u32 gMapObjectPic_Liza_1[] = INCBIN_U32("graphics/map_objects/pics/people/liza/1.4bpp");
+const u32 gMapObjectPic_Liza_2[] = INCBIN_U32("graphics/map_objects/pics/people/liza/2.4bpp");
+const u32 gMapObjectPic_Tate_0[] = INCBIN_U32("graphics/map_objects/pics/people/tate/0.4bpp");
+const u32 gMapObjectPic_Tate_1[] = INCBIN_U32("graphics/map_objects/pics/people/tate/1.4bpp");
+const u32 gMapObjectPic_Tate_2[] = INCBIN_U32("graphics/map_objects/pics/people/tate/2.4bpp");
+const u32 gMapObjectPic_Wallace_0[] = INCBIN_U32("graphics/map_objects/pics/people/wallace/0.4bpp");
+const u32 gMapObjectPic_Wallace_1[] = INCBIN_U32("graphics/map_objects/pics/people/wallace/1.4bpp");
+const u32 gMapObjectPic_Wallace_2[] = INCBIN_U32("graphics/map_objects/pics/people/wallace/2.4bpp");
+const u32 gMapObjectPic_Wallace_3[] = INCBIN_U32("graphics/map_objects/pics/people/wallace/3.4bpp");
+const u32 gMapObjectPic_Wallace_4[] = INCBIN_U32("graphics/map_objects/pics/people/wallace/4.4bpp");
+const u32 gMapObjectPic_Wallace_5[] = INCBIN_U32("graphics/map_objects/pics/people/wallace/5.4bpp");
+const u32 gMapObjectPic_Wallace_6[] = INCBIN_U32("graphics/map_objects/pics/people/wallace/6.4bpp");
+const u32 gMapObjectPic_Wallace_7[] = INCBIN_U32("graphics/map_objects/pics/people/wallace/7.4bpp");
+const u32 gMapObjectPic_Wallace_8[] = INCBIN_U32("graphics/map_objects/pics/people/wallace/8.4bpp");
+const u32 gMapObjectPic_Steven_0[] = INCBIN_U32("graphics/map_objects/pics/people/steven/0.4bpp");
+const u32 gMapObjectPic_Steven_1[] = INCBIN_U32("graphics/map_objects/pics/people/steven/1.4bpp");
+const u32 gMapObjectPic_Steven_2[] = INCBIN_U32("graphics/map_objects/pics/people/steven/2.4bpp");
+const u32 gMapObjectPic_Steven_3[] = INCBIN_U32("graphics/map_objects/pics/people/steven/3.4bpp");
+const u32 gMapObjectPic_Steven_4[] = INCBIN_U32("graphics/map_objects/pics/people/steven/4.4bpp");
+const u32 gMapObjectPic_Steven_5[] = INCBIN_U32("graphics/map_objects/pics/people/steven/5.4bpp");
+const u32 gMapObjectPic_Steven_6[] = INCBIN_U32("graphics/map_objects/pics/people/steven/6.4bpp");
+const u32 gMapObjectPic_Steven_7[] = INCBIN_U32("graphics/map_objects/pics/people/steven/7.4bpp");
+const u32 gMapObjectPic_Steven_8[] = INCBIN_U32("graphics/map_objects/pics/people/steven/8.4bpp");
+const u32 gMapObjectPic_Wally_0[] = INCBIN_U32("graphics/map_objects/pics/people/wally/0.4bpp");
+const u32 gMapObjectPic_Wally_1[] = INCBIN_U32("graphics/map_objects/pics/people/wally/1.4bpp");
+const u32 gMapObjectPic_Wally_2[] = INCBIN_U32("graphics/map_objects/pics/people/wally/2.4bpp");
+const u32 gMapObjectPic_Wally_3[] = INCBIN_U32("graphics/map_objects/pics/people/wally/3.4bpp");
+const u32 gMapObjectPic_Wally_4[] = INCBIN_U32("graphics/map_objects/pics/people/wally/4.4bpp");
+const u32 gMapObjectPic_Wally_5[] = INCBIN_U32("graphics/map_objects/pics/people/wally/5.4bpp");
+const u32 gMapObjectPic_Wally_6[] = INCBIN_U32("graphics/map_objects/pics/people/wally/6.4bpp");
+const u32 gMapObjectPic_Wally_7[] = INCBIN_U32("graphics/map_objects/pics/people/wally/7.4bpp");
+const u32 gMapObjectPic_Wally_8[] = INCBIN_U32("graphics/map_objects/pics/people/wally/8.4bpp");
+const u32 gMapObjectPic_LittleBoy3_0[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_3/0.4bpp");
+const u32 gMapObjectPic_LittleBoy3_1[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_3/1.4bpp");
+const u32 gMapObjectPic_LittleBoy3_2[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_3/2.4bpp");
+const u32 gMapObjectPic_LittleBoy3_3[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_3/3.4bpp");
+const u32 gMapObjectPic_LittleBoy3_4[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_3/4.4bpp");
+const u32 gMapObjectPic_LittleBoy3_5[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_3/5.4bpp");
+const u32 gMapObjectPic_LittleBoy3_6[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_3/6.4bpp");
+const u32 gMapObjectPic_LittleBoy3_7[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_3/7.4bpp");
+const u32 gMapObjectPic_LittleBoy3_8[] = INCBIN_U32("graphics/map_objects/pics/people/little_boy_3/8.4bpp");
+const u32 gMapObjectPic_HotSpringsOldWoman_0[] = INCBIN_U32("graphics/map_objects/pics/people/hot_springs_old_woman/0.4bpp");
+const u32 gMapObjectPic_HotSpringsOldWoman_1[] = INCBIN_U32("graphics/map_objects/pics/people/hot_springs_old_woman/1.4bpp");
+const u32 gMapObjectPic_HotSpringsOldWoman_2[] = INCBIN_U32("graphics/map_objects/pics/people/hot_springs_old_woman/2.4bpp");
+const u32 gMapObjectPic_HotSpringsOldWoman_3[] = INCBIN_U32("graphics/map_objects/pics/people/hot_springs_old_woman/3.4bpp");
+const u32 gMapObjectPic_HotSpringsOldWoman_4[] = INCBIN_U32("graphics/map_objects/pics/people/hot_springs_old_woman/4.4bpp");
+const u32 gMapObjectPic_HotSpringsOldWoman_5[] = INCBIN_U32("graphics/map_objects/pics/people/hot_springs_old_woman/5.4bpp");
+const u32 gMapObjectPic_HotSpringsOldWoman_6[] = INCBIN_U32("graphics/map_objects/pics/people/hot_springs_old_woman/6.4bpp");
+const u32 gMapObjectPic_HotSpringsOldWoman_7[] = INCBIN_U32("graphics/map_objects/pics/people/hot_springs_old_woman/7.4bpp");
+const u32 gMapObjectPic_HotSpringsOldWoman_8[] = INCBIN_U32("graphics/map_objects/pics/people/hot_springs_old_woman/8.4bpp");
+const u32 gMapObjectPic_LatiasLatios_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/latias_latios/0.4bpp");
+const u32 gMapObjectPic_LatiasLatios_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/latias_latios/1.4bpp");
+const u32 gMapObjectPic_LatiasLatios_2[] = INCBIN_U32("graphics/map_objects/pics/pokemon/latias_latios/2.4bpp");
+const u32 gMapObjectPic_Boy5_0[] = INCBIN_U32("graphics/map_objects/pics/people/boy_5/0.4bpp");
+const u32 gMapObjectPic_Boy5_1[] = INCBIN_U32("graphics/map_objects/pics/people/boy_5/1.4bpp");
+const u32 gMapObjectPic_Boy5_2[] = INCBIN_U32("graphics/map_objects/pics/people/boy_5/2.4bpp");
+const u32 gMapObjectPic_ContestJudge_0[] = INCBIN_U32("graphics/map_objects/pics/people/contest_judge/0.4bpp");
+const u32 gMapObjectPic_ContestJudge_1[] = INCBIN_U32("graphics/map_objects/pics/people/contest_judge/1.4bpp");
+const u32 gMapObjectPic_ContestJudge_2[] = INCBIN_U32("graphics/map_objects/pics/people/contest_judge/2.4bpp");
+const u32 gMapObjectPic_ContestJudge_3[] = INCBIN_U32("graphics/map_objects/pics/people/contest_judge/3.4bpp");
+const u32 gMapObjectPic_ContestJudge_4[] = INCBIN_U32("graphics/map_objects/pics/people/contest_judge/4.4bpp");
+const u32 gMapObjectPic_ContestJudge_5[] = INCBIN_U32("graphics/map_objects/pics/people/contest_judge/5.4bpp");
+const u32 gMapObjectPic_ContestJudge_6[] = INCBIN_U32("graphics/map_objects/pics/people/contest_judge/6.4bpp");
+const u32 gMapObjectPic_ContestJudge_7[] = INCBIN_U32("graphics/map_objects/pics/people/contest_judge/7.4bpp");
+const u32 gMapObjectPic_ContestJudge_8[] = INCBIN_U32("graphics/map_objects/pics/people/contest_judge/8.4bpp");
+const u32 gMapObjectPic_Archie_0[] = INCBIN_U32("graphics/map_objects/pics/people/archie/0.4bpp");
+const u32 gMapObjectPic_Archie_1[] = INCBIN_U32("graphics/map_objects/pics/people/archie/1.4bpp");
+const u32 gMapObjectPic_Archie_2[] = INCBIN_U32("graphics/map_objects/pics/people/archie/2.4bpp");
+const u32 gMapObjectPic_Archie_3[] = INCBIN_U32("graphics/map_objects/pics/people/archie/3.4bpp");
+const u32 gMapObjectPic_Archie_4[] = INCBIN_U32("graphics/map_objects/pics/people/archie/4.4bpp");
+const u32 gMapObjectPic_Archie_5[] = INCBIN_U32("graphics/map_objects/pics/people/archie/5.4bpp");
+const u32 gMapObjectPic_Archie_6[] = INCBIN_U32("graphics/map_objects/pics/people/archie/6.4bpp");
+const u32 gMapObjectPic_Archie_7[] = INCBIN_U32("graphics/map_objects/pics/people/archie/7.4bpp");
+const u32 gMapObjectPic_Archie_8[] = INCBIN_U32("graphics/map_objects/pics/people/archie/8.4bpp");
+const u32 gMapObjectPic_Maxie_0[] = INCBIN_U32("graphics/map_objects/pics/people/maxie/0.4bpp");
+const u32 gMapObjectPic_Maxie_1[] = INCBIN_U32("graphics/map_objects/pics/people/maxie/1.4bpp");
+const u32 gMapObjectPic_Maxie_2[] = INCBIN_U32("graphics/map_objects/pics/people/maxie/2.4bpp");
+const u32 gMapObjectPic_Maxie_3[] = INCBIN_U32("graphics/map_objects/pics/people/maxie/3.4bpp");
+const u32 gMapObjectPic_Maxie_4[] = INCBIN_U32("graphics/map_objects/pics/people/maxie/4.4bpp");
+const u32 gMapObjectPic_Maxie_5[] = INCBIN_U32("graphics/map_objects/pics/people/maxie/5.4bpp");
+const u32 gMapObjectPic_Maxie_6[] = INCBIN_U32("graphics/map_objects/pics/people/maxie/6.4bpp");
+const u32 gMapObjectPic_Maxie_7[] = INCBIN_U32("graphics/map_objects/pics/people/maxie/7.4bpp");
+const u32 gMapObjectPic_Maxie_8[] = INCBIN_U32("graphics/map_objects/pics/people/maxie/8.4bpp");
+const u32 gMapObjectPic_Kyogre_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/kyogre/0.4bpp");
+const u32 gMapObjectPic_Kyogre_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/kyogre/1.4bpp");
+const u32 gMapObjectPic_Groudon_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/groudon/0.4bpp");
+const u32 gMapObjectPic_Groudon_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/groudon/1.4bpp");
+const u32 gMapObjectPic_Regi[] = INCBIN_U32("graphics/map_objects/pics/pokemon/regi.4bpp");
+const u32 gMapObjectPic_Skitty_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/skitty/0.4bpp");
+const u32 gMapObjectPic_Skitty_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/skitty/1.4bpp");
+const u32 gMapObjectPic_Skitty_2[] = INCBIN_U32("graphics/map_objects/pics/pokemon/skitty/2.4bpp");
+const u32 gMapObjectPic_Kecleon_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/kecleon/0.4bpp");
+const u32 gMapObjectPic_Kecleon_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/kecleon/1.4bpp");
+const u32 gMapObjectPic_Kecleon_2[] = INCBIN_U32("graphics/map_objects/pics/pokemon/kecleon/2.4bpp");
+const u32 gMapObjectPic_Rayquaza_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/rayquaza/0.4bpp");
+const u32 gMapObjectPic_Rayquaza_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/rayquaza/1.4bpp");
+const u32 gMapObjectPic_Zigzagoon_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/zigzagoon/0.4bpp");
+const u32 gMapObjectPic_Zigzagoon_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/zigzagoon/1.4bpp");
+const u32 gMapObjectPic_Zigzagoon_2[] = INCBIN_U32("graphics/map_objects/pics/pokemon/zigzagoon/2.4bpp");
+const u32 gMapObjectPic_Pikachu_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/pikachu/0.4bpp");
+const u32 gMapObjectPic_Pikachu_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/pikachu/1.4bpp");
+const u32 gMapObjectPic_Pikachu_2[] = INCBIN_U32("graphics/map_objects/pics/pokemon/pikachu/2.4bpp");
+const u32 gMapObjectPic_Azumarill_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/azumarill/0.4bpp");
+const u32 gMapObjectPic_Azumarill_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/azumarill/1.4bpp");
+const u32 gMapObjectPic_Azumarill_2[] = INCBIN_U32("graphics/map_objects/pics/pokemon/azumarill/2.4bpp");
+const u32 gMapObjectPic_Wingull_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/wingull/0.4bpp");
+const u32 gMapObjectPic_Wingull_3[] = INCBIN_U32("graphics/map_objects/pics/pokemon/wingull/3.4bpp");
+const u32 gMapObjectPic_Wingull_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/wingull/1.4bpp");
+const u32 gMapObjectPic_Wingull_4[] = INCBIN_U32("graphics/map_objects/pics/pokemon/wingull/4.4bpp");
+const u32 gMapObjectPic_Wingull_2[] = INCBIN_U32("graphics/map_objects/pics/pokemon/wingull/2.4bpp");
+const u32 gMapObjectPic_Wingull_5[] = INCBIN_U32("graphics/map_objects/pics/pokemon/wingull/5.4bpp");
+const u32 gMapObjectPic_TuberMSwimming_0[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m_swimming/0.4bpp");
+const u32 gMapObjectPic_TuberMSwimming_1[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m_swimming/1.4bpp");
+const u32 gMapObjectPic_TuberMSwimming_2[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m_swimming/2.4bpp");
+const u32 gMapObjectPic_TuberMSwimming_3[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m_swimming/3.4bpp");
+const u32 gMapObjectPic_TuberMSwimming_4[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m_swimming/4.4bpp");
+const u32 gMapObjectPic_TuberMSwimming_5[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m_swimming/5.4bpp");
+const u32 gMapObjectPic_TuberMSwimming_6[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m_swimming/6.4bpp");
+const u32 gMapObjectPic_TuberMSwimming_7[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m_swimming/7.4bpp");
+const u32 gMapObjectPic_TuberMSwimming_8[] = INCBIN_U32("graphics/map_objects/pics/people/tuber_m_swimming/8.4bpp");
+const u32 gMapObjectPic_Azurill_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/azurill/0.4bpp");
+const u32 gMapObjectPic_Azurill_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/azurill/1.4bpp");
+const u32 gMapObjectPic_Azurill_2[] = INCBIN_U32("graphics/map_objects/pics/pokemon/azurill/2.4bpp");
+const u32 gMapObjectPic_Mom_0[] = INCBIN_U32("graphics/map_objects/pics/people/mom/0.4bpp");
+const u32 gMapObjectPic_Mom_1[] = INCBIN_U32("graphics/map_objects/pics/people/mom/1.4bpp");
+const u32 gMapObjectPic_Mom_2[] = INCBIN_U32("graphics/map_objects/pics/people/mom/2.4bpp");
+const u32 gMapObjectPic_Mom_3[] = INCBIN_U32("graphics/map_objects/pics/people/mom/3.4bpp");
+const u32 gMapObjectPic_Mom_4[] = INCBIN_U32("graphics/map_objects/pics/people/mom/4.4bpp");
+const u32 gMapObjectPic_Mom_5[] = INCBIN_U32("graphics/map_objects/pics/people/mom/5.4bpp");
+const u32 gMapObjectPic_Mom_6[] = INCBIN_U32("graphics/map_objects/pics/people/mom/6.4bpp");
+const u32 gMapObjectPic_Mom_7[] = INCBIN_U32("graphics/map_objects/pics/people/mom/7.4bpp");
+const u32 gMapObjectPic_Mom_8[] = INCBIN_U32("graphics/map_objects/pics/people/mom/8.4bpp");
+const u16 gMapObjectPalette22[] = INCBIN_U16("graphics/map_objects/palettes/22.gbapal");
+const u16 gMapObjectPalette23[] = INCBIN_U16("graphics/map_objects/palettes/23.gbapal");
+const u16 gMapObjectPalette24[] = INCBIN_U16("graphics/map_objects/palettes/24.gbapal");
+const u16 gMapObjectPalette25[] = INCBIN_U16("graphics/map_objects/palettes/25.gbapal");
+const u32 gMapObjectPic_UnusedNatuDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/unused_natu_doll.4bpp");
+const u32 gMapObjectPic_UnusedMagnemiteDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/unused_magnemite_doll.4bpp");
+const u32 gMapObjectPic_UnusedSquirtleDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/unused_squirtle_doll.4bpp");
+const u32 gMapObjectPic_UnusedWooperDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/unused_wooper_doll.4bpp");
+const u32 gMapObjectPic_UnusedPikachuDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/unused_pikachu_doll.4bpp");
+const u32 gMapObjectPic_UnusedPorygon2Doll[] = INCBIN_U32("graphics/map_objects/pics/dolls/unused_porygon2_doll.4bpp");
+const u32 gMapObjectPic_PichuDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/pichu_doll.4bpp");
+const u32 gMapObjectPic_PikachuDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/pikachu_doll.4bpp");
+const u32 gMapObjectPic_MarillDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/marill_doll.4bpp");
+const u32 gMapObjectPic_TogepiDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/togepi_doll.4bpp");
+const u32 gMapObjectPic_CyndaquilDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/cyndaquil_doll.4bpp");
+const u32 gMapObjectPic_ChikoritaDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/chikorita_doll.4bpp");
+const u32 gMapObjectPic_TotodileDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/totodile_doll.4bpp");
+const u32 gMapObjectPic_JigglypuffDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/jigglypuff_doll.4bpp");
+const u32 gMapObjectPic_MeowthDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/meowth_doll.4bpp");
+const u32 gMapObjectPic_ClefairyDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/clefairy_doll.4bpp");
+const u32 gMapObjectPic_DittoDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/ditto_doll.4bpp");
+const u32 gMapObjectPic_SmoochumDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/smoochum_doll.4bpp");
+const u32 gMapObjectPic_TreeckoDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/treecko_doll.4bpp");
+const u32 gMapObjectPic_TorchicDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/torchic_doll.4bpp");
+const u32 gMapObjectPic_MudkipDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/mudkip_doll.4bpp");
+const u32 gMapObjectPic_DuskullDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/duskull_doll.4bpp");
+const u32 gMapObjectPic_WynautDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/wynaut_doll.4bpp");
+const u32 gMapObjectPic_BaltoyDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/baltoy_doll.4bpp");
+const u32 gMapObjectPic_KecleonDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/kecleon_doll.4bpp");
+const u32 gMapObjectPic_AzurillDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/azurill_doll.4bpp");
+const u32 gMapObjectPic_SkittyDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/skitty_doll.4bpp");
+const u32 gMapObjectPic_SwabluDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/swablu_doll.4bpp");
+const u32 gMapObjectPic_GulpinDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/gulpin_doll.4bpp");
+const u32 gMapObjectPic_LotadDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/lotad_doll.4bpp");
+const u32 gMapObjectPic_SeedotDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/seedot_doll.4bpp");
+const u32 gMapObjectPic_PikaCushion[] = INCBIN_U32("graphics/map_objects/pics/cushions/pika_cushion.4bpp");
+const u32 gMapObjectPic_RoundCushion[] = INCBIN_U32("graphics/map_objects/pics/cushions/round_cushion.4bpp");
+const u32 gMapObjectPic_KissCushion[] = INCBIN_U32("graphics/map_objects/pics/cushions/kiss_cushion.4bpp");
+const u32 gMapObjectPic_ZigzagCushion[] = INCBIN_U32("graphics/map_objects/pics/cushions/zigzag_cushion.4bpp");
+const u32 gMapObjectPic_SpinCushion[] = INCBIN_U32("graphics/map_objects/pics/cushions/spin_cushion.4bpp");
+const u32 gMapObjectPic_DiamondCushion[] = INCBIN_U32("graphics/map_objects/pics/cushions/diamond_cushion.4bpp");
+const u32 gMapObjectPic_BallCushion[] = INCBIN_U32("graphics/map_objects/pics/cushions/ball_cushion.4bpp");
+const u32 gMapObjectPic_GrassCushion[] = INCBIN_U32("graphics/map_objects/pics/cushions/grass_cushion.4bpp");
+const u32 gMapObjectPic_FireCushion[] = INCBIN_U32("graphics/map_objects/pics/cushions/fire_cushion.4bpp");
+const u32 gMapObjectPic_WaterCushion[] = INCBIN_U32("graphics/map_objects/pics/cushions/water_cushion.4bpp");
+const u32 gMapObjectPic_BigSnorlaxDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/big_snorlax_doll.4bpp");
+const u32 gMapObjectPic_BigRhydonDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/big_rhydon_doll.4bpp");
+const u32 gMapObjectPic_BigLaprasDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/big_lapras_doll.4bpp");
+const u32 gMapObjectPic_BigVenusaurDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/big_venusaur_doll.4bpp");
+const u32 gMapObjectPic_BigCharizardDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/big_charizard_doll.4bpp");
+const u32 gMapObjectPic_BigBlastoiseDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/big_blastoise_doll.4bpp");
+const u32 gMapObjectPic_BigWailmerDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/big_wailmer_doll.4bpp");
+const u32 gMapObjectPic_BigRegirockDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/big_regirock_doll.4bpp");
+const u32 gMapObjectPic_BigRegiceDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/big_regice_doll.4bpp");
+const u32 gMapObjectPic_BigRegisteelDoll[] = INCBIN_U32("graphics/map_objects/pics/dolls/big_registeel_doll.4bpp");
+const u32 gMapObjectPic_CuttableTree_0[] = INCBIN_U32("graphics/map_objects/pics/misc/cuttable_tree/0.4bpp");
+const u32 gMapObjectPic_CuttableTree_1[] = INCBIN_U32("graphics/map_objects/pics/misc/cuttable_tree/1.4bpp");
+const u32 gMapObjectPic_CuttableTree_2[] = INCBIN_U32("graphics/map_objects/pics/misc/cuttable_tree/2.4bpp");
+const u32 gMapObjectPic_CuttableTree_3[] = INCBIN_U32("graphics/map_objects/pics/misc/cuttable_tree/3.4bpp");
+const u32 gMapObjectPic_BreakableRock_0[] = INCBIN_U32("graphics/map_objects/pics/misc/breakable_rock/0.4bpp");
+const u32 gMapObjectPic_BreakableRock_1[] = INCBIN_U32("graphics/map_objects/pics/misc/breakable_rock/1.4bpp");
+const u32 gMapObjectPic_BreakableRock_2[] = INCBIN_U32("graphics/map_objects/pics/misc/breakable_rock/2.4bpp");
+const u32 gMapObjectPic_BreakableRock_3[] = INCBIN_U32("graphics/map_objects/pics/misc/breakable_rock/3.4bpp");
+const u32 gMapObjectPic_PushableBoulder[] = INCBIN_U32("graphics/map_objects/pics/misc/pushable_boulder.4bpp");
+const u32 gMapObjectPic_MrBrineysBoat_0[] = INCBIN_U32("graphics/map_objects/pics/misc/mr_brineys_boat/0.4bpp");
+const u32 gMapObjectPic_MrBrineysBoat_1[] = INCBIN_U32("graphics/map_objects/pics/misc/mr_brineys_boat/1.4bpp");
+const u32 gMapObjectPic_MrBrineysBoat_2[] = INCBIN_U32("graphics/map_objects/pics/misc/mr_brineys_boat/2.4bpp");
+const u32 gMapObjectPic_Fossil[] = INCBIN_U32("graphics/map_objects/pics/misc/fossil.4bpp");
+const u32 gMapObjectPic_SubmarineShadow[] = INCBIN_U32("graphics/map_objects/pics/misc/submarine_shadow.4bpp");
+const u16 gMapObjectPalette26[] = INCBIN_U16("graphics/map_objects/palettes/26.gbapal");
+const u32 gMapObjectPic_Truck[] = INCBIN_U32("graphics/map_objects/pics/misc/truck.4bpp");
+const u16 gMapObjectPalette14[] = INCBIN_U16("graphics/map_objects/palettes/14.gbapal");
+const u32 gMapObjectPic_MachokeCarryingBox_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/machoke_carrying_box/0.4bpp");
+const u32 gMapObjectPic_MachokeCarryingBox_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/machoke_carrying_box/1.4bpp");
+const u32 gMapObjectPic_MachokeCarryingBox_2[] = INCBIN_U32("graphics/map_objects/pics/pokemon/machoke_carrying_box/2.4bpp");
+const u32 gMapObjectPic_MachokeFacingAway_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/machoke_facing_away/0.4bpp");
+const u32 gMapObjectPic_MachokeFacingAway_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/machoke_facing_away/1.4bpp");
+const u16 gMapObjectPalette15[] = INCBIN_U16("graphics/map_objects/palettes/15.gbapal");
+const u32 gMapObjectPic_BirchsBag[] = INCBIN_U32("graphics/map_objects/pics/misc/birchs_bag.4bpp");
+const u32 gMapObjectPic_Poochyena_0[] = INCBIN_U32("graphics/map_objects/pics/pokemon/poochyena/0.4bpp");
+const u32 gMapObjectPic_Poochyena_1[] = INCBIN_U32("graphics/map_objects/pics/pokemon/poochyena/1.4bpp");
+const u32 gMapObjectPic_Poochyena_2[] = INCBIN_U32("graphics/map_objects/pics/pokemon/poochyena/2.4bpp");
+const u32 gMapObjectPic_Poochyena_3[] = INCBIN_U32("graphics/map_objects/pics/pokemon/poochyena/3.4bpp");
+const u32 gMapObjectPic_Poochyena_4[] = INCBIN_U32("graphics/map_objects/pics/pokemon/poochyena/4.4bpp");
+const u32 gMapObjectPic_Poochyena_5[] = INCBIN_U32("graphics/map_objects/pics/pokemon/poochyena/5.4bpp");
+const u32 gMapObjectPic_Poochyena_6[] = INCBIN_U32("graphics/map_objects/pics/pokemon/poochyena/6.4bpp");
+const u32 gMapObjectPic_Poochyena_7[] = INCBIN_U32("graphics/map_objects/pics/pokemon/poochyena/7.4bpp");
+const u32 gMapObjectPic_Poochyena_8[] = INCBIN_U32("graphics/map_objects/pics/pokemon/poochyena/8.4bpp");
+const u16 gMapObjectPalette16[] = INCBIN_U16("graphics/map_objects/palettes/16.gbapal");
+const u32 gMapObjectPic_CableCar[] = INCBIN_U32("graphics/map_objects/pics/misc/cable_car.4bpp");
+const u16 gMapObjectPalette20[] = INCBIN_U16("graphics/map_objects/palettes/20.gbapal");
+const u32 gMapObjectPic_SSTidal[] = INCBIN_U32("graphics/map_objects/pics/misc/ss_tidal.4bpp");
+const u16 gMapObjectPalette21[] = INCBIN_U16("graphics/map_objects/palettes/21.gbapal");
+const u32 gFieldEffectPic_BerryTreeGrowthSparkle_0[] = INCBIN_U32("graphics/field_effect_objects/pics/berry_tree_growth_sparkle/0.4bpp");
+const u32 gFieldEffectPic_BerryTreeGrowthSparkle_1[] = INCBIN_U32("graphics/field_effect_objects/pics/berry_tree_growth_sparkle/1.4bpp");
+const u32 gFieldEffectPic_BerryTreeGrowthSparkle_2[] = INCBIN_U32("graphics/field_effect_objects/pics/berry_tree_growth_sparkle/2.4bpp");
+const u32 gFieldEffectPic_BerryTreeGrowthSparkle_3[] = INCBIN_U32("graphics/field_effect_objects/pics/berry_tree_growth_sparkle/3.4bpp");
+const u32 gFieldEffectPic_BerryTreeGrowthSparkle_4[] = INCBIN_U32("graphics/field_effect_objects/pics/berry_tree_growth_sparkle/4.4bpp");
+const u32 gFieldEffectPic_BerryTreeGrowthSparkle_5[] = INCBIN_U32("graphics/field_effect_objects/pics/berry_tree_growth_sparkle/5.4bpp");
+const u32 gMapObjectPic_BerryTreeDirtPile[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/dirt_pile.4bpp");
+const u32 gMapObjectPic_BerryTreeSprout_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/sprout/0.4bpp");
+const u32 gMapObjectPic_BerryTreeSprout_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/sprout/1.4bpp");
+const u32 gMapObjectPic_PechaBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pecha/0.4bpp");
+const u32 gMapObjectPic_PechaBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pecha/1.4bpp");
+const u32 gMapObjectPic_PechaBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pecha/2.4bpp");
+const u32 gMapObjectPic_PechaBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pecha/3.4bpp");
+const u32 gMapObjectPic_PechaBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pecha/4.4bpp");
+const u32 gMapObjectPic_PechaBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pecha/5.4bpp");
+const u32 gMapObjectPic_KelpsyBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/kelpsy/0.4bpp");
+const u32 gMapObjectPic_KelpsyBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/kelpsy/1.4bpp");
+const u32 gMapObjectPic_KelpsyBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/kelpsy/2.4bpp");
+const u32 gMapObjectPic_KelpsyBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/kelpsy/3.4bpp");
+const u32 gMapObjectPic_KelpsyBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/kelpsy/4.4bpp");
+const u32 gMapObjectPic_KelpsyBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/kelpsy/5.4bpp");
+const u32 gMapObjectPic_WepearBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wepear/0.4bpp");
+const u32 gMapObjectPic_WepearBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wepear/1.4bpp");
+const u32 gMapObjectPic_WepearBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wepear/2.4bpp");
+const u32 gMapObjectPic_WepearBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wepear/3.4bpp");
+const u32 gMapObjectPic_WepearBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wepear/4.4bpp");
+const u32 gMapObjectPic_WepearBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wepear/5.4bpp");
+const u32 gMapObjectPic_IapapaBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/iapapa/0.4bpp");
+const u32 gMapObjectPic_IapapaBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/iapapa/1.4bpp");
+const u32 gMapObjectPic_IapapaBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/iapapa/2.4bpp");
+const u32 gMapObjectPic_IapapaBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/iapapa/3.4bpp");
+const u32 gMapObjectPic_IapapaBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/iapapa/4.4bpp");
+const u32 gMapObjectPic_IapapaBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/iapapa/5.4bpp");
+const u32 gMapObjectPic_CheriBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cheri/0.4bpp");
+const u32 gMapObjectPic_CheriBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cheri/1.4bpp");
+const u32 gMapObjectPic_CheriBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cheri/2.4bpp");
+const u32 gMapObjectPic_CheriBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cheri/3.4bpp");
+const u32 gMapObjectPic_CheriBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cheri/4.4bpp");
+const u32 gMapObjectPic_CheriBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cheri/5.4bpp");
+const u32 gMapObjectPic_FigyBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/figy/0.4bpp");
+const u32 gMapObjectPic_FigyBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/figy/1.4bpp");
+const u32 gMapObjectPic_FigyBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/figy/2.4bpp");
+const u32 gMapObjectPic_FigyBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/figy/3.4bpp");
+const u32 gMapObjectPic_FigyBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/figy/4.4bpp");
+const u32 gMapObjectPic_FigyBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/figy/5.4bpp");
+const u32 gMapObjectPic_MagoBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/mago/0.4bpp");
+const u32 gMapObjectPic_MagoBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/mago/1.4bpp");
+const u32 gMapObjectPic_MagoBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/mago/2.4bpp");
+const u32 gMapObjectPic_MagoBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/mago/3.4bpp");
+const u32 gMapObjectPic_MagoBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/mago/4.4bpp");
+const u32 gMapObjectPic_MagoBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/mago/5.4bpp");
+const u32 gMapObjectPic_LumBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lum/0.4bpp");
+const u32 gMapObjectPic_LumBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lum/1.4bpp");
+const u32 gMapObjectPic_LumBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lum/2.4bpp");
+const u32 gMapObjectPic_LumBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lum/3.4bpp");
+const u32 gMapObjectPic_LumBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lum/4.4bpp");
+const u32 gMapObjectPic_LumBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lum/5.4bpp");
+const u32 gMapObjectPic_RazzBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/razz/0.4bpp");
+const u32 gMapObjectPic_RazzBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/razz/1.4bpp");
+const u32 gMapObjectPic_RazzBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/razz/2.4bpp");
+const u32 gMapObjectPic_RazzBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/razz/3.4bpp");
+const u32 gMapObjectPic_RazzBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/razz/4.4bpp");
+const u32 gMapObjectPic_RazzBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/razz/5.4bpp");
+const u32 gMapObjectPic_GrepaBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/grepa/0.4bpp");
+const u32 gMapObjectPic_GrepaBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/grepa/1.4bpp");
+const u32 gMapObjectPic_GrepaBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/grepa/2.4bpp");
+const u32 gMapObjectPic_GrepaBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/grepa/3.4bpp");
+const u32 gMapObjectPic_GrepaBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/grepa/4.4bpp");
+const u32 gMapObjectPic_GrepaBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/grepa/5.4bpp");
+const u32 gMapObjectPic_RabutaBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rabuta/0.4bpp");
+const u32 gMapObjectPic_RabutaBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rabuta/1.4bpp");
+const u32 gMapObjectPic_RabutaBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rabuta/2.4bpp");
+const u32 gMapObjectPic_RabutaBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rabuta/3.4bpp");
+const u32 gMapObjectPic_RabutaBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rabuta/4.4bpp");
+const u32 gMapObjectPic_RabutaBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rabuta/5.4bpp");
+const u32 gMapObjectPic_NomelBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/nomel/0.4bpp");
+const u32 gMapObjectPic_NomelBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/nomel/1.4bpp");
+const u32 gMapObjectPic_NomelBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/nomel/2.4bpp");
+const u32 gMapObjectPic_NomelBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/nomel/3.4bpp");
+const u32 gMapObjectPic_NomelBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/nomel/4.4bpp");
+const u32 gMapObjectPic_NomelBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/nomel/5.4bpp");
+const u32 gMapObjectPic_LeppaBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/leppa/0.4bpp");
+const u32 gMapObjectPic_LeppaBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/leppa/1.4bpp");
+const u32 gMapObjectPic_LeppaBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/leppa/2.4bpp");
+const u32 gMapObjectPic_LeppaBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/leppa/3.4bpp");
+const u32 gMapObjectPic_LeppaBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/leppa/4.4bpp");
+const u32 gMapObjectPic_LeppaBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/leppa/5.4bpp");
+const u32 gMapObjectPic_LiechiBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/liechi/0.4bpp");
+const u32 gMapObjectPic_LiechiBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/liechi/1.4bpp");
+const u32 gMapObjectPic_LiechiBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/liechi/2.4bpp");
+const u32 gMapObjectPic_LiechiBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/liechi/3.4bpp");
+const u32 gMapObjectPic_LiechiBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/liechi/4.4bpp");
+const u32 gMapObjectPic_LiechiBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/liechi/5.4bpp");
+const u32 gMapObjectPic_HondewBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/hondew/0.4bpp");
+const u32 gMapObjectPic_HondewBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/hondew/1.4bpp");
+const u32 gMapObjectPic_HondewBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/hondew/2.4bpp");
+const u32 gMapObjectPic_HondewBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/hondew/3.4bpp");
+const u32 gMapObjectPic_HondewBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/hondew/4.4bpp");
+const u32 gMapObjectPic_HondewBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/hondew/5.4bpp");
+const u32 gMapObjectPic_AguavBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aguav/0.4bpp");
+const u32 gMapObjectPic_AguavBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aguav/1.4bpp");
+const u32 gMapObjectPic_AguavBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aguav/2.4bpp");
+const u32 gMapObjectPic_AguavBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aguav/3.4bpp");
+const u32 gMapObjectPic_AguavBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aguav/4.4bpp");
+const u32 gMapObjectPic_AguavBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aguav/5.4bpp");
+const u32 gMapObjectPic_WikiBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wiki/0.4bpp");
+const u32 gMapObjectPic_WikiBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wiki/1.4bpp");
+const u32 gMapObjectPic_WikiBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wiki/2.4bpp");
+const u32 gMapObjectPic_WikiBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wiki/3.4bpp");
+const u32 gMapObjectPic_WikiBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wiki/4.4bpp");
+const u32 gMapObjectPic_WikiBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/wiki/5.4bpp");
+const u32 gMapObjectPic_PomegBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pomeg/0.4bpp");
+const u32 gMapObjectPic_PomegBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pomeg/1.4bpp");
+const u32 gMapObjectPic_PomegBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pomeg/2.4bpp");
+const u32 gMapObjectPic_PomegBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pomeg/3.4bpp");
+const u32 gMapObjectPic_PomegBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pomeg/4.4bpp");
+const u32 gMapObjectPic_PomegBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pomeg/5.4bpp");
+const u32 gMapObjectPic_RawstBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rawst/0.4bpp");
+const u32 gMapObjectPic_RawstBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rawst/1.4bpp");
+const u32 gMapObjectPic_RawstBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rawst/2.4bpp");
+const u32 gMapObjectPic_RawstBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rawst/3.4bpp");
+const u32 gMapObjectPic_RawstBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rawst/4.4bpp");
+const u32 gMapObjectPic_RawstBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/rawst/5.4bpp");
+const u32 gMapObjectPic_SpelonBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/spelon/0.4bpp");
+const u32 gMapObjectPic_SpelonBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/spelon/1.4bpp");
+const u32 gMapObjectPic_SpelonBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/spelon/2.4bpp");
+const u32 gMapObjectPic_SpelonBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/spelon/3.4bpp");
+const u32 gMapObjectPic_SpelonBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/spelon/4.4bpp");
+const u32 gMapObjectPic_SpelonBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/spelon/5.4bpp");
+const u32 gMapObjectPic_ChestoBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/chesto/0.4bpp");
+const u32 gMapObjectPic_ChestoBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/chesto/1.4bpp");
+const u32 gMapObjectPic_ChestoBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/chesto/2.4bpp");
+const u32 gMapObjectPic_ChestoBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/chesto/3.4bpp");
+const u32 gMapObjectPic_ChestoBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/chesto/4.4bpp");
+const u32 gMapObjectPic_ChestoBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/chesto/5.4bpp");
+const u32 gMapObjectPic_OranBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/oran/0.4bpp");
+const u32 gMapObjectPic_OranBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/oran/1.4bpp");
+const u32 gMapObjectPic_OranBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/oran/2.4bpp");
+const u32 gMapObjectPic_OranBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/oran/3.4bpp");
+const u32 gMapObjectPic_OranBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/oran/4.4bpp");
+const u32 gMapObjectPic_OranBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/oran/5.4bpp");
+const u32 gMapObjectPic_PersimBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/persim/0.4bpp");
+const u32 gMapObjectPic_PersimBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/persim/1.4bpp");
+const u32 gMapObjectPic_PersimBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/persim/2.4bpp");
+const u32 gMapObjectPic_PersimBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/persim/3.4bpp");
+const u32 gMapObjectPic_PersimBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/persim/4.4bpp");
+const u32 gMapObjectPic_PersimBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/persim/5.4bpp");
+const u32 gMapObjectPic_SitrusBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/sitrus/0.4bpp");
+const u32 gMapObjectPic_SitrusBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/sitrus/1.4bpp");
+const u32 gMapObjectPic_SitrusBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/sitrus/2.4bpp");
+const u32 gMapObjectPic_SitrusBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/sitrus/3.4bpp");
+const u32 gMapObjectPic_SitrusBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/sitrus/4.4bpp");
+const u32 gMapObjectPic_SitrusBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/sitrus/5.4bpp");
+const u32 gMapObjectPic_AspearBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aspear/0.4bpp");
+const u32 gMapObjectPic_AspearBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aspear/1.4bpp");
+const u32 gMapObjectPic_AspearBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aspear/2.4bpp");
+const u32 gMapObjectPic_AspearBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aspear/3.4bpp");
+const u32 gMapObjectPic_AspearBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aspear/4.4bpp");
+const u32 gMapObjectPic_AspearBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/aspear/5.4bpp");
+const u32 gMapObjectPic_PamtreBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pamtre/0.4bpp");
+const u32 gMapObjectPic_PamtreBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pamtre/1.4bpp");
+const u32 gMapObjectPic_PamtreBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pamtre/2.4bpp");
+const u32 gMapObjectPic_PamtreBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pamtre/3.4bpp");
+const u32 gMapObjectPic_PamtreBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pamtre/4.4bpp");
+const u32 gMapObjectPic_PamtreBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/pamtre/5.4bpp");
+const u32 gMapObjectPic_CornnBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cornn/0.4bpp");
+const u32 gMapObjectPic_CornnBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cornn/1.4bpp");
+const u32 gMapObjectPic_CornnBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cornn/2.4bpp");
+const u32 gMapObjectPic_CornnBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cornn/3.4bpp");
+const u32 gMapObjectPic_CornnBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cornn/4.4bpp");
+const u32 gMapObjectPic_CornnBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/cornn/5.4bpp");
+const u32 gMapObjectPic_LansatBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lansat/0.4bpp");
+const u32 gMapObjectPic_LansatBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lansat/1.4bpp");
+const u32 gMapObjectPic_LansatBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lansat/2.4bpp");
+const u32 gMapObjectPic_LansatBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lansat/3.4bpp");
+const u32 gMapObjectPic_LansatBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lansat/4.4bpp");
+const u32 gMapObjectPic_LansatBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/lansat/5.4bpp");
+const u32 gMapObjectPic_DurinBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/durin/0.4bpp");
+const u32 gMapObjectPic_DurinBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/durin/1.4bpp");
+const u32 gMapObjectPic_DurinBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/durin/2.4bpp");
+const u32 gMapObjectPic_DurinBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/durin/3.4bpp");
+const u32 gMapObjectPic_DurinBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/durin/4.4bpp");
+const u32 gMapObjectPic_DurinBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/durin/5.4bpp");
+const u32 gMapObjectPic_TamatoBerryTree_0[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/tamato/0.4bpp");
+const u32 gMapObjectPic_TamatoBerryTree_1[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/tamato/1.4bpp");
+const u32 gMapObjectPic_TamatoBerryTree_2[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/tamato/2.4bpp");
+const u32 gMapObjectPic_TamatoBerryTree_3[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/tamato/3.4bpp");
+const u32 gMapObjectPic_TamatoBerryTree_4[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/tamato/4.4bpp");
+const u32 gMapObjectPic_TamatoBerryTree_5[] = INCBIN_U32("graphics/map_objects/pics/berry_trees/tamato/5.4bpp");
+const u32 gFieldEffectPic_SurfBlob_0[] = INCBIN_U32("graphics/field_effect_objects/pics/surf_blob/0.4bpp");
+const u32 gFieldEffectPic_SurfBlob_1[] = INCBIN_U32("graphics/field_effect_objects/pics/surf_blob/1.4bpp");
+const u32 gFieldEffectPic_SurfBlob_2[] = INCBIN_U32("graphics/field_effect_objects/pics/surf_blob/2.4bpp");
+const u32 gMapObjectPic_QuintyPlump_0[] = INCBIN_U32("graphics/map_objects/pics/people/quinty_plump/0.4bpp");
+const u32 gMapObjectPic_QuintyPlump_1[] = INCBIN_U32("graphics/map_objects/pics/people/quinty_plump/1.4bpp");
+const u32 gMapObjectPic_QuintyPlump_2[] = INCBIN_U32("graphics/map_objects/pics/people/quinty_plump/2.4bpp");
+const u32 gMapObjectPic_QuintyPlump_3[] = INCBIN_U32("graphics/map_objects/pics/people/quinty_plump/3.4bpp");
+const u32 gMapObjectPic_QuintyPlump_4[] = INCBIN_U32("graphics/map_objects/pics/people/quinty_plump/4.4bpp");
+const u32 gMapObjectPic_QuintyPlump_5[] = INCBIN_U32("graphics/map_objects/pics/people/quinty_plump/5.4bpp");
+const u32 gMapObjectPic_QuintyPlump_6[] = INCBIN_U32("graphics/map_objects/pics/people/quinty_plump/6.4bpp");
+const u16 gMapObjectPalette12[] = INCBIN_U16("graphics/map_objects/palettes/12.gbapal");
+const u16 gMapObjectPalette13[] = INCBIN_U16("graphics/map_objects/palettes/13.gbapal");
+
+const u32 gFieldEffectPic_ShadowSmall[] = INCBIN_U32("graphics/field_effect_objects/pics/shadow_small.4bpp");
+const u32 gFieldEffectPic_ShadowMedium[] = INCBIN_U32("graphics/field_effect_objects/pics/shadow_medium.4bpp");
+const u32 gFieldEffectPic_ShadowLarge[] = INCBIN_U32("graphics/field_effect_objects/pics/shadow_large.4bpp");
+const u32 gFieldEffectPic_ShadowExtraLarge[] = INCBIN_U32("graphics/field_effect_objects/pics/shadow_extra_large.4bpp");
+const u32 filler_8368A08[0x48] = {};
+const u32 gFieldEffectPic_CutGrass[] = INCBIN_U32("graphics/field_effect_objects/pics/cut_grass.4bpp");
+const u32 FieldEffectPic_CutGrass_Copy[] = INCBIN_U32("graphics/field_effect_objects/pics/cut_grass.4bpp");
+const u16 gFieldEffectObjectPalette6[] = INCBIN_U16("graphics/field_effect_objects/palettes/06.gbapal");
+const u32 gFieldEffectPic_Ripple_0[] = INCBIN_U32("graphics/field_effect_objects/pics/ripple/0.4bpp");
+const u32 gFieldEffectPic_Ripple_1[] = INCBIN_U32("graphics/field_effect_objects/pics/ripple/1.4bpp");
+const u32 gFieldEffectPic_Ripple_2[] = INCBIN_U32("graphics/field_effect_objects/pics/ripple/2.4bpp");
+const u32 gFieldEffectPic_Ripple_3[] = INCBIN_U32("graphics/field_effect_objects/pics/ripple/3.4bpp");
+const u32 gFieldEffectPic_Ripple_4[] = INCBIN_U32("graphics/field_effect_objects/pics/ripple/4.4bpp");
+const u32 gFieldEffectPic_Ash_0[] = INCBIN_U32("graphics/field_effect_objects/pics/ash/0.4bpp");
+const u32 gFieldEffectPic_Ash_1[] = INCBIN_U32("graphics/field_effect_objects/pics/ash/1.4bpp");
+const u32 gFieldEffectPic_Ash_2[] = INCBIN_U32("graphics/field_effect_objects/pics/ash/2.4bpp");
+const u32 gFieldEffectPic_Ash_3[] = INCBIN_U32("graphics/field_effect_objects/pics/ash/3.4bpp");
+const u32 gFieldEffectPic_Ash_4[] = INCBIN_U32("graphics/field_effect_objects/pics/ash/4.4bpp");
+const u32 gFieldEffectPic_Arrow_0[] = INCBIN_U32("graphics/field_effect_objects/pics/arrow/0.4bpp");
+const u32 gFieldEffectPic_Arrow_1[] = INCBIN_U32("graphics/field_effect_objects/pics/arrow/1.4bpp");
+const u32 gFieldEffectPic_Arrow_2[] = INCBIN_U32("graphics/field_effect_objects/pics/arrow/2.4bpp");
+const u32 gFieldEffectPic_Arrow_3[] = INCBIN_U32("graphics/field_effect_objects/pics/arrow/3.4bpp");
+const u32 gFieldEffectPic_Arrow_4[] = INCBIN_U32("graphics/field_effect_objects/pics/arrow/4.4bpp");
+const u32 gFieldEffectPic_Arrow_5[] = INCBIN_U32("graphics/field_effect_objects/pics/arrow/5.4bpp");
+const u32 gFieldEffectPic_Arrow_6[] = INCBIN_U32("graphics/field_effect_objects/pics/arrow/6.4bpp");
+const u32 gFieldEffectPic_Arrow_7[] = INCBIN_U32("graphics/field_effect_objects/pics/arrow/7.4bpp");
+const u16 gFieldEffectObjectPalette0[] = INCBIN_U16("graphics/field_effect_objects/palettes/00.gbapal");
+const u16 gFieldEffectObjectPalette1[] = INCBIN_U16("graphics/field_effect_objects/palettes/01.gbapal");
+const u32 gFieldEffectPic_Dust_0[] = INCBIN_U32("graphics/field_effect_objects/pics/dust/0.4bpp");
+const u32 gFieldEffectPic_Dust_1[] = INCBIN_U32("graphics/field_effect_objects/pics/dust/1.4bpp");
+const u32 gFieldEffectPic_Dust_2[] = INCBIN_U32("graphics/field_effect_objects/pics/dust/2.4bpp");
+const u32 unknown_8369588[] = INCBIN_U32("graphics/field_effect_objects/unknown.bin");
+const u32 gFieldEffectPic_JumpTallGrass_0[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_tall_grass/0.4bpp");
+const u32 gFieldEffectPic_JumpTallGrass_1[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_tall_grass/1.4bpp");
+const u32 gFieldEffectPic_JumpTallGrass_2[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_tall_grass/2.4bpp");
+const u32 gFieldEffectPic_JumpTallGrass_3[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_tall_grass/3.4bpp");
+const u32 UnusedGrass0[] = INCBIN_U32("graphics/field_effect_objects/pics/unused_grass/0.4bpp");
+const u32 UnusedGrass1[] = INCBIN_U32("graphics/field_effect_objects/pics/unused_grass/1.4bpp");
+const u32 UnusedGrass2[] = INCBIN_U32("graphics/field_effect_objects/pics/unused_grass/2.4bpp");
+const u32 UnusedGrass3[] = INCBIN_U32("graphics/field_effect_objects/pics/unused_grass/3.4bpp");
+const u32 gFieldEffectPic_JumpLongGrass_0[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_long_grass/0.4bpp");
+const u32 gFieldEffectPic_JumpLongGrass_1[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_long_grass/1.4bpp");
+const u32 gFieldEffectPic_JumpLongGrass_2[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_long_grass/2.4bpp");
+const u32 gFieldEffectPic_JumpLongGrass_3[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_long_grass/3.4bpp");
+const u32 gFieldEffectPic_JumpLongGrass_4[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_long_grass/4.4bpp");
+const u32 UnusedGrassLong[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_long_grass/unused.4bpp");
+const u32 gFieldEffectPic_JumpLongGrass_5[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_long_grass/5.4bpp");
+const u32 gFieldEffectPic_Unknown17_0[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_17/0.4bpp");
+const u32 gFieldEffectPic_Unknown17_1[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_17/1.4bpp");
+const u32 gFieldEffectPic_Unknown17_2[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_17/2.4bpp");
+const u32 gFieldEffectPic_Unknown17_3[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_17/3.4bpp");
+const u32 gFieldEffectPic_Unknown17_4[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_17/4.4bpp");
+const u32 gFieldEffectPic_Unknown17_5[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_17/5.4bpp");
+const u32 gFieldEffectPic_Unknown17_6[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_17/6.4bpp");
+const u32 gFieldEffectPic_Unknown17_7[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_17/7.4bpp");
+const u32 gFieldEffectPic_Unknown18_0[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_18/0.4bpp");
+const u32 gFieldEffectPic_Unknown18_1[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_18/1.4bpp");
+const u32 gFieldEffectPic_Unknown18_2[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_18/2.4bpp");
+const u32 gFieldEffectPic_Unknown18_3[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_18/3.4bpp");
+const u32 gFieldEffectPic_LongGrass_0[] = INCBIN_U32("graphics/field_effect_objects/pics/long_grass/0.4bpp");
+const u32 gFieldEffectPic_LongGrass_1[] = INCBIN_U32("graphics/field_effect_objects/pics/long_grass/1.4bpp");
+const u32 gFieldEffectPic_LongGrass_2[] = INCBIN_U32("graphics/field_effect_objects/pics/long_grass/2.4bpp");
+const u32 gFieldEffectPic_LongGrass_3[] = INCBIN_U32("graphics/field_effect_objects/pics/long_grass/3.4bpp");
+const u32 gFieldEffectPic_TallGrass_0[] = INCBIN_U32("graphics/field_effect_objects/pics/tall_grass/0.4bpp");
+const u32 gFieldEffectPic_TallGrass_1[] = INCBIN_U32("graphics/field_effect_objects/pics/tall_grass/1.4bpp");
+const u32 gFieldEffectPic_TallGrass_2[] = INCBIN_U32("graphics/field_effect_objects/pics/tall_grass/2.4bpp");
+const u32 gFieldEffectPic_TallGrass_3[] = INCBIN_U32("graphics/field_effect_objects/pics/tall_grass/3.4bpp");
+const u32 gFieldEffectPic_TallGrass_4[] = INCBIN_U32("graphics/field_effect_objects/pics/tall_grass/4.4bpp");
+const u32 gFieldEffectPic_ShortGrass_0[] = INCBIN_U32("graphics/field_effect_objects/pics/short_grass/0.4bpp");
+const u32 gFieldEffectPic_ShortGrass_1[] = INCBIN_U32("graphics/field_effect_objects/pics/short_grass/1.4bpp");
+const u32 gFieldEffectPic_SandFootprints_0[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_footprints/0.4bpp");
+const u32 gFieldEffectPic_SandFootprints_1[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_footprints/1.4bpp");
+const u32 gFieldEffectPic_DeepSandFootprints_0[] = INCBIN_U32("graphics/field_effect_objects/pics/deep_sand_footprints/0.4bpp");
+const u32 gFieldEffectPic_DeepSandFootprints_1[] = INCBIN_U32("graphics/field_effect_objects/pics/deep_sand_footprints/1.4bpp");
+const u32 gFieldEffectPic_BikeTireTracks_0[] = INCBIN_U32("graphics/field_effect_objects/pics/bike_tire_tracks/0.4bpp");
+const u32 gFieldEffectPic_BikeTireTracks_1[] = INCBIN_U32("graphics/field_effect_objects/pics/bike_tire_tracks/1.4bpp");
+const u32 gFieldEffectPic_BikeTireTracks_2[] = INCBIN_U32("graphics/field_effect_objects/pics/bike_tire_tracks/2.4bpp");
+const u32 gFieldEffectPic_BikeTireTracks_3[] = INCBIN_U32("graphics/field_effect_objects/pics/bike_tire_tracks/3.4bpp");
+const u32 gFieldEffectPic_Unknown19_0[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_19/0.4bpp");
+const u32 gFieldEffectPic_Unknown19_1[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_19/1.4bpp");
+const u32 gFieldEffectPic_Unknown19_2[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_19/2.4bpp");
+const u32 gFieldEffectPic_Unknown19_3[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_19/3.4bpp");
+const u32 gFieldEffectPic_SandPile_0[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_pile/0.4bpp");
+const u32 gFieldEffectPic_SandPile_1[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_pile/1.4bpp");
+const u32 gFieldEffectPic_SandPile_2[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_pile/2.4bpp");
+const u32 gFieldEffectPic_JumpBigSplash_0[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_big_splash/0.4bpp");
+const u32 gFieldEffectPic_JumpBigSplash_1[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_big_splash/1.4bpp");
+const u32 gFieldEffectPic_JumpBigSplash_2[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_big_splash/2.4bpp");
+const u32 gFieldEffectPic_JumpBigSplash_3[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_big_splash/3.4bpp");
+const u32 gFieldEffectPic_Splash_0[] = INCBIN_U32("graphics/field_effect_objects/pics/splash/0.4bpp");
+const u32 gFieldEffectPic_Splash_1[] = INCBIN_U32("graphics/field_effect_objects/pics/splash/1.4bpp");
+const u32 gFieldEffectPic_JumpSmallSplash_0[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_small_splash/0.4bpp");
+const u32 gFieldEffectPic_JumpSmallSplash_1[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_small_splash/1.4bpp");
+const u32 gFieldEffectPic_JumpSmallSplash_2[] = INCBIN_U32("graphics/field_effect_objects/pics/jump_small_splash/2.4bpp");
+const u32 gFieldEffectPic_Unknown20_0[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_20/0.4bpp");
+const u32 gFieldEffectPic_Unknown20_1[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_20/1.4bpp");
+const u32 gFieldEffectPic_Unknown20_2[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_20/2.4bpp");
+const u32 gFieldEffectPic_Unknown20_3[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_20/3.4bpp");
+const u32 gFieldEffectPic_Unknown20_4[] = INCBIN_U32("graphics/field_effect_objects/pics/unknown_20/4.4bpp");
+const u32 gFieldEffectPic_TreeDisguise_0[] = INCBIN_U32("graphics/field_effect_objects/pics/tree_disguise/0.4bpp");
+const u32 gFieldEffectPic_TreeDisguise_1[] = INCBIN_U32("graphics/field_effect_objects/pics/tree_disguise/1.4bpp");
+const u32 gFieldEffectPic_TreeDisguise_2[] = INCBIN_U32("graphics/field_effect_objects/pics/tree_disguise/2.4bpp");
+const u32 gFieldEffectPic_TreeDisguise_3[] = INCBIN_U32("graphics/field_effect_objects/pics/tree_disguise/3.4bpp");
+const u32 gFieldEffectPic_TreeDisguise_4[] = INCBIN_U32("graphics/field_effect_objects/pics/tree_disguise/4.4bpp");
+const u32 gFieldEffectPic_TreeDisguise_5[] = INCBIN_U32("graphics/field_effect_objects/pics/tree_disguise/5.4bpp");
+const u32 gFieldEffectPic_TreeDisguise_6[] = INCBIN_U32("graphics/field_effect_objects/pics/tree_disguise/6.4bpp");
+const u32 gFieldEffectPic_MountainDisguise_0[] = INCBIN_U32("graphics/field_effect_objects/pics/mountain_disguise/0.4bpp");
+const u32 gFieldEffectPic_MountainDisguise_1[] = INCBIN_U32("graphics/field_effect_objects/pics/mountain_disguise/1.4bpp");
+const u32 gFieldEffectPic_MountainDisguise_2[] = INCBIN_U32("graphics/field_effect_objects/pics/mountain_disguise/2.4bpp");
+const u32 gFieldEffectPic_MountainDisguise_3[] = INCBIN_U32("graphics/field_effect_objects/pics/mountain_disguise/3.4bpp");
+const u32 gFieldEffectPic_MountainDisguise_4[] = INCBIN_U32("graphics/field_effect_objects/pics/mountain_disguise/4.4bpp");
+const u32 gFieldEffectPic_MountainDisguise_5[] = INCBIN_U32("graphics/field_effect_objects/pics/mountain_disguise/5.4bpp");
+const u32 gFieldEffectPic_MountainDisguise_6[] = INCBIN_U32("graphics/field_effect_objects/pics/mountain_disguise/6.4bpp");
+const u32 gFieldEffectPic_SandDisguise_0[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_disguise/0.4bpp");
+const u32 gFieldEffectPic_SandDisguise_1[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_disguise/1.4bpp");
+const u32 gFieldEffectPic_SandDisguise_2[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_disguise/2.4bpp");
+const u32 gFieldEffectPic_SandDisguise_3[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_disguise/3.4bpp");
+const u32 gFieldEffectPic_SandDisguise_4[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_disguise/4.4bpp");
+const u32 gFieldEffectPic_SandDisguise_5[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_disguise/5.4bpp");
+const u32 gFieldEffectPic_SandDisguise_6[] = INCBIN_U32("graphics/field_effect_objects/pics/sand_disguise/6.4bpp");
+const u32 gFieldEffectPic_HotSpringsWater[] = INCBIN_U32("graphics/field_effect_objects/pics/hot_springs_water.4bpp");
+const u16 gFieldEffectObjectPalette2[] = INCBIN_U16("graphics/field_effect_objects/palettes/02.gbapal");
+const u32 gFieldEffectPic_PopOutOfAsh_0[] = INCBIN_U32("graphics/field_effect_objects/pics/pop_out_of_ash/0.4bpp");
+const u32 gFieldEffectPic_PopOutOfAsh_1[] = INCBIN_U32("graphics/field_effect_objects/pics/pop_out_of_ash/1.4bpp");
+const u32 gFieldEffectPic_PopOutOfAsh_2[] = INCBIN_U32("graphics/field_effect_objects/pics/pop_out_of_ash/2.4bpp");
+const u32 gFieldEffectPic_PopOutOfAsh_3[] = INCBIN_U32("graphics/field_effect_objects/pics/pop_out_of_ash/3.4bpp");
+const u32 gFieldEffectPic_PopOutOfAsh_4[] = INCBIN_U32("graphics/field_effect_objects/pics/pop_out_of_ash/4.4bpp");
+const u32 gFieldEffectPic_LavaridgeGymWarp_0[] = INCBIN_U32("graphics/field_effect_objects/pics/lavaridge_gym_warp/0.4bpp");
+const u32 gFieldEffectPic_LavaridgeGymWarp_1[] = INCBIN_U32("graphics/field_effect_objects/pics/lavaridge_gym_warp/1.4bpp");
+const u32 gFieldEffectPic_LavaridgeGymWarp_2[] = INCBIN_U32("graphics/field_effect_objects/pics/lavaridge_gym_warp/2.4bpp");
+const u32 gFieldEffectPic_LavaridgeGymWarp_3[] = INCBIN_U32("graphics/field_effect_objects/pics/lavaridge_gym_warp/3.4bpp");
+const u32 gFieldEffectPic_LavaridgeGymWarp_4[] = INCBIN_U32("graphics/field_effect_objects/pics/lavaridge_gym_warp/4.4bpp");
+const u32 gFieldEffectPic_Bubbles_0[] = INCBIN_U32("graphics/field_effect_objects/pics/bubbles/0.4bpp");
+const u32 gFieldEffectPic_Bubbles_1[] = INCBIN_U32("graphics/field_effect_objects/pics/bubbles/1.4bpp");
+const u32 gFieldEffectPic_Bubbles_2[] = INCBIN_U32("graphics/field_effect_objects/pics/bubbles/2.4bpp");
+const u32 gFieldEffectPic_Bubbles_3[] = INCBIN_U32("graphics/field_effect_objects/pics/bubbles/3.4bpp");
+const u32 gFieldEffectPic_Bubbles_4[] = INCBIN_U32("graphics/field_effect_objects/pics/bubbles/4.4bpp");
+const u32 gFieldEffectPic_Bubbles_5[] = INCBIN_U32("graphics/field_effect_objects/pics/bubbles/5.4bpp");
+const u32 gFieldEffectPic_Bubbles_6[] = INCBIN_U32("graphics/field_effect_objects/pics/bubbles/6.4bpp");
+const u32 gFieldEffectPic_Bubbles_7[] = INCBIN_U32("graphics/field_effect_objects/pics/bubbles/7.4bpp");
+const u32 gFieldEffectPic_Sparkle_0[] = INCBIN_U32("graphics/field_effect_objects/pics/sparkle/0.4bpp");
+const u32 gFieldEffectPic_Sparkle_1[] = INCBIN_U32("graphics/field_effect_objects/pics/sparkle/1.4bpp");
+const u16 gFieldEffectObjectPalette3[] = INCBIN_U16("graphics/field_effect_objects/palettes/03.gbapal");
+const u32 gFieldEffectPic_Bird[] = INCBIN_U32("graphics/field_effect_objects/pics/bird.4bpp");
+
+void (*const gUnknown_0836DA88[])(struct Sprite *) =
+{
+ sub_805C884,
+ sub_805CDE8,
+ sub_805C8AC,
+ sub_805CF28,
+ sub_805CF28,
+ sub_805D0AC,
+ sub_805D0AC,
+ sub_805D230,
+ sub_805D230,
+ sub_805D230,
+ sub_805D230,
+ sub_80587B4,
+ FieldObjectCB_BerryTree,
+ sub_805D4F4,
+ sub_805D634,
+ sub_805D774,
+ sub_805D8B4,
+ sub_805D9F4,
+ sub_805DB34,
+ sub_805DC74,
+ sub_805DDB4,
+ sub_805DEF4,
+ sub_805E034,
+ sub_805E174,
+ sub_805E278,
+ sub_805E37C,
+ sub_805E37C,
+ sub_805E37C,
+ sub_805E37C,
+ sub_805E5DC,
+ sub_805E668,
+ sub_805E6F4,
+ sub_805E780,
+ sub_805E80C,
+ sub_805E898,
+ sub_805E924,
+ sub_805E9B0,
+ sub_805EA3C,
+ sub_805EAC8,
+ sub_805EB54,
+ sub_805EBE0,
+ sub_805EC6C,
+ sub_805ECF8,
+ sub_805ED84,
+ sub_805EE10,
+ sub_805EE9C,
+ sub_805EF28,
+ sub_805EFB4,
+ sub_805F040,
+ sub_805F0CC,
+ sub_805F158,
+ sub_805F1E4,
+ sub_805F270,
+ sub_805F2FC,
+ sub_805F2FC,
+ sub_805F2FC,
+ sub_805F2FC,
+ FieldObjectCB_TreeDisguise,
+ FieldObjectCB_MountainDisguise,
+ sub_805F8E0,
+ sub_805F8E0,
+ sub_805F8E0,
+ sub_805F8E0,
+ FieldObjectCB_Hidden1,
+ sub_805FB20,
+ sub_805FB20,
+ sub_805FB20,
+ sub_805FB20,
+ sub_805FB90,
+ sub_805FB90,
+ sub_805FB90,
+ sub_805FB90,
+ sub_805FC00,
+ sub_805FC00,
+ sub_805FC00,
+ sub_805FC00,
+ sub_805FC70
+};
+
+const u8 gUnknown_0836DBBC[] = {0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+const u8 gUnknown_0836DC09[] = {DIR_SOUTH, DIR_SOUTH, DIR_SOUTH, DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_SOUTH, DIR_SOUTH, DIR_WEST, DIR_NORTH, DIR_NORTH, DIR_SOUTH, DIR_SOUTH, DIR_SOUTH, DIR_SOUTH, DIR_NORTH, DIR_SOUTH, DIR_SOUTH, DIR_SOUTH, DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST, DIR_NORTH, DIR_WEST, DIR_SOUTH, DIR_EAST, DIR_WEST, DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_EAST, DIR_NORTH, DIR_WEST, DIR_SOUTH, DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_SOUTH, DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST, DIR_SOUTH};
+
+#include "data/field_map_obj/map_object_graphics_info_pointers.h"
+#include "data/field_map_obj/field_effect_object_template_pointers.h"
+#include "data/field_map_obj/map_object_pic_tables.h"
+#include "data/field_map_obj/map_object_anims.h"
+#include "data/field_map_obj/base_oam.h"
+#include "data/field_map_obj/map_object_subsprites.h"
+#include "data/field_map_obj/map_object_graphics_info.h"
+
+const struct SpritePalette gUnknown_0837377C[] = {
+ {gMapObjectPalette0, 0x1103},
+ {gMapObjectPalette1, 0x1104},
+ {gMapObjectPalette2, 0x1105},
+ {gMapObjectPalette3, 0x1106},
+ {gMapObjectPalette4, 0x1107},
+ {gMapObjectPalette5, 0x1108},
+ {gMapObjectPalette6, 0x1109},
+ {gMapObjectPalette7, 0x110A},
+ {gMapObjectPalette8, 0x1100},
+ {gMapObjectPalette9, 0x1101},
+ {gMapObjectPalette10, 0x1102},
+ {gMapObjectPalette11, 0x1115},
+ {gMapObjectPalette12, 0x110B},
+ {gMapObjectPalette13, 0x110C},
+ {gMapObjectPalette14, 0x110D},
+ {gMapObjectPalette15, 0x110E},
+ {gMapObjectPalette16, 0x110F},
+ {gMapObjectPalette17, 0x1110},
+ {gMapObjectPalette18, 0x1111},
+ {gMapObjectPalette19, 0x1112},
+ {gMapObjectPalette20, 0x1113},
+ {gMapObjectPalette21, 0x1114},
+ {gMapObjectPalette22, 0x1116},
+ {gMapObjectPalette23, 0x1117},
+ {gMapObjectPalette24, 0x1118},
+ {gMapObjectPalette25, 0x1119},
+ {gMapObjectPalette26, 0x111A},
+ {NULL, 0x0000}
+};
+
+const u16 Palettes_837385C[] = {
+ 0x1101,
+ 0x1101,
+ 0x1101,
+ 0x1101
+};
+
+const u16 Palettes_8373864[] = {
+ 0x1111,
+ 0x1111,
+ 0x1111,
+ 0x1111
+};
+
+const u16 Palettes_837386C[] = {
+ 0x1115,
+ 0x1115,
+ 0x1115,
+ 0x1115
+};
+
+const struct PairedPalettes gUnknown_08373874[] = {
+ {0x1100, Palettes_837385C},
+ {0x1110, Palettes_837385C},
+ {0x1115, Palettes_837386C},
+ {0x11FF, NULL}
+};
+
+const u16 Palettes_8373894[] = {
+ 0x110C,
+ 0x110C,
+ 0x110C,
+ 0x110C
+};
+
+const u16 Palettes_837389C[] = {
+ 0x110D,
+ 0x110D,
+ 0x110D,
+ 0x110D
+};
+
+const u16 Palettes_83738A4[] = {
+ 0x110E,
+ 0x110E,
+ 0x110E,
+ 0x110E
+};
+
+const u16 Palettes_83738AC[] = {
+ 0x1112,
+ 0x1112,
+ 0x1112,
+ 0x1112
+};
+
+const u16 Palettes_83738B4[] = {
+ 0x1113,
+ 0x1113,
+ 0x1113,
+ 0x1113
+};
+
+const u16 Palettes_83738BC[] = {
+ 0x1114,
+ 0x1114,
+ 0x1114,
+ 0x1114
+};
+const u16 Palettes_83738C4[] = {
+ 0x111A,
+ 0x111A,
+ 0x111A,
+ 0x111A
+};
+
+const u16 Palettes_83738CC[] = {
+ 0x1117,
+ 0x1117,
+ 0x1117,
+ 0x1117
+};
+
+const u16 Palettes_83738D4[] = {
+ 0x1119,
+ 0x1119,
+ 0x1119,
+ 0x1119
+};
+
+const u16 Palettes_83738DC[] = {
+ 0x1109,
+ 0x1109,
+ 0x1109,
+ 0x1109
+};
+
+const struct PairedPalettes gUnknown_083738E4[] = {
+ {0x1100, Palettes_837385C},
+ {0x1110, Palettes_837385C},
+ {0x110B, Palettes_8373894},
+ {0x110D, Palettes_837389C},
+ {0x110E, Palettes_83738A4},
+ {0x1112, Palettes_83738AC},
+ {0x1113, Palettes_83738B4},
+ {0x1114, Palettes_83738BC},
+ {0x1116, Palettes_83738CC},
+ {0x1118, Palettes_83738D4},
+ {0x1105, Palettes_83738DC},
+ {0x111A, Palettes_83738C4},
+ {0x11FF, NULL}
+};
+
+const u16 Unknown_837394C[] = {
+ 0x1100,
+ 0x1101,
+ 0x1103,
+ 0x1104,
+ 0x1105,
+ 0x1106,
+ 0x1107,
+ 0x1108,
+ 0x1109,
+ 0x110A
+};
+
+const u16 Unknown_8373960[] = {
+ 0x1100,
+ 0x1101,
+ 0x1103,
+ 0x1104,
+ 0x1105,
+ 0x1106,
+ 0x1107,
+ 0x1108,
+ 0x1109,
+ 0x110A
+};
+
+const u16 Unknown_8373974[] = {
+ 0x1100,
+ 0x1101,
+ 0x1103,
+ 0x1104,
+ 0x1105,
+ 0x1106,
+ 0x1107,
+ 0x1108,
+ 0x1109,
+ 0x110A
+};
+
+const u16 Unknown_8373988[] = {
+ 0x1100,
+ 0x1101,
+ 0x1103,
+ 0x1104,
+ 0x1105,
+ 0x1106,
+ 0x1107,
+ 0x1108,
+ 0x1109,
+ 0x110A
+};
+
+const u16 *const gUnknown_0837399C[] = {
+ Unknown_837394C,
+ Unknown_8373960,
+ Unknown_8373974,
+ Unknown_8373988
+};
+
+#include "data/field_map_obj/berry_tree_graphics_tables.h"
+#include "data/field_map_obj/field_effect_objects.h"
+
+const s16 gUnknown_0837520C[] = {0x20, 0x40, 0x60, 0x80};
+const s16 gUnknown_08375204[] = {0x20, 0x40, 0x80, 0xc0};
+const s16 gUnknown_0837521C[] = {0x20, 0x30, 0x40, 0x50};
+
+#include "data/field_map_obj/callback_subroutine_pointers.h"
+
+const u8 gUnknown_083755F4[] = {0x00, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x01, 0x01};
+const u8 gUnknown_083755FD[] = {0x04, 0x04, 0x05, 0x06, 0x07, 0x04, 0x04, 0x05, 0x05};
+const u8 gUnknown_08375606[] = {0x08, 0x08, 0x09, 0x0A, 0x0B, 0x08, 0x08, 0x09, 0x09};
+const u8 gUnknown_0837560F[] = {0x0C, 0x0C, 0x0D, 0x0E, 0x0F, 0x0C, 0x0C, 0x0D, 0x0D};
+const u8 gUnknown_08375618[] = {0x10, 0x10, 0x11, 0x12, 0x13, 0x10, 0x10, 0x11, 0x11};
+const u8 gUnknown_08375621[] = {0x14, 0x14, 0x15, 0x16, 0x17, 0x14, 0x14, 0x15, 0x15};
+const u8 gUnknown_0837562A[] = {0x14, 0x14, 0x15, 0x16, 0x17, 0x14, 0x14, 0x15, 0x15};
+const u8 gUnknown_08375633[] = {0x18, 0x18, 0x19, 0x1A, 0x1B, 0x18, 0x18, 0x19, 0x19};
+const u8 gUnknown_0837563C[] = {0x1C, 0x1C, 0x1D, 0x1E, 0x1F, 0x1C, 0x1C, 0x1D, 0x1D};
+const u8 gUnknown_08375645[] = {0x20, 0x20, 0x21, 0x22, 0x23, 0x20, 0x20, 0x21, 0x21};
+const u8 gUnknown_0837564E[] = {0x24, 0x24, 0x25, 0x26, 0x27, 0x24, 0x24, 0x25, 0x25};
+const u8 gUnknown_08375657[] = {0x00, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x01, 0x01};
+const u8 gUnknown_08375660[] = {0x04, 0x04, 0x05, 0x06, 0x07, 0x04, 0x04, 0x05, 0x05};
+const u8 gUnknown_08375669[] = {0x08, 0x08, 0x09, 0x0A, 0x0B, 0x08, 0x08, 0x09, 0x09};
+const u8 gUnknown_08375672[] = {0x14, 0x14, 0x15, 0x16, 0x17, 0x14, 0x14, 0x15, 0x15};
+const u8 gUnknown_0837567B[] = {0x08, 0x08, 0x07, 0x09, 0x0A, 0x08, 0x08, 0x07, 0x07};
+
+bool8 (*const gUnknown_08375684[])(u8) = {
+ MetatileBehavior_IsSouthBlocked,
+ MetatileBehavior_IsNorthBlocked,
+ MetatileBehavior_IsWestBlocked,
+ MetatileBehavior_IsEastBlocked
+};
+
+bool8 (*const gUnknown_08375694[])(u8) = {
+ MetatileBehavior_IsNorthBlocked,
+ MetatileBehavior_IsSouthBlocked,
+ MetatileBehavior_IsEastBlocked,
+ MetatileBehavior_IsWestBlocked
+};
+
+const struct Coords16 gDirectionToVector[] = {
+ { 0, 0},
+ { 0, 1},
+ { 0, -1},
+ {-1, 0},
+ { 1, 0},
+ {-1, 1},
+ { 1, 1},
+ {-1, -1},
+ { 1, -1}
+};
+
+const u8 gUnknown_083756C8[] = {0x00, 0x00, 0x01, 0x02, 0x03};
+const u8 gUnknown_083756CD[] = {0x04, 0x04, 0x05, 0x06, 0x07};
+const u8 gUnknown_083756D2[] = {0x08, 0x08, 0x09, 0x0A, 0x0B};
+const u8 gUnknown_083756D7[] = {0x15, 0x15, 0x16, 0x17, 0x18};
+const u8 gUnknown_083756DC[] = {0x29, 0x29, 0x2A, 0x2B, 0x2C};
+const u8 gUnknown_083756E1[] = {0x2D, 0x2D, 0x2E, 0x2F, 0x30};
+const u8 gUnknown_083756E6[] = {0x31, 0x31, 0x32, 0x33, 0x34};
+const u8 gUnknown_083756EB[] = {0x35, 0x35, 0x36, 0x37, 0x38};
+const u8 gUnknown_083756F0[] = {0x0C, 0x0C, 0x0D, 0x0E, 0x0F};
+const u8 gUnknown_083756F5[] = {0x46, 0x46, 0x47, 0x48, 0x49};
+const u8 gUnknown_083756FA[] = {0x4B, 0x4B, 0x4A, 0x4D, 0x4C};
+const u8 gUnknown_083756FF[] = {0x42, 0x42, 0x43, 0x44, 0x45};
+const u8 gUnknown_08375704[] = {0x3A, 0x3A, 0x3B, 0x3C, 0x3D};
+const u8 gUnknown_08375709[] = {0x19, 0x19, 0x1A, 0x1B, 0x1C};
+const u8 gUnknown_0837570E[] = {0x1D, 0x1D, 0x1E, 0x1F, 0x20};
+const u8 gUnknown_08375713[] = {0x21, 0x21, 0x22, 0x23, 0x24};
+const u8 gUnknown_08375718[] = {0x25, 0x25, 0x26, 0x27, 0x28};
+const u8 gUnknown_0837571D[] = {0x62, 0x62, 0x63, 0x64, 0x65};
+const u8 gUnknown_08375722[] = {0x66, 0x66, 0x67, 0x68, 0x69};
+const u8 gUnknown_08375727[] = {0x6A, 0x6A, 0x6B, 0x6C, 0x6D};
+const u8 gUnknown_0837572C[] = {0x6E, 0x6E, 0x6F, 0x70, 0x71};
+const u8 gUnknown_08375731[] = {0x72, 0x72, 0x73, 0x74, 0x75};
+const u8 gUnknown_08375736[] = {0x76, 0x76, 0x77, 0x78, 0x79};
+const u8 gUnknown_0837573B[] = {0x7A, 0x7A, 0x7B, 0x7C, 0x7D};
+const u8 gUnknown_08375740[] = {0x7E, 0x7E, 0x7F, 0x80, 0x81};
+const u8 gUnknown_08375745[] = {0x82, 0x82, 0x83, 0x84, 0x85};
+const u8 gUnknown_0837574A[] = {0x86, 0x86, 0x87, 0x88, 0x89};
+
+const u8 gUnknown_0837574F[] = {2, 1, 4, 3, 8, 7, 6, 5};
+
+const u8 gUnknown_08375757[][4] = {
+ {2, 1, 4, 3},
+ {1, 2, 3, 4},
+ {3, 4, 2, 1},
+ {4, 3, 1, 2}
+};
+
+const u8 gUnknown_08375767[][4] = {
+ {2, 1, 4, 3},
+ {1, 2, 3, 4},
+ {4, 3, 1, 2},
+ {3, 4, 2, 1}
+};
+
+#include "data/field_map_obj/anim_func_ptrs.h"
+
+// text
extern void strange_npc_table_clear(void);
extern void ClearPlayerAvatarInfo(void);
@@ -30,43 +1899,11 @@ void sub_80634D0(struct MapObject *, struct Sprite *);
extern void pal_patch_for_npc(u16, u16);
extern void CameraObjectReset1(void);
-void sub_805AAB0(void);
-u8 GetFieldObjectIdByLocalId(u8);
-u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8);
-u8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *);
-void FieldObjectHandleDynamicGraphicsId(struct MapObject *);
-void RemoveFieldObjectInternal(struct MapObject *);
-u16 GetFieldObjectFlagIdByFieldObjectId(u8);
-void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *mapObjTemplate, struct SpriteTemplate *sprTemplate, struct SubspriteTable **subspriteTables);
-struct MapObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8, u8, u8);
-void GetFieldObjectMovingCameraOffset(s16 *, s16 *);
-void sub_805BDF8(u16);
-u8 sub_805BE58(const struct SpritePalette *);
-u8 FindFieldObjectPaletteIndexByTag(u16);
-
-struct PairedPalettes
-{
- u16 tag;
- u16 *data;
-};
-
extern struct LinkPlayerMapObject gLinkPlayerMapObjects[];
extern u8 gReservedSpritePaletteCount;
extern struct Camera gUnknown_0202E844;
extern u8 gUnknown_030005A4;
extern u16 gUnknown_030005A6;
-extern const u8 gUnknown_0836DBBC[];
-extern const u8 gUnknown_0836DC09[];
-extern void (*const gUnknown_0836DA88[])(struct Sprite *);
-extern const u8 *const gBerryTreeGraphicsIdTablePointers[];
-extern const struct SpriteFrameImage *const gBerryTreePicTablePointers[];
-extern const u8 *const gBerryTreePaletteSlotTablePointers[];
-extern const struct MapObjectGraphicsInfo *const gMapObjectGraphicsInfoPointers[];
-extern const struct SpritePalette gUnknown_0837377C[];
-extern const struct PairedPalettes gUnknown_08373874[];
-extern const struct PairedPalettes gUnknown_083738E4[];
-extern const struct SpriteTemplate gSpriteTemplate_830FD24;
-extern const u16 *const gUnknown_0837399C[];
void npc_clear_ids_and_state(struct MapObject *mapObj)
{
@@ -516,7 +2353,7 @@ u8 sub_805AFCC(struct MapObjectTemplate *mapObjTemplate, struct SpriteTemplate *
u8 SpawnFieldObject(struct MapObjectTemplate *mapObjTemplate, u8 b, u8 c, s16 d, s16 e)
{
struct SpriteTemplate spriteTemplate;
- struct SubspriteTable *subspriteTables = NULL;
+ const struct SubspriteTable *subspriteTables = NULL;
struct SpriteFrameImage spriteFrameImage;
const struct MapObjectGraphicsInfo *gfxInfo;
u8 mapObjectId;
@@ -576,7 +2413,7 @@ u8 show_sprite(u8 a, u8 b, u8 c)
return SpawnFieldObject(r5, b, c, x, y);
}
-void MakeObjectTemplateFromFieldObjectGraphicsInfo(u16 graphicsId, void (*callback)(struct Sprite *), struct SpriteTemplate *sprTemplate, struct SubspriteTable **subspriteTables)
+void MakeObjectTemplateFromFieldObjectGraphicsInfo(u16 graphicsId, void (*callback)(struct Sprite *), struct SpriteTemplate *sprTemplate, const struct SubspriteTable **subspriteTables)
{
const struct MapObjectGraphicsInfo *gfxInfo = GetFieldObjectGraphicsInfo(graphicsId);
@@ -590,12 +2427,12 @@ void MakeObjectTemplateFromFieldObjectGraphicsInfo(u16 graphicsId, void (*callba
*subspriteTables = gfxInfo->subspriteTables;
}
-void MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(u16 graphicsId, u16 callbackIndex, struct SpriteTemplate *sprTemplate, struct SubspriteTable **subspriteTables)
+void MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(u16 graphicsId, u16 callbackIndex, struct SpriteTemplate *sprTemplate, const struct SubspriteTable **subspriteTables)
{
MakeObjectTemplateFromFieldObjectGraphicsInfo(graphicsId, gUnknown_0836DA88[callbackIndex], sprTemplate, subspriteTables);
}
-void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *mapObjTemplate, struct SpriteTemplate *sprTemplate, struct SubspriteTable **subspriteTables)
+void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *mapObjTemplate, struct SpriteTemplate *sprTemplate, const struct SubspriteTable **subspriteTables)
{
MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(mapObjTemplate->graphicsId, mapObjTemplate->movementType, sprTemplate, subspriteTables);
}
@@ -603,7 +2440,7 @@ void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *mapObjT
u8 AddPseudoFieldObject(u16 graphicsId, void (*callback)(struct Sprite *), s16 c, s16 d, u8 subpriority)
{
struct SpriteTemplate spriteTemplate;
- struct SubspriteTable *subspriteTables;
+ const struct SubspriteTable *subspriteTables;
u8 spriteId;
MakeObjectTemplateFromFieldObjectGraphicsInfo(graphicsId, callback, &spriteTemplate, &subspriteTables);
@@ -626,7 +2463,7 @@ u8 sub_805B410(u8 a, u8 b, s16 c, s16 d, u8 e, u8 f)
{
const struct MapObjectGraphicsInfo *gfxInfo;
struct SpriteTemplate spriteTemplate;
- struct SubspriteTable *subspriteTables;
+ const struct SubspriteTable *subspriteTables;
u8 spriteId;
gfxInfo = GetFieldObjectGraphicsInfo(a);
@@ -754,7 +2591,7 @@ void sub_805B75C(u8 a, s16 b, s16 c)
{
struct SpriteTemplate sp0;
struct SpriteFrameImage sp18;
- struct SubspriteTable *subspriteTables;
+ const struct SubspriteTable *subspriteTables;
const struct MapObjectGraphicsInfo *gfxInfo;
struct MapObject *mapObject;
u8 spriteId;
@@ -1052,8 +2889,6 @@ u8 FindFieldObjectPaletteIndexByTag(u16 tag)
return 0xFF;
}
-const u8 gUnknown_0830FD14[] = {1, 1, 6, 7, 8, 9, 6, 7, 8, 9, 11, 11, 0, 0, 0, 0};
-
void npc_load_two_palettes__no_record(u16 a, u8 b)
{
u8 i;
@@ -1202,18 +3037,6 @@ void UpdateFieldObjectsForCameraUpdate(s16 x, s16 y)
RemoveFieldObjectsOutsideView();
}
-void ObjectCB_CameraObject(struct Sprite *sprite);
-const struct SpriteTemplate gSpriteTemplate_830FD24 =
-{
- .tileTag = 0,
- .paletteTag = 0xFFFF,
- .oam = &gDummyOamData,
- .anims = gDummySpriteAnimTable,
- .images = NULL,
- .affineAnims = gDummySpriteAffineAnimTable,
- .callback = ObjectCB_CameraObject,
-};
-
u8 AddCameraObject(u8 a)
{
u8 spriteId = CreateSprite(&gSpriteTemplate_830FD24, 0, 0, 4);
@@ -1223,19 +3046,10 @@ u8 AddCameraObject(u8 a)
return spriteId;
}
-void CameraObject_0(struct Sprite *);
-void CameraObject_1(struct Sprite *);
-void CameraObject_2(struct Sprite *);
-
void ObjectCB_CameraObject(struct Sprite *sprite)
{
- void (*const cameraObjectFuncs[])(struct Sprite *) =
- {
- CameraObject_0,
- CameraObject_1,
- CameraObject_2,
- };
-
+ void (*cameraObjectFuncs[3])(struct Sprite *);
+ memcpy(cameraObjectFuncs, gCameraObjectFuncs, sizeof gCameraObjectFuncs);
cameraObjectFuncs[sprite->data1](sprite);
}
@@ -1533,8 +3347,6 @@ u8 sub_805C904(struct MapObject *mapObject, struct Sprite *sprite)
}
extern u8 FieldObjectExecRegularAnim(struct MapObject *, struct Sprite *);
-extern const s16 gUnknown_0837520C[];
-extern const s16 gUnknown_0837521C[];
extern void sub_8064820(struct Sprite *, s16);
u8 sub_805C930(struct MapObject *mapObject, struct Sprite *sprite)
@@ -2051,7 +3863,6 @@ u8 sub_805D2C0(struct MapObject *mapObject, struct Sprite *sprite)
}
u8 sub_805D314(struct MapObject *mapObject, struct Sprite *sprite);
-extern u8 (*const gUnknown_083752D0[])(struct MapObject *mapObject, struct Sprite *sprite);
void FieldObjectCB_BerryTree(struct Sprite *sprite)
{
@@ -3199,8 +5010,6 @@ u8 mss_npc_reset_oampriv3_1_unk2_unk3(struct MapObject *mapObject, struct Sprite
return 1;
}
-extern u8 (*const gUnknown_08375594[])(struct MapObject *, struct Sprite *, u8, bool8 (*const)(u8));
-
u8 sub_805F364(struct MapObject *mapObject, struct Sprite *sprite)
{
if (gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1C == 0xFF || gPlayerAvatar.running1 == 2)
@@ -3305,7 +5114,6 @@ void FieldObjectCB_MountainDisguise(struct Sprite *sprite)
}
u8 sub_805FAD8(struct MapObject *mapObject, struct Sprite *sprite);
-extern u8 (*const gUnknown_083755CC[])(struct MapObject *, struct Sprite *);
void FieldObjectCB_Hidden1(struct Sprite *sprite)
{
@@ -3407,22 +5215,6 @@ void npc_reset(struct MapObject *mapObject, struct Sprite *sprite)
sprite->data1 = 0;
}
-extern const u8 gUnknown_083755F4[9];
-extern const u8 gUnknown_083755FD[9];
-extern const u8 gUnknown_08375606[9];
-extern const u8 gUnknown_0837560F[9];
-extern const u8 gUnknown_08375618[9];
-extern const u8 gUnknown_08375621[9];
-extern const u8 gUnknown_0837562A[9];
-extern const u8 gUnknown_08375633[9];
-extern const u8 gUnknown_0837563C[9];
-extern const u8 gUnknown_08375645[9];
-extern const u8 gUnknown_0837564E[9];
-extern const u8 gUnknown_08375657[9];
-extern const u8 gUnknown_08375660[9];
-extern const u8 gUnknown_08375669[9];
-extern const u8 gUnknown_08375672[9];
-
u8 FieldObjectDirectionToImageAnimId(u8 direction)
{
return gUnknown_083755F4[direction];
@@ -3913,8 +5705,6 @@ void meta_step(struct MapObject *mapObject, struct Sprite *sprite, u8 (*callback
}
-extern const u8 gUnknown_083756C8[5];
-
u8 GetFaceDirectionAnimId(u8 index)
{
u8 directions[5];
@@ -3926,8 +5716,6 @@ u8 GetFaceDirectionAnimId(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756CD[5];
-
u8 GetSimpleGoAnimId(u8 index)
{
u8 directions[5];
@@ -3939,8 +5727,6 @@ u8 GetSimpleGoAnimId(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756D2[5];
-
u8 GetGoSpeed0AnimId(u8 index)
{
u8 directions[5];
@@ -3952,8 +5738,6 @@ u8 GetGoSpeed0AnimId(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756D7[5];
-
u8 sub_8060744(u8 index)
{
u8 directions[5];
@@ -3965,8 +5749,6 @@ u8 sub_8060744(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756DC[5];
-
u8 d2s_08064034(u8 index)
{
u8 directions[5];
@@ -3978,8 +5760,6 @@ u8 d2s_08064034(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756E1[5];
-
u8 sub_806079C(u8 index)
{
u8 directions[5];
@@ -3991,8 +5771,6 @@ u8 sub_806079C(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756E6[5];
-
u8 sub_80607C8(u8 index)
{
u8 directions[5];
@@ -4004,8 +5782,6 @@ u8 sub_80607C8(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756EB[5];
-
u8 sub_80607F4(u8 index)
{
u8 directions[5];
@@ -4017,8 +5793,6 @@ u8 sub_80607F4(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756F0[5];
-
u8 GetJumpLedgeAnimId(u8 index)
{
u8 directions[5];
@@ -4030,8 +5804,6 @@ u8 GetJumpLedgeAnimId(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756F5[5];
-
u8 sub_806084C(u8 index)
{
u8 directions[5];
@@ -4043,8 +5815,6 @@ u8 sub_806084C(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756FA[5];
-
u8 sub_8060878(u8 index)
{
u8 directions[5];
@@ -4056,8 +5826,6 @@ u8 sub_8060878(u8 index)
return directions[index];
}
-extern const u8 gUnknown_083756FF[5];
-
u8 sub_80608A4(u8 index)
{
u8 directions[5];
@@ -4069,8 +5837,6 @@ u8 sub_80608A4(u8 index)
return directions[index];
}
-extern const u8 gUnknown_08375704[5];
-
u8 sub_80608D0(u8 index)
{
u8 directions[5];
@@ -4082,8 +5848,6 @@ u8 sub_80608D0(u8 index)
return directions[index];
}
-extern const u8 gUnknown_08375709[5];
-
u8 GetStepInPlaceDelay32AnimId(u8 index)
{
u8 directions[5];
@@ -4095,8 +5859,6 @@ u8 GetStepInPlaceDelay32AnimId(u8 index)
return directions[index];
}
-extern const u8 gUnknown_0837570E[5];
-
u8 GetStepInPlaceDelay16AnimId(u8 index)
{
u8 directions[5];
@@ -4108,8 +5870,6 @@ u8 GetStepInPlaceDelay16AnimId(u8 index)
return directions[index];
}
-extern const u8 gUnknown_08375713[5];
-
u8 GetStepInPlaceDelay8AnimId(u8 index)
{
u8 directions[5];
@@ -4121,8 +5881,6 @@ u8 GetStepInPlaceDelay8AnimId(u8 index)
return directions[index];
}
-extern const u8 gUnknown_08375718[5];
-
u8 GetStepInPlaceDelay4AnimId(u8 index)
{
u8 directions[5];
@@ -4139,8 +5897,6 @@ u8 FieldObjectFaceOppositeDirection(struct MapObject *mapObject, u8 direction)
return FieldObjectSetSpecialAnim(mapObject, GetFaceDirectionAnimId(GetOppositeDirection(direction)));
}
-extern const u8 gUnknown_0837571D[5];
-
u8 sub_80609D8(u8 index)
{
u8 directions[5];
@@ -4152,8 +5908,6 @@ u8 sub_80609D8(u8 index)
return directions[index];
}
-extern const u8 gUnknown_08375722[5];
-
u8 sub_8060A04(u8 index)
{
u8 directions[5];
@@ -4165,8 +5919,6 @@ u8 sub_8060A04(u8 index)
return directions[index];
}
-extern const u8 gUnknown_08375727[5];
-
u8 sub_8060A30(u8 index)
{
u8 directions[5];
@@ -4178,8 +5930,6 @@ u8 sub_8060A30(u8 index)
return directions[index];
}
-extern const u8 gUnknown_0837572C[5];
-
u8 sub_8060A5C(u8 index)
{
u8 directions[5];
@@ -4191,8 +5941,6 @@ u8 sub_8060A5C(u8 index)
return directions[index];
}
-extern const u8 gUnknown_08375731[5];
-
u8 sub_8060A88(u8 index)
{
u8 directions[5];
@@ -4204,8 +5952,6 @@ u8 sub_8060A88(u8 index)
return directions[index];
}
-extern const u8 gUnknown_08375736[5];
-
u8 sub_8060AB4(u8 index)
{
u8 directions[5];
@@ -4217,8 +5963,6 @@ u8 sub_8060AB4(u8 index)
return directions[index];
}
-extern const u8 gUnknown_0837573B[5];
-
u8 sub_8060AE0(u8 index)
{
u8 directions[5];
@@ -4230,8 +5974,6 @@ u8 sub_8060AE0(u8 index)
return directions[index];
}
-extern const u8 gUnknown_08375740[5];
-
u8 sub_8060B0C(u8 index)
{
u8 directions[5];
@@ -4243,8 +5985,6 @@ u8 sub_8060B0C(u8 index)
return directions[index];
}
-extern const u8 gUnknown_08375745[5];
-
u8 sub_8060B38(u8 index)
{
u8 directions[5];
@@ -4256,8 +5996,6 @@ u8 sub_8060B38(u8 index)
return directions[index];
}
-extern const u8 gUnknown_0837574A[5];
-
u8 sub_8060B64(u8 index)
{
u8 directions[5];
@@ -4417,8 +6155,8 @@ extern u8 (*const gUnknown_083759C0[5])(u8);
void do_go_anim(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 a3)
{
- u8 (*functions[5])(u8);
- memcpy(functions, gUnknown_083759C0, sizeof(gUnknown_083759C0));
+ u8 (*const functions[5])(u8);
+ memcpy((void *)functions, gUnknown_083759C0, sizeof(gUnknown_083759C0));
sub_8060D20(mapObject, sprite, direction, a3);
sub_805FE28(mapObject, sprite, functions[a3](mapObject->mapobj_unk_18));
}
@@ -4620,9 +6358,6 @@ bool8 sub_806111C(struct MapObject *mapObject, struct Sprite *sprite)
return FALSE;
}
-extern const s16 gUnknown_08375A34[3];
-extern const s16 gUnknown_08375A3A[3];
-
void sub_806113C(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 a4, u8 a5)
{
s16 vSPp4[3];
diff --git a/src/field_map_obj_helpers.c b/src/field_map_obj_helpers.c
index afc3c680c..17584c96a 100644..100755
--- a/src/field_map_obj_helpers.c
+++ b/src/field_map_obj_helpers.c
@@ -1,14 +1,14 @@
#include "global.h"
-#include "asm.h"
-#include "asm_fieldmap.h"
+#include "field_map_obj_helpers.h"
#include "field_effect.h"
+#include "field_ground_effect.h"
+#include "field_map_obj.h"
#include "sprite.h"
typedef void (*SpriteStepFunc)(struct Sprite *sprite, u8 dir);
extern u32 gUnknown_0202FF84[];
-extern struct UCoords16 gDirectionToVector[];
extern s16 gUnknown_08376194[];
extern SpriteStepFunc *gUnknown_08376180[];
extern s8 *gUnknown_083761D0[];
@@ -76,26 +76,26 @@ void Step1(struct Sprite *sprite, u8 dir)
void Step2(struct Sprite *sprite, u8 dir)
{
- sprite->pos1.x += 2 * gDirectionToVector[dir].x;
- sprite->pos1.y += 2 * gDirectionToVector[dir].y;
+ sprite->pos1.x += 2 * (u16) gDirectionToVector[dir].x;
+ sprite->pos1.y += 2 * (u16) gDirectionToVector[dir].y;
}
void Step3(struct Sprite *sprite, u8 dir)
{
- sprite->pos1.x += 2 * gDirectionToVector[dir].x + gDirectionToVector[dir].x;
- sprite->pos1.y += 2 * gDirectionToVector[dir].y + gDirectionToVector[dir].y;
+ sprite->pos1.x += 2 * (u16) gDirectionToVector[dir].x + (u16) gDirectionToVector[dir].x;
+ sprite->pos1.y += 2 * (u16) gDirectionToVector[dir].y + (u16) gDirectionToVector[dir].y;
}
void Step4(struct Sprite *sprite, u8 dir)
{
- sprite->pos1.x += 4 * gDirectionToVector[dir].x;
- sprite->pos1.y += 4 * gDirectionToVector[dir].y;
+ sprite->pos1.x += 4 * (u16) gDirectionToVector[dir].x;
+ sprite->pos1.y += 4 * (u16) gDirectionToVector[dir].y;
}
void Step8(struct Sprite *sprite, u8 dir)
{
- sprite->pos1.x += 8 * gDirectionToVector[dir].x;
- sprite->pos1.y += 8 * gDirectionToVector[dir].y;
+ sprite->pos1.x += 8 * (u16) gDirectionToVector[dir].x;
+ sprite->pos1.y += 8 * (u16) gDirectionToVector[dir].y;
}
void oamt_npc_ministep_reset(struct Sprite *sprite, u8 a2, u8 a3)
diff --git a/src/field_message_box.c b/src/field_message_box.c
index 798725540..2cd2e66ab 100644
--- a/src/field_message_box.c
+++ b/src/field_message_box.c
@@ -1,14 +1,12 @@
#include "global.h"
#include "field_message_box.h"
+#include "menu.h"
#include "string_util.h"
#include "task.h"
#include "text.h"
#include "text_window.h"
extern struct Window gFieldMessageBoxWindow;
-extern u16 gMenuTextWindowContentTileOffset;
-
-extern u16 gMenuTextTileOffset;
static u8 sMessageBoxMode;
diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c
index 1e1162350..3cdb45584 100644
--- a/src/field_player_avatar.c
+++ b/src/field_player_avatar.c
@@ -1,23 +1,27 @@
#include "global.h"
#include "field_player_avatar.h"
-#include "asm.h"
-#include "asm_fieldmap.h"
#include "bike.h"
#include "event_data.h"
#include "field_effect.h"
+#include "field_effect_helpers.h"
+#include "field_ground_effect.h"
#include "field_map_obj.h"
#include "field_map_obj_helpers.h"
+#include "fieldmap.h"
#include "main.h"
#include "map_object_constants.h"
#include "menu.h"
#include "metatile_behavior.h"
+#include "party_menu.h"
#include "rng.h"
#include "rom4.h"
+#include "rotating_gate.h"
#include "script.h"
#include "songs.h"
#include "sound.h"
#include "strings2.h"
#include "task.h"
+#include "tv.h"
#include "wild_encounter.h"
extern u32 gUnknown_0202FF84[];
@@ -29,41 +33,14 @@ static void MovePlayerAvatarUsingKeypadInput(u8 a, u16 b, u16 c);
static void PlayerAllowForcedMovementIfMovingSameDirection(void);
static u8 TryDoMetatileBehaviorForcedMovement(void);
static u8 GetForcedMovementByMetatileBehavior(void);
-u8 ForcedMovement_None(void);
-u8 ForcedMovement_Slip(void);
-u8 sub_8058AAC(void);
-u8 sub_8058AC4(void);
-u8 sub_8058ADC(void);
-u8 sub_8058AF4(void);
-u8 sub_8058B0C(void);
-u8 sub_8058B24(void);
-u8 sub_8058B3C(void);
-u8 sub_8058B54(void);
-u8 ForcedMovement_SlideSouth(void);
-u8 ForcedMovement_SlideNorth(void);
-u8 ForcedMovement_SlideWest(void);
-u8 ForcedMovement_SlideEast(void);
-u8 sub_8058C04(void);
-u8 sub_8058C10(void);
-u8 ForcedMovement_MuddySlope(void);
static void MovePlayerNotOnBike(u8 a, u16 b);
static u8 CheckMovementInputNotOnBike(u8 a);
-void PlayerNotOnBikeNotMoving(u8 direction, u16 heldKeys);
-void PlayerNotOnBikeTurningInPlace(u8 direction, u16 heldKeys);
-void sub_8058D0C(u8 direction, u16 heldKeys);
static u8 CheckForPlayerAvatarCollision(u8 a);
static u8 sub_8058EF0(s16 a, s16 b, u8 c);
static bool8 ShouldJumpLedge(s16 a, s16 b, u8 c);
static u8 sub_8058F6C(s16 a, s16 b, u8 c);
static void check_acro_bike_metatile(int unused1, int unused2, u8 c, u8 *d);
static void DoPlayerAvatarTransition(void);
-void nullsub_49(struct MapObject *a);
-void PlayerAvatarTransition_Normal(struct MapObject *a);
-void PlayerAvatarTransition_MachBike(struct MapObject *a);
-void PlayerAvatarTransition_AcroBike(struct MapObject *a);
-void PlayerAvatarTransition_Surfing(struct MapObject *a);
-void PlayerAvatarTransition_Underwater(struct MapObject *a);
-void sub_80591F4(struct MapObject *a);
static bool8 player_is_anim_in_certain_ranges(void);
static bool8 sub_80592A4(void);
static bool8 PlayerIsAnimActive(void);
@@ -72,32 +49,8 @@ static void PlayerNotOnBikeCollide(u8 a);
static void PlayCollisionSoundIfNotFacingWarp(u8 a);
static void sub_8059D60(struct MapObject *a);
static void StartStrengthAnim(u8 a, u8 b);
-u8 sub_8059E84(struct Task *task, struct MapObject *b, struct MapObject *c);
-u8 sub_8059EA4(struct Task *task, struct MapObject *b, struct MapObject *c);
-u8 sub_8059F40(struct Task *task, struct MapObject *b, struct MapObject *c);
static void sub_8059F94(void);
-u8 sub_805A000(struct Task *task, struct MapObject *mapObject);
static void sub_805A06C(void);
-u8 sub_805A0D8(struct Task *task, struct MapObject *mapObject);
-u8 sub_805A100(struct Task *task, struct MapObject *mapObject);
-u8 sub_805A178(struct Task *task, struct MapObject *mapObject);
-u8 sub_805A1B8(struct Task *task, struct MapObject *mapObject);
-u8 Fishing1(struct Task *task);
-u8 Fishing2(struct Task *task);
-u8 Fishing3(struct Task *task);
-u8 Fishing4(struct Task *task);
-u8 Fishing5(struct Task *task);
-u8 Fishing6(struct Task *task);
-u8 Fishing7(struct Task *task);
-u8 Fishing8(struct Task *task);
-u8 Fishing9(struct Task *task);
-u8 Fishing10(struct Task *task);
-u8 Fishing11(struct Task *task);
-u8 Fishing12(struct Task *task);
-u8 Fishing13(struct Task *task);
-u8 Fishing14(struct Task *task);
-u8 Fishing15(struct Task *task);
-u8 Fishing16(struct Task *task);
static bool8 (*const gUnknown_0830FB58[])(u8) =
{
diff --git a/src/field_poison.c b/src/field_poison.c
index 4d4d4b975..8c9e029e1 100644
--- a/src/field_poison.c
+++ b/src/field_poison.c
@@ -1,13 +1,14 @@
#include "global.h"
-#include "asm.h"
+#include "field_poison.h"
#include "field_message_box.h"
+#include "fldeff_80C5CD4.h"
#include "pokemon.h"
+#include "pokemon_summary_screen.h"
#include "script.h"
#include "string_util.h"
#include "task.h"
#include "text.h"
-extern struct Pokemon gPlayerParty[6];
extern u16 gScriptResult;
extern u8 fieldPoisonText_PokemonFainted[];
diff --git a/src/field_region_map.c b/src/field_region_map.c
index 66e3d968c..58b0e37bc 100644
--- a/src/field_region_map.c
+++ b/src/field_region_map.c
@@ -1,17 +1,12 @@
#include "global.h"
-#include "asm.h"
+#include "field_region_map.h"
#include "main.h"
#include "menu.h"
#include "palette.h"
+#include "region_map.h"
#include "sprite.h"
-#include "text.h"
#include "strings2.h"
-
-extern void sub_80FA8EC(u32, u8);
-extern void sub_80FAB10(void);
-extern u8 sub_80FAB60(void);
-extern void sub_80FBCF0(u32, u8);
-extern void sub_80FBB3C(u16, u16);
+#include "text.h"
struct RegionMapStruct
{
@@ -30,12 +25,6 @@ struct UnkStruct
extern struct UnkStruct unk_2000000;
-void CB2_FieldInitRegionMap(void);
-void CB2_FieldRegionMap(void);
-void VBlankCB_FieldRegionMap(void);
-void sub_813EFDC(void);
-void sub_813F0C8(void);
-
void FieldInitRegionMap(MainCallback callback)
{
SetVBlankCallback(NULL);
diff --git a/src/field_special_scene.c b/src/field_special_scene.c
index 9e06ede81..c88ac8f65 100644
--- a/src/field_special_scene.c
+++ b/src/field_special_scene.c
@@ -1,11 +1,16 @@
#include "global.h"
#include "field_special_scene.h"
-#include "asm.h"
#include "event_data.h"
#include "field_camera.h"
+#include "field_fadetransition.h"
+#include "field_map_obj.h"
+#include "field_specials.h"
+#include "fieldmap.h"
+#include "main.h"
#include "palette.h"
#include "rom4.h"
#include "script.h"
+#include "script_movement.h"
#include "songs.h"
#include "sound.h"
#include "sprite.h"
diff --git a/src/field_specials.c b/src/field_specials.c
index 9f5a314e2..2cb2cf795 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -1,5 +1,6 @@
#include "global.h"
-#include "asm.h"
+#include "field_specials.h"
+#include "diploma.h"
#include "event_data.h"
#include "field_player_avatar.h"
#include "main.h"
diff --git a/src/field_weather.c b/src/field_weather.c
index ff5d5b507..5ff2eddf9 100644
--- a/src/field_weather.c
+++ b/src/field_weather.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "field_weather.h"
-#include "asm.h"
#include "palette.h"
#include "sprite.h"
#include "task.h"
diff --git a/src/fieldmap.c b/src/fieldmap.c
index 2ed2266f5..e573ec13a 100644
--- a/src/fieldmap.c
+++ b/src/fieldmap.c
@@ -1,14 +1,10 @@
#include "global.h"
#include "fieldmap.h"
#include "palette.h"
-
-extern struct MapHeader * const get_mapheader_by_bank_and_number(u8, u8);
-extern void mapheader_run_script_with_tag_x1(void);
-extern void sub_80BB970(struct MapEvents *);
-extern void sub_80BBCCC();
-extern void sub_8056670();
-extern void UpdateTVScreensOnMap();
-extern void sub_80538F0(u8 mapGroup, u8 mapNum);
+#include "rom4.h"
+#include "script.h"
+#include "secret_base.h"
+#include "tv.h"
struct ConnectionFlags
{
@@ -24,8 +20,6 @@ struct Coords32
s32 y;
};
-extern const struct Coords32 gUnknown_0821664C[];
-
EWRAM_DATA static u16 gUnknown_02029828[0x2800] = {0};
EWRAM_DATA struct MapHeader gMapHeader = {0};
EWRAM_DATA struct Camera gUnknown_0202E844 = {0};
@@ -33,17 +27,6 @@ EWRAM_DATA static struct ConnectionFlags gUnknown_0202E850 = {0};
static const struct ConnectionFlags sDummyConnectionFlags = {0};
-void mapheader_copy_mapdata_with_padding(struct MapHeader *mapHeader);
-void sub_80560AC(struct MapHeader *);
-void map_copy_with_padding(u16 *map, u16 width, u16 height);
-void fillSouthConnection(struct MapHeader *, struct MapHeader *, s32);
-void fillNorthConnection(struct MapHeader *, struct MapHeader *, s32);
-void fillWestConnection(struct MapHeader *, struct MapHeader *, s32);
-void fillEastConnection(struct MapHeader *, struct MapHeader *, s32);
-struct MapConnection *sub_8056A64(u8 direction, int x, int y);
-bool8 sub_8056ABC(u8 direction, int x, int y, struct MapConnection *connection);
-bool8 sub_8056B20(int x, int src_width, int dest_width, int offset);
-
struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection)
{
return get_mapheader_by_bank_and_number(connection->mapGroup, connection->mapNum);
@@ -352,7 +335,7 @@ union Block
u16 value;
};
-u16 MapGridGetZCoordAt(int x, int y)
+u8 MapGridGetZCoordAt(int x, int y)
{
u16 block;
int i;
@@ -378,7 +361,7 @@ u16 MapGridGetZCoordAt(int x, int y)
return block >> 12;
}
-u16 MapGridIsImpassableAt(int x, int y)
+u8 MapGridIsImpassableAt(int x, int y)
{
u16 block;
int i;
@@ -404,7 +387,7 @@ u16 MapGridIsImpassableAt(int x, int y)
return (block & 0xc00) >> 10;
}
-u16 MapGridGetMetatileIdAt(int x, int y)
+u32 MapGridGetMetatileIdAt(int x, int y)
{
u16 block;
int i;
@@ -444,7 +427,7 @@ u32 MapGridGetMetatileBehaviorAt(int x, int y)
return GetBehaviorByMetatileId(metatile) & 0xff;
}
-u16 MapGridGetMetatileLayerTypeAt(int x, int y)
+u8 MapGridGetMetatileLayerTypeAt(int x, int y)
{
u16 metatile;
metatile = MapGridGetMetatileIdAt(x, y);
diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c
index 4a2313499..e837dbd45 100644
--- a/src/fldeff_cut.c
+++ b/src/fldeff_cut.c
@@ -1,17 +1,20 @@
#include "global.h"
-#include "asm.h"
+#include "fldeff_cut.h"
#include "field_camera.h"
#include "field_effect.h"
#include "field_player_avatar.h"
+#include "fieldmap.h"
#include "map_obj_lock.h"
#include "metatile_behavior.h"
#include "metatile_behaviors.h"
+#include "pokemon_menu.h"
#include "rom4.h"
#include "rom6.h"
#include "script.h"
#include "songs.h"
#include "sound.h"
#include "sprite.h"
+#include "task.h"
#include "trig.h"
extern u8 gCutGrassSpriteArray[8]; // seems to be an array of 8 sprite IDs
@@ -28,18 +31,6 @@ extern u32 gUnknown_0202FF84[];
extern u8 UseCutScript;
-extern void sub_808AB90(void); // unknown args
-extern void sub_805BCC0(s16 x, s16 y);
-
-void sub_80A2634(void);
-void sub_80A25E8(void);
-void sub_80A2684(void);
-void sub_80A27A8(s16, s16);
-void sub_80A28F4(s16, s16);
-void objc_8097BBC(struct Sprite *sprite);
-void sub_80A2AB8(void);
-void sub_80A2B00(void); // unknown args
-
bool8 SetUpFieldMove_Cut(void)
{
s16 x, y;
diff --git a/src/fldeff_softboiled.c b/src/fldeff_softboiled.c
index d0ee712af..45f319c62 100644
--- a/src/fldeff_softboiled.c
+++ b/src/fldeff_softboiled.c
@@ -1,7 +1,9 @@
#include "global.h"
-#include "asm.h"
+#include "fldeff_softboiled.h"
#include "menu.h"
+#include "party_menu.h"
#include "pokemon.h"
+#include "pokemon_menu.h"
#include "songs.h"
#include "sound.h"
#include "sprite.h"
@@ -62,10 +64,6 @@ extern u8 gLastFieldPokeMenuOpened;
extern u8 unk_2000000[];
extern u8 gUnknown_0202E8F4;
-// Public
-bool8 SetUpFieldMove_SoftBoiled(void);
-void sub_8133D28(u8 taskid);
-
// Static
static void sub_8133D50(u8 taskId);
static void sub_8133E74(u8 taskId);
diff --git a/src/fldeff_strength.c b/src/fldeff_strength.c
index a831676b8..1edae09d4 100644
--- a/src/fldeff_strength.c
+++ b/src/fldeff_strength.c
@@ -1,8 +1,9 @@
#include "global.h"
-#include "asm.h"
#include "braille_puzzles.h"
#include "field_effect.h"
+#include "party_menu.h"
#include "pokemon.h"
+#include "pokemon_menu.h"
#include "rom6.h"
#include "script.h"
#include "task.h"
diff --git a/src/fldeff_sweetscent.c b/src/fldeff_sweetscent.c
index 3a9281ac2..6e782f4ac 100644
--- a/src/fldeff_sweetscent.c
+++ b/src/fldeff_sweetscent.c
@@ -1,8 +1,8 @@
#include "global.h"
-#include "asm.h"
#include "field_effect.h"
#include "field_player_avatar.h"
#include "palette.h"
+#include "pokemon_menu.h"
#include "rom6.h"
#include "script.h"
#include "sound.h"
diff --git a/src/fldeff_teleport.c b/src/fldeff_teleport.c
index 952193ff0..df12d3072 100644
--- a/src/fldeff_teleport.c
+++ b/src/fldeff_teleport.c
@@ -1,11 +1,11 @@
#include "global.h"
-#include "asm.h"
+#include "fldeff_teleport.h"
#include "field_effect.h"
#include "field_player_avatar.h"
+#include "pokemon_menu.h"
#include "rom4.h"
#include "rom6.h"
-
-extern void sub_8087BA8(void);
+#include "task.h"
extern u32 gUnknown_0202FF84[];
@@ -13,9 +13,6 @@ extern void (*gFieldCallback)(void);
extern u8 gLastFieldPokeMenuOpened;
extern void (*gUnknown_03005CE4)(void);
-void hm_teleport_run_dp02scr(void);
-void sub_814A404(void);
-
bool8 SetUpFieldMove_Teleport(void)
{
if (is_light_level_1_2_3_or_6(gMapHeader.mapType) == TRUE)
diff --git a/src/hof_pc.c b/src/hof_pc.c
index ca0c2f370..4646d171c 100644
--- a/src/hof_pc.c
+++ b/src/hof_pc.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "hall_of_fame.h"
#include "main.h"
#include "palette.h"
#include "rom4.h"
@@ -6,8 +7,8 @@
#include "script_menu.h"
#include "task.h"
-extern void sub_81428CC(void);
extern void (*gFieldCallback)(void);
+extern void (*gUnknown_0300485C)(void);
static void ReshowPCMenuAfterHallOfFamePC(void);
static void Task_WaitForPaletteFade(u8);
diff --git a/src/intro.c b/src/intro.c
index ba2197ae7..462a2134d 100644
--- a/src/intro.c
+++ b/src/intro.c
@@ -1,9 +1,10 @@
#include "global.h"
#include "gba/m4a_internal.h"
#include "intro.h"
-#include "asm.h"
#include "data2.h"
#include "decompress.h"
+#include "hall_of_fame.h"
+#include "intro_credits_graphics.h"
#include "libgncmultiboot.h"
#include "link.h"
#include "m4a.h"
@@ -18,9 +19,7 @@
#include "task.h"
#include "title_screen.h"
#include "trig.h"
-
-extern void *species_and_otid_get_pal(/*TODO: arg types*/);
-extern void sub_8143680(int, u8);
+#include "unknown_task.h"
extern struct SpriteTemplate gUnknown_02024E8C;
extern u16 gUnknown_02039318;
@@ -32,17 +31,10 @@ extern struct GcmbStruct gMultibootProgramStruct;
extern u16 gSaveFileStatus;
extern u8 gReservedSpritePaletteCount;
extern const u8 gInterfaceGfx_PokeBall[];
-extern const u16 gInterfacePal_PokeBall[];
-extern const struct SpriteSheet gIntro2BrendanSpriteSheet;
-extern const struct SpriteSheet gIntro2MaySpriteSheet;
-extern const struct SpriteSheet gIntro2BicycleSpriteSheet;
-extern const struct SpriteSheet gIntro2LatiosSpriteSheet;
-extern const struct SpriteSheet gIntro2LatiasSpriteSheet;
-extern const struct SpritePalette gIntro2SpritePalettes[];
+extern const u8 gInterfacePal_PokeBall[];
extern const u8 gIntroCopyright_Gfx[];
extern const u16 gIntroCopyright_Pal[];
extern const u16 gIntroCopyright_Tilemap[];
-extern const u16 gUnknown_08393E64[];
extern void *const gUnknown_0840B5A0[];
//--------------------------------------------------
@@ -51,7 +43,11 @@ extern void *const gUnknown_0840B5A0[];
static const u16 Palette_406340[] = INCBIN_U16("graphics/intro/unknown1.gbapal");
static const u16 Palette_406360[] = INCBIN_U16("graphics/intro/unknown2.gbapal");
+#if ENGLISH
static const u8 gIntroTiles[] = INCBIN_U8("graphics/intro/intro.4bpp.lz");
+#elif GERMAN
+extern const u8 gIntroTiles[];
+#endif
static const u16 gIntro1BGPals[][16] =
{
INCBIN_U16("graphics/intro/intro1_bgpal1.gbapal"),
@@ -419,12 +415,12 @@ static const struct SpriteTemplate gSpriteTemplate_840AFF0 =
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_813DA64,
};
-const struct SpriteSheet gUnknown_0840B008[] =
+const struct CompressedSpriteSheet gUnknown_0840B008[] =
{
{gIntroTiles, 0x1400, 2000},
{NULL},
};
-const struct SpriteSheet gUnknown_0840B018[] =
+const struct CompressedSpriteSheet gUnknown_0840B018[] =
{
{gIntro1EonTiles, 0x400, 2002},
{NULL},
@@ -746,17 +742,17 @@ static const struct SpriteTemplate gSpriteTemplate_840B1F4 =
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_813EDFC,
};
-const struct SpriteSheet gIntro3PokeballGfx_Table[] =
+const struct CompressedSpriteSheet gIntro3PokeballGfx_Table[] =
{
{gInterfaceGfx_PokeBall, 0x100, 2002},
{NULL},
};
-const struct SpriteSheet gIntro3MiscGfx_Table[] =
+const struct CompressedSpriteSheet gIntro3MiscGfx_Table[] =
{
{gIntro3MiscTiles, 0xa00, 2003},
{NULL},
};
-const struct SpritePalette gInterfacePokeballPal_Table[] =
+const struct CompressedSpritePalette gInterfacePokeballPal_Table[] =
{
{gInterfacePal_PokeBall, 2002},
{NULL},
@@ -1780,15 +1776,15 @@ void sub_813CE30(u16 scrX, u16 scrY, u16 zoom, u16 alpha)
static u16 sub_813CE88(u16 species, s16 x, s16 y, u16 d, u8 front)
{
- void *pal;
+ const u8 *lzPaletteData;
u8 spriteId;
if (front)
LoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, 0x2000000, gUnknown_0840B5A0[d], species, 0, 1);
else
LoadSpecialPokePic(&gMonBackPicTable[species], gMonBackPicCoords[species].coords, gMonBackPicCoords[species].y_offset, 0x2000000, gUnknown_0840B5A0[d], species, 0, 0);
- pal = species_and_otid_get_pal(species, 0, 0xFFFF);
- LoadCompressedPalette(pal, 0x100 + d * 0x10, 0x20);
+ lzPaletteData = species_and_otid_get_pal(species, 0, 0xFFFF);
+ LoadCompressedPalette(lzPaletteData, 0x100 + d * 0x10, 0x20);
sub_8143648(d, d);
spriteId = CreateSprite(&gUnknown_02024E8C, x, y, (d + 1) * 4);
gSprites[spriteId].oam.paletteNum = d;
diff --git a/src/item.c b/src/item.c
index ad2b9aed3..2eb013490 100644
--- a/src/item.c
+++ b/src/item.c
@@ -1,10 +1,10 @@
#include "global.h"
#include "item.h"
+#include "items.h"
+#include "berry.h"
#include "string_util.h"
#include "strings.h"
-extern struct Berry *GetBerryInfo(u8 berry);
-
extern u8 gUnknown_02038560;
extern struct Item gItems[];
@@ -29,9 +29,9 @@ static void CompactPCItems(void);
void CopyItemName(u16 itemId, u8 *string)
{
- if (itemId == 0xAF)
+ if (itemId == ITEM_ENIGMA_BERRY)
{
- StringCopy(string, GetBerryInfo(0x2B)->name);
+ StringCopy(string, GetBerryInfo(0x2B)->name); // berry 0x2b = enigma berry
StringAppend(string, gOtherText_Berry2);
}
else
diff --git a/src/item_use.c b/src/item_use.c
index c04cf9d7a..a92161e9a 100644
--- a/src/item_use.c
+++ b/src/item_use.c
@@ -1,15 +1,19 @@
#include "global.h"
-#include "asm.h"
+#include "item_use.h"
#include "battle.h"
#include "berry.h"
+#include "bike.h"
#include "coins.h"
#include "data2.h"
#include "event_data.h"
+#include "field_effect.h"
+#include "field_fadetransition.h"
#include "field_map_obj_helpers.h"
#include "field_player_avatar.h"
#include "field_weather.h"
#include "fieldmap.h"
#include "item.h"
+#include "item_menu.h"
#include "items.h"
#include "mail.h"
#include "main.h"
@@ -18,7 +22,12 @@
#include "menu_helpers.h"
#include "metatile_behavior.h"
#include "palette.h"
+#include "party_menu.h"
+#include "pokeblock.h"
+#include "pokemon_item_effect.h"
+#include "pokemon_menu.h"
#include "rom4.h"
+#include "rom_8094928.h"
#include "script.h"
#include "songs.h"
#include "sound.h"
@@ -29,73 +38,21 @@
extern void (* gUnknown_03005D00)(u8);
extern void (* gFieldCallback)(void);
-extern void (* gUnknown_03004AE4)(u8);
+extern void (* gUnknown_0300485C)(void);
+extern void (* gUnknown_03004AE4)(u8, u16, TaskFunc);
extern u8 gUnknown_02038561;
extern u8 gLastFieldPokeMenuOpened;
-extern u8 gUnknown_02024E6C;
+extern u8 gBankInMenu;
extern u8 gUnknown_081A1654[];
extern u8 gUnknown_081A168F[];
-extern u16 gUnknown_02024A6A[];
-
-extern void HandleItemMenuPaletteFade(u8);
-extern void ExecuteItemUseFromBlackPalette(void);
-extern void DisplayItemMessageOnField(u8, const u8 *, TaskFunc, u16);
-extern void CleanUpItemMenuMessage(u8);
-extern void CleanUpOverworldMessage(u8);
-extern void ItemUseOnFieldCB_Bike(u8);
-extern void ItemUseOnFieldCB_Rod(u8);
-extern void ItemUseOnFieldCB_Itemfinder(u8);
-extern void sub_80A5D04(void);
-extern bool8 IsBikingDisallowedByPlayer(void);
-extern void GetOnOffBike(u8);
-extern struct MapConnection *sub_8056BA0(s16 x, s16 y); // fieldmap.c
-extern void sub_810BA7C(u8);
-extern void sub_8080E28(void);
-extern void UseMedicine(u8);
-extern void sub_8070048(u8);
-extern void DoPPRecoveryItemEffect(u8);
-extern void DoPPUpItemEffect(u8);
-extern void DoRareCandyItemEffect(u8);
-extern void DoEvolutionStoneItemEffect(u8);
-extern u16 ItemIdToBattleMoveId(u16);
-extern void sub_80A3FA0(u16 *, u32, u32, u32, u32, u32);
-extern void sub_80A3E0C(void);
-extern void TeachMonTMMove(u8);
-extern void sub_80878A8(void);
-extern void sub_8053014(void);
-extern void sub_80A7094(u8);
-extern bool8 ExecuteTableBasedItemEffect_(struct Pokemon *mon, u16, u8, u16);
-extern void sub_8094E4C(void);
-extern u8 ExecuteTableBasedItemEffect__(u8 u8, u16 u16, int i);
-extern u8 GetItemEffectType();
-extern void sub_808B020(void);
-extern void sub_810B96C(void);
+extern u16 gBattlePartyID[];
extern u16 gScriptItemId;
extern u16 gBattleTypeFlags;
-bool8 ItemfinderCheckForHiddenItems(struct MapEvents *events, u8 taskId);
-void RunItemfinderResults(u8);
-void ExitItemfinder(u8);
-void sub_80C9720(u8);
-void sub_80C9838(u8, s16, s16);
-u8 GetPlayerDirectionTowardsHiddenItem(s16, s16);
-void SetPlayerDirectionTowardsItem(u8);
-void DisplayItemRespondingMessageAndExitItemfinder(u8);
-void RotatePlayerAndExitItemfinder(u8);
-void sub_80C9D00(u8);
-void sub_80C9D74(u8);
-void sub_80C9EE4(u8);
-void sub_80C9F10(u8);
-void sub_80C9F80(u8);
-void sub_80C9FC0(u8);
-void ItemUseOutOfBattle_TMHM(u8);
-void ItemUseOutOfBattle_EvolutionStone(u8);
-void ItemUseOutOfBattle_CannotUse(u8);
-
static const u8 gSSTidalBetaString[] = _("この チケットで ふねに のりほうだい\nはやく のってみたいな");
static const u8 gSSTidalBetaString2[] = _("この チケットで ふねに のりほうだい\nはやく のってみたいな");
@@ -1086,7 +1043,7 @@ void sub_80CA2BC(u8 taskId)
void ItemUseInBattle_StatIncrease(u8 taskId)
{
- u16 partyId = gUnknown_02024A6A[gUnknown_02024E6C];
+ u16 partyId = gBattlePartyID[gBankInMenu];
MenuZeroFillWindowRect(0, 0xD, 0xD, 0x14);
diff --git a/src/link.c b/src/link.c
index 17e78e0a5..363a8b494 100644
--- a/src/link.c
+++ b/src/link.c
@@ -1,7 +1,9 @@
#include "global.h"
#include "link.h"
-#include "asm.h"
#include "battle.h"
+#include "berry.h"
+#include "berry_blender.h"
+#include "hall_of_fame.h"
#include "main.h"
#include "menu.h"
#include "palette.h"
@@ -75,6 +77,7 @@ static void sub_80083E0(void);
static void sub_8008454(void);
static void sub_80084C8(void);
static void sub_80084F4(void);
+
static void CheckErrorStatus(void);
static void CB2_PrintErrorMessage(void);
static u8 IsSioMultiMaster(void);
@@ -175,13 +178,13 @@ static const u8 sDebugMessages[7][12] =
static const u8 sColorCodes[] = _("{HIGHLIGHT TRANSPARENT}{COLOR WHITE2}");
-static const u32 sBlockRequestLookupTable[5 * 2] =
+const struct BlockRequest sBlockRequestLookupTable[5] =
{
- (u32)gBlockSendBuffer, 200,
- (u32)gBlockSendBuffer, 200,
- (u32)gBlockSendBuffer, 100,
- (u32)gBlockSendBuffer, 220,
- (u32)gBlockSendBuffer, 40,
+ {gBlockSendBuffer, 200},
+ {gBlockSendBuffer, 200},
+ {gBlockSendBuffer, 100},
+ {gBlockSendBuffer, 220},
+ {gBlockSendBuffer, 40},
};
static const u8 sTestString[] = _("テストな");
@@ -557,7 +560,7 @@ static void ProcessRecvCmds(u8 unusedParam)
break;
case 0xCCCC:
#if defined(ENGLISH)
- SendBlock(0, (void *)(sBlockRequestLookupTable)[gRecvCmds[1][i] * 2], (sBlockRequestLookupTable + 1)[gRecvCmds[1][i] * 2]);
+ SendBlock(0, sBlockRequestLookupTable[gRecvCmds[1][i]].address, sBlockRequestLookupTable[gRecvCmds[1][i]].size);
#elif defined(GERMAN)
if (deUnkValue2 == 1)
{
@@ -566,7 +569,7 @@ static void ProcessRecvCmds(u8 unusedParam)
}
else if (deUnkValue2 == 2 || deUnkValue2 == 3)
{
- SendBlock(0, (void *)(sBlockRequestLookupTable)[gRecvCmds[1][i] * 2], (sBlockRequestLookupTable + 1)[gRecvCmds[1][i] * 2]);
+ SendBlock(0, sBlockRequestLookupTable[gRecvCmds[1][i]].address, sBlockRequestLookupTable[gRecvCmds[1][i]].size);
if (deUnkValue2 == 2)
deUnkValue2 = 1;
@@ -575,7 +578,7 @@ static void ProcessRecvCmds(u8 unusedParam)
}
else
{
- SendBlock(0, (void *)(sBlockRequestLookupTable)[gRecvCmds[1][i] * 2], (sBlockRequestLookupTable + 1)[gRecvCmds[1][i] * 2]);
+ SendBlock(0, sBlockRequestLookupTable[gRecvCmds[1][i]].address, sBlockRequestLookupTable[gRecvCmds[1][i]].size);
}
#endif
break;
diff --git a/src/load_save.c b/src/load_save.c
index 0add1b0e3..0630f060c 100644
--- a/src/load_save.c
+++ b/src/load_save.c
@@ -1,7 +1,6 @@
#include "global.h"
#include "gba/flash_internal.h"
#include "load_save.h"
-#include "asm.h"
#include "main.h"
#include "pokemon.h"
#include "rom4.h"
diff --git a/src/lottery_corner.c b/src/lottery_corner.c
index 66e1238ef..c2c25b9ac 100644
--- a/src/lottery_corner.c
+++ b/src/lottery_corner.c
@@ -9,7 +9,6 @@
extern u16 gScriptResult;
extern u16 gSpecialVar_0x8004;
-extern struct Pokemon gPlayerParty[6];
extern struct PokemonStorage gPokemonStorage;
extern u16 gSpecialVar_0x8005;
extern u16 gSpecialVar_0x8006;
diff --git a/src/mail.c b/src/mail.c
index 4ec107011..658d37976 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -1,16 +1,20 @@
#include "global.h"
#include "mail.h"
-#include "asm.h"
+#include "easy_chat.h"
#include "items.h"
+#include "mail_data.h"
#include "menu.h"
+#include "menu_helpers.h"
#include "name_string_util.h"
#include "palette.h"
+#include "pokemon_icon.h"
#include "rom4.h"
#include "sprite.h"
#include "string_util.h"
#include "strings2.h"
#include "task.h"
#include "text.h"
+#include "unknown_task.h"
struct UnkMailStruct
{
@@ -84,7 +88,7 @@ static void sub_80F8FB4(void);
void HandleReadMail(struct MailStruct *arg0, MainCallback arg1, bool8 arg2)
{
u16 mailDesign;
- u8 buffer[4];
+ u16 buffer[2];
ewram0.varFF = GAME_LANGUAGE;
ewram0.var100 = 1;
diff --git a/src/mail_data.c b/src/mail_data.c
index 23d22e21f..ae3f4b3e8 100644
--- a/src/mail_data.c
+++ b/src/mail_data.c
@@ -1,15 +1,12 @@
#include "global.h"
+#include "mail_data.h"
#include "items.h"
#include "name_string_util.h"
#include "pokemon.h"
+#include "pokemon_icon.h"
#include "species.h"
#include "text.h"
-void ClearMailStruct(struct MailStruct *);
-u16 SpeciesToMailSpecies(u16, u32);
-bool8 ItemIsMail(u16);
-u16 GetUnownLetterByPersonality(u32);
-
void ClearMailData(void)
{
u8 i;
diff --git a/src/main.c b/src/main.c
index 19891459c..afaa0e77a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,17 +2,18 @@
#include "gba/flash_internal.h"
#include "gba/m4a_internal.h"
#include "main.h"
-#include "asm.h"
#include "intro.h"
#include "link.h"
#include "load_save.h"
#include "m4a.h"
#include "play_time.h"
#include "rng.h"
+#include "rom3.h"
#include "rom4.h"
#include "rtc.h"
#include "siirtc.h"
#include "sound.h"
+#include "unknown_task.h"
extern struct SoundInfo gSoundInfo;
extern u32 IntrMain[];
diff --git a/src/main_menu.c b/src/main_menu.c
index ac26d604d..09fd06d9e 100644
--- a/src/main_menu.c
+++ b/src/main_menu.c
@@ -1,14 +1,15 @@
#include "global.h"
#include "main_menu.h"
-#include "asm.h"
#include "data2.h"
#include "decompress.h"
#include "event_data.h"
+#include "field_effect.h"
#include "menu.h"
#include "mystery_event_menu.h"
#include "naming_screen.h"
#include "option_menu.h"
#include "palette.h"
+#include "pokeball.h"
#include "rom4.h"
#include "rtc.h"
#include "save_menu_util.h"
@@ -20,6 +21,7 @@
#include "task.h"
#include "text.h"
#include "title_screen.h"
+#include "unknown_task.h"
#define BirchSpeechUpdateWindowText() ((u8)MenuUpdateWindowText_OverrideLineLength(24))
diff --git a/src/map_name_popup.c b/src/map_name_popup.c
index c10a3f9de..303cc3d07 100644
--- a/src/map_name_popup.c
+++ b/src/map_name_popup.c
@@ -1,7 +1,8 @@
#include "global.h"
-#include "asm.h"
+#include "map_name_popup.h"
#include "event_data.h"
#include "menu.h"
+#include "region_map.h"
#include "task.h"
EWRAM_DATA static u8 sTaskId = 0;
diff --git a/src/map_obj_lock.c b/src/map_obj_lock.c
index 713ca03f9..bd40bcacc 100644
--- a/src/map_obj_lock.c
+++ b/src/map_obj_lock.c
@@ -1,8 +1,9 @@
#include "global.h"
#include "map_obj_lock.h"
-#include "asm.h"
+#include "field_map_obj.h"
#include "field_map_obj_helpers.h"
#include "field_player_avatar.h"
+#include "script_movement.h"
#include "task.h"
extern u16 gScriptFacing;
diff --git a/src/matsuda_debug_menu.c b/src/matsuda_debug_menu.c
index 018e36567..3665cabd8 100644
--- a/src/matsuda_debug_menu.c
+++ b/src/matsuda_debug_menu.c
@@ -1,7 +1,8 @@
#include "global.h"
#include "matsuda_debug_menu.h"
-#include "asm.h"
#include "contest.h"
+#include "contest_link_80C2020.h"
+#include "contest_link_80C857C.h"
#include "data2.h"
#include "link.h"
#include "main.h"
@@ -13,6 +14,7 @@
#include "string_util.h"
#include "task.h"
#include "text.h"
+#include "unknown_task.h"
extern u8 gUnknown_0203856C;
extern u8 gUnknown_0203857D[][64];
@@ -27,8 +29,6 @@ extern u8 gContestPlayerMonIndex;
extern u16 gScriptContestCategory;
extern u16 gScriptContestRank;
-extern struct Window gMenuWindow;
-
extern u16 gUnknown_030042A4;
extern u16 gUnknown_030042A0;
extern u16 gUnknown_030042C0;
@@ -84,8 +84,6 @@ static void sub_80AA10C(void);
static void sub_80AA5BC(u8);
static void sub_80AA614(u8, u8);
static void sub_80AAD08(struct Sprite *, s8);
-extern void sub_80AB47C(void);
-extern int sub_80B2A7C(u8); //Don't know return type size
u8 unref_sub_80A9B28(void)
{
diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c
index d6fb33917..93684fc60 100644
--- a/src/mauville_old_man.c
+++ b/src/mauville_old_man.c
@@ -1,20 +1,16 @@
#include "global.h"
-#include "asm.h"
+#include "mauville_old_man.h"
+#include "easy_chat.h"
#include "menu.h"
#include "rng.h"
#include "script.h"
#include "string_util.h"
#include "strings.h"
+#include "trader.h"
extern u16 gScriptResult;
extern u16 gSpecialVar_0x8004;
-extern void sub_80F83F8(void);
-extern void sub_81099CC(void);
-extern void sub_80F83D0(void);
-extern void sub_80F7F80(u8);
-extern u16 sub_80EB8EC(void);
-extern void sub_80F7DC0(void);
extern u32 gUnknown_083E5388[];
extern u32 gUnknown_083E53A8[];
diff --git a/src/menu.c b/src/menu.c
index d84a4c3c5..45cfbbc2f 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -9,6 +9,7 @@
#include "strings.h"
#include "text.h"
#include "text_window.h"
+#include "string_util.h"
struct Menu
{
@@ -611,6 +612,7 @@ u8 unref_sub_8072A5C(u8 *dest, u8 *src, u8 left, u16 top, u8 width, u32 a6)
return sub_8004FD0(gMenuWindowPtr, dest, src, gMenuTextTileOffset, left, top, width, a6);
}
+#if ENGLISH
int sub_8072AB0(const u8 *str, u8 left, u16 top, u8 width, u8 height, u32 a6)
{
u8 newlineCount = sub_8004FD0(gMenuWindowPtr, NULL, str, gMenuTextTileOffset, left, top, width, a6);
@@ -623,6 +625,90 @@ int sub_8072AB0(const u8 *str, u8 left, u16 top, u8 width, u8 height, u32 a6)
if (newlineCount < height)
MenuFillWindowRectWithBlankTile(left, top + 2 * newlineCount, left + width - 1, height + top - 1);
}
+#elif GERMAN
+__attribute__((naked))
+int sub_8072AB0(const u8 *str, u8 left, u16 top, u8 width, u8 height, u32 a6)
+{
+ asm(".syntax unified\n\
+ push {r4-r7,lr}\n\
+ sub sp, 0x10\n\
+ mov r12, r0\n\
+ ldr r0, [sp, 0x24]\n\
+ ldr r4, [sp, 0x28]\n\
+ str r4, [sp, 0xC]\n\
+ lsls r1, 24\n\
+ lsrs r5, r1, 24\n\
+ lsls r2, 16\n\
+ lsrs r4, r2, 16\n\
+ lsls r3, 24\n\
+ lsrs r6, r3, 24\n\
+ lsls r0, 24\n\
+ lsrs r7, r0, 24\n\
+ ldr r0, _08072AF8 @ =gMenuWindowPtr\n\
+ ldr r0, [r0]\n\
+ ldr r1, _08072AFC @ =gMenuTextTileOffset\n\
+ ldrh r3, [r1]\n\
+ str r5, [sp]\n\
+ str r4, [sp, 0x4]\n\
+ str r6, [sp, 0x8]\n\
+ movs r1, 0\n\
+ mov r2, r12\n\
+ bl sub_8004FD0\n\
+ adds r1, r0, 0\n\
+ lsls r1, 24\n\
+ lsrs r2, r1, 24\n\
+ movs r3, 0x7\n\
+ ands r3, r5\n\
+ cmp r3, 0\n\
+ bne _08072B00\n\
+ adds r1, r6, 0x7\n\
+ asrs r1, 3\n\
+ subs r1, 0x1\n\
+ b _08072B0C\n\
+ .align 2, 0\n\
+_08072AF8: .4byte gMenuWindowPtr\n\
+_08072AFC: .4byte gMenuTextTileOffset\n\
+_08072B00:\n\
+ adds r3, r6, r3\n\
+ subs r1, r3, 0x1\n\
+ cmp r1, 0\n\
+ bge _08072B0A\n\
+ adds r1, r3, 0x6\n\
+_08072B0A:\n\
+ asrs r1, 3\n\
+_08072B0C:\n\
+ lsls r1, 24\n\
+ lsrs r1, 24\n\
+ adds r6, r1, 0\n\
+ lsrs r5, 3\n\
+ adds r1, r7, 0x7\n\
+ asrs r1, 3\n\
+ lsls r1, 24\n\
+ lsrs r7, r1, 24\n\
+ lsrs r4, 3\n\
+ cmp r2, r7\n\
+ bcs _08072B3E\n\
+ lsls r1, r2, 1\n\
+ adds r1, r4, r1\n\
+ lsls r1, 24\n\
+ lsrs r1, 24\n\
+ adds r2, r5, r6\n\
+ lsls r2, 24\n\
+ lsrs r2, 24\n\
+ adds r3, r7, r4\n\
+ subs r3, 0x1\n\
+ lsls r3, 24\n\
+ lsrs r3, 24\n\
+ adds r0, r5, 0\n\
+ bl MenuFillWindowRectWithBlankTile\n\
+_08072B3E:\n\
+ add sp, 0x10\n\
+ pop {r4-r7}\n\
+ pop {r1}\n\
+ bx r1\n\
+ .syntax divided\n");
+}
+#endif
void MenuPrint_RightAligned(u8 *str, u8 left, u8 top)
{
@@ -735,3 +821,51 @@ void HandleDestroyMenuCursors(void)
{
DestroyMenuCursor();
}
+
+#if GERMAN
+void de_sub_8073110(u8 * buffer, u8 * name) {
+ u8 * ptr, *ptr2, *ptr3;
+
+ ptr2 = buffer;
+ ptr = &gStringVar1[1 + StringLengthN(gStringVar1, 256)];
+ ptr3 = ptr;
+
+ for (;;)
+ {
+ if (*ptr2 == EOS)
+ break;
+
+ if (*ptr2 == 0xFD)
+ {
+
+ *ptr3 = EOS;
+ ptr2 += 2;
+
+ StringAppend(ptr, name);
+ StringAppend(ptr, ptr2);
+
+ buffer[0] = EOS;
+ StringAppend(buffer, ptr);
+ break;
+ }
+
+ *ptr3 = *ptr2;
+ ptr2 += 1;
+ ptr3 += 1;
+ }
+}
+
+u8 *de_sub_8073174(u8 *name, const u8 *format) {
+ u32 offset;
+ u8 *ptr;
+
+ offset = StringLengthN(gStringVar2, 0x100);
+ ptr = &gStringVar2[1 + offset];
+
+ StringCopy(ptr, format);
+
+ de_sub_8073110(ptr, name);
+
+ return StringCopy(name, ptr);
+}
+#endif
diff --git a/src/menu_cursor.c b/src/menu_cursor.c
index cfb38ca47..2dc36cf32 100644
--- a/src/menu_cursor.c
+++ b/src/menu_cursor.c
@@ -253,7 +253,7 @@ void sub_814A958(u8 a1)
SetSubspriteTables(&gSprites[gUnknown_0203A3D1], &gSubspriteTables_842F5C0[v8]);
return;
}
-#else
+#elif ENGLISH
__attribute__((naked))
void sub_814A958(u8 a1)
{
@@ -435,6 +435,189 @@ _0814AAB4: .4byte gSubspriteTables_842F5C0\n\
_0814AAB8: .4byte gUnknown_0203A3D1\n\
.syntax divided\n");
}
+#elif GERMAN
+__attribute__((naked))
+void sub_814A958(u8 a1)
+{
+ asm(".syntax unified\n\
+ push {r4-r7,lr}\n\
+ mov r7, r10\n\
+ mov r6, r9\n\
+ mov r5, r8\n\
+ push {r5-r7}\n\
+ sub sp, 0x4\n\
+ lsls r0, 24\n\
+ ldr r4, _0814A9C4 @ =gMenuCursorSubsprites\n\
+ ldr r2, _0814A9C8 @ =0x0000ffff\n\
+ lsrs r0, 24\n\
+ str r0, [sp]\n\
+ ldr r0, _0814A9CC @ =gUnknown_0842F780\n\
+ ldr r1, [r0, 0x4]\n\
+ ldr r0, [r0]\n\
+ str r0, [r4]\n\
+ str r1, [r4, 0x4]\n\
+ strh r2, [r4]\n\
+ adds r4, 0x8\n\
+ movs r7, 0x1\n\
+ movs r2, 0x1\n\
+ ldr r1, [sp]\n\
+ subs r0, r1, 0x1\n\
+ lsls r0, 16\n\
+ lsrs r3, r0, 16\n\
+ asrs r0, 16\n\
+ cmp r0, 0x7\n\
+ ble _0814AA3E\n\
+ ldr r0, _0814A9D0 @ =gUnknown_0842F788\n\
+ mov r12, r0\n\
+ mov r8, r1\n\
+ movs r1, 0x8\n\
+ negs r1, r1\n\
+ mov r10, r1\n\
+ ldr r5, _0814A9D4 @ =gUnknown_0842F790\n\
+ mov r9, r5\n\
+_0814A99E:\n\
+ lsls r0, r3, 16\n\
+ asrs r3, r0, 16\n\
+ cmp r3, 0x1F\n\
+ ble _0814A9D8\n\
+ mov r6, r12\n\
+ ldr r0, [r6]\n\
+ ldr r1, [r6, 0x4]\n\
+ str r0, [r4]\n\
+ str r1, [r4, 0x4]\n\
+ strh r2, [r4]\n\
+ lsls r0, r2, 16\n\
+ movs r1, 0x80\n\
+ lsls r1, 14\n\
+ adds r0, r1\n\
+ lsrs r2, r0, 16\n\
+ ldr r3, [sp]\n\
+ lsls r5, r3, 16\n\
+ b _0814AA24\n\
+ .align 2, 0\n\
+_0814A9C4: .4byte gMenuCursorSubsprites\n\
+_0814A9C8: .4byte 0x0000ffff\n\
+_0814A9CC: .4byte gUnknown_0842F780\n\
+_0814A9D0: .4byte gUnknown_0842F788\n\
+_0814A9D4: .4byte gUnknown_0842F790\n\
+_0814A9D8:\n\
+ ldr r6, [sp]\n\
+ lsls r5, r6, 16\n\
+ mov r0, r8\n\
+ cmp r0, 0x27\n\
+ ble _0814AA0E\n\
+ cmp r3, 0x8\n\
+ ble _0814AA0E\n\
+ mov r6, r12\n\
+ ldr r0, [r6]\n\
+ ldr r1, [r6, 0x4]\n\
+ str r0, [r4]\n\
+ str r1, [r4, 0x4]\n\
+ lsls r1, r2, 16\n\
+ asrs r1, 16\n\
+ adds r2, r1, 0\n\
+ subs r2, 0x20\n\
+ adds r0, r3, 0\n\
+ mov r6, r10\n\
+ ands r0, r6\n\
+ adds r2, r0\n\
+ strh r2, [r4]\n\
+ movs r0, 0x18\n\
+ ands r0, r3\n\
+ adds r1, r0\n\
+ lsls r1, 16\n\
+ lsrs r2, r1, 16\n\
+ b _0814AA24\n\
+_0814AA0E:\n\
+ mov r3, r9\n\
+ ldr r0, [r3]\n\
+ ldr r1, [r3, 0x4]\n\
+ str r0, [r4]\n\
+ str r1, [r4, 0x4]\n\
+ strh r2, [r4]\n\
+ lsls r0, r2, 16\n\
+ movs r6, 0x80\n\
+ lsls r6, 12\n\
+ adds r0, r6\n\
+ lsrs r2, r0, 16\n\
+_0814AA24:\n\
+ adds r4, 0x8\n\
+ adds r0, r7, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r7, r0, 24\n\
+ asrs r1, r5, 16\n\
+ lsls r0, r2, 16\n\
+ asrs r0, 16\n\
+ subs r1, r0\n\
+ lsls r1, 16\n\
+ lsrs r3, r1, 16\n\
+ asrs r1, 16\n\
+ cmp r1, 0x7\n\
+ bgt _0814A99E\n\
+_0814AA3E:\n\
+ ldr r5, _0814AAAC @ =0x0843d6d8\n\
+ ldr r0, [r5]\n\
+ ldr r1, [r5, 0x4]\n\
+ str r0, [r4]\n\
+ str r1, [r4, 0x4]\n\
+ lsls r1, r2, 16\n\
+ asrs r1, 16\n\
+ subs r1, 0x7\n\
+ lsls r0, r3, 16\n\
+ asrs r0, 16\n\
+ adds r0, r1\n\
+ strh r0, [r4]\n\
+ adds r0, r7, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r7, r0, 24\n\
+ ldr r6, _0814AAB0 @ =gUnknown_0203A3D0\n\
+ ldrb r0, [r6]\n\
+ cmp r0, 0x40\n\
+ beq _0814AA7C\n\
+ adds r1, r0, 0\n\
+ lsls r0, r1, 4\n\
+ adds r0, r1\n\
+ lsls r0, 2\n\
+ ldr r1, _0814AAB4 @ =gSprites\n\
+ adds r2, r0, r1\n\
+ lsls r1, r7, 3\n\
+ ldr r0, _0814AAB8 @ =gSubspriteTables_842F5C0\n\
+ adds r1, r0\n\
+ adds r0, r2, 0\n\
+ bl SetSubspriteTables\n\
+_0814AA7C:\n\
+ ldr r1, _0814AABC @ =gUnknown_0203A3D1\n\
+ ldrb r0, [r1]\n\
+ cmp r0, 0x40\n\
+ beq _0814AA9C\n\
+ adds r1, r0, 0\n\
+ lsls r0, r1, 4\n\
+ adds r0, r1\n\
+ lsls r0, 2\n\
+ ldr r1, _0814AAB4 @ =gSprites\n\
+ adds r2, r0, r1\n\
+ lsls r1, r7, 3\n\
+ ldr r0, _0814AAB8 @ =gSubspriteTables_842F5C0\n\
+ adds r1, r0\n\
+ adds r0, r2, 0\n\
+ bl SetSubspriteTables\n\
+_0814AA9C:\n\
+ add sp, 0x4\n\
+ pop {r3-r5}\n\
+ mov r8, r3\n\
+ mov r9, r4\n\
+ mov r10, r5\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
+_0814AAAC: .4byte 0x0843d6d8\n\
+_0814AAB0: .4byte gUnknown_0203A3D0\n\
+_0814AAB4: .4byte gSprites\n\
+_0814AAB8: .4byte gSubspriteTables_842F5C0\n\
+_0814AABC: .4byte gUnknown_0203A3D1\n\
+ .syntax divided\n");
+}
#endif
void sub_814AABC(void (*callback)(struct Sprite *))
@@ -542,7 +725,11 @@ u8 CreateBlendedOutlineCursor(u8 a1, u16 a2, u8 a3, u16 a4, u8 a5)
}
LoadSpriteSheetDeferred(&gUnknown_0842F1C0[a3 & 0xF]);
- gUnknown_0203A3D2 = CreateSprite(&gSpriteTemplate_842F298[v8], 0, 0xA0, a1);
+#if ENGLISH
+ gUnknown_0203A3D2 = CreateSprite(&gSpriteTemplate_842F298[v8], 0, 160, a1);
+#elif GERMAN
+ gUnknown_0203A3D2 = CreateSprite(&gSpriteTemplate_842F298[v8], 0, 161, a1);
+#endif
if (gUnknown_0203A3D2 != 0x40)
{
@@ -604,3 +791,9 @@ void sub_814ADF4(u8 a1)
SetSubspriteTables(&gSprites[gUnknown_0203A3D2], &gSubspriteTables_842F6C0[a1]);
return;
}
+
+#if GERMAN
+void nullsub_814B200(void)
+{
+}
+#endif
diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c
index befd6f20d..d05ba0b89 100644
--- a/src/metatile_behavior.c
+++ b/src/metatile_behavior.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "metatile_behavior.h"
#include "metatile_behaviors.h"
#define TILE_ATTRIBUTES(three, two, one) (((one) ? 1 : 0) | ((two) ? 2 : 0) | ((three) ? 4 : 0))
@@ -247,8 +248,6 @@ static const u8 sTileBitAttributes[] =
TILE_ATTRIBUTES(FALSE, FALSE, FALSE)
};
-bool8 MetatileBehavior_IsWaterfall(u8);
-
// only used as default case for checking jump landing in field_ground_effect.
bool8 MetatileBehavior_IsATile(u8 var)
{
diff --git a/src/money.c b/src/money.c
index de0730951..ab4508a39 100644
--- a/src/money.c
+++ b/src/money.c
@@ -10,8 +10,8 @@
extern u16 gSpecialVar_0x8005;
extern u8 gUnknown_02038734;
-extern const struct SpriteSheet gUnknown_083CF584;
-extern const struct SpritePalette gUnknown_083CF58C;
+extern const struct CompressedSpriteSheet gUnknown_083CF584;
+extern const struct CompressedSpritePalette gUnknown_083CF58C;
extern const struct SpriteTemplate gSpriteTemplate_83CF56C;
bool8 IsEnoughMoney(u32 budget, u32 cost)
diff --git a/src/mori_debug_menu.c b/src/mori_debug_menu.c
index 18c65b7e6..ba79261c0 100644
--- a/src/mori_debug_menu.c
+++ b/src/mori_debug_menu.c
@@ -1,10 +1,12 @@
#include "global.h"
#include "mori_debug_menu.h"
-#include "asm.h"
#include "data2.h"
+#include "daycare.h"
+#include "learn_move.h"
#include "link.h"
#include "main.h"
#include "menu.h"
+#include "pokeblock.h"
#include "start_menu.h"
#include "string_util.h"
diff --git a/src/mystery_event_menu.c b/src/mystery_event_menu.c
index 77c959b07..4be5dec1c 100644
--- a/src/mystery_event_menu.c
+++ b/src/mystery_event_menu.c
@@ -1,9 +1,9 @@
#include "global.h"
#include "mystery_event_menu.h"
-#include "asm.h"
#include "link.h"
#include "main.h"
#include "menu.h"
+#include "mystery_event_script.h"
#include "palette.h"
#include "save.h"
#include "songs.h"
diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c
index 515a0722f..45ef719da 100644
--- a/src/mystery_event_script.c
+++ b/src/mystery_event_script.c
@@ -1,12 +1,19 @@
#include "global.h"
+#include "mystery_event_script.h"
#include "script.h"
#include "string_util.h"
#include "text.h"
+#if ENGLISH
+#define UNK_MASK_1 0x2
+#elif GERMAN
+#define UNK_MASK_1 0x4
+#endif
+
#ifdef SAPPHIRE
-#define UNK_MASK 0x100
+#define UNK_MASK_2 0x100
#else
-#define UNK_MASK 0x80
+#define UNK_MASK_2 0x80
#endif
extern struct ScriptContext gUnknown_02039288;
@@ -16,20 +23,18 @@ extern ScrCmdFunc gScriptFuncs_End[];
extern u8 gOtherText_DataCannotUseVersion[];
-void sub_8126160(u32 val);
-
bool32 sub_8126098(u16 a1, u32 a2, u16 a3, u32 a4)
{
- if (!(a1 & 0x2))
+ if (!(a1 & UNK_MASK_1))
return FALSE;
- if (!(a2 & 0x2))
+ if (!(a2 & UNK_MASK_1))
return FALSE;
if (!(a3 & 0x4))
return FALSE;
- if (!(a4 & UNK_MASK))
+ if (!(a4 & UNK_MASK_2))
return FALSE;
return TRUE;
diff --git a/src/name_string_util.c b/src/name_string_util.c
index a1812d5e9..f1a935453 100644
--- a/src/name_string_util.c
+++ b/src/name_string_util.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "name_string_util.h"
#include "string_util.h"
#include "text.h"
diff --git a/src/naming_screen.c b/src/naming_screen.c
index 53ee5ff19..6c107f022 100644
--- a/src/naming_screen.c
+++ b/src/naming_screen.c
@@ -1,10 +1,13 @@
#include "global.h"
#include "naming_screen.h"
-#include "asm.h"
#include "data2.h"
+#include "field_effect.h"
+#include "field_map_obj.h"
+#include "field_player_avatar.h"
#include "main.h"
#include "menu.h"
#include "palette.h"
+#include "pokemon_icon.h"
#include "songs.h"
#include "sound.h"
#include "sprite.h"
@@ -13,11 +16,13 @@
#include "task.h"
#include "text.h"
#include "trig.h"
+#include "util.h"
-extern u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8, u8);
-extern u8 CreateMonIcon();
-extern void sub_809D51C(void);
-extern void MultiplyInvertedPaletteRGBComponents(u16, u8, u8, u8);
+#ifdef ENGLISH
+#define COLUMN_COUNT 9
+#elif GERMAN
+#define COLUMN_COUNT 10
+#endif
extern u16 gKeyRepeatStartDelay;
@@ -51,7 +56,6 @@ extern const struct SpriteTemplate gSpriteTemplate_83CE688;
extern const struct SpriteSheet gUnknown_083CE6A0[];
extern const struct SpritePalette gUnknown_083CE708[];
extern const u8 gNamingScreenMenu_Gfx[];
-extern u16 gMenuMessageBoxContentTileOffset;
extern const u16 gNamingScreenPalettes[];
extern const u16 gUnknown_083CE748[];
extern const u16 gUnknown_083CEBF8[];
@@ -469,8 +473,13 @@ static bool8 MainState_WaitPageSwap(struct Task *task)
sub_80B77F8();
SetInputState(INPUT_STATE_ENABLED);
GetCursorPos(&cursorX, &cursorY);
+#if ENGLISH
if (namingScreenData.currentPage == PAGE_OTHERS && (cursorX == 6 || cursorX == 7))
cursorX = 5;
+#elif GERMAN
+ if (namingScreenData.currentPage == PAGE_OTHERS && (cursorX == 7 || cursorX == 8))
+ cursorX = 6;
+#endif
SetCursorPos(cursorX, cursorY);
sub_80B6888(0);
}
@@ -747,29 +756,33 @@ static void HandleDpadMovement(struct Task *task)
//Wrap cursor position in the X direction
if (cursorX < 0)
- cursorX = 8;
- if (cursorX > 8)
+ cursorX = COLUMN_COUNT - 1;
+ if (cursorX > COLUMN_COUNT - 1)
cursorX = 0;
//Handle cursor movement in X direction
if (sDpadDeltaX[dpadDir] != 0)
{
//The "others" page only has 5 columns
+#if ENGLISH
if (namingScreenData.currentPage == PAGE_OTHERS && (cursorX == 6 || cursorX == 7))
+#elif GERMAN
+ if (namingScreenData.currentPage == PAGE_OTHERS && (cursorX == 6 || cursorX == 7 || cursorX == 8))
+#endif
{
if (sDpadDeltaX[dpadDir] > 0)
- cursorX = 8;
+ cursorX = COLUMN_COUNT - 1;
else
cursorX = 5;
}
- if (cursorX == 8)
+ if (cursorX == COLUMN_COUNT - 1)
{
//We are now on the last column
task->tKbFunctionKey = cursorY;
cursorY = s4RowTo3RowTableY[cursorY];
}
- else if (prevCursorX == 8)
+ else if (prevCursorX == COLUMN_COUNT - 1)
{
if (cursorY == 1)
cursorY = task->tKbFunctionKey;
@@ -778,7 +791,7 @@ static void HandleDpadMovement(struct Task *task)
}
}
- if (cursorX == 8)
+ if (cursorX == COLUMN_COUNT - 1)
{
//There are only 3 keys on the last column, unlike the others,
//so wrap Y accordingly
@@ -1005,11 +1018,16 @@ static void CursorInit(void)
SetCursorPos(0, 0);
}
-static const u8 sKeyboardSymbolPositions[][9] =
-{
+static const u8 sKeyboardSymbolPositions[][COLUMN_COUNT] = {
+#if ENGLISH
{1, 3, 5, 8, 10, 12, 14, 17, 19}, //Upper page
{1, 3, 5, 8, 10, 12, 14, 17, 19}, //Lower page
{1, 4, 7, 10, 13, 16, 16, 16, 19}, //Others page
+#elif GERMAN
+ {2, 3, 4, 5, 9, 10, 11, 12, 16, 19}, //Upper page
+ {2, 3, 4, 5, 9, 10, 11, 12, 16, 19}, //Lower page
+ {1, 4, 7, 10, 13, 16, 16, 16, 16, 19}, //Others page
+#endif
};
static u8 CursorColToKeyboardCol(s16 x)
@@ -1039,7 +1057,7 @@ static void GetCursorPos(s16 *x, s16 *y)
static void MoveCursorToOKButton(void)
{
- SetCursorPos(8, 2);
+ SetCursorPos(COLUMN_COUNT - 1, 2);
}
static void sub_80B6888(u8 a)
@@ -1072,7 +1090,7 @@ static u8 GetKeyRoleAtCursorPos(void)
s16 cursorY;
GetCursorPos(&cursorX, &cursorY);
- if (cursorX < 8)
+ if (cursorX < COLUMN_COUNT - 1)
return KEY_ROLE_CHAR;
else
return keyRoles[cursorY];
@@ -1083,7 +1101,7 @@ void sub_80B6998(struct Sprite *sprite)
if (sprite->animEnded)
StartSpriteAnim(sprite, 0);
sprite->invisible = (sprite->data4 & 0xFF);
- if (sprite->data0 == 8)
+ if (sprite->data0 == COLUMN_COUNT - 1)
sprite->invisible = TRUE;
if (sprite->invisible || (sprite->data4 & 0xFF00) == 0
|| sprite->data0 != sprite->data2 || sprite->data1 != sprite->data3)
@@ -1931,6 +1949,7 @@ static const struct NamingScreenTemplate *const sNamingScreenTemplates[] =
static const u8 sKeyboardCharacters[][4][20] =
{
+#if ENGLISH
{
_(" A B C D E F . "),
_(" G H I J K L , "),
@@ -1943,6 +1962,20 @@ static const u8 sKeyboardCharacters[][4][20] =
_(" m n o p q r s "),
_(" t u v w x y z "),
},
+#elif GERMAN
+ {
+ _(" ABCD EFGH . "),
+ _(" IJKL MNOP , "),
+ _(" QRST UVWX "),
+ _(" YZ ÄÖÜ "),
+ },
+ {
+ _(" abcd efgh . "),
+ _(" ijkl mnop , "),
+ _(" qrst uvwx "),
+ _(" yz äöü "),
+ },
+#endif
{
_(" 0 1 2 3 4 "),
_(" 5 6 7 8 9 "),
diff --git a/src/new_game.c b/src/new_game.c
index 12e04a4ef..33aacd10a 100644
--- a/src/new_game.c
+++ b/src/new_game.c
@@ -1,18 +1,30 @@
#include "global.h"
#include "new_game.h"
-#include "asm.h"
+#include "battle_records.h"
#include "berry.h"
+#include "contest.h"
+#include "decoration_inventory.h"
#include "dewford_trend.h"
+#include "easy_chat.h"
#include "event_data.h"
+#include "field_specials.h"
+#include "item_menu.h"
#include "lottery_corner.h"
+#include "mail_data.h"
+#include "mauville_old_man.h"
#include "play_time.h"
+#include "player_pc.h"
+#include "pokeblock.h"
#include "pokedex.h"
#include "pokemon_size_record.h"
+#include "pokemon_storage_system.h"
#include "rng.h"
#include "roamer.h"
#include "rom4.h"
#include "rtc.h"
#include "script.h"
+#include "secret_base.h"
+#include "tv.h"
extern u8 gDifferentSaveFile;
diff --git a/src/option_menu.c b/src/option_menu.c
index 878df16ba..2463b11c6 100644
--- a/src/option_menu.c
+++ b/src/option_menu.c
@@ -334,6 +334,17 @@ static u8 TextSpeed_ProcessInput(u8 selection)
return selection;
}
+#if ENGLISH
+#define TEXTSPEED_SLOW_LEFT (120)
+#define TEXTSPEED_MIX_LEFT (155)
+#define TEXTSPEED_FAST_LEFT (184)
+#endif
+#if GERMAN
+#define TEXTSPEED_SLOW_LEFT (120)
+#define TEXTSPEED_MIX_LEFT (161)
+#define TEXTSPEED_FAST_LEFT (202)
+#endif
+
static void TextSpeed_DrawChoices(u8 selection)
{
u8 styles[3];
@@ -343,9 +354,9 @@ static void TextSpeed_DrawChoices(u8 selection)
styles[2] = 0xF;
styles[selection] = 0x8;
- DrawOptionMenuChoice(gSystemText_Slow, 120, 40, styles[0]);
- DrawOptionMenuChoice(gSystemText_Mid, 155, 40, styles[1]);
- DrawOptionMenuChoice(gSystemText_Fast, 184, 40, styles[2]);
+ DrawOptionMenuChoice(gSystemText_Slow, TEXTSPEED_SLOW_LEFT, 40, styles[0]);
+ DrawOptionMenuChoice(gSystemText_Mid, TEXTSPEED_MIX_LEFT, 40, styles[1]);
+ DrawOptionMenuChoice(gSystemText_Fast, TEXTSPEED_FAST_LEFT, 40, styles[2]);
}
static u8 BattleScene_ProcessInput(u8 selection)
@@ -374,6 +385,14 @@ static u8 BattleStyle_ProcessInput(u8 selection)
return selection;
}
+#if ENGLISH
+#define BATTLESTYLE_SHIFT (120)
+#define BATTLESTYLE_SET (190)
+#elif GERMAN
+#define BATTLESTYLE_SHIFT (120)
+#define BATTLESTYLE_SET (178)
+#endif
+
static void BattleStyle_DrawChoices(u8 selection)
{
u8 styles[2];
@@ -382,8 +401,8 @@ static void BattleStyle_DrawChoices(u8 selection)
styles[1] = 0xF;
styles[selection] = 0x8;
- DrawOptionMenuChoice(gSystemText_Shift, 120, 72, styles[0]);
- DrawOptionMenuChoice(gSystemText_Set, 190, 72, styles[1]);
+ DrawOptionMenuChoice(gSystemText_Shift, BATTLESTYLE_SHIFT, 72, styles[0]);
+ DrawOptionMenuChoice(gSystemText_Set, BATTLESTYLE_SET, 72, styles[1]);
}
static u8 Sound_ProcessInput(u8 selection)
@@ -431,6 +450,7 @@ static u8 FrameType_ProcessInput(u8 selection)
#define CHAR_0 0xA1 //Character code of '0' character
+#if ENGLISH
static void FrameType_DrawChoices(u8 selection)
{
u8 text[8];
@@ -460,6 +480,69 @@ static void FrameType_DrawChoices(u8 selection)
MenuPrint(gSystemText_Type, 15, 15);
MenuPrint(text, 18, 15);
}
+#elif GERMAN
+__attribute__((naked))
+static void FrameType_DrawChoices(u8 selection)
+{
+ asm(".syntax unified\n\
+ push {r4-r6,lr}\n\
+ sub sp, 0x10\n\
+ lsls r0, 24\n\
+ movs r1, 0x80\n\
+ lsls r1, 17\n\
+ adds r0, r1\n\
+ lsrs r5, r0, 24\n\
+ ldr r1, _0808C368 @ =gSystemText_Type\n\
+ mov r0, sp\n\
+ bl StringCopy\n\
+ ldr r1, _0808C36C @ =gSystemText_Terminator\n\
+ mov r0, sp\n\
+ bl StringAppend\n\
+ adds r4, r0, 0\n\
+ adds r0, r5, 0\n\
+ movs r1, 0xA\n\
+ bl __udivsi3\n\
+ adds r1, r0, 0\n\
+ lsls r0, r1, 24\n\
+ lsrs r6, r0, 24\n\
+ cmp r6, 0\n\
+ beq _0808C370\n\
+ adds r0, r1, 0\n\
+ adds r0, 0xA1\n\
+ strb r0, [r4]\n\
+ adds r4, 0x1\n\
+ adds r0, r5, 0\n\
+ movs r1, 0xA\n\
+ bl __umodsi3\n\
+ adds r0, 0xA1\n\
+ strb r0, [r4]\n\
+ b _0808C380\n\
+ .align 2, 0\n\
+_0808C368: .4byte gSystemText_Type\n\
+_0808C36C: .4byte gSystemText_Terminator\n\
+_0808C370:\n\
+ adds r0, r5, 0\n\
+ movs r1, 0xA\n\
+ bl __umodsi3\n\
+ adds r0, 0xA1\n\
+ strb r0, [r4]\n\
+ adds r4, 0x1\n\
+ strb r6, [r4]\n\
+_0808C380:\n\
+ adds r4, 0x1\n\
+ movs r0, 0xFF\n\
+ strb r0, [r4]\n\
+ mov r0, sp\n\
+ movs r1, 0xF\n\
+ movs r2, 0xF\n\
+ bl MenuPrint\n\
+ add sp, 0x10\n\
+ pop {r4-r6}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .syntax divided\n");
+}
+#endif
static u8 ButtonMode_ProcessInput(u8 selection)
{
diff --git a/src/palette.c b/src/palette.c
index a610049bc..94a4f8092 100644
--- a/src/palette.c
+++ b/src/palette.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "palette.h"
-#include "asm.h"
#include "blend_palette.h"
#include "decompress.h"
diff --git a/src/party_menu.c b/src/party_menu.c
index ad0007695..99bbb5f83 100644
--- a/src/party_menu.c
+++ b/src/party_menu.c
@@ -1,10 +1,25 @@
#include "global.h"
-#include "asm.h"
+#include "party_menu.h"
+#include "battle.h"
+#include "battle_interface.h"
+#include "battle_party_menu.h"
#include "data2.h"
+#include "event_data.h"
+#include "item.h"
+#include "mail_data.h"
+#include "main.h"
#include "menu.h"
+#include "palette.h"
#include "pokemon.h"
+#include "pokemon_item_effect.h"
+#include "pokemon_menu.h"
+#include "pokemon_summary_screen.h"
+#include "rom_8077ABC.h"
+#include "rom_8094928.h"
#include "songs.h"
#include "sound.h"
+#include "species.h"
+#include "sprite.h"
#include "string_util.h"
#include "strings.h"
#include "task.h"
@@ -15,6 +30,7 @@
#include "item.h"
#include "battle_interface.h"
#include "species.h"
+#include "party_menu.h"
#define DATA_COUNT (6)
@@ -25,19 +41,6 @@ struct Unk2001000
u8 unk2;
};
-struct Unk201B000
-{
- u8 filler0[0x260];
- u8 unk260;
- u8 unk261;
- u8 filler262[2];
- s16 unk264[DATA_COUNT * 2]; // This may be a union
- u8 filler27C[2];
- s16 unk27E;
- s16 unk280;
- s16 unk282;
-};
-
struct Unk201C000
{
/*0x00*/ struct Pokemon *pokemon;
@@ -66,7 +69,6 @@ struct UnknownStruct5
extern u8 ewram[];
#define ewram01000 (*(struct Unk2001000 *)(ewram + 0x01000))
-#define ewram1B000 (*(struct Unk201B000 *)(ewram + 0x1B000))
#define ewram1C000 (*(struct Unk201C000 *)(ewram + 0x1C000))
#define ewram1F000 (*(struct Unk201F000 *)(ewram + 0x1F000))
@@ -88,75 +90,8 @@ extern const u16 gUnknown_08376504[];
extern void (*const gUnknown_08376B54[])(u8);
extern const u8 *const gUnknown_08376D04[DATA_COUNT];
extern const struct UnknownStruct5 gUnknown_08376BB4[][6];
-extern const u8 *const gItemEffectTable[];
-
-extern bool8 IsDoubleBattle(void);
-extern void SetUpBattlePokemonMenu(u8);
-extern void sub_808B0C0(u8);
-extern u8 GiveMailToMon(struct Pokemon *, u16);
-extern bool8 ItemIsMail(u16);
-extern void ClearMailStruct(struct MailStruct *);
-extern u8 GiveMailToMon2(struct Pokemon *, struct MailStruct *);
-extern void TakeMailFromMon(struct Pokemon *);
-extern u8 TakeMailFromMon2(struct Pokemon *);
-extern u32 CanMonLearnTMHM(struct Pokemon *, u8);
-extern void sub_809D9F0(struct Pokemon *, u8, u8, void *, u32);
-extern void sub_808B564();
-extern u8 sub_809FA30(void);
-extern void sub_808B508(u8);
-extern void sub_8032638();
-extern u8 sub_8094C20();
-extern bool8 ExecuteTableBasedItemEffect_();
-extern u8 GetMonStatusAndPokerus();
-
-u8 sub_806CA38(u8);
-void task_pc_turn_off();
-static void sub_806E884(u8 taskId);
-void sub_806F8AC(u8 taskId);
-void sub_806FB0C(u8 taskId);
-void PartyMenuUpdateLevelOrStatus(struct Pokemon *, u8);
-bool8 ExecuteTableBasedItemEffect__(u8, u16, u8);
-void sub_80701DC(u8 taskId);
-void DoRecoverPP(u8);
-void Task_RareCandy1(u8);
-void Task_RareCandy2(u8);
-void Task_RareCandy3(u8);
-void sub_806D538();
-void sub_806D5A4(void);
-void sub_806E8D0(u8 taskId, u16 b, TaskFunc c);
-void GetMedicineItemEffectMessage(u16);
-void sub_8070A20();
-void sub_8070848(u8 taskId);
-void sub_8070968();
-void party_menu_link_mon_held_item_object(u8);
-void Task_ConfirmGiveHeldItem(u8);
-void DisplayGiveHeldItemMessage(u8, u16, u8);
-void SetHeldItemIconVisibility();
-void DisplayTakeHeldItemMessage(u8, u16, u8);
-void Task_ConfirmTakeHeldMail(u8);
-void Task_TeamMonTMMove(u8);
-void Task_TeamMonTMMove2(u8);
-void Task_TeamMonTMMove3(u8);
-void Task_TeamMonTMMove4(u8);
-void sub_806F358(u8);
-void sub_806F390(u8);
-void sub_806F44C(u8);
-void TMMoveUpdateMoveSlot(u8);
-void StopTryingToTeachMove_806F614(u8);
-void StopTryingToTeachMove_806F67C(u8);
-void StopTryingToTeachMove_806F6B4(u8);
-void sub_806FB44(u8);
-void sub_8070C54();
-void SetMonIconAnim();
-u8 GetMonIconSpriteId_maybe();
-void PartyMenuDoPrintHP(u8, int, u16, u16);
-void PartyMenuClearLevelStatusTilemap();
-void PartyMenuPrintMonLevelOrStatus();
-u8 GetItemEffectType();
-bool8 IsBlueYellowRedFlute(u16);
-void TryPrintPartyMenuMonNickname();
-void sub_8070088(u8);
+static void sub_806E884(u8 taskId);
/*
void sub_806AEDC(void)
@@ -174,14 +109,22 @@ void sub_806AEDC(void)
}
*/
+#if ENGLISH
+#define WINDOW_LEFT (3)
+#define WINDOW_RIGHT (26)
+#elif GERMAN
+#define WINDOW_LEFT (0)
+#define WINDOW_RIGHT (29)
+#endif
+
u8 sub_806E834(const u8 *message, u8 arg1)
{
u8 taskId;
gUnknown_0202E8F6 = 1;
- MenuDrawTextWindow(3, 14, 26, 19);
- MenuPrintMessage(message, 4, 15);
+ MenuDrawTextWindow(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
+ MenuPrintMessage(message, WINDOW_LEFT + 1, 15);
taskId = CreateTask(sub_806E884, 1);
gTasks[taskId].data[0] = arg1;
@@ -195,7 +138,7 @@ static void sub_806E884(u8 taskId)
{
gUnknown_0202E8F6 = 0;
if (gTasks[taskId].data[0] == 0)
- MenuZeroFillWindowRect(3, 14, 26, 19);
+ MenuZeroFillWindowRect(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
DestroyTask(taskId);
}
}
@@ -1165,7 +1108,7 @@ void sub_8070088(u8 taskId)
else
{
gUnknown_0202E8F4 = 1;
- MenuZeroFillWindowRect(3, 14, 26, 19);
+ MenuZeroFillWindowRect(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
PlaySE(SE_KAIFUKU);
PartyMenuUpdateLevelOrStatus(ewram1C000.pokemon, ewram1C000.unk5);
task_pc_turn_off(&gUnknown_083769A8[IsDoubleBattle() * 12 + ewram1C000.unk5 * 2], 9);
@@ -1403,6 +1346,7 @@ void Task_RareCandy2(u8 taskId)
}
}
+#if ENGLISH
void sub_8070848(u8 taskId)
{
u8 i;
@@ -1439,3 +1383,123 @@ void sub_8070848(u8 taskId)
MenuPrint_PixelCoords(gStringVar1, (x + 6) * 8 + 12, y * 8, 0);
}
}
+#elif GERMAN
+__attribute__((naked))
+void sub_8070848(u8 taskId) {
+ asm(".syntax unified\n\
+ push {r4-r7,lr}\n\
+ mov r7, r10\n\
+ mov r6, r9\n\
+ mov r5, r8\n\
+ push {r5-r7}\n\
+ movs r0, 0xB\n\
+ movs r1, 0\n\
+ movs r2, 0x1D\n\
+ movs r3, 0x7\n\
+ bl MenuDrawTextWindow\n\
+ movs r7, 0\n\
+ ldr r0, _0807092C @ =gStringVar1\n\
+ mov r10, r0\n\
+ movs r1, 0xFC\n\
+ mov r9, r1\n\
+ movs r2, 0x13\n\
+ mov r8, r2\n\
+_0807086C:\n\
+ ldr r1, _08070930 @ =0x0201c000\n\
+ ldr r0, [r1]\n\
+ ldr r1, _08070934 @ =gUnknown_08376D1C\n\
+ adds r1, r7, r1\n\
+ ldrb r1, [r1]\n\
+ bl GetMonData\n\
+ adds r1, r7, 0x6\n\
+ lsls r1, 1\n\
+ ldr r2, _08070938 @ =0x0201b264\n\
+ adds r1, r2, r1\n\
+ strh r0, [r1]\n\
+ lsls r6, r7, 1\n\
+ adds r6, r2, r6\n\
+ ldrh r1, [r6]\n\
+ subs r0, r1\n\
+ strh r0, [r6]\n\
+ adds r0, r7, 0\n\
+ movs r1, 0x3\n\
+ bl __udivsi3\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ lsls r4, r0, 3\n\
+ adds r4, r0\n\
+ adds r4, 0xB\n\
+ lsls r4, 24\n\
+ lsrs r4, 24\n\
+ adds r0, r7, 0\n\
+ movs r1, 0x3\n\
+ bl __umodsi3\n\
+ adds r5, r0, 0\n\
+ lsls r5, 1\n\
+ adds r5, 0x1\n\
+ lsls r5, 24\n\
+ lsrs r5, 24\n\
+ ldr r1, _0807093C @ =gUnknown_08376D04\n\
+ lsls r0, r7, 2\n\
+ adds r0, r1\n\
+ ldr r1, [r0]\n\
+ mov r0, r10\n\
+ bl StringCopy\n\
+ adds r2, r0, 0\n\
+ mov r0, r9\n\
+ strb r0, [r2]\n\
+ adds r2, 0x1\n\
+ mov r1, r8\n\
+ strb r1, [r2]\n\
+ adds r2, 0x1\n\
+ movs r0, 0x2E\n\
+ strb r0, [r2]\n\
+ adds r2, 0x1\n\
+ adds r0, r2, 0\n\
+ ldr r1, _08070940 @ =gOtherText_TallPlusAndRightArrow\n\
+ bl StringCopy\n\
+ adds r2, r0, 0\n\
+ mov r0, r9\n\
+ strb r0, [r2]\n\
+ adds r2, 0x1\n\
+ mov r1, r8\n\
+ strb r1, [r2]\n\
+ adds r2, 0x1\n\
+ movs r0, 0x34\n\
+ strb r0, [r2]\n\
+ adds r2, 0x1\n\
+ movs r0, 0\n\
+ ldrsh r1, [r6, r0]\n\
+ adds r0, r2, 0\n\
+ movs r2, 0x1\n\
+ movs r3, 0x2\n\
+ bl ConvertIntToDecimalStringN\n\
+ adds r4, 0x1\n\
+ lsls r4, 24\n\
+ lsrs r4, 24\n\
+ mov r0, r10\n\
+ adds r1, r4, 0\n\
+ adds r2, r5, 0\n\
+ bl MenuPrint\n\
+ adds r0, r7, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r7, r0, 24\n\
+ cmp r7, 0x5\n\
+ bls _0807086C\n\
+ pop {r3-r5}\n\
+ mov r8, r3\n\
+ mov r9, r4\n\
+ mov r10, r5\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
+_0807092C: .4byte gStringVar1\n\
+_08070930: .4byte 0x0201c000\n\
+_08070934: .4byte gUnknown_08376D1C\n\
+_08070938: .4byte 0x0201b264\n\
+_0807093C: .4byte gUnknown_08376D04\n\
+_08070940: .4byte gOtherText_TallPlusAndRightArrow\n\
+ .syntax divided\n");
+}
+#endif
diff --git a/src/player_pc.c b/src/player_pc.c
index 1d4165c17..9cb395432 100644
--- a/src/player_pc.c
+++ b/src/player_pc.c
@@ -1,7 +1,10 @@
#include "global.h"
-#include "asm.h"
+#include "player_pc.h"
+#include "decoration.h"
+#include "field_fadetransition.h"
#include "field_weather.h"
#include "item.h"
+#include "item_menu.h"
#include "items.h"
#include "main.h"
#include "menu.h"
@@ -24,7 +27,6 @@ extern void BuyMenuFreeMemory(void);
extern void DestroyVerticalScrollIndicator(u8);
extern void PauseVerticalScrollIndicator(u8);
extern void StartVerticalScrollIndicators(int);
-extern void CreateVerticalScrollIndicators(u32, u32, u32); // unknown args
extern void LoadScrollIndicatorPalette(void);
extern void ClearMailStruct(struct MailStruct *);
extern u8 sub_807D770(void);
@@ -180,6 +182,26 @@ static const u16 gUnknown_08406334[3] =
static const u8 gHighlightedMoveToBagFormatText[] = _("{COLOR RED}{STR_VAR_1}");
+extern u8 *gUnknown_02039314;
+extern struct MenuAction gUnknown_08406298[];
+
+extern u8 gUnknown_084062B8[];
+extern u8 gUnknown_084062BC[];
+extern u8 gUnknown_0840632A[];
+extern u8 gUnknown_08406327[];
+extern u8 gUnknown_0840631E[];
+extern u8 gUnknown_08406318[];
+
+extern u8 gUnknown_030007B4;
+extern u8 unk_201FE00[];
+
+extern u8 gUnknown_08152850;
+extern u8 gUnknown_08152C75;
+
+extern u32 gUnknown_08406288[];
+extern const struct MenuAction gUnknown_084062C0[];
+extern const struct YesNoFuncTable gUnknown_084062E0;
+
void NewGameInitPCItems(void)
{
u8 i;
diff --git a/src/pokeball.c b/src/pokeball.c
new file mode 100644
index 000000000..ee3b95678
--- /dev/null
+++ b/src/pokeball.c
@@ -0,0 +1,1193 @@
+#include "global.h"
+#include "gba/m4a_internal.h"
+#include "battle.h"
+#include "decompress.h"
+#include "graphics.h"
+#include "m4a.h"
+#include "main.h"
+#include "pokeball.h"
+#include "pokemon.h"
+#include "rom_8077ABC.h"
+#include "songs.h"
+#include "sound.h"
+#include "sprite.h"
+#include "task.h"
+#include "trig.h"
+#include "util.h"
+
+extern struct MusicPlayerInfo gMPlay_BGM;
+extern u16 gBattleTypeFlags;
+extern u8 gBankTarget;
+extern u8 gActiveBank;
+extern u16 gBattlePartyID[];
+extern u8 gObjectBankIDs[];
+extern u8 gDoingBattleAnim;
+extern u8 gHealthboxIDs[];
+
+#define GFX_TAG_POKEBALL 55000
+#define GFX_TAG_GREATBALL 55001
+#define GFX_TAG_SAFARIBALL 55002
+#define GFX_TAG_ULTRABALL 55003
+#define GFX_TAG_MASTERBALL 55004
+#define GFX_TAG_NETBALL 55005
+#define GFX_TAG_DIVEBALL 55006
+#define GFX_TAG_NESTBALL 55007
+#define GFX_TAG_REPEATBALL 55008
+#define GFX_TAG_TIMERBALL 55009
+#define GFX_TAG_LUXURYBALL 55010
+#define GFX_TAG_PREMIERBALL 55011
+
+static const struct CompressedSpriteSheet sBallSpriteSheets[] =
+{
+ {gInterfaceGfx_PokeBall, 384, GFX_TAG_POKEBALL},
+ {gInterfaceGfx_GreatBall, 384, GFX_TAG_GREATBALL},
+ {gInterfaceGfx_SafariBall, 384, GFX_TAG_SAFARIBALL},
+ {gInterfaceGfx_UltraBall, 384, GFX_TAG_ULTRABALL},
+ {gInterfaceGfx_MasterBall, 384, GFX_TAG_MASTERBALL},
+ {gInterfaceGfx_NetBall, 384, GFX_TAG_NETBALL},
+ {gInterfaceGfx_DiveBall, 384, GFX_TAG_DIVEBALL},
+ {gInterfaceGfx_NestBall, 384, GFX_TAG_NESTBALL},
+ {gInterfaceGfx_RepeatBall, 384, GFX_TAG_REPEATBALL},
+ {gInterfaceGfx_TimerBall, 384, GFX_TAG_TIMERBALL},
+ {gInterfaceGfx_LuxuryBall, 384, GFX_TAG_LUXURYBALL},
+ {gInterfaceGfx_PremierBall, 384, GFX_TAG_PREMIERBALL},
+};
+
+static const struct CompressedSpritePalette sBallSpritePalettes[] =
+{
+ {gInterfacePal_PokeBall, GFX_TAG_POKEBALL},
+ {gInterfacePal_GreatBall, GFX_TAG_GREATBALL},
+ {gInterfacePal_SafariBall, GFX_TAG_SAFARIBALL},
+ {gInterfacePal_UltraBall, GFX_TAG_ULTRABALL},
+ {gInterfacePal_MasterBall, GFX_TAG_MASTERBALL},
+ {gInterfacePal_NetBall, GFX_TAG_NETBALL},
+ {gInterfacePal_DiveBall, GFX_TAG_DIVEBALL},
+ {gInterfacePal_NestBall, GFX_TAG_NESTBALL},
+ {gInterfacePal_RepeatBall, GFX_TAG_REPEATBALL},
+ {gInterfacePal_TimerBall, GFX_TAG_TIMERBALL},
+ {gInterfacePal_LuxuryBall, GFX_TAG_LUXURYBALL},
+ {gInterfacePal_PremierBall, GFX_TAG_PREMIERBALL},
+};
+
+static const struct OamData sBallOamData =
+{
+ .y = 0,
+ .affineMode = 3,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 0,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 1,
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+ .affineParam = 0,
+};
+
+static const union AnimCmd sBallAnimSeq3[] =
+{
+ ANIMCMD_FRAME(0, 5),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sBallAnimSeq5[] =
+{
+ ANIMCMD_FRAME(4, 1),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sBallAnimSeq4[] =
+{
+ ANIMCMD_FRAME(8, 5),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sBallAnimSeq6[] =
+{
+ ANIMCMD_FRAME(12, 1),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sBallAnimSeq0[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END,
+};
+
+static const union AnimCmd sBallAnimSeq1[] =
+{
+ ANIMCMD_FRAME(4, 5),
+ ANIMCMD_FRAME(8, 5),
+ ANIMCMD_END,
+};
+
+static const union AnimCmd sBallAnimSeq2[] =
+{
+ ANIMCMD_FRAME(4, 5),
+ ANIMCMD_FRAME(0, 5),
+ ANIMCMD_END,
+};
+
+static const union AnimCmd *const sBallAnimSequences[] =
+{
+ sBallAnimSeq0,
+ sBallAnimSeq1,
+ sBallAnimSeq2,
+
+ // unused?
+ sBallAnimSeq3,
+ sBallAnimSeq4,
+ sBallAnimSeq5,
+ sBallAnimSeq6,
+};
+
+static const union AffineAnimCmd sBallAffineAnimSeq0[] =
+{
+ AFFINEANIMCMD_FRAME(0, 0, 0, 1),
+ AFFINEANIMCMD_JUMP(0),
+};
+
+static const union AffineAnimCmd sBallAffineAnimSeq1[] =
+{
+ AFFINEANIMCMD_FRAME(0, 0, -3, 1),
+ AFFINEANIMCMD_JUMP(0),
+};
+
+static const union AffineAnimCmd sBallAffineAnimSeq2[] =
+{
+ AFFINEANIMCMD_FRAME(0, 0, 3, 1),
+ AFFINEANIMCMD_JUMP(0),
+};
+
+static const union AffineAnimCmd sBallAffineAnimSeq3[] =
+{
+ AFFINEANIMCMD_FRAME(256, 256, 0, 0),
+ AFFINEANIMCMD_END,
+};
+
+static const union AffineAnimCmd sBallAffineAnimSeq4[] =
+{
+ AFFINEANIMCMD_FRAME(0, 0, 25, 1),
+ AFFINEANIMCMD_JUMP(0),
+};
+
+static const union AffineAnimCmd *const sBallAffineAnimSequences[] =
+{
+ sBallAffineAnimSeq0,
+ sBallAffineAnimSeq1,
+ sBallAffineAnimSeq2,
+ sBallAffineAnimSeq3,
+ sBallAffineAnimSeq4,
+};
+
+static void objc_0804ABD4(struct Sprite *sprite);
+const struct SpriteTemplate gBallSpriteTemplates[] =
+{
+ {
+ .tileTag = GFX_TAG_POKEBALL,
+ .paletteTag = GFX_TAG_POKEBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_GREATBALL,
+ .paletteTag = GFX_TAG_GREATBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_SAFARIBALL,
+ .paletteTag = GFX_TAG_SAFARIBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_ULTRABALL,
+ .paletteTag = GFX_TAG_ULTRABALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_MASTERBALL,
+ .paletteTag = GFX_TAG_MASTERBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_NETBALL,
+ .paletteTag = GFX_TAG_NETBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_DIVEBALL,
+ .paletteTag = GFX_TAG_DIVEBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_NESTBALL,
+ .paletteTag = GFX_TAG_NESTBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_REPEATBALL,
+ .paletteTag = GFX_TAG_REPEATBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_TIMERBALL,
+ .paletteTag = GFX_TAG_TIMERBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_LUXURYBALL,
+ .paletteTag = GFX_TAG_LUXURYBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+ {
+ .tileTag = GFX_TAG_PREMIERBALL,
+ .paletteTag = GFX_TAG_PREMIERBALL,
+ .oam = &sBallOamData,
+ .anims = sBallAnimSequences,
+ .images = NULL,
+ .affineAnims = sBallAffineAnimSequences,
+ .callback = objc_0804ABD4,
+ },
+};
+
+extern u32 ball_number_to_ball_processing_index(u16); // not sure of return type
+extern void sub_80786EC();
+extern bool8 sub_8078718(struct Sprite *);
+extern u8 sub_814086C(u8, u8, int, int, u8);
+extern u8 sub_8141314(u8, u8, int, u8);
+
+static void sub_8046464(u8);
+static void sub_80466E8(struct Sprite *);
+static void sub_80466F4(struct Sprite *);
+static void sub_8046760(struct Sprite *);
+static void sub_80467F8(struct Sprite *);
+static void sub_804684C(struct Sprite *);
+static void sub_8046944(struct Sprite *);
+static void sub_8046984(struct Sprite *);
+static void sub_8046C78(struct Sprite *);
+static void sub_8046E7C(struct Sprite *);
+static void sub_8046E9C(struct Sprite *);
+static void sub_8046FBC(struct Sprite *);
+static void sub_8047074(struct Sprite *);
+static void sub_80470C4(struct Sprite *);
+static void sub_8047230(struct Sprite *);
+static void sub_8047254(struct Sprite *);
+static void sub_80473D0(struct Sprite *);
+static void sub_804748C(struct Sprite *);
+static void sub_8047638(struct Sprite *);
+static void sub_80476E0(struct Sprite *);
+static void sub_8047754(struct Sprite *);
+static void sub_804780C(struct Sprite *);
+static void sub_8047830(struct Sprite *);
+static void oamc_804BEB4(struct Sprite *);
+static u16 sub_8047978(u8);
+
+u8 sub_8046400(u16 a, u8 b)
+{
+ u8 taskId;
+
+ gDoingBattleAnim = 1;
+ ewram17810[gActiveBank].unk0_3 = 1;
+ taskId = CreateTask(sub_8046464, 5);
+ gTasks[taskId].data[1] = a;
+ gTasks[taskId].data[2] = b;
+ gTasks[taskId].data[3] = gActiveBank;
+ return 0;
+}
+
+static void sub_8046464(u8 taskId)
+{
+ bool8 sp0 = FALSE;
+ u16 r8;
+ u8 r5;
+ u16 ball;
+ u8 r4;
+ u8 spriteId;
+
+ if (gTasks[taskId].data[0] == 0)
+ {
+ gTasks[taskId].data[0]++;
+ return;
+ }
+ r8 = gTasks[taskId].data[2];
+ r5 = gTasks[taskId].data[3];
+ if (GetBankSide(r5) != 0)
+ ball = GetMonData(&gEnemyParty[gBattlePartyID[r5]], MON_DATA_POKEBALL);
+ else
+ ball = GetMonData(&gPlayerParty[gBattlePartyID[r5]], MON_DATA_POKEBALL);
+ r4 = ball_number_to_ball_processing_index(ball);
+ sub_80478DC(r4);
+ spriteId = CreateSprite(&gBallSpriteTemplates[r4], 32, 80, 0x1D);
+ gSprites[spriteId].data0 = 0x80;
+ gSprites[spriteId].data1 = 0;
+ gSprites[spriteId].data7 = r8;
+ switch (r8)
+ {
+ case 0xFF:
+ gBankTarget = r5;
+ gSprites[spriteId].pos1.x = 24;
+ gSprites[spriteId].pos1.y = 68;
+ gSprites[spriteId].callback = sub_8047074;
+ break;
+ case 0xFE:
+ gSprites[spriteId].pos1.x = sub_8077ABC(r5, 0);
+ gSprites[spriteId].pos1.y = sub_8077ABC(r5, 1) + 24;
+ gBankTarget = r5;
+ gSprites[spriteId].data0 = 0;
+ gSprites[spriteId].callback = sub_8047254;
+ break;
+ default:
+ gBankTarget = GetBankByPlayerAI(1);
+ sp0 = TRUE;
+ break;
+ }
+ gSprites[spriteId].data6 = gBankTarget;
+ if (!sp0)
+ {
+ DestroyTask(taskId);
+ return;
+ }
+ gSprites[spriteId].data0 = 0x22;
+ gSprites[spriteId].data2 = sub_8077ABC(gBankTarget, 0);
+ gSprites[spriteId].data4 = sub_8077ABC(gBankTarget, 1) - 16;
+ gSprites[spriteId].data5 = -40;
+ sub_80786EC(&gSprites[spriteId]);
+ gSprites[spriteId].oam.affineParam = taskId;
+ gTasks[taskId].data[4] = gBankTarget;
+ gTasks[taskId].func = TaskDummy;
+ PlaySE(SE_NAGERU);
+}
+
+static void objc_0804ABD4(struct Sprite *sprite)
+{
+ if (sub_8078718(sprite))
+ {
+ u8 taskId = sprite->oam.affineParam;
+ u8 r5 = gTasks[taskId].data[4];
+ u8 r8 = gTasks[taskId].data[2];
+ u32 r4; // not sure of this type
+
+ StartSpriteAnim(sprite, 1);
+ sprite->affineAnimPaused = TRUE;
+ sprite->pos1.x += sprite->pos2.x;
+ sprite->pos1.y += sprite->pos2.y;
+ sprite->pos2.x = 0;
+ sprite->pos2.y = 0;
+ sprite->data5 = 0;
+ r4 = ball_number_to_ball_processing_index(sub_8047978(r5));
+ sub_814086C(sprite->pos1.x, sprite->pos1.y - 5, 1, 0x1C, r4);
+ sprite->data0 = sub_8141314(0, r5, 14, r4);
+ sprite->data6 = r5;
+ sprite->data7 = r8;
+ DestroyTask(taskId);
+ sprite->callback = sub_80466E8;
+ }
+}
+
+static void sub_80466E8(struct Sprite *sprite)
+{
+ sprite->callback = sub_80466F4;
+}
+
+static void sub_80466F4(struct Sprite *sprite)
+{
+ sprite->data5++;
+ if (sprite->data5 == 10)
+ {
+ sprite->data5 = 0;
+ sprite->callback = sub_8046760;
+ StartSpriteAffineAnim(&gSprites[gObjectBankIDs[sprite->data6]], 2);
+ AnimateSprite(&gSprites[gObjectBankIDs[sprite->data6]]);
+ gSprites[gObjectBankIDs[sprite->data6]].data1 = 0;
+ }
+}
+
+static void sub_8046760(struct Sprite *sprite)
+{
+ sprite->data5++;
+ if (sprite->data5 == 11)
+ PlaySE(SE_SUIKOMU);
+ if (gSprites[gObjectBankIDs[sprite->data6]].affineAnimEnded)
+ {
+ StartSpriteAnim(sprite, 2);
+ gSprites[gObjectBankIDs[sprite->data6]].invisible = TRUE;
+ sprite->data5 = 0;
+ sprite->callback = sub_80467F8;
+ }
+ else
+ {
+ gSprites[gObjectBankIDs[sprite->data6]].data1 += 0x60;
+ gSprites[gObjectBankIDs[sprite->data6]].pos2.y = -gSprites[gObjectBankIDs[sprite->data6]].data1 >> 8;
+ }
+}
+
+static void sub_80467F8(struct Sprite *sprite)
+{
+ if (sprite->animEnded)
+ {
+ sprite->data5++;
+ if (sprite->data5 == 1)
+ {
+ sprite->data3 = 0;
+ sprite->data4 = 32;
+ sprite->data5 = 0;
+ sprite->pos1.y += Cos(0, 32);
+ sprite->pos2.y = -Cos(0, sprite->data4);
+ sprite->callback = sub_804684C;
+ }
+ }
+}
+
+static void sub_804684C(struct Sprite *sprite)
+{
+ bool8 r5 = FALSE;
+
+ switch (sprite->data3 & 0xFF)
+ {
+ case 0:
+ sprite->pos2.y = -Cos(sprite->data5, sprite->data4);
+ sprite->data5 += 4 + (sprite->data3 >> 8);
+ if (sprite->data5 >= 64)
+ {
+ sprite->data4 -= 10;
+ sprite->data3 += 0x101;
+ if (sprite->data3 >> 8 == 4)
+ r5 = TRUE;
+ switch (sprite->data3 >> 8)
+ {
+ case 1:
+ PlaySE(SE_KON);
+ break;
+ case 2:
+ PlaySE(SE_KON2);
+ break;
+ case 3:
+ PlaySE(SE_KON3);
+ break;
+ default:
+ PlaySE(SE_KON4);
+ break;
+ }
+ }
+ break;
+ case 1:
+ sprite->pos2.y = -Cos(sprite->data5, sprite->data4);
+ sprite->data5 -= 4 + (sprite->data3 >> 8);
+ if (sprite->data5 <= 0)
+ {
+ sprite->data5 = 0;
+ sprite->data3 &= 0xFF00;
+ }
+ break;
+ }
+ if (r5)
+ {
+ sprite->data3 = 0;
+ sprite->pos1.y += Cos(64, 32);
+ sprite->pos2.y = 0;
+ if (sprite->data7 == 0)
+ {
+ sprite->callback = sub_8046C78;
+ }
+ else
+ {
+ sprite->callback = sub_8046944;
+ sprite->data4 = 1;
+ sprite->data5 = 0;
+ }
+ }
+}
+
+static void sub_8046944(struct Sprite *sprite)
+{
+ sprite->data3++;
+ if (sprite->data3 == 31)
+ {
+ sprite->data3 = 0;
+ sprite->affineAnimPaused = TRUE;
+ StartSpriteAffineAnim(sprite, 1);
+ sprite->callback = sub_8046984;
+ PlaySE(SE_BOWA);
+ }
+}
+
+static void sub_8046984(struct Sprite *sprite)
+{
+ switch (sprite->data3 & 0xFF)
+ {
+ case 0:
+ case 2:
+ sprite->pos2.x += sprite->data4;
+ sprite->data5 += sprite->data4;
+ sprite->affineAnimPaused = FALSE;
+ if (sprite->data5 > 3 || sprite->data5 < -3)
+ {
+ sprite->data3++;
+ sprite->data5 = 0;
+ }
+ break;
+ case 1:
+ sprite->data5++;
+ if (sprite->data5 == 1)
+ {
+ sprite->data5 = 0;
+ sprite->data4 = -sprite->data4;
+ sprite->data3++;
+ sprite->affineAnimPaused = FALSE;
+ if (sprite->data4 < 0)
+ ChangeSpriteAffineAnim(sprite, 2);
+ else
+ ChangeSpriteAffineAnim(sprite, 1);
+ }
+ else
+ {
+ sprite->affineAnimPaused = TRUE;
+ }
+ break;
+ case 3:
+ sprite->data3 += 0x100;
+ if (sprite->data3 >> 8 == sprite->data7)
+ {
+ sprite->callback = sub_8046C78;
+ }
+ else
+ {
+ if (sprite->data7 == 4 && sprite->data3 >> 8 == 3)
+ {
+ sprite->callback = sub_8046E7C;
+ sprite->affineAnimPaused = TRUE;
+ }
+ else
+ {
+ sprite->data3++;
+ sprite->affineAnimPaused = TRUE;
+ }
+ }
+ break;
+ case 4:
+ default:
+ sprite->data5++;
+ if (sprite->data5 == 31)
+ {
+ sprite->data5 = 0;
+ sprite->data3 &= 0xFF00;
+ StartSpriteAffineAnim(sprite, 3);
+ if (sprite->data4 < 0)
+ StartSpriteAffineAnim(sprite, 2);
+ else
+ StartSpriteAffineAnim(sprite, 1);
+ PlaySE(SE_BOWA);
+ }
+ break;
+ }
+}
+
+static void sub_8046AD0(u8 taskId)
+{
+ u8 r6 = gTasks[taskId].data[2];
+ u8 r3 = gTasks[taskId].data[1];
+ u16 species = gTasks[taskId].data[0];
+
+ switch (gTasks[taskId].data[15])
+ {
+ case 0:
+ default:
+ if (gTasks[taskId].data[8] < 3)
+ gTasks[taskId].data[8]++;
+ else
+ gTasks[taskId].data[15] = r6 + 1;
+ break;
+ case 1:
+ PlayCry1(species, r3);
+ DestroyTask(taskId);
+ break;
+ case 2:
+ StopCryAndClearCrySongs();
+ gTasks[taskId].data[10] = 3;
+ gTasks[taskId].data[15] = 20;
+ break;
+ case 20:
+ if (gTasks[taskId].data[10] != 0)
+ {
+ gTasks[taskId].data[10]--;
+ break;
+ }
+ PlayCry4(species, r3, 1);
+ DestroyTask(taskId);
+ break;
+ case 3:
+ gTasks[taskId].data[10] = 6;
+ gTasks[taskId].data[15] = 30;
+ break;
+ case 30:
+ if (gTasks[taskId].data[10] != 0)
+ {
+ gTasks[taskId].data[10]--;
+ break;
+ }
+ gTasks[taskId].data[15]++;
+ // fall through
+ case 31:
+ if (!IsCryPlayingOrClearCrySongs())
+ {
+ StopCryAndClearCrySongs();
+ gTasks[taskId].data[10] = 3;
+ gTasks[taskId].data[15]++;
+ }
+ break;
+ case 32:
+ if (gTasks[taskId].data[10] != 0)
+ {
+ gTasks[taskId].data[10]--;
+ break;
+ }
+ PlayCry4(species, r3, 0);
+ DestroyTask(taskId);
+ break;
+ }
+}
+
+static void sub_8046C78(struct Sprite *sprite)
+{
+ u8 r5 = sprite->data6;
+ u32 r4; // not sure of this type
+
+ StartSpriteAnim(sprite, 1);
+ r4 = ball_number_to_ball_processing_index(sub_8047978(r5));
+ sub_814086C(sprite->pos1.x, sprite->pos1.y - 5, 1, 0x1C, r4);
+ sprite->data0 = sub_8141314(1, sprite->data6, 14, r4);
+ sprite->callback = sub_8046E9C;
+ if (gMain.inBattle)
+ {
+ struct Pokemon *pkmn;
+ u16 species;
+ s8 r8;
+ u16 r4_2;
+ u8 taskId;
+
+ if (GetBankSide(r5) != 0)
+ {
+ pkmn = &gEnemyParty[gBattlePartyID[r5]];
+ r8 = 25;
+ }
+ else
+ {
+ pkmn = &gPlayerParty[gBattlePartyID[r5]];
+ r8 = -25;
+ }
+ species = GetMonData(pkmn, MON_DATA_SPECIES);
+ if ((r5 == GetBankByPlayerAI(0) || r5 == GetBankByPlayerAI(1))
+ && IsDoubleBattle() && ewram17840.unk9_0)
+ {
+ if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
+ {
+ if (IsBGMPlaying())
+ m4aMPlayStop(&gMPlay_BGM);
+ }
+ else
+ {
+ m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 128);
+ }
+ }
+ if (!IsDoubleBattle() || !ewram17840.unk9_0)
+ r4_2 = 0;
+ else if (r5 == GetBankByPlayerAI(0) || r5 == GetBankByPlayerAI(1))
+ r4_2 = 1;
+ else
+ r4_2 = 2;
+ taskId = CreateTask(sub_8046AD0, 3);
+ gTasks[taskId].data[0] = species;
+ gTasks[taskId].data[1] = r8;
+ gTasks[taskId].data[2] = r4_2;
+ gTasks[taskId].data[15] = 0;
+ }
+ StartSpriteAffineAnim(&gSprites[gObjectBankIDs[sprite->data6]], 1);
+ AnimateSprite(&gSprites[gObjectBankIDs[sprite->data6]]);
+ gSprites[gObjectBankIDs[sprite->data6]].data1 = 0x1000;
+}
+
+static void sub_8046E7C(struct Sprite *sprite)
+{
+ sprite->animPaused = TRUE;
+ sprite->callback = sub_8046FBC;
+ sprite->data3 = 0;
+ sprite->data4 = 0;
+ sprite->data5 = 0;
+}
+
+static void sub_8046E9C(struct Sprite *sprite)
+{
+ bool8 r7 = FALSE;
+ u8 r4 = sprite->data6;
+
+ gSprites[gObjectBankIDs[r4]].invisible = FALSE;
+ if (sprite->animEnded)
+ sprite->invisible = TRUE;
+ if (gSprites[gObjectBankIDs[r4]].affineAnimEnded)
+ {
+ StartSpriteAffineAnim(&gSprites[gObjectBankIDs[r4]], 0);
+ r7 = TRUE;
+ }
+ else
+ {
+ gSprites[gObjectBankIDs[r4]].data1 -= 288;
+ gSprites[gObjectBankIDs[r4]].pos2.y = gSprites[gObjectBankIDs[r4]].data1 >> 8;
+ }
+ if (sprite->animEnded && r7)
+ {
+ s32 i;
+ u32 r3;
+
+ gSprites[gObjectBankIDs[r4]].pos2.y = 0;
+ gDoingBattleAnim = 0;
+ ewram17810[r4].unk0_3 = 0;
+ FreeSpriteOamMatrix(sprite);
+ DestroySprite(sprite);
+ for (r3 = 0, i = 0; i < 4; i++)
+ {
+ if (ewram17810[i].unk0_3 == 0)
+ r3++;
+ }
+ if (r3 == 4)
+ {
+ for (i = 0; i < 12; i++)
+ sub_804794C(i);
+ }
+ }
+}
+
+static void sub_8046FBC(struct Sprite *sprite)
+{
+ u8 r7 = sprite->data6;
+
+ sprite->data4++;
+ if (sprite->data4 == 40)
+ {
+ return;
+ }
+ else if (sprite->data4 == 95)
+ {
+ gDoingBattleAnim = 0;
+ m4aMPlayAllStop();
+ PlaySE(BGM_FANFA5);
+ }
+ else if (sprite->data4 == 315)
+ {
+ FreeOamMatrix(gSprites[gObjectBankIDs[sprite->data6]].oam.matrixNum);
+ DestroySprite(&gSprites[gObjectBankIDs[sprite->data6]]);
+ DestroySpriteAndFreeResources(sprite);
+ if (gMain.inBattle)
+ ewram17810[r7].unk0_3 = 0;
+ }
+}
+
+static void sub_8047074(struct Sprite *sprite)
+{
+ sprite->data0 = 25;
+ sprite->data2 = sub_8077ABC(sprite->data6, 2);
+ sprite->data4 = sub_8077ABC(sprite->data6, 3) + 24;
+ sprite->data5 = -30;
+ sprite->oam.affineParam = sprite->data6;
+ sub_80786EC(sprite);
+ sprite->callback = sub_80470C4;
+}
+
+#define HIBYTE(x) (((x) >> 8) & 0xFF)
+
+static void sub_80470C4(struct Sprite *sprite)
+{
+ u32 r6;
+ u32 r7;
+
+ if (HIBYTE(sprite->data7) >= 35 && HIBYTE(sprite->data7) < 80)
+ {
+ s16 r4;
+
+ if ((sprite->oam.affineParam & 0xFF00) == 0)
+ {
+ r6 = sprite->data1 & 1;
+ r7 = sprite->data2 & 1;
+ sprite->data1 = ((sprite->data1 / 3) & ~1) | r6;
+ sprite->data2 = ((sprite->data2 / 3) & ~1) | r7;
+ StartSpriteAffineAnim(sprite, 4);
+ }
+ r4 = sprite->data0;
+ sub_8078B5C(sprite);
+ sprite->data7 += sprite->data6 / 3;
+ sprite->pos2.y += Sin(HIBYTE(sprite->data7), sprite->data5);
+ sprite->oam.affineParam += 0x100;
+ if ((sprite->oam.affineParam >> 8) % 3 != 0)
+ sprite->data0 = r4;
+ else
+ sprite->data0 = r4 - 1;
+ if (HIBYTE(sprite->data7) >= 80)
+ {
+ r6 = sprite->data1 & 1;
+ r7 = sprite->data2 & 1;
+ sprite->data1 = ((sprite->data1 * 3) & ~1) | r6;
+ sprite->data2 = ((sprite->data2 * 3) & ~1) | r7;
+ }
+ }
+ else
+ {
+ if (sub_8078718(sprite))
+ {
+ sprite->pos1.x += sprite->pos2.x;
+ sprite->pos1.y += sprite->pos2.y;
+ sprite->pos2.y = 0;
+ sprite->pos2.x = 0;
+ sprite->data6 = sprite->oam.affineParam & 0xFF;
+ sprite->data0 = 0;
+ if (IsDoubleBattle() && ewram17840.unk9_0
+ && sprite->data6 == GetBankByPlayerAI(2))
+ sprite->callback = sub_8047230;
+ else
+ sprite->callback = sub_8046C78;
+ StartSpriteAffineAnim(sprite, 0);
+ }
+ }
+}
+
+static void sub_8047230(struct Sprite *sprite)
+{
+ if (sprite->data0++ > 24)
+ {
+ sprite->data0 = 0;
+ sprite->callback = sub_8046C78;
+ }
+}
+
+static void sub_8047254(struct Sprite *sprite)
+{
+ sprite->data0++;
+ if (sprite->data0 > 15)
+ {
+ sprite->data0 = 0;
+ if (IsDoubleBattle() && ewram17840.unk9_0
+ && sprite->data6 == GetBankByPlayerAI(3))
+ sprite->callback = sub_8047230;
+ else
+ sprite->callback = sub_8046C78;
+ }
+}
+
+static u8 sub_80472B0(u8 a, u8 b, u8 c, u8 d)
+{
+ return sub_814086C(a, b, c, d, 0);
+}
+
+static u8 sub_80472D8(u8 a, u8 b, u32 c)
+{
+ return sub_8141314(a, b, c, 0);
+}
+
+void CreatePokeballSprite(u8 a, u8 b, u8 x, u8 y, u8 e, u8 f, u8 g, u32 h)
+{
+ u8 spriteId;
+
+ LoadCompressedObjectPic(&sBallSpriteSheets[0]);
+ LoadCompressedObjectPalette(&sBallSpritePalettes[0]);
+ spriteId = CreateSprite(&gBallSpriteTemplates[0], x, y, f);
+ gSprites[spriteId].data0 = a;
+ gSprites[spriteId].data5 = gSprites[a].pos1.x;
+ gSprites[spriteId].data6 = gSprites[a].pos1.y;
+ gSprites[a].pos1.x = x;
+ gSprites[a].pos1.y = y;
+ gSprites[spriteId].data1 = g;
+ gSprites[spriteId].data2 = b;
+ gSprites[spriteId].data3 = h;
+ gSprites[spriteId].data4 = h >> 16;
+ gSprites[spriteId].oam.priority = e;
+ gSprites[spriteId].callback = sub_80473D0;
+ gSprites[a].invisible = TRUE;
+}
+
+static void sub_80473D0(struct Sprite *sprite)
+{
+ if (sprite->data1 == 0)
+ {
+ u8 r5;
+ u8 r7 = sprite->data0;
+ u8 r8 = sprite->data2;
+ u32 r4 = (u16)sprite->data3 | ((u16)sprite->data4 << 16);
+
+ if (sprite->subpriority != 0)
+ r5 = sprite->subpriority - 1;
+ else
+ r5 = 0;
+ StartSpriteAnim(sprite, 1);
+ sub_80472B0(sprite->pos1.x, sprite->pos1.y - 5, sprite->oam.priority, r5);
+ sprite->data1 = sub_80472D8(1, r8, r4);
+ sprite->callback = sub_804748C;
+ gSprites[r7].invisible = FALSE;
+ StartSpriteAffineAnim(&gSprites[r7], 1);
+ AnimateSprite(&gSprites[r7]);
+ gSprites[r7].data1 = 0x1000;
+ sprite->data7 = 0;
+ }
+ else
+ {
+ sprite->data1--;
+ }
+}
+
+static void sub_804748C(struct Sprite *sprite)
+{
+ bool8 r12 = FALSE;
+ bool8 r6 = FALSE;
+ u8 r3 = sprite->data0;
+ u16 var1;
+ u16 var2;
+
+ if (sprite->animEnded)
+ sprite->invisible = TRUE;
+ if (gSprites[r3].affineAnimEnded)
+ {
+ StartSpriteAffineAnim(&gSprites[r3], 0);
+ r12 = TRUE;
+ }
+ var1 = (sprite->data5 - sprite->pos1.x) * sprite->data7 / 128 + sprite->pos1.x;
+ var2 = (sprite->data6 - sprite->pos1.y) * sprite->data7 / 128 + sprite->pos1.y;
+ gSprites[r3].pos1.x = var1;
+ gSprites[r3].pos1.y = var2;
+ if (sprite->data7 < 128)
+ {
+ s16 sine = -(gSineTable[(u8)sprite->data7] / 8);
+
+ sprite->data7 += 4;
+ gSprites[r3].pos2.x = sine;
+ gSprites[r3].pos2.y = sine;
+ }
+ else
+ {
+ gSprites[r3].pos1.x = sprite->data5;
+ gSprites[r3].pos1.y = sprite->data6;
+ gSprites[r3].pos2.x = 0;
+ gSprites[r3].pos2.y = 0;
+ r6 = TRUE;
+ }
+ if (sprite->animEnded && r12 && r6)
+ DestroySpriteAndFreeResources(sprite);
+}
+
+u8 sub_8047580(u8 a, u8 b, u8 x, u8 y, u8 e, u8 f, u8 g, u32 h)
+{
+ u8 spriteId;
+
+ LoadCompressedObjectPic(&sBallSpriteSheets[0]);
+ LoadCompressedObjectPalette(&sBallSpritePalettes[0]);
+ spriteId = CreateSprite(&gBallSpriteTemplates[0], x, y, f);
+ gSprites[spriteId].data0 = a;
+ gSprites[spriteId].data1 = g;
+ gSprites[spriteId].data2 = b;
+ gSprites[spriteId].data3 = h;
+ gSprites[spriteId].data4 = h >> 16;
+ gSprites[spriteId].oam.priority = e;
+ gSprites[spriteId].callback = sub_8047638;
+ return spriteId;
+}
+
+static void sub_8047638(struct Sprite *sprite)
+{
+ if (sprite->data1 == 0)
+ {
+ u8 r6;
+ u8 r7 = sprite->data0;
+ u8 r8 = sprite->data2;
+ u32 r5 = (u16)sprite->data3 | ((u16)sprite->data4 << 16);
+
+ if (sprite->subpriority != 0)
+ r6 = sprite->subpriority - 1;
+ else
+ r6 = 0;
+ StartSpriteAnim(sprite, 1);
+ sub_80472B0(sprite->pos1.x, sprite->pos1.y - 5, sprite->oam.priority, r6);
+ sprite->data1 = sub_80472D8(1, r8, r5);
+ sprite->callback = sub_80476E0;
+ StartSpriteAffineAnim(&gSprites[r7], 2);
+ AnimateSprite(&gSprites[r7]);
+ gSprites[r7].data1 = 0;
+ }
+ else
+ {
+ sprite->data1--;
+ }
+}
+
+static void sub_80476E0(struct Sprite *sprite)
+{
+ u8 r1;
+
+ sprite->data5++;
+ if (sprite->data5 == 11)
+ PlaySE(SE_SUIKOMU);
+ r1 = sprite->data0;
+ if (gSprites[r1].affineAnimEnded)
+ {
+ StartSpriteAnim(sprite, 2);
+ gSprites[r1].invisible = TRUE;
+ sprite->data5 = 0;
+ sprite->callback = sub_8047754;
+ }
+ else
+ {
+ gSprites[r1].data1 += 96;
+ gSprites[r1].pos2.y = -gSprites[r1].data1 >> 8;
+ }
+}
+
+static void sub_8047754(struct Sprite *sprite)
+{
+ if (sprite->animEnded)
+ sprite->callback = SpriteCallbackDummy;
+}
+
+void obj_delete_and_free_associated_resources_(struct Sprite *sprite)
+{
+ DestroySpriteAndFreeResources(sprite);
+}
+
+void sub_804777C(u8 a)
+{
+ struct Sprite *sprite = &gSprites[gHealthboxIDs[a]];
+
+ sprite->data0 = 5;
+ sprite->data1 = 0;
+ sprite->pos2.x = 0x73;
+ sprite->pos2.y = 0;
+ sprite->callback = sub_8047830;
+ if (GetBankSide(a) != 0)
+ {
+ sprite->data0 = -sprite->data0;
+ sprite->data1 = -sprite->data1;
+ sprite->pos2.x = -sprite->pos2.x;
+ sprite->pos2.y = -sprite->pos2.y;
+ }
+ gSprites[sprite->data5].callback(&gSprites[sprite->data5]);
+ if (GetBankIdentity(a) == 2)
+ sprite->callback = sub_804780C;
+}
+
+static void sub_804780C(struct Sprite *sprite)
+{
+ sprite->data1++;
+ if (sprite->data1 == 20)
+ {
+ sprite->data1 = 0;
+ sprite->callback = sub_8047830;
+ }
+}
+
+static void sub_8047830(struct Sprite *sprite)
+{
+ sprite->pos2.x -= sprite->data0;
+ sprite->pos2.y -= sprite->data1;
+ if (sprite->pos2.x == 0 && sprite->pos2.y == 0)
+ sprite->callback = SpriteCallbackDummy;
+}
+
+void sub_8047858(u8 a)
+{
+ u8 spriteId;
+
+ spriteId = CreateInvisibleSpriteWithCallback(oamc_804BEB4);
+ gSprites[spriteId].data0 = 1;
+ gSprites[spriteId].data1 = gHealthboxIDs[a];
+ gSprites[spriteId].callback = oamc_804BEB4;
+}
+
+static void oamc_804BEB4(struct Sprite *sprite)
+{
+ u8 r1 = sprite->data1;
+
+ gSprites[r1].pos2.y = sprite->data0;
+ sprite->data0 = -sprite->data0;
+ sprite->data2++;
+ if (sprite->data2 == 21)
+ {
+ gSprites[r1].pos2.x = 0;
+ gSprites[r1].pos2.y = 0;
+ DestroySprite(sprite);
+ }
+}
+
+void sub_80478DC(u8 a)
+{
+ u16 var;
+
+ if (GetSpriteTileStartByTag(sBallSpriteSheets[a].tag) == 0xFFFF)
+ {
+ LoadCompressedObjectPic(&sBallSpriteSheets[a]);
+ LoadCompressedObjectPalette(&sBallSpritePalettes[a]);
+ }
+ switch (a)
+ {
+ case 6:
+ case 10:
+ case 11:
+ break;
+ default:
+ var = GetSpriteTileStartByTag(sBallSpriteSheets[a].tag);
+ LZDecompressVram(gUnknown_08D030D0, (void *)(VRAM + 0x10100 + var * 32));
+ break;
+ }
+}
+
+void sub_804794C(u8 a)
+{
+ FreeSpriteTilesByTag(sBallSpriteSheets[a].tag);
+ FreeSpritePaletteByTag(sBallSpritePalettes[a].tag);
+}
+
+static u16 sub_8047978(u8 a)
+{
+ if (GetBankSide(a) == 0)
+ return GetMonData(&gPlayerParty[gBattlePartyID[a]], MON_DATA_POKEBALL);
+ else
+ return GetMonData(&gEnemyParty[gBattlePartyID[a]], MON_DATA_POKEBALL);
+}
diff --git a/src/pokedex.c b/src/pokedex.c
index be6ef03a9..2ef91e472 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -1,7 +1,8 @@
+
#include "global.h"
#include "gba/m4a_internal.h"
#include "pokedex.h"
-#include "asm.h"
+#include "battle.h"
#include "data2.h"
#include "decompress.h"
#include "event_data.h"
@@ -11,7 +12,11 @@
#include "menu.h"
#include "menu_cursor.h"
#include "palette.h"
+#include "pokedex_area_screen.h"
+#include "pokedex_cry_screen.h"
+#include "pokemon.h"
#include "rng.h"
+#include "rom4.h"
#include "songs.h"
#include "sound.h"
#include "species.h"
@@ -19,6 +24,7 @@
#include "strings.h"
#include "task.h"
#include "trig.h"
+#include "unknown_task.h"
#define NATIONAL_DEX_COUNT 386
@@ -156,36 +162,28 @@ extern const u8 gUnknown_08E96ACC[];
extern const u8 gUnknown_08E96B58[];
extern const u16 gPokedexMenu_Pal[];
extern const u16 gPokedexMenu2_Pal[];
-extern const struct SpriteSheet gTrainerFrontPicTable[];
+extern const struct CompressedSpriteSheet gTrainerFrontPicTable[];
extern const struct MonCoords gTrainerFrontPicCoords[];
extern const struct PokedexEntry gPokedexEntries[];
-extern const struct BaseStats gBaseStats[];
extern const u8 gPokedexMenuSearch_Gfx[];
extern const u8 gUnknown_08E96D2C[];
extern const u16 gPokedexMenuSearch_Pal[];
extern const u8 gTypeNames[][7];
extern const u8 gPokedexMenu2_Gfx[];
-extern u16 NationalPokedexNumToSpecies(u16);
-extern void ShowPokedexAreaScreen(u16 species, u8 *string);
-extern void sub_814AD7C(u8, u8);
-extern void sub_800D74C();
-extern const u16 *species_and_otid_get_pal(u16, u32, u32);
-extern void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 volume);
-extern bool8 BeginNormalPaletteFade(u32, s8, u8, u8, u16);
-extern void remove_some_task(void);
-extern u8 sub_8091E3C(void);
-extern void DisableNationalPokedex(void);
-extern void sub_805469C(void);
-extern u16 HoennToNationalOrder(u16);
-extern u16 NationalToHoennOrder(u16);
+static u8 sub_8091E3C(void);
static const u16 sPokedexSearchPalette[] = INCBIN_U16("graphics/pokedex/search.gbapal");
static const u16 sNationalPokedexPalette[] = INCBIN_U16("graphics/pokedex/national.gbapal");
const u8 gEmptySpacce_839F7FC[0xA4] = {0};
static const u8 gUnknown_0839F8A0[] = INCBIN_U8("graphics/pokedex/pokedex_cry_layout.bin.lz");
static const u8 gUnknown_0839F988[] = INCBIN_U8("graphics/pokedex/pokedex_size_layout.bin.lz");
+#if ENGLISH
static const u8 gUnknown_0839FA7C[] = INCBIN_U8("graphics/pokedex/noball.4bpp.lz");
+#elif GERMAN
+extern const u8 gUnknown_0839FA7C[];
+#endif
+
#include "data/pokedex_orders.h"
static const struct OamData gOamData_83A0404 =
{
@@ -500,7 +498,7 @@ static const struct SpriteTemplate gSpriteTemplate_83A05B4 =
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_808F168,
};
-static const struct SpriteSheet gUnknown_083A05CC[] =
+static const struct CompressedSpriteSheet gUnknown_083A05CC[] =
{
{gPokedexMenu2_Gfx, 0x1F00, 0x1000},
{NULL, 0, 0},
@@ -514,8 +512,11 @@ static const u8 gUnknown_083A05EC[] = {2, 4, 8, 16, 32};
static const u8 gUnknown_083A05F1[] = {16, 8, 4, 2, 1};
const u8 gEmptySpacce_83A05F6[] = {0, 0}; // Padding, maybe?
static const u8 gUnknown_083A05F8[] = _("");
-// TODO: include German entries
+#if ENGLISH
#include "data/pokedex_entries_en.h"
+#elif GERMAN
+#include "data/pokedex_entries_de.h"
+#endif
static const u16 gUnknown_083B4EC4[16] = {0};
static const u8 *const sMonFootprintTable[] =
{
@@ -1297,6 +1298,7 @@ static u8 sub_8092E10(u8, u8);
static void sub_8092EB0(u8);
static void sub_809308C(u8);
+
void ResetPokedex(void)
{
u16 i;
@@ -2906,6 +2908,12 @@ static u8 sub_808F284(struct PokedexListItem *item, u8 b)
return b;
}
+#if ENGLISH
+#define CATEGORY_LEFT (11)
+#elif GERMAN
+#define CATEGORY_LEFT (16)
+#endif
+
static void Task_InitPageScreenMultistep(u8 taskId)
{
switch (gMain.state)
@@ -2952,12 +2960,12 @@ static void Task_InitPageScreenMultistep(u8 taskId)
else
sub_8091154(gUnknown_0202FFBC->dexNum, 0xD, 3);
sub_80911C8(gUnknown_0202FFBC->dexNum, 0x10, 3);
- MenuPrint(gDexText_UnknownPoke, 11, 5);
+ MenuPrint(gDexText_UnknownPoke, CATEGORY_LEFT, 5);
MenuPrint(gDexText_UnknownHeight, 16, 7);
MenuPrint(gDexText_UnknownWeight, 16, 9);
if (gUnknown_0202FFBC->owned)
{
- sub_8091304(gPokedexEntries[gUnknown_0202FFBC->dexNum].categoryName, 11, 5);
+ sub_8091304(gPokedexEntries[gUnknown_0202FFBC->dexNum].categoryName, CATEGORY_LEFT, 5);
sub_8091458(gPokedexEntries[gUnknown_0202FFBC->dexNum].height, 16, 7);
sub_8091564(gPokedexEntries[gUnknown_0202FFBC->dexNum].weight, 16, 9);
MenuPrint(gPokedexEntries[gUnknown_0202FFBC->dexNum].descriptionPage1, 2, 13);
@@ -3844,10 +3852,10 @@ static void sub_8090750(u8 taskId)
else
sub_8091154(dexNum, 13, 3);
sub_80911C8(dexNum, 16, 3);
- MenuPrint(gDexText_UnknownPoke, 11, 5);
+ MenuPrint(gDexText_UnknownPoke, CATEGORY_LEFT, 5);
MenuPrint(gDexText_UnknownHeight, 16, 7);
MenuPrint(gDexText_UnknownWeight, 16, 9);
- sub_8091304(gPokedexEntries[dexNum].categoryName, 11, 5);
+ sub_8091304(gPokedexEntries[dexNum].categoryName, CATEGORY_LEFT, 5);
sub_8091458(gPokedexEntries[dexNum].height, 16, 7);
sub_8091564(gPokedexEntries[dexNum].weight, 16, 9);
MenuPrint(gPokedexEntries[dexNum].descriptionPage1, 2, 13);
@@ -3927,7 +3935,7 @@ static void sub_8090B8C(u8 taskId)
u32 otId;
u32 personality;
u8 paletteNum;
- const u16 *palette;
+ const u8 *lzPaletteData;
REG_DISPCNT = DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | DISPCNT_BG3_ON | DISPCNT_OBJ_ON;
CpuCopy16(gUnknown_08D00524, (void *)(VRAM + 0xC000), 0x1000);
@@ -3936,8 +3944,8 @@ static void sub_8090B8C(u8 taskId)
otId = ((u16)gTasks[taskId].data[13] << 16) | (u16)gTasks[taskId].data[12];
personality = ((u16)gTasks[taskId].data[15] << 16) | (u16)gTasks[taskId].data[14];
paletteNum = gSprites[gTasks[taskId].data[3]].oam.paletteNum;
- palette = species_and_otid_get_pal(species, otId, personality);
- LoadCompressedPalette(palette, 0x100 | paletteNum * 16, 32);
+ lzPaletteData = species_and_otid_get_pal(species, otId, personality);
+ LoadCompressedPalette(lzPaletteData, 0x100 | paletteNum * 16, 32);
DestroyTask(taskId);
}
}
@@ -4253,6 +4261,7 @@ static void sub_8091304(const u8 *name, u8 left, u8 top)
sub_8072B80(str, left, top, gDexText_UnknownPoke);
}
+#if ENGLISH
void unref_sub_80913A4(u16 a, u8 left, u8 top)
{
u8 str[6];
@@ -4289,6 +4298,51 @@ void unref_sub_80913A4(u16 a, u8 left, u8 top)
str[5] = EOS;
MenuPrint(str, left, top);
}
+#elif GERMAN
+void unref_sub_80913A4(u16 arg0, u8 left, u8 top) {
+ u8 buffer[8];
+ int offset;
+ u8 result;
+
+ u8 r6 = 0;
+ offset = 0;
+
+
+ buffer[r6++] = 0xFC;
+ buffer[r6++] = 0x13;
+ r6++;
+
+ result = (arg0 / 1000);
+ if (result == 0)
+ {
+ offset = 6;
+ }
+ else
+ {
+ buffer[r6++] = result + CHAR_0;
+ }
+
+
+ result = (arg0 % 1000) / 100;
+
+ if (result == 0 && offset != 0)
+ {
+ offset += 6;
+ }
+ else
+ {
+ buffer[r6++] = result + CHAR_0;
+ }
+
+ buffer[r6++] = (((arg0 % 1000) % 100) / 10) + CHAR_0;
+ buffer[r6++] = CHAR_COMMA;
+ buffer[r6++] = (((arg0 % 1000) % 100) % 10) + CHAR_0;
+
+ buffer[r6++] = EOS;
+ buffer[2] = offset;
+ MenuPrint(buffer, left, top);
+}
+#endif
#ifdef UNITS_IMPERIAL
#define CHAR_PRIME (0xB4)
@@ -4670,9 +4724,15 @@ int sub_8091AF8(u8 a, u8 b, u8 abcGroup, u8 bodyColor, u8 type1, u8 type2)
return resultsCount;
}
+#if ENGLISH
+#define SUB_8091E20_WIDTH (208)
+#elif GERMAN
+#define SUB_8091E20_WIDTH (216)
+#endif
+
void sub_8091E20(const u8 *str)
{
- sub_8072AB0(str, 9, 120, 208, 32, 1);
+ sub_8072AB0(str, 9, 120, SUB_8091E20_WIDTH, 32, 1);
}
u8 sub_8091E3C(void)
diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c
index 53807befc..92fd832fc 100644
--- a/src/pokedex_cry_screen.c
+++ b/src/pokedex_cry_screen.c
@@ -1,5 +1,5 @@
#include "global.h"
-#include "asm.h"
+#include "pokedex_cry_screen.h"
#include "palette.h"
#include "sprite.h"
diff --git a/src/pokemon_1.c b/src/pokemon_1.c
index dacbb81c3..c55105ef3 100644
--- a/src/pokemon_1.c
+++ b/src/pokemon_1.c
@@ -1,5 +1,4 @@
#include "global.h"
-#include "asm.h"
#include "data2.h"
#include "items.h"
#include "main.h"
@@ -17,17 +16,10 @@
//Extracts the lower 16 bits of a 32-bit number
#define LOHALF(n) ((n) & 0xFFFF)
-extern struct Pokemon gPlayerParty[6]; // 0x3004360
-extern struct Pokemon gEnemyParty[6]; // 0x30045C0
-
extern u8 unk_2000000[];
extern u16 word_2024E82;
extern u8 byte_2024E88;
-extern u32 gExperienceTables[8][101];
-extern struct BaseStats gBaseStats[];
-extern const u16 *gLevelUpLearnsets[];
-
void ZeroBoxMonData(struct BoxPokemon *boxMon)
{
u8 *raw = (u8 *)boxMon;
diff --git a/src/pokemon_2.c b/src/pokemon_2.c
index 8301ca39f..543b032e2 100644
--- a/src/pokemon_2.c
+++ b/src/pokemon_2.c
@@ -1,32 +1,32 @@
#include "global.h"
-#include "asm.h"
+#include "battle.h"
#include "data2.h"
#include "event_data.h"
#include "main.h"
#include "pokemon.h"
#include "rng.h"
+#include "rom_8077ABC.h"
#include "species.h"
#include "sprite.h"
#include "string_util.h"
-#include "text.h"
#include "strings2.h"
+#include "text.h"
+#include "util.h"
extern u8 gPlayerPartyCount;
-extern struct Pokemon gPlayerParty[6];
extern u8 gEnemyPartyCount;
-extern struct Pokemon gEnemyParty[6];
extern u16 unk_20160BC[];
extern struct SecretBaseRecord gSecretBaseRecord;
extern u32 dword_2017100[];
extern u16 gBattleTypeFlags;
-extern u8 gUnknown_02024A60;
+extern u8 gActiveBank;
extern struct BattlePokemon gBattleMons[4];
-extern u16 gUnknown_02024BE6;
-extern u8 byte_2024C06;
-extern u8 gPlayerMonIndex;
-extern u8 gEnemyMonIndex;
-extern u8 gUnknown_02024C0C;
+extern u16 gCurrentMove;
+extern u8 gLastUsedAbility;
+extern u8 gBankAttacker;
+extern u8 gBankTarget;
+extern u8 gAbsentBankFlags;
extern u8 gXXX_CritRelated;
extern u16 gBattleWeather;
extern struct BattleEnigmaBerry gEnigmaBerries[];
@@ -36,8 +36,6 @@ extern u16 gTrainerBattleOpponent;
extern struct PokemonStorage gPokemonStorage;
extern u8 gBadEggNickname[];
-extern u32 gBitTable[];
-extern struct BaseStats gBaseStats[];
extern const struct SpriteTemplate gSpriteTemplate_8208288[];
//array of pointers to arrays of pointers to union AnimCmd (We probably need to typedef this.)
extern u8 gTrainerClassToPicIndex[];
@@ -48,7 +46,7 @@ extern u8 gUnknown_0820823C[];
extern u8 gStatStageRatios[][2];
extern u8 gHoldEffectToType[][2];
-u8 sub_803C348(u8 a1)
+u8 CountAliveMons(u8 a1)
{
s32 i;
u8 retVal = 0;
@@ -58,21 +56,21 @@ u8 sub_803C348(u8 a1)
case 0:
for (i = 0; i < 4; i++)
{
- if (i != gUnknown_02024A60 && !(gUnknown_02024C0C & gBitTable[i]))
+ if (i != gActiveBank && !(gAbsentBankFlags & gBitTable[i]))
retVal++;
}
break;
case 1:
for (i = 0; i < 4; i++)
{
- if (battle_side_get_owner(i) == battle_side_get_owner(gPlayerMonIndex) && !(gUnknown_02024C0C & gBitTable[i]))
+ if (GetBankSide(i) == GetBankSide(gBankAttacker) && !(gAbsentBankFlags & gBitTable[i]))
retVal++;
}
break;
case 2:
for (i = 0; i < 4; i++)
{
- if (battle_side_get_owner(i) == battle_side_get_owner(gEnemyMonIndex) && !(gUnknown_02024C0C & gBitTable[i]))
+ if (GetBankSide(i) == GetBankSide(gBankTarget) && !(gAbsentBankFlags & gBitTable[i]))
retVal++;
}
break;
@@ -84,7 +82,7 @@ u8 sub_803C348(u8 a1)
#ifdef NONMATCHING
u8 sub_803C434(u8 a1)
{
- u32 status0 = battle_get_per_side_status(a1);
+ u32 status0 = GetBankIdentity(a1);
register u8 status_ asm("r4");
u8 status;
register u32 mask1 asm("r1") = 1;
@@ -100,11 +98,11 @@ u8 sub_803C434(u8 a1)
val &= val_;
if (!val)
{
- return battle_get_side_with_given_state(status);
+ return GetBankByPlayerAI(status);
}
}
- if (sub_803C348(0) > 1)
+ if (CountAliveMons(0) > 1)
{
u16 r = Random();
register u32 val asm("r1") = mask2;
@@ -113,19 +111,19 @@ u8 sub_803C434(u8 a1)
{
u32 status2 = 2;
status2 ^= status;
- return battle_get_side_with_given_state(status2);
+ return GetBankByPlayerAI(status2);
}
else
{
- return battle_get_side_with_given_state(status);
+ return GetBankByPlayerAI(status);
}
}
else
{
- if (gUnknown_02024C0C & gBitTable[status])
- return battle_get_side_with_given_state(status ^ 2);
+ if (gAbsentBankFlags & gBitTable[status])
+ return GetBankByPlayerAI(status ^ 2);
else
- return battle_get_side_with_given_state(status);
+ return GetBankByPlayerAI(status);
}
}
#else
@@ -136,7 +134,7 @@ u8 sub_803C434(u8 a1)
push {r4-r6,lr}\n\
lsls r0, 24\n\
lsrs r0, 24\n\
- bl battle_get_per_side_status\n\
+ bl GetBankIdentity\n\
movs r1, 0x1\n\
movs r6, 0x1\n\
adds r4, r6, 0\n\
@@ -155,7 +153,7 @@ u8 sub_803C434(u8 a1)
_0803C45C: .4byte gBattleTypeFlags\n\
_0803C460:\n\
movs r0, 0\n\
- bl sub_803C348\n\
+ bl CountAliveMons\n\
lsls r0, 24\n\
lsrs r0, 24\n\
cmp r0, 0x1\n\
@@ -184,14 +182,14 @@ _0803C484:\n\
adds r0, r4, 0\n\
b _0803C4AA\n\
.align 2, 0\n\
-_0803C49C: .4byte gUnknown_02024C0C\n\
+_0803C49C: .4byte gAbsentBankFlags\n\
_0803C4A0: .4byte gBitTable\n\
_0803C4A4:\n\
movs r0, 0x2\n\
eors r5, r0\n\
adds r0, r5, 0\n\
_0803C4AA:\n\
- bl battle_get_side_with_given_state\n\
+ bl GetBankByPlayerAI\n\
lsls r0, 24\n\
lsrs r0, 24\n\
pop {r4-r6}\n\
@@ -1138,11 +1136,11 @@ u8 sub_803DAA0(void)
u8 GetAbilityBySpecies(u16 species, bool8 altAbility)
{
if (altAbility)
- byte_2024C06 = gBaseStats[species].ability2;
+ gLastUsedAbility = gBaseStats[species].ability2;
else
- byte_2024C06 = gBaseStats[species].ability1;
+ gLastUsedAbility = gBaseStats[species].ability1;
- return byte_2024C06;
+ return gLastUsedAbility;
}
u8 GetMonAbility(struct Pokemon *mon)
@@ -1302,7 +1300,7 @@ void CopyPlayerPartyMonToBattleData(u8 battleIndex, u8 partyIndex)
GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, nickname);
StringCopy10(gBattleMons[battleIndex].nickname, nickname);
GetMonData(&gPlayerParty[partyIndex], MON_DATA_OT_NAME, gBattleMons[battleIndex].otName);
- *(unk_20160BC + battle_side_get_owner(battleIndex)) = gBattleMons[battleIndex].hp;
+ *(unk_20160BC + GetBankSide(battleIndex)) = gBattleMons[battleIndex].hp;
for (i = 0; i < 8; i++)
gBattleMons[battleIndex].statStages[i] = 6;
diff --git a/src/pokemon_3.c b/src/pokemon_3.c
index 105893f70..c096e2e4b 100644
--- a/src/pokemon_3.c
+++ b/src/pokemon_3.c
@@ -1,17 +1,19 @@
#include "global.h"
-#include "asm.h"
#include "battle.h"
+#include "battle_message.h"
#include "data2.h"
#include "event_data.h"
#include "hold_effects.h"
#include "item.h"
#include "items.h"
#include "link.h"
-#include "main.h"
#include "m4a.h"
+#include "main.h"
#include "pokemon.h"
#include "rng.h"
#include "rom4.h"
+#include "rom_8077ABC.h"
+#include "rom_8094928.h"
#include "rtc.h"
#include "songs.h"
#include "sound.h"
@@ -19,45 +21,37 @@
#include "sprite.h"
#include "string_util.h"
#include "text.h"
-
+#include "util.h"
extern u8 gPlayerPartyCount;
-extern struct Pokemon gPlayerParty[6];
extern u8 gEnemyPartyCount;
-extern struct Pokemon gEnemyParty[6];
extern struct BattlePokemon gBattleMons[4];
-extern u8 * const gItemEffectTable[];
-extern u8 gUnknown_02024A60;
+extern u8 gActiveBank;
extern struct BattleEnigmaBerry gEnigmaBerries[];
-extern struct EvolutionData gEvolutionTable[];
extern u16 gSpeciesToHoennPokedexNum[];
extern u16 gSpeciesToNationalPokedexNum[];
extern u16 gHoennToNationalOrder[];
extern u16 gSpeciesIdToCryId[];
-extern u8 gUnknown_030041C0[];
-extern u8 gUnknown_03004290[];
-extern u8 gUnknown_020238CC[];
-extern u8 gPlayerMonIndex;
-extern u8 gEnemyMonIndex;
-extern u8 gUnknown_02024C0B;
-extern u8 gUnknown_02024E6C;
+extern u8 gBattleTextBuff1[];
+extern u8 gBattleTextBuff2[];
+extern u8 gDisplayedStringBattle[];
+extern u8 gBankAttacker;
+extern u8 gBankTarget;
+extern u8 gStringBank;
+extern u8 gBankInMenu;
extern struct SpindaSpot gSpindaSpotGraphics[];
extern s8 gNatureStatTable[][5];
extern s8 gUnknown_082082FE[][3];
extern u16 gTrainerBattleOpponent;
extern u16 gBattleTypeFlags;
-extern struct BaseStats gBaseStats[];
-extern u32 gBitTable[];
-extern u32 gExperienceTables[8][101];
extern u32 gTMHMLearnsets[][2];
-extern const u16 *gLevelUpLearnsets[];
extern u8 gBattleMonForms[];
extern const u8 BattleText_Wally[];
extern const u16 gHMMoves[];
extern s8 gUnknown_083F7E28[];
-extern u8 byte_2024C06;
+extern u8 gLastUsedAbility;
extern const u8 BattleText_PreventedSwitch[];
-extern u16 gUnknown_02024A6A[];
+extern u16 gBattlePartyID[];
extern u8 gJapaneseNidoranNames[][11];
extern u8 gUnknown_082082F8[];
@@ -67,8 +61,6 @@ extern u8 gUnknown_083FEE5D[];
extern u8 gUnknown_083FEE92[];
extern u8 *gUnknown_08400F58[];
-u8 CheckPartyHasHadPokerus(struct Pokemon *, u8);
-
bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, u8 battleId)
{
u32 status = GetMonData(mon, MON_DATA_STATUS, 0);
@@ -89,8 +81,8 @@ bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, u8 bat
u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit)
{
- u8 *temp;
- u8 *itemEffect;
+ const u8 *temp;
+ const u8 *itemEffect;
u8 offset;
int i;
u8 j;
@@ -105,7 +97,7 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit)
if (itemId == ITEM_ENIGMA_BERRY)
{
- temp = gEnigmaBerries[gUnknown_02024A60].itemEffect;
+ temp = gEnigmaBerries[gActiveBank].itemEffect;
}
itemEffect = temp;
@@ -202,10 +194,10 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit)
void sub_803F324(int stat)
{
- gEnemyMonIndex = gUnknown_02024E6C;
- StringCopy(gUnknown_030041C0, gUnknown_08400F58[gUnknown_082082F8[stat]]);
- StringCopy(gUnknown_03004290, gUnknown_083FFDB3);
- get_battle_strings_(gUnknown_083FFDD3);
+ gBankTarget = gBankInMenu;
+ StringCopy(gBattleTextBuff1, gUnknown_08400F58[gUnknown_082082F8[stat]]);
+ StringCopy(gBattleTextBuff2, gUnknown_083FFDB3);
+ StrCpyDecodeToDisplayedStringBattle(gUnknown_083FFDD3);
}
u8 *sub_803F378(u16 itemId)
@@ -217,7 +209,7 @@ u8 *sub_803F378(u16 itemId)
{
if (gMain.inBattle)
{
- itemEffect = gEnigmaBerries[gUnknown_02024E6C].itemEffect;
+ itemEffect = gEnigmaBerries[gBankInMenu].itemEffect;
}
else
{
@@ -226,10 +218,10 @@ u8 *sub_803F378(u16 itemId)
}
else
{
- itemEffect = gItemEffectTable[itemId - 13];
+ itemEffect = (u8 *) gItemEffectTable[itemId - 13];
}
- gUnknown_02024C0B = gUnknown_02024E6C;
+ gStringBank = gBankInMenu;
for (i = 0; i < 3; i++)
{
@@ -243,19 +235,19 @@ u8 *sub_803F378(u16 itemId)
}
else
{
- gPlayerMonIndex = gUnknown_02024E6C;
- get_battle_strings_(gUnknown_083FEE92);
+ gBankAttacker = gBankInMenu;
+ StrCpyDecodeToDisplayedStringBattle(gUnknown_083FEE92);
}
}
}
if (itemEffect[3] & 0x80)
{
- gPlayerMonIndex = gUnknown_02024E6C;
- get_battle_strings_(gUnknown_083FEE5D);
+ gBankAttacker = gBankInMenu;
+ StrCpyDecodeToDisplayedStringBattle(gUnknown_083FEE5D);
}
- return gUnknown_020238CC;
+ return gDisplayedStringBattle;
}
u8 GetNature(struct Pokemon *mon)
@@ -1158,9 +1150,7 @@ void current_map_music_set__default_for_battle(u16 song)
PlayNewMapMusic(sub_8040728());
}
-const u16 *species_and_otid_get_pal(u16, u32, u32);
-
-const u16 *pokemon_get_pal(struct Pokemon *mon)
+const u8 *pokemon_get_pal(struct Pokemon *mon)
{
u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0);
u32 otId = GetMonData(mon, MON_DATA_OT_ID, 0);
@@ -1174,7 +1164,7 @@ const u16 *pokemon_get_pal(struct Pokemon *mon)
//Extracts the lower 16 bits of a 32-bit number
#define LOHALF(n) ((n) & 0xFFFF)
-const u16 *species_and_otid_get_pal(u16 species, u32 otId , u32 personality)
+const u8 *species_and_otid_get_pal(u16 species, u32 otId, u32 personality)
{
u32 shinyValue;
@@ -1188,9 +1178,7 @@ const u16 *species_and_otid_get_pal(u16 species, u32 otId , u32 personality)
return gMonPaletteTable[species].data;
}
-const struct SpritePalette *sub_80409C8(u16, u32, u32);
-
-const struct SpritePalette *sub_8040990(struct Pokemon *mon)
+const struct CompressedSpritePalette *sub_8040990(struct Pokemon *mon)
{
u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0);
u32 otId = GetMonData(mon, MON_DATA_OT_ID, 0);
@@ -1198,7 +1186,7 @@ const struct SpritePalette *sub_8040990(struct Pokemon *mon)
return sub_80409C8(species, otId, personality);
}
-const struct SpritePalette *sub_80409C8(u16 species, u32 otId , u32 personality)
+const struct CompressedSpritePalette *sub_80409C8(u16 species, u32 otId , u32 personality)
{
u32 shinyValue;
@@ -1237,8 +1225,6 @@ s8 sub_8040A7C(u32 personality, u8 a2)
return gUnknown_083F7E28[nature * 5 + a2];
}
-bool8 IsOtherTrainer(u32, u8 *);
-
bool8 IsTradedMon(struct Pokemon *mon)
{
u8 otName[8];
@@ -1288,21 +1274,21 @@ void BoxMonRestorePP(struct BoxPokemon *boxMon)
void sub_8040B8C(void)
{
- byte_2024C06 = BATTLE_STRUCT->filler1_2[0x37];
- gUnknown_030041C0[0] = 0xFD;
- gUnknown_030041C0[1] = 4;
- gUnknown_030041C0[2] = BATTLE_STRUCT->filler1[0x34];
- gUnknown_030041C0[4] = EOS;
- if (!battle_side_get_owner(BATTLE_STRUCT->filler1[0x34]))
- gUnknown_030041C0[3] = pokemon_order_func(gUnknown_02024A6A[BATTLE_STRUCT->filler1[0x34]]);
+ gLastUsedAbility = BATTLE_STRUCT->filler1_2[0x37];
+ gBattleTextBuff1[0] = 0xFD;
+ gBattleTextBuff1[1] = 4;
+ gBattleTextBuff1[2] = BATTLE_STRUCT->filler1[0x34];
+ gBattleTextBuff1[4] = EOS;
+ if (!GetBankSide(BATTLE_STRUCT->filler1[0x34]))
+ gBattleTextBuff1[3] = pokemon_order_func(gBattlePartyID[BATTLE_STRUCT->filler1[0x34]]);
else
- gUnknown_030041C0[3] = gUnknown_02024A6A[BATTLE_STRUCT->filler1[0x34]];
- gUnknown_03004290[0] = 0xFD;
- gUnknown_03004290[1] = 4;
- gUnknown_03004290[2] = gUnknown_02024E6C;
- gUnknown_03004290[3] = pokemon_order_func(gUnknown_02024A6A[gUnknown_02024E6C]);
- gUnknown_03004290[4] = EOS;
- sub_8120FFC(BattleText_PreventedSwitch, gStringVar4);
+ gBattleTextBuff1[3] = gBattlePartyID[BATTLE_STRUCT->filler1[0x34]];
+ gBattleTextBuff2[0] = 0xFD;
+ gBattleTextBuff2[1] = 4;
+ gBattleTextBuff2[2] = gBankInMenu;
+ gBattleTextBuff2[3] = pokemon_order_func(gBattlePartyID[gBankInMenu]);
+ gBattleTextBuff2[4] = EOS;
+ StrCpyDecodeBattle(BattleText_PreventedSwitch, gStringVar4);
}
void SetWildMonHeldItem(void)
diff --git a/src/pokemon_size_record.c b/src/pokemon_size_record.c
index b2f8a1569..f2222bd3b 100644
--- a/src/pokemon_size_record.c
+++ b/src/pokemon_size_record.c
@@ -2,14 +2,12 @@
#include "pokemon_size_record.h"
#include "data2.h"
#include "event_data.h"
+#include "pokedex.h"
#include "species.h"
#include "string_util.h"
#include "strings2.h"
#include "text.h"
-extern u16 SpeciesToNationalPokedexNum(u16);
-extern u16 GetPokedexHeightWeight(u16, u8);
-
struct UnknownStruct
{
u16 unk0;
@@ -88,10 +86,17 @@ static u32 GetMonSize(u16 species, u16 b)
static void FormatMonSizeRecord(u8 *string, u32 size)
{
+#if ENGLISH
u8 decimalPoint[] = _(".");
+#elif GERMAN
+ u8 decimalPoint[] = _(",");
+#endif
+#ifdef UNITS_IMPERIAL
//Convert size from centimeters to inches
size = (double)(size * 10) / (CM_PER_INCH * 10);
+#endif
+
string = ConvertIntToDecimalStringN(string, size / 10, 0, 8);
string = StringAppend(string, decimalPoint);
ConvertIntToDecimalStringN(string, size % 10, 0, 1);
diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c
index 679ec0bc4..0cab07fc1 100644
--- a/src/pokemon_storage_system.c
+++ b/src/pokemon_storage_system.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "pokemon_storage_system.h"
#include "menu.h"
#include "string_util.h"
@@ -41,10 +42,13 @@ void sub_8098898(u8 index) {
break;
case 4:
- // TODO: fix for German
// {var} + " was released."
ptr = StringCopy(gUnk2002694, gUnk20026e4);
+#if ENGLISH
ptr = StringCopy(ptr, gUnknown_083B6DF4[index].text);
+#elif GERMAN
+ ptr = de_sub_8073174(gUnk2002694, gUnknown_083B6DF4[index].text);
+#endif
break;
case 3:
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index 56a56e455..00a0bea29 100644
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -1,20 +1,15 @@
#include "global.h"
-#include "asm.h"
+#include "pokemon_summary_screen.h"
#include "link.h"
#include "menu.h"
#include "pokemon.h"
+#include "region_map.h"
#include "string_util.h"
#include "strings2.h"
+#include "tv.h"
extern struct Pokemon *unk_2018000;
-extern u8 *(gNatureNames[]);
-
-u8 *sub_80A1E9C(u8 *dest, u8 *src, u8);
-u8 PokemonSummaryScreen_CheckOT(struct Pokemon *pokemon);
-u8 *PokemonSummaryScreen_CopyPokemonLevel(u8 *dest, u8 level);
-u32 GetPlayerTrainerId(void);
-
bool8 PokemonSummaryScreen_CheckOT(struct Pokemon *mon)
{
u32 trainerId;
@@ -86,6 +81,7 @@ void PokemonSummaryScreen_PrintTrainerMemo(struct Pokemon *pokemon, u8 left, u8
u8 *ptr = gStringVar4;
u8 nature = GetNature(pokemon);
+#if ENGLISH
ptr = sub_80A1E9C(ptr, gNatureNames[nature], 14);
if (nature != NATURE_BOLD && nature != NATURE_GENTLE)
@@ -94,6 +90,11 @@ void PokemonSummaryScreen_PrintTrainerMemo(struct Pokemon *pokemon, u8 left, u8
}
ptr = StringCopy(ptr, gOtherText_Nature);
+#elif GERMAN
+ ptr = StringCopy(gStringVar4, gOtherText_Nature);
+ ptr = sub_80A1E9C(ptr, gNatureNames[nature], 14);
+ ptr = StringCopy(ptr, gOtherText_Terminator4);
+#endif
if (PokemonSummaryScreen_CheckOT(pokemon) == TRUE)
{
diff --git a/src/pokenav.c b/src/pokenav.c
index f50f039f8..3a386d865 100644
--- a/src/pokenav.c
+++ b/src/pokenav.c
@@ -1,34 +1,29 @@
#include "global.h"
+#include "pokenav.h"
#include "battle.h"
#include "data2.h"
+#include "de_rom_8040FE0.h"
#include "string_util.h"
-struct UnkPokenavStruct_Sub {
- /*0x0*/ u16 unk0;
- /*0x2*/ u8 filler2[6];
-};
-
-
-struct UnkPokenavStruct {
- /*0x0000*/ u8 filler0000[0xCEE8];
- /*0xCEE8*/ struct UnkPokenavStruct_Sub unkCEE8[78];
- /*0xD158*/ u16 unkD158;
-
-};
-
-extern struct UnkPokenavStruct *gUnknown_083DFEC4;
-
-
void sub_80F700C(u8 *arg0, u16 arg1) {
struct Trainer *trainer;
u8 *ptr;
+#if ENGLISH
trainer = (struct Trainer *) &gTrainers[gUnknown_083DFEC4->unkCEE8[arg1].unk0];
+#elif GERMAN
+ const u16 trainerIndex = gUnknown_083DFEC4->unkCEE8[arg1].unk0;
+ trainer = (struct Trainer *) &gTrainers[trainerIndex];
+#endif
ptr = arg0;
if (arg1 < gUnknown_083DFEC4->unkD158)
{
+#if ENGLISH
ptr = StringCopy(ptr, gTrainerClassNames[trainer->trainerClass]);
+#elif GERMAN
+ ptr = StringCopy(ptr, de_sub_8041024(0, trainerIndex));
+#endif
ptr[0] = 0xFC;
ptr[1] = 0x13;
diff --git a/src/post_battle_event_funcs.c b/src/post_battle_event_funcs.c
index f0b88025c..8d85705c8 100644
--- a/src/post_battle_event_funcs.c
+++ b/src/post_battle_event_funcs.c
@@ -1,13 +1,12 @@
#include "global.h"
#include "event_data.h"
+#include "hall_of_fame.h"
#include "load_save.h"
#include "main.h"
#include "pokemon.h"
#include "rom4.h"
#include "script_pokemon_80C4.h"
-extern void sub_8141F90(void);
-
extern u8 gUnknown_02039324;
int GameClear(void)
diff --git a/src/record_mixing.c b/src/record_mixing.c
index f9cb4116e..e1a72cf2e 100644
--- a/src/record_mixing.c
+++ b/src/record_mixing.c
@@ -1,17 +1,24 @@
#include "global.h"
#include "record_mixing.h"
-#include "asm.h"
+#include "battle_tower.h"
+#include "cable_club.h"
+#include "daycare.h"
#include "dewford_trend.h"
#include "event_data.h"
+#include "fldeff_80C5CD4.h"
#include "link.h"
+#include "mauville_old_man.h"
#include "menu.h"
+#include "mystery_event_script.h"
#include "rom4.h"
#include "script.h"
+#include "secret_base.h"
#include "songs.h"
#include "sound.h"
#include "string_util.h"
#include "strings2.h"
#include "task.h"
+#include "tv.h"
extern void *recordMixingSecretBases;
@@ -53,9 +60,6 @@ struct PlayerRecords {
extern struct PlayerRecords unk_2008000;
extern struct PlayerRecords unk_2018000;
-void sub_80BC300();
-void sub_80C045C();
-
void RecordMixing_PrepareExchangePacket(void)
{
sub_80BC300();
diff --git a/src/roamer.c b/src/roamer.c
index 394f81c75..948828d5e 100644
--- a/src/roamer.c
+++ b/src/roamer.c
@@ -1,7 +1,7 @@
#include "global.h"
+#include "roamer.h"
#include "pokemon.h"
#include "rng.h"
-#include "roamer.h"
#include "species.h"
#ifdef SAPPHIRE
diff --git a/src/rom3.c b/src/rom3.c
index be6ae0b27..9d8d39f91 100644
--- a/src/rom3.c
+++ b/src/rom3.c
@@ -1,11 +1,19 @@
#include "global.h"
-#include "asm.h"
+#include "rom3.h"
#include "battle.h"
+#include "battle_811DA74.h"
+#include "battle_ai.h"
+#include "battle_anim.h"
+#include "battle_anim_81258BC.h"
+#include "battle_anim_8137220.h"
+#include "cable_club.h"
#include "items.h"
#include "link.h"
#include "pokemon.h"
+#include "rom_8094928.h"
#include "species.h"
#include "task.h"
+#include "util.h"
extern u8 unk_2000000[];
@@ -13,7 +21,6 @@ extern u8 unk_2000000[];
#define EWRAM_15000 ((u8 *)(unk_2000000 + 0x15000))
extern u16 gBattleTypeFlags;
-extern const u32 gBitTable[];
extern u16 gBattleWeather;
extern struct BattlePokemon gBattleMons[];
@@ -21,59 +28,33 @@ extern u8 gUnknown_020238C4;
extern u8 gUnknown_020238C5;
extern u8 gUnknown_020238C6;
extern u32 gUnknown_020239FC;
-extern u8 gUnknown_02023A60[][0x200];
-extern u8 gUnknown_02024260[][0x200];
-extern u8 gUnknown_02024A60;
-extern u32 gUnknown_02024A64;
-extern u8 gUnknown_02024A68;
-extern u16 gUnknown_02024A6A[];
-extern u8 gUnknown_02024A72[];
-extern u16 gUnknown_02024BE6;
+extern u8 gBattleBufferA[][0x200];
+extern u8 gBattleBufferB[][0x200];
+extern u8 gActiveBank;
+extern u32 gBattleExecBuffer;
+extern u8 gNoOfAllBanks;
+extern u16 gBattlePartyID[];
+extern u8 gBanksBySide[];
+extern u16 gCurrentMove;
extern u16 gUnknown_02024BE8;
-extern u16 gUnknown_02024C04;
-extern u8 byte_2024C06;
-extern u8 gPlayerMonIndex;
-extern u8 gEnemyMonIndex;
-extern u8 gUnknown_02024C0A;
-extern u8 gUnknown_02024C0B;
-extern u8 gUnknown_02024C0C;
-extern u8 gUnknown_02024C0E;
+extern u16 gLastUsedItem;
+extern u8 gLastUsedAbility;
+extern u8 gBankAttacker;
+extern u8 gBankTarget;
+extern u8 gEffectBank;
+extern u8 gStringBank;
+extern u8 gAbsentBankFlags;
+extern u8 gMultiHitCounter;
extern u8 gUnknown_02024C78;
-extern u8 gUnknown_02024D26;
-extern u8 gUnknown_02024E60[];
-extern u8 gUnknown_02024E64[];
-extern u8 gUnknown_03004040[];
-extern u8 gUnknown_030041C0[];
-extern u8 gUnknown_03004290[];
-extern u8 gUnknown_030042B0[];
-extern void (*gUnknown_030042D4)(void);
-extern void (*gUnknown_03004330[])(void);
-
-extern void sub_800BF28(void);
-extern void sub_8083C50(u8);
-extern void nullsub_41(void);
-extern void nullsub_91(void);
-extern void battle_anim_clear_some_data(void);
-extern void ClearBattleMonForms(void);
-extern void BattleAI_HandleItemUseBeforeAISetup(void);
-extern void sub_8094978(u8, int);
-extern void sub_800BA78(void);
-extern void sub_800B9A8(void);
-extern void sub_800BD54(void);
-extern void sub_8010800(void);
-extern void sub_812B468(void);
-extern void sub_8137224(void);
-extern void sub_802BF74(void);
-extern void sub_8032AE0(void);
-extern void sub_8037510(void);
-extern void sub_811DA78(void);
-extern void dp01_prepare_buffer_wireless_probably(u8 a, u16, u8 *c);
-extern void sub_800C1A8(u8);
-extern void sub_800C47C(u8);
-extern void sub_8007F4C(void);
-extern u8 sub_8007ECC(void);
-extern void sub_80155A4();
-extern u8 sub_8018324();
+extern u8 gBattleOutcome;
+extern u8 gActionSelectionCursor[];
+extern u8 gMoveSelectionCursor[];
+extern u8 gBattleBuffersTransferData[];
+extern u8 gBattleTextBuff1[];
+extern u8 gBattleTextBuff2[];
+extern u8 gBattleTextBuff3[];
+extern void (*gBattleMainFunc)(void);
+extern void (*gBattleBankFunc[])(void);
void sub_800B858(void)
{
@@ -89,16 +70,16 @@ void setup_poochyena_battle(void)
{
s32 i;
- gUnknown_030042D4 = nullsub_41;
+ gBattleMainFunc = nullsub_41;
for (i = 0; i < 4; i++)
{
- gUnknown_03004330[i] = nullsub_91;
- gUnknown_02024A72[i] = 0xFF;
- gUnknown_02024E60[i] = 0;
- gUnknown_02024E64[i] = 0;
+ gBattleBankFunc[i] = nullsub_91;
+ gBanksBySide[i] = 0xFF;
+ gActionSelectionCursor[i] = 0;
+ gMoveSelectionCursor[i] = 0;
}
sub_800B858();
- gUnknown_02024A64 = 0;
+ gBattleExecBuffer = 0;
battle_anim_clear_some_data();
ClearBattleMonForms();
BattleAI_HandleItemUseBeforeAISetup();
@@ -124,7 +105,7 @@ void sub_800B950(void)
sub_800BD54();
if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI))
{
- for (i = 0; i < gUnknown_02024A68; i++)
+ for (i = 0; i < gNoOfAllBanks; i++)
sub_8094978(i, 0);
}
}
@@ -133,30 +114,30 @@ void sub_800B9A8(void)
{
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
{
- gUnknown_030042D4 = sub_8010800;
+ gBattleMainFunc = sub_8010800;
if (gBattleTypeFlags & BATTLE_TYPE_SAFARI)
- gUnknown_03004330[0] = sub_812B468;
+ gBattleBankFunc[0] = SetBankFuncToSafariBufferRunCommand;
else if (gBattleTypeFlags & BATTLE_TYPE_WALLY_TUTORIAL)
- gUnknown_03004330[0] = sub_8137224;
+ gBattleBankFunc[0] = SetBankFuncToWallyBufferRunCommand;
else
- gUnknown_03004330[0] = sub_802BF74;
- gUnknown_02024A72[0] = 0;
- gUnknown_03004330[1] = sub_8032AE0;
- gUnknown_02024A72[1] = 1;
- gUnknown_02024A68 = 2;
+ gBattleBankFunc[0] = SetBankFuncToPlayerBufferRunCommand;
+ gBanksBySide[0] = 0;
+ gBattleBankFunc[1] = SetBankFuncToOpponentBufferRunCommand;
+ gBanksBySide[1] = 1;
+ gNoOfAllBanks = 2;
}
else
{
- gUnknown_030042D4 = sub_8010800;
- gUnknown_03004330[0] = sub_802BF74;
- gUnknown_02024A72[0] = 0;
- gUnknown_03004330[1] = sub_8032AE0;
- gUnknown_02024A72[1] = 1;
- gUnknown_03004330[2] = sub_802BF74;
- gUnknown_02024A72[2] = 2;
- gUnknown_03004330[3] = sub_8032AE0;
- gUnknown_02024A72[3] = 3;
- gUnknown_02024A68 = 4;
+ gBattleMainFunc = sub_8010800;
+ gBattleBankFunc[0] = SetBankFuncToPlayerBufferRunCommand;
+ gBanksBySide[0] = 0;
+ gBattleBankFunc[1] = SetBankFuncToOpponentBufferRunCommand;
+ gBanksBySide[1] = 1;
+ gBattleBankFunc[2] = SetBankFuncToPlayerBufferRunCommand;
+ gBanksBySide[2] = 2;
+ gBattleBankFunc[3] = SetBankFuncToOpponentBufferRunCommand;
+ gBanksBySide[3] = 3;
+ gNoOfAllBanks = 4;
}
}
@@ -169,20 +150,20 @@ void sub_800BA78(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
{
- gUnknown_030042D4 = sub_8010800;
- gUnknown_03004330[0] = sub_802BF74;
- gUnknown_02024A72[0] = 0;
- gUnknown_03004330[1] = sub_8037510;
- gUnknown_02024A72[1] = 1;
- gUnknown_02024A68 = 2;
+ gBattleMainFunc = sub_8010800;
+ gBattleBankFunc[0] = SetBankFuncToPlayerBufferRunCommand;
+ gBanksBySide[0] = 0;
+ gBattleBankFunc[1] = SetBankFuncToLinkOpponentBufferRunCommand;
+ gBanksBySide[1] = 1;
+ gNoOfAllBanks = 2;
}
else
{
- gUnknown_03004330[1] = sub_802BF74;
- gUnknown_02024A72[1] = 0;
- gUnknown_03004330[0] = sub_8037510;
- gUnknown_02024A72[0] = 1;
- gUnknown_02024A68 = 2;
+ gBattleBankFunc[1] = SetBankFuncToPlayerBufferRunCommand;
+ gBanksBySide[1] = 0;
+ gBattleBankFunc[0] = SetBankFuncToLinkOpponentBufferRunCommand;
+ gBanksBySide[0] = 1;
+ gNoOfAllBanks = 2;
}
return;
}
@@ -190,35 +171,35 @@ void sub_800BA78(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
{
- gUnknown_030042D4 = sub_8010800;
- gUnknown_03004330[0] = sub_802BF74;
- gUnknown_02024A72[0] = 0;
- gUnknown_03004330[1] = sub_8037510;
- gUnknown_02024A72[1] = 1;
- gUnknown_03004330[2] = sub_802BF74;
- gUnknown_02024A72[2] = 2;
- gUnknown_03004330[3] = sub_8037510;
- gUnknown_02024A72[3] = 3;
- gUnknown_02024A68 = 4;
+ gBattleMainFunc = sub_8010800;
+ gBattleBankFunc[0] = SetBankFuncToPlayerBufferRunCommand;
+ gBanksBySide[0] = 0;
+ gBattleBankFunc[1] = SetBankFuncToLinkOpponentBufferRunCommand;
+ gBanksBySide[1] = 1;
+ gBattleBankFunc[2] = SetBankFuncToPlayerBufferRunCommand;
+ gBanksBySide[2] = 2;
+ gBattleBankFunc[3] = SetBankFuncToLinkOpponentBufferRunCommand;
+ gBanksBySide[3] = 3;
+ gNoOfAllBanks = 4;
}
else
{
- gUnknown_03004330[1] = sub_802BF74;
- gUnknown_02024A72[1] = 0;
- gUnknown_03004330[0] = sub_8037510;
- gUnknown_02024A72[0] = 1;
- gUnknown_03004330[3] = sub_802BF74;
- gUnknown_02024A72[3] = 2;
- gUnknown_03004330[2] = sub_8037510;
- gUnknown_02024A72[2] = 3;
- gUnknown_02024A68 = 4;
+ gBattleBankFunc[1] = SetBankFuncToPlayerBufferRunCommand;
+ gBanksBySide[1] = 0;
+ gBattleBankFunc[0] = SetBankFuncToLinkOpponentBufferRunCommand;
+ gBanksBySide[0] = 1;
+ gBattleBankFunc[3] = SetBankFuncToPlayerBufferRunCommand;
+ gBanksBySide[3] = 2;
+ gBattleBankFunc[2] = SetBankFuncToLinkOpponentBufferRunCommand;
+ gBanksBySide[2] = 3;
+ gNoOfAllBanks = 4;
}
return;
}
multiplayerId = GetMultiplayerId();
if (gBattleTypeFlags & BATTLE_TYPE_WILD)
- gUnknown_030042D4 = sub_8010800;
+ gBattleMainFunc = sub_8010800;
for (i = 0; i < 4; i++)
{
switch (gLinkPlayers[i].lp_field_18)
@@ -235,18 +216,18 @@ void sub_800BA78(void)
if (i == multiplayerId)
{
- gUnknown_03004330[gLinkPlayers[i].lp_field_18] = sub_802BF74;
+ gBattleBankFunc[gLinkPlayers[i].lp_field_18] = SetBankFuncToPlayerBufferRunCommand;
switch (gLinkPlayers[i].lp_field_18)
{
case 0:
case 3:
- gUnknown_02024A72[gLinkPlayers[i].lp_field_18] = 0;
- gUnknown_02024A6A[gLinkPlayers[i].lp_field_18] = 0;
+ gBanksBySide[gLinkPlayers[i].lp_field_18] = 0;
+ gBattlePartyID[gLinkPlayers[i].lp_field_18] = 0;
break;
case 1:
case 2:
- gUnknown_02024A72[gLinkPlayers[i].lp_field_18] = 2;
- gUnknown_02024A6A[gLinkPlayers[i].lp_field_18] = 3;
+ gBanksBySide[gLinkPlayers[i].lp_field_18] = 2;
+ gBattlePartyID[gLinkPlayers[i].lp_field_18] = 3;
break;
}
}
@@ -255,41 +236,41 @@ void sub_800BA78(void)
if ((!(gLinkPlayers[i].lp_field_18 & 1) && !(gLinkPlayers[multiplayerId].lp_field_18 & 1))
|| ((gLinkPlayers[i].lp_field_18 & 1) && (gLinkPlayers[multiplayerId].lp_field_18 & 1)))
{
- gUnknown_03004330[gLinkPlayers[i].lp_field_18] = sub_811DA78;
+ gBattleBankFunc[gLinkPlayers[i].lp_field_18] = SetBankFuncToLinkPartnerBufferRunCommand;
switch (gLinkPlayers[i].lp_field_18)
{
case 0:
case 3:
- gUnknown_02024A72[gLinkPlayers[i].lp_field_18] = 0;
- gUnknown_02024A6A[gLinkPlayers[i].lp_field_18] = 0;
+ gBanksBySide[gLinkPlayers[i].lp_field_18] = 0;
+ gBattlePartyID[gLinkPlayers[i].lp_field_18] = 0;
break;
case 1:
case 2:
- gUnknown_02024A72[gLinkPlayers[i].lp_field_18] = 2;
- gUnknown_02024A6A[gLinkPlayers[i].lp_field_18] = 3;
+ gBanksBySide[gLinkPlayers[i].lp_field_18] = 2;
+ gBattlePartyID[gLinkPlayers[i].lp_field_18] = 3;
break;
}
}
else
{
- gUnknown_03004330[gLinkPlayers[i].lp_field_18] = sub_8037510;
+ gBattleBankFunc[gLinkPlayers[i].lp_field_18] = SetBankFuncToLinkOpponentBufferRunCommand;
switch (gLinkPlayers[i].lp_field_18)
{
case 0:
case 3:
- gUnknown_02024A72[gLinkPlayers[i].lp_field_18] = 1;
- gUnknown_02024A6A[gLinkPlayers[i].lp_field_18] = 0;
+ gBanksBySide[gLinkPlayers[i].lp_field_18] = 1;
+ gBattlePartyID[gLinkPlayers[i].lp_field_18] = 0;
break;
case 1:
case 2:
- gUnknown_02024A72[gLinkPlayers[i].lp_field_18] = 3;
- gUnknown_02024A6A[gLinkPlayers[i].lp_field_18] = 3;
+ gBanksBySide[gLinkPlayers[i].lp_field_18] = 3;
+ gBattlePartyID[gLinkPlayers[i].lp_field_18] = 3;
break;
}
}
}
}
- gUnknown_02024A68 = 4;
+ gNoOfAllBanks = 4;
}
void sub_800BD54(void)
@@ -299,20 +280,20 @@ void sub_800BD54(void)
if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI))
{
- for (i = 0; i < gUnknown_02024A68; i++)
+ for (i = 0; i < gNoOfAllBanks; i++)
{
for (j = 0; j < 6; j++)
{
if (i < 2)
{
- if (!(gUnknown_02024A72[i] & 1))
+ if (!(gBanksBySide[i] & 1))
{
if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != 0
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG) == 0)
{
- gUnknown_02024A6A[i] = j;
+ gBattlePartyID[i] = j;
break;
}
}
@@ -323,22 +304,22 @@ void sub_800BD54(void)
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG) == 0)
{
- gUnknown_02024A6A[i] = j;
+ gBattlePartyID[i] = j;
break;
}
}
}
else
{
- if (!(gUnknown_02024A72[i] & 1))
+ if (!(gBanksBySide[i] & 1))
{
if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES) != 0 //Probably a typo by Game Freak. The rest use SPECIES2
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG) == 0
- && gUnknown_02024A6A[i - 2] != j)
+ && gBattlePartyID[i - 2] != j)
{
- gUnknown_02024A6A[i] = j;
+ gBattlePartyID[i] = j;
break;
}
}
@@ -348,9 +329,9 @@ void sub_800BD54(void)
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != 0
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG) == 0
- && gUnknown_02024A6A[i - 2] != j)
+ && gBattlePartyID[i - 2] != j)
{
- gUnknown_02024A6A[i] = j;
+ gBattlePartyID[i] = j;
break;
}
}
@@ -375,14 +356,14 @@ void dp01_prepare_buffer(u8 a, u8 *b, u16 c)
case 0:
for (i = 0; i < c; i++)
{
- gUnknown_02023A60[gUnknown_02024A60][i] = *b;
+ gBattleBufferA[gActiveBank][i] = *b;
b++;
}
break;
case 1:
for (i = 0; i < c; i++)
{
- gUnknown_02024260[gUnknown_02024A60][i] = *b;
+ gBattleBufferB[gActiveBank][i] = *b;
b++;
}
break;
@@ -419,13 +400,13 @@ void dp01_prepare_buffer_wireless_probably(u8 a, u16 b, u8 *c)
gTasks[gUnknown_020238C4].data[14] = 0;
}
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14000] = a;
- unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14001] = gUnknown_02024A60;
- unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14002] = gPlayerMonIndex;
- unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14003] = gEnemyMonIndex;
+ unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14001] = gActiveBank;
+ unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14002] = gBankAttacker;
+ unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14003] = gBankTarget;
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14004] = r9;
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14005] = (r9 & 0x0000FF00) >> 8;
- unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14006] = gUnknown_02024C0C;
- unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14007] = gUnknown_02024C0A;
+ unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14006] = gAbsentBankFlags;
+ unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14007] = gEffectBank;
for (i = 0; i < b; i++)
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14008 + i] = c[i];
gTasks[gUnknown_020238C4].data[14] = gTasks[gUnknown_020238C4].data[14] + r9 + 8;
@@ -557,235 +538,235 @@ void sub_800C47C(u8 taskId)
switch (unk_2000000[0x15000 + gTasks[taskId].data[15] + 0])
{
case 0:
- if (gUnknown_02024A64 & gBitTable[r4])
+ if (gBattleExecBuffer & gBitTable[r4])
return;
- memcpy(gUnknown_02023A60[r4], &unk_2000000[0x15000 + gTasks[taskId].data[15] + 8], r7);
+ memcpy(gBattleBufferA[r4], &unk_2000000[0x15000 + gTasks[taskId].data[15] + 8], r7);
sub_80155A4(r4);
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
{
- gPlayerMonIndex = unk_2000000[0x15000 + gTasks[taskId].data[15] + 2];
- gEnemyMonIndex = unk_2000000[0x15000 + gTasks[taskId].data[15] + 3];
- gUnknown_02024C0C = unk_2000000[0x15000 + gTasks[taskId].data[15] + 6];
- gUnknown_02024C0A = unk_2000000[0x15000 + gTasks[taskId].data[15] + 7];
+ gBankAttacker = unk_2000000[0x15000 + gTasks[taskId].data[15] + 2];
+ gBankTarget = unk_2000000[0x15000 + gTasks[taskId].data[15] + 3];
+ gAbsentBankFlags = unk_2000000[0x15000 + gTasks[taskId].data[15] + 6];
+ gEffectBank = unk_2000000[0x15000 + gTasks[taskId].data[15] + 7];
}
break;
case 1:
- memcpy(gUnknown_02024260[r4], &unk_2000000[0x15000 + gTasks[taskId].data[15] + 8], r7);
+ memcpy(gBattleBufferB[r4], &unk_2000000[0x15000 + gTasks[taskId].data[15] + 8], r7);
break;
case 2:
r2 = unk_2000000[0x15000 + gTasks[taskId].data[15] + 8];
- gUnknown_02024A64 &= ~(gBitTable[r4] << (r2 * 4));
+ gBattleExecBuffer &= ~(gBitTable[r4] << (r2 * 4));
break;
}
gTasks[taskId].data[15] = gTasks[taskId].data[15] + r7 + 8;
}
}
-void dp01_build_cmdbuf_x00_a_b_0(u8 a, u8 b, u8 c)
+void EmitGetAttributes(u8 a, u8 b, u8 c)
{
- gUnknown_03004040[0] = 0;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
- gUnknown_03004040[3] = 0;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 0;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[3] = 0;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x01_a_b_0(u8 a, u8 b, u8 c)
{
- gUnknown_03004040[0] = 1;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
- gUnknown_03004040[3] = 0;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 1;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[3] = 0;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x02_a_b_varargs(u8 a, u8 b, u8 c, u8 d, u8 *e)
+void EmitSetAttributes(u8 a, u8 b, u8 c, u8 d, u8 *e)
{
int i;
- gUnknown_03004040[0] = 2;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
+ gBattleBuffersTransferData[0] = 2;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
for (i = 0; i < d; i++)
- gUnknown_03004040[3 + i] = *(e++);
- dp01_prepare_buffer(a, gUnknown_03004040, d + 3);
+ gBattleBuffersTransferData[3 + i] = *(e++);
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, d + 3);
}
void unref_sub_800C6A4(u8 a, u8 b, u8 c, u8 *d)
{
int i;
- gUnknown_03004040[0] = 3;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
+ gBattleBuffersTransferData[0] = 3;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
for (i = 0; i < c; i++)
- gUnknown_03004040[3 + i] = *(d++);
- dp01_prepare_buffer(a, gUnknown_03004040, c + 3);
+ gBattleBuffersTransferData[3 + i] = *(d++);
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, c + 3);
}
void dp01_build_cmdbuf_x04_4_4_4(u8 a)
{
- gUnknown_03004040[0] = 4;
- gUnknown_03004040[1] = 4;
- gUnknown_03004040[2] = 4;
- gUnknown_03004040[3] = 4;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 4;
+ gBattleBuffersTransferData[1] = 4;
+ gBattleBuffersTransferData[2] = 4;
+ gBattleBuffersTransferData[3] = 4;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void sub_800C704(u8 a, u8 b, u8 c)
{
- gUnknown_03004040[0] = 5;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
- gUnknown_03004040[3] = 5;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 5;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[3] = 5;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x06_a(u8 a, u8 b)
{
- gUnknown_03004040[0] = 6;
- gUnknown_03004040[1] = b;
- dp01_prepare_buffer(a, gUnknown_03004040, 2);
+ gBattleBuffersTransferData[0] = 6;
+ gBattleBuffersTransferData[1] = b;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 2);
}
void dp01_build_cmdbuf_x07_7_7_7(u8 a)
{
- gUnknown_03004040[0] = 7;
- gUnknown_03004040[1] = 7;
- gUnknown_03004040[2] = 7;
- gUnknown_03004040[3] = 7;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 7;
+ gBattleBuffersTransferData[1] = 7;
+ gBattleBuffersTransferData[2] = 7;
+ gBattleBuffersTransferData[3] = 7;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x08_8_8_8(u8 a)
{
- gUnknown_03004040[0] = 8;
- gUnknown_03004040[1] = 8;
- gUnknown_03004040[2] = 8;
- gUnknown_03004040[3] = 8;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 8;
+ gBattleBuffersTransferData[1] = 8;
+ gBattleBuffersTransferData[2] = 8;
+ gBattleBuffersTransferData[3] = 8;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x09_9_9_9(u8 a)
{
- gUnknown_03004040[0] = 9;
- gUnknown_03004040[1] = 9;
- gUnknown_03004040[2] = 9;
- gUnknown_03004040[3] = 9;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 9;
+ gBattleBuffersTransferData[1] = 9;
+ gBattleBuffersTransferData[2] = 9;
+ gBattleBuffersTransferData[3] = 9;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x0A_A_A_A(u8 a)
+void EmitFaintAnimation(u8 a)
{
- gUnknown_03004040[0] = 10;
- gUnknown_03004040[1] = 10;
- gUnknown_03004040[2] = 10;
- gUnknown_03004040[3] = 10;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 10;
+ gBattleBuffersTransferData[1] = 10;
+ gBattleBuffersTransferData[2] = 10;
+ gBattleBuffersTransferData[3] = 10;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x0B_B_B_B(u8 a)
{
- gUnknown_03004040[0] = 11;
- gUnknown_03004040[1] = 11;
- gUnknown_03004040[2] = 11;
- gUnknown_03004040[3] = 11;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 11;
+ gBattleBuffersTransferData[1] = 11;
+ gBattleBuffersTransferData[2] = 11;
+ gBattleBuffersTransferData[3] = 11;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x0C_C_C_C(u8 a)
{
- gUnknown_03004040[0] = 12;
- gUnknown_03004040[1] = 12;
- gUnknown_03004040[2] = 12;
- gUnknown_03004040[3] = 12;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 12;
+ gBattleBuffersTransferData[1] = 12;
+ gBattleBuffersTransferData[2] = 12;
+ gBattleBuffersTransferData[3] = 12;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x0D_a(u8 a, u8 b)
{
- gUnknown_03004040[0] = 13;
- gUnknown_03004040[1] = b;
- dp01_prepare_buffer(a, gUnknown_03004040, 2);
+ gBattleBuffersTransferData[0] = 13;
+ gBattleBuffersTransferData[1] = b;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 2);
}
void unref_sub_800C828(u8 a, u8 b, u8 *c)
{
int i;
- gUnknown_03004040[0] = 14;
- gUnknown_03004040[1] = b;
+ gBattleBuffersTransferData[0] = 14;
+ gBattleBuffersTransferData[1] = b;
for (i = 0; i < b * 3; i++)
- gUnknown_03004040[2 + i] = *(c++);
- dp01_prepare_buffer(a, gUnknown_03004040, b * 3 + 2);
-}
-
-void dp01_build_cmdbuf_x0F_aa_b_cc_dddd_e_mlc_weather_00_x1Cbytes(u8 a, u16 b, u8 c, u16 d, s32 e, u8 f, u8 *g)
-{
- gUnknown_03004040[0] = 15;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = (b & 0xFF00) >> 8;
- gUnknown_03004040[3] = c;
- gUnknown_03004040[4] = d;
- gUnknown_03004040[5] = (d & 0xFF00) >> 8;
- gUnknown_03004040[6] = e;
- gUnknown_03004040[7] = (e & 0x0000FF00) >> 8;
- gUnknown_03004040[8] = (e & 0x00FF0000) >> 16;
- gUnknown_03004040[9] = (e & 0xFF000000) >> 24;
- gUnknown_03004040[10] = f;
- gUnknown_03004040[11] = gUnknown_02024C0E;
- if (sub_8018324(14, 0, 13, 0, 0) == 0 && sub_8018324(14, 0, 0x4D, 0, 0) == 0)
+ gBattleBuffersTransferData[2 + i] = *(c++);
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, b * 3 + 2);
+}
+
+void EmitMoveAnimation(u8 a, u16 b, u8 c, u16 d, s32 e, u8 f, u8 *g)
+{
+ gBattleBuffersTransferData[0] = 15;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = (b & 0xFF00) >> 8;
+ gBattleBuffersTransferData[3] = c;
+ gBattleBuffersTransferData[4] = d;
+ gBattleBuffersTransferData[5] = (d & 0xFF00) >> 8;
+ gBattleBuffersTransferData[6] = e;
+ gBattleBuffersTransferData[7] = (e & 0x0000FF00) >> 8;
+ gBattleBuffersTransferData[8] = (e & 0x00FF0000) >> 16;
+ gBattleBuffersTransferData[9] = (e & 0xFF000000) >> 24;
+ gBattleBuffersTransferData[10] = f;
+ gBattleBuffersTransferData[11] = gMultiHitCounter;
+ if (AbilityBattleEffects(14, 0, 13, 0, 0) == 0 && AbilityBattleEffects(14, 0, 0x4D, 0, 0) == 0)
{
- gUnknown_03004040[12] = gBattleWeather;
- gUnknown_03004040[13] = (gBattleWeather & 0xFF00) >> 8;
+ gBattleBuffersTransferData[12] = gBattleWeather;
+ gBattleBuffersTransferData[13] = (gBattleWeather & 0xFF00) >> 8;
}
else
{
- gUnknown_03004040[12] = 0;
- gUnknown_03004040[13] = 0;
+ gBattleBuffersTransferData[12] = 0;
+ gBattleBuffersTransferData[13] = 0;
}
- gUnknown_03004040[14] = 0;
- gUnknown_03004040[15] = 0;
- memcpy(&gUnknown_03004040[16], g, 0x1C);
- dp01_prepare_buffer(a, gUnknown_03004040, 0x2C);
+ gBattleBuffersTransferData[14] = 0;
+ gBattleBuffersTransferData[15] = 0;
+ memcpy(&gBattleBuffersTransferData[16], g, 0x1C);
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 0x2C);
}
#ifdef NONMATCHING
-void dp01_build_cmdbuf_x10_TODO(u8 a, u16 b)
+void EmitPrintString(u8 a, u16 b)
{
int i;
//u16 *r12;
- gUnknown_03004040[0] = 16;
- gUnknown_03004040[1] = gUnknown_02024D26;
- gUnknown_03004040[2] = b;
- gUnknown_03004040[3] = (b & 0xFF00) >> 8;
-
- *((u16 *)&gUnknown_03004040[4]) = gUnknown_02024BE6;
- *((u16 *)&gUnknown_03004040[6]) = gUnknown_02024BE8;
- *((u16 *)&gUnknown_03004040[8]) = gUnknown_02024C04;
-
- gUnknown_03004040[10] = byte_2024C06;
- gUnknown_03004040[11] = unk_2000000[0x16000 + 3];
- gUnknown_03004040[12] = unk_2000000[0x16000 + 0x5E];
- gUnknown_03004040[13] = unk_2000000[0x16000 + 0xC1];
- gUnknown_03004040[14] = gUnknown_02024C0B;
- gUnknown_03004040[15] = gBattleMoves[gUnknown_02024BE6].type;
+ gBattleBuffersTransferData[0] = 16;
+ gBattleBuffersTransferData[1] = gBattleOutcome;
+ gBattleBuffersTransferData[2] = b;
+ gBattleBuffersTransferData[3] = (b & 0xFF00) >> 8;
+
+ *((u16 *)&gBattleBuffersTransferData[4]) = gCurrentMove;
+ *((u16 *)&gBattleBuffersTransferData[6]) = gUnknown_02024BE8;
+ *((u16 *)&gBattleBuffersTransferData[8]) = gLastUsedItem;
+
+ gBattleBuffersTransferData[10] = gLastUsedAbility;
+ gBattleBuffersTransferData[11] = unk_2000000[0x16000 + 3];
+ gBattleBuffersTransferData[12] = unk_2000000[0x16000 + 0x5E];
+ gBattleBuffersTransferData[13] = unk_2000000[0x16000 + 0xC1];
+ gBattleBuffersTransferData[14] = gStringBank;
+ gBattleBuffersTransferData[15] = gBattleMoves[gCurrentMove].type;
for (i = 0; i < 4; i++)
{
- gUnknown_03004040[16 + i] = gBattleMons[i].ability;
+ gBattleBuffersTransferData[16 + i] = gBattleMons[i].ability;
}
for (i = 0; i < 16; i++)
{
- gUnknown_03004040[20 + i] = gUnknown_030041C0[i];
- gUnknown_03004040[36 + i] = gUnknown_03004290[i];
- gUnknown_03004040[52 + i] = gUnknown_030042B0[i];
+ gBattleBuffersTransferData[20 + i] = gBattleTextBuff1[i];
+ gBattleBuffersTransferData[36 + i] = gBattleTextBuff2[i];
+ gBattleBuffersTransferData[52 + i] = gBattleTextBuff3[i];
}
- dp01_prepare_buffer(a, gUnknown_03004040, 0x44);
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 0x44);
}
#else
__attribute__((naked))
-void dp01_build_cmdbuf_x10_TODO(u8 a, u16 b)
+void EmitPrintString(u8 a, u16 b)
{
asm(".syntax unified\n\
push {r4-r7,lr}\n\
@@ -798,10 +779,10 @@ void dp01_build_cmdbuf_x10_TODO(u8 a, u16 b)
mov r10, r0\n\
lsls r1, 16\n\
lsrs r1, 16\n\
- ldr r2, _0800CA2C @ =gUnknown_03004040\n\
+ ldr r2, _0800CA2C @ =gBattleBuffersTransferData\n\
movs r0, 0x10\n\
strb r0, [r2]\n\
- ldr r0, _0800CA30 @ =gUnknown_02024D26\n\
+ ldr r0, _0800CA30 @ =gBattleOutcome\n\
ldrb r0, [r0]\n\
strb r0, [r2, 0x1]\n\
strb r1, [r2, 0x2]\n\
@@ -809,17 +790,17 @@ void dp01_build_cmdbuf_x10_TODO(u8 a, u16 b)
strb r1, [r2, 0x3]\n\
adds r0, r2, 0x4\n\
mov r12, r0\n\
- ldr r4, _0800CA34 @ =gUnknown_02024BE6\n\
+ ldr r4, _0800CA34 @ =gCurrentMove\n\
ldrh r0, [r4]\n\
strh r0, [r2, 0x4]\n\
ldr r0, _0800CA38 @ =gUnknown_02024BE8\n\
ldrh r0, [r0]\n\
mov r1, r12\n\
strh r0, [r1, 0x2]\n\
- ldr r0, _0800CA3C @ =gUnknown_02024C04\n\
+ ldr r0, _0800CA3C @ =gLastUsedItem\n\
ldrh r0, [r0]\n\
strh r0, [r1, 0x4]\n\
- ldr r0, _0800CA40 @ =byte_2024C06\n\
+ ldr r0, _0800CA40 @ =gLastUsedAbility\n\
ldrb r0, [r0]\n\
strb r0, [r1, 0x6]\n\
ldr r1, _0800CA44 @ =0x02000000\n\
@@ -837,7 +818,7 @@ void dp01_build_cmdbuf_x10_TODO(u8 a, u16 b)
ldrb r0, [r1]\n\
mov r1, r12\n\
strb r0, [r1, 0x9]\n\
- ldr r0, _0800CA50 @ =gUnknown_02024C0B\n\
+ ldr r0, _0800CA50 @ =gStringBank\n\
ldrb r0, [r0]\n\
strb r0, [r1, 0xA]\n\
ldr r3, _0800CA54 @ =gBattleMoves\n\
@@ -851,7 +832,7 @@ void dp01_build_cmdbuf_x10_TODO(u8 a, u16 b)
strb r0, [r3, 0xB]\n\
movs r3, 0\n\
mov r9, r2\n\
- ldr r7, _0800CA58 @ =gUnknown_030042B0\n\
+ ldr r7, _0800CA58 @ =gBattleTextBuff3\n\
mov r8, r7\n\
adds r2, 0x10\n\
ldr r0, _0800CA5C @ =gBattleMons\n\
@@ -870,12 +851,12 @@ _0800C9D2:\n\
adds r5, 0x10\n\
mov r4, r12\n\
adds r4, 0x20\n\
- ldr r6, _0800CA60 @ =gUnknown_03004290\n\
+ ldr r6, _0800CA60 @ =gBattleTextBuff2\n\
mov r2, r12\n\
adds r2, 0x30\n\
_0800C9F0:\n\
adds r1, r5, r3\n\
- ldr r7, _0800CA64 @ =gUnknown_030041C0\n\
+ ldr r7, _0800CA64 @ =gBattleTextBuff1\n\
adds r0, r3, r7\n\
ldrb r0, [r0]\n\
strb r0, [r1]\n\
@@ -903,27 +884,27 @@ _0800C9F0:\n\
pop {r0}\n\
bx r0\n\
.align 2, 0\n\
-_0800CA2C: .4byte gUnknown_03004040\n\
-_0800CA30: .4byte gUnknown_02024D26\n\
-_0800CA34: .4byte gUnknown_02024BE6\n\
+_0800CA2C: .4byte gBattleBuffersTransferData\n\
+_0800CA30: .4byte gBattleOutcome\n\
+_0800CA34: .4byte gCurrentMove\n\
_0800CA38: .4byte gUnknown_02024BE8\n\
-_0800CA3C: .4byte gUnknown_02024C04\n\
-_0800CA40: .4byte byte_2024C06\n\
+_0800CA3C: .4byte gLastUsedItem\n\
+_0800CA40: .4byte gLastUsedAbility\n\
_0800CA44: .4byte 0x02000000\n\
_0800CA48: .4byte 0x00016003\n\
_0800CA4C: .4byte 0x000160c1\n\
-_0800CA50: .4byte gUnknown_02024C0B\n\
+_0800CA50: .4byte gStringBank\n\
_0800CA54: .4byte gBattleMoves\n\
-_0800CA58: .4byte gUnknown_030042B0\n\
+_0800CA58: .4byte gBattleTextBuff3\n\
_0800CA5C: .4byte gBattleMons\n\
-_0800CA60: .4byte gUnknown_03004290\n\
-_0800CA64: .4byte gUnknown_030041C0\n\
+_0800CA60: .4byte gBattleTextBuff2\n\
+_0800CA64: .4byte gBattleTextBuff1\n\
.syntax divided\n");
}
#endif
__attribute__((naked))
-void dp01_build_cmdbuf_x11_TODO()
+void EmitPrintStringPlayerOnly()
{
asm(".syntax unified\n\
push {r4-r7,lr}\n\
@@ -936,7 +917,7 @@ void dp01_build_cmdbuf_x11_TODO()
mov r10, r0\n\
lsls r1, 16\n\
lsrs r1, 16\n\
- ldr r2, _0800CB28 @ =gUnknown_03004040\n\
+ ldr r2, _0800CB28 @ =gBattleBuffersTransferData\n\
movs r0, 0x11\n\
strb r0, [r2]\n\
strb r0, [r2, 0x1]\n\
@@ -945,17 +926,17 @@ void dp01_build_cmdbuf_x11_TODO()
strb r1, [r2, 0x3]\n\
adds r0, r2, 0x4\n\
mov r12, r0\n\
- ldr r0, _0800CB2C @ =gUnknown_02024BE6\n\
+ ldr r0, _0800CB2C @ =gCurrentMove\n\
ldrh r0, [r0]\n\
strh r0, [r2, 0x4]\n\
ldr r0, _0800CB30 @ =gUnknown_02024BE8\n\
ldrh r0, [r0]\n\
mov r1, r12\n\
strh r0, [r1, 0x2]\n\
- ldr r0, _0800CB34 @ =gUnknown_02024C04\n\
+ ldr r0, _0800CB34 @ =gLastUsedItem\n\
ldrh r0, [r0]\n\
strh r0, [r1, 0x4]\n\
- ldr r0, _0800CB38 @ =byte_2024C06\n\
+ ldr r0, _0800CB38 @ =gLastUsedAbility\n\
ldrb r0, [r0]\n\
strb r0, [r1, 0x6]\n\
ldr r0, _0800CB3C @ =0x02000000\n\
@@ -970,7 +951,7 @@ void dp01_build_cmdbuf_x11_TODO()
strb r0, [r7, 0x8]\n\
movs r3, 0\n\
mov r9, r2\n\
- ldr r7, _0800CB48 @ =gUnknown_030042B0\n\
+ ldr r7, _0800CB48 @ =gBattleTextBuff3\n\
mov r8, r7\n\
mov r4, r9\n\
adds r4, 0x10\n\
@@ -990,12 +971,12 @@ _0800CACE:\n\
adds r5, 0x10\n\
mov r4, r12\n\
adds r4, 0x20\n\
- ldr r6, _0800CB50 @ =gUnknown_03004290\n\
+ ldr r6, _0800CB50 @ =gBattleTextBuff2\n\
mov r2, r12\n\
adds r2, 0x30\n\
_0800CAEC:\n\
adds r1, r5, r3\n\
- ldr r7, _0800CB54 @ =gUnknown_030041C0\n\
+ ldr r7, _0800CB54 @ =gBattleTextBuff1\n\
adds r0, r3, r7\n\
ldrb r0, [r0]\n\
strb r0, [r1]\n\
@@ -1023,384 +1004,384 @@ _0800CAEC:\n\
pop {r0}\n\
bx r0\n\
.align 2, 0\n\
-_0800CB28: .4byte gUnknown_03004040\n\
-_0800CB2C: .4byte gUnknown_02024BE6\n\
+_0800CB28: .4byte gBattleBuffersTransferData\n\
+_0800CB2C: .4byte gCurrentMove\n\
_0800CB30: .4byte gUnknown_02024BE8\n\
-_0800CB34: .4byte gUnknown_02024C04\n\
-_0800CB38: .4byte byte_2024C06\n\
+_0800CB34: .4byte gLastUsedItem\n\
+_0800CB38: .4byte gLastUsedAbility\n\
_0800CB3C: .4byte 0x02000000\n\
_0800CB40: .4byte 0x00016003\n\
_0800CB44: .4byte 0x0001605e\n\
-_0800CB48: .4byte gUnknown_030042B0\n\
+_0800CB48: .4byte gBattleTextBuff3\n\
_0800CB4C: .4byte gBattleMons\n\
-_0800CB50: .4byte gUnknown_03004290\n\
-_0800CB54: .4byte gUnknown_030041C0\n\
+_0800CB50: .4byte gBattleTextBuff2\n\
+_0800CB54: .4byte gBattleTextBuff1\n\
.syntax divided\n");
}
void dp01_build_cmdbuf_x12_a_bb(u8 a, u8 b, u16 c)
{
- gUnknown_03004040[0] = 18;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
- gUnknown_03004040[3] = (c & 0xFF00) >> 8;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 18;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[3] = (c & 0xFF00) >> 8;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void unref_sub_800CB84(u8 a, u8 b)
{
- gUnknown_03004040[0] = 19;
- gUnknown_03004040[1] = b;
- dp01_prepare_buffer(a, gUnknown_03004040, 2);
+ gBattleBuffersTransferData[0] = 19;
+ gBattleBuffersTransferData[1] = b;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 2);
}
void sub_800CBA4(u8 a, u8 b, u8 c, u8 *d)
{
u32 i;
- gUnknown_03004040[0] = 20;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
- gUnknown_03004040[3] = 0;
+ gBattleBuffersTransferData[0] = 20;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[3] = 0;
for (i = 0; i < 20; i++)
- gUnknown_03004040[4 + i] = d[i];
- dp01_prepare_buffer(a, gUnknown_03004040, 24);
+ gBattleBuffersTransferData[4 + i] = d[i];
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 24);
}
void sub_800CBE0(u8 a, u8 *b)
{
int i;
- gUnknown_03004040[0] = 21;
+ gBattleBuffersTransferData[0] = 21;
for (i = 0; i < 3; i++)
- gUnknown_03004040[1 + i] = b[i];
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[1 + i] = b[i];
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f(u8 a, u8 b, u8 c, u8 d, u8 *e)
{
int i;
- gUnknown_03004040[0] = 22;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
- gUnknown_03004040[3] = d;
+ gBattleBuffersTransferData[0] = 22;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[3] = d;
for (i = 0; i < 3; i++)
- gUnknown_03004040[4 + i] = e[i];
- dp01_prepare_buffer(a, gUnknown_03004040, 8); //but only 7 bytes were written
+ gBattleBuffersTransferData[4 + i] = e[i];
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 8); //but only 7 bytes were written
}
void dp01_build_cmdbuf_x17_17_17_17(u8 a)
{
- gUnknown_03004040[0] = 23;
- gUnknown_03004040[1] = 23;
- gUnknown_03004040[2] = 23;
- gUnknown_03004040[3] = 23;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 23;
+ gBattleBuffersTransferData[1] = 23;
+ gBattleBuffersTransferData[2] = 23;
+ gBattleBuffersTransferData[3] = 23;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x18_0_aa_health_bar_update(u8 a, s16 b)
+void EmitHealthBarUpdate(u8 a, s16 b)
{
- gUnknown_03004040[0] = 24;
- gUnknown_03004040[1] = 0;
- gUnknown_03004040[2] = b;
- gUnknown_03004040[3] = (b & 0xFF00) >> 8;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 24;
+ gBattleBuffersTransferData[1] = 0;
+ gBattleBuffersTransferData[2] = b;
+ gBattleBuffersTransferData[3] = (b & 0xFF00) >> 8;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x19_a_bb(u8 a, u8 b, s16 c)
+void EmitExpBarUpdate(u8 a, u8 b, s16 c)
{
- gUnknown_03004040[0] = 25;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
- gUnknown_03004040[3] = (c & 0xFF00) >> 8;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 25;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[3] = (c & 0xFF00) >> 8;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x1A_aaaa_bbbb(u8 a, u32 b, u32 c)
+void EmitStatusIconUpdate(u8 a, u32 b, u32 c)
{
- gUnknown_03004040[0] = 26;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = (b & 0x0000FF00) >> 8;
- gUnknown_03004040[3] = (b & 0x00FF0000) >> 16;
- gUnknown_03004040[4] = (b & 0xFF000000) >> 24;
- gUnknown_03004040[5] = c;
- gUnknown_03004040[6] = (c & 0x0000FF00) >> 8;
- gUnknown_03004040[7] = (c & 0x00FF0000) >> 16;
- gUnknown_03004040[8] = (c & 0xFF000000) >> 24;
- dp01_prepare_buffer(a, gUnknown_03004040, 9);
+ gBattleBuffersTransferData[0] = 26;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = (b & 0x0000FF00) >> 8;
+ gBattleBuffersTransferData[3] = (b & 0x00FF0000) >> 16;
+ gBattleBuffersTransferData[4] = (b & 0xFF000000) >> 24;
+ gBattleBuffersTransferData[5] = c;
+ gBattleBuffersTransferData[6] = (c & 0x0000FF00) >> 8;
+ gBattleBuffersTransferData[7] = (c & 0x00FF0000) >> 16;
+ gBattleBuffersTransferData[8] = (c & 0xFF000000) >> 24;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 9);
}
-void dp01_build_cmdbuf_x1B_aaaa_b(u8 a, u8 b, u32 c)
+void EmitStatusAnimation(u8 a, u8 b, u32 c)
{
- gUnknown_03004040[0] = 27;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
- gUnknown_03004040[3] = (c & 0x0000FF00) >> 8;
- gUnknown_03004040[4] = (c & 0x00FF0000) >> 16;
- gUnknown_03004040[5] = (c & 0xFF000000) >> 24;
- dp01_prepare_buffer(a, gUnknown_03004040, 6);
+ gBattleBuffersTransferData[0] = 27;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[3] = (c & 0x0000FF00) >> 8;
+ gBattleBuffersTransferData[4] = (c & 0x00FF0000) >> 16;
+ gBattleBuffersTransferData[5] = (c & 0xFF000000) >> 24;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 6);
}
-void dp01_build_cmdbuf_x1C_a(u8 a, u8 b)
+void EmitStatusXor(u8 a, u8 b)
{
- gUnknown_03004040[0] = 28;
- gUnknown_03004040[1] = b;
- dp01_prepare_buffer(a, gUnknown_03004040, 2);
+ gBattleBuffersTransferData[0] = 28;
+ gBattleBuffersTransferData[1] = b;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 2);
}
void dp01_build_cmdbuf_x1D_1D_numargs_varargs(u8 a, u16 b, u8 *c)
{
int i;
- gUnknown_03004040[0] = 29;
- gUnknown_03004040[1] = 29;
- gUnknown_03004040[2] = b;
- gUnknown_03004040[3] = (b & 0xFF00) >> 8;
+ gBattleBuffersTransferData[0] = 29;
+ gBattleBuffersTransferData[1] = 29;
+ gBattleBuffersTransferData[2] = b;
+ gBattleBuffersTransferData[3] = (b & 0xFF00) >> 8;
for (i = 0; i < b; i++)
- gUnknown_03004040[4 + i] = *(c++);
- dp01_prepare_buffer(a, gUnknown_03004040, b + 4);
+ gBattleBuffersTransferData[4 + i] = *(c++);
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, b + 4);
}
void unref_sub_800CDD4(u8 a, u32 b, u16 c, u8 *d)
{
int i;
- gUnknown_03004040[0] = 30;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = (b & 0x0000FF00) >> 8;
- gUnknown_03004040[3] = (b & 0x00FF0000) >> 16;
- gUnknown_03004040[4] = (b & 0xFF000000) >> 24;
- gUnknown_03004040[5] = c;
- gUnknown_03004040[6] = (c & 0xFF00) >> 8;
+ gBattleBuffersTransferData[0] = 30;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = (b & 0x0000FF00) >> 8;
+ gBattleBuffersTransferData[3] = (b & 0x00FF0000) >> 16;
+ gBattleBuffersTransferData[4] = (b & 0xFF000000) >> 24;
+ gBattleBuffersTransferData[5] = c;
+ gBattleBuffersTransferData[6] = (c & 0xFF00) >> 8;
for (i = 0; i < c; i++)
- gUnknown_03004040[7 + i] = *(d++);
- dp01_prepare_buffer(a, gUnknown_03004040, c + 7);
+ gBattleBuffersTransferData[7 + i] = *(d++);
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, c + 7);
}
void unref_sub_800CE3C(u8 a, u16 b, u8 *c)
{
int i;
- gUnknown_03004040[0] = 31;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = (b & 0xFF00) >> 8;
+ gBattleBuffersTransferData[0] = 31;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = (b & 0xFF00) >> 8;
for (i = 0; i < b; i++)
- gUnknown_03004040[3 + i] = *(c++);
- dp01_prepare_buffer(a, gUnknown_03004040, b + 3);
+ gBattleBuffersTransferData[3 + i] = *(c++);
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, b + 3);
}
void unref_sub_800CE84(u8 a, u16 b, u8 *c)
{
int i;
- gUnknown_03004040[0] = 32;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = (b & 0xFF00) >> 8;
+ gBattleBuffersTransferData[0] = 32;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = (b & 0xFF00) >> 8;
for (i = 0; i < b; i++)
- gUnknown_03004040[3 + i] = *(c++);
- dp01_prepare_buffer(a, gUnknown_03004040, b + 3);
+ gBattleBuffersTransferData[3 + i] = *(c++);
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, b + 3);
}
void dp01_build_cmdbuf_x21_a_bb(u8 a, u8 b, u16 c)
{
- gUnknown_03004040[0] = 33;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
- gUnknown_03004040[3] = (c & 0xFF00) >> 8;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 33;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[3] = (c & 0xFF00) >> 8;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x22_a_three_bytes(u8 a, u8 b, u8 *c)
{
int i;
- gUnknown_03004040[0] = 34;
- gUnknown_03004040[1] = b;
+ gBattleBuffersTransferData[0] = 34;
+ gBattleBuffersTransferData[1] = b;
for (i = 0; i < 3; i++)
- gUnknown_03004040[2 + i] = c[i];
- dp01_prepare_buffer(a, gUnknown_03004040, 5);
+ gBattleBuffersTransferData[2 + i] = c[i];
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 5);
}
void dp01_build_cmdbuf_x23_aa_0(u8 a, u16 b)
{
- gUnknown_03004040[0] = 35;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = (b & 0xFF00) >> 8;
- gUnknown_03004040[3] = 0;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 35;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = (b & 0xFF00) >> 8;
+ gBattleBuffersTransferData[3] = 0;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x24_aa_0(u8 a, u16 b)
{
- gUnknown_03004040[0] = 36;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = (b & 0xFF00) >> 8;
- gUnknown_03004040[3] = 0;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 36;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = (b & 0xFF00) >> 8;
+ gBattleBuffersTransferData[3] = 0;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x25_25_25_25(u8 a)
{
- gUnknown_03004040[0] = 37;
- gUnknown_03004040[1] = 37;
- gUnknown_03004040[2] = 37;
- gUnknown_03004040[3] = 37;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 37;
+ gBattleBuffersTransferData[1] = 37;
+ gBattleBuffersTransferData[2] = 37;
+ gBattleBuffersTransferData[3] = 37;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x26_a(u8 a, u8 b)
{
- gUnknown_03004040[0] = 38;
- gUnknown_03004040[1] = b;
- dp01_prepare_buffer(a, gUnknown_03004040, 2);
+ gBattleBuffersTransferData[0] = 38;
+ gBattleBuffersTransferData[1] = b;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 2);
}
void dp01_build_cmdbuf_x27_27_27_27(u8 a)
{
- gUnknown_03004040[0] = 39;
- gUnknown_03004040[1] = 39;
- gUnknown_03004040[2] = 39;
- gUnknown_03004040[3] = 39;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 39;
+ gBattleBuffersTransferData[1] = 39;
+ gBattleBuffersTransferData[2] = 39;
+ gBattleBuffersTransferData[3] = 39;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x28_28_28_28(u8 a)
{
- gUnknown_03004040[0] = 40;
- gUnknown_03004040[1] = 40;
- gUnknown_03004040[2] = 40;
- gUnknown_03004040[3] = 40;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 40;
+ gBattleBuffersTransferData[1] = 40;
+ gBattleBuffersTransferData[2] = 40;
+ gBattleBuffersTransferData[3] = 40;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x29_29_29_29(u8 a)
+void EmitHitAnimation(u8 a)
{
- gUnknown_03004040[0] = 41;
- gUnknown_03004040[1] = 41;
- gUnknown_03004040[2] = 41;
- gUnknown_03004040[3] = 41;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 41;
+ gBattleBuffersTransferData[1] = 41;
+ gBattleBuffersTransferData[2] = 41;
+ gBattleBuffersTransferData[3] = 41;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x2A_2A_2A_2A(u8 a)
{
- gUnknown_03004040[0] = 42;
- gUnknown_03004040[1] = 42;
- gUnknown_03004040[2] = 42;
- gUnknown_03004040[3] = 42;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 42;
+ gBattleBuffersTransferData[1] = 42;
+ gBattleBuffersTransferData[2] = 42;
+ gBattleBuffersTransferData[3] = 42;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x2B_aa_0(u8 a, u16 b)
+void EmitEffectivenessSound(u8 a, u16 b)
{
- gUnknown_03004040[0] = 43;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = (b & 0xFF00) >> 8;
- gUnknown_03004040[3] = 0;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 43;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = (b & 0xFF00) >> 8;
+ gBattleBuffersTransferData[3] = 0;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void sub_800D074(u8 a, u16 b)
{
- gUnknown_03004040[0] = 44;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = (b & 0xFF00) >> 8;
- gUnknown_03004040[3] = 0;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 44;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = (b & 0xFF00) >> 8;
+ gBattleBuffersTransferData[3] = 0;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x2D_2D_2D_2D(u8 a)
+void EmitFaintingCry(u8 a)
{
- gUnknown_03004040[0] = 45;
- gUnknown_03004040[1] = 45;
- gUnknown_03004040[2] = 45;
- gUnknown_03004040[3] = 45;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 45;
+ gBattleBuffersTransferData[1] = 45;
+ gBattleBuffersTransferData[2] = 45;
+ gBattleBuffersTransferData[3] = 45;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x2E_a(u8 a, u8 b)
+void EmitBattleIntroSlide(u8 a, u8 b)
{
- gUnknown_03004040[0] = 46;
- gUnknown_03004040[1] = b;
- dp01_prepare_buffer(a, gUnknown_03004040, 2);
+ gBattleBuffersTransferData[0] = 46;
+ gBattleBuffersTransferData[1] = b;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 2);
}
void dp01_build_cmdbuf_x2F_2F_2F_2F(u8 a)
{
- gUnknown_03004040[0] = 47;
- gUnknown_03004040[1] = 47;
- gUnknown_03004040[2] = 47;
- gUnknown_03004040[3] = 47;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 47;
+ gBattleBuffersTransferData[1] = 47;
+ gBattleBuffersTransferData[2] = 47;
+ gBattleBuffersTransferData[3] = 47;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x30_TODO(u8 a, u8 *b, u8 c)
{
int i;
- gUnknown_03004040[0] = 48;
- gUnknown_03004040[1] = c & 0x7F;
- gUnknown_03004040[2] = (c & 0x80) >> 7;
- gUnknown_03004040[3] = 48;
+ gBattleBuffersTransferData[0] = 48;
+ gBattleBuffersTransferData[1] = c & 0x7F;
+ gBattleBuffersTransferData[2] = (c & 0x80) >> 7;
+ gBattleBuffersTransferData[3] = 48;
for (i = 0; i < 48; i++)
- gUnknown_03004040[4 + i] = b[i];
- dp01_prepare_buffer(a, gUnknown_03004040, 52);
+ gBattleBuffersTransferData[4 + i] = b[i];
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 52);
}
void dp01_build_cmdbuf_x31_31_31_31(u8 a)
{
- gUnknown_03004040[0] = 49;
- gUnknown_03004040[1] = 49;
- gUnknown_03004040[2] = 49;
- gUnknown_03004040[3] = 49;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 49;
+ gBattleBuffersTransferData[1] = 49;
+ gBattleBuffersTransferData[2] = 49;
+ gBattleBuffersTransferData[3] = 49;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x32_32_32_32(u8 a)
{
- gUnknown_03004040[0] = 50;
- gUnknown_03004040[1] = 50;
- gUnknown_03004040[2] = 50;
- gUnknown_03004040[3] = 50;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 50;
+ gBattleBuffersTransferData[1] = 50;
+ gBattleBuffersTransferData[2] = 50;
+ gBattleBuffersTransferData[3] = 50;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x33_a_33_33(u8 a, u8 b)
+void EmitSpriteInvisibility(u8 a, u8 b)
{
- gUnknown_03004040[0] = 51;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = 51;
- gUnknown_03004040[3] = 51;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 51;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = 51;
+ gBattleBuffersTransferData[3] = 51;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void dp01_build_cmdbuf_x34_a_bb_aka_battle_anim(u8 a, u8 b, u16 c)
+void EmitBattleAnimation(u8 a, u8 b, u16 c)
{
- gUnknown_03004040[0] = 52;
- gUnknown_03004040[1] = b;
- gUnknown_03004040[2] = c;
- gUnknown_03004040[3] = (c & 0xFF00) >> 8;
- dp01_prepare_buffer(a, gUnknown_03004040, 4);
+ gBattleBuffersTransferData[0] = 52;
+ gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[3] = (c & 0xFF00) >> 8;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
-void sub_800D1D8(u8 a, u8 b)
+void EmitLinkStandbyMsg(u8 a, u8 b)
{
- gUnknown_03004040[0] = 53;
- gUnknown_03004040[1] = b;
- dp01_prepare_buffer(a, gUnknown_03004040, 2);
+ gBattleBuffersTransferData[0] = 53;
+ gBattleBuffersTransferData[1] = b;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 2);
}
-void dp01_build_cmdbuf_x38_a(u8 a, u8 b)
+void EmitResetActionMoveSelection(u8 a, u8 b)
{
- gUnknown_03004040[0] = 54;
- gUnknown_03004040[1] = b;
- dp01_prepare_buffer(a, gUnknown_03004040, 2);
+ gBattleBuffersTransferData[0] = 54;
+ gBattleBuffersTransferData[1] = b;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 2);
}
void dp01_build_cmdbuf_x37_a(u8 a, u8 b)
{
- gUnknown_03004040[0] = 55;
- gUnknown_03004040[1] = b;
- dp01_prepare_buffer(a, gUnknown_03004040, 2);
+ gBattleBuffersTransferData[0] = 55;
+ gBattleBuffersTransferData[1] = b;
+ dp01_prepare_buffer(a, gBattleBuffersTransferData, 2);
}
diff --git a/src/rom4.c b/src/rom4.c
index 98060c3b1..2ddd5ed9f 100644
--- a/src/rom4.c
+++ b/src/rom4.c
@@ -1,24 +1,31 @@
#include "global.h"
#include "rom4.h"
-#include "asm.h"
-#include "asm_fieldmap.h"
#include "battle_setup.h"
#include "berry.h"
+#include "cable_club.h"
#include "clock.h"
#include "event_data.h"
#include "field_camera.h"
#include "field_control_avatar.h"
#include "field_effect.h"
+#include "field_fadetransition.h"
+#include "field_ground_effect.h"
#include "field_map_obj.h"
#include "field_map_obj_helpers.h"
#include "field_message_box.h"
#include "field_player_avatar.h"
-#include "field_weather.h"
+#include "field_screen_effect.h"
#include "field_special_scene.h"
+#include "field_specials.h"
+#include "field_tasks.h"
+#include "field_weather.h"
+#include "fieldmap.h"
+#include "fldeff_flash.h"
#include "heal_location.h"
#include "link.h"
#include "load_save.h"
#include "main.h"
+#include "map_name_popup.h"
#include "menu.h"
#include "metatile_behavior.h"
#include "new_game.h"
@@ -26,14 +33,19 @@
#include "play_time.h"
#include "rng.h"
#include "roamer.h"
+#include "rotating_gate.h"
#include "safari_zone.h"
#include "script.h"
#include "script_pokemon_80C4.h"
+#include "secret_base.h"
#include "songs.h"
#include "sound.h"
#include "start_menu.h"
#include "task.h"
#include "tileset_anim.h"
+#include "time_events.h"
+#include "tv.h"
+#include "unknown_task.h"
#include "wild_encounter.h"
#ifdef SAPPHIRE
@@ -48,11 +60,6 @@ struct UnkTVStruct
u32 tv_field_4;
};
-struct UCoords32
-{
- u32 x, y;
-};
-
extern struct WarpData gUnknown_020297F0;
extern struct WarpData gUnknown_020297F8;
extern struct WarpData gUnknown_02029800;
@@ -71,8 +78,6 @@ extern void (*gFieldCallback)(void);
extern u8 gUnknown_03004860;
extern u8 gFieldLinkPlayerCount;
-extern struct UnkTVStruct gUnknown_03004870;
-
extern u16 gUnknown_03004898;
extern u16 gUnknown_0300489C;
@@ -97,8 +102,6 @@ extern u8 TradeRoom_PromptToCancelLink[];
extern u8 TradeRoom_TerminateLink[];
extern u8 gUnknown_081A4508[];
-extern struct UCoords32 gUnknown_0821664C[];
-
extern u8 (*gUnknown_082166A0[])(struct LinkPlayerMapObject *, struct MapObject *, u8);
extern u8 (*gUnknown_082166AC[])(struct LinkPlayerMapObject *, struct MapObject *, u8);
extern void (*gUnknown_082166D8[])(struct LinkPlayerMapObject *, struct MapObject *);
@@ -567,7 +570,7 @@ void sub_8053994(u32 a1)
not_trainer_hill_battle_pyramid();
if (a1 != 1 && v3)
{
- UpdateTVScreensOnMap(gUnknown_03004870.tv_field_0, gUnknown_03004870.tv_field_4);
+ UpdateTVScreensOnMap(gUnknown_03004870.width, gUnknown_03004870.height);
sub_80BBCCC(1);
}
}
diff --git a/src/rom6.c b/src/rom6.c
index a8233eb5b..759aed93f 100644
--- a/src/rom6.c
+++ b/src/rom6.c
@@ -1,9 +1,11 @@
#include "global.h"
#include "rom6.h"
-#include "asm.h"
#include "braille_puzzles.h"
#include "field_effect.h"
+#include "field_map_obj.h"
#include "field_player_avatar.h"
+#include "item_use.h"
+#include "pokemon_menu.h"
#include "rom4.h"
#include "script.h"
#include "songs.h"
@@ -19,10 +21,6 @@ extern u8 gLastFieldPokeMenuOpened;
extern void (*gUnknown_03005CE4)(void);
extern u8 UseRockSmashScript[];
-extern void sub_808AB90(void);
-extern void task08_080A1C44(u8);
-extern u8 sub_80CA1C8(void);
-
static void task08_080C9820(u8);
static void sub_810B3DC(u8);
static void sub_810B428(u8);
diff --git a/src/rom_800D42C.c b/src/rom_800D42C.c
index 6f153c340..f51779e65 100644
--- a/src/rom_800D42C.c
+++ b/src/rom_800D42C.c
@@ -4,7 +4,7 @@
#include "text.h"
extern u16 gBattleTypeFlags;
-extern u8 gUnknown_02024D26;
+extern u8 gBattleOutcome;
extern struct Window gUnknown_03004210;
@@ -37,7 +37,7 @@ extern u8 BattleText_Tie[];
void PrintLinkBattleWinLossTie(void)
{
- if (gUnknown_02024D26 == 3)
+ if (gBattleOutcome == 3)
{
PRINT_MESSAGE(BattleText_Tie, TILE_OFFSET_WIN, CENTER_MESSAGE_X);
return;
@@ -47,7 +47,7 @@ void PrintLinkBattleWinLossTie(void)
{
// Double battle?
- if (gUnknown_02024D26 == 1)
+ if (gBattleOutcome == 1)
{
// lp_field_18 = player position?
@@ -89,7 +89,7 @@ void PrintLinkBattleWinLossTie(void)
}
- if (gUnknown_02024D26 == 1)
+ if (gBattleOutcome == 1)
{
if (gLinkPlayers[BATTLE_STRUCT->linkPlayerIndex].lp_field_18 != 0)
{
diff --git a/src/rom_8077ABC.c b/src/rom_8077ABC.c
index 9561db690..249146b37 100644
--- a/src/rom_8077ABC.c
+++ b/src/rom_8077ABC.c
@@ -1,13 +1,17 @@
#include "global.h"
+#include "rom_8077ABC.h"
#include "battle.h"
+#include "battle_anim.h"
#include "blend_palette.h"
#include "data2.h"
#include "decompress.h"
#include "palette.h"
+#include "pokemon_icon.h"
#include "species.h"
#include "sprite.h"
#include "task.h"
#include "trig.h"
+#include "util.h"
#define GET_UNOWN_LETTER(personality) ((\
(((personality & 0x03000000) >> 24) << 6) \
@@ -20,11 +24,11 @@
#define NUM_BATTLE_SLOTS 4
-#define gBattleMonPartyPositions gUnknown_02024A6A
+#define gBattleMonPartyPositions gBattlePartyID
#define gCastformElevations gUnknownCastformData_0837F5A8
#define gCastformBackSpriteYCoords gUnknown_0837F5AC
-#define gTransformPersonalities gUnknown_02024E70
-#define gBattleMonSprites gUnknown_02024BE0
+#define gTransformPersonalities gPID_perBank
+#define gBattleMonSprites gObjectBankIDs
struct Struct_unk_2019348 {
@@ -89,7 +93,6 @@ struct BGCnt {
extern struct OamData gOamData_837DF9C[];
extern const union AnimCmd *const gDummySpriteAnimTable[];
extern const union AffineAnimCmd *const gDummySpriteAffineAnimTable[];
-extern u8 gMiscBlank_Gfx[];
extern struct Struct_unk_2019348 unk_2019348;
extern struct TransformStatus gTransformStatuses[];
@@ -102,50 +105,11 @@ extern u8 gBattleMonSprites[NUM_BATTLE_SLOTS];
extern u8 gBattleAnimPlayerMonIndex;
extern u8 gBattleAnimEnemyMonIndex;
extern s16 gBattleAnimArgs[8];
-extern u8 gUnknown_02024A72[NUM_BATTLE_SLOTS];
-extern u8 gUnknown_02024A68; // gNumBattleMons?
+extern u8 gBanksBySide[NUM_BATTLE_SLOTS];
+extern u8 gNoOfAllBanks; // gNumBattleMons?
extern struct OamMatrix gOamMatrices[];
extern struct Struct_2017810 unk_2017810[];
-extern u8 gUnknown_0202F7BE;
-
-extern u8 IsContest();
-extern bool8 sub_8078874(u8);
-extern bool8 b_side_obj__get_some_boolean(u8);
-extern void UpdateMonIconFrame(struct Sprite *sprite);
-extern void CalcCenterToCornerVec(struct Sprite *sprite, u8 shape, u8 size, u8 affineMode);
-extern void *species_and_otid_get_pal(u32, u32, u32);
-extern void FreeSpriteOamMatrix(struct Sprite *sprite);
-extern void ResetPaletteStructByUid(u16);
-extern void DestroyAnimVisualTask(u8 task);
-extern u8 CreateInvisibleSpriteWithCallback(void (*callback)(struct Sprite *));
-
-u8 sub_8077E44(u8 slot, u16 species, u8 a3);
-u8 battle_get_per_side_status(u8 slot);
-u8 battle_side_get_owner(u8 slot);
-void sub_8078314(struct Sprite *sprite);
-void sub_8078364(struct Sprite *sprite);
-void move_anim_8072740(struct Sprite *sprite);
-void obj_translate_based_on_private_1_2_3_4(struct Sprite *sprite);
-bool8 sub_8078B5C(struct Sprite *sprite);
-u8 battle_get_per_side_status_permutated(u8 slot);
-void sub_8078A5C(struct Sprite *sprite);
-void sub_8078BB8(struct Sprite *sprite);
-void sub_8078D44(struct Sprite *sprite);
-bool8 sub_8078E38();
-void sub_8079518(struct Sprite *sprite);
-void sub_80796F8(u8 task);
-void sub_80797EC(struct Task *task);
-void sub_8079814(u8 taskId);
-void sub_8079BF4(s16 *bottom, s16 *top, void *ptr);
-void *sub_8079BFC(s16 bottom, s16 top);
-void sub_8079A64(u8 sprite);
-u16 sub_8079B10(u8 sprite);
-u8 sub_8079E90(u8 slot);
-void sub_807A784(u8 taskId);
-void sub_807A850(struct Task *task, u8 taskId);
-void sub_807A8D4(struct Sprite *sprite);
-void sub_807A960(struct Sprite *sprite);
-
+extern u8 gHappinessMoveAnim;
EWRAM_DATA union AffineAnimCmd *gUnknown_0202F7D4 = NULL;
EWRAM_DATA u32 filler_0202F7D8[3] = {0};
@@ -229,10 +193,10 @@ u8 sub_8077ABC(u8 slot, u8 a2) {
switch (a2) {
case 0:
case 2:
- var = gUnknown_0837F578[IS_DOUBLE_BATTLE()][battle_get_per_side_status(slot)].field_0;
+ var = gUnknown_0837F578[IS_DOUBLE_BATTLE()][GetBankIdentity(slot)].field_0;
break;
case 1:
- var = gUnknown_0837F578[IS_DOUBLE_BATTLE()][battle_get_per_side_status(slot)].field_1;
+ var = gUnknown_0837F578[IS_DOUBLE_BATTLE()][GetBankIdentity(slot)].field_1;
break;
case 3:
case 4:
@@ -244,7 +208,7 @@ u8 sub_8077ABC(u8 slot, u8 a2) {
species = unk_2019348.field_0;
}
} else {
- if (battle_side_get_owner(slot)) {
+ if (GetBankSide(slot)) {
transform = &gTransformStatuses[slot];
if (!transform->species) {
species = GetMonData(&gEnemyParty[gBattleMonPartyPositions[slot]], MON_DATA_SPECIES);
@@ -277,7 +241,7 @@ u8 sub_8077BFC(u8 slot, u16 species) {
u8 ret;
u16 var;
- if (!battle_side_get_owner(slot) || IsContest()) {
+ if (!GetBankSide(slot) || IsContest()) {
if (species == SPECIES_UNOWN) {
if (IsContest()) {
if (unk_2019348.field_4 & 1) {
@@ -335,7 +299,7 @@ u8 sub_8077BFC(u8 slot, u16 species) {
u8 sub_8077DD8(u8 slot, u16 species) {
u8 ret = 0;
- if (battle_side_get_owner(slot) == 1) {
+ if (GetBankSide(slot) == 1) {
if (!IsContest()) {
if (species == SPECIES_CASTFORM) {
ret = gCastformElevations[gBattleMonForms[slot]];
@@ -352,15 +316,15 @@ u8 sub_8077DD8(u8 slot, u16 species) {
u8 sub_8077E44(u8 slot, u16 species, u8 a3) {
u16 offset;
u8 y;
- if (battle_side_get_owner(slot) == 0 || IsContest()) {
+ if (GetBankSide(slot) == 0 || IsContest()) {
offset = sub_8077BFC(slot, species);
} else {
offset = sub_8077BFC(slot, species);
offset -= sub_8077DD8(slot, species);
}
- y = offset + gUnknown_0837F578[IS_DOUBLE_BATTLE()][battle_get_per_side_status(slot)].field_1;
+ y = offset + gUnknown_0837F578[IS_DOUBLE_BATTLE()][GetBankIdentity(slot)].field_1;
if (a3) {
- if (battle_side_get_owner(slot) == 0) {
+ if (GetBankSide(slot) == 0) {
y += 8;
}
if (y > 104) y = 104;
@@ -402,7 +366,7 @@ u8 sub_8077F68(u8 slot) {
u8 sub_8077F7C(u8 slot) {
u16 var;
- if (battle_side_get_owner(slot)) {
+ if (GetBankSide(slot)) {
var = sub_8077ABC(slot, 1) + 16;
} else {
var = sub_8077ABC(slot, 1) + 17;
@@ -416,7 +380,7 @@ u8 sub_8077FC0(u8 slot) {
struct TransformStatus *transform;
r6 = sub_8077ABC(slot, 1);
if (!IsContest()) {
- if (battle_side_get_owner(slot)) {
+ if (GetBankSide(slot)) {
transform = &gTransformStatuses[slot];
if (!transform->species) {
var = GetMonData(&gEnemyParty[gBattleMonPartyPositions[slot]], MON_DATA_SPECIES);
@@ -431,7 +395,7 @@ u8 sub_8077FC0(u8 slot) {
var = transform->species;
}
}
- if (battle_side_get_owner(slot)) {
+ if (GetBankSide(slot)) {
r6 -= sub_8077DD8(slot, var);
}
}
@@ -714,7 +678,7 @@ void sub_807867C(struct Sprite *sprite, s16 a2) {
} else if (v1 < v2) {
sprite->pos1.x += a2;
} else {
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex)) {
+ if (GetBankSide(gBattleAnimPlayerMonIndex)) {
sprite->pos1.x -= a2;
} else {
sprite->pos1.x += a2;
@@ -767,18 +731,18 @@ void sub_80787B0(struct Sprite *sprite, u8 a2) {
sprite->pos1.y += gBattleAnimArgs[1];
}
-u8 battle_side_get_owner(u8 slot) {
- return gUnknown_02024A72[slot] & 1;
+u8 GetBankSide(u8 slot) {
+ return gBanksBySide[slot] & 1;
}
-u8 battle_get_per_side_status(u8 slot) {
- return gUnknown_02024A72[slot];
+u8 GetBankIdentity(u8 slot) {
+ return gBanksBySide[slot];
}
-u8 battle_get_side_with_given_state(u8 slot) {
+u8 GetBankByPlayerAI(u8 slot) {
u8 i;
- for (i = 0; i < gUnknown_02024A68; i++) {
- if (gUnknown_02024A72[i] == slot) {
+ for (i = 0; i < gNoOfAllBanks; i++) {
+ if (gBanksBySide[i] == slot) {
break;
}
}
@@ -795,10 +759,10 @@ bool8 sub_8078874(u8 slot) {
}
return FALSE;
} else {
- if (gUnknown_02024A72[slot] == 0xff) {
+ if (gBanksBySide[slot] == 0xff) {
return FALSE;
}
- if (battle_side_get_owner(slot)) {
+ if (GetBankSide(slot)) {
if (GetMonData(&gEnemyParty[gBattleMonPartyPositions[slot]], MON_DATA_HP) != 0) {
return TRUE;
}
@@ -832,7 +796,7 @@ void sub_8078954(struct Struct_sub_8078914 *unk) {
unk->field_0 = (u8 *)0x6008000;
unk->field_4 = (u8 *)0x600f000;
unk->field_8 = 0xe;
- } else if (battle_get_per_side_status_permutated(gBattleAnimPlayerMonIndex) == 1) {
+ } else if (GetBankIdentity_permutated(gBattleAnimPlayerMonIndex) == 1) {
unk->field_0 = (u8 *)0x6004000;
unk->field_4 = (u8 *)0x600e000;
unk->field_8 = 0x8;
@@ -1220,25 +1184,25 @@ u32 sub_80792C0(u8 a1, u8 a2, u8 a3, u8 a4) {
}
} else {
if (a1) {
- if (b_side_obj__get_some_boolean(battle_get_side_with_given_state(0))) {
- var |= 1 << (battle_get_side_with_given_state(0) + 16);
+ if (b_side_obj__get_some_boolean(GetBankByPlayerAI(0))) {
+ var |= 1 << (GetBankByPlayerAI(0) + 16);
}
}
if (a2) {
- if (b_side_obj__get_some_boolean(battle_get_side_with_given_state(2))) {
- shift = battle_get_side_with_given_state(2) + 16;
+ if (b_side_obj__get_some_boolean(GetBankByPlayerAI(2))) {
+ shift = GetBankByPlayerAI(2) + 16;
var |= 1 << shift;
}
}
if (a3) {
- if (b_side_obj__get_some_boolean(battle_get_side_with_given_state(1))) {
- shift = battle_get_side_with_given_state(1) + 16;
+ if (b_side_obj__get_some_boolean(GetBankByPlayerAI(1))) {
+ shift = GetBankByPlayerAI(1) + 16;
var |= 1 << shift;
}
}
if (a4) {
- if (b_side_obj__get_some_boolean(battle_get_side_with_given_state(3))) {
- shift = battle_get_side_with_given_state(3) + 16;
+ if (b_side_obj__get_some_boolean(GetBankByPlayerAI(3))) {
+ shift = GetBankByPlayerAI(3) + 16;
var |= 1 << shift;
}
}
@@ -1251,7 +1215,7 @@ u8 sub_80793A8(u8 a1) {
}
u8 unref_sub_80793B0(u8 a1) {
- return battle_get_side_with_given_state(a1);
+ return GetBankByPlayerAI(a1);
}
void sub_80793C4(struct Sprite *sprite) {
@@ -1288,7 +1252,7 @@ void sub_807941C(struct Sprite *sprite) {
v2 = 1;
}
sub_80787B0(sprite, v1);
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex)) {
+ if (GetBankSide(gBattleAnimPlayerMonIndex)) {
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
}
sprite->data0 = gBattleAnimArgs[4];
@@ -1300,7 +1264,7 @@ void sub_807941C(struct Sprite *sprite) {
void sub_80794A8(struct Sprite *sprite) {
sub_80787B0(sprite, 1);
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex)) {
+ if (GetBankSide(gBattleAnimPlayerMonIndex)) {
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
}
sprite->data0 = gBattleAnimArgs[4];
@@ -1333,7 +1297,7 @@ void sub_8079534(struct Sprite *sprite) {
sub_8078764(sprite, r4);
slot = gBattleAnimEnemyMonIndex;
}
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex)) {
+ if (GetBankSide(gBattleAnimPlayerMonIndex)) {
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
}
sub_8078764(sprite, r4);
@@ -1578,7 +1542,7 @@ u16 sub_8079B10(u8 sprite) {
species = unk_2019348.field_0;
return gMonBackPicCoords[species].y_offset;
} else {
- if (!battle_side_get_owner(i)) {
+ if (!GetBankSide(i)) {
transform = &gTransformStatuses[slot];
if (!transform->species) {
species = GetMonData(&gPlayerParty[gBattleMonPartyPositions[i]], MON_DATA_SPECIES);
@@ -1646,11 +1610,11 @@ u8 sub_8079C74(struct Task *task) {
void sub_8079CEC(u8 task) {
u16 v1;
- if (gUnknown_0202F7BE <= 30) {
+ if (gHappinessMoveAnim <= 30) {
v1 = 0;
- } else if (gUnknown_0202F7BE <= 100) {
+ } else if (gHappinessMoveAnim <= 100) {
v1 = 1;
- } else if (gUnknown_0202F7BE <= 200) {
+ } else if (gHappinessMoveAnim <= 200) {
v1 = 2;
} else {
v1 = 3;
@@ -1676,7 +1640,7 @@ void unref_sub_8079D20(u8 priority) {
void sub_8079E24() {
int i;
- for (i = 0; i < gUnknown_02024A68; i++) {
+ for (i = 0; i < gNoOfAllBanks; i++) {
if (b_side_obj__get_some_boolean(i)) {
gSprites[gBattleMonSprites[i]].subpriority = sub_8079E90(i);
gSprites[gBattleMonSprites[i]].oam.priority = 2;
@@ -1694,7 +1658,7 @@ u8 sub_8079E90(u8 slot) {
return 40;
}
} else {
- status = battle_get_per_side_status(slot);
+ status = GetBankIdentity(slot);
if (status == 0) {
ret = 30;
} else if (status == 2) {
@@ -1709,7 +1673,7 @@ u8 sub_8079E90(u8 slot) {
}
u8 sub_8079ED4(u8 slot) {
- u8 status = battle_get_per_side_status(slot);
+ u8 status = GetBankIdentity(slot);
if (IsContest()) {
return 2;
}
@@ -1720,10 +1684,10 @@ u8 sub_8079ED4(u8 slot) {
}
}
-u8 battle_get_per_side_status_permutated(u8 slot) {
+u8 GetBankIdentity_permutated(u8 slot) {
u8 status;
if (!IsContest()) {
- status = battle_get_per_side_status(slot);
+ status = GetBankIdentity(slot);
if (status == 0 || status == 3) {
return 2;
} else {
@@ -1821,7 +1785,7 @@ int sub_807A100(u8 slot, u8 a2) {
coords = &gMonBackPicCoords[0];
}
} else {
- if (!battle_side_get_owner(slot)) {
+ if (!GetBankSide(slot)) {
transform = &gTransformStatuses[slot];
if (!transform->species) {
species = GetMonData(&gPlayerParty[gBattleMonPartyPositions[slot]], MON_DATA_SPECIES);
@@ -1928,7 +1892,7 @@ u8 sub_807A4A0(int a1, u8 sprite, int a3) {
void sub_807A544(struct Sprite *sprite) {
sub_8078650(sprite);
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex)) {
+ if (GetBankSide(gBattleAnimPlayerMonIndex)) {
sprite->pos1.x -= gBattleAnimArgs[0];
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
sprite->hFlip = TRUE;
@@ -1945,7 +1909,7 @@ void sub_807A544(struct Sprite *sprite) {
}
void sub_807A5C4(struct Sprite *sprite) {
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex)) {
+ if (GetBankSide(gBattleAnimPlayerMonIndex)) {
sprite->pos1.x -= gBattleAnimArgs[0];
gBattleAnimArgs[3] *= -1;
} else {
@@ -1963,7 +1927,7 @@ void sub_807A5C4(struct Sprite *sprite) {
void sub_807A63C(struct Sprite *sprite) {
sub_8078650(sprite);
- if (battle_side_get_owner(gBattleAnimPlayerMonIndex)) {
+ if (GetBankSide(gBattleAnimPlayerMonIndex)) {
sprite->pos1.x -= gBattleAnimArgs[0];
} else {
sprite->pos1.x += gBattleAnimArgs[0];
@@ -1978,7 +1942,7 @@ void sub_807A69C(u8 taskId) {
u16 dest;
struct Task *task = &gTasks[taskId];
task->data[0] = obj_id_for_side_relative_to_move(0);
- task->data[1] = (battle_side_get_owner(gBattleAnimPlayerMonIndex)) ? -8 : 8;
+ task->data[1] = (GetBankSide(gBattleAnimPlayerMonIndex)) ? -8 : 8;
task->data[2] = 0;
task->data[3] = 0;
gSprites[task->data[0]].pos2.x -= task->data[0];
@@ -2050,7 +2014,7 @@ void sub_807A8D4(struct Sprite *sprite) {
void sub_807A908(struct Sprite *sprite) {
sprite->pos1.x = sub_8077ABC(gBattleAnimPlayerMonIndex, 2);
sprite->pos1.y = sub_8077ABC(gBattleAnimPlayerMonIndex, 3);
- if (!battle_side_get_owner(gBattleAnimPlayerMonIndex)) {
+ if (!GetBankSide(gBattleAnimPlayerMonIndex)) {
sprite->data0 = 5;
} else {
sprite->data0 = -10;
@@ -2077,7 +2041,7 @@ void sub_807A9BC(struct Sprite *sprite) {
sprite->data0 = gBattleAnimArgs[2];
sprite->data2 = sprite->pos1.x + gBattleAnimArgs[4];
sprite->data4 = sprite->pos1.y + gBattleAnimArgs[5];
- if (!battle_side_get_owner(gBattleAnimEnemyMonIndex)) {
+ if (!GetBankSide(gBattleAnimEnemyMonIndex)) {
x = (u16)gBattleAnimArgs[4] + 30;
sprite->pos1.x += x;
sprite->pos1.y = gBattleAnimArgs[5] - 20;
diff --git a/src/safari_zone.c b/src/safari_zone.c
index 986412826..a47c8e951 100644
--- a/src/safari_zone.c
+++ b/src/safari_zone.c
@@ -1,7 +1,7 @@
#include "global.h"
#include "safari_zone.h"
-#include "asm.h"
#include "event_data.h"
+#include "field_fadetransition.h"
#include "field_player_avatar.h"
#include "main.h"
#include "rom4.h"
@@ -23,7 +23,7 @@ struct PokeblockFeeder
static void ClearAllPokeblockFeeders(void);
static void DecrementFeederStepCounters(void);
-extern u8 gUnknown_02024D26;
+extern u8 gBattleOutcome;
EWRAM_DATA u8 gNumSafariBalls = 0;
EWRAM_DATA static u16 gSafariZoneStepCounter = 0;
@@ -99,14 +99,14 @@ void sub_80C824C(void)
{
SetMainCallback2(c2_exit_to_overworld_2_switch);
}
- else if (gUnknown_02024D26 == 8)
+ else if (gBattleOutcome == 8)
{
ScriptContext2_RunNewScript(&gUnknown_081C340A);
warp_in();
gFieldCallback = sub_8080E44;
SetMainCallback2(CB2_LoadMap);
}
- else if (gUnknown_02024D26 == 7)
+ else if (gBattleOutcome == 7)
{
ScriptContext1_SetupScript(&gUnknown_081C3459);
ScriptContext1_Stop();
diff --git a/src/save.c b/src/save.c
index 9ab6e83f6..570210fb0 100644
--- a/src/save.c
+++ b/src/save.c
@@ -2,7 +2,6 @@
#include "gba/gba.h"
#include "gba/flash_internal.h"
#include "save.h"
-#include "asm.h"
#include "load_save.h"
#include "rom4.h"
#include "save_failed_screen.h"
diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c
index a3de0bd00..a64b3eb5f 100644
--- a/src/save_failed_screen.c
+++ b/src/save_failed_screen.c
@@ -1,12 +1,13 @@
#include "global.h"
#include "gba/flash_internal.h"
-#include "asm.h"
+#include "save_failed_screen.h"
#include "m4a.h"
#include "main.h"
#include "menu.h"
#include "palette.h"
#include "save.h"
#include "sprite.h"
+#include "starter_choose.h"
#include "strings.h"
#include "task.h"
#include "text.h"
@@ -35,12 +36,6 @@ extern struct SaveFailedClockStruct gSaveFailedClockInfo;
extern u32 gDamagedSaveSectors;
extern u32 gGameContinueCallback;
-extern u8 gBirchHelpGfx[];
-
-extern u8 gBirchGrassTilemap[];
-extern u8 gBirchBagTilemap[];
-extern u8 gBirchBagGrassPal[0x40];
-
static const struct OamData sClockOamData =
{
160, // Y
diff --git a/src/save_menu_util.c b/src/save_menu_util.c
index 8910bb300..b2dd662d6 100644
--- a/src/save_menu_util.c
+++ b/src/save_menu_util.c
@@ -1,9 +1,9 @@
#include "global.h"
#include "save_menu_util.h"
-#include "asm.h"
#include "event_data.h"
#include "menu.h"
#include "pokedex.h"
+#include "region_map.h"
#include "string_util.h"
#include "strings2.h"
diff --git a/src/scrcmd.c b/src/scrcmd.c
index f2b5090af..a394f2a55 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -1,43 +1,52 @@
#include "global.h"
-#include "asm.h"
-#include "asm_fieldmap.h"
#include "battle_setup.h"
#include "berry.h"
#include "clock.h"
#include "coins.h"
+#include "contest_link_80C2020.h"
#include "contest_painting.h"
#include "data2.h"
#include "decoration.h"
+#include "decoration_inventory.h"
#include "event_data.h"
#include "field_door.h"
#include "field_effect.h"
+#include "field_fadetransition.h"
+#include "field_map_obj.h"
#include "field_map_obj_helpers.h"
#include "field_message_box.h"
#include "field_player_avatar.h"
+#include "field_screen_effect.h"
+#include "field_specials.h"
+#include "field_tasks.h"
#include "field_weather.h"
+#include "fieldmap.h"
#include "item.h"
#include "main.h"
#include "map_obj_lock.h"
#include "menu.h"
#include "money.h"
+#include "mystery_event_script.h"
#include "palette.h"
+#include "party_menu.h"
#include "pokemon.h"
#include "rng.h"
#include "rom4.h"
#include "rtc.h"
#include "script.h"
#include "script_menu.h"
+#include "script_movement.h"
#include "script_pokemon_80C4.h"
#include "script_pokemon_80F9.h"
+#include "shop.h"
+#include "slot_machine.h"
#include "sound.h"
#include "string_util.h"
+#include "tv.h"
typedef u16 (*SpecialFunc)(void);
typedef void (*NativeFunc)(void);
-extern struct Pokemon gPlayerParty[6]; // 0x3004360
-extern struct Pokemon gEnemyParty[6]; // 0x30045C0
-
extern u32 gUnknown_0202E8AC;
extern u32 gUnknown_0202E8B0;
extern u16 gUnknown_0202E8B4;
@@ -60,8 +69,6 @@ extern SpecialFunc gSpecials[];
extern u8 *gStdScripts[];
extern u8 *gStdScripts_End[];
-extern u8 * const gUnknown_083CE048[];
-
// This is defined in here so the optimizer can't see its value when compiling
// script.c.
void * const gNullScriptPtr = NULL;
@@ -1409,7 +1416,7 @@ bool8 ScrCmd_bufferstd(struct ScriptContext *ctx)
{
u8 stringVarIndex = ScriptReadByte(ctx);
u16 index = VarGet(ScriptReadHalfword(ctx));
- StringCopy(sScriptStringVars[stringVarIndex], gUnknown_083CE048[index]);
+ StringCopy(sScriptStringVars[stringVarIndex], gUnknown_083CE048[index].text);
return FALSE;
}
diff --git a/src/script.c b/src/script.c
index 7a9c8e102..488a67de1 100644
--- a/src/script.c
+++ b/src/script.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "script.h"
-#include "asm_fieldmap.h"
#include "event_data.h"
#define RAM_SCRIPT_MAGIC 51
diff --git a/src/script_menu.c b/src/script_menu.c
index d6e328eb4..e1ad3f467 100644
--- a/src/script_menu.c
+++ b/src/script_menu.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "script_menu.h"
#include "event_data.h"
+#include "field_effect.h"
#include "menu.h"
#include "palette.h"
#include "script.h"
@@ -573,10 +574,6 @@ extern u8 gPCText_WhichPCShouldBeAccessed[];
extern u16 gScriptResult;
-// field_effect
-extern void FreeResourcesAndDestroySprite(struct Sprite *sprite);
-extern u8 CreateMonSprite_PicBox(u16, s16, s16, u8);
-
bool8 sub_80B5054(u8 left, u8 top, u8 var3, u8 var4)
{
if (FuncIsActiveTask(sub_80B52B4) == 1)
@@ -866,6 +863,7 @@ bool8 TryCreatePCMenu(void)
}
}
+#if ENGLISH
void CreatePCMenu(void)
{
u16 playersPCWidth = GetStringWidthInTilesForScriptMenu(gPCText_PlayersPC);
@@ -900,6 +898,170 @@ void CreatePCMenu(void)
InitMenu(0, 1, 1, numChoices, 0, width + 1);
sub_80B5230(0, 0, width + 2, 2 * numChoices + 1, 0, numChoices);
}
+#elif GERMAN
+__attribute__((naked))
+void CreatePCMenu(void) {
+ asm(".syntax unified\n\
+ push {r4-r7,lr}\n\
+ sub sp, 0x18\n\
+ ldr r0, _080B5748 @ =0x0000084b\n\
+ bl FlagGet\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080B5750\n\
+ ldr r0, _080B574C @ =gPCText_LanettesPC\n\
+ b _080B5752\n\
+ .align 2, 0\n\
+_080B5748: .4byte 0x0000084b\n\
+_080B574C: .4byte gPCText_LanettesPC\n\
+_080B5750:\n\
+ ldr r0, _080B57E8 @ =gPCText_SomeonesPC\n\
+_080B5752:\n\
+ bl GetStringWidthInTilesForScriptMenu\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ str r0, [sp, 0x8]\n\
+ movs r4, 0x1\n\
+ ldr r0, _080B57EC @ =gPCText_PlayersPC\n\
+ bl GetStringWidthInTilesForScriptMenu\n\
+ lsls r1, r4, 2\n\
+ add r1, sp\n\
+ adds r1, 0x8\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ str r0, [r1]\n\
+ ldr r0, _080B57F0 @ =gPCText_LogOff\n\
+ bl GetStringWidthInTilesForScriptMenu\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ str r0, [sp, 0x10]\n\
+ movs r4, 0x3\n\
+ ldr r0, _080B57F4 @ =0x00000804\n\
+ bl FlagGet\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080B5798\n\
+ ldr r0, _080B57F8 @ =gPCText_HallOfFame\n\
+ bl GetStringWidthInTilesForScriptMenu\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ str r0, [sp, 0x14]\n\
+ movs r4, 0x4\n\
+_080B5798:\n\
+ movs r5, 0\n\
+ cmp r5, r4\n\
+ bge _080B57B4\n\
+ add r2, sp, 0x8\n\
+ adds r1, r4, 0\n\
+_080B57A2:\n\
+ ldr r0, [r2]\n\
+ cmp r5, r0\n\
+ bge _080B57AC\n\
+ lsls r0, 24\n\
+ lsrs r5, r0, 24\n\
+_080B57AC:\n\
+ adds r2, 0x4\n\
+ subs r1, 0x1\n\
+ cmp r1, 0\n\
+ bne _080B57A2\n\
+_080B57B4:\n\
+ ldr r0, _080B57F4 @ =0x00000804\n\
+ bl FlagGet\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080B57FC\n\
+ movs r7, 0x4\n\
+ adds r4, r5, 0x2\n\
+ lsls r2, r4, 24\n\
+ lsrs r2, 24\n\
+ movs r0, 0\n\
+ movs r1, 0\n\
+ movs r3, 0x9\n\
+ bl MenuDrawTextWindow\n\
+ ldr r0, _080B57F8 @ =gPCText_HallOfFame\n\
+ movs r1, 0x1\n\
+ movs r2, 0x5\n\
+ bl MenuPrint\n\
+ ldr r0, _080B57F0 @ =gPCText_LogOff\n\
+ movs r1, 0x1\n\
+ movs r2, 0x7\n\
+ bl MenuPrint\n\
+ b _080B5818\n\
+ .align 2, 0\n\
+_080B57E8: .4byte gPCText_SomeonesPC\n\
+_080B57EC: .4byte gPCText_PlayersPC\n\
+_080B57F0: .4byte gPCText_LogOff\n\
+_080B57F4: .4byte 0x00000804\n\
+_080B57F8: .4byte gPCText_HallOfFame\n\
+_080B57FC:\n\
+ movs r7, 0x3\n\
+ adds r4, r5, 0x2\n\
+ lsls r2, r4, 24\n\
+ lsrs r2, 24\n\
+ movs r0, 0\n\
+ movs r1, 0\n\
+ movs r3, 0x7\n\
+ bl MenuDrawTextWindow\n\
+ ldr r0, _080B5834 @ =gPCText_LogOff\n\
+ movs r1, 0x1\n\
+ movs r2, 0x5\n\
+ bl MenuPrint\n\
+_080B5818:\n\
+ adds r6, r4, 0\n\
+ ldr r0, _080B5838 @ =0x0000084b\n\
+ bl FlagGet\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080B5840\n\
+ ldr r0, _080B583C @ =gPCText_LanettesPC\n\
+ movs r1, 0x1\n\
+ movs r2, 0x1\n\
+ bl MenuPrint\n\
+ b _080B584A\n\
+ .align 2, 0\n\
+_080B5834: .4byte gPCText_LogOff\n\
+_080B5838: .4byte 0x0000084b\n\
+_080B583C: .4byte gPCText_LanettesPC\n\
+_080B5840:\n\
+ ldr r0, _080B5888 @ =gPCText_SomeonesPC\n\
+ movs r1, 0x1\n\
+ movs r2, 0x1\n\
+ bl MenuPrint\n\
+_080B584A:\n\
+ ldr r0, _080B588C @ =gPCText_PlayersPC\n\
+ movs r1, 0x1\n\
+ movs r2, 0x3\n\
+ bl MenuPrint\n\
+ movs r4, 0\n\
+ str r4, [sp]\n\
+ adds r0, r5, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ str r0, [sp, 0x4]\n\
+ movs r0, 0\n\
+ movs r1, 0x1\n\
+ movs r2, 0x1\n\
+ adds r3, r7, 0\n\
+ bl InitMenu\n\
+ lsls r2, r6, 24\n\
+ lsrs r2, 24\n\
+ lsls r3, r7, 1\n\
+ adds r3, 0x1\n\
+ str r4, [sp]\n\
+ str r7, [sp, 0x4]\n\
+ movs r0, 0\n\
+ movs r1, 0\n\
+ bl sub_80B5230\n\
+ add sp, 0x18\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
+_080B5888: .4byte gPCText_SomeonesPC\n\
+_080B588C: .4byte gPCText_PlayersPC\n\
+ .syntax divided\n");
+}
+#endif
void sub_80B5838(void)
{
diff --git a/src/script_movement.c b/src/script_movement.c
index 2dc816532..31143ed6f 100644
--- a/src/script_movement.c
+++ b/src/script_movement.c
@@ -1,14 +1,12 @@
#include "global.h"
-#include "asm.h"
+#include "script_movement.h"
+#include "field_map_obj.h"
#include "field_map_obj_helpers.h"
#include "task.h"
+#include "util.h"
-extern const u32 gBitTable[];
extern u8 *gUnknown_020384F8[];
-extern void UnfreezeMapObject(struct MapObject *);
-extern bool8 FieldObjectIsSpecialAnimActive(struct MapObject *);
-
static void sub_80A2198(u8);
static u8 sub_80A21E0(void);
static bool8 sub_80A21F4(u8, u8, u8 *);
diff --git a/src/script_pokemon_util_80C4BF0.c b/src/script_pokemon_util_80C4BF0.c
index abc4dbc9e..cbca07011 100644
--- a/src/script_pokemon_util_80C4BF0.c
+++ b/src/script_pokemon_util_80C4BF0.c
@@ -1,9 +1,13 @@
#include "global.h"
-#include "asm.h"
#include "battle.h"
#include "berry.h"
+#include "choose_party.h"
#include "contest.h"
+#include "contest_link_80C2020.h"
+#include "contest_painting.h"
#include "data2.h"
+#include "daycare.h"
+#include "debug.h"
#include "decompress.h"
#include "event_data.h"
#include "items.h"
@@ -22,19 +26,7 @@
#define CONTEST_ENTRY_PIC_LEFT 10
#define CONTEST_ENTRY_PIC_TOP 3
-extern void sub_80C46EC(void);
-extern void sub_80C4740(void);
-extern void sub_80C48F4(void);
-extern void sub_80B2A7C(u8);
-extern void sub_80AAF30(void); // matsuda debug?
-extern u8 sub_80B2C4C(u8, u8);
-extern void CB2_ContestPainting(void);
-extern void sub_8042044(struct Pokemon *mon, u16, u8);
-extern void sub_8121E10(void);
-extern void sub_8121E34(void);
-
extern struct SpriteTemplate gUnknown_02024E8C;
-extern struct SpritePalette *sub_80409C8(u16, u32, u32);
extern u8 gContestPlayerMonIndex;
extern u8 gIsLinkContest;
@@ -415,7 +407,7 @@ u8 sub_80C5044(void)
void ShowContestEntryMonPic(void)
{
- struct SpritePalette *paletteData;
+ const struct CompressedSpritePalette *palette;
u32 var1, var2;
u16 species;
u8 spriteId;
@@ -433,13 +425,18 @@ void ShowContestEntryMonPic(void)
taskId = CreateTask(sub_80C5190, 0x50);
gTasks[taskId].data[0] = 0;
gTasks[taskId].data[1] = species;
- HandleLoadSpecialPokePic((struct SpriteSheet *)&gMonFrontPicTable[species].data,
- gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset,
- (u32)gUnknown_081FAF4C[0], gUnknown_081FAF4C[1], species, var1);
- paletteData = sub_80409C8(species, var2, var1);
- LoadCompressedObjectPalette(paletteData);
+ HandleLoadSpecialPokePic(
+ &gMonFrontPicTable[species],
+ gMonFrontPicCoords[species].coords,
+ gMonFrontPicCoords[species].y_offset,
+ (u32)gUnknown_081FAF4C[0],
+ gUnknown_081FAF4C[1],
+ species,
+ var1);
+ palette = sub_80409C8(species, var2, var1);
+ LoadCompressedObjectPalette(palette);
GetMonSpriteTemplate_803C56C(species, 1);
- gUnknown_02024E8C.paletteTag = paletteData->tag;
+ gUnknown_02024E8C.paletteTag = palette->tag;
spriteId = CreateSprite(&gUnknown_02024E8C, 0x78, 0x40, 0);
gTasks[taskId].data[2] = spriteId;
gTasks[taskId].data[3] = left;
diff --git a/src/script_pokemon_util_80F99CC.c b/src/script_pokemon_util_80F99CC.c
index ee140187f..2b48cc0d8 100644
--- a/src/script_pokemon_util_80F99CC.c
+++ b/src/script_pokemon_util_80F99CC.c
@@ -1,9 +1,14 @@
#include "global.h"
-#include "asm.h"
#include "battle_party_menu.h"
+#include "choose_party.h"
+#include "contest.h"
#include "data2.h"
+#include "party_menu.h"
+#include "field_fadetransition.h"
#include "palette.h"
+#include "party_menu.h"
#include "pokemon.h"
+#include "pokemon_summary_screen.h"
#include "rom4.h"
#include "script.h"
#include "script_pokemon_80F9.h"
@@ -12,6 +17,8 @@
#include "task.h"
#include "text.h"
+
+
extern u8 gPlayerPartyCount;
extern u16 gSpecialVar_0x8004;
extern u16 gSpecialVar_0x8005;
@@ -20,22 +27,6 @@ extern u16 gScriptResult;
extern void (*gFieldCallback)(void);
-extern void OpenPartyMenu(u8, u8);
-extern void TryCreatePartyMenuMonIcon(u8, u8, struct Pokemon *);
-extern void LoadHeldItemIconGraphics(void);
-extern void CreateHeldItemIcons_806DC34(); // undefined args
-extern u8 sub_806BD58(u8, u8);
-extern void PartyMenuPrintMonsLevelOrStatus(void);
-extern void PrintPartyMenuMonNicknames(void);
-extern u8 sub_806B58C(u8);
-extern u8 sub_80AE47C(struct Pokemon *party);
-extern void sub_806BC3C(u8, u8);
-extern u16 sub_806BD80(); // undefined args in battle_party_menu.c
-extern u8 sub_806CA38();
-extern void sub_8123138(u8);
-extern u8 sub_8040574(struct Pokemon *party);
-extern void sub_809D9F0(struct Pokemon *party, u8, u8, void *, u32);
-
void sub_80F99CC(void)
{
u8 taskId;
@@ -71,7 +62,7 @@ void sub_80F9A8C(u8 taskId)
if(!gPaletteFade.active)
{
gPaletteFade.bufferTransferDisabled = 1;
- OpenPartyMenu(gTasks[taskId].data[0], 0);
+ OpenPartyMenu((u8) gTasks[taskId].data[0], 0);
DestroyTask(taskId);
}
}
diff --git a/src/secret_base.c b/src/secret_base.c
index adcd47d66..d88d2c66a 100644
--- a/src/secret_base.c
+++ b/src/secret_base.c
@@ -1,22 +1,26 @@
#include "global.h"
-#include "string_util.h"
-#include "strings.h"
-#include "text.h"
+#include "secret_base.h"
+#include "decoration.h"
#include "event_data.h"
-#include "vars.h"
-#include "rom4.h"
-#include "asm.h"
-#include "script.h"
-#include "field_player_avatar.h"
#include "field_camera.h"
-#include "map_constants.h"
-#include "task.h"
-#include "palette.h"
+#include "field_fadetransition.h"
+#include "field_player_avatar.h"
#include "field_weather.h"
+#include "fieldmap.h"
+#include "main.h"
+#include "map_constants.h"
+#include "map_name_popup.h"
+#include "menu.h"
#include "metatile_behavior.h"
+#include "palette.h"
#include "pokemon.h"
+#include "rom4.h"
#include "script.h"
-#include "decoration.h"
+#include "string_util.h"
+#include "strings.h"
+#include "task.h"
+#include "text.h"
+#include "vars.h"
extern u8 gUnknown_020387DC;
extern u16 gSpecialVar_0x8004;
@@ -30,8 +34,8 @@ extern const struct
u16 unk_083D1358_1;
} gUnknown_083D1358[7];
extern const u8 gUnknown_083D1374[4 * 16];
+extern void *gUnknown_0300485C;
extern const u8 gUnknown_083D13EC[12];
-extern const u8 sub_80BCCA4(u8);
extern u8 gUnknown_081A2E14[];
@@ -823,8 +827,6 @@ u8 sub_80BC14C(u8 sbid)
return 0;
}
-
-
u8 *sub_80BC190(u8 *dest, u8 arg1) { // 80bc190
u8 local1;
u8 *str;
@@ -834,7 +836,11 @@ u8 *sub_80BC190(u8 *dest, u8 arg1) { // 80bc190
str = StringCopyN(dest, gSaveBlock1.secretBases[arg1].sbr_field_2, local1);
str[0] = EOS;
+#if ENGLISH
return StringAppend(dest, gOtherText_PlayersBase);
+#elif GERMAN
+ return de_sub_8073174(dest, gOtherText_PlayersBase);
+#endif
}
u8 *GetSecretBaseMapName(u8 *dest) {
diff --git a/src/shop.c b/src/shop.c
index cd39b075a..d53646a88 100644
--- a/src/shop.c
+++ b/src/shop.c
@@ -1,9 +1,12 @@
#include "global.h"
-#include "asm.h"
+#include "shop.h"
#include "decompress.h"
+#include "field_fadetransition.h"
#include "field_weather.h"
+#include "item_menu.h"
#include "main.h"
#include "menu.h"
+#include "menu_helpers.h"
#include "money.h"
#include "palette.h"
#include "script.h"
@@ -11,6 +14,8 @@
#include "sprite.h"
#include "strings.h"
#include "task.h"
+#include "tv.h"
+#include "unknown_task.h"
struct UnknownShopStruct
{
@@ -35,26 +40,6 @@ extern u16 gBuyMenuFrame_Tilemap[];
extern u16 gMenuMoneyPal[16];
extern u16 gUnknown_083CC710[2];
-extern void sub_80A6300(void);
-extern void sub_80BE3BC(void);
-extern void DisplayItemMessageOnField(u8, const u8*, TaskFunc, u16);
-extern u8 sub_807D770(void);
-extern void pal_fill_black(void);
-extern void sub_80B3764(int, int);
-extern void sub_80B37EC(void);
-extern void sub_80B40E8(u8);
-extern void BuyMenuDrawMapGraphics(void);
-extern void sub_80F944C(void);
-extern void CreateVerticalScrollIndicators(u32, u32, u32); // unknown args
-extern void sub_80F979C(u32, u32); // unknown args
-
-void sub_80B2E38(u8);
-void HandleShopMenuQuit(u8);
-void sub_80B2FA0(u8);
-void BuyMenuDrawGraphics(void);
-void sub_80B3240(void);
-void sub_80B3270(void);
-
u8 CreateShopMenu(bool8 var)
{
ScriptContext2_Enable();
diff --git a/src/slot_machine.c b/src/slot_machine.c
index c087bf6b4..c9a06a758 100644
--- a/src/slot_machine.c
+++ b/src/slot_machine.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "slot_machine.h"
#include "decompress.h"
#include "palette.h"
#include "task.h"
@@ -31,11 +32,6 @@ extern const u16 gUnknown_08E95A18[];
extern u16 gUnknown_08E95AB8[];
extern u16 gUnknown_08E95FB8[];
-
-void sub_8104DA4(void);
-
-u8 sub_8105BB4(u8, u8, s16);
-
static void LoadSlotMachineWheelOverlay(void);
void sub_8104CAC(u8 arg0) {
diff --git a/src/smokescreen.c b/src/smokescreen.c
index 0406c1cb3..8345cb6ad 100644
--- a/src/smokescreen.c
+++ b/src/smokescreen.c
@@ -2,8 +2,8 @@
#include "data2.h"
#include "decompress.h"
#include "sprite.h"
+#include "util.h"
-extern u8 CreateInvisibleSpriteWithCallback(void (*)(struct Sprite *));
static void sub_8046388(struct Sprite *);
diff --git a/src/sound.c b/src/sound.c
index ed69ca01d..c9c4916b0 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1,9 +1,9 @@
#include "global.h"
#include "gba/m4a_internal.h"
#include "sound.h"
-#include "asm.h"
#include "battle.h"
#include "m4a.h"
+#include "main.h"
#include "songs.h"
#include "task.h"
@@ -13,7 +13,7 @@ struct Fanfare
u16 duration;
};
-// Hack: different prototype than definition
+// FIXME: different prototype than definition
u32 SpeciesToCryId(u32);
extern u16 gBattleTypeFlags;
diff --git a/src/sprite.c b/src/sprite.c
index 409c66cfa..fb8c2b648 100644
--- a/src/sprite.c
+++ b/src/sprite.c
@@ -57,7 +57,6 @@ static void ClearSpriteCopyRequests(void);
static void ResetOamMatrices(void);
static void ResetSprite(struct Sprite *sprite);
static s16 AllocSpriteTiles(u16 tileCount);
-u8 SpriteTileAllocBitmapOp(u16 bit, u8 op);
static void RequestSpriteFrameImageCopy(u16 index, u16 tileNum, const struct SpriteFrameImage *images);
static void ResetAllSprites(void);
static void BeginAnim(struct Sprite *sprite);
diff --git a/src/start_menu.c b/src/start_menu.c
index 80080cd43..e05f3a999 100644
--- a/src/start_menu.c
+++ b/src/start_menu.c
@@ -1,10 +1,11 @@
#include "global.h"
#include "start_menu.h"
-#include "asm.h"
#include "event_data.h"
#include "field_map_obj_helpers.h"
#include "field_player_avatar.h"
#include "field_weather.h"
+#include "fieldmap.h"
+#include "item_menu.h"
#include "load_save.h"
#include "main.h"
#include "map_obj_lock.h"
@@ -12,6 +13,8 @@
#include "option_menu.h"
#include "palette.h"
#include "pokedex.h"
+#include "pokemon_menu.h"
+#include "pokenav.h"
#include "rom4.h"
#include "safari_zone.h"
#include "save.h"
@@ -25,6 +28,7 @@
#include "strings2.h"
#include "task.h"
#include "trainer_card.h"
+#include "unknown_task.h"
//Menu actions
enum {
@@ -49,7 +53,6 @@ extern u16 gSaveFileStatus;
extern u16 gScriptResult;
extern u8 (*gCallback_03004AE8)(void);
extern u8 gUnknown_03004860;
-extern u8 gNumSafariBalls;
EWRAM_DATA static u8 sStartMenuCursorPos = 0;
EWRAM_DATA static u8 sNumStartMenuActions = 0;
diff --git a/src/starter_choose.c b/src/starter_choose.c
index 0ed8315fc..2b28df4f0 100644
--- a/src/starter_choose.c
+++ b/src/starter_choose.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "starter_choose.h"
-#include "asm.h"
#include "data2.h"
#include "decompress.h"
#include "main.h"
@@ -15,6 +14,7 @@
#include "strings.h"
#include "task.h"
#include "trig.h"
+#include "unknown_task.h"
extern u16 gScriptResult;
extern struct SpriteTemplate gUnknown_02024E8C;
@@ -23,7 +23,7 @@ extern struct SpriteTemplate gUnknown_02024E8C;
// Graphics Data
//--------------------------------------------------
-const u16 gBirchBagGrassPal[][16] =
+const u16 gBirchBagGrassPal[2][16] =
{
INCBIN_U16("graphics/misc/birch_bag.gbapal"),
INCBIN_U16("graphics/misc/birch_grass.gbapal"),
@@ -172,12 +172,12 @@ static const union AffineAnimCmd *const gSpriteAffineAnimTable_83F7790[] =
{
gSpriteAffineAnim_83F7774,
};
-static const struct SpriteSheet gUnknown_083F7794[] =
+static const struct CompressedSpriteSheet gUnknown_083F7794[] =
{
{gBirchBallarrow_Gfx, 0x0800, 0x1000},
{NULL},
};
-static const struct SpriteSheet gUnknown_083F77A4[] =
+static const struct CompressedSpriteSheet gUnknown_083F77A4[] =
{
{gBirchCircle_Gfx, 0x0800, 0x1001},
{NULL},
@@ -465,7 +465,7 @@ static void Task_StarterChoose6(u8 taskId)
gTasks[taskId].func = Task_StarterChoose1;
}
-static void AddTextColorCtrlCode(u8 *string, u8 bgColor, u8 textColor, u8 shadowColor)
+void AddTextColorCtrlCode(u8 *string, u8 bgColor, u8 textColor, u8 shadowColor)
{
*(string++) = EXT_CTRL_CODE_BEGIN;
*(string++) = 4;
@@ -480,6 +480,8 @@ static void AddTextColorCtrlCode(u8 *string, u8 bgColor, u8 textColor, u8 shadow
*p = c; \
}
+
+#if ENGLISH
static void CreateStarterPokemonLabel(u8 prevSelection, u8 selection)
{
u8 labelText[72];
@@ -545,6 +547,161 @@ static void CreateStarterPokemonLabel(u8 prevSelection, u8 selection)
REG_WIN0H = WIN_RANGE(labelLeft, labelRight);
REG_WIN0V = WIN_RANGE(labelTop, labelBottom);
}
+#elif GERMAN
+__attribute__((naked))
+static void CreateStarterPokemonLabel(u8 prevSelection, u8 selection)
+{
+ asm(".syntax unified\n\
+ push {r4-r7,lr}\n\
+ sub sp, 0x48\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ lsls r1, 24\n\
+ lsrs r5, r1, 24\n\
+ cmp r0, 0xFF\n\
+ beq _0810A872\n\
+ ldr r1, _0810A960 @ =gStarterChoose_LabelCoords\n\
+ lsls r2, r0, 1\n\
+ adds r0, r2, r1\n\
+ ldrb r0, [r0]\n\
+ adds r1, 0x1\n\
+ adds r2, r1\n\
+ ldrb r1, [r2]\n\
+ adds r2, r0, 0\n\
+ adds r2, 0xD\n\
+ lsls r2, 24\n\
+ lsrs r2, 24\n\
+ adds r3, r1, 0x3\n\
+ lsls r3, 24\n\
+ lsrs r3, 24\n\
+ bl MenuZeroFillWindowRect\n\
+ ldr r0, _0810A964 @ =0x04000040\n\
+ movs r1, 0\n\
+ strh r1, [r0]\n\
+ adds r0, 0x4\n\
+ strh r1, [r0]\n\
+_0810A872:\n\
+ adds r0, r5, 0\n\
+ bl GetStarterPokemon\n\
+ lsls r0, 16\n\
+ lsrs r6, r0, 16\n\
+ adds r0, r6, 0\n\
+ bl SpeciesToNationalPokedexNum\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ bl GetPokemonCategory\n\
+ adds r4, r0, 0\n\
+ mov r0, sp\n\
+ movs r1, 0\n\
+ movs r2, 0xF\n\
+ movs r3, 0x8\n\
+ bl AddTextColorCtrlCode\n\
+ movs r2, 0x8\n\
+ movs r3, 0\n\
+ ldrb r0, [r4]\n\
+ lsls r5, 1\n\
+ mov r7, sp\n\
+ adds r7, 0x5\n\
+ cmp r0, 0xFF\n\
+ beq _0810A8CA\n\
+_0810A8A8:\n\
+ mov r0, sp\n\
+ adds r1, r0, r2\n\
+ adds r0, r4, r3\n\
+ ldrb r0, [r0]\n\
+ strb r0, [r1]\n\
+ adds r0, r3, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r3, r0, 24\n\
+ adds r0, r2, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r2, r0, 24\n\
+ adds r0, r4, r3\n\
+ ldrb r0, [r0]\n\
+ cmp r0, 0xFF\n\
+ beq _0810A8CA\n\
+ cmp r3, 0xA\n\
+ bls _0810A8A8\n\
+_0810A8CA:\n\
+ mov r0, sp\n\
+ adds r1, r0, r2\n\
+ movs r0, 0xFF\n\
+ strb r0, [r1]\n\
+ mov r1, sp\n\
+ movs r0, 0xFC\n\
+ strb r0, [r1, 0x5]\n\
+ movs r0, 0x11\n\
+ strb r0, [r1, 0x6]\n\
+ mov r2, sp\n\
+ lsls r1, r3, 1\n\
+ adds r1, r3\n\
+ lsls r1, 1\n\
+ movs r0, 0x70\n\
+ subs r0, r1\n\
+ asrs r0, 1\n\
+ strb r0, [r2, 0x7]\n\
+ ldr r0, _0810A960 @ =gStarterChoose_LabelCoords\n\
+ adds r1, r5, r0\n\
+ ldrb r4, [r1]\n\
+ adds r0, 0x1\n\
+ adds r0, r5, r0\n\
+ ldrb r5, [r0]\n\
+ mov r0, sp\n\
+ adds r1, r4, 0\n\
+ adds r2, r5, 0\n\
+ bl MenuPrint\n\
+ mov r0, sp\n\
+ movs r1, 0\n\
+ movs r2, 0xF\n\
+ movs r3, 0x8\n\
+ bl AddTextColorCtrlCode\n\
+ movs r0, 0xB\n\
+ adds r1, r6, 0\n\
+ muls r1, r0\n\
+ ldr r0, _0810A968 @ =gSpeciesNames\n\
+ adds r1, r0\n\
+ adds r0, r7, 0\n\
+ movs r2, 0x70\n\
+ movs r3, 0x2\n\
+ bl sub_8072C74\n\
+ adds r2, r5, 0x2\n\
+ lsls r2, 24\n\
+ lsrs r2, 24\n\
+ mov r0, sp\n\
+ adds r1, r4, 0\n\
+ bl MenuPrint\n\
+ lsls r0, r4, 3\n\
+ adds r0, 0x4\n\
+ lsls r0, 24\n\
+ adds r4, 0xD\n\
+ lsls r4, 3\n\
+ adds r4, 0x4\n\
+ lsls r4, 24\n\
+ lsrs r4, 24\n\
+ lsls r1, r5, 27\n\
+ adds r5, 0x4\n\
+ lsls r5, 27\n\
+ lsrs r5, 24\n\
+ ldr r2, _0810A964 @ =0x04000040\n\
+ lsrs r0, 16\n\
+ orrs r0, r4\n\
+ strh r0, [r2]\n\
+ ldr r0, _0810A96C @ =0x04000044\n\
+ lsrs r1, 16\n\
+ orrs r1, r5\n\
+ strh r1, [r0]\n\
+ add sp, 0x48\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
+_0810A960: .4byte gStarterChoose_LabelCoords\n\
+_0810A964: .4byte 0x04000040\n\
+_0810A968: .4byte gSpeciesNames\n\
+_0810A96C: .4byte 0x04000044\n\
+ .syntax divided\n");
+}
+#endif
static void nullsub_72(struct Sprite *sprite)
{
diff --git a/src/strings.c b/src/strings.c
index fa083f00d..cc0641dce 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "strings.h"
#if ENGLISH
// placeholder strings
@@ -923,7 +924,6 @@ const u8 gSystemText_NoSaveFileNoTime[] = _("There is no save file, so the time\
const u8 gSystemText_ClockAdjustmentUsable[] = _("The in-game clock adjustment system\nis now useable.");
const u8 gSystemText_Saving[] = _("SAVING...\nDON’T TURN OFF THE POWER.");
#elif GERMAN
-#include "global.h"
// placeholder strings
const u8 gExpandedPlaceholder_Empty[] = _("");
diff --git a/src/text.c b/src/text.c
index 02cafea48..b27084b86 100644
--- a/src/text.c
+++ b/src/text.c
@@ -218,12 +218,14 @@ static const u8 sFont1JapaneseGlyphs[] = INCBIN_U8("graphics/fonts/font1_jpn.1bp
static const u8 sBrailleGlyphs[] = INCBIN_U8("graphics/fonts/font6_braille.1bpp");
static const u32 sDownArrowTiles[] = INCBIN_U32("graphics/fonts/down_arrow.4bpp");
-#include "fonts/type1_map.h"
-#include "fonts/type3_map.h"
-#include "fonts/font1_widths.h"
-#include "fonts/font4_widths.h"
-#include "fonts/font0_widths.h"
-#include "fonts/font3_widths.h"
+// clang-format off
+#include "data/text/type1_map.h"
+#include "data/text/type3_map.h"
+#include "data/text/font1_widths.h"
+#include "data/text/font4_widths.h"
+#include "data/text/font0_widths.h"
+#include "data/text/font3_widths.h"
+// clang-format on
const u16 gUnknownPalette_81E6692[] = INCBIN_U16("graphics/fonts/unknown_81E6692.gbapal");
const u16 gFontDefaultPalette[] = INCBIN_U16("graphics/fonts/default.gbapal");
diff --git a/src/time_events.c b/src/time_events.c
index 8cbf52a1a..e1b9a2e9e 100644
--- a/src/time_events.c
+++ b/src/time_events.c
@@ -1,5 +1,7 @@
#include "global.h"
+#include "time_events.h"
#include "event_data.h"
+#include "field_weather.h"
#include "pokemon.h"
#include "rng.h"
#include "rom4.h"
@@ -7,16 +9,14 @@
#include "script.h"
#include "task.h"
-extern bool8 sub_807DDFC(void);
-
-u32 GetMirageRnd(void)
+static u32 GetMirageRnd(void)
{
u32 hi = VarGet(VAR_MIRAGE_RND_H);
u32 lo = VarGet(VAR_MIRAGE_RND_L);
return (hi << 16) | lo;
}
-void SetMirageRnd(u32 rnd)
+static void SetMirageRnd(u32 rnd)
{
VarSet(VAR_MIRAGE_RND_H, rnd >> 16);
VarSet(VAR_MIRAGE_RND_L, rnd);
diff --git a/src/title_screen.c b/src/title_screen.c
index 241e5489e..664e07978 100644
--- a/src/title_screen.c
+++ b/src/title_screen.c
@@ -1,7 +1,6 @@
#include "global.h"
#include "gba/m4a_internal.h"
#include "title_screen.h"
-#include "asm.h"
#include "clear_save_data_menu.h"
#include "decompress.h"
#include "event_data.h"
@@ -10,9 +9,31 @@
#include "main.h"
#include "main_menu.h"
#include "palette.h"
+#include "reset_rtc_screen.h"
#include "sound.h"
#include "sprite.h"
#include "task.h"
+#include "unknown_task.h"
+
+#if ENGLISH
+#define VERSION_BANNER_SHAPE 1
+#define VERSION_BANNER_RIGHT_TILEOFFSET 64
+#define VERSION_BANNER_BYTES 0x1000
+#define VERSION_BANNER_LEFT_X 98
+#define VERSION_BANNER_RIGHT_X 162
+#define VERSION_BANNER_Y 26
+#define VERSION_BANNER_Y_GOAL 66
+#define START_BANNER_X DISPLAY_WIDTH / 2
+#elif GERMAN
+#define VERSION_BANNER_SHAPE 0
+#define VERSION_BANNER_RIGHT_TILEOFFSET 128
+#define VERSION_BANNER_BYTES 0x2000
+#define VERSION_BANNER_LEFT_X 108
+#define VERSION_BANNER_RIGHT_X 172
+#define VERSION_BANNER_Y 44
+#define VERSION_BANNER_Y_GOAL 84
+#define START_BANNER_X DISPLAY_WIDTH / 2 - 2
+#endif
extern u8 gReservedSpritePaletteCount;
extern struct MusicPlayerInfo gMPlay_BGM;
@@ -88,7 +109,7 @@ static const struct OamData sVersionBannerLeftOamData =
.objMode = 0,
.mosaic = 0,
.bpp = 1,
- .shape = 1,
+ .shape = VERSION_BANNER_SHAPE,
.x = 0,
.matrixNum = 0,
.size = 3,
@@ -104,7 +125,7 @@ static const struct OamData sVersionBannerRightOamData =
.objMode = 0,
.mosaic = 0,
.bpp = 1,
- .shape = 1,
+ .shape = VERSION_BANNER_SHAPE,
.x = 0,
.matrixNum = 0,
.size = 3,
@@ -120,7 +141,7 @@ static const union AnimCmd sVersionBannerLeftAnimSequence[] =
};
static const union AnimCmd sVersionBannerRightAnimSequence[] =
{
- ANIMCMD_FRAME(64, 30),
+ ANIMCMD_FRAME(VERSION_BANNER_RIGHT_TILEOFFSET, 30),
ANIMCMD_END,
};
static const union AnimCmd *const sVersionBannerLeftAnimTable[] =
@@ -151,9 +172,9 @@ static const struct SpriteTemplate sVersionBannerRightSpriteTemplate =
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallback_VersionBannerRight,
};
-static const struct SpriteSheet gUnknown_08393EFC[] =
+static const struct CompressedSpriteSheet gUnknown_08393EFC[] =
{
- {gVersionTiles, 0x1000, 1000},
+ {gVersionTiles, VERSION_BANNER_BYTES, 1000},
{NULL},
};
static const struct OamData gOamData_8393F0C =
@@ -212,6 +233,18 @@ static const union AnimCmd gSpriteAnim_8393F4C[] =
ANIMCMD_FRAME(28, 4),
ANIMCMD_END,
};
+#if GERMAN
+static const union AnimCmd gSpriteAnim_839F73C[] =
+{
+ ANIMCMD_FRAME(32, 4),
+ ANIMCMD_END,
+};
+static const union AnimCmd gSpriteAnim_839F744[] =
+{
+ ANIMCMD_FRAME(36, 4),
+ ANIMCMD_END,
+};
+#endif
static const union AnimCmd *const sStartCopyrightBannerAnimTable[] =
{
gSpriteAnim_8393F14,
@@ -222,6 +255,10 @@ static const union AnimCmd *const sStartCopyrightBannerAnimTable[] =
gSpriteAnim_8393F3C,
gSpriteAnim_8393F44,
gSpriteAnim_8393F4C,
+#if GERMAN
+ gSpriteAnim_839F73C,
+ gSpriteAnim_839F744,
+#endif
};
static const struct SpriteTemplate sStartCopyrightBannerSpriteTemplate =
{
@@ -233,7 +270,7 @@ static const struct SpriteTemplate sStartCopyrightBannerSpriteTemplate =
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallback_PressStartCopyrightBanner,
};
-static const struct SpriteSheet gUnknown_08393F8C[] =
+static const struct CompressedSpriteSheet gUnknown_08393F8C[] =
{
{gTitleScreenPressStart_Gfx, 0x520, 1001},
{NULL},
@@ -278,7 +315,7 @@ static const struct SpriteTemplate sPokemonLogoShineSpriteTemplate =
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallback_PokemonLogoShine,
};
-static const struct SpriteSheet sPokemonLogoShineSpriteSheet[] =
+static const struct CompressedSpriteSheet sPokemonLogoShineSpriteSheet[] =
{
{sLogoShineTiles, 0x800, 1002},
{NULL},
@@ -321,7 +358,7 @@ void SpriteCallback_VersionBannerLeft(struct Sprite *sprite)
if (task->data[1] != 0)
{
sprite->oam.objMode = 0;
- sprite->pos1.y = 66;
+ sprite->pos1.y = VERSION_BANNER_Y_GOAL;
sprite->invisible = FALSE;
}
else
@@ -331,7 +368,7 @@ void SpriteCallback_VersionBannerLeft(struct Sprite *sprite)
if (task->data[5] < 64)
{
sprite->invisible = FALSE;
- if (sprite->pos1.y != 66)
+ if (sprite->pos1.y != VERSION_BANNER_Y_GOAL)
sprite->pos1.y++;
REG_BLDALPHA = gUnknown_08393E64[task->data[5] / 2];
}
@@ -345,7 +382,7 @@ void SpriteCallback_VersionBannerRight(struct Sprite *sprite)
if (task->data[1] != 0)
{
sprite->oam.objMode = 0;
- sprite->pos1.y = 66;
+ sprite->pos1.y = VERSION_BANNER_Y_GOAL;
sprite->invisible = FALSE;
}
else
@@ -353,7 +390,7 @@ void SpriteCallback_VersionBannerRight(struct Sprite *sprite)
if (task->data[5] < 64)
{
sprite->invisible = FALSE;
- if (sprite->pos1.y != 66)
+ if (sprite->pos1.y != VERSION_BANNER_Y_GOAL)
sprite->pos1.y++;
}
}
@@ -374,6 +411,7 @@ void SpriteCallback_PressStartCopyrightBanner(struct Sprite *sprite)
sprite->invisible = FALSE;
}
+#if ENGLISH
static void CreatePressStartBanner(s16 x, s16 y)
{
u8 i;
@@ -387,6 +425,110 @@ static void CreatePressStartBanner(s16 x, s16 y)
gSprites[spriteId].data0 = 1;
}
}
+#elif GERMAN
+__attribute__((naked))
+static void CreatePressStartBanner(s16 x, s16 y)
+{
+ asm(".syntax unified\n\
+ push {r4-r7,lr}\n\
+ mov r7, r10\n\
+ mov r6, r9\n\
+ mov r5, r8\n\
+ push {r5-r7}\n\
+ lsls r0, 16\n\
+ ldr r2, _0807C3AC @ =0xffe00000\n\
+ adds r0, r2\n\
+ lsrs r0, 16\n\
+ movs r6, 0\n\
+ lsls r1, 16\n\
+ mov r10, r1\n\
+ mov r8, r10\n\
+_0807C302:\n\
+ lsls r5, r0, 16\n\
+ asrs r5, 16\n\
+ ldr r0, _0807C3B0 @ =sStartCopyrightBannerSpriteTemplate\n\
+ adds r1, r5, 0\n\
+ mov r3, r8\n\
+ asrs r2, r3, 16\n\
+ movs r3, 0\n\
+ bl CreateSprite\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ lsls r4, r0, 4\n\
+ adds r4, r0\n\
+ lsls r4, 2\n\
+ ldr r0, _0807C3B4 @ =gSprites\n\
+ mov r9, r0\n\
+ add r4, r9\n\
+ adds r0, r4, 0\n\
+ adds r1, r6, 0\n\
+ bl StartSpriteAnim\n\
+ movs r7, 0x1\n\
+ strh r7, [r4, 0x2E]\n\
+ adds r0, r6, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r6, r0, 24\n\
+ adds r5, 0x20\n\
+ lsls r5, 16\n\
+ lsrs r0, r5, 16\n\
+ cmp r6, 0x2\n\
+ bls _0807C302\n\
+ ldr r1, _0807C3B0 @ =sStartCopyrightBannerSpriteTemplate\n\
+ mov r8, r1\n\
+ lsls r5, r0, 16\n\
+ asrs r5, 16\n\
+ mov r2, r10\n\
+ asrs r6, r2, 16\n\
+ mov r0, r8\n\
+ adds r1, r5, 0\n\
+ adds r2, r6, 0\n\
+ movs r3, 0\n\
+ bl CreateSprite\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ lsls r4, r0, 4\n\
+ adds r4, r0\n\
+ lsls r4, 2\n\
+ add r4, r9\n\
+ adds r0, r4, 0\n\
+ movs r1, 0x8\n\
+ bl StartSpriteAnim\n\
+ strh r7, [r4, 0x2E]\n\
+ subs r5, 0x60\n\
+ lsls r5, 16\n\
+ asrs r5, 16\n\
+ subs r6, 0x8\n\
+ lsls r6, 16\n\
+ asrs r6, 16\n\
+ mov r0, r8\n\
+ adds r1, r5, 0\n\
+ adds r2, r6, 0\n\
+ movs r3, 0\n\
+ bl CreateSprite\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ lsls r4, r0, 4\n\
+ adds r4, r0\n\
+ lsls r4, 2\n\
+ add r4, r9\n\
+ adds r0, r4, 0\n\
+ movs r1, 0x9\n\
+ bl StartSpriteAnim\n\
+ strh r7, [r4, 0x2E]\n\
+ pop {r3-r5}\n\
+ mov r8, r3\n\
+ mov r9, r4\n\
+ mov r10, r5\n\
+ pop {r4-r7}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .align 2, 0\n\
+_0807C3AC: .4byte 0xffe00000\n\
+_0807C3B0: .4byte sStartCopyrightBannerSpriteTemplate\n\
+_0807C3B4: .4byte gSprites\n\
+ .syntax divided\n");
+}
+#endif
static void CreateCopyrightBanner(s16 x, s16 y)
{
@@ -607,12 +749,12 @@ static void Task_TitleScreenPhase1(u8 taskId)
REG_BLDY = 0;
//Create left side of version banner
- spriteId = CreateSprite(&sVersionBannerLeftSpriteTemplate, 0x62, 0x1A, 0);
+ spriteId = CreateSprite(&sVersionBannerLeftSpriteTemplate, VERSION_BANNER_LEFT_X, VERSION_BANNER_Y, 0);
gSprites[spriteId].invisible = TRUE;
gSprites[spriteId].data1 = taskId;
//Create right side of version banner
- spriteId = CreateSprite(&sVersionBannerRightSpriteTemplate, 0xA2, 0x1A, 0);
+ spriteId = CreateSprite(&sVersionBannerRightSpriteTemplate, VERSION_BANNER_RIGHT_X, VERSION_BANNER_Y, 0);
gSprites[spriteId].invisible = TRUE;
gSprites[spriteId].data1 = taskId;
@@ -643,7 +785,7 @@ static void Task_TitleScreenPhase2(u8 taskId)
| DISPCNT_BG1_ON
| DISPCNT_BG2_ON
| DISPCNT_OBJ_ON;
- CreatePressStartBanner(DISPLAY_WIDTH / 2, 108);
+ CreatePressStartBanner(START_BANNER_X, 108);
CreateCopyrightBanner(DISPLAY_WIDTH / 2, 148);
gTasks[taskId].data[4] = 0;
gTasks[taskId].func = Task_TitleScreenPhase3;
diff --git a/src/trade.c b/src/trade.c
new file mode 100644
index 000000000..cb190d194
--- /dev/null
+++ b/src/trade.c
@@ -0,0 +1,88 @@
+#include "global.h"
+#include "name_string_util.h"
+#include "string_util.h"
+#include "text.h"
+
+struct InGameTrade {
+ /*0x00*/ u8 name[11];
+ /*0x0C*/ u16 species;
+ /*0x0E*/ u8 ivs[6];
+ /*0x14*/ bool8 secondAbility;
+ /*0x18*/ u32 otId;
+ /*0x1C*/ u8 stats[5];
+ /*0x24*/ u32 personality;
+ /*0x28*/ u16 heldItem;
+ /*0x2A*/ u8 mailNum;
+ /*0x2B*/ u8 otName[11];
+ /*0x36*/ u8 otGender;
+ /*0x37*/ u8 sheen;
+ /*0x38*/ u16 playerSpecies;
+};
+
+struct UnkStructC {
+ /*0x00*/ u16 words[9];
+ /*0x10*/ u8 string[8];
+ /*0x1A*/ u8 otId[4];
+ /*0x1E*/ u16 species;
+ /*0x20*/ u16 heldItem;
+};
+
+struct UnkStructD {
+ /*0x00*/ u8 pad00[0x10];
+ /*0x10*/ u8 var10;
+ /*0x11*/ u8 pad11[1];
+ /*0x12*/ u16 var12[1];
+};
+
+extern const struct InGameTrade gIngameTrades[];
+extern const u16 gIngameTradeMail[][10];
+
+
+void sub_804A96C(struct UnkStructD *arg0, u8 left, u8 top, u16 *tilemap, u8 width, u8 height, u16 sp8) {
+ int y, x;
+
+ for (y = 0; y < height; y++)
+ {
+
+ for (x = 0; x < width; x++)
+ {
+ arg0->var12[(top * 32 + left) + y * 32 + x] = tilemap[width * y + x] | sp8;
+ }
+ }
+
+#if ENGLISH
+ arg0->var10 = 1;
+#endif
+}
+
+#if GERMAN
+void sub_804A96C_alt(struct UnkStructD *arg0, u8 left, u8 top, u16 *tilemap, u8 width, u8 height, u16 sp8) {
+ sub_804A96C(arg0, left, top, tilemap, width, height, sp8);
+
+ arg0->var10 = 1;
+}
+#endif
+
+asm(".section .text.sub_804DAD4");
+
+void sub_804DAD4(struct UnkStructC *arg0, struct InGameTrade *trade) {
+ s32 i;
+
+ for (i = 0; i < 9; i++)
+ {
+ arg0->words[i] = gIngameTradeMail[trade->mailNum][i];
+ }
+
+ StringCopy(arg0->string, trade->otName);
+
+#if GERMAN
+ PadNameString(arg0->string, CHAR_SPACE);
+#endif
+
+ arg0->otId[0] = trade->otId >> 24;
+ arg0->otId[1] = trade->otId >> 16;
+ arg0->otId[2] = trade->otId >> 8;
+ arg0->otId[3] = trade->otId;
+ arg0->species = trade->species;
+ arg0->heldItem = trade->heldItem;
+}
diff --git a/src/trainer_card.c b/src/trainer_card.c
index ef3a2d857..876a3b426 100644
--- a/src/trainer_card.c
+++ b/src/trainer_card.c
@@ -1,7 +1,8 @@
#include "global.h"
#include "trainer_card.h"
-#include "asm.h"
+#include "easy_chat.h"
#include "event_data.h"
+#include "field_effect.h"
#include "link.h"
#include "main.h"
#include "menu.h"
@@ -16,6 +17,8 @@
#include "string_util.h"
#include "strings2.h"
#include "task.h"
+#include "unknown_task.h"
+#include "util.h"
typedef void (*Callback)(void);
@@ -68,9 +71,8 @@ extern u16 gUnknown_08E8D9C0[];
extern bool8 (*const gUnknown_083B5EBC[])(struct Task *);
extern bool8 (*const gUnknown_083B5ED8[])(struct Task *);
-// Other signature than on save_menu_util.h
+// FIXME: Other signature than on save_menu_util.h
void FormatPlayTime(u8 *playtime, u16 hours, u16 minutes, s16 colon);
-
u16 GetPokedexSeenCount(void);
enum
@@ -1665,7 +1667,11 @@ static void TrainerCard_Back_PrintName(void)
StringCopy(str, ewram0.var_64.playerName);
ConvertInternationalString(str, ewram0.language);
+#if ENGLISH
StringAppend(str, gOtherText_TrainersTrainerCard);
+#elif GERMAN
+ de_sub_8073174(str, gOtherText_TrainersTrainerCard);
+#endif
MenuPrint_RightAligned(gStringVar1, 28, 2);
}
diff --git a/src/trainer_see.c b/src/trainer_see.c
index 6c2bf0ab0..9b7a47f6b 100644
--- a/src/trainer_see.c
+++ b/src/trainer_see.c
@@ -1,7 +1,5 @@
#include "global.h"
#include "trainer_see.h"
-#include "asm.h"
-#include "asm_fieldmap.h"
#include "battle_setup.h"
#include "field_effect.h"
#include "field_map_obj.h"
@@ -9,6 +7,7 @@
#include "script.h"
#include "sprite.h"
#include "task.h"
+#include "util.h"
extern bool8 (*gIsTrainerInRange[])(struct MapObject *, u16, s16, s16);
extern bool8 (*gTrainerSeeFuncList[])(u8, struct Task *, struct MapObject *);
diff --git a/src/trig.c b/src/trig.c
index d64231087..e16a69e63 100644
--- a/src/trig.c
+++ b/src/trig.c
@@ -1,7 +1,521 @@
#include "global.h"
#include "trig.h"
-extern s16 gSineDegreeTable[];
+// Converts a number to Q8.8 fixed-point format
+#define Q_8_8(n) ((s16)((n) * 256))
+
+// Converts a number to Q4.12 fixed-point format
+#define Q_4_12(n) ((s16)((n) * 4096))
+
+// Values of sin(x*(π/128)) as Q8.8 fixed-point numbers from x = 0 to x = 319
+const s16 gSineTable[] =
+{
+ Q_8_8(0), // sin(0*(π/128))
+ Q_8_8(0.0234375), // sin(1*(π/128))
+ Q_8_8(0.046875), // sin(2*(π/128))
+ Q_8_8(0.0703125), // sin(3*(π/128))
+ Q_8_8(0.09765625), // sin(4*(π/128))
+ Q_8_8(0.12109375), // sin(5*(π/128))
+ Q_8_8(0.14453125), // sin(6*(π/128))
+ Q_8_8(0.16796875), // sin(7*(π/128))
+ Q_8_8(0.19140625), // sin(8*(π/128))
+ Q_8_8(0.21875), // sin(9*(π/128))
+ Q_8_8(0.2421875), // sin(10*(π/128))
+ Q_8_8(0.265625), // sin(11*(π/128))
+ Q_8_8(0.2890625), // sin(12*(π/128))
+ Q_8_8(0.3125), // sin(13*(π/128))
+ Q_8_8(0.3359375), // sin(14*(π/128))
+ Q_8_8(0.359375), // sin(15*(π/128))
+ Q_8_8(0.37890625), // sin(16*(π/128))
+ Q_8_8(0.40234375), // sin(17*(π/128))
+ Q_8_8(0.42578125), // sin(18*(π/128))
+ Q_8_8(0.44921875), // sin(19*(π/128))
+ Q_8_8(0.46875), // sin(20*(π/128))
+ Q_8_8(0.4921875), // sin(21*(π/128))
+ Q_8_8(0.51171875), // sin(22*(π/128))
+ Q_8_8(0.53125), // sin(23*(π/128))
+ Q_8_8(0.5546875), // sin(24*(π/128))
+ Q_8_8(0.57421875), // sin(25*(π/128))
+ Q_8_8(0.59375), // sin(26*(π/128))
+ Q_8_8(0.61328125), // sin(27*(π/128))
+ Q_8_8(0.6328125), // sin(28*(π/128))
+ Q_8_8(0.65234375), // sin(29*(π/128))
+ Q_8_8(0.66796875), // sin(30*(π/128))
+ Q_8_8(0.6875), // sin(31*(π/128))
+ Q_8_8(0.70703125), // sin(32*(π/128))
+ Q_8_8(0.72265625), // sin(33*(π/128))
+ Q_8_8(0.73828125), // sin(34*(π/128))
+ Q_8_8(0.75390625), // sin(35*(π/128))
+ Q_8_8(0.76953125), // sin(36*(π/128))
+ Q_8_8(0.78515625), // sin(37*(π/128))
+ Q_8_8(0.80078125), // sin(38*(π/128))
+ Q_8_8(0.81640625), // sin(39*(π/128))
+ Q_8_8(0.828125), // sin(40*(π/128))
+ Q_8_8(0.84375), // sin(41*(π/128))
+ Q_8_8(0.85546875), // sin(42*(π/128))
+ Q_8_8(0.8671875), // sin(43*(π/128))
+ Q_8_8(0.87890625), // sin(44*(π/128))
+ Q_8_8(0.890625), // sin(45*(π/128))
+ Q_8_8(0.90234375), // sin(46*(π/128))
+ Q_8_8(0.9140625), // sin(47*(π/128))
+ Q_8_8(0.921875), // sin(48*(π/128))
+ Q_8_8(0.9296875), // sin(49*(π/128))
+ Q_8_8(0.94140625), // sin(50*(π/128))
+ Q_8_8(0.94921875), // sin(51*(π/128))
+ Q_8_8(0.953125), // sin(52*(π/128))
+ Q_8_8(0.9609375), // sin(53*(π/128))
+ Q_8_8(0.96875), // sin(54*(π/128))
+ Q_8_8(0.97265625), // sin(55*(π/128))
+ Q_8_8(0.98046875), // sin(56*(π/128))
+ Q_8_8(0.984375), // sin(57*(π/128))
+ Q_8_8(0.98828125), // sin(58*(π/128))
+ Q_8_8(0.9921875), // sin(59*(π/128))
+ Q_8_8(0.9921875), // sin(60*(π/128))
+ Q_8_8(0.99609375), // sin(61*(π/128))
+ Q_8_8(0.99609375), // sin(62*(π/128))
+ Q_8_8(0.99609375), // sin(63*(π/128))
+ Q_8_8(1), // sin(64*(π/128))
+ Q_8_8(0.99609375), // sin(65*(π/128))
+ Q_8_8(0.99609375), // sin(66*(π/128))
+ Q_8_8(0.99609375), // sin(67*(π/128))
+ Q_8_8(0.9921875), // sin(68*(π/128))
+ Q_8_8(0.9921875), // sin(69*(π/128))
+ Q_8_8(0.98828125), // sin(70*(π/128))
+ Q_8_8(0.984375), // sin(71*(π/128))
+ Q_8_8(0.98046875), // sin(72*(π/128))
+ Q_8_8(0.97265625), // sin(73*(π/128))
+ Q_8_8(0.96875), // sin(74*(π/128))
+ Q_8_8(0.9609375), // sin(75*(π/128))
+ Q_8_8(0.953125), // sin(76*(π/128))
+ Q_8_8(0.94921875), // sin(77*(π/128))
+ Q_8_8(0.94140625), // sin(78*(π/128))
+ Q_8_8(0.9296875), // sin(79*(π/128))
+ Q_8_8(0.921875), // sin(80*(π/128))
+ Q_8_8(0.9140625), // sin(81*(π/128))
+ Q_8_8(0.90234375), // sin(82*(π/128))
+ Q_8_8(0.890625), // sin(83*(π/128))
+ Q_8_8(0.87890625), // sin(84*(π/128))
+ Q_8_8(0.8671875), // sin(85*(π/128))
+ Q_8_8(0.85546875), // sin(86*(π/128))
+ Q_8_8(0.84375), // sin(87*(π/128))
+ Q_8_8(0.828125), // sin(88*(π/128))
+ Q_8_8(0.81640625), // sin(89*(π/128))
+ Q_8_8(0.80078125), // sin(90*(π/128))
+ Q_8_8(0.78515625), // sin(91*(π/128))
+ Q_8_8(0.76953125), // sin(92*(π/128))
+ Q_8_8(0.75390625), // sin(93*(π/128))
+ Q_8_8(0.73828125), // sin(94*(π/128))
+ Q_8_8(0.72265625), // sin(95*(π/128))
+ Q_8_8(0.70703125), // sin(96*(π/128))
+ Q_8_8(0.6875), // sin(97*(π/128))
+ Q_8_8(0.66796875), // sin(98*(π/128))
+ Q_8_8(0.65234375), // sin(99*(π/128))
+ Q_8_8(0.6328125), // sin(100*(π/128))
+ Q_8_8(0.61328125), // sin(101*(π/128))
+ Q_8_8(0.59375), // sin(102*(π/128))
+ Q_8_8(0.57421875), // sin(103*(π/128))
+ Q_8_8(0.5546875), // sin(104*(π/128))
+ Q_8_8(0.53125), // sin(105*(π/128))
+ Q_8_8(0.51171875), // sin(106*(π/128))
+ Q_8_8(0.4921875), // sin(107*(π/128))
+ Q_8_8(0.46875), // sin(108*(π/128))
+ Q_8_8(0.44921875), // sin(109*(π/128))
+ Q_8_8(0.42578125), // sin(110*(π/128))
+ Q_8_8(0.40234375), // sin(111*(π/128))
+ Q_8_8(0.37890625), // sin(112*(π/128))
+ Q_8_8(0.359375), // sin(113*(π/128))
+ Q_8_8(0.3359375), // sin(114*(π/128))
+ Q_8_8(0.3125), // sin(115*(π/128))
+ Q_8_8(0.2890625), // sin(116*(π/128))
+ Q_8_8(0.265625), // sin(117*(π/128))
+ Q_8_8(0.2421875), // sin(118*(π/128))
+ Q_8_8(0.21875), // sin(119*(π/128))
+ Q_8_8(0.19140625), // sin(120*(π/128))
+ Q_8_8(0.16796875), // sin(121*(π/128))
+ Q_8_8(0.14453125), // sin(122*(π/128))
+ Q_8_8(0.12109375), // sin(123*(π/128))
+ Q_8_8(0.09765625), // sin(124*(π/128))
+ Q_8_8(0.0703125), // sin(125*(π/128))
+ Q_8_8(0.046875), // sin(126*(π/128))
+ Q_8_8(0.0234375), // sin(127*(π/128))
+ Q_8_8(0), // sin(128*(π/128))
+ Q_8_8(-0.0234375), // sin(129*(π/128))
+ Q_8_8(-0.046875), // sin(130*(π/128))
+ Q_8_8(-0.0703125), // sin(131*(π/128))
+ Q_8_8(-0.09765625), // sin(132*(π/128))
+ Q_8_8(-0.12109375), // sin(133*(π/128))
+ Q_8_8(-0.14453125), // sin(134*(π/128))
+ Q_8_8(-0.16796875), // sin(135*(π/128))
+ Q_8_8(-0.19140625), // sin(136*(π/128))
+ Q_8_8(-0.21875), // sin(137*(π/128))
+ Q_8_8(-0.2421875), // sin(138*(π/128))
+ Q_8_8(-0.265625), // sin(139*(π/128))
+ Q_8_8(-0.2890625), // sin(140*(π/128))
+ Q_8_8(-0.3125), // sin(141*(π/128))
+ Q_8_8(-0.3359375), // sin(142*(π/128))
+ Q_8_8(-0.359375), // sin(143*(π/128))
+ Q_8_8(-0.37890625), // sin(144*(π/128))
+ Q_8_8(-0.40234375), // sin(145*(π/128))
+ Q_8_8(-0.42578125), // sin(146*(π/128))
+ Q_8_8(-0.44921875), // sin(147*(π/128))
+ Q_8_8(-0.46875), // sin(148*(π/128))
+ Q_8_8(-0.4921875), // sin(149*(π/128))
+ Q_8_8(-0.51171875), // sin(150*(π/128))
+ Q_8_8(-0.53125), // sin(151*(π/128))
+ Q_8_8(-0.5546875), // sin(152*(π/128))
+ Q_8_8(-0.57421875), // sin(153*(π/128))
+ Q_8_8(-0.59375), // sin(154*(π/128))
+ Q_8_8(-0.61328125), // sin(155*(π/128))
+ Q_8_8(-0.6328125), // sin(156*(π/128))
+ Q_8_8(-0.65234375), // sin(157*(π/128))
+ Q_8_8(-0.66796875), // sin(158*(π/128))
+ Q_8_8(-0.6875), // sin(159*(π/128))
+ Q_8_8(-0.70703125), // sin(160*(π/128))
+ Q_8_8(-0.72265625), // sin(161*(π/128))
+ Q_8_8(-0.73828125), // sin(162*(π/128))
+ Q_8_8(-0.75390625), // sin(163*(π/128))
+ Q_8_8(-0.76953125), // sin(164*(π/128))
+ Q_8_8(-0.78515625), // sin(165*(π/128))
+ Q_8_8(-0.80078125), // sin(166*(π/128))
+ Q_8_8(-0.81640625), // sin(167*(π/128))
+ Q_8_8(-0.828125), // sin(168*(π/128))
+ Q_8_8(-0.84375), // sin(169*(π/128))
+ Q_8_8(-0.85546875), // sin(170*(π/128))
+ Q_8_8(-0.8671875), // sin(171*(π/128))
+ Q_8_8(-0.87890625), // sin(172*(π/128))
+ Q_8_8(-0.890625), // sin(173*(π/128))
+ Q_8_8(-0.90234375), // sin(174*(π/128))
+ Q_8_8(-0.9140625), // sin(175*(π/128))
+ Q_8_8(-0.921875), // sin(176*(π/128))
+ Q_8_8(-0.9296875), // sin(177*(π/128))
+ Q_8_8(-0.94140625), // sin(178*(π/128))
+ Q_8_8(-0.94921875), // sin(179*(π/128))
+ Q_8_8(-0.953125), // sin(180*(π/128))
+ Q_8_8(-0.9609375), // sin(181*(π/128))
+ Q_8_8(-0.96875), // sin(182*(π/128))
+ Q_8_8(-0.97265625), // sin(183*(π/128))
+ Q_8_8(-0.98046875), // sin(184*(π/128))
+ Q_8_8(-0.984375), // sin(185*(π/128))
+ Q_8_8(-0.98828125), // sin(186*(π/128))
+ Q_8_8(-0.9921875), // sin(187*(π/128))
+ Q_8_8(-0.9921875), // sin(188*(π/128))
+ Q_8_8(-0.99609375), // sin(189*(π/128))
+ Q_8_8(-0.99609375), // sin(190*(π/128))
+ Q_8_8(-0.99609375), // sin(191*(π/128))
+ Q_8_8(-1), // sin(192*(π/128))
+ Q_8_8(-0.99609375), // sin(193*(π/128))
+ Q_8_8(-0.99609375), // sin(194*(π/128))
+ Q_8_8(-0.99609375), // sin(195*(π/128))
+ Q_8_8(-0.9921875), // sin(196*(π/128))
+ Q_8_8(-0.9921875), // sin(197*(π/128))
+ Q_8_8(-0.98828125), // sin(198*(π/128))
+ Q_8_8(-0.984375), // sin(199*(π/128))
+ Q_8_8(-0.98046875), // sin(200*(π/128))
+ Q_8_8(-0.97265625), // sin(201*(π/128))
+ Q_8_8(-0.96875), // sin(202*(π/128))
+ Q_8_8(-0.9609375), // sin(203*(π/128))
+ Q_8_8(-0.953125), // sin(204*(π/128))
+ Q_8_8(-0.94921875), // sin(205*(π/128))
+ Q_8_8(-0.94140625), // sin(206*(π/128))
+ Q_8_8(-0.9296875), // sin(207*(π/128))
+ Q_8_8(-0.921875), // sin(208*(π/128))
+ Q_8_8(-0.9140625), // sin(209*(π/128))
+ Q_8_8(-0.90234375), // sin(210*(π/128))
+ Q_8_8(-0.890625), // sin(211*(π/128))
+ Q_8_8(-0.87890625), // sin(212*(π/128))
+ Q_8_8(-0.8671875), // sin(213*(π/128))
+ Q_8_8(-0.85546875), // sin(214*(π/128))
+ Q_8_8(-0.84375), // sin(215*(π/128))
+ Q_8_8(-0.828125), // sin(216*(π/128))
+ Q_8_8(-0.81640625), // sin(217*(π/128))
+ Q_8_8(-0.80078125), // sin(218*(π/128))
+ Q_8_8(-0.78515625), // sin(219*(π/128))
+ Q_8_8(-0.76953125), // sin(220*(π/128))
+ Q_8_8(-0.75390625), // sin(221*(π/128))
+ Q_8_8(-0.73828125), // sin(222*(π/128))
+ Q_8_8(-0.72265625), // sin(223*(π/128))
+ Q_8_8(-0.70703125), // sin(224*(π/128))
+ Q_8_8(-0.6875), // sin(225*(π/128))
+ Q_8_8(-0.66796875), // sin(226*(π/128))
+ Q_8_8(-0.65234375), // sin(227*(π/128))
+ Q_8_8(-0.6328125), // sin(228*(π/128))
+ Q_8_8(-0.61328125), // sin(229*(π/128))
+ Q_8_8(-0.59375), // sin(230*(π/128))
+ Q_8_8(-0.57421875), // sin(231*(π/128))
+ Q_8_8(-0.5546875), // sin(232*(π/128))
+ Q_8_8(-0.53125), // sin(233*(π/128))
+ Q_8_8(-0.51171875), // sin(234*(π/128))
+ Q_8_8(-0.4921875), // sin(235*(π/128))
+ Q_8_8(-0.46875), // sin(236*(π/128))
+ Q_8_8(-0.44921875), // sin(237*(π/128))
+ Q_8_8(-0.42578125), // sin(238*(π/128))
+ Q_8_8(-0.40234375), // sin(239*(π/128))
+ Q_8_8(-0.37890625), // sin(240*(π/128))
+ Q_8_8(-0.359375), // sin(241*(π/128))
+ Q_8_8(-0.3359375), // sin(242*(π/128))
+ Q_8_8(-0.3125), // sin(243*(π/128))
+ Q_8_8(-0.2890625), // sin(244*(π/128))
+ Q_8_8(-0.265625), // sin(245*(π/128))
+ Q_8_8(-0.2421875), // sin(246*(π/128))
+ Q_8_8(-0.21875), // sin(247*(π/128))
+ Q_8_8(-0.19140625), // sin(248*(π/128))
+ Q_8_8(-0.16796875), // sin(249*(π/128))
+ Q_8_8(-0.14453125), // sin(250*(π/128))
+ Q_8_8(-0.12109375), // sin(251*(π/128))
+ Q_8_8(-0.09765625), // sin(252*(π/128))
+ Q_8_8(-0.0703125), // sin(253*(π/128))
+ Q_8_8(-0.046875), // sin(254*(π/128))
+ Q_8_8(-0.0234375), // sin(255*(π/128))
+ Q_8_8(0), // sin(256*(π/128))
+ Q_8_8(0.0234375), // sin(257*(π/128))
+ Q_8_8(0.046875), // sin(258*(π/128))
+ Q_8_8(0.0703125), // sin(259*(π/128))
+ Q_8_8(0.09765625), // sin(260*(π/128))
+ Q_8_8(0.12109375), // sin(261*(π/128))
+ Q_8_8(0.14453125), // sin(262*(π/128))
+ Q_8_8(0.16796875), // sin(263*(π/128))
+ Q_8_8(0.19140625), // sin(264*(π/128))
+ Q_8_8(0.21875), // sin(265*(π/128))
+ Q_8_8(0.2421875), // sin(266*(π/128))
+ Q_8_8(0.265625), // sin(267*(π/128))
+ Q_8_8(0.2890625), // sin(268*(π/128))
+ Q_8_8(0.3125), // sin(269*(π/128))
+ Q_8_8(0.3359375), // sin(270*(π/128))
+ Q_8_8(0.359375), // sin(271*(π/128))
+ Q_8_8(0.37890625), // sin(272*(π/128))
+ Q_8_8(0.40234375), // sin(273*(π/128))
+ Q_8_8(0.42578125), // sin(274*(π/128))
+ Q_8_8(0.44921875), // sin(275*(π/128))
+ Q_8_8(0.46875), // sin(276*(π/128))
+ Q_8_8(0.4921875), // sin(277*(π/128))
+ Q_8_8(0.51171875), // sin(278*(π/128))
+ Q_8_8(0.53125), // sin(279*(π/128))
+ Q_8_8(0.5546875), // sin(280*(π/128))
+ Q_8_8(0.57421875), // sin(281*(π/128))
+ Q_8_8(0.59375), // sin(282*(π/128))
+ Q_8_8(0.61328125), // sin(283*(π/128))
+ Q_8_8(0.6328125), // sin(284*(π/128))
+ Q_8_8(0.65234375), // sin(285*(π/128))
+ Q_8_8(0.66796875), // sin(286*(π/128))
+ Q_8_8(0.6875), // sin(287*(π/128))
+ Q_8_8(0.70703125), // sin(288*(π/128))
+ Q_8_8(0.72265625), // sin(289*(π/128))
+ Q_8_8(0.73828125), // sin(290*(π/128))
+ Q_8_8(0.75390625), // sin(291*(π/128))
+ Q_8_8(0.76953125), // sin(292*(π/128))
+ Q_8_8(0.78515625), // sin(293*(π/128))
+ Q_8_8(0.80078125), // sin(294*(π/128))
+ Q_8_8(0.81640625), // sin(295*(π/128))
+ Q_8_8(0.828125), // sin(296*(π/128))
+ Q_8_8(0.84375), // sin(297*(π/128))
+ Q_8_8(0.85546875), // sin(298*(π/128))
+ Q_8_8(0.8671875), // sin(299*(π/128))
+ Q_8_8(0.87890625), // sin(300*(π/128))
+ Q_8_8(0.890625), // sin(301*(π/128))
+ Q_8_8(0.90234375), // sin(302*(π/128))
+ Q_8_8(0.9140625), // sin(303*(π/128))
+ Q_8_8(0.921875), // sin(304*(π/128))
+ Q_8_8(0.9296875), // sin(305*(π/128))
+ Q_8_8(0.94140625), // sin(306*(π/128))
+ Q_8_8(0.94921875), // sin(307*(π/128))
+ Q_8_8(0.953125), // sin(308*(π/128))
+ Q_8_8(0.9609375), // sin(309*(π/128))
+ Q_8_8(0.96875), // sin(310*(π/128))
+ Q_8_8(0.97265625), // sin(311*(π/128))
+ Q_8_8(0.98046875), // sin(312*(π/128))
+ Q_8_8(0.984375), // sin(313*(π/128))
+ Q_8_8(0.98828125), // sin(314*(π/128))
+ Q_8_8(0.9921875), // sin(315*(π/128))
+ Q_8_8(0.9921875), // sin(316*(π/128))
+ Q_8_8(0.99609375), // sin(317*(π/128))
+ Q_8_8(0.99609375), // sin(318*(π/128))
+ Q_8_8(0.99609375), // sin(319*(π/128))
+};
+
+// values of sin(x) as Q4.12 fixed-point numbers from x = 0° to x = 179°
+const s16 gSineDegreeTable[] =
+{
+ Q_4_12(0), // sin(0°)
+ Q_4_12(0.017333984375), // sin(1°)
+ Q_4_12(0.034912109375), // sin(2°)
+ Q_4_12(0.05224609375), // sin(3°)
+ Q_4_12(0.06982421875), // sin(4°)
+ Q_4_12(0.087158203125), // sin(5°)
+ Q_4_12(0.1044921875), // sin(6°)
+ Q_4_12(0.121826171875), // sin(7°)
+ Q_4_12(0.13916015625), // sin(8°)
+ Q_4_12(0.156494140625), // sin(9°)
+ Q_4_12(0.173583984375), // sin(10°)
+ Q_4_12(0.19091796875), // sin(11°)
+ Q_4_12(0.2080078125), // sin(12°)
+ Q_4_12(0.224853515625), // sin(13°)
+ Q_4_12(0.241943359375), // sin(14°)
+ Q_4_12(0.2587890625), // sin(15°)
+ Q_4_12(0.275634765625), // sin(16°)
+ Q_4_12(0.29248046875), // sin(17°)
+ Q_4_12(0.30908203125), // sin(18°)
+ Q_4_12(0.32568359375), // sin(19°)
+ Q_4_12(0.342041015625), // sin(20°)
+ Q_4_12(0.3583984375), // sin(21°)
+ Q_4_12(0.37451171875), // sin(22°)
+ Q_4_12(0.390625), // sin(23°)
+ Q_4_12(0.40673828125), // sin(24°)
+ Q_4_12(0.422607421875), // sin(25°)
+ Q_4_12(0.4384765625), // sin(26°)
+ Q_4_12(0.4541015625), // sin(27°)
+ Q_4_12(0.469482421875), // sin(28°)
+ Q_4_12(0.48486328125), // sin(29°)
+ Q_4_12(0.5), // sin(30°)
+ Q_4_12(0.51513671875), // sin(31°)
+ Q_4_12(0.530029296875), // sin(32°)
+ Q_4_12(0.544677734375), // sin(33°)
+ Q_4_12(0.55908203125), // sin(34°)
+ Q_4_12(0.573486328125), // sin(35°)
+ Q_4_12(0.587890625), // sin(36°)
+ Q_4_12(0.601806640625), // sin(37°)
+ Q_4_12(0.61572265625), // sin(38°)
+ Q_4_12(0.62939453125), // sin(39°)
+ Q_4_12(0.642822265625), // sin(40°)
+ Q_4_12(0.656005859375), // sin(41°)
+ Q_4_12(0.669189453125), // sin(42°)
+ Q_4_12(0.681884765625), // sin(43°)
+ Q_4_12(0.694580078125), // sin(44°)
+ Q_4_12(0.70703125), // sin(45°)
+ Q_4_12(0.71923828125), // sin(46°)
+ Q_4_12(0.7314453125), // sin(47°)
+ Q_4_12(0.7431640625), // sin(48°)
+ Q_4_12(0.754638671875), // sin(49°)
+ Q_4_12(0.76611328125), // sin(50°)
+ Q_4_12(0.777099609375), // sin(51°)
+ Q_4_12(0.7880859375), // sin(52°)
+ Q_4_12(0.798583984375), // sin(53°)
+ Q_4_12(0.80908203125), // sin(54°)
+ Q_4_12(0.819091796875), // sin(55°)
+ Q_4_12(0.8291015625), // sin(56°)
+ Q_4_12(0.838623046875), // sin(57°)
+ Q_4_12(0.84814453125), // sin(58°)
+ Q_4_12(0.857177734375), // sin(59°)
+ Q_4_12(0.865966796875), // sin(60°)
+ Q_4_12(0.87451171875), // sin(61°)
+ Q_4_12(0.883056640625), // sin(62°)
+ Q_4_12(0.89111328125), // sin(63°)
+ Q_4_12(0.898681640625), // sin(64°)
+ Q_4_12(0.90625), // sin(65°)
+ Q_4_12(0.91357421875), // sin(66°)
+ Q_4_12(0.92041015625), // sin(67°)
+ Q_4_12(0.92724609375), // sin(68°)
+ Q_4_12(0.93359375), // sin(69°)
+ Q_4_12(0.939697265625), // sin(70°)
+ Q_4_12(0.945556640625), // sin(71°)
+ Q_4_12(0.951171875), // sin(72°)
+ Q_4_12(0.956298828125), // sin(73°)
+ Q_4_12(0.961181640625), // sin(74°)
+ Q_4_12(0.9658203125), // sin(75°)
+ Q_4_12(0.97021484375), // sin(76°)
+ Q_4_12(0.974365234375), // sin(77°)
+ Q_4_12(0.97802734375), // sin(78°)
+ Q_4_12(0.981689453125), // sin(79°)
+ Q_4_12(0.98486328125), // sin(80°)
+ Q_4_12(0.98779296875), // sin(81°)
+ Q_4_12(0.990234375), // sin(82°)
+ Q_4_12(0.992431640625), // sin(83°)
+ Q_4_12(0.994384765625), // sin(84°)
+ Q_4_12(0.99609375), // sin(85°)
+ Q_4_12(0.99755859375), // sin(86°)
+ Q_4_12(0.99853515625), // sin(87°)
+ Q_4_12(0.999267578125), // sin(88°)
+ Q_4_12(0.999755859375), // sin(89°)
+ Q_4_12(1), // sin(90°)
+ Q_4_12(0.999755859375), // sin(91°)
+ Q_4_12(0.999267578125), // sin(92°)
+ Q_4_12(0.99853515625), // sin(93°)
+ Q_4_12(0.99755859375), // sin(94°)
+ Q_4_12(0.99609375), // sin(95°)
+ Q_4_12(0.994384765625), // sin(96°)
+ Q_4_12(0.992431640625), // sin(97°)
+ Q_4_12(0.990234375), // sin(98°)
+ Q_4_12(0.98779296875), // sin(99°)
+ Q_4_12(0.98486328125), // sin(100°)
+ Q_4_12(0.981689453125), // sin(101°)
+ Q_4_12(0.97802734375), // sin(102°)
+ Q_4_12(0.974365234375), // sin(103°)
+ Q_4_12(0.97021484375), // sin(104°)
+ Q_4_12(0.9658203125), // sin(105°)
+ Q_4_12(0.961181640625), // sin(106°)
+ Q_4_12(0.956298828125), // sin(107°)
+ Q_4_12(0.951171875), // sin(108°)
+ Q_4_12(0.945556640625), // sin(109°)
+ Q_4_12(0.939697265625), // sin(110°)
+ Q_4_12(0.93359375), // sin(111°)
+ Q_4_12(0.92724609375), // sin(112°)
+ Q_4_12(0.92041015625), // sin(113°)
+ Q_4_12(0.91357421875), // sin(114°)
+ Q_4_12(0.90625), // sin(115°)
+ Q_4_12(0.898681640625), // sin(116°)
+ Q_4_12(0.89111328125), // sin(117°)
+ Q_4_12(0.883056640625), // sin(118°)
+ Q_4_12(0.87451171875), // sin(119°)
+ Q_4_12(0.865966796875), // sin(120°)
+ Q_4_12(0.857177734375), // sin(121°)
+ Q_4_12(0.84814453125), // sin(122°)
+ Q_4_12(0.838623046875), // sin(123°)
+ Q_4_12(0.8291015625), // sin(124°)
+ Q_4_12(0.819091796875), // sin(125°)
+ Q_4_12(0.80908203125), // sin(126°)
+ Q_4_12(0.798583984375), // sin(127°)
+ Q_4_12(0.7880859375), // sin(128°)
+ Q_4_12(0.777099609375), // sin(129°)
+ Q_4_12(0.76611328125), // sin(130°)
+ Q_4_12(0.754638671875), // sin(131°)
+ Q_4_12(0.7431640625), // sin(132°)
+ Q_4_12(0.7314453125), // sin(133°)
+ Q_4_12(0.71923828125), // sin(134°)
+ Q_4_12(0.70703125), // sin(135°)
+ Q_4_12(0.694580078125), // sin(136°)
+ Q_4_12(0.681884765625), // sin(137°)
+ Q_4_12(0.669189453125), // sin(138°)
+ Q_4_12(0.656005859375), // sin(139°)
+ Q_4_12(0.642822265625), // sin(140°)
+ Q_4_12(0.62939453125), // sin(141°)
+ Q_4_12(0.61572265625), // sin(142°)
+ Q_4_12(0.601806640625), // sin(143°)
+ Q_4_12(0.587890625), // sin(144°)
+ Q_4_12(0.573486328125), // sin(145°)
+ Q_4_12(0.55908203125), // sin(146°)
+ Q_4_12(0.544677734375), // sin(147°)
+ Q_4_12(0.530029296875), // sin(148°)
+ Q_4_12(0.51513671875), // sin(149°)
+ Q_4_12(0.5), // sin(150°)
+ Q_4_12(0.48486328125), // sin(151°)
+ Q_4_12(0.469482421875), // sin(152°)
+ Q_4_12(0.4541015625), // sin(153°)
+ Q_4_12(0.4384765625), // sin(154°)
+ Q_4_12(0.422607421875), // sin(155°)
+ Q_4_12(0.40673828125), // sin(156°)
+ Q_4_12(0.390625), // sin(157°)
+ Q_4_12(0.37451171875), // sin(158°)
+ Q_4_12(0.3583984375), // sin(159°)
+ Q_4_12(0.342041015625), // sin(160°)
+ Q_4_12(0.32568359375), // sin(161°)
+ Q_4_12(0.30908203125), // sin(162°)
+ Q_4_12(0.29248046875), // sin(163°)
+ Q_4_12(0.275634765625), // sin(164°)
+ Q_4_12(0.2587890625), // sin(165°)
+ Q_4_12(0.241943359375), // sin(166°)
+ Q_4_12(0.224853515625), // sin(167°)
+ Q_4_12(0.2080078125), // sin(168°)
+ Q_4_12(0.19091796875), // sin(169°)
+ Q_4_12(0.173583984375), // sin(170°)
+ Q_4_12(0.156494140625), // sin(171°)
+ Q_4_12(0.13916015625), // sin(172°)
+ Q_4_12(0.121826171875), // sin(173°)
+ Q_4_12(0.1044921875), // sin(174°)
+ Q_4_12(0.087158203125), // sin(175°)
+ Q_4_12(0.06982421875), // sin(176°)
+ Q_4_12(0.05224609375), // sin(177°)
+ Q_4_12(0.034912109375), // sin(178°)
+ Q_4_12(0.017333984375), // sin(179°)
+};
// amplitude * sin(index*(π/128))
s16 Sin(s16 index, s16 amplitude)
diff --git a/src/tv.c b/src/tv.c
index 76d9d1836..4bd11a9b9 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -1,7 +1,9 @@
#include "global.h"
-#include "asm.h"
#include "tv.h"
+#include "battle_tower.h"
+#include "contest_painting.h"
#include "data2.h"
+#include "easy_chat.h"
#include "event_data.h"
#include "fieldmap.h"
#include "field_message_box.h"
@@ -19,17 +21,30 @@
#include "battle.h"
#include "link.h"
#include "easy_chat.h"
+#include "field_map_obj.h"
+#include "field_specials.h"
#include "item.h"
#include "items.h"
-#include "contest_painting.h"
+#include "link.h"
+#include "map_constants.h"
+#include "naming_screen.h"
+#include "pokedex.h"
+#include "region_map.h"
+#include "rng.h"
+#include "rom4.h"
#include "rtc.h"
+#include "script_menu.h"
+#include "species.h"
+#include "string_util.h"
+#include "strings.h"
+#include "text.h"
struct UnkTvStruct
{
s8 var0;
};
-extern struct Struct30042E0 gUnknown_030042E0;
+extern struct Struct30042E0 gBattleResults;
extern u8 gUnknown_0300430A[11];
struct OutbreakPokemon
@@ -40,13 +55,13 @@ struct OutbreakPokemon
/*0x0B*/ u8 location;
};
-extern u8 *gUnknown_083D1464[3];
-extern u8 gUnknown_02038694;
-
struct TVSaleItem {
u16 item_id;
u16 item_amount;
};
+
+extern u8 gUnknown_02038694;
+
extern struct TVSaleItem gUnknown_02038724[3];
extern u16 gSpecialVar_0x8004;
@@ -73,11 +88,8 @@ extern u8 *gTVFishingGuruAdviceTextGroup[];
extern u8 *gTVWorldOfMastersTextGroup[];
extern struct OutbreakPokemon gPokeOutbreakSpeciesList[5];
-extern void sub_80BEBF4(void);
-
extern u16 gUnknown_020387E0;
extern u16 gUnknown_020387E2;
-extern const u8 *gUnknown_083CE048[];
extern const u8 *gTVNewsTextGroup1[];
extern const u8 *gTVNewsTextGroup2[];
@@ -85,7 +97,20 @@ extern const u8 *gTVNewsTextGroup3[];
extern u16 gScriptLastTalked;
-u32 GetPlayerTrainerId(void);
+
+extern u8 gScriptContestCategory;
+extern u8 gScriptContestRank;
+extern u8 gUnknown_03004316[11];
+extern u8 gBattleOutcome;
+
+extern u16 gLastUsedItem;
+
+extern u8 ewram[];
+#define gUnknown_02007000 (*(ewramStruct_02007000 *)(ewram + 0x7000))
+extern u8 gUnknown_020387E4;
+
+extern u8 gUnknown_03000720;
+extern s8 gUnknown_03000722;
void ClearTVShowData(void)
{
@@ -107,7 +132,7 @@ extern u16 sub_8135D3C(u8);
extern u8 gScriptContestCategory;
extern u8 gScriptContestRank;
extern u8 gUnknown_03004316[11];
-extern u8 gUnknown_02024D26;
+extern u8 gBattleOutcome;
void sub_80BF334(void);
void sub_80BF3A4(void);
@@ -131,7 +156,7 @@ void sub_80BEA88(void);
void sub_80BE138(TVShow *show);
void sub_80BE160(TVShow *show);
-extern u16 gUnknown_02024C04;
+extern u16 gLastUsedItem;
void sub_80BE5FC(void);
void sub_80BE65C(void);
@@ -302,7 +327,7 @@ void SetTVMetatilesOnMap(int, int, u16);
bool8 sub_80BECA0(void);
bool8 IsTVShowInSearchOfTrainersAiring(void);
-void UpdateTVScreensOnMap(int a0, int a1)
+void UpdateTVScreensOnMap(int width, int height)
{
u8 bigMovieOrEmergencyNewsOnTv;
FlagSet(SYS_TV_WATCH);
@@ -310,19 +335,19 @@ void UpdateTVScreensOnMap(int a0, int a1)
switch (bigMovieOrEmergencyNewsOnTv)
{
case 1:
- SetTVMetatilesOnMap(a0, a1, 0x3);
+ SetTVMetatilesOnMap(width, height, 0x3);
break;
case 2:
break;
default:
if (gSaveBlock1.location.mapGroup == MAP_GROUP_LILYCOVE_CITY_COVE_LILY_MOTEL_1F && gSaveBlock1.location.mapNum == MAP_ID_LILYCOVE_CITY_COVE_LILY_MOTEL_1F)
{
- SetTVMetatilesOnMap(a0, a1, 0x3);
+ SetTVMetatilesOnMap(width, height, 0x3);
}
else if (FlagGet(SYS_TV_START) && (sub_80BD8B8() != 0xff || sub_80BECA0() != 0xff || IsTVShowInSearchOfTrainersAiring()))
{
FlagReset(SYS_TV_WATCH);
- SetTVMetatilesOnMap(a0, a1, 0x3);
+ SetTVMetatilesOnMap(width, height, 0x3);
}
}
}
@@ -405,33 +430,33 @@ void TakeTVShowInSearchOfTrainersOffTheAir(void);
void GabbyAndTyBeforeInterview(void)
{
u8 i;
- gSaveBlock1.gabbyAndTyData.mon1 = gUnknown_030042E0.unk6;
- gSaveBlock1.gabbyAndTyData.mon2 = gUnknown_030042E0.unk26;
- gSaveBlock1.gabbyAndTyData.lastMove = gUnknown_030042E0.unk22;
+ gSaveBlock1.gabbyAndTyData.mon1 = gBattleResults.unk6;
+ gSaveBlock1.gabbyAndTyData.mon2 = gBattleResults.unk26;
+ gSaveBlock1.gabbyAndTyData.lastMove = gBattleResults.unk22;
if (gSaveBlock1.gabbyAndTyData.battleNum != 0xff)
{
gSaveBlock1.gabbyAndTyData.battleNum ++;
}
- gSaveBlock1.gabbyAndTyData.valA_0 = gUnknown_030042E0.unk5_0;
- if (gUnknown_030042E0.unk0)
+ gSaveBlock1.gabbyAndTyData.valA_0 = gBattleResults.unk5_0;
+ if (gBattleResults.unk0)
{
gSaveBlock1.gabbyAndTyData.valA_1 = 1;
} else
{
gSaveBlock1.gabbyAndTyData.valA_1 = 0;
}
- if (gUnknown_030042E0.unk3)
+ if (gBattleResults.unk3)
{
gSaveBlock1.gabbyAndTyData.valA_2 = 1;
} else
{
gSaveBlock1.gabbyAndTyData.valA_2 = 0;
}
- if (!gUnknown_030042E0.unk5_1)
+ if (!gBattleResults.unk5_1)
{
for (i=0; i<11; i++)
{
- if (gUnknown_030042E0.unk36[i] != 0)
+ if (gBattleResults.unk36[i] != 0)
{
gSaveBlock1.gabbyAndTyData.valA_3 = 1;
break;
@@ -587,38 +612,38 @@ void sub_80BDEC8(void) {
total = 0;
sub_80BEB20();
sub_80BE778();
- if (gUnknown_030042E0.unk28 == 0) {
+ if (gBattleResults.unk28 == 0) {
sub_80BE074();
} else {
sub_80BE028();
- if (sub_80BF77C(0xffff) == 0 && StringCompareWithoutExtCtrlCodes(gSpeciesNames[gUnknown_030042E0.unk28], gUnknown_030042E0.unk2A) != 0) {
+ if (sub_80BF77C(0xffff) == 0 && StringCompareWithoutExtCtrlCodes(gSpeciesNames[gBattleResults.unk28], gBattleResults.unk2A) != 0) {
gUnknown_03005D38.var0 = sub_80BF74C(gSaveBlock1.tvShows);
if (gUnknown_03005D38.var0 != -1 && sub_80BF1B4(TVSHOW_POKEMON_TODAY_CAUGHT) != 1) {
for (i=0; i<11; i++) {
- total += gUnknown_030042E0.unk36[i];
+ total += gBattleResults.unk36[i];
}
- if (total != 0 || gUnknown_030042E0.unk5_1 != 0) {
+ if (total != 0 || gBattleResults.unk5_1 != 0) {
total = FALSE;
show = &gSaveBlock1.tvShows[gUnknown_03005D38.var0];
show->pokemonToday.var00 = TVSHOW_POKEMON_TODAY_CAUGHT;
show->pokemonToday.var01 = total;
- if (gUnknown_030042E0.unk5_1 != 0) {
+ if (gBattleResults.unk5_1 != 0) {
total = 1;
item = ITEM_MASTER_BALL;
} else {
for (i=0; i<11; i++) {
- total += gUnknown_030042E0.unk36[i];
+ total += gBattleResults.unk36[i];
}
if (total > 0xff) {
total = 0xff;
}
- item = gUnknown_02024C04;
+ item = gLastUsedItem;
}
show->pokemonToday.var12 = total;
show->pokemonToday.ball = item;
StringCopy(show->pokemonToday.playerName, gSaveBlock2.playerName);
- StringCopy(show->pokemonToday.nickname, gUnknown_030042E0.unk2A);
- show->pokemonToday.species = gUnknown_030042E0.unk28;
+ StringCopy(show->pokemonToday.nickname, gBattleResults.unk2A);
+ show->pokemonToday.species = gBattleResults.unk28;
sub_80BE138(show);
show->pokemonToday.language = GAME_LANGUAGE;
show->pokemonToday.language2 = sub_80BDEAC(show->pokemonToday.nickname);
@@ -638,8 +663,8 @@ void sub_80BE028(void) {
buffer->worldOfMasters.var00 = TVSHOW_WORLD_OF_MASTERS;
}
buffer->worldOfMasters.var02++;
- buffer->worldOfMasters.var04 = gUnknown_030042E0.unk28;
- buffer->worldOfMasters.var08 = gUnknown_030042E0.unk6;
+ buffer->worldOfMasters.var04 = gBattleResults.unk28;
+ buffer->worldOfMasters.var08 = gBattleResults.unk6;
buffer->worldOfMasters.var0a = gMapHeader.name;
}
@@ -656,7 +681,7 @@ void sub_80BE074(void) {
if (total > 0xff) {
total = 0xff;
}
- if (total > 2 && gUnknown_02024D26 == 1) {
+ if (total > 2 && gBattleOutcome == 1) {
gUnknown_03005D38.var0 = sub_80BF74C(gSaveBlock1.tvShows);
if (gUnknown_03005D38.var0 != -1 && sub_80BF1B4(TVSHOW_POKEMON_TODAY_FAILED) != 1) {
flag = FALSE;
@@ -664,10 +689,10 @@ void sub_80BE074(void) {
asm_comment("Here the wrong registers are used to hold the show ID and flag.");
show->pokemonTodayFailed.var00 = TVSHOW_POKEMON_TODAY_FAILED;
show->pokemonTodayFailed.var01 = flag;
- show->pokemonTodayFailed.species = gUnknown_030042E0.unk6;
- show->pokemonTodayFailed.species2 = gUnknown_030042E0.unk20;
+ show->pokemonTodayFailed.species = gBattleResults.unk6;
+ show->pokemonTodayFailed.species2 = gBattleResults.unk20;
show->pokemonTodayFailed.var10 = total;
- show->pokemonTodayFailed.var11 = gUnknown_02024D26;
+ show->pokemonTodayFailed.var11 = gBattleOutcome;
show->pokemonTodayFailed.var12 = gMapHeader.name;
StringCopy(show->pokemonTodayFailed.playerName, gSaveBlock2.playerName);
sub_80BE138(show);
@@ -706,7 +731,7 @@ _080BE088:\n\
_080BE0A2:\n\
cmp r5, 0x2\n\
bls _080BE112\n\
- ldr r7, _080BE120 @ =gUnknown_02024D26\n\
+ ldr r7, _080BE120 @ =gBattleOutcome\n\
ldrb r0, [r7]\n\
cmp r0, 0x1\n\
bne _080BE112\n\
@@ -738,7 +763,7 @@ _080BE0A2:\n\
movs r0, 0x17\n\
strb r0, [r4]\n\
strb r1, [r4, 0x1]\n\
- ldr r1, _080BE12C @ =gUnknown_030042E0\n\
+ ldr r1, _080BE12C @ =gBattleResults\n\
ldrh r0, [r1, 0x6]\n\
strh r0, [r4, 0xC]\n\
ldrh r0, [r1, 0x20]\n\
@@ -754,9 +779,13 @@ _080BE0A2:\n\
ldr r1, _080BE134 @ =gSaveBlock2\n\
bl StringCopy\n\
adds r0, r4, 0\n\
- bl sub_80BE138\n\
- movs r0, 2 @ GAME_LANGUAGE\n\
- strb r0, [r4, 0x2]\n\
+ bl sub_80BE138\n");
+#if ENGLISH
+ asm("movs r0, 2 @ GAME_LANGUAGE\n");
+#elif GERMAN
+ asm("movs r0, 5 @ GAME_LANGUAGE\n");
+#endif
+ asm("strb r0, [r4, 0x2]\n\
_080BE112:\n\
pop {r4-r7}\n\
pop {r0}\n\
@@ -764,10 +793,10 @@ _080BE112:\n\
.align 2, 0\n\
_080BE118: .4byte 0x0000ffff\n\
_080BE11C: .4byte gUnknown_03004316\n\
-_080BE120: .4byte gUnknown_02024D26\n\
+_080BE120: .4byte gBattleOutcome\n\
_080BE124: .4byte gSaveBlock1 + 0x2738\n\
_080BE128: .4byte gUnknown_03005D38\n\
-_080BE12C: .4byte gUnknown_030042E0\n\
+_080BE12C: .4byte gBattleResults\n\
_080BE130: .4byte gMapHeader\n\
_080BE134: .4byte gSaveBlock2\n\
.syntax divided\n");
@@ -1141,8 +1170,6 @@ void UpdateMassOutbreakTimeLeft(u16 arg0)
gSaveBlock1.outbreakUnk5 -= arg0;
}
-void sub_80BE9D4();
-
void sub_80BE97C(bool8 flag)
{
u8 var0, var1;
@@ -1241,15 +1268,6 @@ void sub_80BEA88(void)
}
}
-int sub_80BEBC8(struct UnknownSaveStruct2ABC *arg0);
-void sub_80BEC10(u8);
-void sub_80BF588(TVShow tvShows[]);
-void sub_80BF6D8(void);
-bool8 sub_80BF77C(u16);
-bool8 sub_80BEE48(u8);
-
-bool8 IsPriceDiscounted(u8);
-
void sub_80BEB20(void) {
u16 rval;
struct SaveBlock1 *save;
@@ -1453,16 +1471,16 @@ void sub_80BEF10(u8 strvaridx, u8 rank)
switch (rank)
{
case NORMAL_RANK:
- StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[NORMAL_RANK + 5]);
+ StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[NORMAL_RANK + 5].text);
break;
case SUPER_RANK:
- StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[SUPER_RANK + 5]);
+ StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[SUPER_RANK + 5].text);
break;
case HYPER_RANK:
- StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[HYPER_RANK + 5]);
+ StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[HYPER_RANK + 5].text);
break;
case MASTER_RANK:
- StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[MASTER_RANK + 5]);
+ StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[MASTER_RANK + 5].text);
break;
}
}
@@ -1472,19 +1490,19 @@ void CopyContestCategoryToStringVar(u8 strvaridx, u8 category)
switch (category)
{
case CONTEST_COOL:
- StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[CONTEST_COOL]);
+ StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[CONTEST_COOL].text);
break;
case CONTEST_BEAUTY:
- StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[CONTEST_BEAUTY]);
+ StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[CONTEST_BEAUTY].text);
break;
case CONTEST_CUTE:
- StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[CONTEST_CUTE]);
+ StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[CONTEST_CUTE].text);
break;
case CONTEST_SMART:
- StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[CONTEST_SMART]);
+ StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[CONTEST_SMART].text);
break;
case CONTEST_TOUGH:
- StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[CONTEST_TOUGH]);
+ StringCopy(gUnknown_083D1464[strvaridx], gUnknown_083CE048[CONTEST_TOUGH].text);
break;
}
}
@@ -1702,6 +1720,7 @@ void sub_80BF4BC(void)
}
}
+#if ENGLISH
u8 sub_80BF4F4(u8 arg0)
{
u32 species;
@@ -1717,6 +1736,31 @@ u8 sub_80BF4F4(u8 arg0)
return TRUE;
}
+#elif GERMAN
+u8 sub_80BF4F4(u8 arg0)
+{
+ u8 langData[4];
+ u32 species;
+
+ u8 *tmp;
+
+ GetMonData(&gPlayerParty[arg0], MON_DATA_NICKNAME, &gStringVar1);
+
+ tmp = langData;
+ tmp[0] = GetMonData(&gPlayerParty[arg0], MON_DATA_LANGUAGE, &langData);
+ if (tmp[0] != GAME_LANGUAGE) {
+ return TRUE;
+ }
+
+ species = GetMonData(&gPlayerParty[arg0], MON_DATA_SPECIES, NULL);
+
+ if (StringCompareWithoutExtCtrlCodes(gSpeciesNames[species], gStringVar1)) {
+ return TRUE;
+ }
+
+ return FALSE;
+}
+#endif
u8 sub_80BF544(void)
{
@@ -2158,10 +2202,6 @@ void sub_80BFD20(void)
RemoveFieldObjectByLocalIdAndMap(5, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup);
}
-extern u8 ewram[];
-#define gUnknown_02007000 (*(ewramStruct_02007000 *)(ewram + 0x7000))
-extern u8 gUnknown_020387E4;
-
typedef union ewramStruct_02007000 {
TVShow tvshows[4][25];
struct UnknownSaveStruct2ABC unknown_2abc[4][16];
@@ -2450,9 +2490,6 @@ s8 sub_80C019C(TVShow tvShows[]) {
return -1;
}
-void sub_80C03A8(u8 showidx);
-void sub_80C03C8(u16 species, u8 showidx);
-
#ifdef NONMATCHING
void sub_80C01D4(void)
{
@@ -2875,22 +2912,6 @@ void sub_80C05C4(struct UnknownSaveStruct2ABC a0[16], struct UnknownSaveStruct2A
}
}
-void DoTVShowPokemonFanClubLetter(void);
-void DoTVShowRecentHappenings(void);
-void DoTVShowPokemonFanClubOpinions(void);
-void nullsub_22(void);
-void DoTVShowPokemonNewsMassOutbreak(void);
-void DoTVShowBravoTrainerPokemonProfile(void);
-void DoTVShowBravoTrainerBattleTowerProfile(void);
-void DoTVShowPokemonTodaySuccessfulCapture(void);
-void DoTVShowTodaysSmartShopper(void);
-void DoTVShowTheNameRaterShow(void);
-void DoTVShowPokemonTodayFailedCapture(void);
-void DoTVShowPokemonAngler(void);
-void DoTVShowTheWorldOfMasters(void);
-
-bool8 sub_80C06E8(struct UnknownSaveStruct2ABC *arg0, struct UnknownSaveStruct2ABC *arg1, s8 arg2);
-
void sub_80C06BC(struct UnknownSaveStruct2ABC *arg0[16], struct UnknownSaveStruct2ABC *arg1[16]) {
struct UnknownSaveStruct2ABC *str0;
struct UnknownSaveStruct2ABC *str1;
@@ -3298,10 +3319,6 @@ void DoTVShowTodaysSmartShopper(void)
ShowFieldMessage(gTVSmartShopperTextGroup[switchval]);
}
-void TVShowConvertInternationalString(u8 *, u8 *, u8);
-
-void TakeTVShowInSearchOfTrainersOffTheAir(void);
-
void DoTVShowTheNameRaterShow(void) {
TVShow *tvShow;
u8 switchval;
diff --git a/src/unknown_debug_menu.c b/src/unknown_debug_menu.c
index bbaeef63a..6a8bad0d4 100644
--- a/src/unknown_debug_menu.c
+++ b/src/unknown_debug_menu.c
@@ -1,13 +1,13 @@
#include "global.h"
#include "menu.h"
-extern u8 gUnknown_02024D1E[];
+extern u8 gBattleCommunication[];
extern u8 (*gCallback_03004AE8)(void);
extern const struct MenuAction gUnknown_0842C29C[];
-u8 sub_814A464(void);
+static u8 sub_814A464(void);
int unref_sub_814A414(void)
{
@@ -19,7 +19,7 @@ int unref_sub_814A414(void)
return 0;
}
-u8 sub_814A464(void)
+static u8 sub_814A464(void)
{
s8 result = ProcessMenuInput();
if (result == -2)
@@ -33,7 +33,7 @@ u8 sub_814A464(void)
}
else
{
- gUnknown_02024D1E[0] = result;
+ gBattleCommunication[0] = result;
gCallback_03004AE8 = gUnknown_0842C29C[result].func;
return 0;
}
@@ -43,8 +43,8 @@ u8 sub_814A4B8(void)
{
gSaveBlock2.filler_A8.var_4AE = 3;
gSaveBlock2.filler_A8.var_4AF = 3;
- gSaveBlock2.filler_A8.var_4B4 = gUnknown_02024D1E[0] + 1;
- gSaveBlock2.filler_A8.var_4B6 = gUnknown_02024D1E[0] + 1;
+ gSaveBlock2.filler_A8.var_4B4 = gBattleCommunication[0] + 1;
+ gSaveBlock2.filler_A8.var_4B6 = gBattleCommunication[0] + 1;
gSaveBlock2.filler_A8.var_4B0 = 1;
gSaveBlock2.filler_A8.var_4B2 = 1;
CloseMenu();
diff --git a/src/unused_8124F94.c b/src/unused_8124F94.c
new file mode 100644
index 000000000..93b569058
--- /dev/null
+++ b/src/unused_8124F94.c
@@ -0,0 +1,126 @@
+#include "global.h"
+#include "decompress.h"
+#include "palette.h"
+
+struct UnknownStruct2
+{
+ void *src;
+ u8 unk4;
+ u8 unk5;
+ u8 unk6;
+ u16 unk8;
+};
+
+struct UnknownStruct3
+{
+ u16 *paletteSrc;
+ u8 unk4;
+ u8 paletteCount;
+};
+
+struct UnknownStruct1
+{
+ u8 paletteNum;
+ u8 unk1;
+ u16 unk2;
+ u8 *dest;
+ struct UnknownStruct3 unk8[16];
+ struct UnknownStruct2 unk88[32];
+};
+
+void unref_sub_8124F94(struct UnknownStruct1 *a)
+{
+ a->unk1 = 0;
+ a->paletteNum = 0;
+ a->unk2 = 0;
+ a->dest = (void *)VRAM;
+ DmaFill16(3, 0, a->unk8, sizeof(a->unk8));
+ DmaFill16(3, 0, a->unk88, sizeof(a->unk88));
+}
+
+u8 unref_sub_8124FD8(struct UnknownStruct1 *a, const struct UnknownStruct2 *b)
+{
+ while (1)
+ {
+ s32 r6;
+ s32 temp;
+
+ // Couldn't get it to match any other way
+ if (a->unk1 < 32 && b->src == NULL)
+ return 0;
+ if (a->unk1 >= 32)
+ break;
+
+ a->unk88[a->unk1].src = b->src;
+ a->unk88[a->unk1].unk6 = b->unk6;
+ a->unk88[a->unk1].unk4 = b->unk4;
+ a->unk88[a->unk1].unk5 = b->unk5;
+ r6 = b->unk4 * b->unk5;
+ if (a->unk2 + r6 > 0x400)
+ return 2;
+ if (b->unk8 == 0)
+ {
+ DmaCopy16(3, b->src, a->dest + a->unk2 * 64, r6 * 32);
+ }
+ else
+ {
+ sub_800D238(b->src, a->dest + a->unk2 * 64);
+ }
+ a->unk88[a->unk1].unk8 = a->unk2;
+ temp = r6 + a->unk2;
+ a->unk2 = temp;
+ a->unk1++;
+ b++;
+ }
+ return 1;
+}
+
+u8 unref_sub_81250A4(struct UnknownStruct1 *a, struct UnknownStruct3 *b)
+{
+ while (1)
+ {
+ // Couldn't get it to match any other way
+ if (a->paletteNum < 16 && b->paletteSrc == NULL)
+ return 0;
+ if (a->paletteNum >= 16)
+ break;
+
+ a->unk8[a->paletteNum].paletteSrc = b->paletteSrc;
+ a->unk8[a->paletteNum].unk4 = b->unk4;
+ if (b->paletteCount == 0)
+ {
+ LoadPalette(b->paletteSrc, a->paletteNum * 16, 32);
+ }
+ else
+ {
+ u16 palette[16];
+
+ sub_800D238(b->paletteSrc, palette);
+ LoadPalette(palette, a->paletteNum * 16, 32);
+ }
+ a->unk8[a->paletteNum].paletteCount = a->paletteNum;
+ a->paletteNum = a->paletteNum + 1;
+ b++;
+ }
+ return 1;
+}
+
+u8 unref_sub_8125118(struct UnknownStruct1 *a, struct UnknownStruct3 *b)
+{
+ u16 palettes[16][16] = {0};
+ u8 r7 = b->paletteCount;
+ u8 i;
+
+ sub_800D238(b->paletteSrc, palettes);
+ for (i = a->paletteNum; i < r7; i++)
+ {
+ if (a->paletteNum + i >= 16)
+ return 1;
+ a->unk8[i].paletteSrc = b->paletteSrc;
+ a->unk8[i].unk4 = b->unk4 + i;
+ a->unk8[i].paletteCount = a->paletteNum;
+ LoadPalette(palettes[i], a->paletteNum * 16, sizeof(palettes[i]));
+ a->paletteNum++;
+ }
+ return 0;
+}
diff --git a/src/util.c b/src/util.c
index 55608854c..c83fe8c8a 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1,5 +1,5 @@
#include "global.h"
-#include "sprite.h"
+#include "util.h"
extern const struct SpriteTemplate gInvisibleSpriteTemplate;
extern const u8 gSpriteDimensions[3][4][2];
diff --git a/src/wallclock.c b/src/wallclock.c
index d55d14edb..8db13dc2d 100644
--- a/src/wallclock.c
+++ b/src/wallclock.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "wallclock.h"
-#include "asm.h"
#include "decompress.h"
#include "main.h"
#include "menu.h"
@@ -11,12 +10,12 @@
#include "strings2.h"
#include "task.h"
#include "trig.h"
+#include "unknown_task.h"
extern u16 gSpecialVar_0x8004;
extern u8 gMiscClock_Gfx[];
extern u8 gUnknown_08E95774[];
extern u8 gUnknown_08E954B0[];
-extern const struct MenuAction gMenuYesNoItems[];
extern u16 gMiscClockMale_Pal[];
extern u16 gMiscClockFemale_Pal[];
@@ -25,7 +24,7 @@ extern u16 gMiscClockFemale_Pal[];
//--------------------------------------------------
static const u8 ClockGfx_Misc[] = INCBIN_U8("graphics/misc/clock_misc.4bpp.lz");
-static const struct SpriteSheet gUnknown_083F7A90[] =
+static const struct CompressedSpriteSheet gUnknown_083F7A90[] =
{
{ClockGfx_Misc, 0x2000, 0x1000},
{NULL},
diff --git a/src/wild_encounter.c b/src/wild_encounter.c
index 9dfcf0e5c..96f47c067 100644
--- a/src/wild_encounter.c
+++ b/src/wild_encounter.c
@@ -1,41 +1,19 @@
#include "global.h"
#include "wild_encounter.h"
#include "abilities.h"
-#include "asm.h"
#include "battle_setup.h"
#include "event_data.h"
#include "field_player_avatar.h"
+#include "fieldmap.h"
#include "metatile_behavior.h"
+#include "pokeblock.h"
#include "rng.h"
#include "roamer.h"
#include "rom4.h"
#include "safari_zone.h"
#include "script.h"
#include "species.h"
-
-struct WildPokemon
-{
- u8 minLevel;
- u8 maxLevel;
- u16 species;
-};
-
-struct WildPokemonInfo
-{
- u8 encounterRate;
- const struct WildPokemon *wildPokemon;
-};
-
-struct WildPokemonHeader
-{
- u8 mapGroup;
- u8 mapNum;
- struct WildPokemonInfo *landMonsInfo;
- struct WildPokemonInfo *waterMonsInfo;
- struct WildPokemonInfo *rockSmashMonsInfo;
- struct WildPokemonInfo *fishingMonsInfo;
-};
-
+#include "tv.h"
const struct WildPokemon PetalburgCity_WaterMons [] =
{
@@ -2921,9 +2899,6 @@ const struct WildPokemonInfo Underwater2_WaterMonsInfo = {4, Underwater2_WaterMo
extern u16 gRoute119WaterTileData[];
-extern struct WildPokemonHeader gWildMonHeaders[];
-extern struct Pokemon gEnemyParty[6];
-extern struct Pokemon gPlayerParty[6];
extern u16 gScriptResult;
extern struct WildPokemon gWildFeebasRoute119Data;
extern u8 Event_RepelWoreOff[];