Merge pull request #684 from notyourav/tiles

Tiles documentation
This commit is contained in:
Theo
2023-12-31 17:36:15 -08:00
committed by GitHub
210 changed files with 1113 additions and 1057 deletions
+8 -8
View File
@@ -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);
+6 -6
View File
@@ -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) {
+1 -1
View File
@@ -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);
}
}
}
+6 -6
View File
@@ -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) {
+4 -4
View File
@@ -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: