Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
SpinyTromp_CheckDist.inc.c
Go to the documentation of this file.
1#include "common.h"
2#include "npc.h"
3
4API_CALLABLE(N(SpinyTromp_CheckDist)) {
5 f32 x = script->varTable[0] - gPlayerStatus.pos.x;
6 f32 y = script->varTable[2] - gPlayerStatus.pos.y;
7 f32 z = 0.0f - gPlayerStatus.pos.z;
8
9 script->varTable[4] = sqrtf(SQ(x) + SQ(y) + SQ(z));
10
11 return ApiStatus_DONE2;
12}
#define sqrtf
#define ApiStatus_DONE2
Definition evt.h:118
#define SQ(x)
Definition macros.h:166
PlayerStatus gPlayerStatus
Definition 77480.c:39