Subversion Repositories plumbers

Compare Revisions

Regard whitespace Rev 20 → Rev 21

/trunk/Win32_Player/Game.pas
36,7 → 36,8
FClearHotspotsCallback: TClearHotspotsCallback;
FDirectory: string;
FScore: integer;
CurDecisionScene, PrevDecisionScene: PSceneDef;
FCurDecisionScene: PSceneDef;
FPrevDecisionScene: PSceneDef;
procedure TryExit;
procedure PrevDecisionScene;
protected
89,7 → 90,7
 
procedure TGame.PrevDecisionScene;
begin
if Assigned(PrevDecisionScene) then PlayScene(PrevDecisionScene, true)
if Assigned(FPrevDecisionScene) then PlayScene(FPrevDecisionScene, true)
end;
 
procedure TGame.PerformAction(action: PActionDef);
151,6 → 152,7
end;
if Wait(GameData.pictures[i].duration * 100) then
begin
// Wait was cancelled by VK_RETURN
AsyncSoundCallback(Self, '');
break;
end;
159,8 → 161,8
end;
if scene^.szDecisionBmp <> '' then
begin
PrevDecisionScene := CurDecisionScene;
CurDecisionScene := scene;
FPrevDecisionScene := FCurDecisionScene;
FCurDecisionScene := scene;
if Assigned(PictureShowCallback) then
begin
PictureShowCallback(Self, IncludeTrailingPathDelimiter(FDirectory) +
/trunk/Win32_Player/Main.dfm
48,7 → 48,6
VisibleButtons = [btPlay, btStop]
DoubleBuffered = True
Display = Panel2
FileName = 'D:\_test\INTRO.AVI'
Visible = False
ParentDoubleBuffered = False
TabOrder = 1
/trunk/Win32_Player/Main.pas
246,13 → 246,12
 
procedure TMainForm.FormDestroy(Sender: TObject);
begin
FreeAndNil(Game);
if Assigned(Game) then FreeAndNil(Game);
 
// Without this, some audio drivers could crash if you press ESC to end the game.
// (VPC 2007 with Win95; cpsman.dll crashes sometimes)
PlaySound(nil, hinstance, 0);
FreeAndNil(csCancelSceneRequest);
if Assigned(Game) then FreeAndNil(Game);
end;
 
procedure TMainForm.FormKeyDown(Sender: TObject; var Key: Word;
374,6 → 373,10
Game.ClearHotspotsCallback := cbClearHotspots;
Game.Run;
except
on E: EAbort do
begin
Close;
end;
on E: Exception do
begin
MessageDlg(E.Message, mtError, [mbOK], 0);