mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2024-12-29 13:03:43 +01:00
fix alignment of NPC xdata/ydata with fxconv workaround
fxconv.ptr() should have an alignment parameter
This commit is contained in:
parent
8639a3feed
commit
4eac46ee71
2 changed files with 7 additions and 6 deletions
|
@ -322,10 +322,15 @@ def get_extra_map_data(input, output, params, target, xmin, ymin, xmax, ymax):
|
||||||
structData += fxconv.u32(0)
|
structData += fxconv.u32(0)
|
||||||
structData += fxconv.u32(0)
|
structData += fxconv.u32(0)
|
||||||
else:
|
else:
|
||||||
|
o_xdata = fxconv.Structure()
|
||||||
|
o_xdata += xdata
|
||||||
|
o_ydata = fxconv.Structure()
|
||||||
|
o_ydata += ydata
|
||||||
|
|
||||||
structData += fxconv.u32(path)
|
structData += fxconv.u32(path)
|
||||||
structData += fxconv.u32(path_length)
|
structData += fxconv.u32(path_length)
|
||||||
structData += fxconv.ptr( xdata )
|
structData += fxconv.ptr(o_xdata)
|
||||||
structData += fxconv.ptr( ydata )
|
structData += fxconv.ptr(o_ydata)
|
||||||
|
|
||||||
#else we do nothing (yet)
|
#else we do nothing (yet)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -36,8 +36,6 @@ void npc_draw(Game *game) {
|
||||||
int NbPoints = Data->path_length;
|
int NbPoints = Data->path_length;
|
||||||
for(int v=0; v<NbPoints; v++)
|
for(int v=0; v<NbPoints; v++)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
|
||||||
int16_t deltaX1=((int16_t) (Data->xpath[v % NbPoints] * PXSIZE))-(int16_t) player->wx;
|
int16_t deltaX1=((int16_t) (Data->xpath[v % NbPoints] * PXSIZE))-(int16_t) player->wx;
|
||||||
int16_t deltaY1=((int16_t) (Data->ypath[v % NbPoints] * PXSIZE))-(int16_t) player->wy;
|
int16_t deltaY1=((int16_t) (Data->ypath[v % NbPoints] * PXSIZE))-(int16_t) player->wy;
|
||||||
|
|
||||||
|
@ -47,8 +45,6 @@ void npc_draw(Game *game) {
|
||||||
dline( player->px + deltaX1, player->py + deltaY1,
|
dline( player->px + deltaX1, player->py + deltaY1,
|
||||||
player->px + deltaX2, player->py + deltaY2,
|
player->px + deltaX2, player->py + deltaY2,
|
||||||
PATH_COLOR);
|
PATH_COLOR);
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue