Skip to content

Commit

Permalink
fix rlet pointer name in appvars
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoconlechuga committed Nov 21, 2020
1 parent 2652023 commit 51f1220
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/output-appvar.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,20 @@ static void output_appvar_c_include_file_converts(output_t *output, FILE *fdh, i
image->name,
*index);

fprintf(fdh, "#define %s ((gfx_sprite_t*)%s_appvar[%d])\n",
image->name,
output->appvar.name,
*index);
if (image->rlet)
{
fprintf(fdh, "#define %s ((gfx_rletsprite_t*)%s_appvar[%d])\n",
image->name,
output->appvar.name,
*index);
}
else
{
fprintf(fdh, "#define %s ((gfx_sprite_t*)%s_appvar[%d])\n",
image->name,
output->appvar.name,
*index);
}
}

*index = *index + 1;
Expand Down

0 comments on commit 51f1220

Please sign in to comment.