Give labels to healthbox gfx

This commit is contained in:
DizzyEggg 2018-09-20 21:42:38 +02:00
parent e4b7ba0977
commit bf64333299
10 changed files with 30 additions and 25 deletions

View File

@ -7327,8 +7327,8 @@ _081A36C2:
bx r1 bx r1
thumb_func_end sub_81A3610 thumb_func_end sub_81A3610
thumb_func_start sub_81A36D0 thumb_func_start CopyFrontierTrainerText
sub_81A36D0: @ 81A36D0 CopyFrontierTrainerText: @ 81A36D0
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@ -7561,7 +7561,7 @@ _081A38F8:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_81A36D0 thumb_func_end CopyFrontierTrainerText
thumb_func_start sub_81A3908 thumb_func_start sub_81A3908
sub_81A3908: @ 81A3908 sub_81A3908: @ 81A3908

View File

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 284 B

View File

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 293 B

View File

Before

Width:  |  Height:  |  Size: 297 B

After

Width:  |  Height:  |  Size: 297 B

View File

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 296 B

View File

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

View File

@ -1,6 +1,11 @@
#ifndef GUARD_BATTLE_FRONTIER_2_H #ifndef GUARD_BATTLE_FRONTIER_2_H
#define GUARD_BATTLE_FRONTIER_2_H #define GUARD_BATTLE_FRONTIER_2_H
#define FRONTIER_BEFORE_TEXT 0
#define FRONTIER_WIN_TEXT 1
#define FRONTIER_LOSE_TEXT 2
void CopyFrontierTrainerText(u8 whichText, u16 trainerId);
void sub_81A8934(u8); void sub_81A8934(u8);
void sub_81A895C(void); void sub_81A895C(void);
u16 sub_81A89A0(u8); u16 sub_81A89A0(u8);

View File

@ -47,11 +47,11 @@ extern const u32 gUnknown_08C093F0[];
extern const u32 gSubstituteDollTilemap[]; extern const u32 gSubstituteDollTilemap[];
extern const u32 gSubstituteDollGfx[]; extern const u32 gSubstituteDollGfx[];
extern const u16 gSubstituteDollPal[]; extern const u16 gSubstituteDollPal[];
extern const u8 gUnknown_08C1F1C8[]; extern const u8 gHealthboxSinglesPlayerGfx[];
extern const u8 gUnknown_08C1F46C[]; extern const u8 gHealthboxSinglesOpponentGfx[];
extern const u8 gUnknown_08C1F5E8[]; extern const u8 gHealthboxDoublesPlayerGfx[];
extern const u8 gUnknown_08C1F76C[]; extern const u8 gHealthboxDoublesOpponentGfx[];
extern const u8 gUnknown_08C1F8E8[]; extern const u8 gHealthboxSafariGfx[];
extern const u8 gBlankGfxCompressed[]; extern const u8 gBlankGfxCompressed[];
extern const u16 gBattleInterface_BallStatusBarPal[]; extern const u16 gBattleInterface_BallStatusBarPal[];
extern const u16 gBattleInterface_BallDisplayPal[]; extern const u16 gBattleInterface_BallDisplayPal[];
@ -72,29 +72,29 @@ static void ClearSpritesBattlerHealthboxAnimData(void);
// const rom data // const rom data
static const struct CompressedSpriteSheet sSpriteSheet_SinglesPlayerHealthbox = static const struct CompressedSpriteSheet sSpriteSheet_SinglesPlayerHealthbox =
{ {
gUnknown_08C1F1C8, 0x1000, TAG_HEALTHBOX_PLAYER1_TILE gHealthboxSinglesPlayerGfx, 0x1000, TAG_HEALTHBOX_PLAYER1_TILE
}; };
static const struct CompressedSpriteSheet sSpriteSheet_SinglesOpponentHealthbox = static const struct CompressedSpriteSheet sSpriteSheet_SinglesOpponentHealthbox =
{ {
gUnknown_08C1F46C, 0x1000, TAG_HEALTHBOX_OPPONENT1_TILE gHealthboxSinglesOpponentGfx, 0x1000, TAG_HEALTHBOX_OPPONENT1_TILE
}; };
static const struct CompressedSpriteSheet sSpriteSheets_DoublesPlayerHealthbox[2] = static const struct CompressedSpriteSheet sSpriteSheets_DoublesPlayerHealthbox[2] =
{ {
{gUnknown_08C1F5E8, 0x800, TAG_HEALTHBOX_PLAYER1_TILE}, {gHealthboxDoublesPlayerGfx, 0x800, TAG_HEALTHBOX_PLAYER1_TILE},
{gUnknown_08C1F5E8, 0x800, TAG_HEALTHBOX_PLAYER2_TILE} {gHealthboxDoublesPlayerGfx, 0x800, TAG_HEALTHBOX_PLAYER2_TILE}
}; };
static const struct CompressedSpriteSheet sSpriteSheets_DoublesOpponentHealthbox[2] = static const struct CompressedSpriteSheet sSpriteSheets_DoublesOpponentHealthbox[2] =
{ {
{gUnknown_08C1F76C, 0x800, TAG_HEALTHBOX_OPPONENT1_TILE}, {gHealthboxDoublesOpponentGfx, 0x800, TAG_HEALTHBOX_OPPONENT1_TILE},
{gUnknown_08C1F76C, 0x800, TAG_HEALTHBOX_OPPONENT2_TILE} {gHealthboxDoublesOpponentGfx, 0x800, TAG_HEALTHBOX_OPPONENT2_TILE}
}; };
static const struct CompressedSpriteSheet sSpriteSheet_SafariHealthbox = static const struct CompressedSpriteSheet sSpriteSheet_SafariHealthbox =
{ {
gUnknown_08C1F8E8, 0x1000, TAG_HEALTHBOX_SAFARI_TILE gHealthboxSafariGfx, 0x1000, TAG_HEALTHBOX_SAFARI_TILE
}; };
static const struct CompressedSpriteSheet sSpriteSheets_HealthBar[MAX_BATTLERS_COUNT] = static const struct CompressedSpriteSheet sSpriteSheets_HealthBar[MAX_BATTLERS_COUNT] =

View File

@ -17,6 +17,7 @@
#include "menu.h" #include "menu.h"
#include "recorded_battle.h" #include "recorded_battle.h"
#include "international_string_util.h" #include "international_string_util.h"
#include "battle_frontier_2.h"
struct BattleWindowText struct BattleWindowText
{ {
@ -51,7 +52,6 @@ extern u8 GetEreaderTrainerClassId(void); // battle_tower
extern void CopyFrontierBrainTrainerName(u8 *txtPtr); // battle_frontier_2 extern void CopyFrontierBrainTrainerName(u8 *txtPtr); // battle_frontier_2
extern void sub_81D5554(u8 *txtPtr, u16 trainerId); // pokenav extern void sub_81D5554(u8 *txtPtr, u16 trainerId); // pokenav
extern void GetEreaderTrainerName(u8 *txtPtr); extern void GetEreaderTrainerName(u8 *txtPtr);
extern void sub_81A36D0(u8 arg0, u16 trainerId); // battle_frontier_2
extern void sub_81D572C(u8 arg0, u16 trainerId); // pokenav extern void sub_81D572C(u8 arg0, u16 trainerId); // pokenav
extern void GetFrontierTrainerName(u8 *dst, u16 trainerId); extern void GetFrontierTrainerName(u8 *dst, u16 trainerId);
@ -2582,7 +2582,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
case B_TXT_TRAINER1_LOSE_TEXT: // trainerA lose text case B_TXT_TRAINER1_LOSE_TEXT: // trainerA lose text
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
{ {
sub_81A36D0(2, gTrainerBattleOpponent_A); CopyFrontierTrainerText(FRONTIER_LOSE_TEXT, gTrainerBattleOpponent_A);
toCpy = gStringVar4; toCpy = gStringVar4;
} }
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
@ -2598,7 +2598,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
case B_TXT_TRAINER1_WIN_TEXT: // trainerA win text case B_TXT_TRAINER1_WIN_TEXT: // trainerA win text
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
{ {
sub_81A36D0(1, gTrainerBattleOpponent_A); CopyFrontierTrainerText(FRONTIER_WIN_TEXT, gTrainerBattleOpponent_A);
toCpy = gStringVar4; toCpy = gStringVar4;
} }
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
@ -2679,7 +2679,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
case B_TXT_TRAINER2_LOSE_TEXT: case B_TXT_TRAINER2_LOSE_TEXT:
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
{ {
sub_81A36D0(2, gTrainerBattleOpponent_B); CopyFrontierTrainerText(FRONTIER_LOSE_TEXT, gTrainerBattleOpponent_B);
toCpy = gStringVar4; toCpy = gStringVar4;
} }
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
@ -2695,7 +2695,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
case B_TXT_TRAINER2_WIN_TEXT: case B_TXT_TRAINER2_WIN_TEXT:
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
{ {
sub_81A36D0(1, gTrainerBattleOpponent_B); CopyFrontierTrainerText(FRONTIER_WIN_TEXT, gTrainerBattleOpponent_B);
toCpy = gStringVar4; toCpy = gStringVar4;
} }
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)

View File

@ -643,11 +643,11 @@ const u8 gBattleAnimSpritePalette_187[] = INCBIN_U8("graphics/battle_anims/sprit
const u8 gBattleAnimSpriteSheet_186[] = INCBIN_U8("graphics/battle_anims/sprites/186.4bpp.lz"); const u8 gBattleAnimSpriteSheet_186[] = INCBIN_U8("graphics/battle_anims/sprites/186.4bpp.lz");
const u8 gBattleAnimSpritePalette_186[] = INCBIN_U8("graphics/battle_anims/sprites/186.gbapal.lz"); const u8 gBattleAnimSpritePalette_186[] = INCBIN_U8("graphics/battle_anims/sprites/186.gbapal.lz");
const u8 gUnknown_08C1F1C8[] = INCBIN_U8("graphics/battle_interface/window.4bpp.lz"); const u8 gHealthboxSinglesPlayerGfx[] = INCBIN_U8("graphics/battle_interface/healthbox_singles_player.4bpp.lz");
const u8 gUnknown_08C1F46C[] = INCBIN_U8("graphics/battle_interface/window2.4bpp.lz"); const u8 gHealthboxSinglesOpponentGfx[] = INCBIN_U8("graphics/battle_interface/healthbox_singles_opponent.4bpp.lz");
const u8 gUnknown_08C1F5E8[] = INCBIN_U8( "graphics/battle_interface/window3.4bpp.lz"); const u8 gHealthboxDoublesPlayerGfx[] = INCBIN_U8( "graphics/battle_interface/healthbox_doubles_player.4bpp.lz");
const u8 gUnknown_08C1F76C[] = INCBIN_U8("graphics/battle_interface/window4.4bpp.lz"); const u8 gHealthboxDoublesOpponentGfx[] = INCBIN_U8("graphics/battle_interface/healthbox_doubles_opponent.4bpp.lz");
const u8 gUnknown_08C1F8E8[] = INCBIN_U8("graphics/battle_interface/window5.4bpp.lz"); const u8 gHealthboxSafariGfx[] = INCBIN_U8("graphics/battle_interface/healthbox_safari.4bpp.lz");
const u8 gUnusedGfx_Shadow[] = INCBIN_U8("graphics/unused/shadow.4bpp.lz"); const u8 gUnusedGfx_Shadow[] = INCBIN_U8("graphics/unused/shadow.4bpp.lz");
const u8 gUnusedPal_Shadow[] = INCBIN_U8("graphics/unused/shadow.gbapal.lz"); const u8 gUnusedPal_Shadow[] = INCBIN_U8("graphics/unused/shadow.gbapal.lz");