summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 15583dd)
raw | patch | inline | side by side (from parent 1: 15583dd)
author | Joseph Stalin <granminigun@pm.me> | |
Sat, 3 Aug 2019 21:34:25 +0000 (02:34 +0500) | ||
committer | Joseph Stalin <granminigun@pm.me> | |
Sat, 3 Aug 2019 21:35:11 +0000 (02:35 +0500) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_gui.pas | patch | blob | history | |
src/game/g_window.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 41099da27c9b46b9d15508da7328bf67a10d23db..7a1f2978e5f18dd9d594cd83b157422f072e3d3c 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
procedure g_Game_ClearLoading();
procedure g_Game_SetDebugMode();
procedure DrawLoadingStat();
procedure g_Game_ClearLoading();
procedure g_Game_SetDebugMode();
procedure DrawLoadingStat();
-procedure DrawMenuBackground(tex: AnsiString; ID: DWord);
+procedure DrawMenuBackground(tex: AnsiString);
{ procedure SetWinPause(Enable: Boolean); }
{ procedure SetWinPause(Enable: Boolean); }
end;
end;
end;
end;
-procedure DrawMenuBackground(tex: AnsiString; ID: DWord);
+procedure DrawMenuBackground(tex: AnsiString);
var
w, h: Word;
var
w, h: Word;
+ ID: DWord;
begin
if g_Texture_Get(tex, ID) then
begin
if g_Texture_Get(tex, ID) then
w := round(w * 1.333 * (gScreenHeight / h))
else
w := trunc(w * (gScreenHeight / h));
w := round(w * 1.333 * (gScreenHeight / h))
else
w := trunc(w * (gScreenHeight / h));
- e_DrawSize(ID, (gScreenWidth - w) div 2, 0, 0, False, False, w, gScreenHeight);
- end
+ e_DrawSize(ID, (gScreenWidth - w) div 2, 0, 0, False, False, w, gScreenHeight);
+ end
else e_Clear(GL_COLOR_BUFFER_BIT, 0, 0, 0);
end;
else e_Clear(GL_COLOR_BUFFER_BIT, 0, 0, 0);
end;
begin
if (gState = STATE_MENU) then
begin
begin
if (gState = STATE_MENU) then
begin
- if (g_ActiveWindow = nil) or (g_ActiveWindow.BackTexture = '') then DrawMenuBackground('MENU_BACKGROUND', ID);
+ if (g_ActiveWindow = nil) or (g_ActiveWindow.BackTexture = '') then DrawMenuBackground('MENU_BACKGROUND');
// F3 at menu will show game loading dialog
if e_KeyPressed(IK_F3) then g_Menu_Show_LoadMenu(true);
if (g_ActiveWindow <> nil) then
// F3 at menu will show game loading dialog
if e_KeyPressed(IK_F3) then g_Menu_Show_LoadMenu(true);
if (g_ActiveWindow <> nil) then
else
back := 'INTER';
else
back := 'INTER';
- DrawMenuBackground(back, ID);
+ DrawMenuBackground(back);
DrawCustomStat();
DrawCustomStat();
begin
back := 'INTER';
begin
back := 'INTER';
- DrawMenuBackground(back, ID);
+ DrawMenuBackground(back);
DrawSingleStat();
DrawSingleStat();
// e_DrawSize(ID, 0, 0, 0, False, False, gScreenWidth, gScreenHeight);
// //e_DrawFillQuad(0, 0, gScreenWidth-1, gScreenHeight-1, 48, 48, 48, 180);
// end;
// e_DrawSize(ID, 0, 0, 0, False, False, gScreenWidth, gScreenHeight);
// //e_DrawFillQuad(0, 0, gScreenWidth-1, gScreenHeight-1, 48, 48, 48, 180);
// end;
- DrawMenuBackground('MENU_BACKGROUND', ID);
+ DrawMenuBackground('MENU_BACKGROUND');
e_DarkenQuadWH(0, 0, gScreenWidth, gScreenHeight, 150);
g_Serverlist_Draw(slCurrent, slTable);
end;
e_DarkenQuadWH(0, 0, gScreenWidth, gScreenHeight, 150);
g_Serverlist_Draw(slCurrent, slTable);
end;
diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas
index e32889203b7216e27914336ce79c6bac37861a6f..a76a1801f560969bd0ab491f9dca790cc7565c3f 100644 (file)
--- a/src/game/g_gui.pas
+++ b/src/game/g_gui.pas
tw := round(tw * 1.333 * (gScreenHeight / th))
else
tw := trunc(tw * (gScreenHeight / th));
tw := round(tw * 1.333 * (gScreenHeight / th))
else
tw := trunc(tw * (gScreenHeight / th));
- e_DrawSize(ID, (gScreenWidth - tw) div 2, 0, 0, False, False, tw, gScreenHeight);
+ e_DrawSize(ID, (gScreenWidth - tw) div 2, 0, 0, False, False, tw, gScreenHeight);
end
else
e_Clear(GL_COLOR_BUFFER_BIT, 0.5, 0.5, 0.5);
end
else
e_Clear(GL_COLOR_BUFFER_BIT, 0.5, 0.5, 0.5);
diff --git a/src/game/g_window.pas b/src/game/g_window.pas
index dcd01756f8c7b58c9460a24df21dbcf19bf6c7b1..d790c4f852c9f468bd51c39ba4a9fd1b221faa20 100644 (file)
--- a/src/game/g_window.pas
+++ b/src/game/g_window.pas
procedure ProcessLoading (forceUpdate: Boolean=false);
var
ev: TSDL_Event;
procedure ProcessLoading (forceUpdate: Boolean=false);
var
ev: TSDL_Event;
- ID: LongWord;
stt: UInt64;
begin
FillChar(ev, sizeof(ev), 0);
stt: UInt64;
begin
FillChar(ev, sizeof(ev), 0);
if forceUpdate then
begin
if forceUpdate then
begin
- DrawMenuBackground('INTER', ID);
+ DrawMenuBackground('INTER');
e_DarkenQuadWH(0, 0, gScreenWidth, gScreenHeight, 150);
DrawLoadingStat();
e_DarkenQuadWH(0, 0, gScreenWidth, gScreenHeight, 150);
DrawLoadingStat();