mirror of
https://github.com/zeldaret/tmc
synced 2026-08-19 05:52:33 -04:00
matched sub_0807DEDC
This commit is contained in:
+21
-1
@@ -1,9 +1,29 @@
|
||||
#include "global.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "script.h"
|
||||
|
||||
extern u8 gUnk_0811E514[];
|
||||
|
||||
void sub_0807DF38(void);
|
||||
extern void sub_0801C4A0(int arg0);
|
||||
extern void sub_0801C4A0(u32);
|
||||
|
||||
void sub_0807DEDC(Entity* entity, ScriptExecutionContext* context, u32 arg2, u32 arg3)
|
||||
{
|
||||
int temp;
|
||||
s32 t0, t1;
|
||||
|
||||
context->unk_19 = 8;
|
||||
context->unk_08 |= 2;
|
||||
context->unk_14 = 0;
|
||||
context->unk_1C.HALF.HI = arg2;
|
||||
context->unk_20.HALF.HI = arg3;
|
||||
t0 = context->unk_1C.HALF.HI - entity->x.HALF.HI;
|
||||
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];
|
||||
}
|
||||
|
||||
void sub_0807DF28(void) {
|
||||
sub_0807DF38();
|
||||
|
||||
+3
-3
@@ -7,6 +7,7 @@
|
||||
#include "room.h"
|
||||
#include "structures.h"
|
||||
#include "save.h"
|
||||
#include "script.h"
|
||||
|
||||
extern void sub_08060528(Entity*);
|
||||
extern void* GetCurrentRoomProperty(u32);
|
||||
@@ -27,7 +28,6 @@ extern void EnqueueSFX(u32);
|
||||
extern void sub_080606C0(Entity*);
|
||||
extern void sub_0800451C(Entity*);
|
||||
extern void sub_08078784(Entity*, u32);
|
||||
extern void sub_0807DEDC(Entity*, u32, u32, u32);
|
||||
|
||||
typedef struct {
|
||||
s16 x;
|
||||
@@ -202,12 +202,12 @@ void sub_080606D8(Entity* this) {
|
||||
ShowNPCDialogue(this, &gUnk_0810AA30[index]);
|
||||
}
|
||||
|
||||
void sub_08060700(Entity* entity, u32 arg1) {
|
||||
void sub_08060700(Entity* entity, ScriptExecutionContext* context) {
|
||||
s8* var0 = gUnk_0810A918[(s8)entity->field_0x68.HALF.LO];
|
||||
Coords16* coords = &gUnk_0810A66C[var0[(s8)entity->field_0x68.HALF.HI]];
|
||||
u32 x = coords->x + gRoomControls.roomOriginX;
|
||||
u32 y = coords->y + gRoomControls.roomOriginY;
|
||||
sub_0807DEDC(entity, arg1, x, y);
|
||||
sub_0807DEDC(entity, context, x, y);
|
||||
gUnk_02033280.unk_07 |= 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user