index 202500d6170fbe92ddd1416d47811ce01e071656..b896b06cc189757131193261a53e450a576b8bdb 100644 (file)
implementation
uses
- {$IFDEF USE_GLES1}
- GLES11,
- {$ELSE}
- GL, GLEXT,
- {$ENDIF}
+ {$I ../../../nogl/noGLuses.inc}
{$IFDEF ENABLE_MENU}
r_gui,
{$ENDIF}
{$IFDEF ENABLE_SYSTEM}
g_system,
{$ENDIF}
+ {$IFDEF ENABLE_TOUCH}
+ r_touch,
+ {$ENDIF}
{$IFDEF ENABLE_HOLMES}
r_holmes,
{$ENDIF}
info.maximized := gRC_Maximized;
info.major := 1;
info.minor := 1;
- info.profile := TGLProfile.Compat;
+ {$IFDEF USE_GLES1}
+ info.profile := TGLProfile.Common;
+ {$ELSE}
+ info.profile := TGLProfile.Compat;
+ {$ENDIF}
result := info;
end;
{$ENDIF}
raise Exception.Create('Failed to set videomode on startup.');
sys_EnableVSync(gVSync);
{$ENDIF}
+ {$IFDEF NOGL_INIT}
+ nogl_Init;
+ {$ENDIF}
r_LoadScreen_Initialize;
r_Textures_Initialize;
r_Console_Initialize;
r_Console_Finalize;
r_Textures_Finalize;
r_LoadScreen_Finalize;
+ {$IFDEF NOGL_INIT}
+ nogl_Quit;
+ {$ENDIF}
end;
procedure r_Render_Update;
if gShowScore and (gGameSettings.GameMode in [GM_TDM, GM_CTF]) then
begin
- (* RED TEAM GOALS *)
+ (* RED TEAM SCORE *)
fw := 0;
if gGameSettings.GameMode = GM_CTF then
begin
end;
r_Common_DrawText(IntToStr(gTeamStat[TEAM_RED].Score), x + w - 16 - fw, y + 240 - 72 - 4, TEAMCOLOR[TEAM_RED].R, TEAMCOLOR[TEAM_RED].G, TEAMCOLOR[TEAM_RED].B, 255, menufont, TBasePoint.BP_RIGHTUP);
- (* BLUE TEAM GOALS *)
+ (* BLUE TEAM SCORE *)
fw := 0;
if gGameSettings.GameMode = GM_CTF then
begin
w3 := cw * 8; (* frags width *)
w2 := cw * 12; (* ping/loss width *)
w1 := w - w2 - w3 - w4; (* name width *)
- tw := w1 - cw * 2 - w2; (* team goals *)
+ tw := w1 - cw * 2 - w2; (* team score *)
if cs.PlayerStat = nil then players := 0 else players := Length(cs.PlayerStat);
yy := y;
if cs.GameMode in [GM_TDM, GM_CTF] then
r_Draw_Setup(gWinSizeX, gWinSizeY, gScreenWidth, gScreenHeight);
glClearColor(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
+ glClear(GL_COLOR_BUFFER_BIT);
p1 := nil;
p2 := nil;
r_Holmes_DrawUI;
{$ENDIF}
- // TODO draw touch screen controls
+ {$IFDEF ENABLE_TOUCH}
+ r_Touch_Draw;
+ {$ENDIF}
sys_Repaint;
end;
e_LogWriteln('resolution changed')
else
e_LogWriteln('resolution not changed');
- sys_EnableVSync(gVSync)
+ sys_EnableVSync(gVSync);
+ {$ENDIF}
+ {$IFDEF NOGL_INIT}
+ nogl_Init;
{$ENDIF}
end;
{$IFDEF ENABLE_TOUCH}
procedure r_Render_GetKeyRect (key: Integer; out x, y, w, h: Integer; out founded: Boolean);
begin
- // TODO implement touchscreen
- founded := False;
+ r_Touch_GetKeyRect(key, x, y, w, h, founded)
end;
{$ENDIF}