mirror of https://github.com/pret/pokeemerald.git
through sub_817C7F4
This commit is contained in:
parent
5ea2f463d7
commit
002b394855
|
@ -5,74 +5,6 @@
|
|||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_817C7DC
|
||||
sub_817C7DC: @ 817C7DC
|
||||
ldr r2, =gUnknown_0860A320
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldr r0, [r0]
|
||||
lsls r1, 1
|
||||
adds r1, r0
|
||||
movs r2, 0
|
||||
ldrsh r0, [r1, r2]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_817C7DC
|
||||
|
||||
thumb_func_start sub_817C7F4
|
||||
sub_817C7F4: @ 817C7F4
|
||||
push {r4,r5,lr}
|
||||
lsls r4, r0, 16
|
||||
lsrs r5, r4, 16
|
||||
adds r0, r5, 0
|
||||
bl sub_811EB10
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0817C810
|
||||
ldr r0, =gUnknown_0860A3AC
|
||||
b _0817C84E
|
||||
.pool
|
||||
_0817C810:
|
||||
lsrs r0, r4, 25
|
||||
ldr r2, =0x000001ff
|
||||
ands r2, r5
|
||||
cmp r0, 0x13
|
||||
bhi _0817C828
|
||||
cmp r0, 0x12
|
||||
bcs _0817C834
|
||||
cmp r0, 0
|
||||
beq _0817C82C
|
||||
b _0817C83C
|
||||
.pool
|
||||
_0817C828:
|
||||
cmp r0, 0x15
|
||||
bne _0817C83C
|
||||
_0817C82C:
|
||||
ldr r1, =gUnknown_085F5494
|
||||
b _0817C844
|
||||
.pool
|
||||
_0817C834:
|
||||
ldr r1, =gUnknown_085FA1D8
|
||||
b _0817C844
|
||||
.pool
|
||||
_0817C83C:
|
||||
ldr r1, =gUnknown_0860A168
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r1, [r0]
|
||||
_0817C844:
|
||||
lsls r0, r2, 1
|
||||
adds r0, r2
|
||||
lsls r0, 4
|
||||
adds r1, r0
|
||||
adds r0, r1, 0
|
||||
_0817C84E:
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_817C7F4
|
||||
|
||||
thumb_func_start sub_817C858
|
||||
sub_817C858: @ 817C858
|
||||
push {r4-r7,lr}
|
||||
|
|
|
@ -34,5 +34,6 @@ void CopyEasyChatWord(u8 *dest, u16 word);
|
|||
bool32 sub_811F8D8(u16 word);
|
||||
void InitializeEasyChatWordArray(u16 *words, u16 length);
|
||||
void ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 length1, u16 length2);
|
||||
bool8 sub_811EB10(u16 word);
|
||||
|
||||
#endif // GUARD_EASYCHAT_H
|
||||
|
|
|
@ -226,6 +226,7 @@ SECTIONS {
|
|||
src/clear_save_data_screen.o(.text);
|
||||
asm/intro_credits_graphics.o(.text);
|
||||
asm/evolution_graphics.o(.text);
|
||||
src/bard_music.o(.text);
|
||||
asm/bard_music.o(.text);
|
||||
asm/fldeff_teleport.o(.text);
|
||||
asm/battle_link_817C95C.o(.text);
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
|
||||
// Includes
|
||||
#include "global.h"
|
||||
#include "easy_chat.h"
|
||||
|
||||
// Static type declarations
|
||||
|
||||
// Static RAM declarations
|
||||
|
||||
struct UnkStruct_817C7F4 {
|
||||
u8 unk_00[48];
|
||||
};
|
||||
|
||||
// Static ROM declarations
|
||||
|
||||
// .rodata
|
||||
|
||||
extern const struct UnkStruct_817C7F4 gUnknown_085F5494[];
|
||||
extern const struct UnkStruct_817C7F4 gUnknown_085FA1D8[];
|
||||
extern const struct UnkStruct_817C7F4 *const gUnknown_0860A168[];
|
||||
extern const s16 *const gUnknown_0860A320[];
|
||||
extern const struct UnkStruct_817C7F4 gUnknown_0860A3AC;
|
||||
|
||||
// .text
|
||||
|
||||
s16 sub_817C7DC(int x, int y)
|
||||
{
|
||||
return gUnknown_0860A320[x][y];
|
||||
}
|
||||
|
||||
const struct UnkStruct_817C7F4 *sub_817C7F4(u16 word)
|
||||
{
|
||||
u32 category;
|
||||
u32 subword;
|
||||
const struct UnkStruct_817C7F4 *ptr;
|
||||
|
||||
if (sub_811EB10(word))
|
||||
{
|
||||
return &gUnknown_0860A3AC;
|
||||
}
|
||||
category = word >> 9;
|
||||
subword = word & 0x1ff;
|
||||
switch (category)
|
||||
{
|
||||
case EC_GROUP_POKEMON:
|
||||
case EC_GROUP_POKEMON_2:
|
||||
ptr = gUnknown_085F5494;
|
||||
break;
|
||||
case EC_GROUP_MOVE_1:
|
||||
case EC_GROUP_MOVE_2:
|
||||
ptr = gUnknown_085FA1D8;
|
||||
break;
|
||||
default:
|
||||
ptr = gUnknown_0860A168[category];
|
||||
break;
|
||||
}
|
||||
ptr += subword;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue