sub_80BE320

This commit is contained in:
PikalaxALT 2017-05-20 19:03:22 -04:00
parent 63a7931958
commit 2bf7a71cd8
3 changed files with 40 additions and 79 deletions

View File

@ -1450,79 +1450,6 @@ _080BE318: .4byte gUnknown_02038694
_080BE31C: .4byte gPlayerParty
thumb_func_end sub_80BE284
thumb_func_start sub_80BE320
sub_80BE320: @ 80BE320
push {r4-r6,lr}
ldr r0, _080BE384 @ =gUnknown_03005D38
movs r1, 0
ldrsb r1, [r0, r1]
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
ldr r1, _080BE388 @ =gSaveBlock1 + 0x2738
adds r6, r0, r1
movs r0, 0x7
strb r0, [r6]
movs r0, 0x1
strb r0, [r6, 0x1]
adds r0, r6, 0x2
ldr r4, _080BE38C @ =gSaveBlock2
adds r1, r4, 0
bl StringCopy
adds r0, r6, 0
adds r0, 0xC
ldr r2, _080BE390 @ =0x00000484
adds r1, r4, r2
bl StringCopy
movs r1, 0x90
lsls r1, 3
adds r0, r4, r1
ldrh r0, [r0]
strh r0, [r6, 0xA]
ldr r2, _080BE394 @ =0x00000482
adds r0, r4, r2
ldrh r0, [r0]
strh r0, [r6, 0x14]
movs r0, 0xAF
lsls r0, 3
adds r5, r4, r0
ldrb r0, [r5]
bl sub_8135D3C
strh r0, [r6, 0x16]
ldr r1, _080BE398 @ =0x00000555
adds r4, r1
ldrb r0, [r4]
strb r0, [r6, 0x1C]
ldrb r0, [r5]
cmp r0, 0
bne _080BE39C
movs r0, 0x32
b _080BE39E
.align 2, 0
_080BE384: .4byte gUnknown_03005D38
_080BE388: .4byte gSaveBlock1 + 0x2738
_080BE38C: .4byte gSaveBlock2
_080BE390: .4byte 0x00000484
_080BE394: .4byte 0x00000482
_080BE398: .4byte 0x00000555
_080BE39C:
movs r0, 0x64
_080BE39E:
strb r0, [r6, 0x1A]
ldr r0, _080BE3B8 @ =gSpecialVar_0x8004
ldrh r0, [r0]
strb r0, [r6, 0x1B]
adds r0, r6, 0
bl sub_80BE160
movs r0, GAME_LANGUAGE
strb r0, [r6, 0x1D]
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_080BE3B8: .4byte gSpecialVar_0x8004
thumb_func_end sub_80BE320
.section .text_80BE8EC
thumb_func_start sub_80C04A0

View File

@ -346,10 +346,16 @@ struct TVShowBravoTrainerPokemonProfiles {
struct TVShowBravoTrainerBattleTowerSpotlight {
/*0x00*/ u8 var00;
/*0x01*/ u8 var01;
/*0x02*/ u8 pad02[8];
/*0x0A*/ u16 var0a;
/*0x0C*/ u8 pad0c[8];
/*0x14*/ u16 var14;
/*0x02*/ u8 trainerName[8];
/*0x0A*/ u16 species;
/*0x0C*/ u8 pokemonName[8];
/*0x14*/ u16 winningMove;
/*0x16*/ u16 var16;
/*0x18*/ u8 pad18[2];
/*0x1A*/ u8 btLevel;
/*0x1B*/ u8 var1b;
/*0x1C*/ u8 var1c;
/*0x1D*/ u8 language;
};
typedef union TVShow {
@ -577,7 +583,11 @@ struct Pokedex
struct SaveBlock2_Sub
{
/*0x0000, 0x00A8*/ u8 filler_000[0x4AE];
/*0x0000, 0x00A4*/ u8 filler_000[0x3D8];
/*0x03D8, 0x0480*/ u16 var_480;
/*0x03DA, 0x0482*/ u16 var_482;
/*0x03DC, 0x0484*/ u8 filler_3DC[0xD1];
/*0x04AD, 0x0555*/ u8 var_4AD;
/*0x04AE, 0x0556*/ u8 var_4AE;
/*0x04AF, 0x0557*/ u8 var_4AF;
/*0x04B0, 0x0558*/ u16 var_4B0;
@ -587,7 +597,9 @@ struct SaveBlock2_Sub
/*0x04B8, 0x0560*/ u8 filler_4B8[0x10];
/*0x04C8, 0x0570*/ u16 var_4C8;
/*0x04CA, 0x0572*/ u16 var_4CA;
/*0x04CC, 0x0574*/ u8 filler_4CC[0x31C];
/*0x04CC, 0x0574*/ u8 filler_4CC[4];
/*0x04D0, 0x0578*/ u8 var_4D0;
/*0x04D1, 0x0579*/ u8 filler_4D1[0x317];
};
struct SaveBlock2 /* 0x02024EA4 */

View File

@ -99,10 +99,32 @@ void ClearTVShowData(void)
extern void sub_80BE138(TVShow *);
bool8 sub_80BF1B4(u8);
void sub_80BF20C(void);
extern u16 sub_8135D3C(u8);
asm(".section .text_a");
s8 sub_80BF74C(TVShow tvShow[]);
void sub_80BE320(void) {
TVShow *show;
show = &gSaveBlock1.tvShows.shows[gUnknown_03005D38.var0];
show->bravoTrainerTower.var00 = TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE;
show->bravoTrainerTower.var01 = 1;
StringCopy(show->bravoTrainerTower.trainerName, gSaveBlock2.playerName);
StringCopy(show->bravoTrainerTower.pokemonName, gSaveBlock2.filler_A8.filler_3DC);
show->bravoTrainerTower.species = gSaveBlock2.filler_A8.var_480;
show->bravoTrainerTower.winningMove = gSaveBlock2.filler_A8.var_482;
show->bravoTrainerTower.var16 = sub_8135D3C(gSaveBlock2.filler_A8.var_4D0);
show->bravoTrainerTower.var1c = gSaveBlock2.filler_A8.var_4AD;
if (gSaveBlock2.filler_A8.var_4D0 == 0) {
show->bravoTrainerTower.btLevel = 50;
} else {
show->bravoTrainerTower.btLevel = 100;
}
show->bravoTrainerTower.var1b = gSpecialVar_0x8004;
sub_80BE160(show);
show->bravoTrainerTower.language = GAME_LANGUAGE;
}
void sub_80BE3BC(void) {
u8 rval;
TVShow *tvShow;