summaryrefslogtreecommitdiff
path: root/src/object1A.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/object1A.c')
-rw-r--r--src/object1A.c36
1 files changed, 15 insertions, 21 deletions
diff --git a/src/object1A.c b/src/object1A.c
index 005683c5..4083c55d 100644
--- a/src/object1A.c
+++ b/src/object1A.c
@@ -1,7 +1,7 @@
#include "global.h"
#include "entity.h"
-extern Entity * CreateObject();
+extern Entity* CreateObject();
extern void CopyPosition();
extern void sub_08086A6C();
extern s32 sub_080044EC();
@@ -9,20 +9,18 @@ extern void sub_080AEF88();
extern void DeleteThisEntity();
extern u32 Random(void);
-extern void (*gUnk_081206C4[99])(Entity *);
+extern void (*gUnk_081206C4[99])(Entity*);
extern u32 gUnk_080FD1A8;
-//Main
-void sub_080869C4(Entity *ent)
-{
+// Main
+void sub_080869C4(Entity* ent) {
gUnk_081206C4[ent->action](ent);
}
-void sub_080869DC(Entity *ent)
-{
- Entity *itemEntity;
-
+void sub_080869DC(Entity* ent) {
+ Entity* itemEntity;
+
ent->action = 1;
ent->spriteSettings.b.ss0 = 0;
ent->boundingBox = &gUnk_080FD1A8;
@@ -37,35 +35,31 @@ void sub_080869DC(Entity *ent)
}
}
-void sub_08086A28(Entity *ent)
-{
+void sub_08086A28(Entity* ent) {
s32 iVar1;
-
+
if (ent->attachedEntity->field_0x4 == NULL) {
ent->action = 2;
- }
- else {
+ } else {
iVar1 = sub_080044EC(ent, 10240);
if (iVar1 == 0) {
ent->action = 2;
}
sub_080AEF88(ent);
- CopyPosition(ent,ent->attachedEntity);
+ CopyPosition(ent, ent->attachedEntity);
}
}
-void sub_08086A5C(Entity *ent)
-{
+void sub_08086A5C(Entity* ent) {
ent->attachedEntity->parent = NULL;
DeleteThisEntity();
}
-void sub_08086A6C(Entity *ent)
-{
+void sub_08086A6C(Entity* ent) {
u32 uVar1;
-
+
uVar1 = Random();
ent->field_0x20 = 163840;
ent->direction = (uVar1 >> 16) & 31;
ent->nonPlanarMovement = uVar1 & 480;
-} \ No newline at end of file
+}