Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions cbrain.pp
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,14 @@ implementation
end;
end;
end;

{Update the critter's status.}
if NAttValue(C^.SF,NAG_StatusChange,SEF_Poison) <> 0 then begin
C^.HP := C^.HP - Random( 6 );
{Protect against the case where the creature has already died}
if SC^.CAct <> Nil then begin
{Update the critter's status.}
if NAttValue(C^.SF,NAG_StatusChange,SEF_Poison) <> 0 then begin
C^.HP := C^.HP - Random( 6 );
end;
UpdateStatusList( C^.SF );
end;
UpdateStatusList( C^.SF );

if C^.HP < 0 then CritterDeath(SC,C,False);
C := SC^.CAct;
Expand Down
18 changes: 3 additions & 15 deletions dcplay.pp
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,7 @@ implementation
DCGameMessage('Game Over.');
GamePause;

{$ifdef WINDOWS}
FName := FSearch( SC^.PC^.Name + '.txt' , 'savegame\' );
{$else}
FName := FSearch( SC^.PC^.Name + '.txt' , 'savegame/' );
{$endif}
FName := FSearch( SC^.PC^.Name + '.txt' , 'savegame' + DirectorySeparator);
if ( FName <> '' ) and PLAY_DangerOn then begin
Assign(F,FName);
Erase(F);
Expand Down Expand Up @@ -327,11 +323,7 @@ implementation
begin
{ Create the menu. }
RPM := CreateRPGMenu( LightBlue , Green , LightGreen , 20 , 8 , 60 , 23 );
{$ifdef WINDOWS}
BuildFileMenu( RPM , 'savegame\*.txt' );
{$else}
BuildFileMenu( RPM , 'savegame/*.txt' );
{$endif}
BuildFileMenu( RPM , 'savegame'+ DirectorySeparator + '*.txt' );

if RPM^.numitem < 1 then begin
{ No save game files were found. Jump to STARTGAME, }
Expand All @@ -349,11 +341,7 @@ implementation
{ main menu. Otherwise, load the file and pass the }
{ scenario to PLAYSCENE. }
if FName <> '' then begin
{$ifdef WINDOWS}
SC := LoadGame( 'savegame\' + FName );
{$else}
SC := LoadGame( 'savegame/' + FName );
{$endif}
SC := LoadGame( 'savegame' + DirectorySeparator + FName );
PlayScene( SC );
end;
end;
Expand Down
1 change: 1 addition & 0 deletions deadcold.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
rpm: RPGMenuPtr;

begin
TextBackground(Black);
RPM := CreateRPGMenu( LightBlue , Green , LightGreen , 20 , 8 , 60 , 23 );
AddRPGMenuItem( RPM , 'Start New Game' , 1 );
AddRPGMenuItem( RPM , 'Load Saved Game' , 2 );
Expand Down
15 changes: 8 additions & 7 deletions gamebook.pp
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,12 @@ implementation
T: Integer;
begin
{Open the file.}
{$ifdef WINDOWS}
Assign(F,'savegame\' + SC^.PC^.Name + '.txt');
{$else}
Assign(F,'savegame/' + SC^.PC^.Name + '.txt');
{$endif}
Assign(F,'savegame' + DirectorySeparator + SC^.PC^.Name + '.txt');
{$i-}
ReWrite(F);
{$+}
if IOResult = 0 then
begin
{Write the savefile version first of all.}
writeln(F,SaveFileVersion);

Expand Down Expand Up @@ -407,8 +407,9 @@ implementation
end;
end;
Writeln( F , '-1' );
{Close the file}
Close(F);
{Close the file}
Close(F);
end;
end;

Function LoadGame( FName: String ): ScenarioPtr;
Expand Down