mirror of
https://github.com/zeldaret/tmc
synced 2026-08-11 11:33:31 -04:00
Identify player functions and update asm.h
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "overworld.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void (*const gUnk_08121EA4[])(Entity*);
|
||||
extern const u8 gUnk_08121EB0[];
|
||||
@@ -27,7 +26,7 @@ void sub_0808F658(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0808F6E0(Entity* this) {
|
||||
sub_0806F69C(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;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "flags.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_08098E3C(Entity*);
|
||||
extern void sub_08098E88(Entity*);
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ void sub_0809CF54(Entity* this) {
|
||||
|
||||
void sub_0809CFEC(Entity* this) {
|
||||
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
GravityUpdate(this, *(s16*)&this->field_0x68.HWORD);
|
||||
if (this->actionDelay != 0) {
|
||||
if (--this->actionDelay == 0) {
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "script.h"
|
||||
#include "textbox.h"
|
||||
|
||||
extern void (*const BookActionFuncs[])(Entity*);
|
||||
@@ -117,7 +116,7 @@ void sub_0809B524(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
}
|
||||
|
||||
void sub_0809B56C(Entity* this) {
|
||||
|
||||
@@ -39,7 +39,6 @@ void sub_08081B84(Entity* this) {
|
||||
}
|
||||
|
||||
u32 sub_08081CB0(Entity*);
|
||||
void RequestPriorityDuration(Entity*, u32);
|
||||
void sub_08081FF8(Entity*);
|
||||
|
||||
void sub_08081BAC(Entity* this) {
|
||||
|
||||
+3
-3
@@ -81,7 +81,7 @@ void sub_0809F5F0(Entity* this) {
|
||||
|
||||
void sub_0809F61C(Entity* this) {
|
||||
|
||||
if ((gRoomControls.unk6 & 4) == 0) {
|
||||
if ((gRoomControls.scroll_flags & 4) == 0) {
|
||||
if (this->actionDelay == 30) {
|
||||
SetLocalFlag(this->type2);
|
||||
}
|
||||
@@ -112,7 +112,7 @@ void sub_0809F69C(Entity* this) {
|
||||
|
||||
void sub_0809F6CC(Entity* this) {
|
||||
|
||||
if (((gRoomControls.unk6 & 4) == 0) && (--this->actionDelay == 0)) {
|
||||
if (((gRoomControls.scroll_flags & 4) == 0) && (--this->actionDelay == 0)) {
|
||||
gPlayerState.controlMode = 1;
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -132,7 +132,7 @@ void sub_0809F700(Entity* this) {
|
||||
this->spriteOffsetX = gUnk_081247C0[uVar2 & 7];
|
||||
this->spriteOffsetY = gUnk_081247C0[uVar2 >> 4 & 7];
|
||||
}
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
if (--this->actionDelay == 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "object.h"
|
||||
#include "main.h"
|
||||
#include "menu.h"
|
||||
#include "npc.h"
|
||||
#include "fileScreen.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern int sub_0807A094(int);
|
||||
@@ -506,7 +504,7 @@ static u32 sub_0808EF6C(Entity* this) {
|
||||
}
|
||||
this->speed = var7;
|
||||
this->direction = sub_080045DA(var0, var2) >> 3;
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#include "object.h"
|
||||
#include "script.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void (*gUnk_08123D98[])(Entity*);
|
||||
|
||||
void sub_0809B7A0(Entity* e);
|
||||
void sub_0809B7A0(Entity* this);
|
||||
void sub_0809B7DC(Entity* this);
|
||||
void sub_0809B7C0(Entity* this);
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "object.h"
|
||||
#include "save.h"
|
||||
#include "script.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
|
||||
@@ -422,7 +421,7 @@ void sub_080871F8(Entity* this) {
|
||||
this->action = 2;
|
||||
} else {
|
||||
this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, temp->x.HALF.HI, temp->y.HALF.HI - 32);
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,7 +436,7 @@ void sub_08087240(Entity* this) {
|
||||
void sub_08087264(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -464,7 +463,7 @@ void sub_080872AC(Entity* this) {
|
||||
|
||||
void sub_080872F8(Entity* this) {
|
||||
s32 temp;
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
GetNextFrame(this);
|
||||
if (((u16)(this->field_0x68.HWORD - this->x.HALF.HI) > 0xc) ||
|
||||
((u16)(this->field_0x6a.HWORD - this->y.HALF.HI) > 0xc)) {
|
||||
@@ -526,7 +525,7 @@ void sub_080873FC(void) {
|
||||
void sub_08087424(Entity* this, ScriptExecutionContext* context) {
|
||||
Entity* ent;
|
||||
|
||||
sub_080791D0();
|
||||
ResetPlayerAnimationAndAction();
|
||||
ent = CreateObject(OBJECT_64, 0, 0);
|
||||
if (ent != NULL) {
|
||||
ent->parent = &gPlayerEntity;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include "global.h"
|
||||
#include "audio.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "asm.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "room.h"
|
||||
#include "flags.h"
|
||||
|
||||
extern void (*const gUnk_08122604[])(Entity*);
|
||||
|
||||
+19
-18
@@ -5,6 +5,7 @@
|
||||
#include "player.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
|
||||
void sub_08081150(Entity*);
|
||||
u8 sub_0808147C(u32);
|
||||
@@ -87,7 +88,7 @@ void sub_08080F20(Entity* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
if (this->type != 0x60) {
|
||||
if (this->type != ITEM_FAIRY) {
|
||||
this->spriteSettings.draw = 1;
|
||||
this->spritePriority.b1 = 3;
|
||||
this->spriteSettings.shadow = 0;
|
||||
@@ -97,16 +98,16 @@ void sub_08080F20(Entity* this) {
|
||||
this->health = 0xFF;
|
||||
this->hitbox = &gUnk_080FD1A8;
|
||||
switch (this->type) {
|
||||
case 0x3f:
|
||||
case 0x54:
|
||||
case 0x55:
|
||||
case 0x56:
|
||||
case 0x57:
|
||||
case 0x58:
|
||||
case 0x5c:
|
||||
case 0x5d:
|
||||
case 0x5e:
|
||||
case 0x5f:
|
||||
case ITEM_SHELLS:
|
||||
case ITEM_RUPEE1:
|
||||
case ITEM_RUPEE5:
|
||||
case ITEM_RUPEE20:
|
||||
case ITEM_RUPEE50:
|
||||
case ITEM_RUPEE100:
|
||||
case ITEM_KINSTONE:
|
||||
case ITEM_BOMBS5:
|
||||
case ITEM_ARROWS5:
|
||||
case ITEM_HEART:
|
||||
this->flags2 = 0x17;
|
||||
break;
|
||||
default:
|
||||
@@ -124,12 +125,11 @@ void sub_08080F20(Entity* this) {
|
||||
gUnk_0811E7E8[this->field_0x68.HALF.HI](this);
|
||||
} else {
|
||||
Entity* entity = CreateObject(FAIRY, 0x60, 0);
|
||||
if (entity) {
|
||||
if (entity != NULL) {
|
||||
entity->actionDelay = 0;
|
||||
if (this->actionDelay == 1) {
|
||||
entity->type2 = 2;
|
||||
}
|
||||
|
||||
CopyPosition(this, entity);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -153,12 +153,12 @@ void sub_080810A8(Entity* this) {
|
||||
}
|
||||
|
||||
if (this->collisionLayer == 2) {
|
||||
sub_08016A30(this);
|
||||
ResolveCollisionLayer(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080810FC(Entity* this) {
|
||||
if (this->type != 0x5F) {
|
||||
if (this->type != ITEM_HEART) {
|
||||
sub_08081598(this);
|
||||
} else {
|
||||
this->action = 2;
|
||||
@@ -188,7 +188,7 @@ void sub_08081188(Entity* this) {
|
||||
this->action = 2;
|
||||
COLLISION_ON(this);
|
||||
if (this->collisionLayer == 2) {
|
||||
sub_08016A30(this);
|
||||
ResolveCollisionLayer(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ void sub_080811EC(Entity* this) {
|
||||
if (this->field_0x68.HALF.HI != 6) {
|
||||
sub_080AEFE0(this);
|
||||
} else {
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
}
|
||||
|
||||
GravityUpdate(this, 0x2800);
|
||||
@@ -271,7 +271,8 @@ void sub_080812E8(Entity* this) {
|
||||
#ifdef EU
|
||||
if ((playerState->swimState & 0x80) && sub_080177A0(this, &gPlayerEntity)) {
|
||||
#else
|
||||
if ((playerState->swimState & 0x80) && !(playerState->flags & 0x80) && sub_080177A0(this, &gPlayerEntity)) {
|
||||
if ((playerState->swimState & 0x80) && (playerState->flags & PL_MINISH) == 0 &&
|
||||
sub_080177A0(this, &gPlayerEntity)) {
|
||||
#endif
|
||||
sub_080810FC(this);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "asm.h"
|
||||
#include "audio.h"
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
@@ -83,7 +84,7 @@ void sub_0809EB30(Entity* this) {
|
||||
|
||||
if (this->type2 != 0) {
|
||||
if ((this->direction & 0x80) == 0) {
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
}
|
||||
puVar2 = &this->field_0x74.HWORD;
|
||||
if (!--*puVar2) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "asm.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "audio.h"
|
||||
@@ -37,7 +38,6 @@ extern Hitbox gHitbox_2;
|
||||
|
||||
extern u32 sub_080001DA(u32, u32);
|
||||
extern void sub_08078850(Entity*, u32, u32, u32);
|
||||
extern void RequestPriorityDuration(Entity*, u32);
|
||||
|
||||
typedef struct PACKED {
|
||||
s8 x;
|
||||
@@ -153,7 +153,7 @@ void sub_080834B4(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080834EC(Entity* this) {
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
if (--this->actionDelay == 0) {
|
||||
if (this->type & 0x80) {
|
||||
sub_08083638(this);
|
||||
@@ -171,7 +171,7 @@ void sub_08083518(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08083540(Entity* this) {
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
if (!--this->actionDelay) {
|
||||
if (this->type & 0x10) {
|
||||
this->type &= ~0x10;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "object.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void (*MaskActionFuncs[])(Entity*);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "asm.h"
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "flags.h"
|
||||
@@ -50,7 +51,7 @@ void sub_080A074C(Entity* this) {
|
||||
u8 bVar1;
|
||||
Entity* ent;
|
||||
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 3;
|
||||
@@ -84,7 +85,7 @@ void sub_080A07BC(Entity* this) {
|
||||
|
||||
void sub_080A07F0(Entity* this) {
|
||||
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
|
||||
if (--this->actionDelay == 0) {
|
||||
DeleteThisEntity();
|
||||
|
||||
@@ -80,7 +80,7 @@ void sub_080917DC(Entity* this) {
|
||||
gPlayerEntity.speed = 0x100;
|
||||
gPlayerEntity.flags &= ~PL_MINISH;
|
||||
ResetPlayer();
|
||||
sub_0807A108();
|
||||
DeleteClones();
|
||||
SoundReq(SFX_PLY_JUMP);
|
||||
}
|
||||
} else {
|
||||
@@ -140,7 +140,7 @@ void sub_080919AC(Entity* this) {
|
||||
} else {
|
||||
COLLISION_ON(this);
|
||||
gPlayerEntity.speed = 0;
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
CopyPosition(this, &gPlayerEntity);
|
||||
gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1;
|
||||
if (!sub_08091DDC(this)) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern void (*const gUnk_081247F8[])(Entity*);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "overworld.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern void (*gUnk_081208A0[])(Entity*);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "object.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
static void sub_0808F2B0(Entity*);
|
||||
|
||||
@@ -556,7 +556,7 @@ void sub_08095288(Object6AEntity* this) {
|
||||
} else {
|
||||
sub_0805EC9C(super, 0x100, 0x100, super->actionDelay << 8);
|
||||
super->actionDelay += 10;
|
||||
sub_0806F69C(super);
|
||||
LinearMoveUpdate(super);
|
||||
}
|
||||
}
|
||||
p = super->child;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_08099ECC(Entity*);
|
||||
extern void RequestPriorityDuration(Entity*, u32);
|
||||
extern void sub_0805B390(u32);
|
||||
|
||||
extern void (*const gUnk_081237F8[])(Entity*);
|
||||
|
||||
@@ -40,7 +40,7 @@ void sub_0809F318(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0809F374(Entity* this) {
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
#ifndef EU
|
||||
if (gSaveHeader->gameLanguage < 2) {
|
||||
if (sub_080044EC(this, 0x2000) < 2) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "player.h"
|
||||
#include "functions.h"
|
||||
|
||||
@@ -23,7 +23,7 @@ void ObjectB2(Entity* this) {
|
||||
InitializeAnimation(this, this->type);
|
||||
}
|
||||
this->speed = this->parent->speed;
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
if (sub_080AE4CC(this->child, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ enum OctorokBossObjectType {
|
||||
TYPE8, // OctorokBoss_Hit_SubAction1
|
||||
TYPE9 // OctorokBoss_Hit_SubAction4
|
||||
};
|
||||
#define GET_HELPER(this) (*(HelperStruct**)&this->cutsceneBeh)
|
||||
#define GET_HELPER(this) (*(HelperStruct**)&(this)->cutsceneBeh)
|
||||
|
||||
extern u32 sub_0806FC80(Entity*, Entity*, s32);
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#include "flags.h"
|
||||
#include "object.h"
|
||||
|
||||
extern u32 ReadBit(u32*, u32);
|
||||
|
||||
extern u32 gUnk_020342F8;
|
||||
extern u16 gUnk_08125050[];
|
||||
extern void (*gUnk_0812505C[])(Entity*);
|
||||
|
||||
+2
-3
@@ -6,7 +6,6 @@
|
||||
#include "room.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
void sub_08082824(Entity*);
|
||||
static void sub_08082850(Entity*, Entity*);
|
||||
@@ -45,7 +44,7 @@ void sub_0808222C(Entity* this) {
|
||||
this->flags2 = 0x84;
|
||||
this->field_0x1c = 0x12;
|
||||
if (this->collisionLayer == 0) {
|
||||
sub_08016A30(this);
|
||||
ResolveCollisionLayer(this);
|
||||
}
|
||||
|
||||
this->field_0x70.HALF.LO = sub_080001DA(COORD_TO_TILE(this), this->collisionLayer);
|
||||
@@ -175,7 +174,7 @@ void sub_08082614(Entity* this) {
|
||||
|
||||
sub_0800445C(this);
|
||||
if (--this->actionDelay != 0xFF) {
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
sub_08016A6C(this);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "asm.h"
|
||||
#include "audio.h"
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ void sub_0808A484(Entity* this) {
|
||||
|
||||
void sub_0808A4D0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
sub_0806F69C(this);
|
||||
LinearMoveUpdate(this);
|
||||
if (this->frame & 0x80) {
|
||||
DeleteEntity(this);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "flags.h"
|
||||
#include "player.h"
|
||||
#include "room.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "object.h"
|
||||
#include "player.h"
|
||||
#include "flags.h"
|
||||
#include "overworld.h"
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern Hitbox gHitbox_1;
|
||||
@@ -11,7 +8,6 @@ extern Hitbox gHitbox_1;
|
||||
extern void sub_0807CAC8(u32);
|
||||
extern u32 sub_0807CAEC(u32);
|
||||
|
||||
void WarpPoint(Entity*);
|
||||
void sub_0808B474(Entity*);
|
||||
void sub_0808B530(Entity*);
|
||||
void sub_0808B564(Entity*);
|
||||
@@ -212,7 +208,7 @@ u32 sub_0808B7C8(Entity* this) {
|
||||
if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.framestate != PL_STATE_DIE && gPlayerEntity.health != 0 &&
|
||||
sub_08079F8C() && EntityInRectRadius(this, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) {
|
||||
if (this->actionDelay == 0 && gPlayerEntity.action == PLAYER_08072C9C) {
|
||||
sub_080791D0();
|
||||
ResetPlayerAnimationAndAction();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "asm.h"
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "player.h"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "entity.h"
|
||||
#include "save.h"
|
||||
#include "script.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_08078850(Entity*, u32, u32, u8*);
|
||||
|
||||
Reference in New Issue
Block a user