Merge pull request #98 from 21aslade:master

lakitu.c documentation, start chuchuBoss.c
This commit is contained in:
notyourav 2020-11-10 17:55:32 -08:00 committed by GitHub
commit 370fe95963
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
68 changed files with 2542 additions and 2448 deletions

View File

@ -6,39 +6,6 @@
.text
thumb_func_start ChuchuBoss
ChuchuBoss: @ 0x08025CA0
push {r4, r5, lr}
adds r5, r0, #0
ldr r4, _08025CB8 @ =gUnk_080CC19C
bl GetNextFunction
lsls r0, r0, #2
adds r0, r0, r4
ldr r1, [r0]
adds r0, r5, #0
bl _call_via_r1
pop {r4, r5, pc}
.align 2, 0
_08025CB8: .4byte gUnk_080CC19C
thumb_func_start sub_08025CBC
sub_08025CBC: @ 0x08025CBC
push {r4, lr}
adds r4, r0, #0
bl sub_08001324
thumb_func_start sub_08025CC4
sub_08025CC4: @ 0x08025CC4
ldrb r0, [r4, #0xa]
cmp r0, #0
bne _08025CD0
adds r0, r4, #0
bl sub_08027870
_08025CD0:
pop {r4, pc}
.align 2, 0
thumb_func_start sub_08025CD4
sub_08025CD4: @ 0x08025CD4
push {r4, r5, lr}

View File

@ -6,58 +6,6 @@
.text
thumb_func_start sub_08049CD4
sub_08049CD4: @ 0x08049CD4
push {r4, lr}
movs r0, #1
rsbs r0, r0, #0
ldr r4, _08049CEC @ =gUnk_02024050
adds r1, r4, #0
movs r2, #0x40
bl _DmaFill32
ldr r0, _08049CF0 @ =gUnk_020354B0
str r4, [r0]
pop {r4, pc}
.align 2, 0
_08049CEC: .4byte gUnk_02024050
_08049CF0: .4byte gUnk_020354B0
thumb_func_start sub_08049CF4
sub_08049CF4: @ 0x08049CF4
push {lr}
adds r0, #0x6c
ldrb r3, [r0]
movs r0, #0x80
ands r0, r3
cmp r0, #0
beq _08049D14
ldr r0, _08049D18 @ =gUnk_020354B0
ldr r2, [r0]
movs r0, #0x1f
ands r3, r0
movs r1, #1
lsls r1, r3
ldr r0, [r2, #4]
orrs r0, r1
str r0, [r2, #4]
_08049D14:
pop {pc}
.align 2, 0
_08049D18: .4byte gUnk_020354B0
thumb_func_start sub_08049D1C
sub_08049D1C: @ 0x08049D1C
ldr r1, _08049D2C @ =gUnk_020354B0
ldr r1, [r1]
ldr r1, [r1, #4]
lsrs r1, r0
movs r0, #1
bics r0, r1
bx lr
.align 2, 0
_08049D2C: .4byte gUnk_020354B0
thumb_func_start sub_08049D30
sub_08049D30: @ 0x08049D30
push {r4, r5, r6, lr}

File diff suppressed because it is too large Load Diff

113
data/data_080D015C.s Normal file
View File

@ -0,0 +1,113 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_080D015C:: @ 080D015C
.incbin "baserom.gba", 0x0D015C, 0x0000011
gUnk_080D016D:: @ 080D016D
.incbin "baserom.gba", 0x0D016D, 0x0000011
gUnk_080D017E:: @ 080D017E
.incbin "baserom.gba", 0x0D017E, 0x0000011
gUnk_080D018F:: @ 080D018F
.incbin "baserom.gba", 0x0D018F, 0x0000011
gUnk_080D01A0:: @ 080D01A0
.incbin "baserom.gba", 0x0D01A0, 0x0000011
gUnk_080D01B1:: @ 080D01B1
.incbin "baserom.gba", 0x0D01B1, 0x0000011
gUnk_080D01C2:: @ 080D01C2
.incbin "baserom.gba", 0x0D01C2, 0x0000011
gUnk_080D01D3:: @ 080D01D3
.incbin "baserom.gba", 0x0D01D3, 0x0000011
gUnk_080D01E4:: @ 080D01E4
.incbin "baserom.gba", 0x0D01E4, 0x000000B
gUnk_080D01EF:: @ 080D01EF
.incbin "baserom.gba", 0x0D01EF, 0x000001D
gUnk_080D020C:: @ 080D020C
.incbin "baserom.gba", 0x0D020C, 0x0000004
gUnk_080D0210:: @ 080D0210
.incbin "baserom.gba", 0x0D0210, 0x0000001
gUnk_080D0211:: @ 080D0211
.incbin "baserom.gba", 0x0D0211, 0x0000014
gUnk_080D0225:: @ 080D0225
.incbin "baserom.gba", 0x0D0225, 0x0000041
gUnk_080D0266:: @ 080D0266
.incbin "baserom.gba", 0x0D0266, 0x0000041
gUnk_080D02A7:: @ 080D02A7
.incbin "baserom.gba", 0x0D02A7, 0x0000041
gUnk_080D02E8:: @ 080D02E8
.incbin "baserom.gba", 0x0D02E8, 0x000000B
gUnk_080D02F3:: @ 080D02F3
.incbin "baserom.gba", 0x0D02F3, 0x0000003
gUnk_080D02F6:: @ 080D02F6
.incbin "baserom.gba", 0x0D02F6, 0x0000001
gUnk_080D02F7:: @ 080D02F7
.incbin "baserom.gba", 0x0D02F7, 0x0000002
gUnk_080D02F9:: @ 080D02F9
.incbin "baserom.gba", 0x0D02F9, 0x0000003
gUnk_080D02FC:: @ 080D02FC
.incbin "baserom.gba", 0x0D02FC, 0x0000004
gUnk_080D0300:: @ 080D0300
.incbin "baserom.gba", 0x0D0300, 0x000000A
gUnk_080D030A:: @ 080D030A
.incbin "baserom.gba", 0x0D030A, 0x0000011
gUnk_080D031B:: @ 080D031B
.incbin "baserom.gba", 0x0D031B, 0x0000011
gUnk_080D032C:: @ 080D032C
.incbin "baserom.gba", 0x0D032C, 0x0000011
gUnk_080D033D:: @ 080D033D
.incbin "baserom.gba", 0x0D033D, 0x0000011
gUnk_080D034E:: @ 080D034E
.incbin "baserom.gba", 0x0D034E, 0x0000011
gUnk_080D035F:: @ 080D035F
.incbin "baserom.gba", 0x0D035F, 0x0000011
gUnk_080D0370:: @ 080D0370
.incbin "baserom.gba", 0x0D0370, 0x0000011
gUnk_080D0381:: @ 080D0381
.incbin "baserom.gba", 0x0D0381, 0x0000011
gUnk_080D0392:: @ 080D0392
.incbin "baserom.gba", 0x0D0392, 0x0000011
gUnk_080D03A3:: @ 080D03A3
.incbin "baserom.gba", 0x0D03A3, 0x0000011
gUnk_080D03B4:: @ 080D03B4
.incbin "baserom.gba", 0x0D03B4, 0x000003C
gUnk_080D03F0:: @ 080D03F0
.incbin "baserom.gba", 0x0D03F0, 0x0000014
gUnk_080D0404:: @ 080D0404
.incbin "baserom.gba", 0x0D0404, 0x0000014

2093
data/data_080D0448.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -101,7 +101,7 @@ extern u32 sub_08049FA0(Entity*);
extern u32 sub_08049FDC(Entity*, u32);
extern u32 sub_080041A0(Entity *, Entity *, u32, u32);
extern u32 sub_08049EE4(Entity*);
extern Entity *sub_0804A98C(Entity *, u32, u32);
extern Entity *sub_0804A98C(Entity *, u8, u8);
extern u32 sub_080544DC(u8);
extern void sub_08077E54(Entity*);
extern void sub_080042BA(Entity*, u32);

View File

@ -345,6 +345,7 @@ SECTIONS {
src/enemy/sluggula.o(.text);
src/enemy/pesto.o(.text);
src/enemy/puffstool.o(.text);
src/enemy/chuchuBoss.o(.text);
asm/chuchuBoss.o(.text);
src/enemy/likeLike.o(.text);
src/enemy/spearMoblin.o(.text);
@ -434,7 +435,8 @@ SECTIONS {
src/enemy/treeItem.o(.text);
asm/enemy66.o(.text);
/* END enemies */
asm/code_08049CD4.o(.text);
src/code_08049CD4.o(.text);
asm/code_08049D30.o(.text);
asm/sub_0804AA30.o(.text);
src/createEnemy.o(.text);
src/code_0804AA84.o(.text);
@ -974,6 +976,10 @@ SECTIONS {
data/animations/bobomb.o(.rodata);
src/enemy/wallMaster2.o(.rodata);
data/data_080CC6FC.o(.rodata);
src/enemy/lakitu.o(.rodata);
data/data_080D015C.o(.rodata);
src/enemy/lakituCloud.o(.rodata);
data/data_080D0448.o(.rodata);
src/enemy.o(.rodata);
data/data_080D3D94.o(.rodata);
data/entity_headers.o(.rodata);

View File

@ -26,4 +26,4 @@ void sub_08018C58(u32 tilePos)
i += 2;
tilePos += 0x40;
}
}
}

View File

@ -22,4 +22,4 @@ void sub_080300C4(void) {
gScreenTransition.field_0xac = 0;
_DmaZero(&gScreenTransition.field_0x4c[32], 0x40);
}
}
}

25
src/code_08049CD4.c Normal file
View File

@ -0,0 +1,25 @@
#include "global.h"
extern u32* gUnk_020354B0;
extern u32 gUnk_02024050;
extern void _DmaFill32(u32, void*, u32);
void sub_08049CD4() {
_DmaFill32(0xFFFFFFFF, &gUnk_02024050, 0x40);
gUnk_020354B0 = &gUnk_02024050;
}
void sub_08049CF4(u8* arg0) {
u8 field_0x6c = *(arg0 + 0x6c);
if (field_0x6c & 0x80) {
*(gUnk_020354B0 + 1) |= 1 << (field_0x6c & 0x1f);
}
}
u32 sub_08049D1C(u32 arg0) {
u32 bitmask = *(gUnk_020354B0 + 1) >> arg0;
u32 output = 1;
output &= ~bitmask;
return output;
}

View File

@ -271,4 +271,4 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) {
void sub_08054870(void)
{
gUnk_080FE2A0[gMenu.menuType]();
}
}

View File

@ -85,4 +85,4 @@ void sub_08078850(u32 arg0, u32 arg1, u32 arg2, u32 arg3)
gUnk_03003DF0[iVar1].unk[10] = arg2;
*(&gUnk_03003DF0[iVar1].unk4 + 1) = arg3;
}
}
}

View File

@ -143,4 +143,4 @@ void sub_0807CF68(u32 arg0)
str = gUnk_0811E4A4;
sub_0807D184(temp->field_0x4, str);
sub_0807D184(temp->field_0x2, str);
}
}

69
src/code_080A29BC.c Normal file
View File

@ -0,0 +1,69 @@
#include "global.h"
#include "entity.h"
#include "room.h"
void sub_080A29BC(Entity *parent)
{
CreateFx(parent, 2, 0);
}
void sub_080A29C8(s32 xOff, s32 yOff, u32 layer)
{
Entity *pEVar1;
pEVar1 = CreateObject(0xf, 2, 0);
if (pEVar1 != NULL) {
pEVar1->x.HALF.HI = gRoomControls.roomOriginX + xOff;
pEVar1->y.HALF.HI = gRoomControls.roomOriginY + yOff;
pEVar1->collisionLayer = layer;
}
}
void sub_080A29FC(Entity *parent)
{
CreateFx(parent, 0x11, 0);
}
void sub_080A2A08(Entity *parent)
{
CreateFx(parent, 0x6, 0);
}
void sub_080A2A14(Entity *parent)
{
CreateFx(parent, 0xb, 0);
}
Entity * sub_080A2A20(Entity *parent, u32 form, u32 parameter)
{
Entity *pEVar1;
pEVar1 = CreateObjectWithParent(parent, 0, form, parameter);
if (pEVar1 != NULL) {
pEVar1->actionDelay = 5;
}
return pEVar1;
}
Entity * sub_080A2A3C(Entity *parent, u32 form, u32 subtype, u32 param_4)
{
Entity *ent;
ent = CreateObjectWithParent(parent, 0, form, subtype);
if (ent != NULL) {
ent->actionDelay = 5;
*(u32*)(&ent->field_0x86) = param_4;
}
return ent;
}
Entity * sub_080A2A64(Entity *parent)
{
Entity *pEVar1;
pEVar1 = CreateFx(parent, 0x20, 0);
if (pEVar1 != NULL) {
pEVar1->spritePriority.b0 = 7;
}
return pEVar1;
}

View File

@ -38,4 +38,4 @@ void sub_0803C198(Entity *this)
}
}
void nullsub_168(Entity* this){}
void nullsub_168(Entity* this){}

View File

@ -23,8 +23,18 @@ extern const u16 gUnk_080CC29C[];
extern const u16 gUnk_080CC2BC[];
extern const s8 gUnk_080CC2DC[];
void ChuchuBoss(Entity* this) {
gUnk_080CC19C[GetNextFunction(this)]((Entity*)this);
}
void sub_08025CBC(Entity* this) {
sub_08001324(this);
if (this->entityType.form == 0) {
sub_08027870(this);
}
}
void sub_08025DC0(Entity*);
void sub_08025CBC(Entity*);
void sub_08025CD4(Entity*);
void sub_08001242(Entity*);
void sub_08025DD8(Entity*);

View File

@ -5,15 +5,12 @@
#include "random.h"
#include "player.h"
extern void (*const LakituActionFuncs[])(Entity *);
// Lakitu
extern void EnemyFunctionHandler(Entity *, void (*const funcs[])(Entity*));
// sub_0803C758
extern void sub_0803CAD0(Entity *);
// sub_0803C784
extern void sub_0803CBAC(Entity *); // Also used in sub_0803C86C
extern Entity *CreateFx(Entity*, u32, u32);
extern void sub_0804AA30(Entity *, void (*const funcs[])(Entity *));
// sub_0803C820
@ -22,35 +19,59 @@ extern u32 sub_0806F520(Entity *);
// sub_0803C850
extern void sub_0806F4E8(Entity *);
// sub_0803C87C
extern Entity *sub_0804A98C(Entity *, u32, u32);
// Lakitu_Initialize
extern void sub_0804A720(Entity *);
// sub_0803C8BC and sub_0803C918
extern void sub_0803CA84(Entity *, u32);
extern bool32 sub_0803CA4C(Entity *);
// sub_0803C918
extern u32 sub_0803CB04(Entity *);
// sub_0803C97C
extern void sub_0803CB64(Entity *);
// sub_0803C9D4 and sub_0803CB04
extern void sub_0803CB34(Entity *);
// sub_0803CA0C
extern void sub_0803CC08(Entity *this);
// Lakitu_Cloudless
extern u32 sub_08003FC4(Entity *, u32);
// sub_0803CA4C
extern u32 sub_0806FCB8(Entity *, u32, u32, u32);
extern u32 sub_080041A0(Entity *, Entity *, u32, u32);
// sub_0803CA84
// sub_0803CAD0
extern u32 sub_080AEFE0(Entity *);
// Lakitu_SpawnLightning
void PositionRelative(Entity*, Entity*, s32, s32);
extern void EnqueueSFX(u32);
// sub_0803CC08
extern void DeleteEntity(Entity *);
// Part of function tables
extern void sub_08001324(Entity *);
extern void sub_0804A7D4(Entity *);
extern void sub_08001242(Entity *);
// Used in multiple functions
extern Entity *CreateFx(Entity*, u32, u32);
extern Entity *sub_0804A98C(Entity *positionEntity, u8 subtype, u8 form); // Creates a projectile positioned at the given entity
extern void UpdateAnimationSingleFrame(Entity *);
extern void InitAnimationForceUpdate(Entity *, u32);
extern u32 sub_0806FCB8(Entity *, u32, u32, u32);
extern u32 GetFacingDirection(Entity *, Entity *);
// sub_0803CB64
extern void EnqueueSFX(u32);
// Forward references to functions in lakitu.c
extern void sub_0803CAD0(Entity *);
extern void sub_0803CBAC(Entity *);
extern void sub_0803CA84(Entity *, u32);
extern bool32 sub_0803CA4C(Entity *);
extern bool32 sub_0803CB04(Entity *);
extern void Lakitu_SpawnLightning(Entity *);
extern void sub_0803CB34(Entity *);
extern void sub_0803CC08(Entity *this);
enum {
INIT,
HIDDEN,
END_HIDE,
IDLE,
BEGIN_HIDE,
LIGHTNING_THROW,
LIGHTNING_DELAY,
CLOUDLESS,
};
typedef struct {
s8 x;
@ -72,12 +93,12 @@ void Lakitu(Entity *this) {
SetChildOffset(this, 0, 1, -16);
}
void sub_0803C758(Entity *this) {
void Lakitu_DoAction(Entity *this) {
if (this->action != 0 && this->action != 7) {
sub_0803CAD0(this);
}
gUnk_080D0128[this->action](this);
LakituActionFuncs[this->action](this);
}
void sub_0803C784(Entity *this) {
@ -88,9 +109,9 @@ void sub_0803C784(Entity *this) {
}
else {
if (this->damageType == 0x43) {
Entity *sound = CreateFx(this, 2, 0);
Entity *fx = CreateFx(this, 2, 0);
if (sound != 0) {
if (fx != NULL) {
u32 angle = (this->field_0x3e ^ 0x10) << 3;
s32 sine;
@ -99,14 +120,14 @@ void sub_0803C784(Entity *this) {
sine += 0x1f;
}
sound->x.HALF.HI += sine >> 5;
fx->x.HALF.HI += sine >> 5;
sine = gSineTable[angle + 0x40];
if (sine < 0) {
sine += 0x1f;
}
sound->y.HALF.HI -= sine >> 5;
fx->y.HALF.HI -= sine >> 5;
}
}
}
@ -131,7 +152,7 @@ void sub_0803C844(Entity *this) {
void sub_0803C850(Entity *this) {
Entity *cloud = this->attachedEntity;
if (cloud != 0) {
if (cloud != NULL) {
cloud->spriteOffsetX = this->spriteOffsetX;
}
@ -140,12 +161,12 @@ void sub_0803C850(Entity *this) {
void sub_0803C86C(Entity *this) {
sub_0803CBAC(this);
this->attachedEntity = 0;
this->attachedEntity = NULL;
}
void sub_0803C87C(Entity *this) {
void Lakitu_Initialize(Entity *this) {
Entity *cloud = sub_0804A98C(this, 17, 0);
if (cloud == 0) {
if (cloud == NULL) {
return;
}
@ -154,7 +175,7 @@ void sub_0803C87C(Entity *this) {
sub_0804A720(this);
this->action = 1;
this->action = HIDDEN;
this->height.HALF.HI = -2;
@ -164,7 +185,7 @@ void sub_0803C87C(Entity *this) {
this->field_0x76.HWORD = this->y.HALF.HI;
}
void sub_0803C8BC(Entity *this) {
void Lakitu_Hide(Entity *this) {
sub_0803CA84(this, 0);
if (sub_0803CA4C(this)) {
@ -173,11 +194,11 @@ void sub_0803C8BC(Entity *this) {
}
}
void sub_0803C8E4(Entity *this) {
void Lakitu_EndHide(Entity *this) {
UpdateAnimationSingleFrame(this);
if (this->frames.b.f3) {
this->action = 3;
this->action = IDLE;
this->actionDelay = 0x3c;
this->damageType = 0x42;
@ -186,13 +207,13 @@ void sub_0803C8E4(Entity *this) {
}
}
void sub_0803C918(Entity *this) {
if (sub_0803CB04(this) != 0) {
void Lakitu_Idle(Entity *this) {
if (sub_0803CB04(this)) {
return;
}
if (sub_0803CA4C(this) == 0) {
this->action = 4;
if (!sub_0803CA4C(this)) {
this->action = BEGIN_HIDE;
this->damageType = 0x43;
InitAnimationForceUpdate(this, this->animationState + 0xc);
@ -202,7 +223,7 @@ void sub_0803C918(Entity *this) {
}
}
void sub_0803C950(Entity *this) {
void Lakitu_BeginHide(Entity *this) {
UpdateAnimationSingleFrame(this);
if (this->frames.b.f3 != 0) {
@ -213,31 +234,33 @@ void sub_0803C950(Entity *this) {
}
}
void sub_0803C97C(Entity *this) {
void Lakitu_Lightning(Entity *this) {
UpdateAnimationSingleFrame(this);
if (this->frames.b.f3 == 0) {
return;
}
sub_0803CB64(this);
this->action = 6;
Lakitu_SpawnLightning(this);
this->action = LIGHTNING_DELAY;
this->damageType = 0x42;
if ((Random() & 1) && this->field_0x78.HALF.HI == 0) {
if ((Random() & 1) && !this->field_0x78.HALF.HI) {
this->actionDelay = 0xf;
this->field_0x78.HALF.HI = 1;
this->field_0x78.HALF.HI = TRUE;
}
else {
this->actionDelay = 0x1e;
this->field_0x78.HALF.HI = 0;
this->field_0x78.HALF.HI = FALSE;
InitAnimationForceUpdate(this->attachedEntity, this->animationState);
}
}
void sub_0803C9D4(Entity *this) {
void Lakitu_LightningDelay(Entity *this) {
this->actionDelay--;
if (this->actionDelay != 0) {
@ -248,14 +271,14 @@ void sub_0803C9D4(Entity *this) {
sub_0803CB34(this);
}
else {
this->action = 3;
this->action = IDLE;
this->actionDelay = 0xb4;
InitAnimationForceUpdate(this, this->animationState + 4);
}
}
void sub_0803CA0C(Entity *this) {
void Lakitu_Cloudless(Entity *this) {
if (sub_08003FC4(this, 0x1800) == 0 && this->animIndex <= 19) {
InitAnimationForceUpdate(this, this->animationState + 20);
@ -319,7 +342,7 @@ bool32 sub_0803CB04(Entity *this) {
}
void sub_0803CB34(Entity *this) {
this->action = 5;
this->action = LIGHTNING_THROW;
this->damageType = 0xa6;
this->field_0x78.HALF.LO = GetFacingDirection(this, &gPlayerEntity);
@ -327,21 +350,21 @@ void sub_0803CB34(Entity *this) {
InitAnimationForceUpdate(this, this->animationState + 8);
}
void sub_0803CB64(Entity *this) {
Entity *cloud;
void Lakitu_SpawnLightning(Entity *this) {
Entity *lightning;
const OffsetCoords *offset;
cloud = sub_0804A98C(this, 18, 0);
lightning = sub_0804A98C(this, 18, 0);
if (cloud == 0) {
if (lightning == NULL) {
return;
}
offset = &gUnk_080D0154[this->animationState];
cloud->direction = this->field_0x78.HALF.LO;
lightning->direction = this->field_0x78.HALF.LO;
PositionRelative(this, cloud, offset->x << 16, offset->y << 16);
PositionRelative(this, lightning, offset->x << 16, offset->y << 16);
EnqueueSFX(0x193);
}
@ -350,12 +373,12 @@ void sub_0803CBAC(Entity *this) {
Entity *cloud;
cloud = this->attachedEntity;
if (cloud != 0) {
if (cloud != NULL) {
cloud->flags |= 0x80;
cloud->damageType = 0x43;
}
this->action = 7;
this->action = CLOUDLESS;
this->spriteSettings.b.draw = 1;
this->spritePriority.b1 = 1;
@ -369,10 +392,10 @@ void sub_0803CBAC(Entity *this) {
void sub_0803CC08(Entity *this) {
Entity *cloud;
Entity *sound;
Entity *fx;
cloud = this->attachedEntity;
if (cloud == 0) {
if (cloud == NULL) {
return;
}
@ -388,30 +411,63 @@ void sub_0803CC08(Entity *this) {
return;
}
sound = CreateFx(this, 2, 0);
if (sound != 0) {
sound->x.HALF.HI += 6;
sound->y.HALF.HI += 6;
fx = CreateFx(this, 2, 0);
if (fx != NULL) {
fx->x.HALF.HI += 6;
fx->y.HALF.HI += 6;
}
sound = CreateFx(this, 2, 0);
if (sound != 0) {
sound->x.HALF.HI -= 6;
sound->y.HALF.HI += 6;
fx = CreateFx(this, 2, 0);
if (fx != NULL) {
fx->x.HALF.HI -= 6;
fx->y.HALF.HI += 6;
}
sound = CreateFx(this, 2, 0);
if (sound != 0) {
sound->x.HALF.HI += 6;
sound->y.HALF.HI -= 6;
fx = CreateFx(this, 2, 0);
if (fx != NULL) {
fx->x.HALF.HI += 6;
fx->y.HALF.HI -= 6;
}
sound = CreateFx(this, 2, 0);
if (sound != 0) {
sound->x.HALF.HI -= 6;
sound->y.HALF.HI -= 6;
fx = CreateFx(this, 2, 0);
if (fx != NULL) {
fx->x.HALF.HI -= 6;
fx->y.HALF.HI -= 6;
}
this->attachedEntity = 0;
this->attachedEntity = NULL;
DeleteEntity(cloud);
}
}
void (*const gUnk_080D0110[])(Entity *) = {
Lakitu_DoAction,
sub_0803C784,
sub_08001324,
sub_0804A7D4,
sub_08001242,
sub_0803C820,
};
void (*const LakituActionFuncs[])(Entity *) = {
Lakitu_Initialize,
Lakitu_Hide,
Lakitu_EndHide,
Lakitu_Idle,
Lakitu_BeginHide,
Lakitu_Lightning,
Lakitu_LightningDelay,
Lakitu_Cloudless,
};
void (*const gUnk_080D0148[])(Entity *) = {
sub_0803C844,
sub_0803C850,
sub_0803C86C,
};
const OffsetCoords gUnk_080D0154[] = {
{ 0x00, 0xEE },
{ 0x12, 0x00 },
{ 0x00, 0x08 },
{ 0xEE, 0x00 },
};

View File

@ -4,9 +4,12 @@
extern u32 GetNextFunction(Entity *);
extern void (* const gUnk_080D0418[])(Entity *);
extern void (* const gUnk_080D0430[])(Entity *);
extern void (* const gUnk_080D043C[])(Entity *);
extern void sub_0804A7D4(Entity *);
extern void sub_08001242(Entity *);
extern void (*const gUnk_080D0418[6])(Entity *);
extern void (*const gUnk_080D0430[3])(Entity *);
extern void (*const gUnk_080D043C[3])(Entity *);
extern bool32 sub_0806F3E4(Entity *);
extern bool32 sub_0806F520(Entity *);
@ -148,3 +151,24 @@ void sub_0803CE3C(Entity *this) {
sub_0803CE14(this);
}
void (*const gUnk_080D0418[])(Entity *) = {
sub_0803CCD4,
sub_0803CCD4,
sub_0803CCEC,
sub_0804A7D4,
sub_08001242,
sub_0803CCFC,
};
void (*const gUnk_080D0430[])(Entity *) = {
sub_0803CD6C,
sub_0803CDA8,
sub_0803CDD8,
};
void (*const gUnk_080D043C[])(Entity *) = {
sub_0803CD2C,
sub_0803CD38,
sub_0803CD40,
};

View File

@ -66,4 +66,4 @@ void sub_08045678(Entity* this) {
this->direction = DirectionRound(Random());
}
}
}
}

View File

@ -192,4 +192,4 @@ void sub_0802F45C(Entity* this) {
temp = (Random() & 0xf) + 0x18;
this->direction = (temp + this->direction) & 0x1f;
}
}
}

View File

@ -164,4 +164,4 @@ void sub_08038168(Entity* this) {
temp = (Random() & 0xf) + 0x18;
this->direction = (temp + this->direction) & 0x1f;
}
}
}

View File

@ -114,4 +114,4 @@ void sub_0801CF60(Element* arg0) {
if (arg0->unk13 == 1) {
gUnk_0200AF00.ezloNagFuncIndex = 4;
}
}
}

View File

@ -65,4 +65,4 @@ void InitializePlayer(void)
UpdateSpriteForCollisionLayer(pl);
AppendEntityToList(pl, 1);
sub_08017640();
}
}

View File

@ -29,4 +29,4 @@ static void StoreKeyInput(Input *input, u32 keyInput)
input->unk4 = difference;
}
input->heldKeys = keyInput;
}
}

View File

@ -96,4 +96,4 @@ void sub_08018DE8(Entity *this)
break;
}
sub_08078CD0(&gPlayerEntity);
}
}

View File

@ -86,4 +86,4 @@ void* GetRoomProperty(u32 arg0, u32 arg1, u32 arg2) {
}
}
return (void*)temp;
}
}

View File

@ -61,4 +61,4 @@ void sub_08057118(Entity *this)
gScreen.controls.layerFXControl = 0x3648;
gScreen.controls.alphaBlend = 0x1000;
sub_08052D74(this, sub_080570B8, sub_080570F8);
}
}

View File

@ -15,4 +15,4 @@ void Manager2(Entity *this)
sub_08052D74(this, sub_080576A0, 0);
}
sub_0805754C(this);
}
}

View File

@ -81,4 +81,4 @@ void sub_0805C908(Entity *this)
u32 sub_0805C920(Entity *this)
{
return CheckLocalFlagByOffset(0x300, (this->entityType).form + 0x67);
}
}

View File

@ -12,4 +12,4 @@ void sub_0805D250(Entity *this)
void sub_0805D268(Entity *this)
{
gUnk_08108D44[this->action](this);
}
}

View File

@ -58,4 +58,4 @@ void Anju_Fusion(Entity *this)
else {
UpdateAnimationSingleFrame(this);
}
}
}

View File

@ -32,4 +32,4 @@ void Carlov(Entity *this)
this->frames.all = this->frames.all & 0xdf;
EnqueueSFX(0x7c);
}
}
}

View File

@ -71,4 +71,4 @@ void Carpenter_Head(Entity* this) {
void sub_080672b0(Entity *this, u32 param_2)
{
InitializeAnimation(this,*(u32 *)(param_2 + 4) + (this->animationState >> 1) + this->entityType.form * 8);
}
}

View File

@ -280,4 +280,4 @@ void ForestMinish_Fusion(Entity* this) {
} else {
GetNextFrame(this);
}
}
}

View File

@ -50,4 +50,4 @@ void Gentari_Fusion(Entity *this)
else {
UpdateAnimationSingleFrame(this);
}
}
}

View File

@ -237,4 +237,4 @@ void sub_08064050(Entity* arg0, struct_08064050* arg1) {
case 0x13:
arg1->unk2 = 3;
}
}
}

View File

@ -98,4 +98,4 @@ void MayorHagen_Fusion(Entity* this) {
} else {
UpdateAnimationSingleFrame(this);
}
}
}

View File

@ -18,4 +18,4 @@ void MoblinLady(Entity* this) {
else {
sub_0807DD94(this,0);
}
}
}

View File

@ -90,4 +90,4 @@ void Mutoh_Fusion(Entity* this) {
} else {
GetNextFrame(this);
}
}
}

View File

@ -50,4 +50,4 @@ void sub_08062B70(Entity *this)
this->action = 1;
sub_0805E584(this);
}
}
}

View File

@ -182,4 +182,4 @@ void Smith_Fusion(Entity* this) {
} else {
UpdateAnimationSingleFrame(this);
}
}
}

View File

@ -95,4 +95,4 @@ void Teachers_Fusion(Entity* this) {
} else {
GetNextFrame(this);
}
}
}

View File

@ -316,4 +316,4 @@ void Townsperson_Fusion(Entity* this) {
this->spriteSettings.b.draw = TRUE;
}
sub_08061CB4(this, 6);
}
}

View File

@ -23,4 +23,4 @@ void Wheaton(Entity *this) {
}
sub_0807DD94(this, 0);
}
}

View File

@ -136,4 +136,4 @@ void sub_0806C944(Entity* this) {
}
}
TextboxNoOverlap(gUnk_08113B0C[iVar2], this);
}
}

View File

@ -22,4 +22,4 @@ void ZeldaFollower(Entity *this)
} else {
this->spriteSettings.b.draw = FALSE;
}
}
}

View File

@ -24,4 +24,4 @@ void Archway(Entity *this)
this->spritePriority.b0 = (this->spritePriority.b0 & 0xf8) | 1;
}
}
}
}

View File

@ -83,4 +83,4 @@ void sub_0809EE34(Entity *this)
{
this->action = 1;
this->field_0x74.HWORD = this->actionDelay << 2;
}
}

View File

@ -61,4 +61,4 @@ void sub_080A0960(Entity *this, u32 arg1)
puVar1 = &gUnk_0812497A;
}
sub_0801AF18(puVar1, COORD_TO_TILE(this), 1);
}
}

View File

@ -142,4 +142,4 @@ void sub_0809EC08(Entity* this) {
}
}
void nullsub_126(Entity* this) { }
void nullsub_126(Entity* this) { }

View File

@ -65,4 +65,4 @@ void sub_08097B24(Entity *this)
temp = temp3[(temp2 >> 5) & 7];
sub_0805EC9C(this, temp, temp, 0);
}
}

View File

@ -112,4 +112,4 @@ void sub_080A0870(Entity *this)
SetTile(this->field_0x76.HWORD, this->field_0x74.HWORD - 1, this->collisionLayer);
SetTile(this->field_0x78.HWORD, this->field_0x74.HWORD, this->collisionLayer);
SetTile(this->field_0x7a.HWORD, this->field_0x74.HWORD + 1, this->collisionLayer);
}
}

View File

@ -44,4 +44,4 @@ void MineralWaterSource_Init(Entity *this) {
void sub_080973DC(Entity *this) {
this->bitfield = 0;
}
}

View File

@ -37,4 +37,4 @@ void sub_08089B18(Entity *this)
}
}
EnqueueSFX(0x124);
}
}

View File

@ -23,4 +23,4 @@ void Object7E(Entity *this) {
this->spriteSettings.b.draw = this->attachedEntity->spriteSettings.b.draw;
this->frameIndex = this->attachedEntity->frameIndex + 0x1f;
}
}
}

View File

@ -41,4 +41,4 @@ void Object9E(Entity *this)
UpdateSpriteForCollisionLayer(this);
}
}
}
}

View File

@ -36,4 +36,4 @@ void ObjectA(Entity *this) {
sub_080526F8(-1);
DeleteThisEntity();
}
}
}

View File

@ -51,4 +51,4 @@ void sub_080A0640(Entity* this) {
CopyPosition(this->parent, this);
}
this->height.HALF.HI = 0;
}
}

View File

@ -35,4 +35,4 @@ void ObjectB2(Entity* this) {
}
}
GetNextFrame(this);
}
}

View File

@ -18,4 +18,4 @@ void sub_0809F2A0(Entity *this)
SetTile(0x4069, COORD_TO_TILE(this), this->collisionLayer);
}
void nullsub_537() {}
void nullsub_537() {}

View File

@ -153,4 +153,4 @@ u32 sub_080854A8(Entity* this) {
}
return FALSE;
}
}

View File

@ -55,4 +55,4 @@ void sub_0808A4D0(Entity *this)
if (this->frames.b.f3) {
DeleteEntity(this);
}
}
}

View File

@ -28,4 +28,4 @@ void sub_080933FC(Entity *this)
this->interactType = 0;
TextboxNoOverlap(gUnk_081228B8[this->entityType.form], this);
}
}
}

View File

@ -85,4 +85,4 @@ void sub_0809E918(Entity* this) {
void sub_0809E96C(Entity *this)
{
CreateMinishEntrance(COORD_TO_TILE_OFFSET(this, 0x20, 0x8));
}
}

View File

@ -82,4 +82,4 @@ void sub_08050110(u32 param_1, u32 param_2, u32 fadeType, u32 fadeSpeed)
gFadeControl.field_0x16 = 0x3f3f;
gFadeControl.field_0x18 = 0;
DoFade(fadeType, fadeSpeed);
}
}

View File

@ -26,4 +26,4 @@ void sub_0807C998(u32* a1) {
sub_0807C960(gMetatilesBottom - 0x1000, a1[1]);
sub_0807C960(gMetatilesTop, a1[2]);
sub_0807C960(gMetatilesTop - 0x1000, a1[3]);
}
}

View File

@ -58,4 +58,4 @@ void sub_080A3BD0(void)
sub_080A70AC(&gUnk_081280DC);
sub_080A7114(1);
DoFade(6, 8);
}
}

View File

@ -23,4 +23,4 @@ void sub_080A5574(void)
{
gUnk_08128BF8[gMenu.menuType]();
sub_080A57F4();
}
}