Rev 20 | Rev 23 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 20 | Rev 21 | ||
---|---|---|---|
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 | FCurDecisionScene: PSceneDef; |
|
39 | CurDecisionScene, PrevDecisionScene: PSceneDef; |
40 | FPrevDecisionScene: PSceneDef; |
40 | procedure TryExit; |
41 | procedure TryExit; |
41 | procedure PrevDecisionScene; |
42 | procedure PrevDecisionScene; |
42 | protected |
43 | protected |
43 | GameData: TGameBinFile; |
44 | GameData: TGameBinFile; |
44 | function Wait(AMilliseconds: integer): boolean; |
45 | function Wait(AMilliseconds: integer): boolean; |
Line 87... | Line 88... | ||
87 | if Assigned(ExitCallback) then ExitCallback(Self); |
88 | if Assigned(ExitCallback) then ExitCallback(Self); |
88 | end; |
89 | end; |
89 | 90 | ||
90 | procedure TGame.PrevDecisionScene; |
91 | procedure TGame.PrevDecisionScene; |
91 | begin |
92 | begin |
92 | if Assigned(PrevDecisionScene) then PlayScene(PrevDecisionScene, true) |
93 | if Assigned(FPrevDecisionScene) then PlayScene(FPrevDecisionScene, true) |
93 | end; |
94 | end; |
94 | 95 | ||
95 | procedure TGame.PerformAction(action: PActionDef); |
96 | procedure TGame.PerformAction(action: PActionDef); |
96 | var |
97 | var |
97 | nextScene: PSceneDef; |
98 | nextScene: PSceneDef; |
Line 149... | Line 150... | ||
149 | PictureShowCallback(Self, IncludeTrailingPathDelimiter(FDirectory) + |
150 | PictureShowCallback(Self, IncludeTrailingPathDelimiter(FDirectory) + |
150 | scene^.szSceneFolder + PathDelim + GameData.pictures[i].szBitmapFile, ptDia); |
151 | scene^.szSceneFolder + PathDelim + GameData.pictures[i].szBitmapFile, ptDia); |
151 | end; |
152 | end; |
152 | if Wait(GameData.pictures[i].duration * 100) then |
153 | if Wait(GameData.pictures[i].duration * 100) then |
153 | begin |
154 | begin |
- | 155 | // Wait was cancelled by VK_RETURN |
|
154 | AsyncSoundCallback(Self, ''); |
156 | AsyncSoundCallback(Self, ''); |
155 | break; |
157 | break; |
156 | end; |
158 | end; |
157 | if Application.Terminated then Abort; |
159 | if Application.Terminated then Abort; |
158 | end; |
160 | end; |
159 | end; |
161 | end; |
160 | if scene^.szDecisionBmp <> '' then |
162 | if scene^.szDecisionBmp <> '' then |
161 | begin |
163 | begin |
162 | PrevDecisionScene := CurDecisionScene; |
164 | FPrevDecisionScene := FCurDecisionScene; |
163 | CurDecisionScene := scene; |
165 | FCurDecisionScene := scene; |
164 | if Assigned(PictureShowCallback) then |
166 | if Assigned(PictureShowCallback) then |
165 | begin |
167 | begin |
166 | PictureShowCallback(Self, IncludeTrailingPathDelimiter(FDirectory) + |
168 | PictureShowCallback(Self, IncludeTrailingPathDelimiter(FDirectory) + |
167 | scene^.szSceneFolder + PathDelim + scene^.szDecisionBmp, ptDecision); |
169 | scene^.szSceneFolder + PathDelim + scene^.szDecisionBmp, ptDecision); |
168 | end; |
170 | end; |