mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2025-04-19 09:27:16 +02:00
Some minor tuning on dialogs sequence + remove/adjust DEBUGMODE infos
This commit is contained in:
parent
d81616ad38
commit
fd182b5f3c
3 changed files with 34 additions and 16 deletions
|
@ -7,7 +7,7 @@
|
|||
"next1":-1,
|
||||
"conclusion2":"_",
|
||||
"next2":-1,
|
||||
"nextOther":1
|
||||
"nextOther":3
|
||||
},
|
||||
{
|
||||
"ID":1,
|
||||
|
@ -30,6 +30,17 @@
|
|||
"conclusion2":"_",
|
||||
"next2":-1,
|
||||
"nextOther":-1
|
||||
},
|
||||
{
|
||||
"ID":3,
|
||||
"dialog":"Ce Hero de la Revolution a marque le pays de son Aura. Peut-etre aurais-je la meme destinee ... ",
|
||||
"isQuestion":0,
|
||||
"choice":"_",
|
||||
"conclusion1":"_",
|
||||
"next1":-1,
|
||||
"conclusion2":"_",
|
||||
"next2":-1,
|
||||
"nextOther":-1
|
||||
}
|
||||
]
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#define USB_FEATURE 0
|
||||
|
||||
#define DEBUGMODE 1
|
||||
#define DEBUGMODE 0
|
||||
|
||||
#ifdef FXCG50
|
||||
#define T_HEIGHT 16
|
||||
|
|
31
src/npc.c
31
src/npc.c
|
@ -27,29 +27,35 @@ void npc_draw(Game *game) {
|
|||
{
|
||||
ExtraData *Data = &game->map_level->extradata[u];
|
||||
|
||||
|
||||
if (strcmp(Data->type, "NPC")==0) /* the current data is a NPC */
|
||||
{
|
||||
|
||||
/* TODO : This is for debugging purpose, JUste to render the path */
|
||||
/* to be followed by the NPC when this will be implemented */
|
||||
if (Data->hasPath==1) /* this NPC has a trajectory */
|
||||
{
|
||||
int NbPoints = Data->path_length+1;
|
||||
for(int v=0; v<NbPoints; v++)
|
||||
|
||||
#if DEBUGMODE
|
||||
|
||||
if (Data->hasPath==1) /* this NPC has a trajectory */
|
||||
{
|
||||
int NbPoints = Data->path_length+1;
|
||||
for(int v=0; v<NbPoints; v++)
|
||||
{
|
||||
|
||||
|
||||
int16_t deltaX1=((int16_t) (Data->x + Data->xpath[v % NbPoints]) * PXSIZE)-(int16_t) player->wx;
|
||||
int16_t deltaY1=((int16_t) (Data->y + Data->ypath[v % NbPoints]) * PXSIZE)-(int16_t) player->wy;
|
||||
int16_t deltaX1=((int16_t) (Data->x + Data->xpath[v % NbPoints]) * PXSIZE)-(int16_t) player->wx;
|
||||
int16_t deltaY1=((int16_t) (Data->y + Data->ypath[v % NbPoints]) * PXSIZE)-(int16_t) player->wy;
|
||||
|
||||
int16_t deltaX2=((int16_t) (Data->x + Data->xpath[(v+1) % NbPoints]) * PXSIZE)-(int16_t) player->wx;
|
||||
int16_t deltaY2=((int16_t) (Data->y + Data->ypath[(v+1) % NbPoints]) * PXSIZE)-(int16_t) player->wy;
|
||||
int16_t deltaX2=((int16_t) (Data->x + Data->xpath[(v+1) % NbPoints]) * PXSIZE)-(int16_t) player->wx;
|
||||
int16_t deltaY2=((int16_t) (Data->y + Data->ypath[(v+1) % NbPoints]) * PXSIZE)-(int16_t) player->wy;
|
||||
|
||||
dline( player->px + deltaX1, player->py + deltaY1,
|
||||
player->px + deltaX2, player->py + deltaY2,
|
||||
PATH_COLOR);
|
||||
dline( player->px + deltaX1, player->py + deltaY1,
|
||||
player->px + deltaX2, player->py + deltaY2,
|
||||
PATH_COLOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DEBUGMODE
|
||||
|
||||
int16_t deltaX=((int16_t) (Data->x * PXSIZE))-(int16_t) player->wx;
|
||||
int16_t deltaY=((int16_t) (Data->y * PXSIZE))-(int16_t) player->wy;
|
||||
|
@ -58,6 +64,7 @@ void npc_draw(Game *game) {
|
|||
&demo_PNJ_img);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue