Create enums for Vvvs and MetaTiles

This commit is contained in:
octorock
2023-06-24 00:19:33 +02:00
parent f9da634427
commit f89bb66911
168 changed files with 5007 additions and 1629 deletions
+8 -8
View File
@@ -67,20 +67,20 @@ void sub_08067418(Entity* this) {
this->field_0x74.HWORD = COORD_TO_TILE(this);
if (this->type == 0) {
this->hitbox = (Hitbox*)&gUnk_08110E94;
SetTile(0x4022, this->field_0x74.HWORD - 1, this->collisionLayer);
SetTile(0x4022, this->field_0x74.HWORD, this->collisionLayer);
SetTile(0x4022, this->field_0x74.HWORD + 0x3f, this->collisionLayer);
SetTile(0x4022, this->field_0x74.HWORD + 0x40, this->collisionLayer);
SetMetaTile(0x4022, this->field_0x74.HWORD - 1, this->collisionLayer);
SetMetaTile(0x4022, this->field_0x74.HWORD, this->collisionLayer);
SetMetaTile(0x4022, this->field_0x74.HWORD + 0x3f, this->collisionLayer);
SetMetaTile(0x4022, this->field_0x74.HWORD + 0x40, this->collisionLayer);
} else {
this->collisionLayer = 3;
this->spriteOrientation.flipY = 1;
this->spriteRendering.b3 = 1;
this->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);
SetMetaTile(0x4022, 0xe81, 1);
SetMetaTile(0x4022, 0xe82, 1);
SetMetaTile(0x4022, 0xe83, 1);
SetMetaTile(0x4022, 0xec3, 1);
}
}
sub_0807DD50(this);
+6 -6
View File
@@ -31,12 +31,12 @@ void sub_0806DD90(Entity* this) {
InitializeAnimation(this, uVar2);
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);
SetMetaTile(0x4072, TILE(x - 0x18, y - 0x10), this->collisionLayer);
SetMetaTile(0x4072, TILE(x - 0x18, y), this->collisionLayer);
SetMetaTile(0x4072, TILE(x - 0x18, y + 0x10), this->collisionLayer);
SetMetaTile(0x4072, TILE(x + 0x18, y - 0x10), this->collisionLayer);
SetMetaTile(0x4072, TILE(x + 0x18, y), this->collisionLayer);
SetMetaTile(0x4072, TILE(x + 0x18, y + 0x10), this->collisionLayer);
}
void sub_0806DEC8(Entity* this) {
+4 -4
View File
@@ -93,10 +93,10 @@ void sub_0806BEC8(Entity* this, ScriptExecutionContext* context) {
}
void sub_0806BEFC(void) {
SetTileType(0x17E, 0x58E, 1);
SetTileType(0x17F, 0x58F, 1);
SetTileType(0x180, 0x5CE, 1);
SetTileType(0x181, 0x5CF, 1);
SetMetaTileType(0x17E, 0x58E, 1);
SetMetaTileType(0x17F, 0x58F, 1);
SetMetaTileType(0x180, 0x5CE, 1);
SetMetaTileType(0x181, 0x5CF, 1);
}
void sub_0806BF44(Entity* this, ScriptExecutionContext* context) {
+1 -1
View File
@@ -217,7 +217,7 @@ void sub_08069B44(Entity* this) {
this->action = 4;
}
if ((this->type == 2) && (CheckLocalFlag(MACHI_02_DOG) == 0)) {
SetTile(0x4072, TILE(this->x.HALF.HI, this->y.HALF.HI - 8), this->collisionLayer);
SetMetaTile(0x4072, TILE(this->x.HALF.HI, this->y.HALF.HI - 8), this->collisionLayer);
}
}
}
+6 -6
View File
@@ -567,12 +567,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);
SetMetaTile(0x4072, 0x60b, 1);
SetMetaTile(0x4072, 0x60c, 1);
SetMetaTile(0x4072, 0x60d, 1);
SetMetaTile(0x4072, 0x64b, 1);
SetMetaTile(0x4072, 0x64c, 1);
SetMetaTile(0x4072, 0x64d, 1);
}
void sub_080627E8(Entity* this, ScriptExecutionContext* context) {
+1 -1
View File
@@ -185,7 +185,7 @@ void sub_0806DC7C(void) {
while (*tiles != 0) {
u32 tile = *tiles;
tiles = tiles + 1;
SetTileType(0x4072, tile, 1);
SetMetaTileType(0x4072, tile, 1);
}
}
+9 -3
View File
@@ -1,8 +1,9 @@
#include "collision.h"
#include "functions.h"
#include "hitbox.h"
#include "message.h"
#include "npc.h"
#include "hitbox.h"
#include "collision.h"
#include "tiles.h"
typedef struct {
u8 unk_0; // u8
@@ -469,7 +470,12 @@ u32 sub_080611D4(Entity* this) {
};
static const u8 gUnk_0810AC54[] = {
0x2b, 0x10, 0x2a, 0x0, 0x2d, 0x8, 0x2c, 0x18, 0x0,
// vvv, animationState
VVV_43, 0x10,
VVV_42, 0x0,
VVV_45, 0x8,
VVV_44, 0x18,
0x0,
};
u32 vvv;
+1 -1
View File
@@ -29,7 +29,7 @@ void sub_0806C224(void) {
void Simon_CreateChest(Entity* this) {
CreateObjectWithParent(this, SPECIAL_FX, FX_BIG_EXPLOSION2, 0);
SetTileType(0x73, COORD_TO_TILE(this), this->collisionLayer);
SetMetaTileType(0x73, COORD_TO_TILE(this), this->collisionLayer);
SoundReq(SFX_SECRET_BIG);
}
+3 -2
View File
@@ -3,6 +3,7 @@
#include "functions.h"
#include "item.h"
#include "npc.h"
#include "tiles.h"
void sub_0806ACC4(Entity*);
void sub_0806ABFC(Entity*);
@@ -792,8 +793,8 @@ void sub_0806B0E0(Entity* this, ScriptExecutionContext* context) {
int idx = 0;
// Checks if the dust is gone at these four meta tiles.
if (GetVvvAtRoomCoords(56, 184, 1) == 0x57 && GetVvvAtRoomCoords(72, 184, 1) == 0x57 &&
GetVvvAtRoomCoords(56, 200, 1) == 0x57 && GetVvvAtRoomCoords(72, 200, 1) == 0x57) {
if (GetVvvAtRoomCoords(56, 184, 1) == VVV_87 && GetVvvAtRoomCoords(72, 184, 1) == VVV_87 &&
GetVvvAtRoomCoords(56, 200, 1) == VVV_87 && GetVvvAtRoomCoords(72, 200, 1) == VVV_87) {
idx = 1;
}
+1 -1
View File
@@ -172,7 +172,7 @@ void sub_08066F94(void) {
while (*puVar2 != 0) {
uVar1 = *puVar2;
puVar2++;
SetTileType(16498, uVar1, 1);
SetMetaTileType(0x4072, uVar1, 1);
}
}