Skip to content

Commit

Permalink
battle_main remaining funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangzhengwenjz committed Oct 18, 2019
1 parent 88ad62c commit a28bb81
Show file tree
Hide file tree
Showing 15 changed files with 705 additions and 2,579 deletions.
2,542 changes: 0 additions & 2,542 deletions asm/battle_2.s

This file was deleted.

8 changes: 4 additions & 4 deletions asm/evolution_scene.s
Original file line number Diff line number Diff line change
Expand Up @@ -1962,14 +1962,14 @@ _080CEEA0:
bl Free
str r6, [r4]
bl FreeAllWindowBuffers
ldr r0, _080CEECC @ =gUnknown_300537C
ldr r0, _080CEECC @ =gCB2_AfterEvolution
ldr r0, [r0]
bl SetMainCallback2
b _080CF528
.align 2, 0
_080CEEC4: .4byte gPaletteFade
_080CEEC8: .4byte gUnknown_2039A20
_080CEECC: .4byte gUnknown_300537C
_080CEECC: .4byte gCB2_AfterEvolution
_080CEED0:
ldr r0, _080CEF04 @ =gBattleCommunication
ldrb r1, [r0, 0x2]
Expand Down Expand Up @@ -3252,14 +3252,14 @@ _080CF9E0:
negs r0, r0
ands r0, r1
strb r0, [r2]
ldr r0, _080CFA10 @ =gUnknown_300537C
ldr r0, _080CFA10 @ =gCB2_AfterEvolution
ldr r0, [r0]
bl SetMainCallback2
b _080D003A
.align 2, 0
_080CFA08: .4byte gUnknown_2039A20
_080CFA0C: .4byte gTextFlags
_080CFA10: .4byte gUnknown_300537C
_080CFA10: .4byte gCB2_AfterEvolution
_080CFA14:
ldr r0, _080CFA60 @ =gBattleCommunication
ldrb r1, [r0, 0x2]
Expand Down
8 changes: 4 additions & 4 deletions asm/party_menu.s
Original file line number Diff line number Diff line change
Expand Up @@ -15699,7 +15699,7 @@ sub_8126704: @ 8126704
cmp r4, 0
beq _08126754
bl sub_811F070
ldr r0, _08126750 @ =gUnknown_300537C
ldr r0, _08126750 @ =gCB2_AfterEvolution
ldr r1, [r6]
str r1, [r0]
ldrb r3, [r6, 0x9]
Expand All @@ -15713,7 +15713,7 @@ sub_8126704: @ 8126704
.align 2, 0
_08126748: .4byte gUnknown_203B0A0
_0812674C: .4byte gPlayerParty
_08126750: .4byte gUnknown_300537C
_08126750: .4byte gCB2_AfterEvolution
_08126754:
ldr r0, _08126768 @ =gTasks
lsls r1, r5, 2
Expand Down Expand Up @@ -16248,7 +16248,7 @@ _08126BCE:
thumb_func_start sub_8126BD4
sub_8126BD4: @ 8126BD4
push {r4,r5,lr}
ldr r1, _08126C10 @ =gUnknown_300537C
ldr r1, _08126C10 @ =gCB2_AfterEvolution
ldr r4, _08126C14 @ =gUnknown_203B0A0
ldr r0, [r4]
str r0, [r1]
Expand All @@ -16274,7 +16274,7 @@ sub_8126BD4: @ 8126BD4
pop {r0}
bx r0
.align 2, 0
_08126C10: .4byte gUnknown_300537C
_08126C10: .4byte gCB2_AfterEvolution
_08126C14: .4byte gUnknown_203B0A0
_08126C18: .4byte gSpecialVar_ItemId
_08126C1C: .4byte gPlayerParty
Expand Down
12 changes: 6 additions & 6 deletions asm/trade.s
Original file line number Diff line number Diff line change
Expand Up @@ -11052,7 +11052,7 @@ _0805223C:
ldrb r0, [r0]
movs r1, 0
bl sub_805080C
ldr r1, _08052284 @ =gUnknown_300537C
ldr r1, _08052284 @ =gCB2_AfterEvolution
ldr r0, _08052288 @ =sub_8050948
str r0, [r1]
ldr r7, _0805228C @ =gUnknown_2031DA4
Expand Down Expand Up @@ -11081,7 +11081,7 @@ _0805223C:
b _080522A8
.align 2, 0
_08052280: .4byte gSpecialVar_0x8005
_08052284: .4byte gUnknown_300537C
_08052284: .4byte gCB2_AfterEvolution
_08052288: .4byte sub_8050948
_0805228C: .4byte gUnknown_2031DA4
_08052290: .4byte gPlayerParty
Expand Down Expand Up @@ -13277,7 +13277,7 @@ _08053698:
ldrb r0, [r0]
movs r1, 0
bl sub_805080C
ldr r1, _080536E0 @ =gUnknown_300537C
ldr r1, _080536E0 @ =gCB2_AfterEvolution
ldr r0, _080536E4 @ =sub_8050948
str r0, [r1]
ldr r7, _080536E8 @ =gUnknown_2031DA4
Expand Down Expand Up @@ -13306,7 +13306,7 @@ _08053698:
b _08053704
.align 2, 0
_080536DC: .4byte gSpecialVar_0x8005
_080536E0: .4byte gUnknown_300537C
_080536E0: .4byte gCB2_AfterEvolution
_080536E4: .4byte sub_8050948
_080536E8: .4byte gUnknown_2031DA4
_080536EC: .4byte gPlayerParty
Expand Down Expand Up @@ -13404,7 +13404,7 @@ _080537A8:
.align 2, 0
_080537B4: .4byte gSoftResetDisabled
_080537B8:
ldr r0, _080537F4 @ =gUnknown_300537C
ldr r0, _080537F4 @ =gCB2_AfterEvolution
ldr r1, _080537F8 @ =sub_8053E8C
mov r8, r1
str r1, [r0]
Expand Down Expand Up @@ -13433,7 +13433,7 @@ _080537B8:
bl TradeEvolutionScene
b _0805380E
.align 2, 0
_080537F4: .4byte gUnknown_300537C
_080537F4: .4byte gCB2_AfterEvolution
_080537F8: .4byte sub_8053E8C
_080537FC: .4byte gUnknown_2031DA4
_08053800: .4byte gPlayerParty
Expand Down
4 changes: 2 additions & 2 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ BattleScript_WildMonFled:: @ 81D891D
BattleScript_PrintCantRunFromTrainer:: @ 81D8924
.incbin "baserom.gba", 0x1D8924, 0x16

gUnknown_81D893A:: @ 81D893A
BattleScript_PrintFailedToRunString:: @ 81D893A
.incbin "baserom.gba", 0x1D893A, 0x9

BattleScript_PrintCantEscapeFromBattle:: @ 81D8943
Expand All @@ -81,7 +81,7 @@ BattleScript_PrintCantEscapeFromBattle:: @ 81D8943
BattleScript_PrintFullBox:: @ 81D8949
.incbin "baserom.gba", 0x1D8949, 0x4

gUnknown_81D894D:: @ 81D894D
BattleScript_ActionSwitch:: @ 81D894D
.incbin "baserom.gba", 0x1D894D, 0xA4

BattleScript_Pausex20:: @ 81D89F1
Expand Down
4 changes: 2 additions & 2 deletions data/battle_scripts_2.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
gBattlescriptsForBallThrow:: @ 81D99B0
.incbin "baserom.gba", 0x1D99B0, 0x34

gUnknown_81D99E4:: @ 81D99E4
gBattlescriptsForUsingItem:: @ 81D99E4
.incbin "baserom.gba", 0x1D99E4, 0x18

gUnknown_81D99FC:: @ 81D99FC
gBattlescriptsForRunningByItem:: @ 81D99FC
.incbin "baserom.gba", 0x1D99FC, 0x8

gBattlescriptsForSafariActions:: @ 81D9A04
Expand Down
6 changes: 6 additions & 0 deletions include/battle_scripts.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,10 @@ extern const u8 gUnknown_81D9A88[];
extern const u8 gUnknown_81D91A1[]; // knizz: silph scope unveil
extern const u8 gUnknown_81D88D7[];

extern const u8 *const gBattleScriptsForMoveEffects[];
extern const u8 *const gBattlescriptsForBallThrow[];
extern const u8 *const gBattlescriptsForRunningByItem[];
extern const u8 *const gBattlescriptsForUsingItem[];
extern const u8 *const gBattlescriptsForSafariActions[];

#endif // GUARD_BATTLE_SCRIPTS_H
4 changes: 2 additions & 2 deletions include/evolution_scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include "global.h"

void BeginEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
void BeginEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8, u8 partyID);
void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8, u8 partyID);
void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpriteID, u8 partyID);

extern void (*gCB2_AfterEvolution)(void);
Expand Down
4 changes: 2 additions & 2 deletions include/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,10 @@ u8 GetTrainerEncounterMusicId(u16 trainer);
void AdjustFriendship(struct Pokemon *mon, u8 event);
void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies);
u16 GetMonEVCount(struct Pokemon *mon);
void sub_8043A68(void);
void RandomlyGivePartyPokerus(struct Pokemon *party);
u8 CheckPartyPokerus(struct Pokemon *party, u8 selection);
u8 CheckPartyHasHadPokerus(struct Pokemon *party, u8 selection);
void sub_8043B40(void);
void PartySpreadPokerus(struct Pokemon *party);
bool8 TryIncrementMonLevel(struct Pokemon *mon);
u32 CanMonLearnTMHM(struct Pokemon *mon, u8 tm);
u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves);
Expand Down
4 changes: 2 additions & 2 deletions include/quest_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ struct UnkStruct_3005E90
u8 unk_2;
};

extern u8 gUnknown_203ADFA;
extern u8 gUnknown_3005E88;
extern u16 gUnknown_3005E8C;
extern struct UnkStruct_3005E90 gUnknown_3005E90;
Expand Down Expand Up @@ -41,7 +42,6 @@ void sub_8112364(void);
u8 sub_8112CAC(void);
void sub_81138F8(void);
void sub_812C224(void);

extern u8 gUnknown_203ADFA;
void sub_812BFDC(void);

#endif //GUARD_QUEST_LOG_H
1 change: 1 addition & 0 deletions include/vs_seeker.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ int sub_810CE64(u16 a0);
bool8 sub_810CF04(u8 a0);
u8 sub_810CF54();
void sub_810D0D0(void);
void sub_810CB90(void);

#endif //GUARD_VS_SEEKER_H
1 change: 0 additions & 1 deletion ld_script.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ SECTIONS {
src/decompress.o(.text);
asm/battle_1.o(.text);
src/battle_main.o(.text);
asm/battle_2.o(.text);
src/battle_util.o(.text);
src/battle_script_commands.o(.text);
src/battle_util2.o(.text);
Expand Down
Loading

0 comments on commit a28bb81

Please sign in to comment.