diff --git a/src/game/g_holmes.pas b/src/game/g_holmes.pas
index 34fac81284217c51e8303d09c2a0ffd89f2d9855..b31ead3b2da0b03712af63801a5f2ba2da972dbb 100644 (file)
--- a/src/game/g_holmes.pas
+++ b/src/game/g_holmes.pas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
uses
mempool, geom,
e_log, e_input,
- g_textures, g_basic, e_graphics, g_phys, g_grid, g_player, g_monsters,
+ g_textures, g_basic, r_graphics, g_phys, g_grid, g_player, g_monsters,
g_window, g_map, g_triggers, g_items, g_game, g_panel, g_console, g_gfx,
xprofiler,
sdlcarcass,
uses
{$INCLUDE ../nogl/noGLuses.inc}
- {rttiobj,} typinfo, e_texture,
+ {rttiobj,} typinfo, e_res,
SysUtils, Classes, SDL2,
MAPDEF, g_main, g_options,
utils, hashtable, xparser;
procedure clearEdgeBmp ();
begin
- SetLength(edgeBmp, (gWinSizeX+4)*(gWinSizeY+4));
+ SetLength(edgeBmp, (gScreenWidth+4)*(gScreenHeight+4));
FillChar(edgeBmp[0], Length(edgeBmp)*sizeof(edgeBmp[0]), 0);
end;
begin
sx := pan.X-(vpx-1);
len := pan.Width;
- if (len > gWinSizeX+4) then len := gWinSizeX+4;
+ if (len > gScreenWidth+4) then len := gScreenWidth+4;
if (sx < 0) then begin len += sx; sx := 0; end;
- if (sx+len > gWinSizeX+4) then len := gWinSizeX+4-sx;
+ if (sx+len > gScreenWidth+4) then len := gScreenWidth+4-sx;
if (len < 1) then exit;
assert(sx >= 0);
- assert(sx+len <= gWinSizeX+4);
+ assert(sx+len <= gScreenWidth+4);
y0 := pan.Y-(vpy-1);
y1 := y0+pan.Height;
if (y0 < 0) then y0 := 0;
- if (y1 > gWinSizeY+4) then y1 := gWinSizeY+4;
+ if (y1 > gScreenHeight+4) then y1 := gScreenHeight+4;
while (y0 < y1) do
begin
- FillChar(edgeBmp[y0*(gWinSizeX+4)+sx], len*sizeof(edgeBmp[0]), 1);
+ FillChar(edgeBmp[y0*(gScreenWidth+4)+sx], len*sizeof(edgeBmp[0]), 1);
Inc(y0);
end;
end
glColor4f(r/255.0, g/255.0, b/255.0, 1.0);
for y := 1 to vph do
begin
- a := @edgeBmp[y*(gWinSizeX+4)+1];
+ a := @edgeBmp[y*(gScreenWidth+4)+1];
startLine(y);
for x := 1 to vpw do
begin
if (a[0] <> 0) then
begin
- if (a[-1] = 0) or (a[1] = 0) or (a[-(gWinSizeX+4)] = 0) or (a[gWinSizeX+4] = 0) or
- (a[-(gWinSizeX+4)-1] = 0) or (a[-(gWinSizeX+4)+1] = 0) or
- (a[gWinSizeX+4-1] = 0) or (a[gWinSizeX+4+1] = 0) then
+ if (a[-1] = 0) or (a[1] = 0) or (a[-(gScreenWidth+4)] = 0) or (a[gScreenWidth+4] = 0) or
+ (a[-(gScreenWidth+4)-1] = 0) or (a[-(gScreenWidth+4)+1] = 0) or
+ (a[gScreenWidth+4-1] = 0) or (a[gScreenWidth+4+1] = 0) then
begin
putPixel(x);
end;
glColor4f(r/255.0, g/255.0, b/255.0, 1.0);
for y := 1 to vph do
begin
- a := @edgeBmp[y*(gWinSizeX+4)+1];
+ a := @edgeBmp[y*(gScreenWidth+4)+1];
startLine(y);
for x := 1 to vpw do
begin
gxSetContext(hlmContext);
try
- //glScissor(0, gWinSizeY-gPlayerScreenSize.Y-1, vpw, vph);
+ //glScissor(0, gScreenHeight-gPlayerScreenSize.Y-1, vpw, vph);
//hlmContext.clip := TGxRect.Create(0, gScreenHeight-gPlayerScreenSize.Y-1, gPlayerScreenSize.X, gPlayerScreenSize.Y);
{
begin
for dx := -1 to 1 do
begin
- if (dx <> 0) or (dy <> 0) then hlmContext.drawText(4+dx, gWinSizeY-10+dy, s);
+ if (dx <> 0) or (dy <> 0) then hlmContext.drawText(4+dx, gScreenHeight-10+dy, s);
end;
end;
hlmContext.color := TGxRGBA.Create(255, 255, 0);
- hlmContext.drawText(4, gWinSizeY-10, s);
+ hlmContext.drawText(4, gScreenHeight-10, s);
gxSetContext(nil);
end;
end;
// load bindings from file
try
- st := openDiskFileRO(GameDir+'holmes.rc');
+ st := e_OpenResourceRO(ConfigDirs, 'holmes.rc');
pr := TFileTextParser.Create(st);
conwriteln('parsing "holmes.rc"...');
while (pr.tokType <> pr.TTEOF) do