summaryrefslogtreecommitdiff
path: root/src/code_0807CC3C.c
diff options
context:
space:
mode:
authorHenny022p <info@henny022.de>2021-02-15 14:20:45 +0100
committerHenny022p <info@henny022.de>2021-02-15 14:20:45 +0100
commit6c2b1a89b8f5f2009e001094bb6ff448f01ea73f (patch)
tree5ca543804c35ed537ce672832a723764fdde6018 /src/code_0807CC3C.c
parent6917076fdcd0498f9ab156e629ecf67abe3c68a0 (diff)
matched sub_0807DDE4
Diffstat (limited to 'src/code_0807CC3C.c')
-rw-r--r--src/code_0807CC3C.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/code_0807CC3C.c b/src/code_0807CC3C.c
index 37d476e2..3f316cc1 100644
--- a/src/code_0807CC3C.c
+++ b/src/code_0807CC3C.c
@@ -5,10 +5,47 @@
#include "entity.h"
extern u8 gUnk_0811E514[];
+extern u8 gUnk_0811E510[];
void sub_0807DF38(void);
extern void sub_0801C4A0(u32);
+void sub_0807DDE4(Entity* entity) {
+ u32 temp;
+ u32 switchVar;
+ u32 loopVar;
+
+ loopVar = entity->field_0x82.HWORD;
+ while (loopVar) {
+ switchVar = (~loopVar + 1) & loopVar;
+ loopVar = loopVar ^ switchVar;
+ switch (switchVar) {
+ case 2:
+ if (entity->entityType.type == 7) {
+ sub_0806ED78(entity);
+ } else {
+ sub_0800445C(entity);
+ }
+ break;
+ case 8:
+ if ((gScreenTransition.frameCount & 3) == 0) {
+ temp = (entity->field_0xf + 2U) & 7;
+ entity->animationState = temp;
+ entity->field_0xf = temp;
+ }
+ break;
+ case 0x10:
+ if ((gScreenTransition.frameCount & 1) == 0) {
+ entity->spriteOffsetX = gUnk_0811E510[Random() & 3];
+ }
+ break;
+ case 0x20:
+ sub_08003FC4(entity, 0x2000);
+ break;
+ }
+ }
+}
+
void sub_0807DE80(Entity* entity) {
u32 local1;
u16 local2;