Subversion Repositories plumbers

Compare Revisions

Regard whitespace Rev 21 → Rev 20

/trunk/Win32_Player/Game.pas
36,8 → 36,7
FClearHotspotsCallback: TClearHotspotsCallback;
FDirectory: string;
FScore: integer;
FCurDecisionScene: PSceneDef;
FPrevDecisionScene: PSceneDef;
CurDecisionScene, PrevDecisionScene: PSceneDef;
procedure TryExit;
procedure PrevDecisionScene;
protected
90,7 → 89,7
 
procedure TGame.PrevDecisionScene;
begin
if Assigned(FPrevDecisionScene) then PlayScene(FPrevDecisionScene, true)
if Assigned(PrevDecisionScene) then PlayScene(PrevDecisionScene, true)
end;
 
procedure TGame.PerformAction(action: PActionDef);
152,7 → 151,6
end;
if Wait(GameData.pictures[i].duration * 100) then
begin
// Wait was cancelled by VK_RETURN
AsyncSoundCallback(Self, '');
break;
end;
161,8 → 159,8
end;
if scene^.szDecisionBmp <> '' then
begin
FPrevDecisionScene := FCurDecisionScene;
FCurDecisionScene := scene;
PrevDecisionScene := CurDecisionScene;
CurDecisionScene := scene;
if Assigned(PictureShowCallback) then
begin
PictureShowCallback(Self, IncludeTrailingPathDelimiter(FDirectory) +
/trunk/Win32_Player/Main.dfm
48,6 → 48,7
VisibleButtons = [btPlay, btStop]
DoubleBuffered = True
Display = Panel2
FileName = 'D:\_test\INTRO.AVI'
Visible = False
ParentDoubleBuffered = False
TabOrder = 1
/trunk/Win32_Player/Main.pas
246,12 → 246,13
 
procedure TMainForm.FormDestroy(Sender: TObject);
begin
if Assigned(Game) then FreeAndNil(Game);
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;
373,10 → 374,6
Game.ClearHotspotsCallback := cbClearHotspots;
Game.Run;
except
on E: EAbort do
begin
Close;
end;
on E: Exception do
begin
MessageDlg(E.Message, mtError, [mbOK], 0);