X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=da2db1b1a8a484e69016a2091ba9af103a9dbf1b;hb=3a6c3884caee5abb903ab88adc172a0fa8edf78b;hp=7a1f2978e5f18dd9d594cd83b157422f072e3d3c;hpb=cabbec9701799f82a1d1bde30cb6e235fe7a74a4;p=d2df-sdl.git diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 7a1f297..da2db1b 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -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 @@ -3997,13 +4005,8 @@ begin if gState = STATE_ENDPIC then begin ID := DWORD(-1); - if not g_Texture_Get('TEXTURE_endpic', ID) then - g_Texture_Get(_lc[I_TEXTURE_ENDPIC], ID); - - if ID <> DWORD(-1) then - e_DrawSize(ID, 0, 0, 0, False, False, gScreenWidth, gScreenHeight) - else - e_Clear(GL_COLOR_BUFFER_BIT, 0, 0, 0); + if g_Texture_Get('TEXTURE_endpic', ID) then DrawMenuBackground('TEXTURE_endpic') + else DrawMenuBackground(_lc[I_TEXTURE_ENDPIC]); if g_ActiveWindow <> nil then begin @@ -7211,6 +7214,7 @@ begin (tgcLocal) and Sound.IsPlaying() then begin +(* if ((gPlayer1 <> nil) and g_CollidePoint(gPlayer1.GameX, gPlayer1.GameY, X, Y, Width, Height)) or ((gPlayer2 <> nil) and g_CollidePoint(gPlayer2.GameX, gPlayer2.GameY, X, Y, Width, Height)) then begin @@ -7218,6 +7222,7 @@ begin Sound.SetVolume(tgcVolume/255.0); end else +*) Sound.SetCoords(X+(Width div 2), Y+(Height div 2), tgcVolume/255.0); end; end; @@ -7806,9 +7811,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');