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];
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];
+}
void R_set_videomode (int w, int h, int fullscreen);
+void R_switch_texture (int x, int y);
+
void R_get_name (int n, char s[8]);
int R_get_special_id (int n);
+int R_get_swp (int n);
void R_begin_load (void);
void R_load (char s[8], int f);
void R_end_load (void);
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;
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];
+}
else ++pl2.secrets;
sw[i].tm=1;sw[i].t=0;break;
}
- if(sw[i].tm)
- {fldb[sw[i].y][sw[i].x]=walswp[fldb[sw[i].y][sw[i].x]];p=1;}
+ if (sw[i].tm != 0) {
+ R_switch_texture(sw[i].x, sw[i].y);
+ p = 1;
+ }
if(sw[i].tm==1) sw[i].tm=0;
}
}
int sky_type=1;
dword walf[256];
-byte walswp[256];
byte fldb[FLDH][FLDW];
byte fldf[FLDH][FLDW];
byte fld[FLDH][FLDW];
myfwrite32(walf[i], h);
}
for (i = 0; i < 256; i++) {
- myfwrite8(walswp[i], h);
+ myfwrite8(R_get_swp(i), h);
}
myfwrite(fldb, FLDW*FLDH, 1, h);
myfwrite(fld, FLDW*FLDH, 1, h);
extern int sky_type;
extern dword walf[256];
-extern byte walswp[256];
extern byte fldb[FLDH][FLDW];
extern byte fldf[FLDH][FLDW];
extern byte fld[FLDH][FLDW];