Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 394b067

Browse files
committed
slashes fixed; runs on linux without sound
1 parent d2a3df7 commit 394b067

12 files changed

Lines changed: 141 additions & 137 deletions

File tree

Game Source/g_console.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ procedure ConsoleCommands(P: SArray);
169169
if Length(P) > 1 then
170170
s := P[1]
171171
else
172-
s := GameDir+'\console.txt';
172+
s := GameDir+'/console.txt';
173173

174174
{$I-}
175175
AssignFile(F, s);
@@ -195,7 +195,7 @@ procedure ConsoleCommands(P: SArray);
195195
// exec <filename>
196196
if Length(P) > 1 then
197197
begin
198-
s := GameDir+'\'+P[1];
198+
s := GameDir+'/'+P[1];
199199

200200
{$I-}
201201
AssignFile(F, s);

Game Source/g_game.pas

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -577,14 +577,14 @@ procedure g_Game_LoadWAD(WAD: string);
577577
if MegaWAD.endpic <> '' then
578578
begin
579579
g_ProcessResourceStr(MegaWAD.endpic, @s, nil, nil);
580-
if s = '' then s := MapsDir+WAD else s := GameDir+'\wads\';
580+
if s = '' then s := MapsDir+WAD else s := GameDir+'/wads/';
581581
g_Texture_CreateWADEx('TEXTURE_endpic', s+MegaWAD.endpic);
582582
end;
583583
MegaWAD.endmus := cfg.ReadStr('megawad', 'endmus', 'Standart.wad:D2DMUS\ÊÎÍÅÖ');
584584
if MegaWAD.endmus <> '' then
585585
begin
586586
g_ProcessResourceStr(MegaWAD.endmus, @s, nil, nil);
587-
if s = '' then s := MapsDir+WAD else s := GameDir+'\wads\';
587+
if s = '' then s := MapsDir+WAD else s := GameDir+'/wads/';
588588
g_Sound_CreateWADEx('MUSIC_endmus', s+MegaWAD.endmus, True);
589589
end;
590590

@@ -3611,7 +3611,7 @@ procedure g_Game_StartClient(Addr: String; Port: Word; PW: String);
36113611

36123612
procedure g_Game_SaveOptions();
36133613
begin
3614-
g_Options_Write_Video(GameDir+'\'+CONFIG_FILENAME);
3614+
g_Options_Write_Video(GameDir+'/'+CONFIG_FILENAME);
36153615
end;
36163616

36173617
procedure g_Game_ChangeMap(MapPath: String);
@@ -4284,9 +4284,9 @@ procedure GameCVars(P: SArray);
42844284
NetInterpLevel := StrToIntDef(P[1], NetInterpLevel);
42854285

42864286
g_Console_Add('net_interp = ' + IntToStr(NetInterpLevel));
4287-
config := TConfig.CreateFile(GameDir+'\'+CONFIG_FILENAME);
4287+
config := TConfig.CreateFile(GameDir+'/'+CONFIG_FILENAME);
42884288
config.WriteInt('Client', 'InterpolationSteps', NetInterpLevel);
4289-
config.SaveFile(GameDir+'\'+CONFIG_FILENAME);
4289+
config.SaveFile(GameDir+'/'+CONFIG_FILENAME);
42904290
config.Free();
42914291
end
42924292
else if cmd = 'net_forceplayerupdate' then
@@ -4299,9 +4299,9 @@ procedure GameCVars(P: SArray);
42994299
g_Console_Add('net_forceplayerupdate = 1')
43004300
else
43014301
g_Console_Add('net_forceplayerupdate = 0');
4302-
config := TConfig.CreateFile(GameDir+'\'+CONFIG_FILENAME);
4302+
config := TConfig.CreateFile(GameDir+'/'+CONFIG_FILENAME);
43034303
config.WriteBool('Client', 'ForcePlayerUpdate', NetForcePlayerUpdate);
4304-
config.SaveFile(GameDir+'\'+CONFIG_FILENAME);
4304+
config.SaveFile(GameDir+'/'+CONFIG_FILENAME);
43054305
config.Free();
43064306
end
43074307
else if cmd = 'net_predictself' then
@@ -4314,9 +4314,9 @@ procedure GameCVars(P: SArray);
43144314
g_Console_Add('net_predictself = 1')
43154315
else
43164316
g_Console_Add('net_predictself = 0');
4317-
config := TConfig.CreateFile(GameDir+'\'+CONFIG_FILENAME);
4317+
config := TConfig.CreateFile(GameDir+'/'+CONFIG_FILENAME);
43184318
config.WriteBool('Client', 'PredictSelf', NetPredictSelf);
4319-
config.SaveFile(GameDir+'\'+CONFIG_FILENAME);
4319+
config.SaveFile(GameDir+'/'+CONFIG_FILENAME);
43204320
config.Free();
43214321
end
43224322
else if cmd = 'sv_name' then
@@ -5712,7 +5712,7 @@ procedure g_TakeScreenShot();
57125712
begin
57135713
for a := 1 to High(Word) do
57145714
begin
5715-
FileName := Format(GameDir+'\Screenshots\Screenshot%.3d.bmp', [a]);
5715+
FileName := Format(GameDir+'/Screenshots/Screenshot%.3d.bmp', [a]);
57165716
if not FileExists(FileName) then
57175717
begin
57185718
e_MakeScreenshot(FileName, gScreenWidth, gScreenHeight);
@@ -6318,7 +6318,7 @@ procedure g_Game_Process_Params();
63186318
if s <> '' then
63196319
begin
63206320
if Pos(':\', s) = 0 then
6321-
s := GameDir + '\' + s;
6321+
s := GameDir + '/' + s;
63226322

63236323
{$I-}
63246324
AssignFile(F, s);

Game Source/g_gui.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2894,7 +2894,7 @@ function TGUIFileListBox.SelectedItem(): String;
28942894

28952895
if (FIndex = -1) or (FItems = nil) or
28962896
(FIndex > High(FItems)) or
2897-
(FItems[FIndex][1] = '\') then
2897+
(FItems[FIndex][1] = '/') then
28982898
Exit;
28992899

29002900
Result := FPath + FItems[FIndex];
@@ -2906,7 +2906,7 @@ procedure TGUIFileListBox.UpdateFileList();
29062906
begin
29072907
if (FIndex = -1) or (FItems = nil) or
29082908
(FIndex > High(FItems)) or
2909-
(FItems[FIndex][1] = '\') then
2909+
(FItems[FIndex][1] = '/') then
29102910
fn := ''
29112911
else
29122912
fn := FItems[FIndex];

0 commit comments

Comments
 (0)