mirror of
https://github.com/zeldaret/tmc
synced 2026-08-10 03:06:02 -04:00
name remaining entity fields
This commit is contained in:
@@ -25,25 +25,25 @@ void PlayerItemBomb(PlayerItemBombEntity* this) {
|
||||
GetNextFrame(super);
|
||||
uVar2 = uVar1 = super->action;
|
||||
if (uVar1 != 0x03) {
|
||||
if (super->actionDelay != 0) {
|
||||
if (super->timer != 0) {
|
||||
if (*(u8*)&this->unk_68 == 7) {
|
||||
super->actionDelay -= 1;
|
||||
super->timer -= 1;
|
||||
}
|
||||
if (super->actionDelay == 0) {
|
||||
super->field_0xf = 0x50;
|
||||
if (super->timer == 0) {
|
||||
super->subtimer = 0x50;
|
||||
this->unk_68 = 0;
|
||||
super->spriteRendering.b0 = 3;
|
||||
SetAffineInfo(super, 0x100, 0x100, 0);
|
||||
}
|
||||
} else {
|
||||
if (super->field_0xf != 0) {
|
||||
if (super->field_0xf-- == 0x01) {
|
||||
if (super->subtimer != 0) {
|
||||
if (super->subtimer-- == 0x01) {
|
||||
if ((uVar1 == 0x02) && (super->subAction == 1)) {
|
||||
gPlayerState.heldObject = 0;
|
||||
}
|
||||
super->action = 0x03;
|
||||
super->spritePriority.b1 = 2;
|
||||
super->actionDelay = 0x0f;
|
||||
super->timer = 0x0f;
|
||||
super->spriteSettings.draw = 0;
|
||||
sub_0805EC60(super);
|
||||
FreeCarryEntity(super);
|
||||
@@ -63,15 +63,15 @@ void sub_0801B250(PlayerItemBombEntity* this) {
|
||||
super->spritePriority.b1 = 3;
|
||||
super->flags &= 0x7f;
|
||||
if (super->type == 0xff) {
|
||||
super->actionDelay = 0x3c;
|
||||
super->timer = 0x3c;
|
||||
} else if (super->type == 0xfe) {
|
||||
super->actionDelay = 0x0f;
|
||||
super->timer = 0x0f;
|
||||
super->type = 0xff;
|
||||
} else {
|
||||
super->actionDelay = 0x96;
|
||||
super->timer = 0x96;
|
||||
}
|
||||
super->hitbox = (Hitbox*)&gUnk_080B77F4;
|
||||
super->field_0x16 = 0;
|
||||
super->carryFlags = 0;
|
||||
if (*(u8*)&this->unk_68 == 7) {
|
||||
InitializeAnimation(super, 5);
|
||||
} else {
|
||||
@@ -97,8 +97,8 @@ void sub_0801B2CC(PlayerItemBombEntity* this) {
|
||||
break;
|
||||
}
|
||||
if ((unaff_r5 & gPlayerState.field_0x92) != 0) {
|
||||
super->actionDelay = 0;
|
||||
super->field_0xf = 1;
|
||||
super->timer = 0;
|
||||
super->subtimer = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,8 +122,8 @@ void sub_0801B354(Entity* this) {
|
||||
void sub_0801B368(Entity* this) {
|
||||
this->action -= 1;
|
||||
this->subAction = 0;
|
||||
if (0x3c < this->actionDelay) {
|
||||
this->actionDelay = 0x3c;
|
||||
if (0x3c < this->timer) {
|
||||
this->timer = 0x3c;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,14 +132,14 @@ void sub_0801B384(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0801B38C(Entity* this) {
|
||||
if (this->actionDelay-- == 0) {
|
||||
if (this->timer-- == 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0801B3A4(PlayerItemBombEntity* this) {
|
||||
u32 tmp;
|
||||
if (super->field_0xf >= 0x29) {
|
||||
if (super->subtimer >= 0x29) {
|
||||
tmp = 8;
|
||||
} else {
|
||||
tmp = 4;
|
||||
@@ -153,7 +153,7 @@ void sub_0801B3A4(PlayerItemBombEntity* this) {
|
||||
}
|
||||
SetAffineInfo(super, 0x130 - (this->unk_68 & 0xf0), 0x130 - (this->unk_68 & 0xf0), 0);
|
||||
}
|
||||
if ((super->field_0xf & tmp) == 0) {
|
||||
if ((super->subtimer & tmp) == 0) {
|
||||
super->palette.b.b0 = 0;
|
||||
} else {
|
||||
super->palette.b.b0 = super->palette.b.b4;
|
||||
|
||||
@@ -37,8 +37,8 @@ void PlayerItemBoomerang(Entity* this) {
|
||||
SetAffineInfo(this, 0x100, 0x100, this->field_0x86.HWORD);
|
||||
}
|
||||
|
||||
this->field_0xf--;
|
||||
if ((this->field_0xf & 0xf) == 0) {
|
||||
this->subtimer--;
|
||||
if ((this->subtimer & 0xf) == 0) {
|
||||
EnqueueSFX(SFX_FB);
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ void PlayerItemBoomerang_Init(Entity* this) {
|
||||
this->speed = 0x200;
|
||||
uVar1 = 30;
|
||||
}
|
||||
this->actionDelay = uVar1;
|
||||
this->timer = uVar1;
|
||||
if (((s8)gPlayerState.field_0xd) >= 0) {
|
||||
this->direction = gPlayerState.field_0xd;
|
||||
} else {
|
||||
@@ -113,7 +113,7 @@ void sub_0801B584(Entity* this) {
|
||||
this->action = 2;
|
||||
this->spriteVramOffset = 0xd5;
|
||||
COLLISION_ON(this);
|
||||
this->field_0x3c |= 1;
|
||||
this->collisionFlags |= 1;
|
||||
this->flags2 = gPlayerEntity.flags2;
|
||||
this->spriteIndex = 0xa6;
|
||||
this->spriteSettings.flipX = 0;
|
||||
@@ -159,25 +159,25 @@ void sub_0801B680(Entity* this) {
|
||||
}
|
||||
|
||||
if (uVar6 == 0) {
|
||||
if (--this->actionDelay < 0xc) {
|
||||
if (--this->timer < 0xc) {
|
||||
this->speed = this->speed + -0x10;
|
||||
}
|
||||
if (this->actionDelay == 0) {
|
||||
if (this->timer == 0) {
|
||||
uVar6 = 1;
|
||||
}
|
||||
if (this->bitfield & 0x80) {
|
||||
if (this->contactFlags & 0x80) {
|
||||
uVar6 = 1;
|
||||
}
|
||||
if (uVar6 == 0) {
|
||||
return;
|
||||
}
|
||||
if (this->field_0x68.HALF.LO == 12) {
|
||||
this->actionDelay = 30;
|
||||
this->timer = 30;
|
||||
} else {
|
||||
this->actionDelay = 12;
|
||||
this->timer = 12;
|
||||
}
|
||||
} else {
|
||||
this->actionDelay = 1;
|
||||
this->timer = 1;
|
||||
}
|
||||
|
||||
if (uVar6) {
|
||||
@@ -188,8 +188,8 @@ void sub_0801B680(Entity* this) {
|
||||
|
||||
void sub_0801B7A8(Entity* this) {
|
||||
sub_0801B804(this);
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay -= 1;
|
||||
if (this->timer != 0) {
|
||||
this->timer -= 1;
|
||||
} else {
|
||||
sub_0801B864(this);
|
||||
if (this->speed < 0x280) {
|
||||
|
||||
@@ -40,13 +40,13 @@ void PlayerItemBottle_Init(Entity* this) {
|
||||
return;
|
||||
}
|
||||
COLLISION_ON(this);
|
||||
this->field_0x3c = (gPlayerEntity.field_0x3c + 1) | 0x20;
|
||||
this->collisionFlags = (gPlayerEntity.collisionFlags + 1) | 0x20;
|
||||
this->flags2 = gPlayerEntity.flags2;
|
||||
this->hurtType = 0x1f;
|
||||
this->type = 1;
|
||||
this->type2 = ITEM_BOTTLE_EMPTY;
|
||||
this->actionDelay = 0x52;
|
||||
this->field_0xf = 0x1b;
|
||||
this->timer = 0x52;
|
||||
this->subtimer = 0x1b;
|
||||
sub_0801766C(this);
|
||||
SoundReq(SFX_1DC);
|
||||
break;
|
||||
@@ -61,15 +61,15 @@ void PlayerItemBottle_Init(Entity* this) {
|
||||
case ITEM_BOTTLE_PICOLYTE_GREEN:
|
||||
case ITEM_BOTTLE_PICOLYTE_BLUE:
|
||||
case ITEM_BOTTLE_PICOLYTE_WHITE:
|
||||
this->actionDelay = 0xd5;
|
||||
this->field_0xf = 0x3c;
|
||||
this->timer = 0xd5;
|
||||
this->subtimer = 0x3c;
|
||||
break;
|
||||
case BOTTLE_CHARM_NAYRU:
|
||||
case BOTTLE_CHARM_FARORE:
|
||||
case BOTTLE_CHARM_DIN:
|
||||
default:
|
||||
this->actionDelay = 0x37;
|
||||
this->field_0xf = 0;
|
||||
this->timer = 0x37;
|
||||
this->subtimer = 0;
|
||||
}
|
||||
this->action = 1;
|
||||
this->frameIndex = 0xff;
|
||||
@@ -212,7 +212,7 @@ void sub_0801BDE8(Entity* this, Entity* ent2) {
|
||||
u32 flipX;
|
||||
u32 animationState;
|
||||
|
||||
uVar1 = (ent2->frameIndex - this->actionDelay) + this->field_0xf;
|
||||
uVar1 = (ent2->frameIndex - this->timer) + this->subtimer;
|
||||
if (uVar1 != this->frameIndex) {
|
||||
this->frameIndex = uVar1;
|
||||
sub_080042D0(this, this->frameIndex, (u16)this->spriteIndex);
|
||||
@@ -240,9 +240,9 @@ void PlayerItemBottle_UseEmptyBottle(Entity* this) {
|
||||
const u8* ptr;
|
||||
const s8* ptr2;
|
||||
|
||||
switch (this->bitfield & 0x7f) {
|
||||
switch (this->contactFlags & 0x7f) {
|
||||
default:
|
||||
this->bitfield = 0;
|
||||
this->contactFlags = 0;
|
||||
break;
|
||||
case 0x49:
|
||||
this->type2 = ITEM_BOTTLE_FAIRY;
|
||||
|
||||
@@ -65,7 +65,7 @@ void sub_08018FE4(PlayerItemBowEntity* this) {
|
||||
super->speed = 0x300;
|
||||
}
|
||||
super->direction = super->animationState << 2;
|
||||
super->field_0x3c = gPlayerEntity.field_0x3c + 1;
|
||||
super->collisionFlags = gPlayerEntity.collisionFlags + 1;
|
||||
super->flags2 = gPlayerEntity.flags2;
|
||||
if (super->collisionLayer == 2) {
|
||||
super->type2 = 1;
|
||||
@@ -134,8 +134,8 @@ void sub_0801917C(PlayerItemBowEntity* this) {
|
||||
tmp2 = FALSE;
|
||||
}
|
||||
if (super->hurtType == 0x0e) {
|
||||
super->actionDelay++;
|
||||
if ((super->actionDelay & 7) == 0) {
|
||||
super->timer++;
|
||||
if ((super->timer & 7) == 0) {
|
||||
CreateFx(super, FX_SPARKLE2, 0);
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ void sub_0801917C(PlayerItemBowEntity* this) {
|
||||
}
|
||||
if ((sub_080B1BA4(COORD_TO_TILE(super), gPlayerEntity.collisionLayer, 0x80) == 0) && (!tmp2) &&
|
||||
sub_080040D8(super, &gUnk_08003E44, super->x.HALF.HI, super->y.HALF.HI) != 0) {
|
||||
super->actionDelay = 0x1e;
|
||||
super->timer = 0x1e;
|
||||
super->action++;
|
||||
if (super->hurtType == 0x0e) {
|
||||
sub_08019468(this);
|
||||
@@ -167,12 +167,12 @@ void sub_0801917C(PlayerItemBowEntity* this) {
|
||||
super->y.WORD = tmp3;
|
||||
SoundReq(SFX_18A);
|
||||
}
|
||||
if ((super->bitfield != 0) && (!tmp2)) {
|
||||
if ((super->contactFlags != 0) && (!tmp2)) {
|
||||
if (super->hurtType == 0x0e) {
|
||||
sub_08019468(this);
|
||||
}
|
||||
sub_08017744(super);
|
||||
if ((super->bitfield & 0x3f) == 0x42) {
|
||||
if ((super->contactFlags & 0x3f) == 0x42) {
|
||||
super->spriteSettings.draw = 1;
|
||||
super->action = 3;
|
||||
super->direction ^= 0x10;
|
||||
@@ -182,7 +182,7 @@ void sub_0801917C(PlayerItemBowEntity* this) {
|
||||
InitializeAnimation(super, 6);
|
||||
} else {
|
||||
super->action++;
|
||||
super->actionDelay = 1;
|
||||
super->timer = 1;
|
||||
super->spriteSettings.draw = 0;
|
||||
}
|
||||
}
|
||||
@@ -222,12 +222,12 @@ void sub_0801917C(PlayerItemBowEntity* this) {
|
||||
}
|
||||
|
||||
void sub_08019410(Entity* this) {
|
||||
if (this->actionDelay < 0xf) {
|
||||
if (this->timer < 0xf) {
|
||||
InitializeAnimation(this, this->animIndex);
|
||||
} else {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
if (this->actionDelay-- == 0) {
|
||||
if (this->timer-- == 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ void sub_0801B8FC(Entity* this) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
pbVar1->flags |= ENT_COLLIDE;
|
||||
pbVar1->field_0x3c = 0x21;
|
||||
pbVar1->collisionFlags = 0x21;
|
||||
sub_0801B938(pbVar1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ void sub_080A3084(FireRodProjectileEntity* this) {
|
||||
super->action = 0x01;
|
||||
CopyPosition(super->parent, super);
|
||||
if (super->type == 0) {
|
||||
super->field_0x3c = gPlayerEntity.field_0x3c + 1;
|
||||
super->collisionFlags = gPlayerEntity.collisionFlags + 1;
|
||||
super->hitbox = &gUnk_08127278;
|
||||
super->speed = 0x400;
|
||||
if (super->collisionLayer == 0x02) {
|
||||
@@ -41,7 +41,7 @@ void sub_080A3084(FireRodProjectileEntity* this) {
|
||||
LinearMoveUpdate(super);
|
||||
SoundReq(SFX_ITEM_SWORD_BEAM);
|
||||
} else {
|
||||
super->actionDelay = 6;
|
||||
super->timer = 6;
|
||||
}
|
||||
InitializeAnimation(super, 0x18);
|
||||
sub_080A310C(this);
|
||||
@@ -49,7 +49,7 @@ void sub_080A3084(FireRodProjectileEntity* this) {
|
||||
|
||||
void sub_080A310C(FireRodProjectileEntity* this) {
|
||||
if (super->type != 0) {
|
||||
if (super->actionDelay-- == 0) {
|
||||
if (super->timer-- == 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
} else {
|
||||
@@ -57,7 +57,7 @@ void sub_080A310C(FireRodProjectileEntity* this) {
|
||||
if (this->unk6c-- != 0) {
|
||||
GetNextFrame(super);
|
||||
LinearMoveUpdate(super);
|
||||
super->actionDelay++;
|
||||
super->timer++;
|
||||
if (super->type2 == 0) {
|
||||
sub_0800451C(super);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ void sub_080A310C(FireRodProjectileEntity* this) {
|
||||
CreateFx(super, FX_SWORD_MAGIC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (super->bitfield != 0) {
|
||||
if (super->contactFlags != 0) {
|
||||
CreateFx(super, FX_SWORD_MAGIC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ static void sub_080ACECC(GustEntity*);
|
||||
typedef struct {
|
||||
u16 bits;
|
||||
u8 type2;
|
||||
u8 actionDelay;
|
||||
u8 timer;
|
||||
u8 _4;
|
||||
u8 type;
|
||||
u16 tileID;
|
||||
@@ -66,7 +66,7 @@ static void PlayerItemGust_Init(GustEntity* this) {
|
||||
super->direction = super->animationState << 2;
|
||||
super->speed = 0x200;
|
||||
super->flags |= ENT_COLLIDE | ENT_PERSIST;
|
||||
super->field_0x3c = 2;
|
||||
super->collisionFlags = 2;
|
||||
super->hitbox = (Hitbox*)sHitboxes[super->type];
|
||||
this->timer = 16;
|
||||
sub_080ACDB0(this);
|
||||
@@ -97,7 +97,7 @@ static void sub_080ACC78(GustEntity* this) {
|
||||
if (o != NULL) {
|
||||
child = CreateObject(OBJECT_11, o->type, o->type2);
|
||||
if (child != NULL) {
|
||||
child->actionDelay = o->actionDelay;
|
||||
child->timer = o->timer;
|
||||
child->x.HALF.HI = child_offsets[this->offset_iter] + super->x.HALF.HI;
|
||||
child->y.HALF.HI = child_offsets[this->offset_iter + 1] + super->y.HALF.HI;
|
||||
}
|
||||
|
||||
@@ -39,13 +39,13 @@ void sub_08018CBC(Entity* this) {
|
||||
this->direction = (u8)(uVar2 << 2);
|
||||
this->speed = 0x400;
|
||||
this->hitType = 0x96;
|
||||
this->field_0x3c = (gPlayerEntity.field_0x3c + 1) | 0x80;
|
||||
this->collisionFlags = (gPlayerEntity.collisionFlags + 1) | 0x80;
|
||||
this->flags2 = gPlayerEntity.flags2;
|
||||
pEVar3 = this->child;
|
||||
if (pEVar3 != NULL) {
|
||||
this->action = 1;
|
||||
COLLISION_OFF(this);
|
||||
this->actionDelay = 0x56;
|
||||
this->timer = 0x56;
|
||||
this->hurtType = 0x1c;
|
||||
this->damage = 6;
|
||||
this->hitbox = &gUnk_080B3E18;
|
||||
@@ -61,7 +61,7 @@ void sub_08018CBC(Entity* this) {
|
||||
this->palette.raw = 0x33;
|
||||
this->spriteVramOffset = 0;
|
||||
this->type = gPlayerState.gustJarSpeed - 1;
|
||||
this->actionDelay = gUnk_080B3DE0[this->type * 2];
|
||||
this->timer = gUnk_080B3DE0[this->type * 2];
|
||||
this->damage = gUnk_080B3DE0[this->type * 2 + 1];
|
||||
this->hurtType = 0x1b;
|
||||
this->hitbox = gUnk_080B3DE8[this->type];
|
||||
@@ -77,7 +77,7 @@ void sub_08018CBC(Entity* this) {
|
||||
void sub_08018DE8(Entity* this) {
|
||||
u8 bVar1;
|
||||
|
||||
bVar1 = this->child->field_0x3a & 4;
|
||||
bVar1 = this->child->gustJarState & 4;
|
||||
if (bVar1 == 0) {
|
||||
gPlayerState.field_0x1c = bVar1;
|
||||
DeleteThisEntity();
|
||||
@@ -105,15 +105,15 @@ void sub_08018E68(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
sub_08008790(this, 5);
|
||||
} else {
|
||||
if ((this->child->field_0x3a & 4) == 0) {
|
||||
if ((this->child->gustJarState & 4) == 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if ((this->bitfield & 0x80) != 0) {
|
||||
if ((this->contactFlags & 0x80) != 0) {
|
||||
sub_08018F6C(this);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this->actionDelay-- != 0) {
|
||||
if (this->timer-- != 0) {
|
||||
LinearMoveUpdate(this);
|
||||
|
||||
switch (this->direction) {
|
||||
|
||||
@@ -28,7 +28,7 @@ void PlayerItemGustJar(Entity* this) {
|
||||
|
||||
void PlayerItemGustJar_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->field_0xf = 0xf;
|
||||
this->subtimer = 0xf;
|
||||
this->hitbox = &gUnk_08132B28;
|
||||
this->hitbox->unk2[2] = 3;
|
||||
this->hitbox->unk2[1] = 3;
|
||||
@@ -64,11 +64,11 @@ void PlayerItemGustJar_Action2(Entity* this) {
|
||||
if (this->type != 0) {
|
||||
if (this->type == 1) {
|
||||
sub_080ADCA0(this, 4);
|
||||
this->actionDelay = 24;
|
||||
this->timer = 24;
|
||||
this->type = 2;
|
||||
} else {
|
||||
sub_080ADCDC(this, 1);
|
||||
if (this->actionDelay-- == 0) {
|
||||
if (this->timer-- == 0) {
|
||||
sub_080ADCA0(this, 0);
|
||||
this->type = 0;
|
||||
}
|
||||
@@ -103,13 +103,13 @@ void PlayerItemGustJar_Action2(Entity* this) {
|
||||
windSound = SFX_EE;
|
||||
in_r2 = 1;
|
||||
}
|
||||
this->field_0xf = this->field_0xf - in_r2;
|
||||
this->subtimer = this->subtimer - in_r2;
|
||||
}
|
||||
if ((s8)this->field_0xf < 0) {
|
||||
if ((s8)this->subtimer < 0) {
|
||||
if (windSound) {
|
||||
SoundReq(windSound);
|
||||
}
|
||||
this->field_0xf = 15;
|
||||
this->subtimer = 15;
|
||||
}
|
||||
this->frameIndex = gPlayerEntity.frameIndex - (gPlayerEntity.frame & 0x7f);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ void sub_080AD040(PlayerItemHeldObjectEntity* this) {
|
||||
if ((child->base).action != 2) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if ((super->bitfield & 0x80) != 0) {
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
super->z.WORD = 0;
|
||||
}
|
||||
if (super->speed != 0) {
|
||||
@@ -125,15 +125,15 @@ void sub_080AD040(PlayerItemHeldObjectEntity* this) {
|
||||
if (super->child == super) {
|
||||
if (super->type2 != 0xff) {
|
||||
if (super->type2 == 0x0f) {
|
||||
CreateFx(super, super->actionDelay, 0x80);
|
||||
CreateFx(super, super->timer, 0x80);
|
||||
} else {
|
||||
CreateObjectWithParent(super, super->type2, super->actionDelay, 0);
|
||||
CreateObjectWithParent(super, super->type2, super->timer, 0);
|
||||
}
|
||||
}
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
if (super->actionDelay != 0 || sub_080AD32C(child)) {
|
||||
if (super->actionDelay == 1) {
|
||||
if (super->timer != 0 || sub_080AD32C(child)) {
|
||||
if (super->timer == 1) {
|
||||
SoundReq(SFX_PLACE_OBJ);
|
||||
}
|
||||
UpdateSpriteForCollisionLayer(super);
|
||||
@@ -144,7 +144,7 @@ void sub_080AD040(PlayerItemHeldObjectEntity* this) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
SoundReq(SFX_PLACE_OBJ);
|
||||
super->actionDelay++;
|
||||
super->timer++;
|
||||
super->zVelocity = 0x10000;
|
||||
super->speed /= 2;
|
||||
return;
|
||||
@@ -192,7 +192,7 @@ void sub_080AD27C(PlayerItemHeldObjectEntity* this) {
|
||||
super->spritePriority.b1 = 3;
|
||||
}
|
||||
super->hitbox = (child->base).hitbox;
|
||||
tmp = super->field_0x16 >> 4;
|
||||
tmp = super->carryFlags >> 4;
|
||||
super->speed = gUnk_081320CC[tmp];
|
||||
super->zVelocity = gUnk_081320D4[tmp];
|
||||
(child->base).z.HALF.HI += 8;
|
||||
@@ -200,7 +200,7 @@ void sub_080AD27C(PlayerItemHeldObjectEntity* this) {
|
||||
super->collisionLayer = (child->base).collisionLayer;
|
||||
super->y.HALF.HI = gPlayerEntity.y.HALF.HI;
|
||||
super->x.HALF.HI = gPlayerEntity.x.HALF.HI;
|
||||
super->field_0x3c = gPlayerEntity.field_0x3c;
|
||||
super->collisionFlags = gPlayerEntity.collisionFlags;
|
||||
super->flags |= 0x80;
|
||||
sub_0801766C(super);
|
||||
} else {
|
||||
@@ -211,7 +211,7 @@ void sub_080AD27C(PlayerItemHeldObjectEntity* this) {
|
||||
|
||||
bool32 sub_080AD32C(PlayerItemHeldObjectEntity* this) {
|
||||
bool32 result = FALSE;
|
||||
if (((super->field_0x16 & 0xf0) == 0x10) ||
|
||||
if (((super->carryFlags & 0xf0) == 0x10) ||
|
||||
((super->kind == OBJECT && ((super->id == 5 || (super->id == 0x7d)))))) {
|
||||
result = TRUE;
|
||||
}
|
||||
|
||||
@@ -12,17 +12,17 @@ extern const s8 gUnk_080FEEB0[];
|
||||
|
||||
void PlayerItemLantern(Entity* this) {
|
||||
gUnk_080FEEA8[this->action](this);
|
||||
this->bitfield = 0;
|
||||
this->contactFlags = 0;
|
||||
}
|
||||
|
||||
void sub_08054A60(Entity* this) {
|
||||
this->flags |= (ENT_PERSIST | ENT_COLLIDE);
|
||||
this->action = 0x01;
|
||||
this->actionDelay = 0x04;
|
||||
this->timer = 0x04;
|
||||
this->frameIndex = -1;
|
||||
// TODO regalloc and mov 6 too early
|
||||
this->updatePriority = 6;
|
||||
this->field_0x3c = 7;
|
||||
this->collisionFlags = 7;
|
||||
this->flags2 = -0x80;
|
||||
this->animationState = gPlayerEntity.animationState & 0xe;
|
||||
if (AllocMutableHitbox(this) == NULL) {
|
||||
@@ -55,8 +55,8 @@ void sub_08054AC8(Entity* this) {
|
||||
this->frameSpriteSettings = gPlayerEntity.frameSpriteSettings;
|
||||
}
|
||||
if (IsItemEquipped(ITEM_LANTERN_ON) < 2) {
|
||||
if (((this->frameIndex != 0xff) && (gPlayerEntity.spriteSettings.draw != 0)) && (this->actionDelay-- == 0)) {
|
||||
this->actionDelay = 4;
|
||||
if (((this->frameIndex != 0xff) && (gPlayerEntity.spriteSettings.draw != 0)) && (this->timer-- == 0)) {
|
||||
this->timer = 4;
|
||||
object = CreateObject(OBJECT_45, 0, 0x10);
|
||||
if (object != NULL) {
|
||||
PositionRelative(this, object, 0, 0x20000);
|
||||
|
||||
@@ -55,7 +55,7 @@ void PlayerItemPacciCaneProjectile_Init(Entity* this) {
|
||||
*(u32*)&this->field_0x78 = 0x1e0;
|
||||
this->x.HALF.HI = gPlayerEntity.x.HALF.HI + gUnk_0811B9A0[this->animationState];
|
||||
this->y.HALF.HI = gPlayerEntity.y.HALF.HI + gUnk_0811B9A0[this->animationState + 1];
|
||||
this->field_0x3c = 7;
|
||||
this->collisionFlags = 7;
|
||||
this->flags2 = 0x8a;
|
||||
this->hitbox = (Hitbox*)&gUnk_0811B9D0;
|
||||
if (this->collisionLayer == 2) {
|
||||
@@ -90,7 +90,7 @@ void sub_080701F8(Entity* this) {
|
||||
if (iVar3) {
|
||||
pEVar4 = CreateObject(OBJECT_53, iVar3[5], iVar3[2]);
|
||||
if (pEVar4) {
|
||||
pEVar4->actionDelay = iVar3[3];
|
||||
pEVar4->timer = iVar3[3];
|
||||
pEVar4->x.HALF.HI = this->x.HALF.HI + cVar1;
|
||||
pEVar4->y.HALF.HI = this->y.HALF.HI + cVar2;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ void sub_080701F8(Entity* this) {
|
||||
sub_08070458(this);
|
||||
}
|
||||
}
|
||||
if (this->bitfield != 0) {
|
||||
if (this->contactFlags != 0) {
|
||||
sub_08070458(this);
|
||||
}
|
||||
}
|
||||
@@ -161,10 +161,10 @@ void sub_080703BC(Entity* this) {
|
||||
if (--(*(int*)&this->field_0x78) == -1) {
|
||||
sub_08070458(this);
|
||||
} else {
|
||||
if (this->bitfield == 0) {
|
||||
if (this->contactFlags == 0) {
|
||||
return;
|
||||
}
|
||||
if (((this->bitfield & 0x7f) == 0) && (this->action != 0x1a)) {
|
||||
if (((this->contactFlags & 0x7f) == 0) && (this->action != 0x1a)) {
|
||||
return;
|
||||
}
|
||||
sub_08070458(this);
|
||||
|
||||
@@ -18,7 +18,7 @@ void sub_0805FBE8(Entity* this) {
|
||||
CopyPosition(&gPlayerEntity, this);
|
||||
this->action++;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
this->field_0x3c = gPlayerEntity.field_0x3c + 1;
|
||||
this->collisionFlags = gPlayerEntity.collisionFlags + 1;
|
||||
this->hitbox = &gUnk_08109AD0;
|
||||
this->speed = 0x380;
|
||||
this->animationState = this->animationState & 0x7f;
|
||||
@@ -40,7 +40,7 @@ void sub_0805FC74(Entity* this) {
|
||||
if (--*(int*)&this->field_0x6c != -1) {
|
||||
GetNextFrame(this);
|
||||
LinearMoveUpdate(this);
|
||||
this->actionDelay++;
|
||||
this->timer++;
|
||||
if (this->type2 == 0) {
|
||||
sub_0800451C(this);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ void sub_0805FC74(Entity* this) {
|
||||
CreateFx(this, FX_SWORD_MAGIC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (this->bitfield != 0) {
|
||||
if (this->contactFlags != 0) {
|
||||
CreateFx(this, FX_SWORD_MAGIC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ void sub_080A78B8(PlayerItemSwordEntity* this, Entity* param_2) {
|
||||
}
|
||||
super->spriteSettings.flipX = flipX;
|
||||
}
|
||||
if ((super->bitfield & 0x80) != 0) {
|
||||
if ((super->contactFlags & 0x80) != 0) {
|
||||
if ((param_2->iframes == 0) || ((u8)param_2->iframes == 0x81)) {
|
||||
param_2->iframes = super->iframes;
|
||||
param_2->knockbackDirection = super->knockbackDirection;
|
||||
@@ -101,7 +101,7 @@ void sub_080A78B8(PlayerItemSwordEntity* this, Entity* param_2) {
|
||||
if ((gPlayerState.flags & 0x8000000) != 0) {
|
||||
gPlayerState.sword_state |= 0x80;
|
||||
} else if (gPlayerState.sword_state != 0) {
|
||||
switch (super->bitfield & 0x7f) {
|
||||
switch (super->contactFlags & 0x7f) {
|
||||
case 0x44:
|
||||
break;
|
||||
case 0x43:
|
||||
|
||||
@@ -26,7 +26,7 @@ void sub_08019498(Entity* this) {
|
||||
CopyPosition(&gPlayerEntity, this);
|
||||
this->action += 0x01;
|
||||
this->spriteSettings.draw = 1;
|
||||
this->field_0x3c = gPlayerEntity.field_0x3c + 1;
|
||||
this->collisionFlags = gPlayerEntity.collisionFlags + 1;
|
||||
this->hitbox = &gUnk_080B4408;
|
||||
this->speed = 0x380;
|
||||
*(u32*)&this->field_0x74 = 2;
|
||||
@@ -67,7 +67,7 @@ void sub_08019580(Entity* this) {
|
||||
if (--*(int*)&this->field_0x6c != -1) {
|
||||
GetNextFrame(this);
|
||||
LinearMoveUpdate(this);
|
||||
this->actionDelay += 0x01;
|
||||
this->timer += 0x01;
|
||||
if (this->type2 == 0) {
|
||||
sub_0800451C(this);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ void sub_08019580(Entity* this) {
|
||||
CreateFx(this, FX_SWORD_MAGIC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (this->bitfield != 0) {
|
||||
if (this->contactFlags != 0) {
|
||||
CreateFx(this, FX_SWORD_MAGIC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user