… | |
… | |
1780 | if (tex->name) |
1780 | if (tex->name) |
1781 | { |
1781 | { |
1782 | if (tex->unused) |
1782 | if (tex->unused) |
1783 | { |
1783 | { |
1784 | tex->name = 0; |
1784 | tex->name = 0; |
1785 | tex->unused = 0, |
1785 | tex->unused = 0; |
1786 | XPUSHs (sv_2mortal (newSViv (texid))); |
1786 | XPUSHs (sv_2mortal (newSViv (texid))); |
1787 | } |
1787 | } |
1788 | else |
1788 | else |
1789 | tex->unused = 1; |
1789 | tex->unused = 1; |
1790 | } |
1790 | } |
… | |
… | |
2025 | key.g = 255; |
2025 | key.g = 255; |
2026 | key.b = 255; |
2026 | key.b = 255; |
2027 | key.a = 255; |
2027 | key.a = 255; |
2028 | key.mode = GL_QUADS; |
2028 | key.mode = GL_QUADS; |
2029 | key.format = GL_T2F_V3F; |
2029 | key.format = GL_T2F_V3F; |
2030 | key.texname = -1; |
|
|
2031 | |
2030 | |
2032 | mx += self->x; |
2031 | mx += self->x; |
2033 | my += self->y; |
2032 | my += self->y; |
2034 | |
2033 | |
2035 | // first pass: determine smooth_max |
2034 | // first pass: determine smooth_max |
… | |
… | |
2059 | glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); |
2058 | glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); |
2060 | |
2059 | |
2061 | for (z = 0; z <= 2; z++) |
2060 | for (z = 0; z <= 2; z++) |
2062 | { |
2061 | { |
2063 | memset (smooth_level, 0, sizeof (smooth_level)); |
2062 | memset (smooth_level, 0, sizeof (smooth_level)); |
|
|
2063 | key.texname = -1; |
2064 | |
2064 | |
2065 | for (y = 0; y < sh; y++) |
2065 | for (y = 0; y < sh; y++) |
2066 | if (0 <= y + my && y + my < self->rows) |
2066 | if (0 <= y + my && y + my < self->rows) |
2067 | { |
2067 | { |
2068 | maprow *row = self->row + (y + my); |
2068 | maprow *row = self->row + (y + my); |
… | |
… | |
2103 | rc_t2f_v3f (arr, tex.s, tex.t, px + tex.w, py + tex.h, 0); |
2103 | rc_t2f_v3f (arr, tex.s, tex.t, px + tex.w, py + tex.h, 0); |
2104 | rc_t2f_v3f (arr, tex.s, 0 , px + tex.w, py , 0); |
2104 | rc_t2f_v3f (arr, tex.s, 0 , px + tex.w, py , 0); |
2105 | |
2105 | |
2106 | if (expect_false (cell->flags) && expect_false (z == 2)) |
2106 | if (expect_false (cell->flags) && expect_false (z == 2)) |
2107 | { |
2107 | { |
|
|
2108 | /* this is a workaround to make speech bubbles drawn |
|
|
2109 | * for example above walls, work. */ |
|
|
2110 | rc_draw (rc); |
|
|
2111 | rc_clear (rc); |
|
|
2112 | key.texname = -1; |
|
|
2113 | |
2108 | // overlays such as the speech bubble, probably more to come |
2114 | // overlays such as the speech bubble, probably more to come |
2109 | if (cell->flags & 1) |
2115 | if (cell->flags & 1) |
2110 | { |
2116 | { |
2111 | maptex tex = self->tex [1]; |
2117 | maptex tex = self->tex [1]; |
2112 | int px = x * T + T * 2 / 32; |
2118 | int px = x * T + T * 2 / 32; |