summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eecf946)
raw | patch | inline | side by side (parent: eecf946)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Thu, 31 Aug 2017 01:38:09 +0000 (04:38 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Thu, 31 Aug 2017 01:38:32 +0000 (04:38 +0300) |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index a22912b8a896018200aa87ede17ac202d8644b3d..03be57d86ec5c43e9f3007c5f3548dfeaa20e7ed 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
g_rlayer_water: Boolean = true;
g_rlayer_fore: Boolean = true;
+ g_dbg_scale_05: Boolean = false;
+
procedure g_ResetDynlights ();
procedure g_AddDynLight (x, y, radius: Integer; r, g, b, a: Single);
profileFrameDraw.sectionBegin('collect');
if gdbg_map_use_accel_render then
begin
- g_Map_CollectDrawPanels(sX, sY, sWidth, sHeight);
+ if g_dbg_scale_05 then
+ begin
+ g_Map_CollectDrawPanels(sX, sY, sWidth*2, sHeight*2);
+ end
+ else
+ begin
+ g_Map_CollectDrawPanels(sX, sY, sWidth, sHeight);
+ end;
end;
profileFrameDraw.sectionEnd();
g_Map_DrawBack(backXOfs, backYOfs);
profileFrameDraw.sectionEnd();
- if (setTransMatrix) then glTranslatef(transX, transY, 0);
+ if (setTransMatrix) then
+ begin
+ if g_dbg_scale_05 then
+ begin
+ glScalef(0.5, 0.5, 1.0);
+ glTranslatef(transX, transY, 0);
+ end
+ else
+ begin
+ glTranslatef(transX, transY, 0);
+ end;
+ end;
drawPanelType('*back', PANEL_BACK, g_rlayer_back);
drawPanelType('*step', PANEL_STEP, g_rlayer_step);
conRegVar('mon_think', @gmon_debug_think, 'enable/disable monster thinking', 'monster thinking', true);
conRegVar('dbg_holmes', @g_holmes_enabled, 'enable/disable Holmes', 'Holmes', true);
+
+ conRegVar('dbg_scale_half', @g_dbg_scale_05, 'experimental deBUG scale*0.5 mode', 'Scale0.5', true);
end.
diff --git a/src/game/g_holmes.pas b/src/game/g_holmes.pas
index dfa8a00c5bb6eb86df978e88a432af2ad1bd7628..6b623f011a154993d94052f35847ec89ca8c7f22 100644 (file)
--- a/src/game/g_holmes.pas
+++ b/src/game/g_holmes.pas
glScissor(0, gWinSizeY-gPlayerScreenSize.Y-1, vpw, vph);
glPushMatrix();
+ if g_dbg_scale_05 then glScalef(0.5, 0.5, 1.0);
glTranslatef(-vpx, -vpy, 0);
if (showGrid) then drawTileGrid();
diff --git a/src/game/g_items.pas b/src/game/g_items.pas
index 672e4810e78d496f275fed809a7355b6b15e0381..253a0311607bbc2f12f27e4ee4c6a85f2b234e99 100644 (file)
--- a/src/game/g_items.pas
+++ b/src/game/g_items.pas
with ggItems[i] do
begin
- if g_Collide(Obj.X, Obj.Y, Obj.Rect.Width, Obj.Rect.Height, sX, sY, sWidth, sHeight) then
+ if g_dbg_scale_05 or g_Collide(Obj.X, Obj.Y, Obj.Rect.Width, Obj.Rect.Height, sX, sY, sWidth, sHeight) then
begin
if (Animation = nil) then
begin
index 5ec0099df31ef59bf398bb2c52b229cba0a5dc31..79e3be36312924e30b4de321a8777ba82efdb716 100644 (file)
--- a/src/game/g_monsters.pas
+++ b/src/game/g_monsters.pas
o.Y+o.Rect.Y+o.Rect.Height-128, M_NONE);
// Íå â îáëàñòè ðèñîâàíèÿ íå ðåñóåì:
- if not g_Collide(FObj.X+FObj.Rect.X, FObj.Y+FObj.Rect.Y, FObj.Rect.Width, FObj.Rect.Height,
- sX-128, sY-128, sWidth+256, sHeight+256) then
- Exit;
+ if not g_dbg_scale_05 then
+ begin
+ if not g_Collide(FObj.X+FObj.Rect.X, FObj.Y+FObj.Rect.Y, FObj.Rect.Width, FObj.Rect.Height,
+ sX-128, sY-128, sWidth+256, sHeight+256) then
+ Exit;
+ end;
// Ýòè ìîíñòðû, óìèðàÿ, íå îñòàâëÿþò òðóïîâ:
if FState = MONSTATE_DEAD then
diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas
index c562934ec753748f26269fb776a629cd7d61ab08..c46cf8c456d1f591698f72dc96593132c17680e0 100644 (file)
--- a/src/game/g_panel.pas
+++ b/src/game/g_panel.pas
begin
if {Enabled and} (FCurTexture >= 0) and
(Width > 0) and (Height > 0) and (FAlpha < 255) and
- g_Collide(X, Y, Width, Height,
- sX, sY, sWidth, sHeight) then
+ (g_dbg_scale_05 or g_Collide(X, Y, Width, Height, sX, sY, sWidth, sHeight)) then
begin
if FTextureIDs[FCurTexture].Anim then
begin // Àíèìèðîâàííàÿ òåêñòóðà