Update EntityData struct

This commit is contained in:
theo3 2021-02-28 23:11:11 -08:00
parent d9f7ad89ad
commit 72dbd29bb9
3 changed files with 8 additions and 8 deletions

View File

@ -63,13 +63,13 @@ typedef struct {
// Packets used to store which entities to load in a room
typedef struct {
u8 type : 4;
u8 kind : 4;
u8 layer : 4;
u8 flags : 4;
u8 unk : 4;
u8 subtype;
u8 form;
u32 parameter;
u8 id;
u8 type;
u32 type2;
u16 xPos;
u16 yPos;
u32 spritePtr;

View File

@ -34,7 +34,7 @@ void sub_0804B058(EntityData* dat) {
if ((dat != NULL) && *(u8*)dat != 0xff) {
uVar2 = 0;
do {
if ((uVar2 < 0x20) && ((dat->type) == 3)) {
if ((uVar2 < 0x20) && ((dat->kind) == 3)) {
if (sub_08049D1C(uVar2) != 0) {
ent = LoadRoomEntity(dat);
if ((ent != NULL) && (ent->kind == 3)) {

View File

@ -86,10 +86,10 @@ u32 Manager28_FindMatchingEntities(Manager28* this) {
EntityData* tmp = GetCurrentRoomProperty(this->manager.unk_0b);
if (!tmp)
return 0;
for (; *((u8*)tmp) != 0xFF && !(tmp->type == 9 && tmp->subtype == 0x28); tmp++) {
for (; *((u8*)tmp) != 0xFF && !(tmp->kind == 9 && tmp->id == 0x28); tmp++) {
Entity* tmp2;
u32 i;
if (tmp->type != 3)
if (tmp->kind != 3)
continue;
tmp2 = Manager28_FindMatchingEntity(tmp);
if (!tmp2)
@ -115,7 +115,7 @@ Entity* Manager28_FindMatchingEntity(EntityData* unk1) {
y = unk1->yPos + gRoomControls.roomOriginY;
tmp = &gUnk_03003D90;
for (i = tmp->first; (u32)i != (u32)tmp; i = i->next) {
if (x == i->x.HALF.HI && y == i->y.HALF.HI && unk1->subtype == i->id && 3 == i->kind && unk1->form == i->type) {
if (x == i->x.HALF.HI && y == i->y.HALF.HI && unk1->id == i->id && 3 == i->kind && unk1->type == i->type) {
return i;
}
}