summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornotyouraveragehooman <65437533+notyouraveragehooman@users.noreply.github.com>2020-08-20 02:24:27 -0700
committerGitHub <noreply@github.com>2020-08-20 02:24:27 -0700
commit6e53face6434018eeccd142f963aebab4f2d5ba7 (patch)
treebb987659d3ec5dc843fde965630eee4dd37c0e3a /src
parentf525b99016d2121595f4f4dfff4b8ac51c1c6f03 (diff)
parent4f2f69ceb4d56eafede44637dfc2d504a4bcef42 (diff)
Merge pull request #67 from notyouraveragehooman/master
func renaming
Diffstat (limited to 'src')
-rw-r--r--src/createEntity.c6
-rw-r--r--src/entity.c19
-rw-r--r--src/loadRoom.c12
-rw-r--r--src/loadRoomEntityList.c6
-rw-r--r--src/room.c2
5 files changed, 22 insertions, 23 deletions
diff --git a/src/createEntity.c b/src/createEntity.c
index c3589c37..7feff11b 100644
--- a/src/createEntity.c
+++ b/src/createEntity.c
@@ -4,12 +4,12 @@
// extern Entity * FindEntityBySubtype(u32, u32);
// extern Entity * GetEmptyEntityByType();
-// extern void sub_0804AEB0(Entity *, EntityData *);
+// extern void RegisterRoomEntity(Entity *, EntityData *);
// extern u32 sub_0804AF0C(Entity *, EntityData *);
// extern void sub_08016A30(Entity *);
// extern u32 gRoomControls;
-// Entity * CreateEntity(EntityData *param_1)
+// Entity * LoadRoomEntity(EntityData *param_1)
// {
// Entity *preexisting;
// Entity *entity;
@@ -26,7 +26,7 @@
// (entity->entityType).type = type;
// (entity->entityType).subtype = param_1->entitySubtype;
// (entity->entityType).form = param_1->entityform;
-// sub_0804AEB0(entity,param_1);
+// RegisterRoomEntity(entity,param_1);
// if ((param_1->field_0x1 & 240) != 16) {
// (entity->entityType).parameter = *(u8 *)&param_1->entityparameter;
// entity->actionDelay = (u8)((u32)param_1->entityparameter >> 8);
diff --git a/src/entity.c b/src/entity.c
index e63ea1a0..056644bf 100644
--- a/src/entity.c
+++ b/src/entity.c
@@ -46,13 +46,12 @@ typedef struct {
extern struct_03003DD0 gUnk_03003DD0;
extern u32 _call_via_r0(u32*);
-extern u32 gUnk_03005F24;
+extern u32 _EntUpdate;
extern void DeleteEntityAny(Entity*);
void DeleteThisEntity(void) {
DeleteEntityAny(gUnk_03003DD0.field_0x8);
- _call_via_r0((u32*)&gUnk_03005F24);
- return;
+ _call_via_r0((u32*)&_EntUpdate);
}
void DeleteEntity(Entity*);
@@ -71,15 +70,15 @@ void DeleteEntityAny(Entity* ent) {
}
extern void sub_080AE068();
-extern void sub_0801D230();
+extern void UnloadOBJPalette();
extern void sub_0806FE84();
extern void sub_080788E0();
extern void sub_08078954();
extern void sub_0805EC60();
extern void sub_08017744();
extern void sub_0805E92C();
-extern void sub_0807DB08();
-extern void sub_0806FBEC();
+extern void UnloadCutsceneData();
+extern void UnloadBoundingBox();
extern void sub_0801DA0C();
extern void sub_0804AA1C();
extern void UnlinkEntity(); // Unlink
@@ -87,15 +86,15 @@ extern void UnlinkEntity(); // Unlink
void DeleteEntity(Entity* ent) {
if (ent->next) {
sub_080AE068(ent);
- sub_0801D230(ent);
+ UnloadOBJPalette(ent);
sub_0806FE84(ent);
sub_080788E0(ent);
sub_08078954(ent);
sub_0805EC60(ent);
sub_08017744(ent);
sub_0805E92C(ent);
- sub_0807DB08(ent);
- sub_0806FBEC(ent);
+ UnloadCutsceneData(ent);
+ UnloadBoundingBox(ent);
sub_0801DA0C(ent->otherEntity);
ent->otherEntity = NULL;
if ((ent->entityType).type == 3) {
@@ -141,7 +140,7 @@ typedef struct LinkedList {
extern LinkedList gEntityLists[9];
extern EntityType gUnk_03003DB8;
-void sub_0805E89C(void) {
+void DeleteAllEntities(void) {
Entity* ent;
Entity* next;
LinkedList* it;
diff --git a/src/loadRoom.c b/src/loadRoom.c
index 86749a52..48a6e3bf 100644
--- a/src/loadRoom.c
+++ b/src/loadRoom.c
@@ -8,7 +8,7 @@ extern void sub_0804B058(EntityData* dat);
extern void LoadRoomTileEntities(EntityData* dat);
extern void sub_0801AC98();
extern u32 sub_08049D1C(u32);
-extern Entity* CreateEntity(EntityData*);
+extern Entity* LoadRoomEntity(EntityData*);
extern void* GetRoomProperty(u32, u32, u32);
extern u32 gUnk_02017654;
@@ -32,22 +32,22 @@ void sub_0804B058(EntityData* dat) {
Entity* ent;
u32 uVar2;
- if ((dat != NULL) && (dat->entityType != 0xff)) {
+ if ((dat != NULL) && *(u8*)dat != 0xff) {
uVar2 = 0;
do {
- if ((uVar2 < 0x20) && ((dat->entityType & 0xf) == 3)) {
+ if ((uVar2 < 0x20) && ((dat->type) == 3)) {
if (sub_08049D1C(uVar2) != 0) {
- ent = CreateEntity(dat);
+ ent = LoadRoomEntity(dat);
if ((ent != NULL) && ((ent->entityType).type == 3)) {
ent->field_0x6c.HALF.LO = uVar2 | 0x80;
}
}
} else {
- CreateEntity(dat);
+ LoadRoomEntity(dat);
}
uVar2++;
dat++;
- } while (dat->entityType != 0xff);
+ } while (*(u8*)dat!= 0xff);
}
}
diff --git a/src/loadRoomEntityList.c b/src/loadRoomEntityList.c
index 92373c4d..f74cc9a6 100644
--- a/src/loadRoomEntityList.c
+++ b/src/loadRoomEntityList.c
@@ -1,12 +1,12 @@
#include "global.h"
#include "room.h"
-void extern CreateEntity(EntityData*);
+void extern LoadRoomEntity(EntityData*);
void LoadRoomEntityList(EntityData* listPtr) {
if (listPtr != NULL) {
- while (listPtr->entityType != 0xFF) {
- CreateEntity(listPtr++);
+ while (*(u8*)listPtr != 0xFF) {
+ LoadRoomEntity(listPtr++);
}
}
}
diff --git a/src/room.c b/src/room.c
index 35be17c4..cd8959f5 100644
--- a/src/room.c
+++ b/src/room.c
@@ -4231,7 +4231,7 @@ extern EntityData gUnk_080EEBAC;
void LoadHyruleTown(void) {
sub_08054570();
- sub_08059D18();
+ TryLoadPrologueHyruleTown();
SetTileType(0x176, 0x66b, 1);
if (gUnk_02002A40.unk8 == 1) {
sub_0801D000(0);