diff options
| author | octorock <79596758+octorock@users.noreply.github.com> | 2023-06-24 00:19:33 +0200 |
|---|---|---|
| committer | octorock <79596758+octorock@users.noreply.github.com> | 2023-06-24 00:19:33 +0200 |
| commit | f89bb66911372a067041b66d50ac8462b7e0bd97 (patch) | |
| tree | 5c7516fcf3e30a3aaf4e63c4a28a42e7c66f4471 /src/projectile | |
| parent | f9da6344273ac86d6fd9219fac2710c968eeab37 (diff) | |
Create enums for Vvvs and MetaTiles
Diffstat (limited to 'src/projectile')
| -rw-r--r-- | src/projectile/gleerokProjectile.c | 2 | ||||
| -rw-r--r-- | src/projectile/mandiblesProjectile.c | 4 | ||||
| -rw-r--r-- | src/projectile/removableDust.c | 7 | ||||
| -rw-r--r-- | src/projectile/spiderWeb.c | 2 | ||||
| -rw-r--r-- | src/projectile/v1FireProjectile.c | 2 | ||||
| -rw-r--r-- | src/projectile/v2Projectile.c | 8 | ||||
| -rw-r--r-- | src/projectile/winder.c | 4 |
7 files changed, 15 insertions, 14 deletions
diff --git a/src/projectile/gleerokProjectile.c b/src/projectile/gleerokProjectile.c index b4957290..5c217299 100644 --- a/src/projectile/gleerokProjectile.c +++ b/src/projectile/gleerokProjectile.c @@ -140,7 +140,7 @@ void sub_080A90D8(Entity* this) { if (this->field_0x74.HWORD != TILE(this->x.HALF.HI, this->y.HALF.HI)) { this->field_0x74.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI); - tmp = GetTileTypeByEntity(this); + tmp = GetMetaTileTypeByEntity(this); if ((tmp == 0x13) || (tmp == 0x34)) { sub_0807B7D8(0x34c, TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer); } diff --git a/src/projectile/mandiblesProjectile.c b/src/projectile/mandiblesProjectile.c index f5c7c303..2bf53960 100644 --- a/src/projectile/mandiblesProjectile.c +++ b/src/projectile/mandiblesProjectile.c @@ -102,8 +102,8 @@ void MandiblesProjectile_Action2(Entity* this) { EnqueueSFX(SFX_15D); } this->field_0x78.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI); - if (GetTileType(this->field_0x78.HWORD, this->collisionLayer) == 0x4000) { - SetTile(0x4005, this->field_0x78.HWORD, this->collisionLayer); + if (GetMetaTileType(this->field_0x78.HWORD, this->collisionLayer) == 0x4000) { + SetMetaTile(0x4005, this->field_0x78.HWORD, this->collisionLayer); } } diff --git a/src/projectile/removableDust.c b/src/projectile/removableDust.c index 51ce0d95..e0ecba8e 100644 --- a/src/projectile/removableDust.c +++ b/src/projectile/removableDust.c @@ -4,6 +4,7 @@ #include "functions.h" #include "object.h" #include "room.h" +#include "tiles.h" extern void (*const RemovableDust_Functions[])(Entity*); extern const u16 gUnk_08129FD0[]; @@ -60,7 +61,7 @@ void sub_080AA494(Entity* this) { u32 index; index = 0; - tileType = GetTileTypeByEntity(this); + tileType = GetMetaTileTypeByEntity(this); iterator = gUnk_08129FD0; while (*iterator != 0) { if (*(iterator++) == tileType) { @@ -76,7 +77,7 @@ void sub_080AA494(Entity* this) { } this->type2 = index; this->spritePriority.b0 = 7; - SetTile(0x4068, TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer); + SetMetaTile(0x4068, TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer); } void sub_080AA534(Entity* this) { @@ -100,7 +101,7 @@ void sub_080AA544(Entity* this) { iVar4 = 0; do { vvv = GetVvvAtMetaTilePos((param - tmp[uVar3]) & 0xffff, this->collisionLayer); - if (vvv == 0x3e) { + if (vvv == VVV_62) { iVar4++; } uVar3++; diff --git a/src/projectile/spiderWeb.c b/src/projectile/spiderWeb.c index a089d75a..bdf82d31 100644 --- a/src/projectile/spiderWeb.c +++ b/src/projectile/spiderWeb.c @@ -226,7 +226,7 @@ void sub_080AA9E0(Entity* this) { void sub_080AAA68(Entity* this) { static const u16 typeTiles[] = { 0x4023, 0x4025, 0x4026, 0x4024 }; - SetTile(typeTiles[this->type], TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer); + SetMetaTile(typeTiles[this->type], TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer); } void sub_080AAAA8(Entity* this) { diff --git a/src/projectile/v1FireProjectile.c b/src/projectile/v1FireProjectile.c index ea57dd16..7183f2b7 100644 --- a/src/projectile/v1FireProjectile.c +++ b/src/projectile/v1FireProjectile.c @@ -107,7 +107,7 @@ void sub_080AB4A4(Entity* this) { tile = TILE(this->x.HALF.HI, this->y.HALF.HI); if (tmp != tile) { this->field_0x76.HWORD = tile; - switch (GetTileTypeByEntity(this)) { + switch (GetMetaTileTypeByEntity(this)) { case 0x13: case 0x34: sub_0807B7D8(0x34c, this->field_0x76.HWORD, this->collisionLayer); diff --git a/src/projectile/v2Projectile.c b/src/projectile/v2Projectile.c index 98e757bb..c556917d 100644 --- a/src/projectile/v2Projectile.c +++ b/src/projectile/v2Projectile.c @@ -92,7 +92,7 @@ void sub_080ABCC4(Entity* this) { this->subtimer = 0; this->direction = Random() & 0x1f; this->field_0x74.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI); - this->field_0x76.HWORD = GetTileType(this->field_0x74.HWORD, 2); + this->field_0x76.HWORD = GetMetaTileType(this->field_0x74.HWORD, 2); this->spritePriority.b0 = 2; InitializeAnimation(this, 0); SoundReq(SFX_14B); @@ -114,14 +114,14 @@ void sub_080ABD70(Entity* this) { this->frame &= 0xef; this->speed = 0; this->field_0x74.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI); - this->field_0x76.HWORD = GetTileType(this->field_0x74.HWORD, 2); + this->field_0x76.HWORD = GetMetaTileType(this->field_0x74.HWORD, 2); tmp = this->field_0x76.HWORD; if (tmp != 0x13) { if (tmp == 0x315) { - SetTileType(0x6e, this->field_0x74.HWORD, 2); + SetMetaTileType(0x6e, this->field_0x74.HWORD, 2); } } else { - SetTileType(0x6d, this->field_0x74.HWORD, 2); + SetMetaTileType(0x6d, this->field_0x74.HWORD, 2); } } if ((this->frame & ANIM_DONE) != 0) { diff --git a/src/projectile/winder.c b/src/projectile/winder.c index d15ce8a0..009997a9 100644 --- a/src/projectile/winder.c +++ b/src/projectile/winder.c @@ -114,12 +114,12 @@ void Winder_SetPositions(WinderEntity* this) { bool32 Winder_CheckForRailings(WinderEntity* this, u32 dir) { u32 tile; u32 val; - LayerStruct* layer = GetLayerByIndex(super->collisionLayer); + MapLayer* mapLayer = GetLayerByIndex(super->collisionLayer); u32 collisionData; tile = TILE(super->x.HALF.HI, super->y.HALF.HI); tile += gUnk_080B4488[dir >> 3]; - collisionData = layer->collisionData[tile]; + collisionData = mapLayer->collisionData[tile]; if (collisionData <= 0x1F) { return FALSE; |
