summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bce2ee3)
raw | patch | inline | side by side (parent: bce2ee3)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 1 Apr 2020 09:50:25 +0000 (13:50 +0400) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 1 Apr 2020 09:50:25 +0000 (13:50 +0400) |
src/gl/render.c | patch | blob | history |
diff --git a/src/gl/render.c b/src/gl/render.c
index b2c625fb4f57ec63162c97a027594aa537905cc0..426f43ccc1eb7ce1cf5d53723721cfe66bc5dacb 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++) {
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) {