diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index 506fc186424753429b21151925830bb1a0b6376d..e732eed074c4687773a1de38e1925a08366c0e2d 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
begin
ASSERT(n >= 1);
Result := GetUserName;
begin
ASSERT(n >= 1);
Result := GetUserName;
- if Result = '' then Result := 'Player' + IntToStr(machine MOD 10000);
- if n > 1 then Result := Copy(Result, 1, 10) + (' ' + IntToStr(n))
+ if Result = '' then
+ Result := 'Player' + IntToStr(machine MOD 10000);
+ if n = 1 then
+ Result := Copy(Result, 1, 12) + ' '
+ else
+ Result := Copy(Result, 1, 10) + ' ' + IntToStr(n)
end;
procedure g_Options_SetDefaultVideo;
end;
procedure g_Options_SetDefaultVideo;
percentage: Integer;
begin
(* Display 0 = Primary display *)
percentage: Integer;
begin
(* Display 0 = Primary display *)
- SDL_GetDesktopDisplayMode(0, @display);
+ if SDL_GetDesktopDisplayMode(0, @display) <> 0 then
+ begin
+ display.format := SDL_PIXELFORMAT_UNKNOWN;
+ display.w := 640;
+ display.h := 480;
+ display.refresh_rate := 0;
+ display.driverdata := nil
+ end;
{$IF DEFINED(ANDROID)}
gScreenWidth := display.w;
gScreenHeight := display.h;
{$IF DEFINED(ANDROID)}
gScreenWidth := display.w;
gScreenHeight := display.h;
- //gBPP := SDL_BITSPERPIXEL(dispaly.format);
- gBPP := 32;
+ gBPP := SDL_BITSPERPIXEL(dispaly.format);
+ if gBPP = 0 then gBPP := 32;
gFullScreen := True; (* rotation not allowed? *)
gFullScreen := True; (* rotation not allowed? *)
+ {$ELSEIF DEFINED(GO32V2)}
+ gScreenWidth := display.w;
+ gScreenHeight := display.h;
+ gBPP := SDL_BITSPERPIXEL(display.format);
+ if gBPP = 0 then gBPP := 8;
+ gFullScreen := False; (* Do not change videomode twice *)
{$ELSE}
(* Window must be smaller than display *)
closest.w := display.w;
{$ELSE}
(* Window must be smaller than display *)
closest.w := display.w;
gShowMessages := True;
gRevertPlayers := False;
gChatBubble := 4;
gShowMessages := True;
gRevertPlayers := False;
gChatBubble := 4;
+ gPlayerIndicator := True;
gSFSDebug := False;
gSFSFastMode := False;
e_FastScreenshots := True;
gSFSDebug := False;
gSFSFastMode := False;
e_FastScreenshots := True;
ReadBoolean(g_touch_alt, 'Alt');
section := 'Game';
ReadBoolean(g_touch_alt, 'Alt');
section := 'Game';
- ReadInteger(i, 'MaxParticles', 1000, 50000); g_GFX_SetMax(i);
- ReadInteger(i, 'MaxShells', 300, 600); g_Shells_SetMax(i);
- ReadInteger(i, 'MaxGibs', 150, 500); g_Gibs_SetMax(i);
- ReadInteger(i, 'MaxCorpses', 20, 100); g_Corpses_SetMax(i);
+ ReadInteger(i, 'MaxParticles', 0, 50000); g_GFX_SetMax(i);
+ ReadInteger(i, 'MaxShells', 0, 600); g_Shells_SetMax(i);
+ ReadInteger(i, 'MaxGibs', 0, 500); g_Gibs_SetMax(i);
+ ReadInteger(i, 'MaxCorpses', 0, 100); g_Corpses_SetMax(i);
ReadInteger(i, 'GibsCount');
case i of
0: gGibsCount := 0;
ReadInteger(i, 'GibsCount');
case i of
0: gGibsCount := 0;
ReadBoolean(gShowMessages, 'Messages');
ReadBoolean(gRevertPlayers, 'RevertPlayers');
ReadInteger(gChatBubble, 'ChatBubble', 0, 4);
ReadBoolean(gShowMessages, 'Messages');
ReadBoolean(gRevertPlayers, 'RevertPlayers');
ReadInteger(gChatBubble, 'ChatBubble', 0, 4);
+ ReadBoolean(gPlayerIndicator, 'PlayerIndicator');
ReadBoolean(gSFSDebug, 'SFSDebug'); wadoptDebug := gSFSDebug;
ReadBoolean(gSFSFastMode, 'SFSFastMode'); wadoptFast := gSFSFastMode;
ReadBoolean(e_FastScreenshots, 'FastScreenshots');
ReadBoolean(gSFSDebug, 'SFSDebug'); wadoptDebug := gSFSDebug;
ReadBoolean(gSFSFastMode, 'SFSFastMode'); wadoptFast := gSFSFastMode;
ReadBoolean(e_FastScreenshots, 'FastScreenshots');
config.WriteBool('Game', 'Messages', gShowMessages);
config.WriteBool('Game', 'RevertPlayers', gRevertPlayers);
config.WriteInt('Game', 'ChatBubble', gChatBubble);
config.WriteBool('Game', 'Messages', gShowMessages);
config.WriteBool('Game', 'RevertPlayers', gRevertPlayers);
config.WriteInt('Game', 'ChatBubble', gChatBubble);
+ config.WriteBool('Game', 'PlayerIndicator', gPlayerIndicator);
config.WriteBool('Game', 'SFSDebug', gSFSDebug);
config.WriteBool('Game', 'SFSFastMode', gSFSFastMode);
config.WriteBool('Game', 'FastScreenshots', e_FastScreenshots);
config.WriteBool('Game', 'SFSDebug', gSFSDebug);
config.WriteBool('Game', 'SFSFastMode', gSFSFastMode);
config.WriteBool('Game', 'FastScreenshots', e_FastScreenshots);
config.WriteBool('Video', 'Fullscreen', gFullscreen);
config.WriteBool('Video', 'Maximized', gWinMaximized);
config.WriteBool('Video', 'Fullscreen', gFullscreen);
config.WriteBool('Video', 'Maximized', gWinMaximized);
+ config.WriteStr('Player1', 'Name', gPlayer1Settings.Name);
+ config.WriteStr('Player2', 'Name', gPlayer2Settings.Name);
+
config.SaveFile(FileName);
config.Free();
end;
config.SaveFile(FileName);
config.Free();
end;
end;
initialization
end;
initialization
+ Randomize;
machine := Random(10000)
end.
machine := Random(10000)
end.