diff --git a/modules/NightDemonDemo/NightDemonDemo.c b/modules/NightDemonDemo/NightDemonDemo.c index 1ca391d..28c76e7 100644 --- a/modules/NightDemonDemo/NightDemonDemo.c +++ b/modules/NightDemonDemo/NightDemonDemo.c @@ -34,7 +34,6 @@ #include "music.h" #include "sdl_core.h" #include "input.h" -#include "ngraph.h" #include "cg.h" #include "jpeg.h" @@ -61,8 +60,10 @@ static void ndd_run(int demonum) { cgdata *cg = jpeg_extract(alk->entries[i].data, alk->entries[i].size); if (cg) { - gr_drawimage24(sf0, cg, 0, 0); + SDL_Surface *sf = SDL_CreateRGBSurfaceWithFormatFrom(cg->pic, cg->width, cg->height, 24, cg->width * 3, SDL_PIXELFORMAT_RGB24); + SDL_BlitSurface(sf, NULL, main_surface, NULL); ags_updateFull(); + SDL_FreeSurface(sf); cgdata_free(cg); } else { WARNING("Cannot decode CG %d in %s", i, alk_path); diff --git a/modules/tDemo/tDemo.c b/modules/tDemo/tDemo.c index fb2b33a..f4ebb4d 100644 --- a/modules/tDemo/tDemo.c +++ b/modules/tDemo/tDemo.c @@ -31,7 +31,6 @@ #include "input.h" #include "bgm.h" #include "sdl_core.h" -#include "ngraph.h" #include "cg.h" #include "jpeg.h" @@ -81,8 +80,10 @@ static void Run() { cgdata *cg = jpeg_extract(alk->entries[i].data, alk->entries[i].size); if (cg) { - gr_drawimage24(sf0, cg, 0, 0); + SDL_Surface *sf = SDL_CreateRGBSurfaceWithFormatFrom(cg->pic, cg->width, cg->height, 24, cg->width * 3, SDL_PIXELFORMAT_RGB24); + SDL_BlitSurface(sf, NULL, main_surface, NULL); ags_updateFull(); + SDL_FreeSurface(sf); cgdata_free(cg); } else { WARNING("Cannot decode CG %d", i);