diff --git a/src/gl/render.c b/src/gl/render.c
index b2c625fb4f57ec63162c97a027594aa537905cc0..8b16371346818b370be4fa518a279c3e8d8d0520 100644 (file)
--- a/src/gl/render.c
+++ b/src/gl/render.c
if (n) {
//logo("new node %p {%i:%i:%i:%i}\n", n, n->l, n->t, n->r, n->b);
} else {
- logo("new node failed\n");
+ logo("new node failed {%i:%i}\n", w, h);
}
return n;
}
static image R_gl_get_special_image (int id, rgba *(*fn)(vgaimg*)) {
image img;
+ //char name[8];
+ //F_getresname(name, id);
+ //logo("load image: %.8s\n", name);
vgaimg *v = R_getvga(id);
if (v != NULL) {
rgba *buf = (*fn)(v);
logo("R_alloc: load graphics\n");
/* Game */
scrnh[0] = R_gl_loadimage("TITLEPIC");
- assert(scrnh[0].n);
scrnh[1] = R_gl_loadimage("INTERPIC");
scrnh[2] = R_gl_loadimage("ENDPIC");
for (i = 0; i < 2; i++) {
mslotr = R_gl_loadimage("M_LSRGHT");
// walls
for (i = 1; i < ANIT; i++) {
- for (j = 0; anm[i - 1][j]; j++) {
+ for (j = 0; j < 5 && anm[i - 1][j]; j++) {
anip[i][j] = R_gl_loadimage(anm[i - 1][j]);
}
for(; j < 5; j++) {
assert(w > 0);
assert(h > 0);
int was = Y_videomode_setted();
- int flags = SYSTEM_USE_OPENGL;
- if (fullscreen) {
- flags |= SYSTEM_USE_FULLSCREEN;
- }
if (root != NULL) {
R_cache_free(root, 0);
root = NULL;
}
- int res = Y_set_videomode(w, h, flags);
+ int res = Y_set_videomode_opengl(w, h, fullscreen);
if (res == 0) {
if (was == 0) {
ERR_failinit("Unable to set video mode\n");
walp[i] = R_gl_getimage(walp[i].res);
}
}
- horiz = R_gl_getimage(horiz.res);
+ if (horiz.n) {
+ horiz = R_gl_getimage(horiz.res);
+ }
}
void R_begin_load (void) {