summaryrefslogtreecommitdiff
path: root/src/npc
diff options
context:
space:
mode:
authorTheo <65437533+notyourav@users.noreply.github.com>2023-12-31 17:36:15 -0800
committerGitHub <noreply@github.com>2023-12-31 17:36:15 -0800
commit48fdf9d8277d2bd2e071cb30fc6284c58645e343 (patch)
treef5364bb3cdb41fe41512d767c1de44f73963e498 /src/npc
parent72c27b5393372081f558a4c610bab7d5c88d3e89 (diff)
parent37ac9cb0fb2d9ccb64286bab2cdf648e6f2541c5 (diff)
Merge pull request #684 from notyourav/tiles
Tiles documentation
Diffstat (limited to 'src/npc')
-rw-r--r--src/npc/castorWildsStatue.c16
-rw-r--r--src/npc/clothesRack.c12
-rw-r--r--src/npc/dog.c2
-rw-r--r--src/npc/kid.c12
-rw-r--r--src/npc/npc5.c8
5 files changed, 25 insertions, 25 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 9f65aad8..0faaac1b 100644
--- a/src/npc/kid.c
+++ b/src/npc/kid.c
@@ -539,12 +539,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 d4a78753..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 {
@@ -525,7 +525,7 @@ u32 sub_080611D4(Entity* this) {
u32 sub_08061230(NPC5Entity* this) {
if ((((UnkHeap*)super->myHeap)->unk_0 & 1) == 0) {
- if ((super->contactFlags & 0x80) != 0) {
+ if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
switch (super->contactFlags & 0x7f) {
case 0:
case 1: