X-Git-Url: https://deadsoftware.ru/gitweb?p=flatwaifu.git;a=blobdiff_plain;f=src%2Fgl%2Frender.c;h=28c5b86976ccb1cb97f6cf464698034798d88587;hp=f68327a051e0572b51c0d0f428e737c330d868ff;hb=21e27adcd50196e94141390f96c8d4a089ccde08;hpb=9f3ca6bf02300e3dc72e3c2085a8e35aa9242678 diff --git a/src/gl/render.c b/src/gl/render.c index f68327a..28c5b86 100644 --- a/src/gl/render.c +++ b/src/gl/render.c @@ -162,6 +162,7 @@ static int max_wall_width; static int max_wall_height; static int max_textures; static image walp[256]; +static byte walswp[256]; static byte walani[256]; static image anip[ANIT][5]; static byte anic[ANIT]; @@ -2107,3 +2108,14 @@ void R_loadsky (int sky) { R_gl_free_image(&horiz); horiz = R_gl_loadimage(s); } + +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]; +}