mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
decompile battle 3
This commit is contained in:
parent
c7592bc87c
commit
75595f9b3d
3047
asm/battle_3.s
3047
asm/battle_3.s
File diff suppressed because it is too large
Load Diff
@ -132,7 +132,7 @@ _08046108:
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _08046160
|
||||
bl sub_8045CBC
|
||||
bl IsPokeDisobedient
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
cmp r2, 0
|
||||
|
@ -453,64 +453,64 @@ gUnknown_082DB6F0:: @ 82DB6F0
|
||||
gUnknown_082DB6FB:: @ 82DB6FB
|
||||
.incbin "baserom.gba", 0x2db6fb, 0xb
|
||||
|
||||
gUnknown_082DB706:: @ 82DB706
|
||||
BattleScript_BerryCurePrlzEnd2:: @ 82DB706
|
||||
.incbin "baserom.gba", 0x2db706, 0x6
|
||||
|
||||
gUnknown_082DB70C:: @ 82DB70C
|
||||
BattleScript_BerryCureParRet:: @ 82DB70C
|
||||
.incbin "baserom.gba", 0x2db70c, 0x12
|
||||
|
||||
gUnknown_082DB71E:: @ 82DB71E
|
||||
BattleScript_BerryCurePsnEnd2:: @ 82DB71E
|
||||
.incbin "baserom.gba", 0x2db71e, 0x6
|
||||
|
||||
gUnknown_082DB724:: @ 82DB724
|
||||
BattleScript_BerryCurePsnRet:: @ 82DB724
|
||||
.incbin "baserom.gba", 0x2db724, 0x12
|
||||
|
||||
gUnknown_082DB736:: @ 82DB736
|
||||
BattleScript_BerryCureBrnEnd2:: @ 82DB736
|
||||
.incbin "baserom.gba", 0x2db736, 0x6
|
||||
|
||||
gUnknown_082DB73C:: @ 82DB73C
|
||||
BattleScript_BerryCureBrnRet:: @ 82DB73C
|
||||
.incbin "baserom.gba", 0x2db73c, 0x12
|
||||
|
||||
gUnknown_082DB74E:: @ 82DB74E
|
||||
BattleScript_BerryCureFrzEnd2:: @ 82DB74E
|
||||
.incbin "baserom.gba", 0x2db74e, 0x6
|
||||
|
||||
gUnknown_082DB754:: @ 82DB754
|
||||
BattleScript_BerryCureFrzRet:: @ 82DB754
|
||||
.incbin "baserom.gba", 0x2db754, 0x12
|
||||
|
||||
gUnknown_082DB766:: @ 82DB766
|
||||
BattleScript_BerryCureSlpEnd2:: @ 82DB766
|
||||
.incbin "baserom.gba", 0x2db766, 0x6
|
||||
|
||||
gUnknown_082DB76C:: @ 82DB76C
|
||||
BattleScript_BerryCureSlpRet:: @ 82DB76C
|
||||
.incbin "baserom.gba", 0x2db76c, 0x12
|
||||
|
||||
gUnknown_082DB77E:: @ 82DB77E
|
||||
BattleScript_BerryCureConfusionEnd2:: @ 82DB77E
|
||||
.incbin "baserom.gba", 0x2db77e, 0x6
|
||||
|
||||
gUnknown_082DB784:: @ 82DB784
|
||||
BattleScript_BerryCureConfusionRet:: @ 82DB784
|
||||
.incbin "baserom.gba", 0x2db784, 0x10
|
||||
|
||||
gUnknown_082DB794:: @ 82DB794
|
||||
BattleScript_BerryCureChosenStatusEnd2:: @ 82DB794
|
||||
.incbin "baserom.gba", 0x2db794, 0x6
|
||||
|
||||
gUnknown_082DB79A:: @ 82DB79A
|
||||
BattleScript_BerryCureChosenStatusRet:: @ 82DB79A
|
||||
.incbin "baserom.gba", 0x2db79a, 0x14
|
||||
|
||||
gUnknown_082DB7AE:: @ 82DB7AE
|
||||
BattleScript_WhiteHerbEnd2:: @ 82DB7AE
|
||||
.incbin "baserom.gba", 0x2db7ae, 0x6
|
||||
|
||||
gUnknown_082DB7B4:: @ 82DB7B4
|
||||
BattleScript_WhiteHerbRet:: @ 82DB7B4
|
||||
.incbin "baserom.gba", 0x2db7b4, 0x10
|
||||
|
||||
gUnknown_082DB7C4:: @ 82DB7C4
|
||||
BattleScript_ItemHealHP_RemoveItem:: @ 82DB7C4
|
||||
.incbin "baserom.gba", 0x2db7c4, 0x1d
|
||||
|
||||
gUnknown_082DB7E1:: @ 82DB7E1
|
||||
BattleScript_BerryPPHealEnd2:: @ 82DB7E1
|
||||
.incbin "baserom.gba", 0x2db7e1, 0x10
|
||||
|
||||
gUnknown_082DB7F1:: @ 82DB7F1
|
||||
BattleScript_ItemHealHP_End2:: @ 82DB7F1
|
||||
.incbin "baserom.gba", 0x2db7f1, 0x6
|
||||
|
||||
gUnknown_082DB7F7:: @ 82DB7F7
|
||||
BattleScript_ItemHealHP_Ret:: @ 82DB7F7
|
||||
.incbin "baserom.gba", 0x2db7f7, 0x1b
|
||||
|
||||
gUnknown_082DB812:: @ 82DB812
|
||||
@ -519,13 +519,13 @@ gUnknown_082DB812:: @ 82DB812
|
||||
gUnknown_082DB816:: @ 82DB816
|
||||
.incbin "baserom.gba", 0x2db816, 0xe
|
||||
|
||||
gUnknown_082DB824:: @ 82DB824
|
||||
BattleScript_BerryConfuseHealEnd2:: @ 82DB824
|
||||
.incbin "baserom.gba", 0x2db824, 0x2a
|
||||
|
||||
gUnknown_082DB84E:: @ 82DB84E
|
||||
BattleScript_BerryStatRaiseEnd2:: @ 82DB84E
|
||||
.incbin "baserom.gba", 0x2db84e, 0x1b
|
||||
|
||||
gUnknown_082DB869:: @ 82DB869
|
||||
BattleScript_BerryFocusEnergyEnd2:: @ 82DB869
|
||||
.incbin "baserom.gba", 0x2db869, 0x10
|
||||
|
||||
gUnknown_082DB879:: @ 82DB879
|
||||
|
@ -399,12 +399,18 @@ struct BattleScriptsStack
|
||||
u8 size;
|
||||
};
|
||||
|
||||
struct BattleCallbacksStack
|
||||
{
|
||||
void (*function[8])(void);
|
||||
u8 size;
|
||||
};
|
||||
|
||||
struct BattleResources
|
||||
{
|
||||
struct SecretBaseRecord* secretBase;
|
||||
struct UnknownFlags *flags;
|
||||
struct BattleScriptsStack* battleScriptsStack;
|
||||
void* battleCallbackStack;
|
||||
struct BattleCallbacksStack* battleCallbackStack;
|
||||
void* statsBeforeLvlUp;
|
||||
struct AI_ThinkingStruct *ai;
|
||||
struct BattleHistory *battleHistory;
|
||||
@ -414,6 +420,7 @@ struct BattleResources
|
||||
extern struct BattleResources* gBattleResources;
|
||||
|
||||
#define BATTLESCRIPTS_STACK (gBattleResources->battleScriptsStack)
|
||||
#define BATTLE_CALLBACKS_STACK (gBattleResources->battleCallbackStack)
|
||||
|
||||
struct BattleResults
|
||||
{
|
||||
@ -506,7 +513,7 @@ struct BattleStruct
|
||||
u8 field_47;
|
||||
u8 field_48;
|
||||
u8 field_49;
|
||||
u8 field_4A;
|
||||
u8 moneyMultiplier;
|
||||
u8 field_4B;
|
||||
u8 field_4C;
|
||||
u8 field_4D;
|
||||
@ -622,6 +629,13 @@ struct BattleStruct
|
||||
|
||||
extern struct BattleStruct* gBattleStruct;
|
||||
|
||||
#define MEME_ACCESS_U8(structName, structPtr, arrayId, offsetField, value) \
|
||||
{ \
|
||||
u8* var2 = (u8*)((u32)(arrayId)); \
|
||||
var2 = (u32)(structPtr) + var2; \
|
||||
var2[offsetof(struct structName, offsetField)] = value; \
|
||||
}
|
||||
|
||||
struct BattleScripting
|
||||
{
|
||||
u8 field_0;
|
||||
@ -645,6 +659,9 @@ struct BattleScripting
|
||||
u8 field_15;
|
||||
u8 field_16;
|
||||
u8 bank;
|
||||
u8 field_18;
|
||||
u8 field_19;
|
||||
u8 statChanger;
|
||||
};
|
||||
|
||||
extern struct BattleScripting gBattleScripting;
|
||||
|
@ -59,7 +59,6 @@ SECTIONS {
|
||||
asm/rom_8034C54.o(.text);
|
||||
asm/battle_2.o(.text);
|
||||
src/battle_3.o(.text);
|
||||
asm/battle_3.o(.text);
|
||||
src/battle_4.o(.text);
|
||||
asm/battle_4.o(.text);
|
||||
asm/battle_5.o(.text);
|
||||
|
1006
src/battle_3.c
1006
src/battle_3.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user