mirror of
https://github.com/zeldaret/tmc
synced 2026-07-10 23:22:03 -04:00
matched sub_0807DE80
This commit is contained in:
+35
-3
@@ -2,14 +2,46 @@
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "script.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern u8 gUnk_0811E514[];
|
||||
|
||||
void sub_0807DF38(void);
|
||||
extern void sub_0801C4A0(u32);
|
||||
|
||||
void sub_0807DEDC(Entity* entity, ScriptExecutionContext* context, u32 arg2, u32 arg3)
|
||||
{
|
||||
void sub_0807DE80(Entity* entity) {
|
||||
u32 local1;
|
||||
u16 local2;
|
||||
|
||||
u32 temp;
|
||||
|
||||
local2 = entity->field_0x80.HWORD;
|
||||
if (local2 < 8) {
|
||||
if (entity->field_0x82.HWORD & 1) {
|
||||
u32 t1, t2;
|
||||
t1 = local2 & 0xfc;
|
||||
t2 = entity->field_0xf >> 1;
|
||||
local2 = t1 + t2;
|
||||
} else {
|
||||
u32 t1, t2;
|
||||
t1 = local2 & 0xfc;
|
||||
t2 = entity->animationState >> 1;
|
||||
local2 = t1 + t2;
|
||||
entity->field_0xf = entity->animationState;
|
||||
}
|
||||
}
|
||||
if (local2 != entity->animIndex) {
|
||||
InitAnimationForceUpdate(entity, local2);
|
||||
}
|
||||
temp = entity->field_0x82.HWORD & 4;
|
||||
local1 = 1;
|
||||
if (temp) {
|
||||
local1 = 2;
|
||||
}
|
||||
sub_080042BA(entity, local1);
|
||||
}
|
||||
|
||||
void sub_0807DEDC(Entity* entity, ScriptExecutionContext* context, u32 arg2, u32 arg3) {
|
||||
int temp;
|
||||
s32 t0, t1;
|
||||
|
||||
@@ -22,7 +54,7 @@ void sub_0807DEDC(Entity* entity, ScriptExecutionContext* context, u32 arg2, u32
|
||||
t1 = context->unk_20.HALF.HI - entity->y.HALF.HI;
|
||||
temp = sub_080045DA(t0, t1);
|
||||
entity->direction = temp;
|
||||
entity->animationState = (entity->animationState & 0x80) | gUnk_0811E514[(u32)(temp <<0x18)>>0x1c];
|
||||
entity->animationState = (entity->animationState & 0x80) | gUnk_0811E514[(u32)(temp << 0x18) >> 0x1c];
|
||||
}
|
||||
|
||||
void sub_0807DF28(void) {
|
||||
|
||||
Reference in New Issue
Block a user