X-Git-Url: https://deadsoftware.ru/gitweb?p=flatwaifu.git;a=blobdiff_plain;f=src%2Fsoft%2Frender.c;h=e2cb9bf660cc9a4167a33df9168cba13b8b6383b;hp=38c3ba7f3bc057bcca8db85497cbe1bc5ef06360;hb=21e27adcd50196e94141390f96c8d4a089ccde08;hpb=9f3ca6bf02300e3dc72e3c2085a8e35aa9242678 diff --git a/src/soft/render.c b/src/soft/render.c index 38c3ba7..e2cb9bf 100644 --- a/src/soft/render.c +++ b/src/soft/render.c @@ -72,6 +72,7 @@ static int w_o, w_x, w_y; static vgaimg *walp[256]; static int walh[256]; static byte walani[256]; +static byte walswp[256]; static int anih[ANIT][5]; static byte anic[ANIT]; static int max_textures; @@ -1628,3 +1629,14 @@ void R_done (void) { pitch = 0; Y_unset_videomode(); } + +void R_switch_texture (int x, int y) { + assert(x >= 0 && x < FLDW); + assert(y >= 0 && y < FLDH); + fldb[y][x] = walswp[fldb[y][x]]; +} + +int R_get_swp (int n) { + assert(n >= 0 && n < 256); + return walswp[n]; +}