mirror of
https://github.com/zeldaret/tmc
synced 2026-09-03 10:21:18 -04:00
Create enums for Vvvs and MetaTiles
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "item.h"
|
||||
#include "functions.h"
|
||||
#include "playeritem.h"
|
||||
#include "tiles.h"
|
||||
|
||||
void (*const ItemGustJar_StateFunctions[])(ItemBehavior* this, u32);
|
||||
|
||||
@@ -12,7 +12,7 @@ void ItemGustJar(ItemBehavior* this, u32 index) {
|
||||
}
|
||||
|
||||
void sub_08076DF4(ItemBehavior* this, u32 index) {
|
||||
if (GetVvvInFront(&gPlayerEntity) != 0x29 && gPlayerState.floor_type != SURFACE_DOOR &&
|
||||
if (GetVvvInFront(&gPlayerEntity) != VVV_41 && gPlayerState.floor_type != SURFACE_DOOR &&
|
||||
gPlayerState.floor_type != SURFACE_DOOR_13 && gPlayerState.jump_status == 0) {
|
||||
sub_08077D38(this, index);
|
||||
this->timer = 0;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
|
||||
#include "item.h"
|
||||
#include "functions.h"
|
||||
#include "sound.h"
|
||||
#include "effects.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
#include "object.h"
|
||||
#include "sound.h"
|
||||
#include "tiles.h"
|
||||
|
||||
s32 sub_080774A0(void);
|
||||
extern s32 sub_0800875A(Entity*, u32, ItemBehavior*);
|
||||
@@ -176,18 +177,18 @@ void sub_08077448(ItemBehavior* this, u32 index) {
|
||||
s32 sub_080774A0(void) {
|
||||
static const s8 gUnk_0811BE1E[] = { 0, -13, 13, 0, 0, 16, -13, 0, 0, 0 };
|
||||
u32 iVar2;
|
||||
u32 uVar3;
|
||||
u32 metaTilePos;
|
||||
|
||||
uVar3 = COORD_TO_TILE_OFFSET((&gPlayerEntity), -gUnk_0811BE1E[gPlayerEntity.animationState & 6],
|
||||
metaTilePos = COORD_TO_TILE_OFFSET((&gPlayerEntity), -gUnk_0811BE1E[gPlayerEntity.animationState & 6],
|
||||
-gUnk_0811BE1E[(gPlayerEntity.animationState & 6) + 1]);
|
||||
|
||||
iVar2 = GetCollisionDataAtMetaTilePos(uVar3, gPlayerEntity.collisionLayer);
|
||||
iVar2 = GetCollisionDataAtMetaTilePos(metaTilePos, gPlayerEntity.collisionLayer);
|
||||
|
||||
if (iVar2 > 0x16)
|
||||
return 0;
|
||||
if (iVar2 < 0xf)
|
||||
return 0;
|
||||
if (GetVvvAtMetaTilePos(uVar3, gPlayerEntity.collisionLayer) != 0x56) {
|
||||
if (GetVvvAtMetaTilePos(metaTilePos, gPlayerEntity.collisionLayer) != VVV_86) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0x56;
|
||||
|
||||
Reference in New Issue
Block a user