mirror of
https://github.com/pret/pmd-red.git
synced 2026-07-01 00:41:13 -05:00
Move static inline to ground script.h
This commit is contained in:
parent
b3b973fba9
commit
7ec7ad36d5
|
|
@ -3,24 +3,6 @@
|
|||
|
||||
#include "structs/str_position.h"
|
||||
|
||||
static inline void SetUnkInGroundEvent(const CompactPos *posPtr, PixelPos *dst)
|
||||
{
|
||||
if (!(posPtr->xFlags & 4)) {
|
||||
s32 x = posPtr->xTiles << 11;
|
||||
dst->x = x;
|
||||
if (posPtr->xFlags & 2) {
|
||||
dst->x += 0x400;
|
||||
}
|
||||
}
|
||||
if (!(posPtr->yFlags & 4)) {
|
||||
s32 y = posPtr->yTiles << 11;
|
||||
dst->y = y;
|
||||
if (posPtr->yFlags & 2) {
|
||||
dst->y += 0x400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s16 FindGroundEvent(u32 flags, PixelPos *arg1, PixelPos *arg2);
|
||||
|
||||
#endif // GUARD_GROUND_EVENT_H
|
||||
|
|
|
|||
|
|
@ -201,6 +201,24 @@ struct GroundScriptHeader {
|
|||
const struct GroundLink *links;
|
||||
};
|
||||
|
||||
static inline void SetUnkInGroundEvent(const CompactPos *posPtr, PixelPos *dst)
|
||||
{
|
||||
if (!(posPtr->xFlags & 4)) {
|
||||
s32 x = posPtr->xTiles << 11;
|
||||
dst->x = x;
|
||||
if (posPtr->xFlags & 2) {
|
||||
dst->x += 0x400;
|
||||
}
|
||||
}
|
||||
if (!(posPtr->yFlags & 4)) {
|
||||
s32 y = posPtr->yTiles << 11;
|
||||
dst->y = y;
|
||||
if (posPtr->yFlags & 2) {
|
||||
dst->y += 0x400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
void InitScriptData(ScriptData *a0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user