Subversion Repositories plumbers

Rev

Rev 19 | Rev 21 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19 Rev 20
Line 34... Line 34...
34
    FWaitCallback: TWaitCallback;
34
    FWaitCallback: TWaitCallback;
35
    FSetHotspotCallback: TSetHotspotCallback;
35
    FSetHotspotCallback: TSetHotspotCallback;
36
    FClearHotspotsCallback: TClearHotspotsCallback;
36
    FClearHotspotsCallback: TClearHotspotsCallback;
37
    FDirectory: string;
37
    FDirectory: string;
38
    FScore: integer;
38
    FScore: integer;
39
    CurDecisionScene, LastDecisionScene: PSceneDef;
39
    CurDecisionScene, PrevDecisionScene: PSceneDef;
40
    procedure TryExit;
40
    procedure TryExit;
41
    procedure PrevDecisionScene;
41
    procedure PrevDecisionScene;
42
  protected
42
  protected
43
    GameData: TGameBinFile;
43
    GameData: TGameBinFile;
44
    function Wait(AMilliseconds: integer): boolean;
44
    function Wait(AMilliseconds: integer): boolean;
Line 87... Line 87...
87
  if Assigned(ExitCallback) then ExitCallback(Self);
87
  if Assigned(ExitCallback) then ExitCallback(Self);
88
end;
88
end;
89
 
89
 
90
procedure TGame.PrevDecisionScene;
90
procedure TGame.PrevDecisionScene;
91
begin
91
begin
92
  if Assigned(LastDecisionScene) then PlayScene(LastDecisionScene, true)
92
  if Assigned(PrevDecisionScene) then PlayScene(PrevDecisionScene, true)
93
end;
93
end;
94
 
94
 
95
procedure TGame.PerformAction(action: PActionDef);
95
procedure TGame.PerformAction(action: PActionDef);
96
var
96
var
97
  nextScene: PSceneDef;
97
  nextScene: PSceneDef;
Line 157... Line 157...
157
      if Application.Terminated then Abort;
157
      if Application.Terminated then Abort;
158
    end;
158
    end;
159
  end;
159
  end;
160
  if scene^.szDecisionBmp <> '' then
160
  if scene^.szDecisionBmp <> '' then
161
  begin
161
  begin
162
    LastDecisionScene := CurDecisionScene;
162
    PrevDecisionScene := CurDecisionScene;
163
    CurDecisionScene := scene;
163
    CurDecisionScene := scene;
164
    if Assigned(PictureShowCallback) then
164
    if Assigned(PictureShowCallback) then
165
    begin
165
    begin
166
      PictureShowCallback(Self, IncludeTrailingPathDelimiter(FDirectory) +
166
      PictureShowCallback(Self, IncludeTrailingPathDelimiter(FDirectory) +
167
        scene^.szSceneFolder + PathDelim + scene^.szDecisionBmp, ptDecision);
167
        scene^.szSceneFolder + PathDelim + scene^.szDecisionBmp, ptDecision);