mirror of
https://github.com/zeldaret/tmc
synced 2026-07-11 15:28:41 -04:00
function renaming
This commit is contained in:
+2
-2
@@ -38,7 +38,7 @@ void sub_08086AF8(Entity *ent)
|
||||
{
|
||||
sub_08087380();
|
||||
ent->parameter3 = 0;
|
||||
ent->cutsceneBeh = 290;
|
||||
ent->cutsceneBeh.HWORD = 290;
|
||||
}
|
||||
|
||||
//Dormant update
|
||||
@@ -53,7 +53,7 @@ void sub_08086B10(Entity *ent)
|
||||
if (event == 0) {
|
||||
return;
|
||||
}
|
||||
pFrame = &ent->cutsceneBeh;
|
||||
pFrame = &ent->cutsceneBeh.HWORD;
|
||||
if (*pFrame != 0) {
|
||||
*pFrame = *pFrame - 1;
|
||||
}
|
||||
|
||||
+9
-9
@@ -1,18 +1,18 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern void sub_0800129E();
|
||||
extern void sub_0804A9AC();
|
||||
extern void EnemyFunctionHandler();
|
||||
extern void SetChildOffset();
|
||||
extern void sub_0804AA30();
|
||||
extern void sub_0804A9FC();
|
||||
extern void sub_0804A7D4();
|
||||
extern void CreateDeathFx();
|
||||
extern void sub_0801ECFC();
|
||||
extern u32 sub_0806F520();
|
||||
extern void UpdateSprite();
|
||||
extern void InitializeAnimation();
|
||||
extern void sub_0806F4E8();
|
||||
extern void sub_0806F3E4();
|
||||
extern void UpdateSpriteAnimation();
|
||||
extern void InitializeAnimationAnimation();
|
||||
extern void sub_0804A720();
|
||||
extern u32 Random();
|
||||
extern void sub_0801ED14();
|
||||
@@ -26,8 +26,8 @@ extern u8 gUnk_080CA170[8];
|
||||
//Main
|
||||
void sub_0801EAB0(Entity *ent)
|
||||
{
|
||||
sub_0800129E(ent, gOctorok);
|
||||
sub_0804A9AC(ent, 0, 1, -16);
|
||||
EnemyFunctionHandler(ent, gOctorok);
|
||||
SetChildOffset(ent, 0, 1, -16);
|
||||
}
|
||||
|
||||
//Idle
|
||||
@@ -62,7 +62,7 @@ void sub_0801EB2C(Entity *ent)
|
||||
|
||||
if ((ent->previousActionFlag < 3) && (iVar1 = sub_0806F520(ent), iVar1 == 0)) {
|
||||
sub_0801ECFC(ent);
|
||||
UpdateSprite(ent, ent->animationState);
|
||||
InitializeAnimation(ent, ent->animationState);
|
||||
}
|
||||
else {
|
||||
gUnk_080CA158[ent->previousActionFlag](ent);
|
||||
@@ -88,7 +88,7 @@ void sub_0801EB7C(Entity *ent)
|
||||
void sub_0801EB84(Entity *ent)
|
||||
{
|
||||
ent->flags = ent->flags & 127;
|
||||
UpdateSpriteAnimation(ent, 2);
|
||||
InitializeAnimationAnimation(ent, 2);
|
||||
}
|
||||
|
||||
void nullsub_3()
|
||||
@@ -114,7 +114,7 @@ void sub_0801EBC8(Entity *ent)
|
||||
ent->animationState = (ent->entityType).parameter1 == 2 ? (ent->entityType).parameter1 : Random() & 3;
|
||||
ent->filler[0] = 18;
|
||||
sub_0801ECFC(ent);
|
||||
UpdateSprite(ent,ent->animationState);
|
||||
InitializeAnimation(ent,ent->animationState);
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern void UpdateSpriteOrderAndFlip(Entity *);
|
||||
extern void InitializeAnimationOrderAndFlip(Entity *);
|
||||
|
||||
void PositionRelative(Entity *source, Entity *target, s32 offsetX, s32 offsetY) { //r0, r1, r2, r3
|
||||
s32 x;
|
||||
@@ -15,5 +15,5 @@ void PositionRelative(Entity *source, Entity *target, s32 offsetX, s32 offsetY)
|
||||
|
||||
target->height = source->height; //ldr
|
||||
target->collisionLayer = source->collisionLayer;
|
||||
UpdateSpriteOrderAndFlip(target);
|
||||
InitializeAnimationOrderAndFlip(target);
|
||||
}
|
||||
+171
-7
@@ -1,14 +1,178 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern void sub_0804A9AC();
|
||||
extern void sub_0800129E();
|
||||
typedef struct {
|
||||
void * field_0x0;
|
||||
void * entityCount;
|
||||
u8 freezeTime;
|
||||
} EntityHandler;
|
||||
|
||||
extern void gUnk_080D16A4(void);
|
||||
extern void EnemyFunctionHandler(Entity *, void *);
|
||||
extern void SetChildOffset(Entity *, u32, u32, u32);
|
||||
extern void sub_0804AA30(Entity *, void *);
|
||||
extern void sub_0804A9FC(Entity *, u32);
|
||||
extern void sub_0804A720(Entity *);
|
||||
extern void InitializeAnimation(Entity *, u32);
|
||||
extern void sub_08044FF8(Entity *);
|
||||
extern u32 Random(void);
|
||||
extern void sub_08004274(Entity *);
|
||||
extern u32 sub_0806FA04(u32, u32);
|
||||
extern u32 sub_08049FA0(Entity *);
|
||||
extern u32 sub_08049EE4(Entity *);
|
||||
extern u32 sub_080AEF88(void);
|
||||
extern Entity * CreateEnemy(u32, u32);
|
||||
|
||||
void Slime(Entity *ent)
|
||||
|
||||
extern void (*gUnk_080D16BC[])(Entity *);
|
||||
extern void (*gUnk_080D16A4[])(Entity *);
|
||||
|
||||
extern u8 gUnk_080D16D0;
|
||||
extern EntityHandler gUnk_03003DB8;
|
||||
|
||||
|
||||
void sub_08044F50(Entity *this)
|
||||
|
||||
{
|
||||
sub_0800129E(ent, &gUnk_080D16A4);
|
||||
sub_0804A9AC(ent,0,1,-12);
|
||||
}
|
||||
EnemyFunctionHandler(this, &gUnk_080D16A4);
|
||||
SetChildOffset(this,0,1,-12);
|
||||
}
|
||||
|
||||
void sub_08044F70(Entity *this)
|
||||
{
|
||||
gUnk_080D16BC[this->action](this);
|
||||
}
|
||||
|
||||
void sub_08044F88(Entity *this)
|
||||
{
|
||||
if ((this->currentHealth != 0) && (this->cutsceneBeh.HALF.LO != this->currentHealth)) {
|
||||
this->action = 4;
|
||||
}
|
||||
else {
|
||||
sub_0804AA30(this,&gUnk_080D16A4);
|
||||
}
|
||||
|
||||
if (this->field_0x43 != 0) {
|
||||
sub_0804A9FC(this,28);
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_171(){}
|
||||
|
||||
void sub_08044FC8(Entity *this)
|
||||
{
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.ss0 = 1;
|
||||
this->nonPlanarMovement = 128;
|
||||
sub_0804A720(this);
|
||||
InitializeAnimation(this, 0);
|
||||
sub_08044FF8(this);
|
||||
}
|
||||
|
||||
void sub_08044FF8(Entity *this)
|
||||
{
|
||||
u32 bVar1;
|
||||
|
||||
this->action = 2;
|
||||
bVar1 = Random();
|
||||
this->parameter3 = (bVar1 & 31) + 30;
|
||||
this->cutsceneBeh.HALF.LO = this->currentHealth;
|
||||
}
|
||||
|
||||
void sub_08045018(Entity *this)
|
||||
{
|
||||
u32 cVar1;
|
||||
u32 param3;
|
||||
u32 iVar3;
|
||||
u32 randValue;
|
||||
|
||||
sub_08004274(this);
|
||||
param3 = this->parameter3 -= 1;
|
||||
if (param3 == 0) {
|
||||
this->action = 3;
|
||||
this->parameter3 = 1;
|
||||
if (0 < this->nonPlanarMovement) {
|
||||
this->parameter3 = sub_0806FA04(4096, this->nonPlanarMovement) >> 8;
|
||||
}
|
||||
iVar3 = sub_08049FA0(this);
|
||||
if ((iVar3 == 0) && (randValue = Random(), (randValue & 3) != 0)) {
|
||||
cVar1 = sub_08049EE4(this);
|
||||
this->direction = (cVar1 + 0xfc + (Random() & 8)) & 24;
|
||||
return;
|
||||
}
|
||||
this->direction = Random() & 24;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08045088(Entity *this)
|
||||
{
|
||||
u8 bVar1;
|
||||
|
||||
sub_080AEF88();
|
||||
sub_08004274(this);
|
||||
bVar1 = this->parameter3 -= 1;
|
||||
if (bVar1 == 0) {
|
||||
this->action = 1;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void sub_080450A8(Entity *this)
|
||||
|
||||
{
|
||||
u8 bVar1;
|
||||
u32 uVar2;
|
||||
s32 iVar3;
|
||||
s32 iVar4;
|
||||
Entity *pEVar5;
|
||||
Entity **ppEVar6;
|
||||
s32 dividend;
|
||||
u32 uVar7;
|
||||
Entity *local_r6_72;
|
||||
u32 divisor;
|
||||
u8 *pcVar8;
|
||||
Entity *local_2c [4];
|
||||
|
||||
ppEVar6 = local_2c;
|
||||
bVar1 = (&gUnk_080D16D0)[(this->entityType).parameter1];
|
||||
divisor = (u32)bVar1;
|
||||
if ((int)gUnk_03003DB8.entityCount < (int)(72 - divisor)) {
|
||||
uVar7 = divisor;
|
||||
if (bVar1 != 0) {
|
||||
do {
|
||||
uVar2 = CreateEnemy(87,this->entityType.parameter1);
|
||||
*ppEVar6 = uVar2;
|
||||
ppEVar6 = ppEVar6 + 1;
|
||||
uVar7 = uVar7 - 1;
|
||||
} while (uVar7 != 0);
|
||||
}
|
||||
pcVar8 = "\x06";
|
||||
iVar4 = 0;
|
||||
if (bVar1 != 0) {
|
||||
do {
|
||||
local_r6_72 = local_2c[iVar4];
|
||||
dividend = iVar4 + 1;
|
||||
iVar3 = Div(dividend,divisor);
|
||||
local_r6_72->attachedEntity = local_2c[iVar3];
|
||||
iVar4 = Div(iVar4 + divisor + -1,divisor);
|
||||
local_r6_72->parent = local_2c[iVar4];
|
||||
(local_r6_72->entityType).parameter2 = 1;
|
||||
local_r6_72->height.WORD = 0;
|
||||
local_r6_72->hurtBlinkTime = 240;
|
||||
sub_08045178(this,local_r6_72,*pcVar8,pcVar8[1]);
|
||||
pcVar8 = pcVar8 + 2;
|
||||
iVar4 = dividend;
|
||||
} while (dividend < divisor);
|
||||
}
|
||||
pEVar5 = CreateFx(this,2,0);
|
||||
if (pEVar5 != NULL) {
|
||||
CopyPosition(this,pEVar5);
|
||||
}
|
||||
DeleteEnemy(this);
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_080450A8(Entity *this) {
|
||||
asm(".include \"asm/non_matching/slime/sub_080450A8.inc\"");
|
||||
}
|
||||
#endif
|
||||
+6
-6
@@ -2,7 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "textbox.h"
|
||||
|
||||
extern void UpdateSprite(Entity *, u32);
|
||||
extern void InitializeAnimation(Entity *, u32);
|
||||
extern void sub_08078778(Entity *);
|
||||
extern void sub_0805E47C(Entity *);
|
||||
extern void sub_08004274(Entity *);
|
||||
@@ -24,7 +24,7 @@ extern void (*gStampBehaviors2[2])(Entity*);
|
||||
extern TextBox gTextBox;
|
||||
extern u32 gUnk_0810C2E4;
|
||||
|
||||
extern void UpdateSprite(Entity *, u32);
|
||||
extern void InitializeAnimation(Entity *, u32);
|
||||
extern void sub_08078778(Entity *);
|
||||
extern void sub_0805E47C(Entity *);
|
||||
extern void sub_08004274(Entity *);
|
||||
@@ -60,7 +60,7 @@ void sub_08062BD4(Entity *ent)
|
||||
{
|
||||
ent->action = 1;
|
||||
ent->spriteSettings.b.ss0 = 1;
|
||||
UpdateSprite(ent, 0);
|
||||
InitializeAnimation(ent, 0);
|
||||
sub_08078778(ent);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ void sub_08062C24(Entity *ent)
|
||||
{
|
||||
sub_08004274(ent);
|
||||
if ((ent->frames.all & 128) != 0) {
|
||||
UpdateSprite(ent, 4);
|
||||
InitializeAnimation(ent, 4);
|
||||
TextboxTryNoOverlap(2561);
|
||||
ent->action++;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ void sub_08062C54(Entity *ent)
|
||||
{
|
||||
if ((gTextBox.doTextBox & 127) == 0) {
|
||||
ent->action = 1;
|
||||
UpdateSprite(ent, 0);
|
||||
InitializeAnimation(ent, 0);
|
||||
sub_0805E584(ent);
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ void sub_08062C7C(Entity *ent)
|
||||
{
|
||||
ent->action = 1;
|
||||
sub_0807DD64(ent);
|
||||
UpdateSprite(ent, 0);
|
||||
InitializeAnimation(ent, 0);
|
||||
CreateFx(ent, 37, 0);
|
||||
sub_08062CA4(ent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user