summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ebb1395)
raw | patch | inline | side by side (parent: ebb1395)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Tue, 15 Aug 2017 06:07:33 +0000 (09:07 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Wed, 16 Aug 2017 09:27:46 +0000 (12:27 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_map.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index c56bc488529fa761b9efd506474c5e4ffc26ad73..693798382f8943bdb8cfbf2858d7fca05e9e4af8 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
g_Map_DrawPanels(PANEL_ACID1);
g_Map_DrawPanels(PANEL_ACID2);
g_Map_DrawPanels(PANEL_WATER);
- g_Map_DrawPanels(PANEL_FORE);
- if g_debug_HealthBar then
- begin
- g_Monsters_DrawHealth();
- g_Player_DrawHealth();
- end;
if gwin_has_stencil and (g_dynLightCount > 0) then
begin
glStencilMask($FFFFFFFF);
glStencilFunc(GL_ALWAYS, 0, $FFFFFFFF);
glEnable(GL_STENCIL_TEST);
- //!glEnable(GL_SCISSOR_TEST);
- //glClear(GL_STENCIL_BUFFER_BIT);
+ glEnable(GL_SCISSOR_TEST);
+ glClear(GL_STENCIL_BUFFER_BIT);
glStencilFunc(GL_EQUAL, 0, $ff);
for lln := 0 to g_dynLightCount-1 do
lx := g_dynLights[lln].x;
ly := g_dynLights[lln].y;
lrad := g_dynLights[lln].radius;
- if lrad < 2 then continue;
+ if lrad < 3 then continue;
// set scissor to optimize drawing
- //!glScissor((lx-cameraOfsX)-lrad+2, v_height-(ly-cameraOfsY)-lrad-1+2, lrad*2-4, lrad*2-4);
+ glScissor((lx-sX)-lrad+2, gPlayerScreenSize.Y-(ly-sY)-lrad-1+2, lrad*2-4, lrad*2-4);
// clear stencil buffer
- glClear(GL_STENCIL_BUFFER_BIT); //!!!
+ //glClear(GL_STENCIL_BUFFER_BIT); //!!!
glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);
// draw extruded panels
glDisable(GL_TEXTURE_2D);
glTexCoord2f(0.0, 1.0); glVertex2i(lx-lrad, ly+lrad); // bottom-left
glEnd();
end;
+
// done
glDisable(GL_STENCIL_TEST);
glDisable(GL_BLEND);
glDisable(GL_SCISSOR_TEST);
- //!glScissor((lx-cameraOfsX)-radius+2, v_height-(ly-cameraOfsY)-radius-1+2, radius*2-4, radius*2-4);
+ glScissor(0, 0, sWidth, sHeight);
+ end;
+
+ g_Map_DrawPanels(PANEL_FORE);
+ if g_debug_HealthBar then
+ begin
+ g_Monsters_DrawHealth();
+ g_Player_DrawHealth();
end;
if p.FSpectator then
diff --git a/src/game/g_map.pas b/src/game/g_map.pas
index e080bca7cc0e9ba2423956395a48235d460d3581..aceb7e3d2069d8b5c95c550b044aa95e4fa37cea 100644 (file)
--- a/src/game/g_map.pas
+++ b/src/game/g_map.pas
@@ -1811,7 +1811,7 @@ procedure g_Map_DrawPanelShadowVolumes(lightX: Integer; lightY: Integer; radius:
begin
drawPanels(gWalls);
- drawPanels(gRenderForegrounds);
+ //drawPanels(gRenderForegrounds);
end;
procedure g_Map_DrawBack(dx, dy: Integer);