mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2025-06-06 04:25:09 +02:00
Running clang-format
This commit is contained in:
parent
6cfe0ab687
commit
490fceca25
2 changed files with 14 additions and 10 deletions
src
12
src/npc.c
12
src/npc.c
|
@ -213,8 +213,10 @@ void update_npc(NPC *npc) {
|
||||||
if(!npc->hasPath || npc->paused == true)
|
if(!npc->hasPath || npc->paused == true)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float vecX = (float)(npc->xpath[npc->currentPoint] + npc->x) - (npc->curx>>PRECISION);
|
float vecX = (float)(npc->xpath[npc->currentPoint] + npc->x) -
|
||||||
float vecY = (float)(npc->ypath[npc->currentPoint] + npc->y) - (npc->cury>>PRECISION);
|
(npc->curx >> PRECISION);
|
||||||
|
float vecY = (float)(npc->ypath[npc->currentPoint] + npc->y) -
|
||||||
|
(npc->cury >> PRECISION);
|
||||||
float vecN = length(vecX, vecY);
|
float vecN = length(vecX, vecY);
|
||||||
|
|
||||||
if(vecN > 0.5f) {
|
if(vecN > 0.5f) {
|
||||||
|
@ -265,8 +267,10 @@ void npc_draw(Game *game) {
|
||||||
}
|
}
|
||||||
#endif // DEBUGMODE
|
#endif // DEBUGMODE
|
||||||
|
|
||||||
int16_t delX = ((int16_t)((Data->curx>>PRECISION) * PXSIZE)) - (int16_t)pl->wx;
|
int16_t delX =
|
||||||
int16_t delY = ((int16_t)((Data->cury>>PRECISION) * PXSIZE)) - (int16_t)pl->wy;
|
((int16_t)((Data->curx >> PRECISION) * PXSIZE)) - (int16_t)pl->wx;
|
||||||
|
int16_t delY =
|
||||||
|
((int16_t)((Data->cury >> PRECISION) * PXSIZE)) - (int16_t)pl->wy;
|
||||||
bopti_image_t *face = npc_sprites[Data->face];
|
bopti_image_t *face = npc_sprites[Data->face];
|
||||||
dimage(pl->px - P_WIDTH / 2 + delX, pl->py - P_HEIGHT / 2 + delY, face);
|
dimage(pl->px - P_WIDTH / 2 + delX, pl->py - P_HEIGHT / 2 + delY, face);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue