Finish decomp of union_room_chat
This commit is contained in:
parent
a47abb3949
commit
53efbe2832
4 changed files with 142 additions and 100 deletions
|
@ -1,90 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
gUnknown_082F315C:: @ 82F315C struct SpritePalette
|
||||
.4byte gUnknown_082F2DF0
|
||||
.2byte 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F3164:: @ 82F3164
|
||||
.2byte 0x4000, 0xc000, 0x0400, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F316C:: @ 82F316C
|
||||
.2byte 0x0000, 0x001e, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F3174:: @ 82F3174
|
||||
.2byte 0x0020, 0x001e, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F317C:: @ 82F317C
|
||||
.2byte 0x0040, 0x001e, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F3184:: @ 82F3184
|
||||
.2byte 0x0060, 0x001e, 0xffff, 0x0000
|
||||
|
||||
gUnknown_082F318C:: @ 82F318C
|
||||
.4byte gUnknown_082F316C
|
||||
.4byte gUnknown_082F3174
|
||||
.4byte gUnknown_082F317C
|
||||
.4byte gUnknown_082F3184
|
||||
|
||||
.align 2
|
||||
gUnknown_082F319C:: @ 82F319C
|
||||
spr_template 0x0000, 0x0000, gUnknown_082F3164, gUnknown_082F318C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
.align 2
|
||||
gUnknown_082F31B4:: @ 82F31B4
|
||||
.byte 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_082F31BC:: @ 82F31BC
|
||||
spr_template 0x0002, 0x0000, gUnknown_082F31B4, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8020ABC
|
||||
|
||||
.align 2
|
||||
gUnknown_082F31D4:: @ 82F31D4
|
||||
spr_template 0x0001, 0x0000, gUnknown_082F31B4, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8020AF4
|
||||
|
||||
.align 2
|
||||
gUnknown_082F31EC:: @ 82F31EC
|
||||
.byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_082F31F4:: @ 82F31F4
|
||||
.byte 0x00, 0x40, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_082F31FC:: @ 82F31FC
|
||||
.2byte 0x0000, 0x0002, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F3204:: @ 82F3204
|
||||
.2byte 0x0008, 0x0002, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F320C:: @ 82F320C
|
||||
.2byte 0x0010, 0x0002, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F3214:: @ 82F3214
|
||||
.2byte 0x0018, 0x0002, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_082F321C:: @ 82F321C
|
||||
.4byte gUnknown_082F31FC
|
||||
.4byte gUnknown_082F3204
|
||||
.4byte gUnknown_082F320C
|
||||
.4byte gUnknown_082F3214
|
||||
|
||||
.align 2
|
||||
gUnknown_082F322C:: @ 82F322C
|
||||
spr_template 0x0003, 0x0000, gUnknown_082F31EC, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
.align 2
|
||||
gUnknown_082F3244:: @ 82F3244
|
||||
spr_template 0x0004, 0x0000, gUnknown_082F31F4, gUnknown_082F321C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
|
@ -18,13 +18,12 @@
|
|||
#if defined (__APPLE__) || defined (__CYGWIN__) || defined (_MSC_VER)
|
||||
#define _(x) x
|
||||
#define __(x) x
|
||||
// CLion is an idiot
|
||||
#define INCBIN_U8(x) {0}
|
||||
#define INCBIN_U16(x) {0}
|
||||
#define INCBIN_U32(x) {0}
|
||||
#define INCBIN_S8(x) {0}
|
||||
#define INCBIN_S16(x) {0}
|
||||
#define INCBIN_S32(x) {0}
|
||||
#define INCBIN_U8 {0}
|
||||
#define INCBIN_U16 {0}
|
||||
#define INCBIN_U32 {0}
|
||||
#define INCBIN_S8 {0}
|
||||
#define INCBIN_S16 {0}
|
||||
#define INCBIN_S32 {0}
|
||||
#endif // IDE support
|
||||
|
||||
#define ARRAY_COUNT(array) (size_t)(sizeof(array) / sizeof((array)[0]))
|
||||
|
|
|
@ -419,7 +419,6 @@ SECTIONS {
|
|||
src/mevent_client.o(.rodata);
|
||||
src/mevent_scripts.o(.rodata);
|
||||
src/union_room_chat.o(.rodata);
|
||||
data/union_room_chat.o(.rodata);
|
||||
data/berry_crush.o(.rodata);
|
||||
data/berry_powder.o(.rodata);
|
||||
data/dodrio_berry_picking.o(.rodata);
|
||||
|
|
|
@ -211,6 +211,8 @@ static bool32 sub_801FC9C(u8 *state);
|
|||
static bool32 sub_801FCEC(u8 *state);
|
||||
static bool32 sub_801FD30(u8 *state);
|
||||
static bool32 sub_801FD88(u8 *state);
|
||||
static void sub_8020ABC(struct Sprite *sprite);
|
||||
static void sub_8020AF4(struct Sprite *sprite);
|
||||
|
||||
extern struct UnionRoomChat *gUnknown_02022C84;
|
||||
extern struct UnionRoomChat2 *gUnknown_02022C88;
|
||||
|
@ -419,6 +421,138 @@ const struct CompressedSpriteSheet gUnknown_082F3134[] = {
|
|||
{gUnknown_08DD4CF8, 0x0400, 0x0004}
|
||||
};
|
||||
|
||||
const struct SpritePalette gUnknown_082F315C = {
|
||||
gUnknown_082F2DF0, 0x0000
|
||||
};
|
||||
|
||||
const struct OamData gUnknown_082F3164 = {
|
||||
.shape = ST_OAM_H_RECTANGLE,
|
||||
.size = 3,
|
||||
.priority = 1
|
||||
};
|
||||
|
||||
const union AnimCmd gUnknown_082F316C[] = {
|
||||
ANIMCMD_FRAME(0x00, 30),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd gUnknown_082F3174[] = {
|
||||
ANIMCMD_FRAME(0x20, 30),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd gUnknown_082F317C[] = {
|
||||
ANIMCMD_FRAME(0x40, 30),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd gUnknown_082F3184[] = {
|
||||
ANIMCMD_FRAME(0x60, 30),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd *const gUnknown_082F318C[] = {
|
||||
gUnknown_082F316C,
|
||||
gUnknown_082F3174,
|
||||
gUnknown_082F317C,
|
||||
gUnknown_082F3184
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_082F319C = {
|
||||
.tileTag = 0x0000,
|
||||
.paletteTag = 0x0000,
|
||||
.oam = &gUnknown_082F3164,
|
||||
.anims = gUnknown_082F318C,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
|
||||
const struct OamData gUnknown_082F31B4 = {
|
||||
.shape = ST_OAM_V_RECTANGLE,
|
||||
.size = 0,
|
||||
.priority = 2
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_082F31BC = {
|
||||
.tileTag = 0x0002,
|
||||
.paletteTag = 0x0000,
|
||||
.oam = &gUnknown_082F31B4,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8020ABC
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_082F31D4 = {
|
||||
.tileTag = 0x0001,
|
||||
.paletteTag = 0x0000,
|
||||
.oam = &gUnknown_082F31B4,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_8020AF4
|
||||
};
|
||||
|
||||
const struct OamData gUnknown_082F31EC = {
|
||||
.shape = ST_OAM_SQUARE,
|
||||
.size = 1,
|
||||
.priority = 2
|
||||
};
|
||||
|
||||
const struct OamData gUnknown_082F31F4 = {
|
||||
.shape = ST_OAM_H_RECTANGLE,
|
||||
.size = 2,
|
||||
.priority = 2
|
||||
};
|
||||
|
||||
const union AnimCmd gUnknown_082F31FC[] = {
|
||||
ANIMCMD_FRAME(0x00, 2),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd gUnknown_082F3204[] = {
|
||||
ANIMCMD_FRAME(0x08, 2),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd gUnknown_082F320C[] = {
|
||||
ANIMCMD_FRAME(0x10, 2),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd gUnknown_082F3214[] = {
|
||||
ANIMCMD_FRAME(0x18, 2),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd *const gUnknown_082F321C[] = {
|
||||
gUnknown_082F31FC,
|
||||
gUnknown_082F3204,
|
||||
gUnknown_082F320C,
|
||||
gUnknown_082F3214
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_082F322C = {
|
||||
.tileTag = 0x0003,
|
||||
.paletteTag = 0x0000,
|
||||
.oam = &gUnknown_082F31EC,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_082F3244 = {
|
||||
.tileTag = 0x0004,
|
||||
.paletteTag = 0x0000,
|
||||
.oam = &gUnknown_082F31F4,
|
||||
.anims = gUnknown_082F321C,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
|
||||
void sub_801DD98(void)
|
||||
{
|
||||
gUnknown_02022C84 = Alloc(sizeof(*gUnknown_02022C84));
|
||||
|
@ -2754,7 +2888,7 @@ static void sub_8020A68(void)
|
|||
gUnknown_02022C8C->unk4 = &gSprites[spriteId];
|
||||
}
|
||||
|
||||
void sub_8020ABC(struct Sprite *sprite)
|
||||
static void sub_8020ABC(struct Sprite *sprite)
|
||||
{
|
||||
int var0 = sub_801F198();
|
||||
if (var0 == 15)
|
||||
|
@ -2768,7 +2902,7 @@ void sub_8020ABC(struct Sprite *sprite)
|
|||
}
|
||||
}
|
||||
|
||||
void sub_8020AF4(struct Sprite *sprite)
|
||||
static void sub_8020AF4(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->data[0] > 4)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue