DEADSOFTWARE

game: switch textures in more abstract way
[flatwaifu.git] / src / soft / render.c
index 38c3ba7f3bc057bcca8db85497cbe1bc5ef06360..e2cb9bf660cc9a4167a33df9168cba13b8b6383b 100644 (file)
@@ -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];
+}