mirror of https://github.com/zeldaret/tmc.git
19 lines
463 B
C
19 lines
463 B
C
#include "global.h"
|
|
#include "entity.h"
|
|
|
|
extern void InitializeAnimationOrderAndFlip(Entity *);
|
|
|
|
void PositionRelative(Entity *source, Entity *target, s32 offsetX, s32 offsetY) { //r0, r1, r2, r3
|
|
s32 x;
|
|
s32 y;
|
|
|
|
x = source->x.WORD;
|
|
target->x.WORD = x + offsetX;
|
|
|
|
y = source->y.WORD;
|
|
target->y.WORD = y + offsetY;
|
|
|
|
target->height = source->height; //ldr
|
|
target->collisionLayer = source->collisionLayer;
|
|
InitializeAnimationOrderAndFlip(target);
|
|
} |