mirror of https://github.com/zeldaret/tmc.git
New RoomMemory struct
This commit is contained in:
parent
495258646f
commit
1a6d14cd36
|
@ -83,6 +83,16 @@ typedef struct {
|
||||||
static_assert(sizeof(RoomVars) == 0xCC);
|
static_assert(sizeof(RoomVars) == 0xCC);
|
||||||
extern RoomVars gRoomVars;
|
extern RoomVars gRoomVars;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
u8 area;
|
||||||
|
u8 room;
|
||||||
|
u16 unk_02;
|
||||||
|
u32 unk_04;
|
||||||
|
} RoomMemory;
|
||||||
|
|
||||||
|
extern RoomMemory* gUnk_020354B0;
|
||||||
|
extern RoomMemory gRoomMemory[];
|
||||||
|
|
||||||
// Packets used to store which entities to load in a room
|
// Packets used to store which entities to load in a room
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 kind;
|
u8 kind;
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
|
#define NENT_DEPRECATED
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#include "entity.h"
|
||||||
extern u32* gUnk_020354B0;
|
#include "room.h"
|
||||||
extern u32 gRoomMemory;
|
|
||||||
|
|
||||||
extern void MemFill32(u32, void*, u32);
|
extern void MemFill32(u32, void*, u32);
|
||||||
|
|
||||||
void ClearRoomMemory(void) {
|
void ClearRoomMemory(void) {
|
||||||
MemFill32(0xFFFFFFFF, &gRoomMemory, 0x40);
|
MemFill32(0xFFFFFFFF, gRoomMemory, 0x40);
|
||||||
gUnk_020354B0 = &gRoomMemory;
|
gUnk_020354B0 = gRoomMemory;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_08049CF4(u8* arg0) {
|
void sub_08049CF4(GenericEntity* ent) {
|
||||||
u8 field_0x6c = *(arg0 + 0x6c);
|
u8 field_0x6c = ent->field_0x6c.HALF.LO;
|
||||||
if (field_0x6c & 0x80) {
|
if (field_0x6c & 0x80) {
|
||||||
*(gUnk_020354B0 + 1) |= 1 << (field_0x6c & 0x1f);
|
gUnk_020354B0->unk_04 |= 1 << (field_0x6c & 0x1f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 sub_08049D1C(u32 arg0) {
|
u32 sub_08049D1C(u32 arg0) {
|
||||||
u32 bitmask = *(gUnk_020354B0 + 1) >> arg0;
|
u32 bitmask = gUnk_020354B0->unk_04 >> arg0;
|
||||||
u32 output = 1;
|
u32 output = 1;
|
||||||
output &= ~bitmask;
|
output &= ~bitmask;
|
||||||
return output;
|
return output;
|
||||||
|
|
Loading…
Reference in New Issue