mirror of
https://github.com/zeldaret/tmc
synced 2026-06-06 03:38:48 -04:00
Rename objects
This commit is contained in:
+24
-18
@@ -1,26 +1,32 @@
|
||||
#include "entity.h"
|
||||
/**
|
||||
* @file ambientClouds.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Ambient Clouds object
|
||||
*/
|
||||
#include "asm.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
|
||||
void sub_08089874(Entity* this);
|
||||
void sub_08089944(Entity* this);
|
||||
void sub_08089A7C(Entity* this);
|
||||
void sub_08089AE0(Entity* this);
|
||||
void AmbientClouds_Init(Entity* this);
|
||||
void AmbientClouds_Action1(Entity* this);
|
||||
void AmbientClouds_Action2(Entity* this);
|
||||
void AmbientClouds_Action3(Entity* this);
|
||||
|
||||
void AmbientClouds(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_08089874,
|
||||
sub_08089944,
|
||||
sub_08089A7C,
|
||||
sub_08089AE0,
|
||||
static void (*const AmbientClouds_Actions[])(Entity*) = {
|
||||
AmbientClouds_Init,
|
||||
AmbientClouds_Action1,
|
||||
AmbientClouds_Action2,
|
||||
AmbientClouds_Action3,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
AmbientClouds_Actions[this->action](this);
|
||||
UpdateAnimationVariableFrames(this, (Random() & 1) + 1);
|
||||
}
|
||||
|
||||
void sub_08089874(Entity* this) {
|
||||
void AmbientClouds_Init(Entity* this) {
|
||||
Entity* pEVar2;
|
||||
|
||||
#ifndef EU
|
||||
@@ -32,7 +38,7 @@ void sub_08089874(Entity* this) {
|
||||
this->action = 3;
|
||||
this->spriteRendering.b3 = 3;
|
||||
InitializeAnimation(this, 0);
|
||||
sub_08089AE0(this);
|
||||
AmbientClouds_Action3(this);
|
||||
return;
|
||||
} else {
|
||||
this->parent = NULL;
|
||||
@@ -70,7 +76,7 @@ void sub_08089874(Entity* this) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void sub_08089944(Entity* this) {
|
||||
void AmbientClouds_Action1(Entity* this) {
|
||||
int iVar1;
|
||||
Entity* pEVar2;
|
||||
|
||||
@@ -123,7 +129,7 @@ void sub_08089944(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08089A7C(Entity* this) {
|
||||
void AmbientClouds_Action2(Entity* this) {
|
||||
this->y.HALF.HI += this->type2 * -0x24;
|
||||
if (EntityInRectRadius(this, &gPlayerEntity, 0xf, 0xf)) {
|
||||
gPlayerState.field_0x14 = 1;
|
||||
@@ -137,7 +143,7 @@ void sub_08089A7C(Entity* this) {
|
||||
this->y.HALF.HI += this->type2 * 0x24;
|
||||
}
|
||||
|
||||
void sub_08089AE0(Entity* this) {
|
||||
void AmbientClouds_Action3(Entity* this) {
|
||||
if (EntityInRectRadius(this, &gPlayerEntity, 0xf, 0xf)) {
|
||||
gPlayerState.field_0x14 = 1;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
#include "entity.h"
|
||||
/**
|
||||
* @file angryStatue.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Angry Statue object
|
||||
*/
|
||||
#include "asm.h"
|
||||
#include "entity.h"
|
||||
#include "physics.h"
|
||||
#include "projectile.h"
|
||||
#include "room.h"
|
||||
#include "sound.h"
|
||||
#include "projectile.h"
|
||||
#include "physics.h"
|
||||
|
||||
extern Hitbox gUnk_080FD178;
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @file archway.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Archway object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "game.h"
|
||||
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
/**
|
||||
* @file backgroundCloud.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief BackgroundCloud object
|
||||
*/
|
||||
#include "object.h"
|
||||
|
||||
void sub_0808F658(Entity*);
|
||||
void sub_0808F6E0(Entity*);
|
||||
void sub_0808F70C(Entity*);
|
||||
void BackgroundCloud_Init(Entity*);
|
||||
void BackgroundCloud_Action1(Entity*);
|
||||
void BackgroundCloud_Action2(Entity*);
|
||||
|
||||
void BackgroundCloud(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_0808F658,
|
||||
sub_0808F6E0,
|
||||
sub_0808F70C,
|
||||
static void (*const BackgroundCloud_Actions[])(Entity*) = {
|
||||
BackgroundCloud_Init,
|
||||
BackgroundCloud_Action1,
|
||||
BackgroundCloud_Action2,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
BackgroundCloud_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0808F658(Entity* this) {
|
||||
void BackgroundCloud_Init(Entity* this) {
|
||||
static const u8 gUnk_08121EB0[] = { 0x30, 0x28, 0x20 };
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
@@ -31,14 +37,14 @@ void sub_0808F658(Entity* this) {
|
||||
this->subAction = 0;
|
||||
}
|
||||
|
||||
void sub_0808F6E0(Entity* this) {
|
||||
void BackgroundCloud_Action1(Entity* this) {
|
||||
LinearMoveUpdate(this);
|
||||
|
||||
if ((s16)this->x.HALF.HI < (s16)this->field_0x78.HWORD || (s16)this->x.HALF.HI > (s16)this->field_0x7a.HWORD)
|
||||
this->action = 2;
|
||||
}
|
||||
|
||||
void sub_0808F70C(Entity* this) {
|
||||
void BackgroundCloud_Action2(Entity* this) {
|
||||
static const u8 gUnk_08121EB3[] = { 0x8, 0x28, 0x48, 0x98, 0 };
|
||||
if (this->subAction == 0) {
|
||||
this->subAction = 1;
|
||||
|
||||
+18
-12
@@ -1,22 +1,28 @@
|
||||
#include "object.h"
|
||||
/**
|
||||
* @file bakerOven.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Baker Oven object
|
||||
*/
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
|
||||
extern void SoundReqClipped(Entity*, u32);
|
||||
void sub_0809CDF0(Entity*);
|
||||
void sub_0809CC74(Entity*);
|
||||
void sub_0809CD0C(Entity*);
|
||||
void sub_0809CDB4(Entity*);
|
||||
void BakerOven_Init(Entity*);
|
||||
void BakerOven_Action1(Entity*);
|
||||
void BakerOven_Action2(Entity*);
|
||||
|
||||
void BakerOven(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_0809CC74,
|
||||
sub_0809CD0C,
|
||||
sub_0809CDB4,
|
||||
static void (*const BakerOven_Actions[])(Entity*) = {
|
||||
BakerOven_Init,
|
||||
BakerOven_Action1,
|
||||
BakerOven_Action2,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
BakerOven_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0809CC74(Entity* this) {
|
||||
void BakerOven_Init(Entity* this) {
|
||||
u32 i;
|
||||
Entity* ent;
|
||||
|
||||
@@ -46,7 +52,7 @@ void sub_0809CC74(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809CD0C(Entity* this) {
|
||||
void BakerOven_Action1(Entity* this) {
|
||||
u8* frames;
|
||||
|
||||
if (this->type) {
|
||||
@@ -76,7 +82,7 @@ void sub_0809CD0C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809CDB4(Entity* this) {
|
||||
void BakerOven_Action2(Entity* this) {
|
||||
/* Reset cloud position and start animation. */
|
||||
if (--this->timer == 0) {
|
||||
this->action = 1;
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @file barrelInside.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Barrel Inside object
|
||||
*/
|
||||
#include "entity.h"
|
||||
|
||||
const u8 gUnk_08120C80[];
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
/**
|
||||
* @file object36.c
|
||||
* @file barrelSpiderweb.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object36 object
|
||||
* @brief Barrel Spiderweb object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "hitbox.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
} Object36Entity;
|
||||
} BarrelSpiderwebEntity;
|
||||
|
||||
void sub_0808BB30(Object36Entity*);
|
||||
void sub_0808BC3C(Object36Entity*);
|
||||
void sub_0808BD14(Object36Entity*);
|
||||
void sub_0808BDB0(Object36Entity*);
|
||||
void sub_0808BBE0(Object36Entity*);
|
||||
void sub_0808BD00(Object36Entity*);
|
||||
void BarrelSpiderweb_Init(BarrelSpiderwebEntity*);
|
||||
void BarrelSpiderweb_Action1(BarrelSpiderwebEntity*);
|
||||
void BarrelSpiderweb_Action2(BarrelSpiderwebEntity*);
|
||||
void sub_0808BDB0(BarrelSpiderwebEntity*);
|
||||
void sub_0808BBE0(BarrelSpiderwebEntity*);
|
||||
void sub_0808BD00(BarrelSpiderwebEntity*);
|
||||
|
||||
void Object36(Object36Entity* this) {
|
||||
static void (*const gUnk_08121440[])(Object36Entity*) = {
|
||||
sub_0808BB30,
|
||||
sub_0808BC3C,
|
||||
sub_0808BD14,
|
||||
void BarrelSpiderweb(BarrelSpiderwebEntity* this) {
|
||||
static void (*const BarrelSpiderweb_Actions[])(BarrelSpiderwebEntity*) = {
|
||||
BarrelSpiderweb_Init,
|
||||
BarrelSpiderweb_Action1,
|
||||
BarrelSpiderweb_Action2,
|
||||
};
|
||||
gUnk_08121440[super->action](this);
|
||||
BarrelSpiderweb_Actions[super->action](this);
|
||||
}
|
||||
|
||||
void sub_0808BB30(Object36Entity* this) {
|
||||
void BarrelSpiderweb_Init(BarrelSpiderwebEntity* this) {
|
||||
if (CheckGlobalFlag(LV1TARU_OPEN)) {
|
||||
LoadGfxGroup(0x4a);
|
||||
DeleteThisEntity();
|
||||
@@ -57,7 +57,7 @@ void sub_0808BB30(Object36Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808BBE0(Object36Entity* this) {
|
||||
void sub_0808BBE0(BarrelSpiderwebEntity* this) {
|
||||
static const u16 gUnk_0812144C[] = { 192, 256, 208, 240, 224, 224, 240, 208, 256, 192,
|
||||
256, 192, 240, 208, 224, 224, 208, 240, 192, 256 };
|
||||
static const u8 gUnk_08121474[] = {
|
||||
@@ -75,7 +75,7 @@ void sub_0808BBE0(Object36Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808BC3C(Object36Entity* this) {
|
||||
void BarrelSpiderweb_Action1(BarrelSpiderwebEntity* this) {
|
||||
s32 tmp;
|
||||
super->x.HALF.HI = gRoomControls.origin_x + 0x78;
|
||||
tmp = -0x170;
|
||||
@@ -109,13 +109,13 @@ void sub_0808BC3C(Object36Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808BD00(Object36Entity* this) {
|
||||
void sub_0808BD00(BarrelSpiderwebEntity* this) {
|
||||
SetGlobalFlag(LV1TARU_OPEN);
|
||||
SoundReq(SFX_SECRET);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void sub_0808BD14(Object36Entity* this) {
|
||||
void BarrelSpiderweb_Action2(BarrelSpiderwebEntity* this) {
|
||||
|
||||
if (super->subtimer != 0) {
|
||||
super->subtimer -= 8;
|
||||
@@ -140,7 +140,7 @@ void sub_0808BD14(Object36Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808BDB0(Object36Entity* this) {
|
||||
void sub_0808BDB0(BarrelSpiderwebEntity* this) {
|
||||
LinkedList* list = &gEntityLists[6];
|
||||
Entity* it = list->first;
|
||||
super->parent = NULL;
|
||||
@@ -4,7 +4,6 @@
|
||||
*
|
||||
* @brief Beanstalk object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
@@ -312,7 +311,7 @@ void Beanstalk_Action1Type8SubAction0(BeanstalkEntity* this) {
|
||||
this->unk_70 = COORD_TO_TILE(super);
|
||||
SetTile(0x4017, this->unk_70, 1);
|
||||
super->subAction = 1;
|
||||
obj = CreateObjectWithParent(super, OBJECT_15, 0, 0);
|
||||
obj = CreateObjectWithParent(super, CHUCHU_BOSS_PARTICLE, 0, 0);
|
||||
if (obj != NULL) {
|
||||
obj->y.HALF.HI = super->y.HALF.HI + 0x38;
|
||||
obj->spriteIndex = super->spriteIndex;
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
/**
|
||||
* @file object5B.c
|
||||
* @file bedCover.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object5B object
|
||||
* @brief Bed Cover object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unk_68[0x1a];
|
||||
/*0x82*/ u16 unk_82;
|
||||
/*0x84*/ ScriptExecutionContext* unk_84;
|
||||
} Object5BEntity;
|
||||
} BedCoverEntity;
|
||||
|
||||
void sub_080928C8(Object5BEntity*);
|
||||
void nullsub_119(Object5BEntity*);
|
||||
void sub_08092930(Object5BEntity*);
|
||||
void sub_08092940(Object5BEntity*);
|
||||
void sub_08092958(Object5BEntity*, ScriptExecutionContext*);
|
||||
void sub_080928C8(BedCoverEntity*);
|
||||
void nullsub_119(BedCoverEntity*);
|
||||
void sub_08092930(BedCoverEntity*);
|
||||
void sub_08092940(BedCoverEntity*);
|
||||
void sub_08092958(BedCoverEntity*, ScriptExecutionContext*);
|
||||
|
||||
void Object5B(Object5BEntity* this) {
|
||||
static void (*const gUnk_08122794[])(Object5BEntity*) = {
|
||||
void BedCover(BedCoverEntity* this) {
|
||||
static void (*const gUnk_08122794[])(BedCoverEntity*) = {
|
||||
sub_080928C8,
|
||||
nullsub_119,
|
||||
};
|
||||
static void (*const gUnk_0812279C[])(Object5BEntity*) = {
|
||||
static void (*const gUnk_0812279C[])(BedCoverEntity*) = {
|
||||
sub_08092930,
|
||||
sub_08092940,
|
||||
};
|
||||
@@ -39,7 +39,7 @@ void Object5B(Object5BEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080928C8(Object5BEntity* this) {
|
||||
void sub_080928C8(BedCoverEntity* this) {
|
||||
super->action = 1;
|
||||
super->spriteSettings.draw = 1;
|
||||
super->frameIndex = super->type;
|
||||
@@ -48,7 +48,7 @@ void sub_080928C8(Object5BEntity* this) {
|
||||
super->spriteOrientation.flipY = 2;
|
||||
switch (super->type) {
|
||||
case 2:
|
||||
CreateObjectWithParent(super, OBJECT_5B, 4, 0);
|
||||
CreateObjectWithParent(super, BED_COVER, 4, 0);
|
||||
break;
|
||||
case 4:
|
||||
super->spritePriority.b0 = 7;
|
||||
@@ -56,20 +56,20 @@ void sub_080928C8(Object5BEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_119(Object5BEntity* this) {
|
||||
void nullsub_119(BedCoverEntity* this) {
|
||||
}
|
||||
|
||||
void sub_08092930(Object5BEntity* this) {
|
||||
void sub_08092930(BedCoverEntity* this) {
|
||||
sub_080928C8(this);
|
||||
this->unk_82 = 0;
|
||||
}
|
||||
|
||||
void sub_08092940(Object5BEntity* this) {
|
||||
void sub_08092940(BedCoverEntity* this) {
|
||||
ExecuteScript(super, this->unk_84);
|
||||
sub_08092958(this, this->unk_84);
|
||||
}
|
||||
|
||||
void sub_08092958(Object5BEntity* this, ScriptExecutionContext* context) {
|
||||
void sub_08092958(BedCoverEntity* this, ScriptExecutionContext* context) {
|
||||
u32 tmp;
|
||||
while (context->postScriptActions != 0) {
|
||||
tmp = (~context->postScriptActions + 1) & context->postScriptActions;
|
||||
+14
-8
@@ -1,17 +1,23 @@
|
||||
/**
|
||||
* @file bell.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Bell object
|
||||
*/
|
||||
#include "object.h"
|
||||
|
||||
void sub_08097D90(Entity*);
|
||||
void sub_08097DCC(Entity*);
|
||||
void Bell_Init(Entity*);
|
||||
void Bell_Action1(Entity*);
|
||||
|
||||
void Bell(Entity* ent) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_08097D90,
|
||||
sub_08097DCC,
|
||||
static void (*const Bell_Actions[])(Entity*) = {
|
||||
Bell_Init,
|
||||
Bell_Action1,
|
||||
};
|
||||
actionFuncs[ent->action](ent);
|
||||
Bell_Actions[ent->action](ent);
|
||||
}
|
||||
|
||||
void sub_08097D90(Entity* ent) {
|
||||
void Bell_Init(Entity* ent) {
|
||||
ent->action = 1;
|
||||
ent->spriteSettings.draw = 1;
|
||||
ent->collisionLayer = 1;
|
||||
@@ -20,6 +26,6 @@ void sub_08097D90(Entity* ent) {
|
||||
InitAnimationForceUpdate(ent, 0);
|
||||
}
|
||||
|
||||
void sub_08097DCC(Entity* ent) {
|
||||
void Bell_Action1(Entity* ent) {
|
||||
UpdateAnimationSingleFrame(ent);
|
||||
}
|
||||
|
||||
@@ -1,28 +1,34 @@
|
||||
/**
|
||||
* @file bench.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Bench object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "player.h"
|
||||
#include "functions.h"
|
||||
#include "player.h"
|
||||
#include "sound.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
u8 filler[0x18];
|
||||
u16 tilePos;
|
||||
} Object81Entity;
|
||||
} BenchEntity;
|
||||
|
||||
void Object81_Init(Object81Entity*);
|
||||
void Object81_Action1(Object81Entity*);
|
||||
void Bench_Init(BenchEntity*);
|
||||
void Bench_Action1(BenchEntity*);
|
||||
|
||||
void Object81(Entity* this) {
|
||||
static void (*const actionFuncs[])(Object81Entity*) = {
|
||||
Object81_Init,
|
||||
Object81_Action1,
|
||||
void Bench(Entity* this) {
|
||||
static void (*const Bench_Actions[])(BenchEntity*) = {
|
||||
Bench_Init,
|
||||
Bench_Action1,
|
||||
};
|
||||
|
||||
actionFuncs[this->action]((Object81Entity*)this);
|
||||
Bench_Actions[this->action]((BenchEntity*)this);
|
||||
}
|
||||
|
||||
void Object81_Init(Object81Entity* this) {
|
||||
void Bench_Init(BenchEntity* this) {
|
||||
super->action = 1;
|
||||
super->timer = 0;
|
||||
this->tilePos = COORD_TO_TILE(super);
|
||||
@@ -35,5 +41,5 @@ void Object81_Init(Object81Entity* this) {
|
||||
sub_08000148(0x47, this->tilePos - 0x40, 1);
|
||||
}
|
||||
|
||||
void Object81_Action1(Object81Entity* this) {
|
||||
void Bench_Action1(BenchEntity* this) {
|
||||
}
|
||||
+13
-7
@@ -1,12 +1,18 @@
|
||||
/**
|
||||
* @file bigBarrel.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Big Barrel object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "asm.h"
|
||||
#include "common.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "save.h"
|
||||
#include "room.h"
|
||||
#include "asm.h"
|
||||
#include "sound.h"
|
||||
#include "common.h"
|
||||
#include "object.h"
|
||||
#include "room.h"
|
||||
#include "save.h"
|
||||
#include "sound.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -248,7 +254,7 @@ void sub_08088E74(BigBarrelEntity* this) {
|
||||
DeleteEntity(super);
|
||||
} else {
|
||||
if ((gRoomTransition.frameCount & 7U) == 0) {
|
||||
ent = CreateObjectWithParent(super, OBJECT_2A, 0, 0x1e);
|
||||
ent = CreateObjectWithParent(super, FLAME, 0, 0x1e);
|
||||
if (ent != NULL) {
|
||||
ent->updatePriority = 3;
|
||||
ent->spriteRendering.b3 = 0;
|
||||
@@ -279,7 +285,7 @@ void sub_08088F20(BigBarrelEntity* this) {
|
||||
super->action = 2;
|
||||
super->timer = 30;
|
||||
RequestPriorityDuration(super, 270);
|
||||
pEVar3 = CreateObject(OBJECT_2A, 1, 0);
|
||||
pEVar3 = CreateObject(FLAME, 1, 0);
|
||||
if (pEVar3 != NULL) {
|
||||
pEVar3->updatePriority = 3;
|
||||
pEVar3->x.HALF.HI = super->x.HALF.HI;
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "hitbox.h"
|
||||
#include "item.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -84,7 +84,7 @@ void BigIceBlock_Action2(BigIceBlockEntity* this) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
super->timer += 1;
|
||||
super->timer++;
|
||||
}
|
||||
tmp = gUnk_081237B0[super->timer >> 5];
|
||||
SetAffineInfo(super, 0x100, tmp, 0);
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
|
||||
+21
-15
@@ -1,29 +1,35 @@
|
||||
#include "global.h"
|
||||
/**
|
||||
* @file bigVortex.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Big Vortex object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
|
||||
void sub_08098E3C(Entity*);
|
||||
void sub_08098E88(Entity*);
|
||||
void sub_08098D1C(Entity*);
|
||||
void sub_08098D6C(Entity*);
|
||||
void sub_08098D9C(Entity*);
|
||||
void sub_08098DC4(Entity*);
|
||||
void sub_08098E34(Entity*);
|
||||
void BigVortex_Init(Entity*);
|
||||
void BigVortex_Action1(Entity*);
|
||||
void BigVortex_Action2(Entity*);
|
||||
void BigVortex_Action3(Entity*);
|
||||
void BigVortex_Action4(Entity*);
|
||||
|
||||
void BigVortex(Entity* this) {
|
||||
static void (*const gUnk_0812367C[])(Entity*) = {
|
||||
sub_08098D1C, sub_08098D6C, sub_08098D9C, sub_08098DC4, sub_08098E34,
|
||||
static void (*const BigVortex_Actions[])(Entity*) = {
|
||||
BigVortex_Init, BigVortex_Action1, BigVortex_Action2, BigVortex_Action3, BigVortex_Action4,
|
||||
};
|
||||
if (this->type == 0) {
|
||||
gUnk_0812367C[this->action](this);
|
||||
BigVortex_Actions[this->action](this);
|
||||
} else {
|
||||
sub_08098E3C(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08098D1C(Entity* this) {
|
||||
void BigVortex_Init(Entity* this) {
|
||||
u32 temp;
|
||||
this->action = 1;
|
||||
this->z.HALF.HI = -0x10;
|
||||
@@ -41,7 +47,7 @@ void sub_08098D1C(Entity* this) {
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
}
|
||||
|
||||
void sub_08098D6C(Entity* this) {
|
||||
void BigVortex_Action1(Entity* this) {
|
||||
Entity* ent;
|
||||
|
||||
if (CheckFlags(this->field_0x86.HWORD)) {
|
||||
@@ -54,7 +60,7 @@ void sub_08098D6C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08098D9C(Entity* this) {
|
||||
void BigVortex_Action2(Entity* this) {
|
||||
if (--this->timer == 0) {
|
||||
this->action = 3;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
@@ -62,7 +68,7 @@ void sub_08098D9C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08098DC4(Entity* this) {
|
||||
void BigVortex_Action3(Entity* this) {
|
||||
|
||||
if (sub_0800419C(this, &gPlayerEntity, 8, 8) != 0) {
|
||||
CopyPosition(this, &gPlayerEntity);
|
||||
@@ -82,7 +88,7 @@ void sub_08098DC4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
void sub_08098E34(Entity* this) {
|
||||
void BigVortex_Action4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
|
||||
+19
-13
@@ -1,10 +1,16 @@
|
||||
#include "save.h"
|
||||
#include "object.h"
|
||||
/**
|
||||
* @file bird.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Bird object
|
||||
*/
|
||||
#include "collision.h"
|
||||
#include "functions.h"
|
||||
#include "game.h"
|
||||
#include "item.h"
|
||||
#include "message.h"
|
||||
#include "game.h"
|
||||
#include "collision.h"
|
||||
#include "object.h"
|
||||
#include "save.h"
|
||||
|
||||
extern u16 script_EzloTalkOcarina[];
|
||||
|
||||
@@ -33,12 +39,12 @@ void Bird(Entity* this) {
|
||||
}
|
||||
|
||||
void Bird_Type0(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
static void (*const Bird_Type0_Actions[])(Entity*) = {
|
||||
Bird_Type0_Init,
|
||||
Bird_Type0_Action1,
|
||||
};
|
||||
|
||||
actionFuncs[this->action](this);
|
||||
Bird_Type0_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void Bird_Type0_Init(Entity* this) {
|
||||
@@ -80,11 +86,11 @@ void Bird_Type0_Action1(Entity* this) {
|
||||
}
|
||||
|
||||
void Bird_Type1(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
static void (*const Bird_Type1_Actions[])(Entity*) = {
|
||||
Bird_Type1_Init,
|
||||
Bird_Type1_Action1,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
Bird_Type1_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void Bird_Type1_Init(Entity* this) {
|
||||
@@ -95,11 +101,11 @@ void Bird_Type1_Init(Entity* this) {
|
||||
}
|
||||
|
||||
void Bird_Type1_Action1(Entity* this) {
|
||||
static void (*const subActionFuncs[])(Entity*) = {
|
||||
static void (*const Bird_Type1_Action1_Subactions[])(Entity*) = {
|
||||
Bird_Type1_Action1_Subaction0,
|
||||
Bird_Type1_Action1_Subaction1,
|
||||
};
|
||||
subActionFuncs[this->subAction](this);
|
||||
Bird_Type1_Action1_Subactions[this->subAction](this);
|
||||
}
|
||||
|
||||
void Bird_Type1_Action1_Subaction0(Entity* this) {
|
||||
@@ -134,11 +140,11 @@ void Bird_Type1_Action1_Subaction1(Entity* this) {
|
||||
}
|
||||
|
||||
void Bird_Type2(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
static void (*const Bird_Type2_Actions[])(Entity*) = {
|
||||
Bird_Type2_Init,
|
||||
Bird_Type2_Action1,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
Bird_Type2_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void Bird_Type2_Init(Entity* this) {
|
||||
@@ -325,7 +331,7 @@ void Bird_Type9(Entity* this) {
|
||||
ResetPlayerEventPriority();
|
||||
gPauseMenuOptions.disabled = 0;
|
||||
if (!CheckGlobalFlag(WARP_1ST)) {
|
||||
pEVar1 = CreateObject(OBJECT_69, 0, 0);
|
||||
pEVar1 = CreateObject(CUTSCENE_ORCHESTRATOR, 0, 0);
|
||||
if (pEVar1 != NULL) {
|
||||
*(ScriptExecutionContext**)&pEVar1->cutsceneBeh = StartCutscene(pEVar1, script_EzloTalkOcarina);
|
||||
SetGlobalFlag(WARP_1ST);
|
||||
|
||||
@@ -6,26 +6,26 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u32 unk_68;
|
||||
} BlockPushedEntity;
|
||||
|
||||
extern void (*const gUnk_0811F624[])(BlockPushedEntity*);
|
||||
extern void (*const BlockPushed_Actions[])(BlockPushedEntity*);
|
||||
extern const Hitbox* const gUnk_0811F64C[];
|
||||
|
||||
void sub_080832D8(u32, BlockPushedEntity*);
|
||||
void sub_080830B8(BlockPushedEntity*);
|
||||
|
||||
void BlockPushed(BlockPushedEntity* this) {
|
||||
gUnk_0811F624[super->action](this);
|
||||
BlockPushed_Actions[super->action](this);
|
||||
}
|
||||
|
||||
void sub_08082EB4(BlockPushedEntity* this) {
|
||||
void BlockPushed_Init(BlockPushedEntity* this) {
|
||||
u16 tmp;
|
||||
u32 pos;
|
||||
|
||||
@@ -90,7 +90,7 @@ void sub_08082EB4(BlockPushedEntity* this) {
|
||||
EnqueueSFX(SFX_10F);
|
||||
}
|
||||
|
||||
void sub_08083094(BlockPushedEntity* this) {
|
||||
void BlockPushed_Action1(BlockPushedEntity* this) {
|
||||
LinearMoveUpdate(super);
|
||||
sub_0800445C(super);
|
||||
if (--super->timer == 0) {
|
||||
@@ -164,9 +164,9 @@ void sub_080832D8(u32 param_1, BlockPushedEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void (*const gUnk_0811F624[])(BlockPushedEntity*) = {
|
||||
sub_08082EB4,
|
||||
sub_08083094,
|
||||
void (*const BlockPushed_Actions[])(BlockPushedEntity*) = {
|
||||
BlockPushed_Init,
|
||||
BlockPushed_Action1,
|
||||
};
|
||||
const Hitbox gUnk_0811F62C = { 0, 0, { 0, 0, 0, 0 }, 5, 4 };
|
||||
const Hitbox gUnk_0811F634 = { 0, 0, { 0, 0, 0, 0 }, 13, 12 };
|
||||
|
||||
+30
-24
@@ -1,48 +1,54 @@
|
||||
/**
|
||||
* @file board.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Board object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "asm.h"
|
||||
#include "player.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "player.h"
|
||||
#include "room.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
u8 filler[0x10];
|
||||
u16 unk78;
|
||||
u16 unk7a;
|
||||
u16 x;
|
||||
u16 y;
|
||||
u16 unk7c;
|
||||
u16 unk7e;
|
||||
u16 tile;
|
||||
u8 unk82;
|
||||
u8 unk83;
|
||||
u8 width;
|
||||
u8 height;
|
||||
} BoardEntity;
|
||||
|
||||
void Board_Init(BoardEntity*);
|
||||
void sub_08098BE0(BoardEntity*);
|
||||
void Board_Action1(BoardEntity*);
|
||||
void sub_08098BE8(BoardEntity*);
|
||||
bool32 sub_08098C30(BoardEntity*, Entity*);
|
||||
void sub_0807AAF8(Entity*, u32);
|
||||
|
||||
void Board(Entity* this) {
|
||||
static void (*const actionFuncs[])(BoardEntity*) = {
|
||||
static void (*const Board_Actions[])(BoardEntity*) = {
|
||||
Board_Init,
|
||||
sub_08098BE0,
|
||||
Board_Action1,
|
||||
};
|
||||
|
||||
actionFuncs[this->action]((BoardEntity*)this);
|
||||
Board_Actions[this->action]((BoardEntity*)this);
|
||||
}
|
||||
|
||||
void Board_Init(BoardEntity* this) {
|
||||
static const u8 gUnk_0812366C[] = { 0x10, 0x1e, 0xc, 0x6, 0x10, 0x6, 0x0, 0x0 };
|
||||
const u8* pbVar2 = &gUnk_0812366C[super->type * 2];
|
||||
static const u8 Board_Sizes[] = { 0x10, 0x1e, 0xc, 0x6, 0x10, 0x6, 0x0, 0x0 };
|
||||
const u8* size = &Board_Sizes[super->type * 2];
|
||||
|
||||
super->action = 1;
|
||||
super->spriteSettings.draw = 1;
|
||||
super->frameIndex = super->type;
|
||||
this->unk82 = pbVar2[0];
|
||||
this->unk83 = pbVar2[1];
|
||||
this->unk78 = super->x.HALF.HI - (this->unk82 >> 1);
|
||||
this->unk7a = super->y.HALF.HI - (this->unk83 >> 1);
|
||||
this->width = size[0];
|
||||
this->height = size[1];
|
||||
this->x = super->x.HALF.HI - (this->width >> 1);
|
||||
this->y = super->y.HALF.HI - (this->height >> 1);
|
||||
this->tile = COORD_TO_TILE(super);
|
||||
super->collisionLayer = 1;
|
||||
UpdateSpriteForCollisionLayer(super);
|
||||
@@ -53,7 +59,7 @@ void Board_Init(BoardEntity* this) {
|
||||
sub_08098BE8(this);
|
||||
}
|
||||
|
||||
void sub_08098BE0(BoardEntity* this) {
|
||||
void Board_Action1(BoardEntity* this) {
|
||||
sub_08098BE8(this);
|
||||
}
|
||||
|
||||
@@ -66,12 +72,12 @@ void sub_08098BE8(BoardEntity* this) {
|
||||
}
|
||||
|
||||
bool32 sub_08098C30(BoardEntity* this, Entity* ent) {
|
||||
u32 uVar1 = 0;
|
||||
u32 diffx = ent->x.HALF.HI - this->unk78;
|
||||
u32 diffy = ent->y.HALF.HI - this->unk7a;
|
||||
u32 result = FALSE;
|
||||
u32 diffX = ent->x.HALF.HI - this->x;
|
||||
u32 diffY = ent->y.HALF.HI - this->y;
|
||||
|
||||
if (diffx <= this->unk82 && diffy <= this->unk83) {
|
||||
uVar1 = 1;
|
||||
if (diffX <= this->width && diffY <= this->height) {
|
||||
result = TRUE;
|
||||
}
|
||||
return uVar1;
|
||||
return result;
|
||||
}
|
||||
|
||||
+22
-16
@@ -1,10 +1,16 @@
|
||||
/**
|
||||
* @file bollard.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Bollard object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "asm.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "asm.h"
|
||||
#include "sound.h"
|
||||
#include "room.h"
|
||||
#include "functions.h"
|
||||
#include "room.h"
|
||||
#include "sound.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -17,24 +23,24 @@ typedef struct {
|
||||
u16 flags;
|
||||
} BollardEntity;
|
||||
|
||||
void sub_0808B2AC(BollardEntity*);
|
||||
void sub_0808B2CC(BollardEntity*);
|
||||
void sub_0808B324(BollardEntity*);
|
||||
void sub_0808B344(BollardEntity*);
|
||||
void sub_0808B38C(BollardEntity*);
|
||||
void Bollard_Init(BollardEntity*);
|
||||
void Bollard_Action1(BollardEntity*);
|
||||
void Bollard_Action2(BollardEntity*);
|
||||
void Bollard_Action3(BollardEntity*);
|
||||
void Bollard_Action4(BollardEntity*);
|
||||
void sub_0808B41C(BollardEntity*);
|
||||
void sub_0808B3AC(BollardEntity*);
|
||||
void sub_0808B42C(BollardEntity*);
|
||||
|
||||
void Bollard(Entity* this) {
|
||||
static void (*const actionFuncs[])(BollardEntity*) = {
|
||||
sub_0808B2AC, sub_0808B2CC, sub_0808B324, sub_0808B344, sub_0808B38C,
|
||||
static void (*const Bollard_Actions[])(BollardEntity*) = {
|
||||
Bollard_Init, Bollard_Action1, Bollard_Action2, Bollard_Action3, Bollard_Action4,
|
||||
};
|
||||
|
||||
actionFuncs[this->action]((BollardEntity*)this);
|
||||
Bollard_Actions[this->action]((BollardEntity*)this);
|
||||
}
|
||||
|
||||
void sub_0808B2AC(BollardEntity* this) {
|
||||
void Bollard_Init(BollardEntity* this) {
|
||||
if (super->type2 == 0) {
|
||||
sub_0808B41C(this);
|
||||
sub_0808B3AC(this);
|
||||
@@ -43,7 +49,7 @@ void sub_0808B2AC(BollardEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808B2CC(BollardEntity* this) {
|
||||
void Bollard_Action1(BollardEntity* this) {
|
||||
if (super->type2 == 0) {
|
||||
if (CheckFlags(this->flags) == 0) {
|
||||
return;
|
||||
@@ -57,14 +63,14 @@ void sub_0808B2CC(BollardEntity* this) {
|
||||
EnqueueSFX(SFX_1A5);
|
||||
}
|
||||
|
||||
void sub_0808B324(BollardEntity* this) {
|
||||
void Bollard_Action2(BollardEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if (super->frame & ANIM_DONE) {
|
||||
sub_0808B42C(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808B344(BollardEntity* this) {
|
||||
void Bollard_Action3(BollardEntity* this) {
|
||||
if (super->type2 == 0) {
|
||||
if (CheckFlags(this->flags) != 0) {
|
||||
return;
|
||||
@@ -78,7 +84,7 @@ void sub_0808B344(BollardEntity* this) {
|
||||
EnqueueSFX(SFX_1A5);
|
||||
}
|
||||
|
||||
void sub_0808B38C(BollardEntity* this) {
|
||||
void Bollard_Action4(BollardEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if (super->frame & ANIM_DONE) {
|
||||
sub_0808B41C(this);
|
||||
|
||||
+21
-15
@@ -1,21 +1,27 @@
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "message.h"
|
||||
#include "item.h"
|
||||
#include "npc.h"
|
||||
/**
|
||||
* @file book.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Book object
|
||||
*/
|
||||
#include "collision.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
#include "message.h"
|
||||
#include "npc.h"
|
||||
#include "object.h"
|
||||
|
||||
extern void (*const BookActionFuncs[])(Entity*);
|
||||
extern void (*const Book_Actions[])(Entity*);
|
||||
extern s8 const gUnk_08123D94[];
|
||||
|
||||
u32 sub_0809B688(Entity*);
|
||||
void sub_0809B6B0(Entity*, Entity*);
|
||||
|
||||
void Book(Entity* this) {
|
||||
BookActionFuncs[this->action](this);
|
||||
Book_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0809B3C4(Entity* this) {
|
||||
void Book_Init(Entity* this) {
|
||||
u32 obtained = GetInventoryValue(this->type + ITEM_QST_BOOK1);
|
||||
if (this->type2 != 3) {
|
||||
if (obtained != 0) {
|
||||
@@ -74,7 +80,7 @@ void sub_0809B3C4(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809B4A8(Entity* this) {
|
||||
void Book_Action1(Entity* this) {
|
||||
sub_0800445C(this);
|
||||
|
||||
if (this->field_0x80.HALF.LO != 0) {
|
||||
@@ -105,7 +111,7 @@ void sub_0809B4A8(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809B524(Entity* this) {
|
||||
void Book_Action2(Entity* this) {
|
||||
if (--this->timer == 0) {
|
||||
if (--this->subtimer == 0) {
|
||||
this->action = 3;
|
||||
@@ -121,7 +127,7 @@ void sub_0809B524(Entity* this) {
|
||||
LinearMoveUpdate(this);
|
||||
}
|
||||
|
||||
void sub_0809B56C(Entity* this) {
|
||||
void Book_Action3(Entity* this) {
|
||||
Entity* fx;
|
||||
|
||||
if (sub_080044EC(this, 0x2800) != 1) {
|
||||
@@ -139,7 +145,7 @@ void sub_0809B56C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809B5B4(Entity* this) {
|
||||
void Book_Action4(Entity* this) {
|
||||
if (gPlayerState.flags & PL_MINISH) {
|
||||
sub_0800445C(this);
|
||||
} else if (IsCollidingPlayer(this)) {
|
||||
@@ -148,7 +154,7 @@ void sub_0809B5B4(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809B5EC(Entity* this) {
|
||||
void Book_Action5(Entity* this) {
|
||||
if (this->spriteSettings.draw == 1) {
|
||||
switch (this->subAction) {
|
||||
case 0: {
|
||||
@@ -223,8 +229,8 @@ void sub_0809B6B0(Entity* parent, Entity* this) {
|
||||
this->spritePriority.b0 = 3 - this->type;
|
||||
}
|
||||
|
||||
void (*const BookActionFuncs[])(Entity*) = {
|
||||
sub_0809B3C4, sub_0809B4A8, sub_0809B524, sub_0809B56C, sub_0809B5B4, sub_0809B5EC,
|
||||
void (*const Book_Actions[])(Entity*) = {
|
||||
Book_Init, Book_Action1, Book_Action2, Book_Action3, Book_Action4, Book_Action5,
|
||||
};
|
||||
|
||||
const s8 gUnk_08123D94[] = { -22, -20, -20, -20 };
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "hitbox.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -206,7 +206,7 @@ void sub_0808C5D0(BossDoorEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0808C650(Entity* this, u32 param_2) {
|
||||
Entity* obj = CreateObject(OBJECT_3A, 0, param_2);
|
||||
Entity* obj = CreateObject(WHITE_TRIANGLE_EFFECT, 0, param_2);
|
||||
if (obj != NULL) {
|
||||
obj->parent = this;
|
||||
gUnk_02036BB8 = FALSE;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/**
|
||||
* @file object11.c
|
||||
* @file bush.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object11 object
|
||||
* @brief Bush object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
@@ -16,7 +15,7 @@ typedef struct {
|
||||
/*0x68*/ u8 unk_68[8];
|
||||
/*0x70*/ u16 unk_70;
|
||||
/*0x72*/ u8 unk_72;
|
||||
} Object11Entity;
|
||||
} BushEntity;
|
||||
|
||||
typedef struct {
|
||||
u8 unk_0;
|
||||
@@ -24,38 +23,38 @@ typedef struct {
|
||||
u8 unk_2;
|
||||
} struct_08120588;
|
||||
|
||||
void Object11_Init(Object11Entity*);
|
||||
void Object11_Action1(Object11Entity*);
|
||||
void Object11_Action2(Object11Entity*);
|
||||
void Object11_Action2SubAction0(Object11Entity*);
|
||||
void Object11_Action2SubAction1(Object11Entity*);
|
||||
void Object11_Action2SubAction2(Object11Entity*);
|
||||
void Object11_Action2SubAction3(Object11Entity*);
|
||||
void Object11_Action2SubAction4(Object11Entity*);
|
||||
void Object11_Action2SubAction5(Object11Entity*);
|
||||
void Bush_Init(BushEntity*);
|
||||
void Bush_Action1(BushEntity*);
|
||||
void Bush_Action2(BushEntity*);
|
||||
void Bush_Action2SubAction0(BushEntity*);
|
||||
void Bush_Action2SubAction1(BushEntity*);
|
||||
void Bush_Action2SubAction2(BushEntity*);
|
||||
void Bush_Action2SubAction3(BushEntity*);
|
||||
void Bush_Action2SubAction4(BushEntity*);
|
||||
void Bush_Action2SubAction5(BushEntity*);
|
||||
|
||||
void Object11(Object11Entity* this) {
|
||||
static void (*const Object11_Actions[])(Object11Entity*) = {
|
||||
Object11_Init,
|
||||
Object11_Action1,
|
||||
Object11_Action2,
|
||||
void Bush(BushEntity* this) {
|
||||
static void (*const Bush_Actions[])(BushEntity*) = {
|
||||
Bush_Init,
|
||||
Bush_Action1,
|
||||
Bush_Action2,
|
||||
};
|
||||
if (!EntityIsDeleted(super)) {
|
||||
Object11_Actions[super->action](this);
|
||||
Bush_Actions[super->action](this);
|
||||
}
|
||||
}
|
||||
|
||||
extern const Hitbox gUnk_081205B4;
|
||||
void Object11_Init(Object11Entity* this) {
|
||||
void Bush_Init(BushEntity* this) {
|
||||
static const struct_08120588 gUnk_08120588[] = {
|
||||
{ 0, 32, 1 }, { 0, 64, 2 }, { 0, 32, 2 }, { 13, 1, 0 }, { 22, 1, 0 },
|
||||
};
|
||||
if (super->type == 3) {
|
||||
Object11_Action2SubAction5(this);
|
||||
Bush_Action2SubAction5(this);
|
||||
}
|
||||
sub_08004168(super);
|
||||
if (super->type == 4) {
|
||||
Object11_Action2SubAction5(this);
|
||||
Bush_Action2SubAction5(this);
|
||||
}
|
||||
super->action = 2;
|
||||
super->flags |= ENT_COLLIDE;
|
||||
@@ -75,57 +74,57 @@ void Object11_Init(Object11Entity* this) {
|
||||
InitializeAnimation(super, gUnk_08120588[super->type].unk_0);
|
||||
}
|
||||
|
||||
void Object11_Action1(Object11Entity* this) {
|
||||
void Bush_Action1(BushEntity* this) {
|
||||
if (((gPlayerState.field_0x1c & 0xf) != 1) || ((super->contactFlags & 0x7f) != 0x13)) {
|
||||
RestorePrevTileEntity(COORD_TO_TILE(super), super->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
void Object11_Action2(Object11Entity* this) {
|
||||
static void (*const Object11_Action2SubActions[])(Object11Entity*) = {
|
||||
Object11_Action2SubAction0, Object11_Action2SubAction1, Object11_Action2SubAction2,
|
||||
Object11_Action2SubAction3, Object11_Action2SubAction4, Object11_Action2SubAction5,
|
||||
void Bush_Action2(BushEntity* this) {
|
||||
static void (*const Bush_Action2SubActions[])(BushEntity*) = {
|
||||
Bush_Action2SubAction0, Bush_Action2SubAction1, Bush_Action2SubAction2,
|
||||
Bush_Action2SubAction3, Bush_Action2SubAction4, Bush_Action2SubAction5,
|
||||
};
|
||||
Object11_Action2SubActions[super->subAction](this);
|
||||
Bush_Action2SubActions[super->subAction](this);
|
||||
}
|
||||
|
||||
const Hitbox gUnk_081205B4 = { 0, 0, { 6, 3, 3, 6 }, 6, 6 };
|
||||
|
||||
void Object11_Action2SubAction0(Object11Entity* this) {
|
||||
void Bush_Action2SubAction0(BushEntity* this) {
|
||||
super->subAction = 1;
|
||||
Object11_Action2SubAction1(this);
|
||||
Bush_Action2SubAction1(this);
|
||||
}
|
||||
|
||||
void Object11_Action2SubAction1(Object11Entity* this) {
|
||||
Object11_Action1(this);
|
||||
void Bush_Action2SubAction1(BushEntity* this) {
|
||||
Bush_Action1(this);
|
||||
sub_0806F4E8(super);
|
||||
if ((super->gustJarTolerance != 0) && (--super->gustJarTolerance == 0)) {
|
||||
super->subAction = 2;
|
||||
}
|
||||
}
|
||||
|
||||
void Object11_Action2SubAction2(Object11Entity* this) {
|
||||
void Bush_Action2SubAction2(BushEntity* this) {
|
||||
if (this->unk_72 == 0) {
|
||||
this->unk_72 = 1;
|
||||
super->spriteOffsetX = 0;
|
||||
sub_0807B9B8(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
if (((gPlayerState.field_0x1c & 0xf) != 1) || ((super->contactFlags & 0x7f) != 0x13)) {
|
||||
Object11_Action2SubAction5(this);
|
||||
Bush_Action2SubAction5(this);
|
||||
}
|
||||
if (sub_0806F3E4(super) && ((super->gustJarFlags & 0xf) == 1)) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
void Object11_Action2SubAction3(Object11Entity* this) {
|
||||
void Bush_Action2SubAction3(BushEntity* this) {
|
||||
}
|
||||
|
||||
void Object11_Action2SubAction4(Object11Entity* this) {
|
||||
void Bush_Action2SubAction4(BushEntity* this) {
|
||||
}
|
||||
|
||||
void Object11_Action2SubAction5(Object11Entity* this) {
|
||||
void Bush_Action2SubAction5(BushEntity* this) {
|
||||
switch (super->type2) {
|
||||
case 0xff:
|
||||
break;
|
||||
+21
-15
@@ -1,23 +1,29 @@
|
||||
/**
|
||||
* @file button.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Button object
|
||||
*/
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_08081AE0(Entity*);
|
||||
void sub_08081B84(Entity*);
|
||||
void sub_08081BAC(Entity*);
|
||||
void sub_08081BE0(Entity*);
|
||||
void sub_08081C30(Entity*);
|
||||
void sub_08081C98(Entity*);
|
||||
void Button_Init(Entity*);
|
||||
void Button_Action1(Entity*);
|
||||
void Button_Action2(Entity*);
|
||||
void Button_Action3(Entity*);
|
||||
void Button_Action4(Entity*);
|
||||
void Button_Action5(Entity*);
|
||||
|
||||
void Button(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_08081AE0, sub_08081B84, sub_08081BAC, sub_08081BE0, sub_08081C30, sub_08081C98,
|
||||
static void (*const Button_Actions[])(Entity*) = {
|
||||
Button_Init, Button_Action1, Button_Action2, Button_Action3, Button_Action4, Button_Action5,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
Button_Actions[this->action](this);
|
||||
}
|
||||
|
||||
extern u32 sub_08081E3C(Entity*);
|
||||
|
||||
void sub_08081AE0(Entity* this) {
|
||||
void Button_Init(Entity* this) {
|
||||
COLLISION_OFF(this);
|
||||
this->updatePriority = PRIO_NO_BLOCK;
|
||||
this->y.HALF.HI++;
|
||||
@@ -39,7 +45,7 @@ void sub_08081AE0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08081B84(Entity* this) {
|
||||
void Button_Action1(Entity* this) {
|
||||
if (sub_08081E3C(this)) {
|
||||
this->action = 2;
|
||||
this->field_0x70.HALF.HI = GetTileType(this->field_0x74.HWORD, this->collisionLayer);
|
||||
@@ -49,7 +55,7 @@ void sub_08081B84(Entity* this) {
|
||||
u32 sub_08081CB0(Entity*);
|
||||
void sub_08081FF8(Entity*);
|
||||
|
||||
void sub_08081BAC(Entity* this) {
|
||||
void Button_Action2(Entity* this) {
|
||||
if (sub_08081CB0(this)) {
|
||||
this->subAction = 0;
|
||||
this->timer = 10;
|
||||
@@ -67,7 +73,7 @@ u32 sub_08081F7C(Entity*, u32);
|
||||
u32 sub_08081D28(Entity*);
|
||||
void sub_08081E6C(Entity*);
|
||||
|
||||
void sub_08081BE0(Entity* this) {
|
||||
void Button_Action3(Entity* this) {
|
||||
if (!sub_08081F7C(this, 0x78))
|
||||
return;
|
||||
if (!sub_08081D28(this)) {
|
||||
@@ -83,7 +89,7 @@ void sub_08081BE0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08081C30(Entity* this) {
|
||||
void Button_Action4(Entity* this) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
if (this->subtimer != 0) {
|
||||
@@ -102,7 +108,7 @@ void sub_08081C30(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08081C98(Entity* this) {
|
||||
void Button_Action5(Entity* this) {
|
||||
if (sub_08081F7C(this, 0x7a)) {
|
||||
sub_08081E6C(this);
|
||||
}
|
||||
|
||||
+17
-11
@@ -1,8 +1,14 @@
|
||||
/**
|
||||
* @file cabinFurniture.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Cabin Furniture object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "flags.h"
|
||||
#include "asm.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "room.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -11,17 +17,17 @@ typedef struct {
|
||||
} CabinFurnitureEntity;
|
||||
|
||||
void CabinFurniture_Init(CabinFurnitureEntity* this);
|
||||
void nullsub_535(CabinFurnitureEntity* this);
|
||||
void nullsub_2a(CabinFurnitureEntity* this);
|
||||
void CabinFurniture_Action1(CabinFurnitureEntity* this);
|
||||
void CabinFurniture_Action2(CabinFurnitureEntity* this);
|
||||
void nullsub_2(CabinFurnitureEntity* this);
|
||||
|
||||
void CabinFurniture(Entity* this) {
|
||||
static void (*const actionFuncs[])(CabinFurnitureEntity*) = {
|
||||
static void (*const CabinFurniture_Actions[])(CabinFurnitureEntity*) = {
|
||||
CabinFurniture_Init,
|
||||
nullsub_535,
|
||||
nullsub_2a,
|
||||
CabinFurniture_Action1,
|
||||
CabinFurniture_Action2,
|
||||
};
|
||||
actionFuncs[this->action]((CabinFurnitureEntity*)this);
|
||||
CabinFurniture_Actions[this->action]((CabinFurnitureEntity*)this);
|
||||
}
|
||||
|
||||
void CabinFurniture_Init(CabinFurnitureEntity* this) {
|
||||
@@ -74,10 +80,10 @@ void CabinFurniture_Init(CabinFurnitureEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_535(CabinFurnitureEntity* this) {
|
||||
void CabinFurniture_Action1(CabinFurnitureEntity* this) {
|
||||
}
|
||||
|
||||
void nullsub_2a(CabinFurnitureEntity* this) {
|
||||
void CabinFurniture_Action2(CabinFurnitureEntity* this) {
|
||||
nullsub_2(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,28 @@
|
||||
/**
|
||||
* @file cameraTarget.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Camera Target object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "message.h"
|
||||
#include "kinstone.h"
|
||||
#include "common.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "kinstone.h"
|
||||
#include "message.h"
|
||||
|
||||
// typedef struct {
|
||||
// Entity base;
|
||||
// u8 filler[0x18];
|
||||
// u16 tilePos;
|
||||
// } Object81Entity;
|
||||
// } BenchEntity;
|
||||
|
||||
extern void sub_080ADDD8(u32, u32);
|
||||
void sub_080838DC(Entity*);
|
||||
void sub_08083A40(Entity*);
|
||||
void Object9_Init(Entity*);
|
||||
void Object9_Action1(Entity*);
|
||||
void Object9_Action2(Entity*);
|
||||
void CameraTarget_Init(Entity*);
|
||||
void CameraTarget_Action1(Entity*);
|
||||
void CameraTarget_Action2(Entity*);
|
||||
|
||||
#ifdef EU
|
||||
static const s32 gUnk_0811F744[] = {
|
||||
@@ -34,11 +40,11 @@ static const s32 gUnk_0811F744[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
void Object9(Entity* this) {
|
||||
void CameraTarget(Entity* this) {
|
||||
static void (*const gUnk_0811F754[])(Entity*) = {
|
||||
Object9_Init,
|
||||
Object9_Action1,
|
||||
Object9_Action2,
|
||||
CameraTarget_Init,
|
||||
CameraTarget_Action1,
|
||||
CameraTarget_Action2,
|
||||
};
|
||||
|
||||
u32 uVar2 = gPlayerState.field_0x27[0] > 0;
|
||||
@@ -76,7 +82,7 @@ void sub_080838DC(Entity* this) {
|
||||
this->action = 0;
|
||||
}
|
||||
|
||||
void Object9_Init(Entity* this) {
|
||||
void CameraTarget_Init(Entity* this) {
|
||||
if (this->spriteAnimation[0] != 1) {
|
||||
LoadSwapGFX(this, 1, 1);
|
||||
this->spriteVramOffset -= 0x10;
|
||||
@@ -92,7 +98,7 @@ void Object9_Init(Entity* this) {
|
||||
SetDefaultPriority(this, 6);
|
||||
}
|
||||
|
||||
void Object9_Action1(Entity* this) {
|
||||
void CameraTarget_Action1(Entity* this) {
|
||||
if (this->timer) {
|
||||
this->timer--;
|
||||
} else {
|
||||
@@ -104,7 +110,7 @@ void Object9_Action1(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object9_Action2(Entity* this) {
|
||||
void CameraTarget_Action2(Entity* this) {
|
||||
u32 bVar1;
|
||||
u32 bVar2;
|
||||
u32 bVar3;
|
||||
@@ -152,5 +158,5 @@ void sub_08083A40(Entity* this) {
|
||||
}
|
||||
this->spriteOffsetY = -18;
|
||||
InitializeAnimation(this, bVar1);
|
||||
Object9_Action2(this);
|
||||
CameraTarget_Action2(this);
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
/**
|
||||
* @file object35.c
|
||||
* @file carlovObject.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object35 object
|
||||
* @brief Carlov Object object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -17,44 +16,44 @@ typedef struct {
|
||||
/*0x72*/ u16 unk_72;
|
||||
/*0x74*/ u16 unk_74;
|
||||
/*0x76*/ u16 unk_76;
|
||||
} Object35Entity;
|
||||
} CarlovObjectEntity;
|
||||
|
||||
extern void sub_080836DC(Entity*, u32, u32); // lockedDoor
|
||||
extern void sub_08083814(Entity*, u32); // lockedDoor
|
||||
void Object35_Type0(Object35Entity*);
|
||||
void Object35_Type1(Object35Entity*);
|
||||
void Object35_Type2(Object35Entity*);
|
||||
void Object35_Type0Init(Object35Entity*);
|
||||
void Object35_Type0Action1(Object35Entity*);
|
||||
void Object35_Type0Action2(Object35Entity*);
|
||||
void Object35_Type1Init(Object35Entity*);
|
||||
void Object35_Type1Action1(Object35Entity*);
|
||||
void Object35_Type1Action2(Object35Entity*);
|
||||
void Object35_Type1Action3(Object35Entity*);
|
||||
void Object35_Type1Action4(Object35Entity*);
|
||||
void Object35_Type1Action5(Object35Entity*);
|
||||
void Object35_Type2Init(Object35Entity*);
|
||||
void Object35_Type2Action1(Object35Entity*);
|
||||
void CarlovObject_Type0(CarlovObjectEntity*);
|
||||
void CarlovObject_Type1(CarlovObjectEntity*);
|
||||
void CarlovObject_Type2(CarlovObjectEntity*);
|
||||
void CarlovObject_Type0Init(CarlovObjectEntity*);
|
||||
void CarlovObject_Type0Action1(CarlovObjectEntity*);
|
||||
void CarlovObject_Type0Action2(CarlovObjectEntity*);
|
||||
void CarlovObject_Type1Init(CarlovObjectEntity*);
|
||||
void CarlovObject_Type1Action1(CarlovObjectEntity*);
|
||||
void CarlovObject_Type1Action2(CarlovObjectEntity*);
|
||||
void CarlovObject_Type1Action3(CarlovObjectEntity*);
|
||||
void CarlovObject_Type1Action4(CarlovObjectEntity*);
|
||||
void CarlovObject_Type1Action5(CarlovObjectEntity*);
|
||||
void CarlovObject_Type2Init(CarlovObjectEntity*);
|
||||
void CarlovObject_Type2Action1(CarlovObjectEntity*);
|
||||
|
||||
void Object35(Object35Entity* this) {
|
||||
static void (*const Object35_Types[])(Object35Entity*) = {
|
||||
Object35_Type0,
|
||||
Object35_Type1,
|
||||
Object35_Type2,
|
||||
void CarlovObject(CarlovObjectEntity* this) {
|
||||
static void (*const CarlovObject_Types[])(CarlovObjectEntity*) = {
|
||||
CarlovObject_Type0,
|
||||
CarlovObject_Type1,
|
||||
CarlovObject_Type2,
|
||||
};
|
||||
Object35_Types[super->type](this);
|
||||
CarlovObject_Types[super->type](this);
|
||||
}
|
||||
|
||||
void Object35_Type0(Object35Entity* this) {
|
||||
static void (*const Object35_Type0Actions[])(Object35Entity*) = {
|
||||
Object35_Type0Init,
|
||||
Object35_Type0Action1,
|
||||
Object35_Type0Action2,
|
||||
void CarlovObject_Type0(CarlovObjectEntity* this) {
|
||||
static void (*const CarlovObject_Type0Actions[])(CarlovObjectEntity*) = {
|
||||
CarlovObject_Type0Init,
|
||||
CarlovObject_Type0Action1,
|
||||
CarlovObject_Type0Action2,
|
||||
};
|
||||
Object35_Type0Actions[super->action](this);
|
||||
CarlovObject_Type0Actions[super->action](this);
|
||||
}
|
||||
|
||||
void Object35_Type0Init(Object35Entity* this) {
|
||||
void CarlovObject_Type0Init(CarlovObjectEntity* this) {
|
||||
super->action = 2;
|
||||
super->type2 = 2;
|
||||
super->collisionLayer = 2;
|
||||
@@ -64,7 +63,7 @@ void Object35_Type0Init(Object35Entity* this) {
|
||||
InitializeAnimation(super, super->type2);
|
||||
}
|
||||
|
||||
void Object35_Type0Action1(Object35Entity* this) {
|
||||
void CarlovObject_Type0Action1(CarlovObjectEntity* this) {
|
||||
s8 tmp;
|
||||
GetNextFrame(super);
|
||||
if (--super->timer == 0) {
|
||||
@@ -76,20 +75,20 @@ void Object35_Type0Action1(Object35Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object35_Type0Action2(Object35Entity* this) {
|
||||
void CarlovObject_Type0Action2(CarlovObjectEntity* this) {
|
||||
GetNextFrame(super);
|
||||
}
|
||||
|
||||
void Object35_Type1(Object35Entity* this) {
|
||||
static void (*const Object35_Type1Actions[])(Object35Entity*) = {
|
||||
Object35_Type1Init, Object35_Type1Action1, Object35_Type1Action2,
|
||||
Object35_Type1Action3, Object35_Type1Action4, Object35_Type1Action5,
|
||||
void CarlovObject_Type1(CarlovObjectEntity* this) {
|
||||
static void (*const CarlovObject_Type1Actions[])(CarlovObjectEntity*) = {
|
||||
CarlovObject_Type1Init, CarlovObject_Type1Action1, CarlovObject_Type1Action2,
|
||||
CarlovObject_Type1Action3, CarlovObject_Type1Action4, CarlovObject_Type1Action5,
|
||||
};
|
||||
Object35_Type1Actions[super->action](this);
|
||||
CarlovObject_Type1Actions[super->action](this);
|
||||
gPlayerState.mobility |= 0x80;
|
||||
}
|
||||
|
||||
void Object35_Type1Init(Object35Entity* this) {
|
||||
void CarlovObject_Type1Init(CarlovObjectEntity* this) {
|
||||
super->speed = 0x300;
|
||||
super->frameIndex = 0;
|
||||
this->unk_70 = super->x.HALF.HI;
|
||||
@@ -109,7 +108,7 @@ void Object35_Type1Init(Object35Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object35_Type1Action1(Object35Entity* this) {
|
||||
void CarlovObject_Type1Action1(CarlovObjectEntity* this) {
|
||||
if (CheckRoomFlag(0)) {
|
||||
super->action = 2;
|
||||
super->timer = 7;
|
||||
@@ -119,7 +118,7 @@ void Object35_Type1Action1(Object35Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object35_Type1Action2(Object35Entity* this) {
|
||||
void CarlovObject_Type1Action2(CarlovObjectEntity* this) {
|
||||
LinearMoveUpdate(super);
|
||||
if (--super->timer == 0) {
|
||||
super->action = 5;
|
||||
@@ -130,14 +129,14 @@ void Object35_Type1Action2(Object35Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object35_Type1Action3(Object35Entity* this) {
|
||||
void CarlovObject_Type1Action3(CarlovObjectEntity* this) {
|
||||
if (sub_08083734(super, 2)) {
|
||||
super->action = 4;
|
||||
sub_080836DC(super, 2, this->unk_76);
|
||||
}
|
||||
}
|
||||
|
||||
void Object35_Type1Action4(Object35Entity* this) {
|
||||
void CarlovObject_Type1Action4(CarlovObjectEntity* this) {
|
||||
LinearMoveUpdate(super);
|
||||
if (--super->timer == 0) {
|
||||
super->action = 5;
|
||||
@@ -147,18 +146,18 @@ void Object35_Type1Action4(Object35Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object35_Type1Action5(Object35Entity* this) {
|
||||
void CarlovObject_Type1Action5(CarlovObjectEntity* this) {
|
||||
}
|
||||
|
||||
void Object35_Type2(Object35Entity* this) {
|
||||
static void (*const Object35_Type2Actions[])(Object35Entity*) = {
|
||||
Object35_Type2Init,
|
||||
Object35_Type2Action1,
|
||||
void CarlovObject_Type2(CarlovObjectEntity* this) {
|
||||
static void (*const CarlovObject_Type2Actions[])(CarlovObjectEntity*) = {
|
||||
CarlovObject_Type2Init,
|
||||
CarlovObject_Type2Action1,
|
||||
};
|
||||
Object35_Type2Actions[super->action](this);
|
||||
CarlovObject_Type2Actions[super->action](this);
|
||||
}
|
||||
|
||||
void Object35_Type2Init(Object35Entity* this) {
|
||||
void CarlovObject_Type2Init(CarlovObjectEntity* this) {
|
||||
super->action = 1;
|
||||
super->timer = 16;
|
||||
super->z.HALF.HI -= 0x10;
|
||||
@@ -173,7 +172,7 @@ void Object35_Type2Init(Object35Entity* this) {
|
||||
CreateDust(super);
|
||||
}
|
||||
|
||||
void Object35_Type2Action1(Object35Entity* this) {
|
||||
void CarlovObject_Type2Action1(CarlovObjectEntity* this) {
|
||||
if (--super->timer == 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -6,12 +6,12 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "item.h"
|
||||
#include "object.h"
|
||||
#include "screen.h"
|
||||
#include "structures.h"
|
||||
#include "item.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
/**
|
||||
* @file object4B.c
|
||||
* @file chuchuBossCutscene.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object4B object
|
||||
* @brief Chuchu Boss Cutscene object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "menu.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
} Object4BEntity;
|
||||
} ChuchuBossCutsceneEntity;
|
||||
|
||||
void Object4B_Init(Object4BEntity*);
|
||||
void Object4B_Action1(Object4BEntity*);
|
||||
void Object4B_Action2(Object4BEntity*);
|
||||
void Object4B_Action3(Object4BEntity*);
|
||||
void Object4B_Action4(Object4BEntity*);
|
||||
void Object4B_Action5(Object4BEntity*);
|
||||
void Object4B_Action6(Object4BEntity*);
|
||||
void Object4B_Action7(Object4BEntity*);
|
||||
void ChuchuBossCutscene_Init(ChuchuBossCutsceneEntity*);
|
||||
void ChuchuBossCutscene_Action1(ChuchuBossCutsceneEntity*);
|
||||
void ChuchuBossCutscene_Action2(ChuchuBossCutsceneEntity*);
|
||||
void ChuchuBossCutscene_Action3(ChuchuBossCutsceneEntity*);
|
||||
void ChuchuBossCutscene_Action4(ChuchuBossCutsceneEntity*);
|
||||
void ChuchuBossCutscene_Action5(ChuchuBossCutsceneEntity*);
|
||||
void ChuchuBossCutscene_Action6(ChuchuBossCutsceneEntity*);
|
||||
void ChuchuBossCutscene_Action7(ChuchuBossCutsceneEntity*);
|
||||
|
||||
void Object4B(Object4BEntity* this) {
|
||||
static void (*const Object4B_Actions[])(Object4BEntity*) = {
|
||||
Object4B_Init, Object4B_Action1, Object4B_Action2, Object4B_Action3,
|
||||
Object4B_Action4, Object4B_Action5, Object4B_Action6, Object4B_Action7,
|
||||
void ChuchuBossCutscene(ChuchuBossCutsceneEntity* this) {
|
||||
static void (*const ChuchuBossCutscene_Actions[])(ChuchuBossCutsceneEntity*) = {
|
||||
ChuchuBossCutscene_Init, ChuchuBossCutscene_Action1, ChuchuBossCutscene_Action2, ChuchuBossCutscene_Action3,
|
||||
ChuchuBossCutscene_Action4, ChuchuBossCutscene_Action5, ChuchuBossCutscene_Action6, ChuchuBossCutscene_Action7,
|
||||
};
|
||||
Object4B_Actions[super->action](this);
|
||||
ChuchuBossCutscene_Actions[super->action](this);
|
||||
}
|
||||
|
||||
void Object4B_Init(Object4BEntity* this) {
|
||||
void ChuchuBossCutscene_Init(ChuchuBossCutsceneEntity* this) {
|
||||
super->action = 1;
|
||||
super->timer = 60;
|
||||
InitializeAnimation(super, 0);
|
||||
}
|
||||
|
||||
void Object4B_Action1(Object4BEntity* this) {
|
||||
void ChuchuBossCutscene_Action1(ChuchuBossCutsceneEntity* this) {
|
||||
if (--super->timer == 0) {
|
||||
super->timer = 120;
|
||||
super->action++;
|
||||
@@ -46,7 +46,7 @@ void Object4B_Action1(Object4BEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object4B_Action2(Object4BEntity* this) {
|
||||
void ChuchuBossCutscene_Action2(ChuchuBossCutsceneEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action++;
|
||||
@@ -55,7 +55,7 @@ void Object4B_Action2(Object4BEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object4B_Action3(Object4BEntity* this) {
|
||||
void ChuchuBossCutscene_Action3(ChuchuBossCutsceneEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if (--super->timer == 0) {
|
||||
super->action++;
|
||||
@@ -69,7 +69,7 @@ void Object4B_Action3(Object4BEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object4B_Action4(Object4BEntity* this) {
|
||||
void ChuchuBossCutscene_Action4(ChuchuBossCutsceneEntity* this) {
|
||||
if ((super->frame & 0x10) != 0) {
|
||||
LinearMoveUpdate(super);
|
||||
if (GravityUpdate(super, Q_8_8(32.0)) == 0) {
|
||||
@@ -92,7 +92,7 @@ void Object4B_Action4(Object4BEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object4B_Action5(Object4BEntity* this) {
|
||||
void ChuchuBossCutscene_Action5(ChuchuBossCutsceneEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if (--super->timer == 0) {
|
||||
super->action++;
|
||||
@@ -100,7 +100,7 @@ void Object4B_Action5(Object4BEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object4B_Action6(Object4BEntity* this) {
|
||||
void ChuchuBossCutscene_Action6(ChuchuBossCutsceneEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action++;
|
||||
@@ -109,7 +109,7 @@ void Object4B_Action6(Object4BEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object4B_Action7(Object4BEntity* this) {
|
||||
void ChuchuBossCutscene_Action7(ChuchuBossCutsceneEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if (--super->timer == 0) {
|
||||
gMenu.overlayType++;
|
||||
@@ -1,25 +1,31 @@
|
||||
#define NENT_DEPRECATED
|
||||
/**
|
||||
* @file chuchuBossParticle.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Chuchu Boss Particle object
|
||||
*/
|
||||
#include "entity.h"
|
||||
|
||||
void Object15_Init(Entity*);
|
||||
void Object15_Action1(Entity*);
|
||||
void ChuchuBossParticle_Init(Entity*);
|
||||
void ChuchuBossParticle_Action1(Entity*);
|
||||
|
||||
void Object15(Entity* this) {
|
||||
void ChuchuBossParticle(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
Object15_Init,
|
||||
Object15_Action1,
|
||||
ChuchuBossParticle_Init,
|
||||
ChuchuBossParticle_Action1,
|
||||
};
|
||||
|
||||
actionFuncs[this->action](this);
|
||||
}
|
||||
|
||||
void Object15_Init(Entity* this) {
|
||||
void ChuchuBossParticle_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
InitializeAnimation(this, this->animIndex);
|
||||
}
|
||||
|
||||
void Object15_Action1(Entity* this) {
|
||||
void ChuchuBossParticle_Action1(Entity* this) {
|
||||
if (this->type == 0) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
#include "object.h"
|
||||
/**
|
||||
* @file chuchuBossStartParticle.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Chuchu Boss Start Particle object
|
||||
*/
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
|
||||
static void sub_0808F2B0(Entity*);
|
||||
void sub_0808F14C(Entity*);
|
||||
@@ -18,7 +24,7 @@ void sub_0808F244(Entity*);
|
||||
void sub_0808F1F8(Entity*);
|
||||
void sub_0808F5EC(Entity*);
|
||||
|
||||
void Object49(Entity* this) {
|
||||
void ChuchuBossStartParticle(Entity* this) {
|
||||
static void (*const typeFuncs[])(Entity*) = {
|
||||
sub_0808F0B8, sub_0808F1E0, sub_0808F2C0, sub_0808F370, sub_0808F0B8, sub_0808F3DC,
|
||||
sub_0808F3DC, sub_0808F3DC, sub_0808F3DC, sub_0808F498, sub_0808F554,
|
||||
@@ -42,7 +48,7 @@ void sub_0808F0D0(Entity* this) {
|
||||
Entity* ent;
|
||||
u32 uVar3;
|
||||
|
||||
ent = CreateObjectWithParent(this, OBJECT_49, 2, 0);
|
||||
ent = CreateObjectWithParent(this, CHUCHU_BOSS_START_PARTICLE, 2, 0);
|
||||
this->child = ent;
|
||||
if (ent == NULL) {
|
||||
DeleteThisEntity();
|
||||
+15
-9
@@ -1,13 +1,19 @@
|
||||
/**
|
||||
* @file cloud.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Cloud object
|
||||
*/
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_0809F814(u32 r0);
|
||||
|
||||
void sub_0809F7BC(Entity*);
|
||||
void sub_0809F7F4(Entity*);
|
||||
void sub_0809F4DC(Entity*);
|
||||
void sub_0809F700(Entity*);
|
||||
void Cloud_Type0(Entity*);
|
||||
void Cloud_Type1(Entity*);
|
||||
void sub_0809F514(Entity*);
|
||||
void sub_0809F548(Entity*);
|
||||
void sub_0809F5B0(Entity*);
|
||||
@@ -20,14 +26,14 @@ void sub_0809F5DC(Entity*);
|
||||
extern void* gUnk_080DD750;
|
||||
|
||||
void Cloud(Entity* this) {
|
||||
static void (*const typeFuncs[])(Entity*) = {
|
||||
sub_0809F4DC,
|
||||
sub_0809F700,
|
||||
static void (*const Cloud_Types[])(Entity*) = {
|
||||
Cloud_Type0,
|
||||
Cloud_Type1,
|
||||
};
|
||||
typeFuncs[this->type](this);
|
||||
Cloud_Types[this->type](this);
|
||||
}
|
||||
|
||||
void sub_0809F4DC(Entity* this) {
|
||||
void Cloud_Type0(Entity* this) {
|
||||
static void (*const gUnk_081247A0[])(Entity*) = {
|
||||
sub_0809F514,
|
||||
sub_0809F548,
|
||||
@@ -136,7 +142,7 @@ void sub_0809F6CC(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809F700(Entity* this) {
|
||||
void Cloud_Type1(Entity* this) {
|
||||
static const s8 gUnk_081247C0[] = {
|
||||
-1, 1, 2, -2, 0, 1, 0, -1,
|
||||
};
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
/**
|
||||
* @file objectE.c
|
||||
* @file crackingGround.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief ObjectE object
|
||||
* @brief Cracking Ground object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
void ObjectE(Entity* this) {
|
||||
void CrackingGround(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->timer = 20;
|
||||
@@ -6,10 +6,10 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "hitbox.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -181,7 +181,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
|
||||
RestorePrevTileEntity(0xdc, super->collisionLayer);
|
||||
sub_08096A78(this);
|
||||
}
|
||||
if ((gPlayerState.field_0x92 & 0xc0) == 0) {
|
||||
if ((gPlayerState.playerInput.field_0x92 & (PLAYER_INPUT_80 | PLAYER_INPUT_40)) == 0) {
|
||||
return;
|
||||
}
|
||||
if (gUnk_0200AF00.unk_2f != 3) {
|
||||
|
||||
+21
-14
@@ -1,11 +1,18 @@
|
||||
|
||||
/**
|
||||
* @file cuccoMinigame.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Cucco Minigame object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "enemy.h"
|
||||
#include "entity.h"
|
||||
#include "script.h"
|
||||
#include "npc.h"
|
||||
#include "fileselect.h"
|
||||
#include "functions.h"
|
||||
#include "npc.h"
|
||||
#include "object.h"
|
||||
#include "enemy.h"
|
||||
#include "script.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -14,9 +21,9 @@ typedef struct {
|
||||
s16 unk6c;
|
||||
u16 unk6e;
|
||||
u8 unk70[0x18];
|
||||
} ObjectB9Entity;
|
||||
} CuccoMinigameEntity;
|
||||
|
||||
typedef Entity* ObjectB9Heap[10];
|
||||
typedef Entity* CuccoMinigameHeap[10];
|
||||
|
||||
u32 sub_080A1514();
|
||||
|
||||
@@ -24,7 +31,7 @@ const u16 gUnk_08124C20[] = {
|
||||
25, 0x2, 25, 0x3, 30, 0x4, 45, 0x5, 50, 0x5, 45, 0x5, 50, 0x6, 60, 0x7, 55, 0x2, 55, 0x3,
|
||||
};
|
||||
|
||||
static const u16 pObjectB9_MinigameCuccoDefs[][30] = {
|
||||
static const u16 pCuccoMinigame_MinigameCuccoDefs[][30] = {
|
||||
{ 0x0001, 0x02E9, 0x0318, 0x0001, 0x0280, 0x0380, 0x0002, 0x0277, 0x0314, 0x0001,
|
||||
0x0332, 0x0248, 0x0001, 0x0257, 0x028C, 0x0001, 0x0199, 0x031B, 0x0001, 0x0321,
|
||||
0x01B4, 0x0002, 0x02DF, 0x01D8, 0x0001, 0x03AD, 0x02DE, 0x0001, 0x0216, 0x01CC },
|
||||
@@ -67,7 +74,7 @@ static const u16 CuccoMinigame_Sounds[] = { SFX_VO_CUCCO5, SFX_VO_CUCCO_CALL };
|
||||
|
||||
static const u8 CuccoMinigameRupees[] = { 0, 10, 50, 0 };
|
||||
|
||||
void ObjectB9(ObjectB9Entity* this) {
|
||||
void CuccoMinigame(CuccoMinigameEntity* this) {
|
||||
int index;
|
||||
u32 val;
|
||||
u8* puVar2;
|
||||
@@ -90,7 +97,7 @@ void ObjectB9(ObjectB9Entity* this) {
|
||||
sub_0807DD94(super, 0);
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/objectB9/sub_080A1270.inc", void sub_080A1270(ObjectB9Entity* this)) {
|
||||
NONMATCH("asm/non_matching/objectB9/sub_080A1270.inc", void sub_080A1270(CuccoMinigameEntity* this)) {
|
||||
s32 iVar1;
|
||||
int iVar2;
|
||||
s32 iVar4;
|
||||
@@ -151,7 +158,7 @@ NONMATCH("asm/non_matching/objectB9/sub_080A1270.inc", void sub_080A1270(ObjectB
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
void CuccoMinigame_Cleanup(ObjectB9Entity* this) {
|
||||
void CuccoMinigame_Cleanup(CuccoMinigameEntity* this) {
|
||||
Entity** puVar1;
|
||||
s8* pcVar2;
|
||||
int index;
|
||||
@@ -167,7 +174,7 @@ void CuccoMinigame_Cleanup(ObjectB9Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080A13B4(ObjectB9Entity* this, ScriptExecutionContext* context) {
|
||||
void sub_080A13B4(CuccoMinigameEntity* this, ScriptExecutionContext* context) {
|
||||
if (this->unk6a >= this->unk6c) {
|
||||
MessageFromTarget(TEXT_INDEX(TEXT_ANJU, 0xc));
|
||||
context->condition = 1;
|
||||
@@ -177,7 +184,7 @@ void sub_080A13B4(ObjectB9Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080A13E8(ObjectB9Entity* this) {
|
||||
void sub_080A13E8(CuccoMinigameEntity* this) {
|
||||
bool32 bVar2;
|
||||
const u8* ptr = &gUnk_08124EA0[sub_080A1514() * 4];
|
||||
|
||||
@@ -209,7 +216,7 @@ void sub_080A13E8(ObjectB9Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080A1460(ObjectB9Entity* this) {
|
||||
void sub_080A1460(CuccoMinigameEntity* this) {
|
||||
s8* pcVar1;
|
||||
int iVar2;
|
||||
s32 rupees;
|
||||
@@ -298,13 +305,13 @@ void CuccoMinigame_Init(Entity* this, ScriptExecutionContext* context) {
|
||||
context->condition = 0;
|
||||
pEnt = CreateObject(CUCCO_MINIGAME, 0, 0);
|
||||
if (pEnt != NULL) {
|
||||
pEnt->myHeap = (u32*)zMalloc(sizeof(ObjectB9Heap));
|
||||
pEnt->myHeap = (u32*)zMalloc(sizeof(CuccoMinigameHeap));
|
||||
if (pEnt->myHeap == NULL) {
|
||||
DeleteEntityAny(pEnt);
|
||||
} else {
|
||||
*(ScriptExecutionContext**)&((GenericEntity*)pEnt)->cutsceneBeh =
|
||||
(ScriptExecutionContext*)StartCutscene(pEnt, (u16*)context->intVariable);
|
||||
pCuccoMinigameDef = pObjectB9_MinigameCuccoDefs[sub_080A1514()];
|
||||
pCuccoMinigameDef = pCuccoMinigame_MinigameCuccoDefs[sub_080A1514()];
|
||||
ppEVar5 = (Entity**)pEnt->myHeap;
|
||||
room = &gRoomControls;
|
||||
for (index = 9; index >= 0; index--, pCuccoMinigameDef += 3) {
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
/**
|
||||
* @file cutsceneMiscObject.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Cutscene Misc object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "object.h"
|
||||
#include "area.h"
|
||||
#include "script.h"
|
||||
#include "message.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
#include "item.h"
|
||||
#include "message.h"
|
||||
#include "object.h"
|
||||
#include "screen.h"
|
||||
#include "script.h"
|
||||
|
||||
extern u8 gUnk_08114F30[];
|
||||
extern u8 gUnk_08114F34[];
|
||||
@@ -17,8 +23,8 @@ extern s16 gUnk_08122B0E[];
|
||||
extern u16 gUnk_08122B1E[];
|
||||
extern s8 gUnk_08122B2E[];
|
||||
|
||||
extern u16 script_Object6ATheLittleHat;
|
||||
extern u16 script_Object6ASwordInChest;
|
||||
extern u16 script_CutsceneMiscObjectTheLittleHat;
|
||||
extern u16 script_CutsceneMiscObjectSwordInChest;
|
||||
extern u16 script_08015B14;
|
||||
extern u16 script_ZeldaMagic;
|
||||
extern u16 script_08012C48;
|
||||
@@ -29,7 +35,7 @@ typedef struct {
|
||||
u8 off;
|
||||
u8 fill[0x14];
|
||||
void* ctx;
|
||||
} Object6AEntity;
|
||||
} CutsceneMiscObjectEntity;
|
||||
|
||||
typedef struct {
|
||||
u16 arr[8];
|
||||
@@ -42,7 +48,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
Entity base;
|
||||
Type15Vars vars;
|
||||
} Object6AEntityType15;
|
||||
} CutsceneMiscObjectEntityType15;
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -57,61 +63,61 @@ typedef struct {
|
||||
} HitboxCfg;
|
||||
extern HitboxCfg gUnk_08122B3C[];
|
||||
|
||||
typedef void(Object6ATypeAction)(Object6AEntity*);
|
||||
typedef void(CutsceneMiscObjectTypeAction)(CutsceneMiscObjectEntity*);
|
||||
|
||||
Object6ATypeAction sub_08094A5C;
|
||||
Object6ATypeAction sub_08094A90;
|
||||
Object6ATypeAction sub_08094C30;
|
||||
Object6ATypeAction sub_08094C88;
|
||||
Object6ATypeAction sub_08094D94;
|
||||
Object6ATypeAction sub_08094E30;
|
||||
Object6ATypeAction sub_08094FA8;
|
||||
Object6ATypeAction sub_08095088;
|
||||
Object6ATypeAction sub_08095120;
|
||||
Object6ATypeAction sub_08095188;
|
||||
Object6ATypeAction sub_080951C4;
|
||||
Object6ATypeAction sub_08095288;
|
||||
Object6ATypeAction sub_080953A4;
|
||||
Object6ATypeAction sub_080953A4;
|
||||
Object6ATypeAction sub_080954DC;
|
||||
Object6ATypeAction sub_080956B4;
|
||||
Object6ATypeAction sub_0809577C;
|
||||
Object6ATypeAction sub_080957DC;
|
||||
Object6ATypeAction sub_0809584C;
|
||||
Object6ATypeAction sub_080958D8;
|
||||
Object6ATypeAction sub_08095918;
|
||||
Object6ATypeAction sub_08094C88;
|
||||
Object6ATypeAction sub_080959CC;
|
||||
Object6ATypeAction sub_08095A8C;
|
||||
Object6ATypeAction sub_08095B48;
|
||||
Object6ATypeAction sub_08095C00;
|
||||
Object6ATypeAction sub_080953A4;
|
||||
Object6ATypeAction sub_08095C68;
|
||||
Object6ATypeAction sub_08095CE0;
|
||||
Object6ATypeAction sub_08095CE0;
|
||||
Object6ATypeAction sub_08095DBC;
|
||||
Object6ATypeAction sub_08095F38;
|
||||
Object6ATypeAction sub_08096058;
|
||||
Object6ATypeAction sub_08096058;
|
||||
Object6ATypeAction sub_08094A90;
|
||||
Object6ATypeAction sub_08096084;
|
||||
Object6ATypeAction sub_08096084;
|
||||
Object6ATypeAction sub_08096168;
|
||||
Object6ATypeAction sub_080961F4;
|
||||
Object6ATypeAction sub_080961F4;
|
||||
Object6ATypeAction sub_080961F4;
|
||||
Object6ATypeAction sub_08096284;
|
||||
Object6ATypeAction sub_08096290;
|
||||
CutsceneMiscObjectTypeAction sub_08094A5C;
|
||||
CutsceneMiscObjectTypeAction sub_08094A90;
|
||||
CutsceneMiscObjectTypeAction sub_08094C30;
|
||||
CutsceneMiscObjectTypeAction sub_08094C88;
|
||||
CutsceneMiscObjectTypeAction sub_08094D94;
|
||||
CutsceneMiscObjectTypeAction sub_08094E30;
|
||||
CutsceneMiscObjectTypeAction sub_08094FA8;
|
||||
CutsceneMiscObjectTypeAction sub_08095088;
|
||||
CutsceneMiscObjectTypeAction sub_08095120;
|
||||
CutsceneMiscObjectTypeAction sub_08095188;
|
||||
CutsceneMiscObjectTypeAction sub_080951C4;
|
||||
CutsceneMiscObjectTypeAction sub_08095288;
|
||||
CutsceneMiscObjectTypeAction sub_080953A4;
|
||||
CutsceneMiscObjectTypeAction sub_080953A4;
|
||||
CutsceneMiscObjectTypeAction sub_080954DC;
|
||||
CutsceneMiscObjectTypeAction sub_080956B4;
|
||||
CutsceneMiscObjectTypeAction sub_0809577C;
|
||||
CutsceneMiscObjectTypeAction sub_080957DC;
|
||||
CutsceneMiscObjectTypeAction sub_0809584C;
|
||||
CutsceneMiscObjectTypeAction sub_080958D8;
|
||||
CutsceneMiscObjectTypeAction sub_08095918;
|
||||
CutsceneMiscObjectTypeAction sub_08094C88;
|
||||
CutsceneMiscObjectTypeAction sub_080959CC;
|
||||
CutsceneMiscObjectTypeAction sub_08095A8C;
|
||||
CutsceneMiscObjectTypeAction sub_08095B48;
|
||||
CutsceneMiscObjectTypeAction sub_08095C00;
|
||||
CutsceneMiscObjectTypeAction sub_080953A4;
|
||||
CutsceneMiscObjectTypeAction sub_08095C68;
|
||||
CutsceneMiscObjectTypeAction sub_08095CE0;
|
||||
CutsceneMiscObjectTypeAction sub_08095CE0;
|
||||
CutsceneMiscObjectTypeAction sub_08095DBC;
|
||||
CutsceneMiscObjectTypeAction sub_08095F38;
|
||||
CutsceneMiscObjectTypeAction sub_08096058;
|
||||
CutsceneMiscObjectTypeAction sub_08096058;
|
||||
CutsceneMiscObjectTypeAction sub_08094A90;
|
||||
CutsceneMiscObjectTypeAction sub_08096084;
|
||||
CutsceneMiscObjectTypeAction sub_08096084;
|
||||
CutsceneMiscObjectTypeAction sub_08096168;
|
||||
CutsceneMiscObjectTypeAction sub_080961F4;
|
||||
CutsceneMiscObjectTypeAction sub_080961F4;
|
||||
CutsceneMiscObjectTypeAction sub_080961F4;
|
||||
CutsceneMiscObjectTypeAction sub_08096284;
|
||||
CutsceneMiscObjectTypeAction sub_08096290;
|
||||
|
||||
void sub_08095754(Object6AEntity*);
|
||||
void sub_080957B4(Object6AEntity*);
|
||||
void sub_08095954(Object6AEntity*);
|
||||
void sub_08095D30(Object6AEntity*, u32);
|
||||
void sub_08095754(CutsceneMiscObjectEntity*);
|
||||
void sub_080957B4(CutsceneMiscObjectEntity*);
|
||||
void sub_08095954(CutsceneMiscObjectEntity*);
|
||||
void sub_08095D30(CutsceneMiscObjectEntity*, u32);
|
||||
|
||||
static void sub_0809629C(Object6AEntity*, u32);
|
||||
static void sub_0809629C(CutsceneMiscObjectEntity*, u32);
|
||||
|
||||
void Object6A(Entity* this) {
|
||||
static Object6ATypeAction* const sTypeTable[] = {
|
||||
void CutsceneMiscObject(Entity* this) {
|
||||
static CutsceneMiscObjectTypeAction* const sTypeTable[] = {
|
||||
sub_08094A5C, sub_08094A90, sub_08094C30, sub_08094C88, sub_08094D94, sub_08094E30, sub_08094FA8, sub_08095088,
|
||||
sub_08095120, sub_08095188, sub_080951C4, sub_08095288, sub_080953A4, sub_080953A4, sub_080954DC, sub_080956B4,
|
||||
sub_0809577C, sub_080957DC, sub_0809584C, sub_080958D8, sub_08095918, sub_08094C88, sub_080959CC, sub_08095A8C,
|
||||
@@ -119,10 +125,10 @@ void Object6A(Entity* this) {
|
||||
sub_08096058, sub_08096058, sub_08094A90, sub_08096084, sub_08096084, sub_08096168, sub_080961F4, sub_080961F4,
|
||||
sub_080961F4, sub_08096284, sub_08096290,
|
||||
};
|
||||
sTypeTable[this->type]((Object6AEntity*)this);
|
||||
sTypeTable[this->type]((CutsceneMiscObjectEntity*)this);
|
||||
}
|
||||
|
||||
void sub_08094A5C(Object6AEntity* this) {
|
||||
void sub_08094A5C(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
sub_0807DD64(super);
|
||||
@@ -133,7 +139,7 @@ void sub_08094A5C(Object6AEntity* this) {
|
||||
GetNextFrame(super);
|
||||
}
|
||||
|
||||
void sub_08094A90(Object6AEntity* this) {
|
||||
void sub_08094A90(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->collisionLayer = 2;
|
||||
@@ -148,20 +154,20 @@ void sub_08094A90(Object6AEntity* this) {
|
||||
}
|
||||
|
||||
void sub_08094AE8(Entity* this, ScriptExecutionContext* ctx) {
|
||||
Object6AEntity* e = (Object6AEntity*)CreateObject(OBJECT_6A, 1, 0);
|
||||
CutsceneMiscObjectEntity* e = (CutsceneMiscObjectEntity*)CreateObject(CUTSCENE_MISC_OBJECT, 1, 0);
|
||||
if (e != NULL) {
|
||||
e->ctx = StartCutscene(&e->base, (void*)ctx->intVariable);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094B0C(Object6AEntity* this) {
|
||||
void sub_08094B0C(CutsceneMiscObjectEntity* this) {
|
||||
if (--super->z.HALF.HI <= -32)
|
||||
super->z.HALF.HI = -32;
|
||||
else
|
||||
gActiveScriptInfo.commandSize = 0;
|
||||
}
|
||||
|
||||
void sub_08094B3C(Object6AEntity* this) {
|
||||
void sub_08094B3C(CutsceneMiscObjectEntity* this) {
|
||||
super->z.WORD += Q_16_16(0.5);
|
||||
if (super->z.HALF.HI >= -13)
|
||||
super->z.HALF.HI = -13;
|
||||
@@ -169,20 +175,20 @@ void sub_08094B3C(Object6AEntity* this) {
|
||||
gActiveScriptInfo.commandSize = 0;
|
||||
}
|
||||
|
||||
void sub_08094B6C(Object6AEntity* this) {
|
||||
void sub_08094B6C(CutsceneMiscObjectEntity* this) {
|
||||
super->spritePriority.b1 = 0x3;
|
||||
}
|
||||
|
||||
void sub_08094B80(Object6AEntity* this) {
|
||||
void sub_08094B80(CutsceneMiscObjectEntity* this) {
|
||||
super->spritePriority.b1 = 0x2;
|
||||
}
|
||||
|
||||
void sub_08094B94(Object6AEntity* this) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x22, 0);
|
||||
void sub_08094B94(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x22, 0);
|
||||
if (e != NULL) {
|
||||
CopyPosition(&gPlayerEntity, e);
|
||||
e->z.HALF.HI = -48;
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_Object6ATheLittleHat);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, &script_CutsceneMiscObjectTheLittleHat);
|
||||
CreateDust(e);
|
||||
e->z.HALF.HI += 16;
|
||||
e->y.HALF.HI++;
|
||||
@@ -190,7 +196,7 @@ void sub_08094B94(Object6AEntity* this) {
|
||||
}
|
||||
|
||||
void sub_08094BE0(Entity* this) {
|
||||
Entity* e = FindEntity(OBJECT, OBJECT_6A, 6, 0x22, 0);
|
||||
Entity* e = FindEntity(OBJECT, CUTSCENE_MISC_OBJECT, 6, 0x22, 0);
|
||||
if (e != NULL) {
|
||||
CopyPosition(&gPlayerEntity, e);
|
||||
e->z.HALF.HI = -12;
|
||||
@@ -201,7 +207,7 @@ void sub_08094BE0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094C30(Object6AEntity* this) {
|
||||
void sub_08094C30(CutsceneMiscObjectEntity* this) {
|
||||
Entity* p = super->parent;
|
||||
if (p == NULL || p->next == NULL)
|
||||
DeleteThisEntity();
|
||||
@@ -215,7 +221,7 @@ void sub_08094C30(Object6AEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
}
|
||||
|
||||
void sub_08094C88(Object6AEntity* this) {
|
||||
void sub_08094C88(CutsceneMiscObjectEntity* this) {
|
||||
u32 tmp;
|
||||
|
||||
if (super->action != 0) {
|
||||
@@ -242,7 +248,7 @@ void sub_08094C88(Object6AEntity* this) {
|
||||
super->type = tmp;
|
||||
}
|
||||
|
||||
void sub_08094CDC(Object6AEntity* this) {
|
||||
void sub_08094CDC(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(0x6a, 3, 0x62);
|
||||
if (e != NULL) {
|
||||
e->x.HALF.HI = gRoomControls.origin_x + Q_8_8(7.0 / 8.0);
|
||||
@@ -251,15 +257,15 @@ void sub_08094CDC(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094D10(Object6AEntity* this) {
|
||||
Entity* e = FindEntity(OBJECT, OBJECT_6A, 6, 3, 98);
|
||||
void sub_08094D10(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = FindEntity(OBJECT, CUTSCENE_MISC_OBJECT, 6, 3, 98);
|
||||
if (e != NULL) {
|
||||
e->action = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094D34(Object6AEntity* this) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x15, 0xd);
|
||||
void sub_08094D34(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x15, 0xd);
|
||||
if (e != NULL) {
|
||||
e->x.HALF.HI = gRoomControls.origin_x + Q_8_8(1.0);
|
||||
e->y.HALF.HI = gRoomControls.origin_y + Q_8_8(2.345);
|
||||
@@ -267,14 +273,14 @@ void sub_08094D34(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094D70(Object6AEntity* this) {
|
||||
Entity* e = FindEntity(OBJECT, OBJECT_6A, 6, 0x15, 0xd);
|
||||
void sub_08094D70(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = FindEntity(OBJECT, CUTSCENE_MISC_OBJECT, 6, 0x15, 0xd);
|
||||
if (e != NULL) {
|
||||
e->action = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094D94(Object6AEntity* this) {
|
||||
void sub_08094D94(CutsceneMiscObjectEntity* this) {
|
||||
u32 tmp;
|
||||
|
||||
if (super->action != 0) {
|
||||
@@ -291,7 +297,7 @@ void sub_08094D94(Object6AEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
}
|
||||
|
||||
void sub_08094DD8(Object6AEntity* this) {
|
||||
void sub_08094DD8(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(0x6a, 0x4, 0);
|
||||
if (e != NULL) {
|
||||
e->x.HALF.HI = gRoomControls.origin_x + Q_8_8(15.0 / 16.0);
|
||||
@@ -300,14 +306,14 @@ void sub_08094DD8(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094E0C(Object6AEntity* this) {
|
||||
Entity* e = FindEntity(OBJECT, OBJECT_6A, 6, 4, 0);
|
||||
void sub_08094E0C(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = FindEntity(OBJECT, CUTSCENE_MISC_OBJECT, 6, 4, 0);
|
||||
if (e != NULL) {
|
||||
e->action = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094E30(Object6AEntity* this) {
|
||||
void sub_08094E30(CutsceneMiscObjectEntity* this) {
|
||||
if (super->type2 == 0) {
|
||||
if ((gRoomTransition.frameCount % 32) == 0) {
|
||||
Entity* e = CreateObject(0x6A, 5, 1);
|
||||
@@ -377,11 +383,11 @@ void sub_08094E30(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094F98(Object6AEntity* this) {
|
||||
CreateObject(OBJECT_6A, 5, 0);
|
||||
void sub_08094F98(CutsceneMiscObjectEntity* this) {
|
||||
CreateObject(CUTSCENE_MISC_OBJECT, 5, 0);
|
||||
}
|
||||
|
||||
void sub_08094FA8(Object6AEntity* this) {
|
||||
void sub_08094FA8(CutsceneMiscObjectEntity* this) {
|
||||
switch (super->action) {
|
||||
case 0:
|
||||
super->action = 1;
|
||||
@@ -432,7 +438,7 @@ void sub_08094FA8(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095088(Object6AEntity* this) {
|
||||
void sub_08095088(CutsceneMiscObjectEntity* this) {
|
||||
u32 tmp;
|
||||
|
||||
switch (super->action) {
|
||||
@@ -464,7 +470,7 @@ void sub_08095088(Object6AEntity* this) {
|
||||
super->type = tmp;
|
||||
}
|
||||
|
||||
void sub_08095120(Object6AEntity* this) {
|
||||
void sub_08095120(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
SetDefaultPriority(super, PRIO_NO_BLOCK);
|
||||
@@ -477,14 +483,14 @@ void sub_08095120(Object6AEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
}
|
||||
|
||||
void sub_08095164(Object6AEntity* this) {
|
||||
Entity* e = FindEntity(OBJECT, OBJECT_6A, 6, 8, 0);
|
||||
void sub_08095164(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = FindEntity(OBJECT, CUTSCENE_MISC_OBJECT, 6, 8, 0);
|
||||
if (e != NULL) {
|
||||
InitAnimationForceUpdate(e, 3);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095188(Object6AEntity* this) {
|
||||
void sub_08095188(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
SetDefaultPriority(super, PRIO_NO_BLOCK);
|
||||
@@ -496,7 +502,7 @@ void sub_08095188(Object6AEntity* this) {
|
||||
HandleEntity0x82Actions(super);
|
||||
}
|
||||
|
||||
void sub_080951C4(Object6AEntity* this) {
|
||||
void sub_080951C4(CutsceneMiscObjectEntity* this) {
|
||||
Entity* p;
|
||||
|
||||
if (super->action == 0) {
|
||||
@@ -525,18 +531,18 @@ void sub_080951C4(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095244(Object6AEntity* this) {
|
||||
void sub_08095244(CutsceneMiscObjectEntity* this) {
|
||||
if (super->type == 0) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0xA, 0);
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0xA, 0);
|
||||
if (e != NULL) {
|
||||
e->parent = super;
|
||||
PositionRelative(super, e, Q_16_16(16.0), -Q_16_16(16.0));
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_Object6ASwordInChest);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, &script_CutsceneMiscObjectSwordInChest);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095288(Object6AEntity* this) {
|
||||
void sub_08095288(CutsceneMiscObjectEntity* this) {
|
||||
Entity* p;
|
||||
|
||||
if (super->action == 0) {
|
||||
@@ -570,8 +576,8 @@ void sub_08095288(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095330(Object6AEntity* this) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0xB, 0);
|
||||
void sub_08095330(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0xB, 0);
|
||||
if (e != NULL) {
|
||||
super->child = e;
|
||||
e->child = super;
|
||||
@@ -582,7 +588,7 @@ void sub_08095330(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095364(Object6AEntity* this) {
|
||||
void sub_08095364(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = super->child;
|
||||
if (e != NULL) {
|
||||
e->frameIndex = 2;
|
||||
@@ -598,7 +604,7 @@ void sub_08095364(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080953A4(Object6AEntity* this) {
|
||||
void sub_080953A4(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->z.HALF.HI = -16;
|
||||
@@ -617,24 +623,24 @@ void sub_080953A4(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095420(Object6AEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0xC, 0);
|
||||
void sub_08095420(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0xC, 0);
|
||||
if (e != NULL) {
|
||||
PositionRelative(super, e, 0, Q_16_16(-16));
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_527(Object6AEntity* this) {
|
||||
void nullsub_527(CutsceneMiscObjectEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0809545C(Object6AEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* p = CreateObject(OBJECT_6A, 0xD, 0);
|
||||
void sub_0809545C(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* p = CreateObject(CUTSCENE_MISC_OBJECT, 0xD, 0);
|
||||
Entity* e;
|
||||
if (p != NULL) {
|
||||
PositionRelative(super, p, 0, Q_16_16(-16));
|
||||
((Object6AEntity*)p)->ctx = StartCutscene(p, (u16*)ctx->intVariable);
|
||||
e = CreateObject(OBJECT_6A, 2, 0);
|
||||
((CutsceneMiscObjectEntity*)p)->ctx = StartCutscene(p, (u16*)ctx->intVariable);
|
||||
e = CreateObject(CUTSCENE_MISC_OBJECT, 2, 0);
|
||||
if (e != NULL) {
|
||||
CopyPosition(p, e);
|
||||
e->parent = p;
|
||||
@@ -642,15 +648,15 @@ void sub_0809545C(Object6AEntity* this, ScriptExecutionContext* ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080954AC(Object6AEntity* this, u32 arg2) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x1A, 0);
|
||||
void sub_080954AC(CutsceneMiscObjectEntity* this, u32 arg2) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x1A, 0);
|
||||
if (e != NULL) {
|
||||
CopyPosition(super, e);
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_08015B14);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, &script_08015B14);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080954DC(Object6AEntity* this) {
|
||||
void sub_080954DC(CutsceneMiscObjectEntity* this) {
|
||||
switch (super->action) {
|
||||
case 0:
|
||||
if (super->timer != 0) {
|
||||
@@ -702,14 +708,14 @@ void sub_080954DC(Object6AEntity* this) {
|
||||
GetNextFrame(super);
|
||||
}
|
||||
|
||||
void sub_0809567C(Object6AEntity* this) {
|
||||
void sub_0809567C(CutsceneMiscObjectEntity* this) {
|
||||
super->action = 3;
|
||||
super->subAction = 1;
|
||||
super->speed = 0x400;
|
||||
super->direction = sub_080045DA(super->x.WORD - ((s16)this->px << 16), super->y.WORD - ((s16)this->py << 16));
|
||||
}
|
||||
|
||||
void sub_080956B4(Object6AEntity* this) {
|
||||
void sub_080956B4(CutsceneMiscObjectEntity* this) {
|
||||
Entity* p;
|
||||
u16* p1;
|
||||
u16* p2;
|
||||
@@ -745,7 +751,7 @@ void sub_080956B4(Object6AEntity* this) {
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
tmp = &((Object6AEntityType15*)this)->vars;
|
||||
tmp = &((CutsceneMiscObjectEntityType15*)this)->vars;
|
||||
MemCopy(&tmp->arr[2], &tmp->arr[0], 0x1C);
|
||||
super->x.HALF.HI = tmp->my_x;
|
||||
super->y.HALF.HI = tmp->my_y;
|
||||
@@ -754,8 +760,8 @@ void sub_080956B4(Object6AEntity* this) {
|
||||
tmp->parent_y = p->y.HALF.HI;
|
||||
}
|
||||
|
||||
void sub_08095754(Object6AEntity* this) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0xF, super->type2);
|
||||
void sub_08095754(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0xF, super->type2);
|
||||
if (e != NULL) {
|
||||
e->parent = super;
|
||||
CopyPosition(super, e);
|
||||
@@ -763,7 +769,7 @@ void sub_08095754(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809577C(Object6AEntity* this) {
|
||||
void sub_0809577C(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->z.HALF.HI = -16;
|
||||
@@ -774,8 +780,8 @@ void sub_0809577C(Object6AEntity* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void sub_080957B4(Object6AEntity* this) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x10, 0);
|
||||
void sub_080957B4(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x10, 0);
|
||||
if (e != NULL) {
|
||||
e->parent = super;
|
||||
CopyPosition(super, e);
|
||||
@@ -783,7 +789,7 @@ void sub_080957B4(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080957DC(Object6AEntity* this) {
|
||||
void sub_080957DC(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
sub_0807DD64(super);
|
||||
@@ -794,17 +800,17 @@ void sub_080957DC(Object6AEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
}
|
||||
|
||||
void sub_08095810(Object6AEntity* this) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x11, 0);
|
||||
void sub_08095810(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x11, 0);
|
||||
if (e != NULL) {
|
||||
e->parent = super;
|
||||
CopyPosition(super, e);
|
||||
SortEntityAbove(super, e);
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_ZeldaMagic);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, &script_ZeldaMagic);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809584C(Object6AEntity* this) {
|
||||
void sub_0809584C(CutsceneMiscObjectEntity* this) {
|
||||
u32 tmp, idx;
|
||||
|
||||
idx = super->health;
|
||||
@@ -827,7 +833,7 @@ void sub_0809584C(Object6AEntity* this) {
|
||||
super->type = tmp;
|
||||
}
|
||||
|
||||
void sub_080958D8(Object6AEntity* this) {
|
||||
void sub_080958D8(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
sub_0807DD64(super);
|
||||
@@ -839,7 +845,7 @@ void sub_080958D8(Object6AEntity* this) {
|
||||
sub_08095954(this);
|
||||
}
|
||||
|
||||
void sub_08095918(Object6AEntity* this) {
|
||||
void sub_08095918(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
SetDefaultPriority(super, PRIO_PLAYER_EVENT);
|
||||
@@ -851,12 +857,12 @@ void sub_08095918(Object6AEntity* this) {
|
||||
GetNextFrame(super);
|
||||
}
|
||||
|
||||
void sub_08095954(Object6AEntity* this) {
|
||||
void sub_08095954(CutsceneMiscObjectEntity* this) {
|
||||
typedef struct {
|
||||
s8 x, y;
|
||||
} s8XY;
|
||||
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x14, 0);
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x14, 0);
|
||||
if (e != NULL) {
|
||||
u32 tmp, x, y;
|
||||
e->parent = super;
|
||||
@@ -865,7 +871,7 @@ void sub_08095954(Object6AEntity* this) {
|
||||
y = ((s8XY*)(&gUnk_08122AF8[tmp]))->y << 16;
|
||||
PositionRelative(super, e, x, y);
|
||||
e->z.HALF.HI = -3;
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_08012C48);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, &script_08012C48);
|
||||
EnqueueSFX(SFX_124);
|
||||
super->frame &= ~1;
|
||||
} else {
|
||||
@@ -873,7 +879,7 @@ void sub_08095954(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080959CC(Object6AEntity* this) {
|
||||
void sub_080959CC(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->spriteSettings.draw = 0;
|
||||
@@ -886,25 +892,25 @@ void sub_080959CC(Object6AEntity* this) {
|
||||
sub_08095D30(this, super->frame & ~0x80);
|
||||
}
|
||||
|
||||
void sub_08095A1C(Object6AEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x16, 0);
|
||||
void sub_08095A1C(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x16, 0);
|
||||
if (e != NULL) {
|
||||
e->x.HALF.HI = gRoomControls.origin_x + 232;
|
||||
e->y.HALF.HI = gRoomControls.origin_y + 312;
|
||||
e->z.HALF.HI = -4;
|
||||
e->collisionLayer = 2;
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095A68(Object6AEntity* this) {
|
||||
Entity* e = FindEntity(6, OBJECT_6A, 6, 0x16, 0);
|
||||
void sub_08095A68(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = FindEntity(6, CUTSCENE_MISC_OBJECT, 6, 0x16, 0);
|
||||
if (e != NULL) {
|
||||
e->action = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095A8C(Object6AEntity* this) {
|
||||
void sub_08095A8C(CutsceneMiscObjectEntity* this) {
|
||||
switch (super->action) {
|
||||
case 0:
|
||||
super->action++;
|
||||
@@ -937,7 +943,7 @@ void sub_08095A8C(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095B48(Object6AEntity* this) {
|
||||
void sub_08095B48(CutsceneMiscObjectEntity* this) {
|
||||
Entity* p;
|
||||
u32 tmp;
|
||||
|
||||
@@ -969,15 +975,15 @@ void sub_08095B48(Object6AEntity* this) {
|
||||
super->type = tmp;
|
||||
}
|
||||
|
||||
void sub_08095BE0(Object6AEntity* this, u32 val) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x18, val);
|
||||
void sub_08095BE0(CutsceneMiscObjectEntity* this, u32 val) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x18, val);
|
||||
if (e != NULL) {
|
||||
e->parent = super;
|
||||
CopyPosition(super, e);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095C00(Object6AEntity* this) {
|
||||
void sub_08095C00(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action & 0x80) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
@@ -993,7 +999,7 @@ void sub_08095C00(Object6AEntity* this) {
|
||||
}
|
||||
|
||||
void sub_08095C48(Entity* this) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x19, 0);
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x19, 0);
|
||||
if (e != NULL) {
|
||||
this->child = e;
|
||||
e->parent = this;
|
||||
@@ -1001,7 +1007,7 @@ void sub_08095C48(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095C68(Object6AEntity* this) {
|
||||
void sub_08095C68(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
sub_080042D0(super, super->frameIndex, (u16)super->spriteIndex);
|
||||
@@ -1017,8 +1023,8 @@ void sub_08095C68(Object6AEntity* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void sub_08095CB0(Object6AEntity* this) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x1B, 0);
|
||||
void sub_08095CB0(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x1B, 0);
|
||||
if (e != NULL) {
|
||||
super->child = e;
|
||||
e->parent = super;
|
||||
@@ -1029,7 +1035,7 @@ void sub_08095CB0(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095CE0(Object6AEntity* this) {
|
||||
void sub_08095CE0(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->spriteSettings.draw = 0;
|
||||
@@ -1042,29 +1048,29 @@ void sub_08095CE0(Object6AEntity* this) {
|
||||
sub_08095D30(this, super->frame & ~0x80);
|
||||
}
|
||||
|
||||
void sub_08095D30(Object6AEntity* this, u32 a2) {
|
||||
void sub_08095D30(CutsceneMiscObjectEntity* this, u32 a2) {
|
||||
if (a2 != 0)
|
||||
ChangeObjPalette(super, gUnk_08122B00[a2] & ~0x80);
|
||||
}
|
||||
|
||||
void sub_08095D54(Object6AEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x1C, 0);
|
||||
void sub_08095D54(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x1C, 0);
|
||||
if (e != NULL) {
|
||||
CopyPosition(&gPlayerEntity, e);
|
||||
e->collisionLayer = 2;
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095D8C(Object6AEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x1D, 0);
|
||||
void sub_08095D8C(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x1D, 0);
|
||||
if (e != NULL) {
|
||||
CopyPosition(super, e);
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095DBC(Object6AEntity* this) {
|
||||
void sub_08095DBC(CutsceneMiscObjectEntity* this) {
|
||||
if (gActiveScriptInfo.syncFlags & 0x10)
|
||||
DeleteThisEntity();
|
||||
if (super->type2 == 0) {
|
||||
@@ -1093,17 +1099,17 @@ void sub_08095DBC(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08095E7C(Object6AEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x1E, 0);
|
||||
void sub_08095E7C(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x1E, 0);
|
||||
if (e != NULL) {
|
||||
CopyPosition(super, e);
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
}
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/object6A/sub_08095EAC.inc",
|
||||
void sub_08095EAC(Object6AEntity* this, ScriptExecutionContext* ctx)) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x1E, 1);
|
||||
NONMATCH("asm/non_matching/cutsceneMiscObject/sub_08095EAC.inc",
|
||||
void sub_08095EAC(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx)) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x1E, 1);
|
||||
s32 x, y;
|
||||
|
||||
if (e != NULL) {
|
||||
@@ -1131,7 +1137,7 @@ NONMATCH("asm/non_matching/object6A/sub_08095EAC.inc",
|
||||
END_NONMATCH
|
||||
|
||||
#define local ((Type1F*)this)
|
||||
void sub_08095F38(Object6AEntity* this) {
|
||||
void sub_08095F38(CutsceneMiscObjectEntity* this) {
|
||||
u32 tmp;
|
||||
|
||||
if (super->action == 0) {
|
||||
@@ -1176,16 +1182,16 @@ void sub_08095F38(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08096028(Object6AEntity* this) {
|
||||
void sub_08096028(CutsceneMiscObjectEntity* this) {
|
||||
u32 type2 = 6;
|
||||
if (!CheckLocalFlagByBank(FLAG_BANK_3, 123))
|
||||
type2 = 4;
|
||||
if (!CheckLocalFlagByBank(FLAG_BANK_3, 122))
|
||||
type2 = 3;
|
||||
CreateObject(OBJECT_6A, 0x1F, type2);
|
||||
CreateObject(CUTSCENE_MISC_OBJECT, 0x1F, type2);
|
||||
}
|
||||
|
||||
void sub_08096058(Object6AEntity* this) {
|
||||
void sub_08096058(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
sub_0807DD64(super);
|
||||
@@ -1195,7 +1201,7 @@ void sub_08096058(Object6AEntity* this) {
|
||||
GetNextFrame(super);
|
||||
}
|
||||
|
||||
void sub_08096084(Object6AEntity* this) {
|
||||
void sub_08096084(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
sub_0807DD64(super);
|
||||
@@ -1209,27 +1215,27 @@ void sub_08096084(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080960C4(Object6AEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x23, 0x49);
|
||||
void sub_080960C4(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x23, 0x49);
|
||||
if (e != NULL) {
|
||||
e->parent = super;
|
||||
CopyPosition(super, e);
|
||||
e->spriteRendering.b3 = gUnk_08114F34[super->spriteRendering.b3];
|
||||
SortEntityBelow(super, e);
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
}
|
||||
e = CreateObject(OBJECT_6A, 0x24, 0x4A);
|
||||
e = CreateObject(CUTSCENE_MISC_OBJECT, 0x24, 0x4A);
|
||||
if (e != NULL) {
|
||||
e->parent = super;
|
||||
CopyPosition(super, e);
|
||||
e->spriteRendering.b3 = gUnk_08114F30[super->spriteRendering.b3];
|
||||
SortEntityAbove(super, e);
|
||||
e->collisionLayer = 2;
|
||||
((Object6AEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08096168(Object6AEntity* this) {
|
||||
void sub_08096168(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->spriteSettings.draw = 1;
|
||||
@@ -1241,10 +1247,10 @@ void sub_08096168(Object6AEntity* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void sub_080961B0(Object6AEntity* this) {
|
||||
void sub_080961B0(CutsceneMiscObjectEntity* this) {
|
||||
int i;
|
||||
for (i = 0; i < 8; ++i) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x25, 0);
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x25, 0);
|
||||
if (e != NULL) {
|
||||
CopyPosition(super, e);
|
||||
e->direction = 32 * i;
|
||||
@@ -1253,42 +1259,42 @@ void sub_080961B0(Object6AEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080961F4(Object6AEntity* this) {
|
||||
void sub_080961F4(CutsceneMiscObjectEntity* this) {
|
||||
super->spriteSettings.draw = 1;
|
||||
super->frameIndex = 0;
|
||||
}
|
||||
|
||||
void sub_08096208(Object6AEntity* this, u32 x) {
|
||||
void sub_08096208(CutsceneMiscObjectEntity* this, u32 x) {
|
||||
s8* p = &gUnk_08122B2E[x * 2];
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x26, 0);
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x26, 0);
|
||||
if (e != NULL) {
|
||||
PositionRelative(super, e, Q_16_16(p[0]), Q_16_16(p[1]));
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809623C(Object6AEntity* this) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x27, 0);
|
||||
void sub_0809623C(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x27, 0);
|
||||
if (e != NULL) {
|
||||
PositionRelative(super, e, 0, Q_16_16(-16.0));
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08096260(Object6AEntity* this) {
|
||||
Entity* e = CreateObject(OBJECT_6A, 0x28, 0);
|
||||
void sub_08096260(CutsceneMiscObjectEntity* this) {
|
||||
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x28, 0);
|
||||
if (e != NULL) {
|
||||
PositionRelative(super, e, 0, Q_16_16(-16.0));
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08096284(Object6AEntity* this) {
|
||||
void sub_08096284(CutsceneMiscObjectEntity* this) {
|
||||
sub_0809629C(this, 0xd);
|
||||
}
|
||||
|
||||
void sub_08096290(Object6AEntity* this) {
|
||||
void sub_08096290(CutsceneMiscObjectEntity* this) {
|
||||
sub_0809629C(this, 0xe);
|
||||
}
|
||||
|
||||
void sub_0809629C(Object6AEntity* this, u32 type) {
|
||||
void sub_0809629C(CutsceneMiscObjectEntity* this, u32 type) {
|
||||
u32 tmp;
|
||||
|
||||
if (super->action == 0) {
|
||||
@@ -1304,15 +1310,15 @@ void sub_0809629C(Object6AEntity* this, u32 type) {
|
||||
super->type = tmp;
|
||||
}
|
||||
|
||||
void sub_080962D8(Object6AEntity* this) {
|
||||
void sub_080962D8(CutsceneMiscObjectEntity* this) {
|
||||
SetFade(FADE_BLACK_WHITE | FADE_INSTANT, 0x100);
|
||||
}
|
||||
|
||||
void sub_080962E8(Object6AEntity* this) {
|
||||
void sub_080962E8(CutsceneMiscObjectEntity* this) {
|
||||
SetFade(FADE_IN_OUT | FADE_BLACK_WHITE | FADE_INSTANT, 0x100);
|
||||
}
|
||||
|
||||
void sub_080962F8(Object6AEntity* this, ScriptExecutionContext* ctx) {
|
||||
void sub_080962F8(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) {
|
||||
HitboxCfg* cfg = &gUnk_08122B3C[ctx->intVariable];
|
||||
sub_08078850(super, 1, cfg->_c, cfg->_8);
|
||||
super->hitbox = &cfg->hit;
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* @file object69.c
|
||||
* @file cutsceneOrchestrator.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object69 object
|
||||
* @brief CutsceneO rchestrator object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "hitbox.h"
|
||||
#include "functions.h"
|
||||
#include "hitbox.h"
|
||||
|
||||
void Object69(Entity* this) {
|
||||
void CutsceneOrchestrator(Entity* this) {
|
||||
if ((this->flags & ENT_SCRIPTED) != 0) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
+11
-5
@@ -1,10 +1,16 @@
|
||||
#include "global.h"
|
||||
/**
|
||||
* @file deathFx.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Death Fx object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "sound.h"
|
||||
#include "functions.h"
|
||||
#include "object/deathFx.h"
|
||||
#include "enemy.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object/deathFx.h"
|
||||
#include "sound.h"
|
||||
|
||||
void sub_08081790(DeathFxObject* this);
|
||||
void DeathFx_Delete(DeathFxObject* this);
|
||||
|
||||
@@ -1,37 +1,36 @@
|
||||
/**
|
||||
* @file object21.c
|
||||
* @file dirtParticle.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object21 object
|
||||
* @brief Dirt Particle object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unk_68[0x18];
|
||||
/*0x80*/ u32 unk_80;
|
||||
/*0x84*/ u32 unk_84;
|
||||
} Object21Entity;
|
||||
} DirtParticleEntity;
|
||||
|
||||
void sub_08087A10(Object21Entity*);
|
||||
void sub_08087AFC(Object21Entity*);
|
||||
void sub_08087B58(Object21Entity*);
|
||||
void sub_08087B88(Object21Entity*);
|
||||
void sub_08087B9C(Object21Entity*);
|
||||
void sub_08087B9C(Object21Entity*);
|
||||
void DirtParticle_Init(DirtParticleEntity*);
|
||||
void DirtParticle_Action1(DirtParticleEntity*);
|
||||
void DirtParticle_Action3(DirtParticleEntity*);
|
||||
void sub_08087B88(DirtParticleEntity*);
|
||||
void sub_08087B9C(DirtParticleEntity*);
|
||||
void sub_08087B9C(DirtParticleEntity*);
|
||||
|
||||
void Object21(Object21Entity* this) {
|
||||
static void (*const gUnk_08120A68[])(Object21Entity*) = {
|
||||
sub_08087A10,
|
||||
sub_08087AFC,
|
||||
void DirtParticle(DirtParticleEntity* this) {
|
||||
static void (*const DirtParticle_Actions[])(DirtParticleEntity*) = {
|
||||
DirtParticle_Init,
|
||||
DirtParticle_Action1,
|
||||
NULL,
|
||||
sub_08087B58,
|
||||
DirtParticle_Action3,
|
||||
};
|
||||
gUnk_08120A68[super->action](this);
|
||||
DirtParticle_Actions[super->action](this);
|
||||
GetNextFrame(super);
|
||||
if (super->timer != 0) {
|
||||
super->timer--;
|
||||
@@ -54,7 +53,7 @@ void Object21(Object21Entity* this) {
|
||||
|
||||
extern const Hitbox gUnk_08120A8C;
|
||||
|
||||
void sub_08087A10(Object21Entity* this) {
|
||||
void DirtParticle_Init(DirtParticleEntity* this) {
|
||||
static const u8 gUnk_08120A78[] = {
|
||||
3,
|
||||
63,
|
||||
@@ -102,8 +101,8 @@ void sub_08087A10(Object21Entity* this) {
|
||||
InitializeAnimation(super, 0x10);
|
||||
}
|
||||
|
||||
void sub_08087AFC(Object21Entity* this) {
|
||||
Object21Entity* entity;
|
||||
void DirtParticle_Action1(DirtParticleEntity* this) {
|
||||
DirtParticleEntity* entity;
|
||||
if ((super->contactFlags & 0x80) == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -118,15 +117,15 @@ void sub_08087AFC(Object21Entity* this) {
|
||||
break;
|
||||
case 0x1b:
|
||||
case 0x1c:
|
||||
entity = (Object21Entity*)super->contactedEntity;
|
||||
entity = (DirtParticleEntity*)super->contactedEntity;
|
||||
super->direction = CalculateDirectionTo(entity->unk_84, entity->unk_80, super->x.WORD, super->y.WORD);
|
||||
super->speed = 0x100;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08087B58(Object21Entity* this) {
|
||||
static void (*const gUnk_08120A80[])(Object21Entity*) = {
|
||||
void DirtParticle_Action3(DirtParticleEntity* this) {
|
||||
static void (*const gUnk_08120A80[])(DirtParticleEntity*) = {
|
||||
sub_08087B88,
|
||||
sub_08087B9C,
|
||||
sub_08087B9C,
|
||||
@@ -140,13 +139,13 @@ void sub_08087B58(Object21Entity* this) {
|
||||
|
||||
const Hitbox gUnk_08120A8C = { 0, 0, { 6, 3, 3, 6 }, 3, 3 };
|
||||
|
||||
void sub_08087B88(Object21Entity* this) {
|
||||
void sub_08087B88(DirtParticleEntity* this) {
|
||||
super->knockbackSpeed = 0x100;
|
||||
super->subAction = 1;
|
||||
super->gustJarTolerance = 1;
|
||||
}
|
||||
|
||||
void sub_08087B9C(Object21Entity* this) {
|
||||
void sub_08087B9C(DirtParticleEntity* this) {
|
||||
if (sub_0806F3E4(super)) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -4,11 +4,10 @@
|
||||
*
|
||||
* @brief Double Bookshelf object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
|
||||
@@ -1,22 +1,28 @@
|
||||
/**
|
||||
* @file elementsBackground.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Elements Background object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
|
||||
void sub_080A04A4(Entity*);
|
||||
void sub_080A04E0(Entity*);
|
||||
void ElementsBackground_Init(Entity*);
|
||||
void ElementsBackground_Action1(Entity*);
|
||||
void sub_080A04E8();
|
||||
|
||||
void ObjectAD(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_080A04A4,
|
||||
sub_080A04E0,
|
||||
void ElementsBackground(Entity* this) {
|
||||
static void (*const ElementsBackground_Actions[])(Entity*) = {
|
||||
ElementsBackground_Init,
|
||||
ElementsBackground_Action1,
|
||||
};
|
||||
|
||||
actionFuncs[this->action]((Entity*)this);
|
||||
ElementsBackground_Actions[this->action]((Entity*)this);
|
||||
}
|
||||
|
||||
void sub_080A04A4(Entity* this) {
|
||||
void ElementsBackground_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->frameIndex = 4;
|
||||
this->timer = 0;
|
||||
@@ -27,7 +33,7 @@ void sub_080A04A4(Entity* this) {
|
||||
sub_080A04E8();
|
||||
}
|
||||
|
||||
void sub_080A04E0(Entity* this) {
|
||||
void ElementsBackground_Action1(Entity* this) {
|
||||
sub_080A04E8();
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/**
|
||||
* @file eyeSwitch.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief EyeSwitch object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "hitbox.h"
|
||||
#include "flags.h"
|
||||
#include "hitbox.h"
|
||||
#include "sound.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "message.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -131,7 +131,7 @@ void EzloCap_Type1Action1(EzloCapEntity* this) {
|
||||
super->timer++;
|
||||
super->subtimer = 10;
|
||||
tmp = super->timer - 1;
|
||||
obj = CreateObjectWithParent(super, OBJECT_79, tmp, 0);
|
||||
obj = CreateObjectWithParent(super, SHRINKING_HIEROGLYPHS, tmp, 0);
|
||||
super->child = obj;
|
||||
if (obj != NULL) {
|
||||
if (tmp == 0) {
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
/**
|
||||
* @file object61.c
|
||||
* @file ezloCapFlying.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object61 object
|
||||
* @brief Ezlo Cap Flying object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "new_player.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -19,18 +18,18 @@ typedef struct {
|
||||
/*0x72*/ u16 unk_72;
|
||||
/*0x74*/ u16 unk_74;
|
||||
/*0x76*/ u16 unk_76;
|
||||
} Object61Entity;
|
||||
} EzloCapFlyingEntity;
|
||||
|
||||
void Object61_Init(Object61Entity*);
|
||||
void Object61_Action1(Object61Entity*);
|
||||
void Object61_Action1Type0(Object61Entity*);
|
||||
void Object61_Action1Type1(Object61Entity*);
|
||||
void sub_080936C8(Object61Entity*);
|
||||
void EzloCapFlying_Init(EzloCapFlyingEntity*);
|
||||
void EzloCapFlying_Action1(EzloCapFlyingEntity*);
|
||||
void EzloCapFlying_Action1Type0(EzloCapFlyingEntity*);
|
||||
void EzloCapFlying_Action1Type1(EzloCapFlyingEntity*);
|
||||
void sub_080936C8(EzloCapFlyingEntity*);
|
||||
|
||||
void Object61(Object61Entity* this) {
|
||||
static void (*const Object61_Actions[])(Object61Entity*) = {
|
||||
Object61_Init,
|
||||
Object61_Action1,
|
||||
void EzloCapFlying(EzloCapFlyingEntity* this) {
|
||||
static void (*const EzloCapFlying_Actions[])(EzloCapFlyingEntity*) = {
|
||||
EzloCapFlying_Init,
|
||||
EzloCapFlying_Action1,
|
||||
};
|
||||
if ((gPlayerState.flags & PL_PARACHUTE) == 0) {
|
||||
if (super->type == 0) {
|
||||
@@ -38,10 +37,10 @@ void Object61(Object61Entity* this) {
|
||||
}
|
||||
DeleteThisEntity();
|
||||
}
|
||||
Object61_Actions[super->action](this);
|
||||
EzloCapFlying_Actions[super->action](this);
|
||||
}
|
||||
|
||||
void Object61_Init(Object61Entity* this) {
|
||||
void EzloCapFlying_Init(EzloCapFlyingEntity* this) {
|
||||
super->action = 1;
|
||||
super->lastFrameIndex = 0xff;
|
||||
super->palette.b.b0 = gPlayerEntity.palette.b.b0;
|
||||
@@ -50,20 +49,20 @@ void Object61_Init(Object61Entity* this) {
|
||||
super->spriteRendering.b0 = 3;
|
||||
this->unk_6e = 0x180;
|
||||
this->unk_72 = 0x180;
|
||||
CreateObjectWithParent(super, OBJECT_61, 1, 0);
|
||||
CreateObjectWithParent(super, EZLO_CAP_FLYING, 1, 0);
|
||||
}
|
||||
Object61_Action1(this);
|
||||
EzloCapFlying_Action1(this);
|
||||
}
|
||||
|
||||
void Object61_Action1(Object61Entity* this) {
|
||||
static void (*const Object61_Action1Types[])(Object61Entity*) = {
|
||||
Object61_Action1Type0,
|
||||
Object61_Action1Type1,
|
||||
void EzloCapFlying_Action1(EzloCapFlyingEntity* this) {
|
||||
static void (*const EzloCapFlying_Action1Types[])(EzloCapFlyingEntity*) = {
|
||||
EzloCapFlying_Action1Type0,
|
||||
EzloCapFlying_Action1Type1,
|
||||
};
|
||||
Object61_Action1Types[super->type](this);
|
||||
EzloCapFlying_Action1Types[super->type](this);
|
||||
}
|
||||
|
||||
void Object61_Action1Type0(Object61Entity* this) {
|
||||
void EzloCapFlying_Action1Type0(EzloCapFlyingEntity* this) {
|
||||
u32 tmp;
|
||||
if ((s16)this->unk_6e < 0) {
|
||||
this->unk_6e = -this->unk_6e;
|
||||
@@ -77,7 +76,7 @@ void Object61_Action1Type0(Object61Entity* this) {
|
||||
if (this->unk_72 > 0x80) {
|
||||
this->unk_72 -= 0x20;
|
||||
} else {
|
||||
super->subtimer += 1;
|
||||
super->subtimer++;
|
||||
SoundReq(SFX_124);
|
||||
}
|
||||
if (this->unk_6e < 0x120) {
|
||||
@@ -128,7 +127,7 @@ void Object61_Action1Type0(Object61Entity* this) {
|
||||
sub_0806FEBC(&gPlayerEntity, 1, super);
|
||||
}
|
||||
|
||||
void Object61_Action1Type1(Object61Entity* this) {
|
||||
void EzloCapFlying_Action1Type1(EzloCapFlyingEntity* this) {
|
||||
super->frameIndex = ((gPlayerEntity.direction + (gPlayerEntity.direction >> 1)) >> 2) + 2;
|
||||
if (super->frameIndex != super->lastFrameIndex) {
|
||||
super->lastFrameIndex = super->frameIndex;
|
||||
@@ -137,12 +136,12 @@ void Object61_Action1Type1(Object61Entity* this) {
|
||||
CopyPosition(&gPlayerEntity, super);
|
||||
super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
|
||||
super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
|
||||
sub_0806FCF4(super, ((Object61Entity*)super->parent)->unk_72, 0x18, 0);
|
||||
sub_0806FCF4(super, ((EzloCapFlyingEntity*)super->parent)->unk_72, 0x18, 0);
|
||||
super->spriteOffsetY = -super->spriteOffsetY;
|
||||
sub_0806FEBC(&gPlayerEntity, 0, super);
|
||||
}
|
||||
|
||||
void sub_080936C8(Object61Entity* this) {
|
||||
void sub_080936C8(EzloCapFlyingEntity* this) {
|
||||
s32 tmp = gNewPlayerEntity.unk_7c;
|
||||
this->unk_76 = 0x138 - (gNewPlayerEntity.unk_7c >> 2);
|
||||
this->unk_74 = 8 - (tmp / 0x3c);
|
||||
+5
-5
@@ -6,12 +6,12 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
#include "hitbox.h"
|
||||
#include "collision.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "hitbox.h"
|
||||
#include "item.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
|
||||
+13
-7
@@ -1,12 +1,18 @@
|
||||
/**
|
||||
* @file fan.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Fan object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "collision.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "player.h"
|
||||
#include "functions.h"
|
||||
#include "sound.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "collision.h"
|
||||
#include "player.h"
|
||||
#include "sound.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -38,13 +44,13 @@ void Fan_Action3(FanEntity* this);
|
||||
bool32 sub_0809EF78(FanEntity*, Entity*);
|
||||
|
||||
void Fan(Entity* this) {
|
||||
static void (*const actionFuncs[])(FanEntity*) = {
|
||||
static void (*const Fan_Actions[])(FanEntity*) = {
|
||||
Fan_Init,
|
||||
Fan_Action1,
|
||||
Fan_Action2,
|
||||
Fan_Action3,
|
||||
};
|
||||
actionFuncs[this->action]((FanEntity*)this);
|
||||
Fan_Actions[this->action]((FanEntity*)this);
|
||||
}
|
||||
|
||||
void Fan_Init(FanEntity* this) {
|
||||
@@ -238,7 +244,7 @@ void sub_0809F0E4(FanEntity* this) {
|
||||
const s8* collisionData;
|
||||
|
||||
EnqueueSFX(SFX_183);
|
||||
pEVar1 = CreateObject(OBJECT_B2, super->type ^ 2, 0);
|
||||
pEVar1 = CreateObject(FAN_WIND, super->type ^ 2, 0);
|
||||
if (pEVar1 != NULL) {
|
||||
pEVar1->parent = super;
|
||||
collisionData = typeOffsets + super->type * 2;
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
#include "global.h"
|
||||
/**
|
||||
* @file fanWind.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Fan Wind object
|
||||
*/
|
||||
#include "collision.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "collision.h"
|
||||
#include "global.h"
|
||||
|
||||
void ObjectB2(Entity* this) {
|
||||
void FanWind(Entity* this) {
|
||||
u8* collisionData;
|
||||
|
||||
if (this->action == 0) {
|
||||
@@ -6,13 +6,13 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "message.h"
|
||||
#include "fileselect.h"
|
||||
#include "screen.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "item.h"
|
||||
#include "message.h"
|
||||
#include "object.h"
|
||||
#include "screen.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
#include "object.h"
|
||||
#include "main.h"
|
||||
#include "menu.h"
|
||||
/**
|
||||
* @file fileScreenObjects.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief File Screen Objects object
|
||||
*/
|
||||
#include "fileselect.h"
|
||||
#include "functions.h"
|
||||
#include "main.h"
|
||||
#include "menu.h"
|
||||
#include "object.h"
|
||||
|
||||
extern int sub_0807A094(int);
|
||||
extern u32 sub_080041EC(int, int);
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/**
|
||||
* @file fireballChain.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Fireball Chain object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "projectile.h"
|
||||
#include "projectile/winder.h"
|
||||
|
||||
|
||||
+16
-10
@@ -1,20 +1,26 @@
|
||||
#include "object.h"
|
||||
/**
|
||||
* @file fireplace.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Fireplace object
|
||||
*/
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
|
||||
void sub_0809B7A0(Entity* this);
|
||||
void Fireplace_Action1(Entity* this);
|
||||
void sub_0809B7DC(Entity* this);
|
||||
void sub_0809B7C0(Entity* this);
|
||||
void sub_0809B708(Entity* this);
|
||||
void Fireplace_Init(Entity* this);
|
||||
|
||||
void Fireplace(Entity* e) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_0809B708,
|
||||
sub_0809B7A0,
|
||||
static void (*const Fireplace_Actions[])(Entity*) = {
|
||||
Fireplace_Init,
|
||||
Fireplace_Action1,
|
||||
};
|
||||
actionFuncs[e->action](e);
|
||||
Fireplace_Actions[e->action](e);
|
||||
}
|
||||
|
||||
void sub_0809B708(Entity* this) {
|
||||
void Fireplace_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
this->speed = 0x80;
|
||||
@@ -25,10 +31,10 @@ void sub_0809B708(Entity* this) {
|
||||
sub_0807B7D8(0x30b, TILE(this->x.HALF.HI, this->y.HALF.HI), 2);
|
||||
SetTile(0x4061, TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer);
|
||||
}
|
||||
sub_0809B7A0(this);
|
||||
Fireplace_Action1(this);
|
||||
}
|
||||
|
||||
void sub_0809B7A0(Entity* this) {
|
||||
void Fireplace_Action1(Entity* this) {
|
||||
sub_0809B7C0(this);
|
||||
if (this->timer) {
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
/**
|
||||
* @file flame.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Flame object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "sound.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "flags.h"
|
||||
|
||||
extern void sub_0807AB44(Entity*, s32, s32);
|
||||
|
||||
void (*const gUnk_08120DD0[])(Entity*);
|
||||
void (*const Flame_Actions[])(Entity*);
|
||||
|
||||
void Object2A(Entity* this) {
|
||||
gUnk_08120DD0[this->action](this);
|
||||
void Flame(Entity* this) {
|
||||
Flame_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void Object2A_Init(Entity* this) {
|
||||
void Flame_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
if (this->type2 != 0) {
|
||||
@@ -41,7 +47,7 @@ void Object2A_Init(Entity* this) {
|
||||
EnqueueSFX(SFX_124);
|
||||
}
|
||||
|
||||
void sub_08089BA0(Entity* this) {
|
||||
void Flame_Action1(Entity* this) {
|
||||
u32 val;
|
||||
GetNextFrame(this);
|
||||
|
||||
@@ -92,7 +98,7 @@ void sub_08089BA0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void (*const gUnk_08120DD0[])(Entity*) = {
|
||||
Object2A_Init,
|
||||
sub_08089BA0,
|
||||
void (*const Flame_Actions[])(Entity*) = {
|
||||
Flame_Init,
|
||||
Flame_Action1,
|
||||
};
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @file floatingBlock.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Floating Block object
|
||||
*/
|
||||
#include "object.h"
|
||||
|
||||
void FloatingBlock(Entity* this) {
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#define NENT_DEPRECATED
|
||||
/**
|
||||
* @file floatingPlatform.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Floating Platform object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
|
||||
+13
-13
@@ -6,13 +6,13 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "hitbox.h"
|
||||
#include "screen.h"
|
||||
#include "message.h"
|
||||
#include "collision.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "hitbox.h"
|
||||
#include "message.h"
|
||||
#include "object.h"
|
||||
#include "screen.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -21,7 +21,7 @@ typedef struct {
|
||||
} FourElementsEntity;
|
||||
|
||||
extern u32 getItemMetaDataGetTextIndex(u32);
|
||||
extern void sub_0807DF50(void);
|
||||
extern void EnablePauseMenu(void);
|
||||
|
||||
extern u16 script_PlayerGetElement[];
|
||||
|
||||
@@ -45,7 +45,7 @@ void FourElements(FourElementsEntity* this) {
|
||||
}
|
||||
|
||||
void FourElements_Init(FourElementsEntity* this) {
|
||||
Entity* objectAD;
|
||||
Entity* elementsBackground;
|
||||
super->action = 1;
|
||||
super->spriteSettings.draw = 1;
|
||||
super->spritePriority.b1 = 2;
|
||||
@@ -67,10 +67,10 @@ void FourElements_Init(FourElementsEntity* this) {
|
||||
gScreen.controls.layerFXControl = 0x640;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
sub_0805BC4C();
|
||||
objectAD = CreateObjectWithParent(super, OBJECT_AD, super->type - 0x40, 0);
|
||||
if (objectAD != NULL) {
|
||||
objectAD->parent = super;
|
||||
super->child = objectAD;
|
||||
elementsBackground = CreateObjectWithParent(super, ELEMENTS_BACKGROUND, super->type - 0x40, 0);
|
||||
if (elementsBackground != NULL) {
|
||||
elementsBackground->parent = super;
|
||||
super->child = elementsBackground;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ void FourElements_Action6(FourElementsEntity* this) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
SetPriorityTimer(90);
|
||||
gPlayerState.controlMode = 1;
|
||||
sub_0807DF50();
|
||||
EnablePauseMenu();
|
||||
SetRoomFlag(0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -1,22 +1,28 @@
|
||||
/**
|
||||
* @file frozenFlower.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Frozen Flower object
|
||||
*/
|
||||
#include "object.h"
|
||||
|
||||
void sub_0808A9DC(Entity*);
|
||||
void nullsub_519(Entity*);
|
||||
void FrozenFlower_Init(Entity*);
|
||||
void FrozenFlower_Action1(Entity*);
|
||||
|
||||
void FrozenFlower(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_0808A9DC,
|
||||
nullsub_519,
|
||||
static void (*const FrozenFlower_Actions[])(Entity*) = {
|
||||
FrozenFlower_Init,
|
||||
FrozenFlower_Action1,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
FrozenFlower_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0808A9DC(Entity* this) {
|
||||
void FrozenFlower_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->frameIndex = this->type;
|
||||
this->spriteRendering.b3 = 3;
|
||||
this->spritePriority.b0 = 7;
|
||||
}
|
||||
|
||||
void nullsub_519(Entity* this) {
|
||||
void FrozenFlower_Action1(Entity* this) {
|
||||
}
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
*
|
||||
* @brief Frozen Octorok object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "enemy/octorokBoss.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "message.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
*
|
||||
* @brief Frozen Water Element object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -21,20 +20,20 @@ typedef struct {
|
||||
|
||||
void sub_0809C0A8(FrozenWaterElementEntity*);
|
||||
void sub_0809C23C(FrozenWaterElementEntity*);
|
||||
void sub_0809BECC(FrozenWaterElementEntity*);
|
||||
void sub_0809BF1C(FrozenWaterElementEntity*);
|
||||
void sub_0809BF74(FrozenWaterElementEntity*);
|
||||
void FrozenWaterElement_Init(FrozenWaterElementEntity*);
|
||||
void FrozenWaterElement_Action1(FrozenWaterElementEntity*);
|
||||
void FrozenWaterElement_Action2(FrozenWaterElementEntity*);
|
||||
|
||||
void FrozenWaterElement(FrozenWaterElementEntity* this) {
|
||||
static void (*const gUnk_08123DB4[])(FrozenWaterElementEntity*) = {
|
||||
sub_0809BECC,
|
||||
sub_0809BF1C,
|
||||
sub_0809BF74,
|
||||
static void (*const FrozenWaterElement_Actions[])(FrozenWaterElementEntity*) = {
|
||||
FrozenWaterElement_Init,
|
||||
FrozenWaterElement_Action1,
|
||||
FrozenWaterElement_Action2,
|
||||
};
|
||||
gUnk_08123DB4[super->action](this);
|
||||
FrozenWaterElement_Actions[super->action](this);
|
||||
}
|
||||
|
||||
void sub_0809BECC(FrozenWaterElementEntity* this) {
|
||||
void FrozenWaterElement_Init(FrozenWaterElementEntity* this) {
|
||||
Entity* obj;
|
||||
if (CheckFlags(0x9b)) {
|
||||
DeleteThisEntity();
|
||||
@@ -51,10 +50,10 @@ void sub_0809BECC(FrozenWaterElementEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809BF1C(FrozenWaterElementEntity* this) {
|
||||
void FrozenWaterElement_Action1(FrozenWaterElementEntity* this) {
|
||||
SetAffineInfo(super, 0xcc, 0xcc, 0);
|
||||
if (CheckFlags(OUGONTEKI_G)) {
|
||||
Entity* obj = CreateObject(OBJECT_90, 0, 0);
|
||||
Entity* obj = CreateObject(WATER_ELEMENT, 0, 0);
|
||||
if (obj != NULL) {
|
||||
gRoomControls.camera_target = obj;
|
||||
(super->child)->child = obj;
|
||||
@@ -66,7 +65,7 @@ void sub_0809BF1C(FrozenWaterElementEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809BF74(FrozenWaterElementEntity* this) {
|
||||
void FrozenWaterElement_Action2(FrozenWaterElementEntity* this) {
|
||||
static const u8 gUnk_08123DC0[] = {
|
||||
3, 7, 15, 31, 63, 63, 63, 63, 63, 63, 63, 0,
|
||||
};
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
/**
|
||||
* @file furniture.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Furniture object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
#include "room.h"
|
||||
|
||||
extern void sub_080001D0(u32, u32, u32);
|
||||
|
||||
@@ -500,7 +506,7 @@ static void sub_08090E4C(FurnitureEntity* this) {
|
||||
}
|
||||
|
||||
void sub_08090E64(FurnitureEntity* this) {
|
||||
Entity* e = CreateObject(OBJECT_2A, 0, 0);
|
||||
Entity* e = CreateObject(FLAME, 0, 0);
|
||||
if (e != NULL) {
|
||||
PositionRelative(super, e, Q_16_16((s16)((u16)-2 + super->type2)), 0);
|
||||
e->z.HALF.HI -= 16;
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
/**
|
||||
* @file gentariCurtain.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Gentari Curtain object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "asm.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
#include "room.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -17,27 +23,27 @@ typedef struct {
|
||||
u16 flags;
|
||||
} GentariCurtainEntity;
|
||||
|
||||
void sub_08092050(GentariCurtainEntity* this);
|
||||
void sub_0809214C(GentariCurtainEntity* this);
|
||||
void sub_08092164(GentariCurtainEntity* this);
|
||||
void nullsub_118(GentariCurtainEntity* this);
|
||||
void GentariCurtain_Init(GentariCurtainEntity* this);
|
||||
void GentariCurtain_Action1(GentariCurtainEntity* this);
|
||||
void GentariCurtain_Action2(GentariCurtainEntity* this);
|
||||
void GentariCurtain_Action3(GentariCurtainEntity* this);
|
||||
void sub_0809223C(GentariCurtainEntity* this);
|
||||
void sub_080921BC(GentariCurtainEntity* this);
|
||||
void sub_080921F0(GentariCurtainEntity* this);
|
||||
void sub_08092214(GentariCurtainEntity* this);
|
||||
|
||||
void GentariCurtain(Entity* this) {
|
||||
static void (*const actionFuncs[])(GentariCurtainEntity*) = {
|
||||
sub_08092050,
|
||||
sub_0809214C,
|
||||
sub_08092164,
|
||||
nullsub_118,
|
||||
static void (*const GentariCurtain_Actions[])(GentariCurtainEntity*) = {
|
||||
GentariCurtain_Init,
|
||||
GentariCurtain_Action1,
|
||||
GentariCurtain_Action2,
|
||||
GentariCurtain_Action3,
|
||||
};
|
||||
|
||||
actionFuncs[this->action]((GentariCurtainEntity*)this);
|
||||
GentariCurtain_Actions[this->action]((GentariCurtainEntity*)this);
|
||||
}
|
||||
|
||||
void sub_08092050(GentariCurtainEntity* this) {
|
||||
void GentariCurtain_Init(GentariCurtainEntity* this) {
|
||||
if (CheckFlags(this->flags)) {
|
||||
super->action = 3;
|
||||
super->x.HALF.HI += 2;
|
||||
@@ -65,13 +71,13 @@ void sub_08092050(GentariCurtainEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809214C(GentariCurtainEntity* this) {
|
||||
void GentariCurtain_Action1(GentariCurtainEntity* this) {
|
||||
if (CheckFlags(this->flags)) {
|
||||
super->action = 2;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08092164(GentariCurtainEntity* this) {
|
||||
void GentariCurtain_Action2(GentariCurtainEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 3;
|
||||
@@ -83,7 +89,7 @@ void sub_08092164(GentariCurtainEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_118(GentariCurtainEntity* this) {
|
||||
void GentariCurtain_Action3(GentariCurtainEntity* this) {
|
||||
}
|
||||
|
||||
void sub_080921BC(GentariCurtainEntity* this) {
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @file giantBookLadder.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Giant Book Ladder object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "object.h"
|
||||
#include "manager.h"
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @file giantLeaf.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Giant Leaf object
|
||||
*/
|
||||
#include "object.h"
|
||||
|
||||
void sub_0808D618(Entity* ent);
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @file giantRock.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Giant Rock object
|
||||
*/
|
||||
#include "entity.h"
|
||||
|
||||
void GiantRock(Entity* this) {
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/**
|
||||
* @file giantRock2.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Giant Rock 2 object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "asm.h"
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "asm.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
/**
|
||||
* @file gleerokParticle.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Gleerok Particle object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "player.h"
|
||||
#include "asm.h"
|
||||
#include "effects.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
#include "effects.h"
|
||||
#include "player.h"
|
||||
#include "room.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -15,24 +21,25 @@ typedef struct {
|
||||
u32 unk7c;
|
||||
union SplitWord unk80;
|
||||
union SplitWord unk84;
|
||||
} Object67Entity;
|
||||
} GleerokParticleEntity;
|
||||
|
||||
extern Hitbox gUnk_080FD2E8;
|
||||
|
||||
void sub_08094148(Object67Entity*);
|
||||
void sub_08094398(Object67Entity*);
|
||||
void sub_08094424(Object67Entity*);
|
||||
void sub_08094540(Object67Entity*);
|
||||
void sub_08094570(Object67Entity*);
|
||||
void sub_08094660(Object67Entity*);
|
||||
void sub_08094708(Object67Entity*, u32, u32);
|
||||
void GleerokParticle_Init(GleerokParticleEntity*);
|
||||
void GleerokParticle_Action1(GleerokParticleEntity*);
|
||||
void GleerokParticle_Action2(GleerokParticleEntity*);
|
||||
void GleerokParticle_Action3(GleerokParticleEntity*);
|
||||
void GleerokParticle_Action4(GleerokParticleEntity*);
|
||||
void sub_08094660(GleerokParticleEntity*);
|
||||
void sub_08094708(GleerokParticleEntity*, u32, u32);
|
||||
|
||||
void Object67(Entity* this) {
|
||||
static void (*const actionFuncs[])(Object67Entity*) = {
|
||||
sub_08094148, sub_08094398, sub_08094424, sub_08094540, sub_08094570,
|
||||
void GleerokParticle(Entity* this) {
|
||||
static void (*const GleerokParticle_Actions[])(GleerokParticleEntity*) = {
|
||||
GleerokParticle_Init, GleerokParticle_Action1, GleerokParticle_Action2,
|
||||
GleerokParticle_Action3, GleerokParticle_Action4,
|
||||
};
|
||||
|
||||
actionFuncs[this->action]((Object67Entity*)this);
|
||||
GleerokParticle_Actions[this->action]((GleerokParticleEntity*)this);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@@ -51,7 +58,7 @@ typedef struct {
|
||||
u8 filler[3];
|
||||
} gUnk_081229F0_struct;
|
||||
|
||||
void sub_08094148(Object67Entity* this) {
|
||||
void GleerokParticle_Init(GleerokParticleEntity* this) {
|
||||
static const gUnk_081229D0_struct gUnk_081229D0[] = {
|
||||
{ 0, 12, 8, 8 }, { 0x40, 0x14, -8, 8 }, { 0x80, 4, 8, -8 }, { 0xC0, 0x1C, -8, -8 },
|
||||
{ 0, 12, 0, 0 }, { 0x40, 0x14, 0, 0 }, { 0x80, 4, 0, 0 }, { 0xC0, 0x1C, -0, 0 },
|
||||
@@ -101,7 +108,7 @@ void sub_08094148(Object67Entity* this) {
|
||||
break;
|
||||
case 1:
|
||||
if (super->type2 == 0) {
|
||||
super->child = CreateObjectWithParent(super, OBJECT_67, 1, 0x80);
|
||||
super->child = CreateObjectWithParent(super, GLEEROK_PARTICLE, 1, 0x80);
|
||||
if (super->child != NULL) {
|
||||
super->child->child = super->parent;
|
||||
}
|
||||
@@ -158,10 +165,10 @@ void sub_08094148(Object67Entity* this) {
|
||||
}
|
||||
|
||||
super->action = 1;
|
||||
sub_08094398(this);
|
||||
GleerokParticle_Action1(this);
|
||||
}
|
||||
|
||||
void sub_08094398(Object67Entity* this) {
|
||||
void GleerokParticle_Action1(GleerokParticleEntity* this) {
|
||||
switch (super->type) {
|
||||
case 0:
|
||||
GetNextFrame(super);
|
||||
@@ -190,7 +197,7 @@ void sub_08094398(Object67Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094424(Object67Entity* this) {
|
||||
void GleerokParticle_Action2(GleerokParticleEntity* this) {
|
||||
u32 uVar2;
|
||||
u32 uVar5;
|
||||
|
||||
@@ -234,7 +241,7 @@ void sub_08094424(Object67Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094540(Object67Entity* this) {
|
||||
void GleerokParticle_Action3(GleerokParticleEntity* this) {
|
||||
if (--this->unk7c == -1) {
|
||||
super->action = 4;
|
||||
this->unk7c = 2;
|
||||
@@ -242,7 +249,7 @@ void sub_08094540(Object67Entity* this) {
|
||||
SetAffineInfo(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
|
||||
}
|
||||
|
||||
void sub_08094570(Object67Entity* this) {
|
||||
void GleerokParticle_Action4(GleerokParticleEntity* this) {
|
||||
u32 uVar2;
|
||||
u32 uVar3;
|
||||
|
||||
@@ -284,7 +291,7 @@ void sub_08094570(Object67Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094660(Object67Entity* this) {
|
||||
void sub_08094660(GleerokParticleEntity* this) {
|
||||
int iVar1;
|
||||
int spriteOffsetX;
|
||||
int iVar3;
|
||||
@@ -325,7 +332,7 @@ void sub_08094660(Object67Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094708(Object67Entity* this, u32 param_2, u32 param_3) {
|
||||
void sub_08094708(GleerokParticleEntity* this, u32 param_2, u32 param_3) {
|
||||
int index;
|
||||
|
||||
for (index = this->unk74 * 2 + 8; index != 0; index--) {
|
||||
@@ -1,13 +1,19 @@
|
||||
/**
|
||||
* @file graveyardKey.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Graveyard Key object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "player.h"
|
||||
#include "asm.h"
|
||||
#include "functions.h"
|
||||
#include "sound.h"
|
||||
#include "item.h"
|
||||
#include "flags.h"
|
||||
#include "effects.h"
|
||||
#include "collision.h"
|
||||
#include "effects.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
#include "player.h"
|
||||
#include "sound.h"
|
||||
|
||||
typedef struct _struct_gUnk_08123FB0 {
|
||||
void (*const funcEnt)(Entity*);
|
||||
@@ -33,10 +39,10 @@ static_assert(sizeof(struct_gUnk_08123FB0) == 0x20);
|
||||
|
||||
void sub_0809D91C(Entity*);
|
||||
bool32 sub_0809D93C(Entity*, const struct_gUnk_08123FB0*);
|
||||
void Object96_Init(Entity*, const struct_gUnk_08123FB0*);
|
||||
void Object96_Action1(Entity*, const struct_gUnk_08123FB0*);
|
||||
void Object96_Action2(Entity*, const struct_gUnk_08123FB0*);
|
||||
void Object96_Action3(Entity*, const struct_gUnk_08123FB0*);
|
||||
void GraveyardKey_Init(Entity*, const struct_gUnk_08123FB0*);
|
||||
void GraveyardKey_Action1(Entity*, const struct_gUnk_08123FB0*);
|
||||
void GraveyardKey_Action2(Entity*, const struct_gUnk_08123FB0*);
|
||||
void GraveyardKey_Action3(Entity*, const struct_gUnk_08123FB0*);
|
||||
|
||||
static const struct_gUnk_08123FB0 gUnk_08123FB0[] = {
|
||||
{ sub_0809D91C, sub_0809D93C, 0, 0, 0x30, 0x30, 0x1, 0x3c, 0x3c, 0x13, Q_16_16(1.0), 0x1800, 0x60, 0x40, 0x4021,
|
||||
@@ -56,17 +62,17 @@ static const struct_gUnk_08123FB0 gUnk_08123FB0[] = {
|
||||
{ NULL, NULL, 0, 0, 0, 0, 0x0, 0x5c, 0x5c, 0x81, 0, 0x1800, 0x100, 0x20, 0x0, 0x1, 0x0 },
|
||||
};
|
||||
|
||||
void Object96(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*, const struct_gUnk_08123FB0*) = {
|
||||
Object96_Init,
|
||||
Object96_Action1,
|
||||
Object96_Action2,
|
||||
Object96_Action3,
|
||||
void GraveyardKey(Entity* this) {
|
||||
static void (*const GraveyardKey_Actions[])(Entity*, const struct_gUnk_08123FB0*) = {
|
||||
GraveyardKey_Init,
|
||||
GraveyardKey_Action1,
|
||||
GraveyardKey_Action2,
|
||||
GraveyardKey_Action3,
|
||||
};
|
||||
actionFuncs[this->action](this, &gUnk_08123FB0[this->type]);
|
||||
GraveyardKey_Actions[this->action](this, &gUnk_08123FB0[this->type]);
|
||||
}
|
||||
|
||||
void Object96_Init(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
void GraveyardKey_Init(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
u32 type;
|
||||
u32 dir;
|
||||
|
||||
@@ -91,7 +97,7 @@ void Object96_Init(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
this->type = type;
|
||||
}
|
||||
|
||||
void Object96_Action1(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
void GraveyardKey_Action1(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
u32 type;
|
||||
s32 iVar3;
|
||||
|
||||
@@ -110,7 +116,7 @@ void Object96_Action1(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
this->type = type;
|
||||
}
|
||||
|
||||
void Object96_Action2(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
void GraveyardKey_Action2(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
u8 type;
|
||||
|
||||
LinearMoveUpdate(this);
|
||||
@@ -134,7 +140,7 @@ void Object96_Action2(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
this->type = type;
|
||||
}
|
||||
|
||||
void Object96_Action3(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
void GraveyardKey_Action3(Entity* this, const struct_gUnk_08123FB0* param_2) {
|
||||
u8 type;
|
||||
|
||||
if (gPlayerState.flags & PL_MINISH) {
|
||||
@@ -1,8 +1,14 @@
|
||||
/**
|
||||
* @file greatFairy.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Great Fairy object
|
||||
*/
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
#include "save.h"
|
||||
#include "script.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
#include "script.h"
|
||||
|
||||
void GreatFairy_InitializeAnimation(Entity*);
|
||||
Entity* GreatFairy_CreateForm(Entity*, u32, u32);
|
||||
@@ -525,7 +531,7 @@ void sub_08087424(Entity* this, ScriptExecutionContext* context) {
|
||||
Entity* ent;
|
||||
|
||||
ResetPlayerAnimationAndAction();
|
||||
ent = CreateObject(OBJECT_64, 0, 0);
|
||||
ent = CreateObject(THUNDERBOLD, 0, 0);
|
||||
if (ent != NULL) {
|
||||
ent->parent = &gPlayerEntity;
|
||||
CopyPosition(&gPlayerEntity, ent);
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
/**
|
||||
* @file guruguruBar.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Guruguru Bar object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "projectile.h"
|
||||
#include "room.h"
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
#include "projectile.h"
|
||||
#include "room.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -12,21 +18,21 @@ typedef struct {
|
||||
u16 unk76;
|
||||
u8 filler2[0x6];
|
||||
u8 unk7e;
|
||||
} Object98Entity;
|
||||
} GuruguruBarEntity;
|
||||
|
||||
void sub_0809E360(Object98Entity*);
|
||||
void sub_0809E3E4(Object98Entity*);
|
||||
void GuruguruBar_Init(GuruguruBarEntity*);
|
||||
void GuruguruBar_Action1(GuruguruBarEntity*);
|
||||
|
||||
void Object98(Entity* this) {
|
||||
static void (*const actionFuncs[])(Object98Entity*) = {
|
||||
sub_0809E360,
|
||||
sub_0809E3E4,
|
||||
void GuruguruBar(Entity* this) {
|
||||
static void (*const GuruguruBar_Actions[])(GuruguruBarEntity*) = {
|
||||
GuruguruBar_Init,
|
||||
GuruguruBar_Action1,
|
||||
};
|
||||
|
||||
actionFuncs[this->action]((Object98Entity*)this);
|
||||
GuruguruBar_Actions[this->action]((GuruguruBarEntity*)this);
|
||||
}
|
||||
|
||||
void sub_0809E360(Object98Entity* this) {
|
||||
void GuruguruBar_Init(GuruguruBarEntity* this) {
|
||||
u32 bVar1;
|
||||
Entity* projEnt;
|
||||
u32 index;
|
||||
@@ -54,7 +60,7 @@ void sub_0809E360(Object98Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809E3E4(Object98Entity* this) {
|
||||
void GuruguruBar_Action1(GuruguruBarEntity* this) {
|
||||
this->unk76 += super->type2;
|
||||
super->animationState = this->unk76 >> 2;
|
||||
if (super->type != 0) {
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @file gustJarParticle.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Gust Jar Particle object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "player.h"
|
||||
@@ -5,19 +11,19 @@
|
||||
#include "room.h"
|
||||
#include "physics.h"
|
||||
|
||||
void Object17_Init(Entity*);
|
||||
void Object17_Action1(Entity*);
|
||||
void GustJarParticle_Init(Entity*);
|
||||
void GustJarParticle_Action1(Entity*);
|
||||
|
||||
void Object17(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
Object17_Init,
|
||||
Object17_Action1,
|
||||
void GustJarParticle(Entity* this) {
|
||||
static void (*const GustJarParticle_Actions[])(Entity*) = {
|
||||
GustJarParticle_Init,
|
||||
GustJarParticle_Action1,
|
||||
};
|
||||
|
||||
actionFuncs[this->action](this);
|
||||
GustJarParticle_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void Object17_Init(Entity* this) {
|
||||
void GustJarParticle_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->speed = 0x80;
|
||||
this->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
|
||||
@@ -28,7 +34,7 @@ void Object17_Init(Entity* this) {
|
||||
InitializeAnimation(this, 0x11);
|
||||
}
|
||||
|
||||
void Object17_Action1(Entity* this) {
|
||||
void GustJarParticle_Action1(Entity* this) {
|
||||
if (this->type != 0) {
|
||||
if ((gRoomTransition.frameCount & 1) == 0) {
|
||||
GetNextFrame(this);
|
||||
@@ -1,12 +1,18 @@
|
||||
/**
|
||||
* @file gyorgBossObject.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Gyorg Boss object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "object.h"
|
||||
#include "area.h"
|
||||
#include "enemy/gyorg.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "room.h"
|
||||
#include "screen.h"
|
||||
#include "functions.h"
|
||||
#include "enemy/gyorg.h"
|
||||
|
||||
extern const ScreenTransitionData gUnk_0813ABD0;
|
||||
|
||||
@@ -39,13 +45,13 @@ void GyorgBossObject_FemalePhase4(GyorgBossObjectEntity* this);
|
||||
void GyorgBossObject_FightEnd(GyorgBossObjectEntity* this);
|
||||
|
||||
void GyorgBossObject(Entity* this) {
|
||||
static void (*const gUnk_08124ED0[])(GyorgBossObjectEntity*) = {
|
||||
static void (*const GyorgBossObject_Actions[])(GyorgBossObjectEntity*) = {
|
||||
GyorgBossObject_SetupStart, GyorgBossObject_Setup, GyorgBossObject_FemalePhase1,
|
||||
GyorgBossObject_MalePhase1, GyorgBossObject_FemalePhase2, GyorgBossObject_MalePhase2,
|
||||
GyorgBossObject_FemalePhase3, GyorgBossObject_MalePhase3, GyorgBossObject_FemalePhase4,
|
||||
GyorgBossObject_FightEnd,
|
||||
};
|
||||
gUnk_08124ED0[this->action]((GyorgBossObjectEntity*)this);
|
||||
GyorgBossObject_Actions[this->action]((GyorgBossObjectEntity*)this);
|
||||
sub_080A1DCC((GyorgBossObjectEntity*)this);
|
||||
sub_080A1C9C((GyorgBossObjectEntity*)this);
|
||||
}
|
||||
|
||||
+23
-17
@@ -1,29 +1,35 @@
|
||||
#include "sound.h"
|
||||
/**
|
||||
* @file heartContainer.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief HeartContainer object
|
||||
*/
|
||||
#include "collision.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
#include "collision.h"
|
||||
#include "sound.h"
|
||||
|
||||
static void sub_0808E6A0(Entity*);
|
||||
static void sub_0808E6E4(Entity*);
|
||||
static void sub_0808E714(Entity*);
|
||||
static void sub_0808E764(Entity*);
|
||||
static void HeartContainer_Init(Entity*);
|
||||
static void HeartContainer_Action1(Entity*);
|
||||
static void HeartContainer_Action2(Entity*);
|
||||
static void HeartContainer_Action3(Entity*);
|
||||
|
||||
static void (*const gHeartContainerActions[])(Entity*) = {
|
||||
sub_0808E6A0,
|
||||
sub_0808E6E4,
|
||||
sub_0808E714,
|
||||
sub_0808E764,
|
||||
static void (*const HeartContainer_Actions[])(Entity*) = {
|
||||
HeartContainer_Init,
|
||||
HeartContainer_Action1,
|
||||
HeartContainer_Action2,
|
||||
HeartContainer_Action3,
|
||||
};
|
||||
|
||||
const Hitbox3D gUnk_08121C58 = { 0, -3, { 5, 3, 3, 5 }, 6, 6, 12, {} };
|
||||
|
||||
void HeartContainer(Entity* this) {
|
||||
gHeartContainerActions[this->action](this);
|
||||
HeartContainer_Actions[this->action](this);
|
||||
}
|
||||
|
||||
static void sub_0808E6A0(Entity* this) {
|
||||
static void HeartContainer_Init(Entity* this) {
|
||||
if (CheckFlags(this->cutsceneBeh.HWORD)) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -35,16 +41,16 @@ static void sub_0808E6A0(Entity* this) {
|
||||
this->updatePriority = PRIO_NO_BLOCK;
|
||||
}
|
||||
|
||||
static void sub_0808E6E4(Entity* this) {
|
||||
static void HeartContainer_Action1(Entity* this) {
|
||||
if (CheckFlags(this->field_0x86.HWORD)) {
|
||||
this->action = 2;
|
||||
this->spriteSettings.draw = 1;
|
||||
this->spriteRendering.b0 = 3;
|
||||
sub_0808E714(this);
|
||||
HeartContainer_Action2(this);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_0808E714(Entity* this) {
|
||||
static void HeartContainer_Action2(Entity* this) {
|
||||
int var0 = 0x400 - this->subtimer * 8;
|
||||
if (var0 > 0x100) {
|
||||
this->subtimer++;
|
||||
@@ -58,7 +64,7 @@ static void sub_0808E714(Entity* this) {
|
||||
sub_08080CB4(this);
|
||||
}
|
||||
|
||||
static void sub_0808E764(Entity* this) {
|
||||
static void HeartContainer_Action3(Entity* this) {
|
||||
sub_08080CB4(this);
|
||||
if (!(gPlayerState.flags & PL_MINISH) && IsCollidingPlayer(this)) {
|
||||
SetFlag(this->cutsceneBeh.HWORD);
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
#include "global.h"
|
||||
/**
|
||||
* @file hiddenLadderDown.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Hidden Ladder Down object
|
||||
*/
|
||||
#include "asm.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
|
||||
void sub_08091F14(Entity*);
|
||||
void sub_08092000(Entity*);
|
||||
void HiddenLadderDown_Init(Entity*);
|
||||
void HiddenLadderDown_Action1(Entity*);
|
||||
|
||||
void HiddenLadderDown(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_08091F14,
|
||||
sub_08092000,
|
||||
static void (*const HiddenLadderDown_Actions[])(Entity*) = {
|
||||
HiddenLadderDown_Init,
|
||||
HiddenLadderDown_Action1,
|
||||
};
|
||||
if (this->action < 2) {
|
||||
actionFuncs[this->action](this);
|
||||
HiddenLadderDown_Actions[this->action](this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08091F14(Entity* this) {
|
||||
void HiddenLadderDown_Init(Entity* this) {
|
||||
u16* puVar3;
|
||||
|
||||
this->action = 1;
|
||||
@@ -40,7 +46,7 @@ void sub_08091F14(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08092000(Entity* this) {
|
||||
void HiddenLadderDown_Action1(Entity* this) {
|
||||
if (GetTileType(*(u16*)&this->field_0x70.HALF.LO, this->collisionLayer) == 0x1a6) {
|
||||
this->action = 2;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
/**
|
||||
* @file hitSwitch.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Hit Switch object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "physics.h"
|
||||
|
||||
void Object99(Entity* this) {
|
||||
Entity* parent;
|
||||
|
||||
parent = this->parent;
|
||||
void HitSwitch(Entity* this) {
|
||||
Entity* parent = this->parent;
|
||||
if (parent->next == NULL) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -1,12 +1,18 @@
|
||||
#include "global.h"
|
||||
/**
|
||||
* @file houseDoorExterior.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief House Door Exterior object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "npc.h"
|
||||
#include "object.h"
|
||||
#include "room.h"
|
||||
#include "script.h"
|
||||
#include "sound.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "npc.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ u16 unk0;
|
||||
@@ -173,7 +179,7 @@ void sub_0808692C(Entity* this) {
|
||||
static u8 sub_08086954(Entity* this) {
|
||||
if (sub_0800445C(this)) {
|
||||
if (GetAnimationStateInRectRadius(this, 6, 20) >= 0 && gPlayerEntity.animationState == 0 &&
|
||||
(u16)gPlayerState.field_0x90 == 0x400 && gPlayerState.jump_status == 0) {
|
||||
(u16)gPlayerState.playerInput.field_0x90 == PLAYER_INPUT_UP && gPlayerState.jump_status == 0) {
|
||||
this->timer--;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
/**
|
||||
* @file houseDoorInterior.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief House Door Interior object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "sound.h"
|
||||
#include "functions.h"
|
||||
#include "npc.h"
|
||||
#include "sound.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -86,7 +92,7 @@ void HouseDoorInterior_Action1(HouseDoorInteriorEntity* this) {
|
||||
if (sub_0800445C(super) && this->unk7d == 0) {
|
||||
ptr = gUnk_081227CC + super->type2;
|
||||
if (GetAnimationStateInRectRadius(super, ptr->x, ptr->y) >= 0 &&
|
||||
ptr->animationState == gPlayerEntity.animationState && gPlayerState.field_0x90 & ptr->unk2) {
|
||||
ptr->animationState == gPlayerEntity.animationState && gPlayerState.playerInput.field_0x90 & ptr->unk2) {
|
||||
--super->timer;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#include "global.h"
|
||||
/**
|
||||
* @file houseSign.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief HouseSign object
|
||||
*/
|
||||
#include "entity.h"
|
||||
|
||||
extern u32 CheckRectOnScreen(s16, s16, u32, u32);
|
||||
@@ -6,9 +11,9 @@ extern u32 CheckRectOnScreen(s16, s16, u32, u32);
|
||||
/*
|
||||
This object is created by HouseSignManager.
|
||||
It checks whether the 0x10 x 0x10 rect at field_0x80, field_0x82 is still on the screen.
|
||||
If not, then it deletes itselfs and unsets the this->type2 bit in the managers field_0x20 bitfield.
|
||||
If not, then it deletes itself and unsets the this->type2 bit in the managers field_0x20 bitfield.
|
||||
*/
|
||||
void Object1C(Entity* this) {
|
||||
void HouseSign(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
}
|
||||
@@ -6,13 +6,13 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "hitbox.h"
|
||||
#include "new_player.h"
|
||||
#include "message.h"
|
||||
#include "kinstone.h"
|
||||
#include "message.h"
|
||||
#include "new_player.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -119,8 +119,9 @@ void ItemForSale_Action2(ItemForSaleEntity* this) {
|
||||
} else {
|
||||
ptr = sub_080784E4();
|
||||
if (((*(int*)(ptr + 8) == 0) ||
|
||||
((*(u8*)(ptr + 1) != 1 || (gUnk_0200AF00.unk_2f = 7, (gPlayerState.field_0x92 & 0x88) == 0)))) &&
|
||||
((gPlayerState.field_0x92 & 0x98) != 0)) {
|
||||
((*(u8*)(ptr + 1) != 1 || (gUnk_0200AF00.unk_2f = 7, (gPlayerState.playerInput.field_0x92 &
|
||||
(PLAYER_INPUT_80 | PLAYER_INPUT_8)) == 0)))) &&
|
||||
((gPlayerState.playerInput.field_0x92 & (PLAYER_INPUT_80 | PLAYER_INPUT_10 | PLAYER_INPUT_8)) != 0)) {
|
||||
sub_080819B4(this);
|
||||
}
|
||||
}
|
||||
|
||||
+26
-20
@@ -1,14 +1,20 @@
|
||||
#include "global.h"
|
||||
#include "sound.h"
|
||||
/**
|
||||
* @file itemOnGround.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Item On Ground object
|
||||
*/
|
||||
#include "collision.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "player.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "hitbox.h"
|
||||
#include "item.h"
|
||||
#include "itemMetaData.h"
|
||||
#include "functions.h"
|
||||
#include "hitbox.h"
|
||||
#include "collision.h"
|
||||
#include "object.h"
|
||||
#include "player.h"
|
||||
#include "sound.h"
|
||||
|
||||
void sub_08081150(Entity*);
|
||||
u8 sub_0808147C(u32);
|
||||
@@ -19,11 +25,11 @@ void sub_0808153C(Entity*);
|
||||
void sub_08081598(Entity*);
|
||||
void sub_080813BC(Entity*);
|
||||
void sub_080810FC(Entity*);
|
||||
void sub_08080F20(Entity*);
|
||||
void sub_080811EC(Entity*);
|
||||
void sub_0808122C(Entity*);
|
||||
void sub_08081328(Entity*);
|
||||
void sub_0808136C(Entity*);
|
||||
void ItemOnGround_Init(Entity*);
|
||||
void ItemOnGround_Action1(Entity*);
|
||||
void ItemOnGround_Action2(Entity*);
|
||||
void ItemOnGround_Action3(Entity*);
|
||||
void ItemOnGround_Action4(Entity*);
|
||||
void sub_080810A8(Entity*);
|
||||
void sub_080810FC(Entity*);
|
||||
void sub_08081150(Entity*);
|
||||
@@ -53,8 +59,8 @@ typedef struct {
|
||||
} Unk_0811E84C;
|
||||
|
||||
void ItemOnGround(Entity* this) {
|
||||
static void (*const gUnk_0811E7D4[])(Entity*) = {
|
||||
sub_08080F20, sub_080811EC, sub_0808122C, sub_08081328, sub_0808136C,
|
||||
static void (*const ItemOnGround_Actions[])(Entity*) = {
|
||||
ItemOnGround_Init, ItemOnGround_Action1, ItemOnGround_Action2, ItemOnGround_Action3, ItemOnGround_Action4,
|
||||
};
|
||||
if (this->contactFlags & 0x80) {
|
||||
switch (this->contactFlags & 0x7F) {
|
||||
@@ -84,7 +90,7 @@ void ItemOnGround(Entity* this) {
|
||||
if (sub_0806F520(this)) {
|
||||
sub_080813BC(this);
|
||||
} else {
|
||||
gUnk_0811E7D4[this->action](this);
|
||||
ItemOnGround_Actions[this->action](this);
|
||||
}
|
||||
|
||||
if (this->type == 0x5C) {
|
||||
@@ -94,7 +100,7 @@ void ItemOnGround(Entity* this) {
|
||||
sub_08080CB4(this);
|
||||
}
|
||||
|
||||
void sub_08080F20(Entity* this) {
|
||||
void ItemOnGround_Init(Entity* this) {
|
||||
static void (*const gUnk_0811E7E8[])(Entity*) = {
|
||||
sub_080810A8, sub_080810FC, sub_08081150, sub_08081134, sub_08081188, sub_080810A8,
|
||||
sub_080810A8, sub_080811AC, sub_080811C8, sub_080811D8, sub_080810A8,
|
||||
@@ -223,7 +229,7 @@ void sub_080811D8(Entity* this) {
|
||||
SoundReq(SFX_215);
|
||||
}
|
||||
|
||||
void sub_080811EC(Entity* this) {
|
||||
void ItemOnGround_Action1(Entity* this) {
|
||||
if (this->field_0x68.HALF.HI != 6) {
|
||||
ProcessMovement2(this);
|
||||
} else {
|
||||
@@ -238,7 +244,7 @@ void sub_080811EC(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808122C(Entity* this) {
|
||||
void ItemOnGround_Action2(Entity* this) {
|
||||
static void (*const gUnk_0811E814[])(Entity*) = {
|
||||
sub_08081248, sub_08081248, sub_0808126C, sub_0808127C, nullsub_113, sub_080812A0,
|
||||
sub_08081248, sub_080812A8, sub_080812E8, nullsub_510, sub_08081248,
|
||||
@@ -300,7 +306,7 @@ void sub_080812E8(Entity* this) {
|
||||
void nullsub_510(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08081328(Entity* this) {
|
||||
void ItemOnGround_Action3(Entity* this) {
|
||||
Entity* other = this->child;
|
||||
if (!(other->kind == PLAYER_ITEM && other->id == 3)) {
|
||||
sub_08081404(this, 0);
|
||||
@@ -314,7 +320,7 @@ void sub_08081328(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808136C(Entity* this) {
|
||||
void ItemOnGround_Action4(Entity* this) {
|
||||
if (--this->timer) {
|
||||
Entity* other = this->child;
|
||||
this->x.WORD = other->x.WORD;
|
||||
|
||||
+22
-16
@@ -1,27 +1,33 @@
|
||||
#include "global.h"
|
||||
/**
|
||||
* @file jailBars.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Jail Bars object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "room.h"
|
||||
#include "sound.h"
|
||||
#include "functions.h"
|
||||
|
||||
static void SetJailBarTiles(Entity*, u32);
|
||||
void sub_080A08C4(Entity*);
|
||||
void sub_080A0910(Entity*);
|
||||
void sub_080A0938(Entity*);
|
||||
void nullsub_127(Entity*);
|
||||
void JailBars_Init(Entity*);
|
||||
void JailBars_Action1(Entity*);
|
||||
void JailBars_Action2(Entity*);
|
||||
void JailBars_Action3(Entity*);
|
||||
|
||||
void JailBars(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_080A08C4,
|
||||
sub_080A0910,
|
||||
sub_080A0938,
|
||||
nullsub_127,
|
||||
static void (*const JailBars_Actions[])(Entity*) = {
|
||||
JailBars_Init,
|
||||
JailBars_Action1,
|
||||
JailBars_Action2,
|
||||
JailBars_Action3,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
JailBars_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_080A08C4(Entity* this) {
|
||||
void JailBars_Init(Entity* this) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) == 0) {
|
||||
this->action = 1;
|
||||
SetJailBarTiles(this, 0);
|
||||
@@ -35,7 +41,7 @@ void sub_080A08C4(Entity* this) {
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
}
|
||||
|
||||
void sub_080A0910(Entity* this) {
|
||||
void JailBars_Action1(Entity* this) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) != 0) {
|
||||
this->action = 2;
|
||||
SetJailBarTiles(this, 1);
|
||||
@@ -43,7 +49,7 @@ void sub_080A0910(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080A0938(Entity* this) {
|
||||
void JailBars_Action2(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
@@ -51,7 +57,7 @@ void sub_080A0938(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_127(Entity* this) {
|
||||
void JailBars_Action3(Entity* this) {
|
||||
}
|
||||
|
||||
static void SetJailBarTiles(Entity* this, u32 arg1) {
|
||||
|
||||
@@ -1,31 +1,37 @@
|
||||
/**
|
||||
* @file japaneseSubtitle.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Japanese Subtitle object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "menu.h"
|
||||
#include "physics.h"
|
||||
#include "object.h"
|
||||
#include "physics.h"
|
||||
|
||||
extern void sub_0806FB00(Entity*, u32, u32, u32);
|
||||
extern bool32 sub_0806FB38(Entity*);
|
||||
|
||||
void ObjectB4_Type0(Entity*);
|
||||
void ObjectB4_Type1(Entity*);
|
||||
void ObjectB4_Type2(Entity*);
|
||||
void ObjectB4_Type3(Entity*);
|
||||
void JapaneseSubtitle_Type0(Entity*);
|
||||
void JapaneseSubtitle_Type1(Entity*);
|
||||
void JapaneseSubtitle_Type2(Entity*);
|
||||
void JapaneseSubtitle_Type3(Entity*);
|
||||
|
||||
const u16 gUnk_08124B10[] = { 0x40, 0x58, 0x68, 0x80, 0x94, 0xA8, 0xB0, 0x0 };
|
||||
|
||||
void ObjectB4(Entity* this) {
|
||||
void JapaneseSubtitle(Entity* this) {
|
||||
static void (*const typeFuncs[])(Entity*) = {
|
||||
ObjectB4_Type0,
|
||||
ObjectB4_Type1,
|
||||
ObjectB4_Type2,
|
||||
ObjectB4_Type3,
|
||||
JapaneseSubtitle_Type0,
|
||||
JapaneseSubtitle_Type1,
|
||||
JapaneseSubtitle_Type2,
|
||||
JapaneseSubtitle_Type3,
|
||||
};
|
||||
|
||||
typeFuncs[this->type]((Entity*)this);
|
||||
}
|
||||
|
||||
void ObjectB4_Type0(Entity* this) {
|
||||
void JapaneseSubtitle_Type0(Entity* this) {
|
||||
Entity* pEVar3;
|
||||
|
||||
switch (this->action) {
|
||||
@@ -43,7 +49,7 @@ void ObjectB4_Type0(Entity* this) {
|
||||
case 1:
|
||||
if ((this->subtimer < 7) && (--this->timer == 0)) {
|
||||
this->timer = 1;
|
||||
pEVar3 = CreateObject(OBJECT_B4, 1, this->subtimer);
|
||||
pEVar3 = CreateObject(JAPANESE_SUBTITLE, 1, this->subtimer);
|
||||
if (pEVar3 != NULL) {
|
||||
CopyPosition(this, pEVar3);
|
||||
pEVar3->y.HALF.HI = 0x68;
|
||||
@@ -58,7 +64,7 @@ void ObjectB4_Type0(Entity* this) {
|
||||
this->frameIndex = 10;
|
||||
this->action = 2;
|
||||
while (this->subtimer < 7) {
|
||||
pEVar3 = CreateObject(OBJECT_B4, 1, this->subtimer);
|
||||
pEVar3 = CreateObject(JAPANESE_SUBTITLE, 1, this->subtimer);
|
||||
if (pEVar3 != NULL) {
|
||||
CopyPosition(this, pEVar3);
|
||||
pEVar3->y.HALF.HI = 0x68;
|
||||
@@ -67,14 +73,14 @@ void ObjectB4_Type0(Entity* this) {
|
||||
this->subtimer++;
|
||||
}
|
||||
|
||||
pEVar3 = CreateObject(OBJECT_B4, 2, 0);
|
||||
pEVar3 = CreateObject(JAPANESE_SUBTITLE, 2, 0);
|
||||
if (pEVar3 != NULL) {
|
||||
pEVar3->x.HALF.HI = 0xc4;
|
||||
pEVar3->y.HALF.HI = 0x2c;
|
||||
SortEntityAbove(this, pEVar3);
|
||||
}
|
||||
|
||||
pEVar3 = CreateObject(OBJECT_B4, 3, 0);
|
||||
pEVar3 = CreateObject(JAPANESE_SUBTITLE, 3, 0);
|
||||
if (pEVar3 != NULL) {
|
||||
pEVar3->x.HALF.HI = 0xb4;
|
||||
pEVar3->y.HALF.HI = 0x19;
|
||||
@@ -84,7 +90,7 @@ void ObjectB4_Type0(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectB4_Type1(Entity* this) {
|
||||
void JapaneseSubtitle_Type1(Entity* this) {
|
||||
switch (this->action) {
|
||||
case 0:
|
||||
this->action = 1;
|
||||
@@ -103,7 +109,7 @@ void ObjectB4_Type1(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectB4_Type2(Entity* this) {
|
||||
void JapaneseSubtitle_Type2(Entity* this) {
|
||||
static const u8 gUnk_08124B30[] = { 9, 10, 11, 12, 11, 10, 9, -1 };
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
@@ -126,7 +132,7 @@ void ObjectB4_Type2(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectB4_Type3(Entity* this) {
|
||||
void JapaneseSubtitle_Type3(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 2;
|
||||
+20
-14
@@ -1,27 +1,33 @@
|
||||
#include "object.h"
|
||||
/**
|
||||
* @file jarPortal.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Jar Portal object
|
||||
*/
|
||||
#include "area.h"
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
|
||||
extern u32 PortalReadyForMinish(void);
|
||||
|
||||
u32 sub_0808C128(Entity*);
|
||||
void sub_0808C13C(Entity*);
|
||||
void sub_0808BE9C(Entity*);
|
||||
void sub_0808BF14(Entity*);
|
||||
void sub_0808BF58(Entity*);
|
||||
void sub_0808BFD8(Entity*);
|
||||
void sub_0808C0AC(Entity*);
|
||||
void JarPortal_Init(Entity*);
|
||||
void JarPortal_Action1(Entity*);
|
||||
void JarPortal_Action2(Entity*);
|
||||
void JarPortal_Action3(Entity*);
|
||||
void JarPortal_Action4(Entity*);
|
||||
void sub_0808C148(Entity*, u32);
|
||||
void sub_0808C01C(Entity*, u32);
|
||||
|
||||
void JarPortal(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_0808BE9C, sub_0808BF14, sub_0808BF58, sub_0808BFD8, sub_0808C0AC,
|
||||
static void (*const JarPortal_Actions[])(Entity*) = {
|
||||
JarPortal_Init, JarPortal_Action1, JarPortal_Action2, JarPortal_Action3, JarPortal_Action4,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
JarPortal_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0808BE9C(Entity* this) {
|
||||
void JarPortal_Init(Entity* this) {
|
||||
COLLISION_ON(this);
|
||||
this->hitType = 1;
|
||||
this->collisionFlags = 0x47;
|
||||
@@ -47,7 +53,7 @@ void sub_0808BE9C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808BF14(Entity* this) {
|
||||
void JarPortal_Action1(Entity* this) {
|
||||
if (sub_0808C128(this)) {
|
||||
this->action++;
|
||||
sub_0808C13C(this);
|
||||
@@ -61,7 +67,7 @@ void sub_0808BF14(Entity* this) {
|
||||
sub_0808C01C(this, 0);
|
||||
}
|
||||
|
||||
void sub_0808BF58(Entity* this) {
|
||||
void JarPortal_Action2(Entity* this) {
|
||||
GravityUpdate(this, Q_8_8(32.0));
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
@@ -89,7 +95,7 @@ void sub_0808BF58(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808BFD8(Entity* this) {
|
||||
void JarPortal_Action3(Entity* this) {
|
||||
if (sub_0808C128(this)) {
|
||||
++this->action;
|
||||
sub_0808C13C(this);
|
||||
@@ -129,7 +135,7 @@ void sub_0808C01C(Entity* this, u32 r1) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808C0AC(Entity* this) {
|
||||
void JarPortal_Action4(Entity* this) {
|
||||
GravityUpdate(this, Q_8_8(32.0));
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -311,7 +311,7 @@ void KeyStealingTakkuri_Type3_Action1(KeyStealingTakkuriEntity* this) {
|
||||
SoundReq(SFX_123);
|
||||
child = super->child;
|
||||
if (child != NULL) {
|
||||
Entity* obj = CreateObject(OBJECT_96, super->type2 + 2, 0);
|
||||
Entity* obj = CreateObject(GRAVEYARD_KEY, super->type2 + 2, 0);
|
||||
if (obj != NULL) {
|
||||
CopyPosition(child, obj);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
/**
|
||||
* @file objectB3.c
|
||||
* @file kinstoneSpark.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief ObjectB3 object
|
||||
* @brief Kinstone Fusion Particle object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "kinstone.h"
|
||||
#include "object.h"
|
||||
|
||||
void sub_080A0ADC(Entity*);
|
||||
void sub_080A0AF0(Entity*);
|
||||
@@ -19,7 +18,7 @@ void sub_080A0B4C(Entity*);
|
||||
void sub_080A0B60(Entity*);
|
||||
void sub_080A0B80(Entity*);
|
||||
|
||||
void ObjectB3(Entity* this) {
|
||||
void KinstoneSpark(Entity* this) {
|
||||
static void (*const gUnk_08124A10[])(Entity*) = {
|
||||
sub_080A0ADC,
|
||||
sub_080A0AF0,
|
||||
@@ -1,31 +1,37 @@
|
||||
/**
|
||||
* @file ladderHoleInBookshelf.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Ladder Hole In Bookshelf object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "player.h"
|
||||
|
||||
void sub_08093FCC(Entity* this);
|
||||
void sub_08093FE0(Entity* this);
|
||||
void LadderHoleInBookshelf_Init(Entity* this);
|
||||
void LadderHoleInBookshelf_Action1(Entity* this);
|
||||
bool32 sub_08094064(Entity* this);
|
||||
|
||||
void LadderHoleInBookshelf(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_08093FCC,
|
||||
sub_08093FE0,
|
||||
static void (*const LadderHoleInBookshelf_Actions[])(Entity*) = {
|
||||
LadderHoleInBookshelf_Init,
|
||||
LadderHoleInBookshelf_Action1,
|
||||
};
|
||||
|
||||
actionFuncs[this->action](this);
|
||||
LadderHoleInBookshelf_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_08093FCC(Entity* this) {
|
||||
void LadderHoleInBookshelf_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->collisionLayer = 2;
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
}
|
||||
|
||||
void sub_08093FE0(Entity* this) {
|
||||
void LadderHoleInBookshelf_Action1(Entity* this) {
|
||||
if (sub_08094064(this)) {
|
||||
if (this->collisionLayer == 2) {
|
||||
switch (gPlayerEntity.action) {
|
||||
case 0x1d:
|
||||
case 0x1e:
|
||||
case PLAYER_CLIMB:
|
||||
case PLAYER_USEENTRANCE:
|
||||
return;
|
||||
}
|
||||
this->collisionLayer = 1;
|
||||
@@ -33,8 +39,8 @@ void sub_08093FE0(Entity* this) {
|
||||
this->spritePriority.b0 = 5;
|
||||
} else {
|
||||
switch (gPlayerEntity.action) {
|
||||
case 0x1d:
|
||||
case 0x1e:
|
||||
case PLAYER_CLIMB:
|
||||
case PLAYER_USEENTRANCE:
|
||||
this->collisionLayer = 2;
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
this->spritePriority.b0 = 1;
|
||||
|
||||
+17
-10
@@ -1,27 +1,33 @@
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "player.h"
|
||||
/**
|
||||
* @file ladderUp.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Ladder Up object
|
||||
*/
|
||||
#include "asm.h"
|
||||
#include "sound.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "player.h"
|
||||
#include "room.h"
|
||||
#include "sound.h"
|
||||
|
||||
void LadderUp(Entity* this) {
|
||||
Entity* fxEnt;
|
||||
u32 uVar4;
|
||||
u32 action;
|
||||
|
||||
switch (this->action) {
|
||||
case 0:
|
||||
if (this->timer) {
|
||||
uVar4 = 1;
|
||||
action = 1;
|
||||
} else {
|
||||
#ifndef EU
|
||||
uVar4 = 3;
|
||||
action = 3;
|
||||
#else
|
||||
uVar4 = 2;
|
||||
action = 2;
|
||||
#endif
|
||||
}
|
||||
this->action = uVar4;
|
||||
this->action = action;
|
||||
this->spriteOffsetY += 8;
|
||||
InitializeAnimation(this, 10);
|
||||
if (this->action == 1) {
|
||||
@@ -74,5 +80,6 @@ void LadderUp(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-2
@@ -1,15 +1,21 @@
|
||||
/**
|
||||
* @file lamp.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Lamp object
|
||||
*/
|
||||
#include "entity.h"
|
||||
|
||||
void Lamp_Init(Entity* this);
|
||||
void Lamp_Action1(Entity* this);
|
||||
|
||||
void Lamp(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
static void (*const Lamp_Actions[])(Entity*) = {
|
||||
Lamp_Init,
|
||||
Lamp_Action1,
|
||||
};
|
||||
|
||||
actionFuncs[this->action](this);
|
||||
Lamp_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void Lamp_Init(Entity* this) {
|
||||
|
||||
@@ -1,27 +1,33 @@
|
||||
/**
|
||||
* @file lampParticle.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief LampParticle object
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "player.h"
|
||||
#include "item.h"
|
||||
#include "player.h"
|
||||
|
||||
void sub_0808E42C(Entity*);
|
||||
void sub_0808E448(Entity*);
|
||||
void LampParticle_Init(Entity*);
|
||||
void LampParticle_Action1(Entity*);
|
||||
|
||||
void Object45(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_0808E42C,
|
||||
sub_0808E448,
|
||||
void LampParticle(Entity* this) {
|
||||
static void (*const LampParticle_Actions[])(Entity*) = {
|
||||
LampParticle_Init,
|
||||
LampParticle_Action1,
|
||||
};
|
||||
|
||||
actionFuncs[this->action]((Entity*)this);
|
||||
LampParticle_Actions[this->action]((Entity*)this);
|
||||
}
|
||||
|
||||
void sub_0808E42C(Entity* this) {
|
||||
void LampParticle_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->updatePriority = 6;
|
||||
InitializeAnimation(this, this->type);
|
||||
}
|
||||
|
||||
void sub_0808E448(Entity* this) {
|
||||
void LampParticle_Action1(Entity* this) {
|
||||
if (1 < IsItemEquipped(ITEM_LANTERN_ON)) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -6,10 +6,10 @@
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "hitbox.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -32,8 +32,8 @@ typedef struct {
|
||||
/*0x0e*/ u8 unk_e[2];
|
||||
} LavaPlatformEntry;
|
||||
|
||||
void sub_08092278(LavaPlatformEntity*);
|
||||
void sub_08092344(LavaPlatformEntity*);
|
||||
void LavaPlatform_Type0(LavaPlatformEntity*);
|
||||
void LavaPlatform_Type1(LavaPlatformEntity*);
|
||||
void LavaPlatform_SpawnPlatforms(LavaPlatformEntity*);
|
||||
void sub_080926E4(LavaPlatformEntity*);
|
||||
void sub_0809264C(LavaPlatformEntity*);
|
||||
@@ -53,13 +53,13 @@ void LavaPlatform_Type1Action7(LavaPlatformEntity*);
|
||||
|
||||
void LavaPlatform(LavaPlatformEntity* this) {
|
||||
if (super->type == 0) {
|
||||
sub_08092278(this);
|
||||
LavaPlatform_Type0(this);
|
||||
} else {
|
||||
sub_08092344(this);
|
||||
LavaPlatform_Type1(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08092278(LavaPlatformEntity* this) {
|
||||
void LavaPlatform_Type0(LavaPlatformEntity* this) {
|
||||
static void (*const LavaPlatform_Type0Actions[])(LavaPlatformEntity*) = {
|
||||
LavaPlatform_Type0Init,
|
||||
LavaPlatform_Type0Action1,
|
||||
@@ -100,7 +100,7 @@ void LavaPlatform_Type0Action2(LavaPlatformEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08092344(LavaPlatformEntity* this) {
|
||||
void LavaPlatform_Type1(LavaPlatformEntity* this) {
|
||||
static void (*const LavaPlatform_Type1Actions[])(LavaPlatformEntity*) = {
|
||||
LavaPlatform_Type1Init, LavaPlatform_Type1Action1, LavaPlatform_Type1Action2, LavaPlatform_Type1Action3,
|
||||
LavaPlatform_Type1Action4, LavaPlatform_Type1Action5, LavaPlatform_Type1Action6, LavaPlatform_Type1Action7,
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
/**
|
||||
* @file object12.c
|
||||
* @file lightDoor.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object12 object
|
||||
* @brief Light Door object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unk_68[30];
|
||||
/*0x86*/ u16 unk_86;
|
||||
} Object12Entity;
|
||||
} LightDoorEntity;
|
||||
|
||||
void Object12_Init(Object12Entity*);
|
||||
void Object12_Action1(Object12Entity*);
|
||||
void Object12_Action2(Object12Entity*);
|
||||
void Object12_Action3(Object12Entity*);
|
||||
void Object12_Action4(Object12Entity*);
|
||||
void sub_080850FC(Object12Entity*);
|
||||
void LightDoor_Init(LightDoorEntity*);
|
||||
void LightDoor_Action1(LightDoorEntity*);
|
||||
void LightDoor_Action2(LightDoorEntity*);
|
||||
void LightDoor_Action3(LightDoorEntity*);
|
||||
void LightDoor_Action4(LightDoorEntity*);
|
||||
void sub_080850FC(LightDoorEntity*);
|
||||
|
||||
void Object12(Object12Entity* this) {
|
||||
static void (*const Object12_Actions[])(Object12Entity*) = {
|
||||
Object12_Init, Object12_Action1, Object12_Action2, Object12_Action3, Object12_Action4,
|
||||
void LightDoor(LightDoorEntity* this) {
|
||||
static void (*const LightDoor_Actions[])(LightDoorEntity*) = {
|
||||
LightDoor_Init, LightDoor_Action1, LightDoor_Action2, LightDoor_Action3, LightDoor_Action4,
|
||||
};
|
||||
Object12_Actions[super->action](this);
|
||||
LightDoor_Actions[super->action](this);
|
||||
}
|
||||
|
||||
void Object12_Init(Object12Entity* this) {
|
||||
void LightDoor_Init(LightDoorEntity* this) {
|
||||
if (super->type == 0) {
|
||||
if (CheckFlags(this->unk_86)) {
|
||||
DeleteThisEntity();
|
||||
@@ -48,10 +48,10 @@ void Object12_Init(Object12Entity* this) {
|
||||
super->frameIndex = 0;
|
||||
}
|
||||
|
||||
void Object12_Action1(Object12Entity* this) {
|
||||
void LightDoor_Action1(LightDoorEntity* this) {
|
||||
}
|
||||
|
||||
void Object12_Action2(Object12Entity* this) {
|
||||
void LightDoor_Action2(LightDoorEntity* this) {
|
||||
u32 tmp;
|
||||
u32 tmp2;
|
||||
if (--super->timer == 0) {
|
||||
@@ -72,14 +72,14 @@ void Object12_Action2(Object12Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object12_Action3(Object12Entity* this) {
|
||||
void LightDoor_Action3(LightDoorEntity* this) {
|
||||
if (--super->timer == 0) {
|
||||
super->action = 4;
|
||||
super->timer = 96;
|
||||
}
|
||||
}
|
||||
|
||||
void Object12_Action4(Object12Entity* this) {
|
||||
void LightDoor_Action4(LightDoorEntity* this) {
|
||||
LinearMoveUpdate(super);
|
||||
if (--super->timer == 0) {
|
||||
gScreen.lcd.displayControl &= 0xdfff;
|
||||
@@ -87,7 +87,7 @@ void Object12_Action4(Object12Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080850FC(Object12Entity* this) {
|
||||
void sub_080850FC(LightDoorEntity* this) {
|
||||
u32 position = COORD_TO_TILE(super);
|
||||
u32 layer = super->collisionLayer;
|
||||
SetTile(0x403d, position - 0x41, layer);
|
||||
@@ -1,40 +1,39 @@
|
||||
/**
|
||||
* @file object8E.c
|
||||
* @file lightRay.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object8E object
|
||||
* @brief Light Ray object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u16 unk_68;
|
||||
/*0x6a*/ u16 unk_6a;
|
||||
} Object8EEntity;
|
||||
} LightRayEntity;
|
||||
|
||||
extern void sub_0805AAF0(u32);
|
||||
|
||||
void sub_0809B97C(Object8EEntity*, u32);
|
||||
bool32 sub_0809BE78(Object8EEntity*);
|
||||
void Object8E_Type0(Object8EEntity*);
|
||||
void Object8E_Type1(Object8EEntity*);
|
||||
void Object8E_Type2(Object8EEntity*);
|
||||
void Object8E_Type3(Object8EEntity*);
|
||||
void Object8E_Type4(Object8EEntity*);
|
||||
void sub_0809B97C(LightRayEntity*, u32);
|
||||
bool32 sub_0809BE78(LightRayEntity*);
|
||||
void LightRay_Type0(LightRayEntity*);
|
||||
void LightRay_Type1(LightRayEntity*);
|
||||
void LightRay_Type2(LightRayEntity*);
|
||||
void LightRay_Type3(LightRayEntity*);
|
||||
void LightRay_Type4(LightRayEntity*);
|
||||
|
||||
void Object8E(Object8EEntity* this) {
|
||||
static void (*const Object8E_Types[])(Object8EEntity*) = {
|
||||
Object8E_Type0, Object8E_Type1, Object8E_Type2, Object8E_Type3, Object8E_Type4,
|
||||
void LightRay(LightRayEntity* this) {
|
||||
static void (*const LightRay_Types[])(LightRayEntity*) = {
|
||||
LightRay_Type0, LightRay_Type1, LightRay_Type2, LightRay_Type3, LightRay_Type4,
|
||||
};
|
||||
Object8E_Types[super->type](this);
|
||||
LightRay_Types[super->type](this);
|
||||
}
|
||||
|
||||
void Object8E_Type0(Object8EEntity* this) {
|
||||
void LightRay_Type0(LightRayEntity* this) {
|
||||
u32 tmp;
|
||||
RequestPriorityDuration(super, 30);
|
||||
switch (super->action) {
|
||||
@@ -85,7 +84,7 @@ void Object8E_Type0(Object8EEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809B97C(Object8EEntity* this, u32 param_2) {
|
||||
void sub_0809B97C(LightRayEntity* this, u32 param_2) {
|
||||
s32 tmp1;
|
||||
s32 tmp2;
|
||||
|
||||
@@ -107,7 +106,7 @@ void sub_0809B97C(Object8EEntity* this, u32 param_2) {
|
||||
gScreen.controls.window0HorizontalDimensions = (tmp1 << 8) | tmp2;
|
||||
}
|
||||
|
||||
void Object8E_Type1(Object8EEntity* this) {
|
||||
void LightRay_Type1(LightRayEntity* this) {
|
||||
u32 tmp;
|
||||
|
||||
RequestPriorityDuration(super, 30);
|
||||
@@ -158,7 +157,7 @@ void Object8E_Type1(Object8EEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object8E_Type2(Object8EEntity* this) {
|
||||
void LightRay_Type2(LightRayEntity* this) {
|
||||
u32 tmp;
|
||||
|
||||
RequestPriorityDuration(super, 10);
|
||||
@@ -190,7 +189,7 @@ void Object8E_Type2(Object8EEntity* this) {
|
||||
SoundReq(SFX_133);
|
||||
}
|
||||
if ((gRoomTransition.frameCount & 1U) == 0) {
|
||||
gScreen.controls.window0HorizontalDimensions += 1;
|
||||
gScreen.controls.window0HorizontalDimensions++;
|
||||
}
|
||||
} else {
|
||||
super->action = 2;
|
||||
@@ -228,7 +227,7 @@ void Object8E_Type2(Object8EEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object8E_Type3(Object8EEntity* this) {
|
||||
void LightRay_Type3(LightRayEntity* this) {
|
||||
u32 tmp;
|
||||
|
||||
RequestPriorityDuration(super, 30);
|
||||
@@ -285,7 +284,7 @@ void Object8E_Type3(Object8EEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void Object8E_Type4(Object8EEntity* this) {
|
||||
void LightRay_Type4(LightRayEntity* this) {
|
||||
u32 tmp;
|
||||
RequestPriorityDuration(super, 30);
|
||||
switch (super->action) {
|
||||
@@ -327,7 +326,7 @@ void Object8E_Type4(Object8EEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
bool32 sub_0809BE78(Object8EEntity* this) {
|
||||
bool32 sub_0809BE78(LightRayEntity* this) {
|
||||
bool32 result = FALSE;
|
||||
if (this->unk_68 == gRoomControls.scroll_x && this->unk_6a == gRoomControls.scroll_y) {
|
||||
result = TRUE;
|
||||
@@ -1,43 +1,49 @@
|
||||
#include "global.h"
|
||||
/**
|
||||
* @file lightableSwitch.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Lightable Switch object
|
||||
*/
|
||||
#include "asm.h"
|
||||
#include "sound.h"
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "hitbox.h"
|
||||
#include "object.h"
|
||||
#include "room.h"
|
||||
#include "sound.h"
|
||||
|
||||
static void sub_0809EB30(Entity*);
|
||||
static void sub_0809EAD8(Entity*);
|
||||
static void sub_0809EABC(Entity*);
|
||||
static void sub_0809EA1C(Entity*);
|
||||
static void sub_0809EB68(Entity*);
|
||||
static void sub_0809EA34(Entity*);
|
||||
static void sub_0809EA80(Entity*);
|
||||
static void nullsub_126(Entity*);
|
||||
static void sub_0809EC08(Entity*);
|
||||
static void sub_0809EBD8(Entity*);
|
||||
static void sub_0809EB80(Entity*);
|
||||
static void LightableSwitch_Type0(Entity*);
|
||||
static void LightableSwitch_Type1(Entity*);
|
||||
static void LightableSwitch_Type0_Init(Entity*);
|
||||
static void LightableSwitch_Type0_Action1(Entity*);
|
||||
static void LightableSwitch_Type1_Action3(Entity*);
|
||||
static void LightableSwitch_Type1_Action2(Entity*);
|
||||
static void LightableSwitch_Type1_Action1(Entity*);
|
||||
static void LightableSwitch_Type1_Init(Entity*);
|
||||
|
||||
void LightableSwitch(Entity* this) {
|
||||
static void (*const typeFuncs[])(Entity*) = {
|
||||
sub_0809EA1C,
|
||||
sub_0809EB68,
|
||||
static void (*const LightableSwitch_Types[])(Entity*) = {
|
||||
LightableSwitch_Type0,
|
||||
LightableSwitch_Type1,
|
||||
};
|
||||
typeFuncs[this->type](this);
|
||||
LightableSwitch_Types[this->type](this);
|
||||
sub_0809EB30(this);
|
||||
}
|
||||
|
||||
void sub_0809EA1C(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_0809EA34,
|
||||
sub_0809EA80,
|
||||
void LightableSwitch_Type0(Entity* this) {
|
||||
static void (*const LightableSwitch_Type0_Actions[])(Entity*) = {
|
||||
LightableSwitch_Type0_Init,
|
||||
LightableSwitch_Type0_Action1,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
LightableSwitch_Type0_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0809EA34(Entity* this) {
|
||||
void LightableSwitch_Type0_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
COLLISION_ON(this);
|
||||
this->frameIndex = 0;
|
||||
@@ -51,7 +57,7 @@ void sub_0809EA34(Entity* this) {
|
||||
sub_0809EABC(this);
|
||||
}
|
||||
|
||||
void sub_0809EA80(Entity* this) {
|
||||
void LightableSwitch_Type0_Action1(Entity* this) {
|
||||
|
||||
if ((this->contactFlags & 0x80) != 0) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) != 0) {
|
||||
@@ -104,17 +110,17 @@ static void sub_0809EB30(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809EB68(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_0809EB80,
|
||||
sub_0809EBD8,
|
||||
sub_0809EC08,
|
||||
nullsub_126,
|
||||
void LightableSwitch_Type1(Entity* this) {
|
||||
static void (*const LightableSwitch_Type1_Actions[])(Entity*) = {
|
||||
LightableSwitch_Type1_Init,
|
||||
LightableSwitch_Type1_Action1,
|
||||
LightableSwitch_Type1_Action2,
|
||||
LightableSwitch_Type1_Action3,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
LightableSwitch_Type1_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0809EB80(Entity* this) {
|
||||
void LightableSwitch_Type1_Init(Entity* this) {
|
||||
|
||||
this->action = 1;
|
||||
COLLISION_ON(this);
|
||||
@@ -132,7 +138,7 @@ void sub_0809EB80(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809EBD8(Entity* this) {
|
||||
void LightableSwitch_Type1_Action1(Entity* this) {
|
||||
if ((this->contactFlags & 0x80) != 0) {
|
||||
this->action = 2;
|
||||
this->timer = 16;
|
||||
@@ -142,7 +148,7 @@ void sub_0809EBD8(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809EC08(Entity* this) {
|
||||
void LightableSwitch_Type1_Action2(Entity* this) {
|
||||
|
||||
if (CheckFlags(this->cutsceneBeh.HWORD) != 0) {
|
||||
this->action = 3;
|
||||
@@ -157,5 +163,5 @@ void sub_0809EC08(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_126(Entity* this) {
|
||||
void LightableSwitch_Type1_Action3(Entity* this) {
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#define NENT_DEPRECATED
|
||||
/**
|
||||
* @file lilypadLarge.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Large Lilypad object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "area.h"
|
||||
#include "functions.h"
|
||||
@@ -381,7 +380,7 @@ void sub_08085A98(LilypadLargeEntity* this) {
|
||||
super->z.HALF.HI = 0xffc0;
|
||||
this->unk_82 = 0xf;
|
||||
}
|
||||
CreateObjectWithParent(super, OBJECT_2B, 0, 0);
|
||||
CreateObjectWithParent(super, LILYPAD_LARGE_FALLING, 0, 0);
|
||||
SoundReq(SFX_12D);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @file lilypadLargeFalling.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief LilypadLargeFalling object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
|
||||
void LilypadLargeFalling(Entity* this) {
|
||||
Entity* parent;
|
||||
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->z.WORD = 0;
|
||||
this->spriteRendering.b3 = 3;
|
||||
InitializeAnimation(this, 9);
|
||||
}
|
||||
|
||||
parent = this->parent;
|
||||
if (parent->z.WORD == 0) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
int position = 0x120 - parent->z.HALF.HI;
|
||||
SetAffineInfo(this, position, position, parent->field_0x7c.HALF_U.HI);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
#include "object.h"
|
||||
/**
|
||||
* @file lilypadSmall.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Lilypad Small object
|
||||
*/
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
|
||||
static void sub_08097B24(Entity* this);
|
||||
static bool32 CheckMovePlayer(Entity* this);
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
/**
|
||||
* @file objectC1.c
|
||||
* @file linkAnimation.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief ObjectC1 object
|
||||
* @brief Link Animation object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "message.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
@@ -23,36 +22,38 @@ typedef struct {
|
||||
/*0x6f*/ u8 unk_6f;
|
||||
/*0x70*/ u32 unk_70;
|
||||
/*0x74*/ u8 unk_74;
|
||||
} ObjectC1Entity;
|
||||
} LinkAnimationEntity;
|
||||
|
||||
void ObjectC1_Init(ObjectC1Entity*);
|
||||
void ObjectC1_Action1(ObjectC1Entity*);
|
||||
void ObjectC1_Action8(ObjectC1Entity*);
|
||||
void LinkAnimation_Init(LinkAnimationEntity*);
|
||||
void LinkAnimation_Action1(LinkAnimationEntity*);
|
||||
void LinkAnimation_Action8(LinkAnimationEntity*);
|
||||
|
||||
void ObjectC1(ObjectC1Entity* this) {
|
||||
static void (*const ObjectC1_Actions[])(ObjectC1Entity*) = {
|
||||
ObjectC1_Init, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1,
|
||||
ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action8, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1,
|
||||
ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1,
|
||||
ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1,
|
||||
ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1, ObjectC1_Action1,
|
||||
ObjectC1_Action1, ObjectC1_Action1,
|
||||
void LinkAnimation(LinkAnimationEntity* this) {
|
||||
static void (*const LinkAnimation_Actions[])(LinkAnimationEntity*) = {
|
||||
LinkAnimation_Init, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action8, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
};
|
||||
ObjectC1_Actions[super->action](this);
|
||||
LinkAnimation_Actions[super->action](this);
|
||||
}
|
||||
|
||||
void ObjectC1_Init(ObjectC1Entity* this) {
|
||||
void LinkAnimation_Init(LinkAnimationEntity* this) {
|
||||
super->action = 8;
|
||||
ObjectC1_Action8(this);
|
||||
LinkAnimation_Action8(this);
|
||||
}
|
||||
|
||||
void ObjectC1_Action1(ObjectC1Entity* this) {
|
||||
void LinkAnimation_Action1(LinkAnimationEntity* this) {
|
||||
ResetPlayerEventPriority();
|
||||
gPauseMenuOptions.disabled = 0;
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void ObjectC1_Action8(ObjectC1Entity* this) {
|
||||
void LinkAnimation_Action8(LinkAnimationEntity* this) {
|
||||
u32 one;
|
||||
u32 tmp;
|
||||
Entity* parent;
|
||||
@@ -1,38 +1,38 @@
|
||||
/**
|
||||
* @file object68.c
|
||||
* @file linkEmptyingBottle.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object68 object
|
||||
* @brief Link Emptying Bottle object
|
||||
* Handles effects of using water, mineral water or a fairy in a bottle in PlayerItemBottle_UseOther.
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "item.h"
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unk_68;
|
||||
} Object68Entity;
|
||||
} LinkEmptyingBottleEntity;
|
||||
|
||||
extern u32 sub_080B1A0C(Entity*, s32, s32);
|
||||
|
||||
void sub_08094774(Object68Entity*);
|
||||
void sub_080948D0(Object68Entity*);
|
||||
void sub_080948E8(Object68Entity*);
|
||||
void sub_08094980(Object68Entity*, u32, u32);
|
||||
void sub_08094774(LinkEmptyingBottleEntity*);
|
||||
void sub_080948D0(LinkEmptyingBottleEntity*);
|
||||
void sub_080948E8(LinkEmptyingBottleEntity*);
|
||||
void sub_08094980(LinkEmptyingBottleEntity*, u32, u32);
|
||||
|
||||
void Object68(Object68Entity* this) {
|
||||
static void (*const gUnk_08122A10[])(Object68Entity*) = {
|
||||
void LinkEmptyingBottle(LinkEmptyingBottleEntity* this) {
|
||||
static void (*const gUnk_08122A10[])(LinkEmptyingBottleEntity*) = {
|
||||
sub_08094774,
|
||||
sub_080948D0,
|
||||
};
|
||||
gUnk_08122A10[super->action](this);
|
||||
}
|
||||
|
||||
void sub_08094774(Object68Entity* this) {
|
||||
void sub_08094774(LinkEmptyingBottleEntity* this) {
|
||||
static const s8 gUnk_08122A18[] = { 0, -8, 8, 1, 2, 8, -8, 1 };
|
||||
Entity* effect;
|
||||
Entity* child;
|
||||
@@ -79,15 +79,15 @@ void sub_08094774(Object68Entity* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void sub_080948D0(Object68Entity* this) {
|
||||
static void (*const gUnk_08122A20[])(Object68Entity*) = {
|
||||
void sub_080948D0(LinkEmptyingBottleEntity* this) {
|
||||
static void (*const gUnk_08122A20[])(LinkEmptyingBottleEntity*) = {
|
||||
NULL,
|
||||
sub_080948E8,
|
||||
};
|
||||
gUnk_08122A20[super->type](this);
|
||||
}
|
||||
|
||||
void sub_080948E8(Object68Entity* this) {
|
||||
void sub_080948E8(LinkEmptyingBottleEntity* this) {
|
||||
if (super->timer < 0x3c) {
|
||||
super->z.WORD -= Q_16_16(0.25);
|
||||
if ((super->timer & 3) == 0) {
|
||||
@@ -108,7 +108,7 @@ void sub_080948E8(Object68Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08094980(Object68Entity* this, u32 searchTileIndex, u32 replaceTileIndex) {
|
||||
void sub_08094980(LinkEmptyingBottleEntity* this, u32 searchTileIndex, u32 replaceTileIndex) {
|
||||
static const s8 gUnk_08122A28[] = {
|
||||
0, 0, -8, 0, 8, 0, 0, 8, 0, -8, 0, 0,
|
||||
};
|
||||
@@ -1,31 +1,30 @@
|
||||
/**
|
||||
* @file object42.c
|
||||
* @file linkFire.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Object42 object
|
||||
* @brief Link Fire object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unk_68[4];
|
||||
/*0x6c*/ u16 unk_6c;
|
||||
} Object42Entity;
|
||||
} LinkFireEntity;
|
||||
|
||||
void sub_0808DDB4(Object42Entity*);
|
||||
void sub_0808DDE0(Object42Entity*);
|
||||
void sub_0808DDE8(Object42Entity*);
|
||||
void sub_0808DDB4(LinkFireEntity*);
|
||||
void sub_0808DDE0(LinkFireEntity*);
|
||||
void sub_0808DDE8(LinkFireEntity*);
|
||||
|
||||
void Object42(Object42Entity* this) {
|
||||
static void (*const gUnk_081217A8[])(Object42Entity*) = {
|
||||
void LinkFire(LinkFireEntity* this) {
|
||||
static void (*const gUnk_081217A8[])(LinkFireEntity*) = {
|
||||
sub_0808DDB4,
|
||||
sub_0808DDE0,
|
||||
};
|
||||
static void (*const gUnk_081217B0[])(Object42Entity*) = {
|
||||
static void (*const gUnk_081217B0[])(LinkFireEntity*) = {
|
||||
sub_0808DDB4,
|
||||
sub_0808DDE8,
|
||||
};
|
||||
@@ -36,7 +35,7 @@ void Object42(Object42Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808DDB4(Object42Entity* this) {
|
||||
void sub_0808DDB4(LinkFireEntity* this) {
|
||||
super->action = 1;
|
||||
if (super->type != 0) {
|
||||
super->timer = 120;
|
||||
@@ -46,11 +45,11 @@ void sub_0808DDB4(Object42Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808DDE0(Object42Entity* this) {
|
||||
void sub_0808DDE0(LinkFireEntity* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void sub_0808DDE8(Object42Entity* this) {
|
||||
void sub_0808DDE8(LinkFireEntity* this) {
|
||||
static const s8 gUnk_081217B8[] = { 0, -6, 0, 6 };
|
||||
Entity* player;
|
||||
this->unk_6c--;
|
||||
@@ -1,24 +1,23 @@
|
||||
/**
|
||||
* @file objectB.c
|
||||
* @file linkHoldingItem.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief ObjectB object
|
||||
* @brief Link Holding Item object
|
||||
*/
|
||||
|
||||
#define NENT_DEPRECATED
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "game.h"
|
||||
#include "global.h"
|
||||
#include "item.h"
|
||||
#include "itemMetaData.h"
|
||||
#include "message.h"
|
||||
#include "object.h"
|
||||
#include "save.h"
|
||||
#include "game.h"
|
||||
#include "item.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u16 unk_68;
|
||||
} ObjectBEntity;
|
||||
} LinkHoldingItemEntity;
|
||||
|
||||
typedef struct {
|
||||
u8 unk_0[6];
|
||||
@@ -26,16 +25,17 @@ typedef struct {
|
||||
} struct_080FD964;
|
||||
extern const struct_080FD964 gUnk_080FD964[];
|
||||
|
||||
void ObjectB_Init(ObjectBEntity*);
|
||||
void ObjectB_Action1(ObjectBEntity*);
|
||||
void ObjectB_Action2(ObjectBEntity*);
|
||||
void ObjectB_Action3(ObjectBEntity*);
|
||||
void LinkHoldingItem_Init(LinkHoldingItemEntity*);
|
||||
void LinkHoldingItem_Action1(LinkHoldingItemEntity*);
|
||||
void LinkHoldingItem_Action2(LinkHoldingItemEntity*);
|
||||
void LinkHoldingItem_Action3(LinkHoldingItemEntity*);
|
||||
|
||||
void ObjectB(ObjectBEntity* this) {
|
||||
static void (*const ObjectB_Actions[])(ObjectBEntity*) = { ObjectB_Init, ObjectB_Action1, ObjectB_Action2,
|
||||
ObjectB_Action3 };
|
||||
void LinkHoldingItem(LinkHoldingItemEntity* this) {
|
||||
static void (*const LinkHoldingItem_Actions[])(LinkHoldingItemEntity*) = {
|
||||
LinkHoldingItem_Init, LinkHoldingItem_Action1, LinkHoldingItem_Action2, LinkHoldingItem_Action3
|
||||
};
|
||||
u32 tmp;
|
||||
ObjectB_Actions[super->action](this);
|
||||
LinkHoldingItem_Actions[super->action](this);
|
||||
tmp = (super->parent->frame >> 6);
|
||||
super->spriteSettings.draw = tmp & 1;
|
||||
sub_08080CB4(super);
|
||||
@@ -44,12 +44,12 @@ void ObjectB(ObjectBEntity* this) {
|
||||
super->spriteRendering.b3 = 0;
|
||||
}
|
||||
|
||||
void ObjectB_Init(ObjectBEntity* this) {
|
||||
void LinkHoldingItem_Init(LinkHoldingItemEntity* this) {
|
||||
SetDefaultPriority(super, 6);
|
||||
super->action = 1;
|
||||
}
|
||||
|
||||
void ObjectB_Action1(ObjectBEntity* this) {
|
||||
void LinkHoldingItem_Action1(LinkHoldingItemEntity* this) {
|
||||
u32 tmp;
|
||||
const ItemMetaData* ptr;
|
||||
|
||||
@@ -93,7 +93,7 @@ void ObjectB_Action1(ObjectBEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectB_Action2(ObjectBEntity* this) {
|
||||
void LinkHoldingItem_Action2(LinkHoldingItemEntity* this) {
|
||||
u32 messageIndex;
|
||||
if ((super->parent)->frame == 0x42) {
|
||||
super->action = 3;
|
||||
@@ -129,7 +129,7 @@ void ObjectB_Action2(ObjectBEntity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectB_Action3(ObjectBEntity* this) {
|
||||
void LinkHoldingItem_Action3(LinkHoldingItemEntity* this) {
|
||||
u32 tmp;
|
||||
if ((super->parent)->action == 8) {
|
||||
return;
|
||||
@@ -1,8 +1,14 @@
|
||||
/**
|
||||
* @file litArea.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Lit Area object
|
||||
*/
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "screen.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "room.h"
|
||||
#include "screen.h"
|
||||
|
||||
void LitArea(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user