diff options
| author | theo3 <arisstephenson2@gmail.com> | 2023-12-31 17:29:08 -0800 |
|---|---|---|
| committer | theo3 <arisstephenson2@gmail.com> | 2023-12-31 17:34:02 -0800 |
| commit | 37ac9cb0fb2d9ccb64286bab2cdf648e6f2541c5 (patch) | |
| tree | 1556b8aba35a82f1cc0d538b93251a1b401f32f5 /src/npc | |
| parent | 5049daabc59d113152143d123aea2798d9487a0c (diff) | |
document tile asm functions
Diffstat (limited to 'src/npc')
| -rw-r--r-- | src/npc/castorWildsStatue.c | 16 | ||||
| -rw-r--r-- | src/npc/clothesRack.c | 12 | ||||
| -rw-r--r-- | src/npc/dog.c | 2 | ||||
| -rw-r--r-- | src/npc/kid.c | 12 | ||||
| -rw-r--r-- | src/npc/npc5.c | 6 |
5 files changed, 24 insertions, 24 deletions
diff --git a/src/npc/castorWildsStatue.c b/src/npc/castorWildsStatue.c index 86365860..1d0c6b07 100644 --- a/src/npc/castorWildsStatue.c +++ b/src/npc/castorWildsStatue.c @@ -78,20 +78,20 @@ void sub_08067418(CastorWildsStatueEntity* this) { this->tilePos = COORD_TO_TILE(super); if (super->type == 0) { super->hitbox = (Hitbox*)&gUnk_08110E94; - SetTile(0x4022, this->tilePos - 1, super->collisionLayer); - SetTile(0x4022, this->tilePos, super->collisionLayer); - SetTile(0x4022, this->tilePos + 0x3f, super->collisionLayer); - SetTile(0x4022, this->tilePos + 0x40, super->collisionLayer); + SetBottomTile(0x4022, this->tilePos - 1, super->collisionLayer); + SetBottomTile(0x4022, this->tilePos, super->collisionLayer); + SetBottomTile(0x4022, this->tilePos + 0x3f, super->collisionLayer); + SetBottomTile(0x4022, this->tilePos + 0x40, super->collisionLayer); } else { super->collisionLayer = 3; super->spriteOrientation.flipY = 1; super->spriteRendering.b3 = 1; super->spritePriority.b0 = 2; if (CheckLocalFlag(HIKYOU_00_SEKIZOU) == 0) { - SetTile(0x4022, 0xe81, 1); - SetTile(0x4022, 0xe82, 1); - SetTile(0x4022, 0xe83, 1); - SetTile(0x4022, 0xec3, 1); + SetBottomTile(0x4022, 0xe81, 1); + SetBottomTile(0x4022, 0xe82, 1); + SetBottomTile(0x4022, 0xe83, 1); + SetBottomTile(0x4022, 0xec3, 1); } } InitScriptForNPC(super); diff --git a/src/npc/clothesRack.c b/src/npc/clothesRack.c index 28de3bed..aa6ae533 100644 --- a/src/npc/clothesRack.c +++ b/src/npc/clothesRack.c @@ -36,12 +36,12 @@ void sub_0806DD90(Entity* this) { InitializeAnimation(this, animIndex); x = this->x.HALF.HI; y = this->y.HALF.HI; - SetTile(0x4072, TILE(x - 0x18, y - 0x10), this->collisionLayer); - SetTile(0x4072, TILE(x - 0x18, y), this->collisionLayer); - SetTile(0x4072, TILE(x - 0x18, y + 0x10), this->collisionLayer); - SetTile(0x4072, TILE(x + 0x18, y - 0x10), this->collisionLayer); - SetTile(0x4072, TILE(x + 0x18, y), this->collisionLayer); - SetTile(0x4072, TILE(x + 0x18, y + 0x10), this->collisionLayer); + SetBottomTile(0x4072, TILE(x - 0x18, y - 0x10), this->collisionLayer); + SetBottomTile(0x4072, TILE(x - 0x18, y), this->collisionLayer); + SetBottomTile(0x4072, TILE(x - 0x18, y + 0x10), this->collisionLayer); + SetBottomTile(0x4072, TILE(x + 0x18, y - 0x10), this->collisionLayer); + SetBottomTile(0x4072, TILE(x + 0x18, y), this->collisionLayer); + SetBottomTile(0x4072, TILE(x + 0x18, y + 0x10), this->collisionLayer); } void sub_0806DEC8(Entity* this) { diff --git a/src/npc/dog.c b/src/npc/dog.c index 3ca53e97..a6c7c0fe 100644 --- a/src/npc/dog.c +++ b/src/npc/dog.c @@ -235,7 +235,7 @@ void sub_08069B44(DogEntity* this) { super->action = 4; } if ((super->type == 2) && (CheckLocalFlag(MACHI_02_DOG) == 0)) { - SetTile(0x4072, TILE(super->x.HALF.HI, super->y.HALF.HI - 8), super->collisionLayer); + SetBottomTile(0x4072, TILE(super->x.HALF.HI, super->y.HALF.HI - 8), super->collisionLayer); } } } diff --git a/src/npc/kid.c b/src/npc/kid.c index aa4bcbea..c6a57463 100644 --- a/src/npc/kid.c +++ b/src/npc/kid.c @@ -586,12 +586,12 @@ void sub_080626E0(Entity* this, ScriptExecutionContext* context) { } void sub_08062788(Entity* this, ScriptExecutionContext* context) { - SetTile(0x4072, 0x60b, 1); - SetTile(0x4072, 0x60c, 1); - SetTile(0x4072, 0x60d, 1); - SetTile(0x4072, 0x64b, 1); - SetTile(0x4072, 0x64c, 1); - SetTile(0x4072, 0x64d, 1); + SetBottomTile(0x4072, 0x60b, 1); + SetBottomTile(0x4072, 0x60c, 1); + SetBottomTile(0x4072, 0x60d, 1); + SetBottomTile(0x4072, 0x64b, 1); + SetBottomTile(0x4072, 0x64c, 1); + SetBottomTile(0x4072, 0x64d, 1); } void sub_080627E8(Entity* this, ScriptExecutionContext* context) { diff --git a/src/npc/npc5.c b/src/npc/npc5.c index dc301ae8..1b60767d 100644 --- a/src/npc/npc5.c +++ b/src/npc/npc5.c @@ -68,7 +68,7 @@ u32 PointInsideRadius(s32, s32, s32); u32 sub_080611D4(Entity*); extern u32 sub_08079FD4(Entity*, u32); -extern void sub_08016AD2(Entity*); +extern void UpdateCollisionLayer(Entity*); bool32 sub_08061630(NPC5Entity*, s32, s32, s32); bool32 sub_08061720(NPC5Entity*, s32, s32, s32); @@ -471,7 +471,7 @@ bool32 sub_08061170(NPC5Entity* this) { } return FALSE; } else { - sub_08016AD2(super); + UpdateCollisionLayer(super); return TRUE; } } @@ -501,7 +501,7 @@ u32 sub_080611D4(Entity* this) { ptr = (s8*)gUnk_0810AC4C; a = ptr[x]; b = ptr[x + 1]; - uVar2 = GetRelativeCollisionTile(this, a, b); + uVar2 = GetActTileRelative(this, a, b); ptr2 = gUnk_0810AC54; do { |
