X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=3e092381baf7ad01f2d84574955e044aaae87d5b;hb=bff90d671581e556daa820b41bf9c9c2c36f9ca0;hp=41099da27c9b46b9d15508da7328bf67a10d23db;hpb=0d43461fbabe69392b0a841eac53710e4e6ca3ea;p=d2df-sdl.git diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 41099da..3e09238 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -142,7 +142,7 @@ procedure g_Game_StepLoading(Value: Integer = -1); procedure g_Game_ClearLoading(); procedure g_Game_SetDebugMode(); procedure DrawLoadingStat(); -procedure DrawMenuBackground(tex: AnsiString; ID: DWord); +procedure DrawMenuBackground(tex: AnsiString); { procedure SetWinPause(Enable: Boolean); } @@ -217,6 +217,12 @@ const STD_PLAYER_MODEL = 'Doomer'; +{$IFDEF HEADLESS} + DEFAULT_PLAYERS = 0; +{$ELSE} + DEFAULT_PLAYERS = 1; +{$ENDIF} + var gStdFont: DWORD; gGameSettings: TGameSettings; @@ -809,7 +815,9 @@ begin begin s := g_ExtractWadName(MegaWAD.endpic); if s = '' then s := MapsDir+WAD else s := GameDir+'/wads/'; + TEXTUREFILTER := GL_LINEAR; g_Texture_CreateWADEx('TEXTURE_endpic', s+MegaWAD.endpic); + TEXTUREFILTER := GL_NEAREST; end; MegaWAD.endmus := cfg.ReadStr('megawad', 'endmus', 'Standart.wad:D2DMUS\ÊÎÍÅÖ'); if MegaWAD.endmus <> '' then @@ -3005,9 +3013,10 @@ begin end; end; -procedure DrawMenuBackground(tex: AnsiString; ID: DWord); +procedure DrawMenuBackground(tex: AnsiString); var w, h: Word; + ID: DWord; begin if g_Texture_Get(tex, ID) then @@ -3018,8 +3027,8 @@ begin 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; @@ -3925,7 +3934,7 @@ 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 @@ -3960,7 +3969,7 @@ begin else back := 'INTER'; - DrawMenuBackground(back, ID); + DrawMenuBackground(back); DrawCustomStat(); @@ -3981,7 +3990,7 @@ begin begin back := 'INTER'; - DrawMenuBackground(back, ID); + DrawMenuBackground(back); DrawSingleStat(); @@ -4018,7 +4027,7 @@ begin // 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; @@ -7805,9 +7814,9 @@ begin // Number of players: s := Find_Param_Value(pars, '-pl'); if (s = '') then - n := 1 + n := DEFAULT_PLAYERS else - n := StrToIntDef(s, 1); + n := StrToIntDef(s, DEFAULT_PLAYERS); // Start: s := Find_Param_Value(pars, '-port');