mirror of
https://github.com/zeldaret/tmc
synced 2026-06-16 23:00:31 -04:00
start enemy4D.c
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "enemy.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void sub_0803EE8C(Entity*);
|
||||
|
||||
extern void (*const gUnk_080D0880[])(Entity*);
|
||||
extern void (*const gUnk_080D0898[])(Entity*);
|
||||
|
||||
void Enemy4D(Entity* this) {
|
||||
EnemyFunctionHandler(this, gUnk_080D0880);
|
||||
}
|
||||
|
||||
void sub_0803EAFC(Entity* this) {
|
||||
gUnk_080D0898[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0803EB14(Entity* this) {
|
||||
sub_0804AA30(this, gUnk_080D0880);
|
||||
}
|
||||
|
||||
void sub_0803EB24(Entity* this) {
|
||||
sub_08001324(this);
|
||||
sub_0803EAFC(this);
|
||||
}
|
||||
|
||||
void sub_0803EB34(Entity* this) {
|
||||
CreateDeathFx(this, 0xff, 0x57);
|
||||
}
|
||||
|
||||
void nullsub_21() {
|
||||
}
|
||||
|
||||
void sub_0803EB44(Entity* this) {
|
||||
Entity* pEVar1;
|
||||
|
||||
sub_0804A720(this);
|
||||
pEVar1 = sub_0804A98C(this, 0x19, 0);
|
||||
if (pEVar1 != NULL) {
|
||||
pEVar1->parent = this;
|
||||
this->attachedEntity = pEVar1;
|
||||
this->flags |= 0x80;
|
||||
this->spriteSettings.b.draw = TRUE;
|
||||
this->animationState = 2;
|
||||
*((u8*)&this->field_0x7a + 1) = 0;
|
||||
*(u8*)&this->field_0x7c = 0;
|
||||
*((u8*)&this->field_0x7c + 2) = 0x28;
|
||||
*((u8*)&this->field_0x7c + 3) = 0xfe;
|
||||
this->field_0x80.HWORD = this->x.HALF.HI;
|
||||
this->field_0x82.HWORD = this->y.HALF.HI;
|
||||
InitAnimationForceUpdate(this, this->animationState << 2);
|
||||
sub_0803EE8C(this);
|
||||
}
|
||||
}
|
||||
+4
-5
@@ -3,7 +3,6 @@
|
||||
#include "enemy.h"
|
||||
#include "player.h"
|
||||
|
||||
extern void sub_0804AA30(Entity*, void *);
|
||||
extern u32 sub_0806F520(Entity*);
|
||||
extern void sub_0806F4E8(Entity*);
|
||||
extern u32 sub_0806F3E4(Entity*);
|
||||
@@ -17,9 +16,9 @@ extern u32 sub_0806FCB8(Entity*, s32, s32, u32);
|
||||
extern u32 sub_08049FA0(Entity*);
|
||||
extern u32 sub_08049EE4(Entity*);
|
||||
|
||||
extern void (*gUnk_080CB69C[])(Entity*);
|
||||
extern void (*gUnk_080CB6B4[])(Entity*);
|
||||
extern void (*gUnk_080CB6C4[])(Entity*);
|
||||
extern void (*const gUnk_080CB69C[])(Entity*);
|
||||
extern void (*const gUnk_080CB6B4[])(Entity*);
|
||||
extern void (*const gUnk_080CB6C4[])(Entity*);
|
||||
|
||||
extern u8 gUnk_080CB6D0[];
|
||||
extern u16 gUnk_080CB6D6[];
|
||||
@@ -37,7 +36,7 @@ void sub_08021D80(Entity *this)
|
||||
|
||||
void sub_08021d98(Entity *this)
|
||||
{
|
||||
sub_0804AA30(this, &gUnk_080CB69C);
|
||||
sub_0804AA30(this, gUnk_080CB69C);
|
||||
}
|
||||
|
||||
void sub_08021DA8(Entity *this)
|
||||
|
||||
+30
-8
@@ -1,13 +1,35 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "menu.h"
|
||||
#include "room.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern u32* _call_via_r0(u32* func);
|
||||
extern u8 gMenu;
|
||||
extern u32* gUnk_080FF420;
|
||||
extern void (*const gUnk_080FF420[])();
|
||||
extern void sub_0804B0B0(u32, u32);
|
||||
extern void sub_08055B70(u32, u32, u32, u32);
|
||||
|
||||
void sub_08055E08() {
|
||||
u32** arr = &gUnk_080FF420;
|
||||
u8 i = gMenu;
|
||||
i = *(&gMenu + 6);
|
||||
_call_via_r0(arr[i]);
|
||||
struct {
|
||||
/*0x00*/ u8 unk0;
|
||||
/*0x10*/ u8 filler1[0x1B];
|
||||
/*0x1c*/ u8 unk1C;
|
||||
/*0x1d*/ u8 unk1D;
|
||||
/*0x1e*/ u8 unk1E;
|
||||
/*0x1f*/ u8 unk1F;
|
||||
} gUnk_02000070 = {};
|
||||
|
||||
extern EntityData gUnk_080FF400;
|
||||
|
||||
void sub_08055E08(void) {
|
||||
gUnk_080FF420[gMenu.overlayType]();
|
||||
}
|
||||
|
||||
void sub_08055E24(void) {
|
||||
gMenu.overlayType++;
|
||||
gUnk_02000070.unk0 = 1;
|
||||
sub_0804B0B0(gMenu.field_0xc[2], gMenu.field_0xc[3]);
|
||||
LoadRoomEntityList(&gUnk_080FF400);
|
||||
sub_08055B70(gMenu.field_0x4, 0, 0, 0);
|
||||
DoFade(4, 0x10);
|
||||
}
|
||||
|
||||
void nullsub_493(void) {}
|
||||
Reference in New Issue
Block a user