mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-10-07 02:24:01 +00:00
Fix RoomDimensions struct
This commit is contained in:
parent
8ea6b1f01e
commit
6fb0937c3c
@ -23,7 +23,9 @@
|
||||
#define STRCPY(dst, src) __builtin_memcpy(dst, src, sizeof(src))
|
||||
|
||||
#define LOH(x) (*(s16*)&(x))
|
||||
#define LOHU(x) (*(u16*)&(x))
|
||||
#define LOW(x) (*(s32*)&(x))
|
||||
#define LOWU(x) (*(u32*)&(x))
|
||||
|
||||
#if defined(HACKS) && !defined(PERMUTER)
|
||||
#define ALIGNED4 __attribute__((aligned(4)))
|
||||
|
@ -936,8 +936,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
/* 800730A0 0x00 */ s32 unk00;
|
||||
/* 800730A4 0x04 */ s32 hSize;
|
||||
/* 800730A8 0x08 */ u16 vSize;
|
||||
/* 800730AA 0x0A */ u16 _padding06;
|
||||
/* 800730A8 0x08 */ s32 vSize;
|
||||
/* 800730AC 0x0C */ s32 unk8;
|
||||
/* 800730B0 0x10 */ s32 left;
|
||||
/* 800730B4 0x14 */ s32 top;
|
||||
@ -947,7 +946,7 @@ typedef struct {
|
||||
/* 800730C4 0x24 */ s32 y;
|
||||
/* 800730C8 0x28 */ s32 width;
|
||||
/* 800730CC 0x2C */ s32 height;
|
||||
/* 800730D0 0x30 */ s32 _padding30;
|
||||
/* 800730D0 0x30 */ s32 unk30;
|
||||
/* 800730D4 0x34 */ s32 D_800730D4;
|
||||
/* 800730D8 0x38 */ BgLayer bg[MAX_BG_LAYER_COUNT];
|
||||
} RoomDimensions;
|
||||
|
@ -265,7 +265,7 @@ void Update(void) {
|
||||
|
||||
if ((unk34 & 0x02000000)) {
|
||||
s16 posY = entity->posY.i.hi + g_Camera.posY.i.hi;
|
||||
s16 test = (g_CurrentRoom.vSize * 256) + 128;
|
||||
s16 test = (LOHU(g_CurrentRoom.vSize) * 256) + 128;
|
||||
if (posY > test) {
|
||||
DestroyEntity(entity);
|
||||
continue;
|
||||
|
@ -199,7 +199,7 @@ void Update(void) {
|
||||
|
||||
if ((unk34 & 0x02000000)) {
|
||||
s16 posY = entity->posY.i.hi + g_Camera.posY.i.hi;
|
||||
s16 test = (g_CurrentRoom.vSize * 256) + 128;
|
||||
s16 test = (LOHU(g_CurrentRoom.vSize) * 256) + 128;
|
||||
if (posY > test) {
|
||||
DestroyEntity(entity);
|
||||
continue;
|
||||
|
@ -354,7 +354,7 @@ void Update(void) {
|
||||
|
||||
if ((unk34 & 0x02000000)) {
|
||||
s16 posY = entity->posY.i.hi + g_Camera.posY.i.hi;
|
||||
s16 test = (g_CurrentRoom.vSize * 256) + 128;
|
||||
s16 test = (LOHU(g_CurrentRoom.vSize) * 256) + 128;
|
||||
if (posY > test) {
|
||||
DestroyEntity(entity);
|
||||
continue;
|
||||
|
@ -48,7 +48,7 @@ void Update(void) {
|
||||
|
||||
if ((unk34 & 0x02000000)) {
|
||||
s16 posY = entity->posY.i.hi + g_Camera.posY.i.hi;
|
||||
s16 test = (g_CurrentRoom.vSize * 256) + 128;
|
||||
s16 test = (LOHU(g_CurrentRoom.vSize) * 256) + 128;
|
||||
if (posY > test) {
|
||||
DestroyEntity(entity);
|
||||
continue;
|
||||
|
@ -207,7 +207,7 @@ void Update(void) {
|
||||
|
||||
if ((unk34 & 0x02000000)) {
|
||||
s16 posY = entity->posY.i.hi + g_Camera.posY.i.hi;
|
||||
s16 test = (g_CurrentRoom.vSize * 256) + 128;
|
||||
s16 test = (LOHU(g_CurrentRoom.vSize) * 256) + 128;
|
||||
if (posY > test) {
|
||||
DestroyEntity(entity);
|
||||
continue;
|
||||
|
@ -161,7 +161,7 @@ void Update(void) {
|
||||
|
||||
if ((unk34 & 0x02000000)) {
|
||||
s16 posY = entity->posY.i.hi + g_Camera.posY.i.hi;
|
||||
s16 test = (g_CurrentRoom.vSize * 256) + 128;
|
||||
s16 test = (LOHU(g_CurrentRoom.vSize) * 256) + 128;
|
||||
if (posY > test) {
|
||||
DestroyEntity(entity);
|
||||
continue;
|
||||
|
@ -1719,7 +1719,7 @@ void Update(void) {
|
||||
|
||||
if ((unk34 & 0x02000000)) {
|
||||
s16 posY = entity->posY.i.hi + g_Camera.posY.i.hi;
|
||||
s16 test = (g_CurrentRoom.vSize * 256) + 128;
|
||||
s16 test = (LOHU(g_CurrentRoom.vSize) * 256) + 128;
|
||||
if (posY > test) {
|
||||
DestroyEntity(entity);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user