mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
start opponent controller, thx bird
This commit is contained in:
parent
a9bc67dbb0
commit
fa36e23683
File diff suppressed because it is too large
Load Diff
@ -1340,7 +1340,7 @@ GetFrontierTrainerFrontSpriteId: @ 8162AA0
|
||||
lsls r0, 1
|
||||
cmp r4, r0
|
||||
bne _08162AD0
|
||||
ldr r1, =gUnknown_0831F578
|
||||
ldr r1, =gTrainerClassToFrontPicId
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r2, =0x00000bed
|
||||
@ -1362,7 +1362,7 @@ _08162AE4:
|
||||
ldr r0, =0x0000012b
|
||||
cmp r4, r0
|
||||
bhi _08162B08
|
||||
ldr r2, =gUnknown_0831F578
|
||||
ldr r2, =gTrainerClassToFrontPicId
|
||||
ldr r0, =gUnknown_0203BC88
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x34
|
||||
@ -1383,7 +1383,7 @@ _08162B08:
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _08162B38
|
||||
ldr r4, =gUnknown_0831F578
|
||||
ldr r4, =gTrainerClassToFrontPicId
|
||||
bl sub_818649C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
@ -1391,7 +1391,7 @@ _08162B08:
|
||||
b _08162BC8
|
||||
.pool
|
||||
_08162B38:
|
||||
ldr r3, =gUnknown_0831F578
|
||||
ldr r3, =gTrainerClassToFrontPicId
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0xfffffed4
|
||||
@ -1413,7 +1413,7 @@ _08162B64:
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _08162BB0
|
||||
ldr r4, =gUnknown_0831F578
|
||||
ldr r4, =gTrainerClassToFrontPicId
|
||||
ldr r3, =gUnknown_08610970
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r1, [r0]
|
||||
@ -1436,7 +1436,7 @@ _08162B64:
|
||||
b _08162BC8
|
||||
.pool
|
||||
_08162BB0:
|
||||
ldr r5, =gUnknown_0831F578
|
||||
ldr r5, =gTrainerClassToFrontPicId
|
||||
ldr r4, =gUnknown_08610970
|
||||
bl sub_81864A8
|
||||
lsls r0, 24
|
||||
@ -5843,9 +5843,9 @@ _08165206:
|
||||
.pool
|
||||
thumb_func_end sub_816515C
|
||||
|
||||
thumb_func_start sub_8165244
|
||||
sub_8165244: @ 8165244
|
||||
ldr r1, =gUnknown_0831F578
|
||||
thumb_func_start GetEreaderTrainerFrontSpriteId
|
||||
GetEreaderTrainerFrontSpriteId: @ 8165244
|
||||
ldr r1, =gTrainerClassToFrontPicId
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r2, =0x00000bed
|
||||
@ -5855,7 +5855,7 @@ sub_8165244: @ 8165244
|
||||
ldrb r0, [r0]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_8165244
|
||||
thumb_func_end GetEreaderTrainerFrontSpriteId
|
||||
|
||||
thumb_func_start GetEreaderTrainerClassId
|
||||
GetEreaderTrainerClassId: @ 8165264
|
||||
|
@ -7890,7 +7890,7 @@ _081CAF34:
|
||||
adds r0, r5, 0
|
||||
bl sub_81D1BD0
|
||||
adds r4, r0, 0
|
||||
ldr r0, =gUnknown_0831F578
|
||||
ldr r0, =gTrainerClassToFrontPicId
|
||||
adds r0, r4, r0
|
||||
ldrb r0, [r0]
|
||||
b _081CAF6C
|
||||
@ -28947,7 +28947,7 @@ sub_81D5588: @ 81D5588
|
||||
adds r3, r0
|
||||
ldrb r4, [r3, 0x1B]
|
||||
bl sub_81D5710
|
||||
ldr r0, =gUnknown_0831F578
|
||||
ldr r0, =gTrainerClassToFrontPicId
|
||||
adds r4, r0
|
||||
ldrb r0, [r4]
|
||||
pop {r4}
|
||||
|
@ -1,5 +1,5 @@
|
||||
.align 2
|
||||
gUnknown_0831F578:: @ 831F578
|
||||
gTrainerClassToFrontPicId:: @ 831F578
|
||||
.byte TRAINER_PIC_HIKER
|
||||
.byte TRAINER_PIC_AQUA_GRUNT_M
|
||||
.byte TRAINER_PIC_POKEMON_BREEDER_F
|
||||
|
@ -647,6 +647,7 @@ u8 GetDefaultMoveTarget(u8 atkBank);
|
||||
u16 PlayerGenderToFrontTrainerPicId(u8 playerGender);
|
||||
void sub_806A1C0(u16 arg0, u8 bankIdentity);
|
||||
void sub_806A12C(u16 trainerSpriteId, u8 bankIdentity);
|
||||
u8 GetSecretBaseTrainerPicIndex(void);
|
||||
|
||||
#include "sprite.h"
|
||||
|
||||
|
@ -55,9 +55,8 @@ extern u16 gTrainerBattleOpponent_A;
|
||||
extern u16 gTrainerBattleOpponent_B;
|
||||
|
||||
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
|
||||
extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[];
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u8 gUnknown_0831F578[];
|
||||
extern const u8 gTrainerClassToFrontPicId[];
|
||||
|
||||
extern void sub_8172EF0(u8 bank, struct Pokemon *mon);
|
||||
extern void sub_806A068(u16, u8);
|
||||
@ -1291,17 +1290,17 @@ static void LinkOpponentHandleDrawTrainerPic(void)
|
||||
|| (gLinkPlayers[GetBankMultiplayerId(gActiveBank)].version & 0xFF) == VERSION_LEAF_GREEN)
|
||||
{
|
||||
if (gLinkPlayers[GetBankMultiplayerId(gActiveBank)].gender != 0)
|
||||
trainerPicId = gUnknown_0831F578[0x4F];
|
||||
trainerPicId = gTrainerClassToFrontPicId[0x4F];
|
||||
else
|
||||
trainerPicId = gUnknown_0831F578[0x4E];
|
||||
trainerPicId = gTrainerClassToFrontPicId[0x4E];
|
||||
}
|
||||
else if ((gLinkPlayers[GetBankMultiplayerId(gActiveBank)].version & 0xFF) == VERSION_RUBY
|
||||
|| (gLinkPlayers[GetBankMultiplayerId(gActiveBank)].version & 0xFF) == VERSION_SAPPHIRE)
|
||||
{
|
||||
if (gLinkPlayers[GetBankMultiplayerId(gActiveBank)].gender != 0)
|
||||
trainerPicId = gUnknown_0831F578[0x51];
|
||||
trainerPicId = gTrainerClassToFrontPicId[0x51];
|
||||
else
|
||||
trainerPicId = gUnknown_0831F578[0x50];
|
||||
trainerPicId = gTrainerClassToFrontPicId[0x50];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1320,17 +1319,17 @@ static void LinkOpponentHandleDrawTrainerPic(void)
|
||||
|| (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_LEAF_GREEN)
|
||||
{
|
||||
if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != 0)
|
||||
trainerPicId = gUnknown_0831F578[0x4F];
|
||||
trainerPicId = gTrainerClassToFrontPicId[0x4F];
|
||||
else
|
||||
trainerPicId = gUnknown_0831F578[0x4E];
|
||||
trainerPicId = gTrainerClassToFrontPicId[0x4E];
|
||||
}
|
||||
else if ((gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_RUBY
|
||||
|| (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_SAPPHIRE)
|
||||
{
|
||||
if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != 0)
|
||||
trainerPicId = gUnknown_0831F578[0x51];
|
||||
trainerPicId = gTrainerClassToFrontPicId[0x51];
|
||||
else
|
||||
trainerPicId = gUnknown_0831F578[0x50];
|
||||
trainerPicId = gTrainerClassToFrontPicId[0x50];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@ extern const union AffineAnimCmd *const gUnknown_082FF694[];
|
||||
extern const union AnimCmd *const gUnknown_082FF70C[];
|
||||
extern const union AnimCmd *const *const gMonAnimationsSpriteAnimsPtrTable[NUM_SPECIES];
|
||||
extern const union AnimCmd *const *const gUnknown_0830536C[];
|
||||
extern const u8 gUnknown_0831F578[];
|
||||
extern const u8 gTrainerClassToFrontPicId[];
|
||||
|
||||
// Static type declarations
|
||||
|
||||
@ -421,9 +421,9 @@ u8 sub_818D97C(u8 a0, u8 a1)
|
||||
switch (a0)
|
||||
{
|
||||
default:
|
||||
return gUnknown_0831F578[0x3F];
|
||||
return gTrainerClassToFrontPicId[0x3F];
|
||||
case 0:
|
||||
return gUnknown_0831F578[0x3C];
|
||||
return gTrainerClassToFrontPicId[0x3C];
|
||||
}
|
||||
}
|
||||
return a0;
|
||||
|
@ -1222,14 +1222,14 @@ void CreateSecretBaseEnemyParty(struct SecretBaseRecord *secretBaseRecord)
|
||||
}
|
||||
}
|
||||
|
||||
extern const u8 gUnknown_0831F578[];
|
||||
extern const u8 gTrainerClassToFrontPicId[];
|
||||
extern const u8 gTrainerClassToNameIndex[];
|
||||
extern const u8 gSecretBaseTrainerClasses[][5];
|
||||
|
||||
u8 GetSecretBaseTrainerPicIndex(void)
|
||||
{
|
||||
u8 trainerClass = gSecretBaseTrainerClasses[gBattleResources->secretBase->gender][gBattleResources->secretBase->trainerId[0] % 5];
|
||||
return gUnknown_0831F578[trainerClass];
|
||||
return gTrainerClassToFrontPicId[trainerClass];
|
||||
}
|
||||
|
||||
u8 GetSecretBaseTrainerNameIndex(void)
|
||||
|
@ -1652,11 +1652,11 @@ u8 sub_806EF84(u8 arg0, u8 arg1)
|
||||
return i;
|
||||
}
|
||||
|
||||
extern const u8 gUnknown_0831F578[];
|
||||
extern const u8 gTrainerClassToFrontPicId[];
|
||||
|
||||
u16 sub_806EFF0(u16 arg0)
|
||||
{
|
||||
return gUnknown_0831F578[arg0];
|
||||
return gTrainerClassToFrontPicId[arg0];
|
||||
}
|
||||
|
||||
u16 PlayerGenderToFrontTrainerPicId(u8 playerGender)
|
||||
|
Loading…
Reference in New Issue
Block a user