smallPesto

This commit is contained in:
theo3
2020-06-15 00:11:43 -07:00
parent 4d8721d19a
commit 8604daff6a
143 changed files with 240 additions and 350 deletions
+19
View File
@@ -0,0 +1,19 @@
#include "global.h"
#include "entity.h"
extern u32 CheckRectOnScreen(s16, s16, u32, u32);
extern void DeleteThisEntity();
void Object1C(Entity *this)
{
s32 iVar1;
if (this->action == 0) {
this->action = 1;
}
iVar1 = CheckRectOnScreen(this->field_0x80, this->field_0x82, 0x10, 0x10);
if (iVar1 == 0) {
this->parent->field_0x20 &= ~(1 << this->entityType.parameter2);
DeleteThisEntity();
}
}
+18
View File
@@ -0,0 +1,18 @@
#include "global.h"
#include "entity.h"
void DeleteThisEntity();
extern void (*gUnk_081208A0[])(Entity*);
void Object1D(Entity *this)
{
gUnk_081208A0[this->action](this);
}
void sub_080874F8(Entity* this)
{
DeleteThisEntity();
}
void nullsub_117(){}
+36
View File
@@ -0,0 +1,36 @@
#include "global.h"
#include "entity.h"
extern void CreateItemEntity(u32, u32, u32);
extern void DeleteThisEntity();
extern void sub_08080CB4(Entity*);
extern void (*gUnk_08124824[])(Entity*);
extern Entity gLinkEntity;
void ObjectA8(Entity *this)
{
if ((this->bitfield & 0x80) != 0) {
switch(this->bitfield & 0x7f) {
case 0:
case 1:
case 4:
case 5:
case 6:
case 8:
case 9:
case 10:
case 0xb:
case 0xc:
case 0x1e:
case 0x1f:
this->action = 5;
this->attachedEntity = &gLinkEntity;
CreateItemEntity((this->entityType).parameter1, 0, 0);
DeleteThisEntity();
}
}
gUnk_08124824[this->action](this);
sub_08080CB4(this);
}
+69
View File
@@ -0,0 +1,69 @@
#include "global.h"
#include "entity.h"
extern u32 GetNextFunction(Entity*);
extern u32 sub_08004274(Entity*);
extern u32 sub_0806F520(Entity*);
extern void sub_0806F4E8(Entity*);
extern u32 sub_0806F3E4();
extern void sub_0804A7D4(Entity*);
extern void sub_0804A720(Entity*);
extern void sub_080317F8(Entity*);
extern void (*gUnk_080CE530[])(Entity*);
extern void (*gUnk_080CE548[])(Entity*);
extern void (*gUnk_080CE554[])(Entity*);
void SmallPesto(Entity *this)
{
gUnk_080CE530[GetNextFunction(this)](this);
}
void sub_08031680(Entity *this)
{
gUnk_080CE548[this->action](this);
}
void nullsub_152(){}
void sub_0803169C(Entity *this)
{
s32 iVar1;
sub_08004274(this);
iVar1 = sub_0806F520(this);
if (iVar1 == 0) {
this->action = 1;
this->previousActionFlag = 0;
this->flags = this->flags | 0x80;
this->nonPlanarMovement = 0x40;
this->field_0xf = 1;
}
else {
gUnk_080CE554[this->previousActionFlag](this);
}
}
void sub_080316DC(Entity *this)
{
this->previousActionFlag = 1;
this->filler[1] = 0x3c;
}
void sub_080316E8(Entity *this)
{
sub_0806F4E8(this);
}
void sub_080316F0(Entity *this)
{
if (sub_0806F3E4()) {
sub_0804A7D4(this);
}
}
void sub_08031704(Entity *this)
{
sub_0804A720(this);
sub_080317F8(this);
}