ScummVM API documentation
script.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 // Scripting module private header
23 
24 #ifndef SAGA_SCRIPT_H
25 #define SAGA_SCRIPT_H
26 
27 #include "common/endian.h"
28 
29 #include "saga/font.h"
30 
31 namespace Saga {
32 
33 #define COMMON_BUFFER_SIZE 1024 // Why 1024?
34 
35 #define SCRIPT_TBLENTRY_LEN 4
36 
37 #define SCRIPT_MAX 5000
38 
39 #define ITE_SCRIPT_FUNCTION_MAX 78
40 #define IHNM_SCRIPT_FUNCTION_MAX 105
41 
42 enum AddressTypes {
43  kAddressCommon = 0, // offset from global variables
44  kAddressStatic = 1, // offset from global variables
45  kAddressModule = 2, // offset from start of module
46  kAddressStack = 3, // offset from stack
47  kAddressThread = 4 // offset from thread structure
48 /* kAddressId = 5, // offset from const id object
49  kAddressIdIndirect = 6, // offset from stack id object
50  kAddressIndex = 7 // index from id*/
51 };
52 
53 enum VerbTypes {
54  kVerbNone,
55  kVerbWalkTo,
56  kVerbGive,
57  kVerbUse,
58  kVerbEnter,
59  kVerbLookAt,
60  kVerbPickUp,
61  kVerbOpen,
62  kVerbClose,
63  kVerbTalkTo,
64  kVerbWalkOnly,
65  kVerbLookOnly,
66  kVerbOptions
67 };
68 
69 #define STHREAD_TIMESLICE 8
70 
71 enum ThreadVarTypes {
72  kThreadVarObject = 0,
73  kThreadVarWithObject = 1,
74  kThreadVarAction = 2,
75  kThreadVarActor = 3,
76 
77  kThreadVarMax = kThreadVarActor + 1
78 };
79 
80 enum ThreadFlags {
81  kTFlagNone = 0,
82  kTFlagWaiting = 1, // wait for even denoted in waitType
83  kTFlagFinished = 2,
84  kTFlagAborted = 4,
85  kTFlagAsleep = kTFlagWaiting | kTFlagFinished | kTFlagAborted // Combination of all flags which can halt a thread
86 };
87 
88 enum ThreadWaitTypes {
89  kWaitTypeNone = 0, // waiting for nothing
90  kWaitTypeDelay = 1, // waiting for a timer
91  kWaitTypeSpeech = 2, // waiting for speech to finish
92  kWaitTypeDialogEnd = 3, // waiting for my dialog to finish
93  kWaitTypeDialogBegin = 4, // waiting for other dialog to finish
94  kWaitTypeWalk = 5, // waiting to finish walking
95  kWaitTypeRequest = 6, // a request is up
96  kWaitTypePause = 7,
97  kWaitTypePlacard = 8,
98  kWaitTypeStatusTextInput = 9,
99  kWaitTypeWaitFrames = 10, // IHNM. waiting for a frame count
100  kWaitTypeWakeUp = 11 // IHNM. wait until get waken up
101 };
102 
103 enum CycleFlags {
104  kCyclePong = 1 << 0,
105  kCycleOnce = 1 << 1,
106  kCycleRandom = 1 << 2,
107  kCycleReverse = 1 << 3
108 };
109 
110 enum WalkFlags {
111  kWalkBackPedal = 1 << 0,
112  kWalkAsync = 1 << 1,
113  kWalkUseAngle = 1 << 2,
114  kWalkFace = 1 << 5
115 };
116 
117 enum ReplyFlags {
118  kReplyOnce = 1 << 0,
119  kReplySummary = 1 << 1,
120  kReplyCondition = 1 << 2
121 };
122 
123 struct EntryPoint {
124  uint16 nameOffset;
125  uint16 offset;
126 };
127 
129 
130 struct ModuleData {
131  bool loaded; // is it loaded or not?
132  int scriptResourceId;
133  int stringsResourceId;
134  int voicesResourceId;
135 
136  ByteArray moduleBase; // all base module
137  uint16 staticSize; // size of static data
138  uint staticOffset; // offset of static data beginning in _commonBuffer
139  Common::Array<EntryPoint> entryPoints;
140 
141  StringsTable strings;
142  VoiceLUT voiceLUT;
143 
144  void clear() {
145  loaded = false;
146  strings.clear();
147  voiceLUT.clear();
148  moduleBase.clear();
149  entryPoints.clear();
150  }
151 
152  ModuleData() : loaded(false), scriptResourceId(0), stringsResourceId(0), voicesResourceId(0), staticSize(0), staticOffset(0) {
153  }
154 };
155 
157 public:
158  Common::Array<int16> _stackBuf;
159 
160  uint16 _stackTopIndex = 0;
161  uint16 _frameIndex = 0;
162 
163  uint16 _threadVars[kThreadVarMax];
164 
165  byte *_moduleBase = 0; //
166  uint16 _moduleBaseSize = 0;
167 
168  byte *_commonBase = nullptr; //
169  byte *_staticBase = nullptr; //
170  VoiceLUT *_voiceLUT = nullptr; //
171  StringsTable *_strings = nullptr; //
172 
173  int _flags = 0; // ThreadFlags
174  int _waitType = 0; // ThreadWaitTypes
175  uint _sleepTime = 0;
176  void *_threadObj = nullptr; // which object we're handling
177 
178  int16 _returnValue = 0;
179 
180  uint16 _instructionOffset = 0; // Instruction offset
181 
182  int32 _frameWait = 0;
183 
184  enum {
185  THREAD_STACK_SIZE = 256
186  };
187 
188 public:
189  byte *baseAddress(byte addrMode) {
190  switch (addrMode) {
191  case kAddressCommon:
192  return _commonBase;
193  case kAddressStatic:
194  return _staticBase;
195  case kAddressModule:
196  return _moduleBase;
197  case kAddressStack:
198  return (byte *)&_stackBuf[_frameIndex];
199  case kAddressThread:
200  return (byte *)_threadVars;
201  default:
202  return _commonBase;
203  }
204  }
205 
206  int16 stackTop() {
207  return _stackBuf[_stackTopIndex];
208  }
209 
210  uint pushedSize() {
211  return THREAD_STACK_SIZE - _stackTopIndex - 2;
212  }
213 
214  void push(int16 value) {
215  if (_stackTopIndex <= 0) {
216  error("ScriptThread::push() stack overflow");
217  }
218  _stackBuf[--_stackTopIndex] = value;
219  }
220 
221  int16 pop() {
222  if (_stackTopIndex >= THREAD_STACK_SIZE) {
223  error("ScriptThread::pop() stack underflow");
224  }
225  return _stackBuf[_stackTopIndex++];
226  }
227 
228 
229 // wait stuff
230  void wait(int waitType) {
231  _waitType = waitType;
232  _flags |= kTFlagWaiting;
233  }
234 
235  void waitWalk(void *threadObj) {
236  debug(3, "waitWalk()");
237  wait(kWaitTypeWalk);
238  _threadObj = threadObj;
239  }
240 
241  void waitDelay(int sleepTime) {
242  debug(3, "waitDelay(%d)", sleepTime);
243  wait(kWaitTypeDelay);
244  _sleepTime = sleepTime;
245  }
246 
247  void waitFrames(int frames) {
248  debug(3, "waitFrames(%d)", frames);
249  wait(kWaitTypeWaitFrames);
250  _frameWait = frames;
251  }
252 
253  ScriptThread() {
254  memset(&_frameIndex, 0xFE, sizeof(_frameIndex));
255  memset(_threadVars, 0xFE, sizeof(_threadVars));
256  memset(&_waitType, 0xFE, sizeof(_waitType));
257  memset(&_sleepTime, 0xFE, sizeof(_sleepTime));
258  memset(&_threadObj, 0xFE, sizeof(_threadObj));
259  memset(&_returnValue, 0xFE, sizeof(_returnValue));
260  memset(&_frameWait, 0xFE, sizeof(_frameWait));
261 
262  _flags = kTFlagNone;
263  }
264 };
265 
267 
268 #define SCRIPTOP_PARAMS ScriptThread *thread, Common::SeekableReadStream *scriptS, bool &stopParsing, bool &breakOut
269 #define SCRIPTFUNC_PARAMS ScriptThread *thread, int nArgs, bool &disContinue
270 #define OPCODE(x) {&Script::x, #x}
271 
272 class Script {
273 public:
274  StringsTable _mainStrings;
275 
276  Script(SagaEngine *vm);
277  virtual ~Script();
278 
279  void loadModule(uint scriptModuleNumber);
280  void clearModules();
281 
282  void doVerb();
283  void showVerb(int statusColor = -1);
284  void setVerb(int verb);
285  int getCurrentVerb() const { return _currentVerb; }
286  void setPointerVerb();
287  void whichObject(const Point& mousePoint);
288  void hitObject(bool leftButton);
289  void playfieldClick(const Point& mousePoint, bool leftButton);
290 
291  void setLeftButtonVerb(int verb);
292  int getLeftButtonVerb() const { return _leftButtonVerb; }
293  void setRightButtonVerb(int verb);
294  int getRightButtonVerb() const { return _rightButtonVerb; }
295  void setNonPlayfieldVerb() {
296  setRightButtonVerb(getVerbType(kVerbNone));
297  _pointerObject = ID_NOTHING;
298  _currentObject[_firstObjectSet ? 1 : 0] = ID_NOTHING;
299  }
300  void setNoPendingVerb() {
301  _pendingVerb = getVerbType(kVerbNone);
302  _currentObject[0] = _currentObject[1] = ID_NOTHING;
303  setPointerVerb();
304  }
305  int getVerbType(VerbTypes verbType);
306  TextListEntry *getPlacardTextEntry() { return _placardTextEntry; }
307 
308  bool isNonInteractiveDemo();
309 
310 protected:
311  // When reading or writing data to the common buffer, we have to use a
312  // well-defined byte order since it's stored in savegames. Otherwise,
313  // we use native byte ordering since that data may be accessed in other
314  // ways than through these functions.
315  //
316  // The "module" area is a special case, which possibly never ever
317  // happens. But if it does, we need well-defined byte ordering.
318 
319  uint16 readUint16(byte *addr, byte addrMode) {
320  switch (addrMode) {
321  case kAddressCommon:
322  case kAddressStatic:
323  case kAddressModule:
324  return READ_LE_UINT16(addr);
325  default:
326  return READ_UINT16(addr);
327  }
328  }
329 
330  void writeUint16(byte *addr, uint16 value, byte addrMode) {
331  switch (addrMode) {
332  case kAddressCommon:
333  case kAddressStatic:
334  case kAddressModule:
335  WRITE_LE_UINT16(addr, value);
336  break;
337  default:
338  WRITE_UINT16(addr, value);
339  break;
340  }
341  }
342 
343  SagaEngine *_vm;
344  ResourceContext *_scriptContext;
345  ResourceContext *_dataContext;
346 
347  uint16 _modulesLUTEntryLen;
348  Common::Array<ModuleData> _modules;
349  TextListEntry *_placardTextEntry;
350 
351  friend class SagaEngine;
352  ByteArray _commonBuffer;
353 
354  uint _staticSize;
355  ScriptThreadList _threadList;
356  ScriptThread *_conversingThread;
357 
358 //verb
359  bool _firstObjectSet;
360  bool _secondObjectNeeded;
361  uint16 _currentObject[2];
362  int16 _currentObjectFlags[2];
363  int _currentVerb;
364  int _stickyVerb;
365  int _leftButtonVerb;
366  int _rightButtonVerb;
367  int _ihnmDemoCurrentY;
368 
369 public:
370  uint16 _pendingObject[2];
371  int _pendingVerb;
372  uint16 _pointerObject;
373 
374  bool _skipSpeeches;
375  bool _abortEnabled;
376 
377  VoiceLUT _globalVoiceLUT;
378 
379 public:
380  ScriptThread &createThread(uint16 scriptModuleNumber, uint16 scriptEntryPointNumber);
381  int executeThread(ScriptThread *thread, int entrypointNumber);
382  void executeThreads(uint msec);
383  void completeThread();
384  void abortAllThreads();
385 
386  void wakeUpActorThread(int waitType, void *threadObj);
387  void wakeUpThreads(int waitType);
388  void wakeUpThreadsDelayed(int waitType, int sleepTime);
389 
390  void loadVoiceLUT(VoiceLUT &voiceLUT, const ByteArray &resourceData);
391 
392 protected:
393  void loadModuleBase(ModuleData &module, const ByteArray &resourceData);
394 
395  // runThread returns true if we should break running of other threads
396  bool runThread(ScriptThread &thread);
397  void setThreadEntrypoint(ScriptThread *thread, int entrypointNumber);
398 
399 public:
400  void finishDialog(int strID, int replyID, int flags, int bitOffset);
401 
402 protected:
403  // Script opcodes ------------------------------------------------------------
404  typedef void (Script::*ScriptOpType)(SCRIPTOP_PARAMS);
406  ScriptOpType scriptOp;
407  const char *scriptOpName;
408  };
409  const ScriptOpDescription *_scriptOpsList;
410 
411  void setupScriptOpcodeList();
412  void opDummy(SCRIPTOP_PARAMS) { warning("Dummy opcode called"); }
413  void opNextBlock(SCRIPTOP_PARAMS) {
414  thread->_instructionOffset = (((thread->_instructionOffset) >> 10) + 1) << 10;
415  }
416  void opDup(SCRIPTOP_PARAMS);
417  void opDrop(SCRIPTOP_PARAMS);
418  void opZero(SCRIPTOP_PARAMS);
419  void opOne(SCRIPTOP_PARAMS);
420  void opConstInt(SCRIPTOP_PARAMS);
421  void opStrLit(SCRIPTOP_PARAMS);
422  void opGetFlag(SCRIPTOP_PARAMS);
423  void opGetByte(SCRIPTOP_PARAMS); // SAGA 2
424  void opGetInt(SCRIPTOP_PARAMS);
425  void opPutFlag(SCRIPTOP_PARAMS);
426  void opPutByte(SCRIPTOP_PARAMS); // SAGA 2
427  void opPutInt(SCRIPTOP_PARAMS);
428  void opPutFlagV(SCRIPTOP_PARAMS);
429  void opPutByteV(SCRIPTOP_PARAMS);
430  void opPutIntV(SCRIPTOP_PARAMS);
431  void opCall(SCRIPTOP_PARAMS); // SAGA 1
432  void opCallNear(SCRIPTOP_PARAMS); // SAGA 2
433  void opCallFar(SCRIPTOP_PARAMS); // SAGA 2
434  void opCcall(SCRIPTOP_PARAMS);
435  void opCcallV(SCRIPTOP_PARAMS);
436  void opCallMember(SCRIPTOP_PARAMS); // SAGA 2
437  void opCallMemberV(SCRIPTOP_PARAMS); // SAGA 2
438  void opEnter(SCRIPTOP_PARAMS);
439  void opReturn(SCRIPTOP_PARAMS);
440  void opReturnV(SCRIPTOP_PARAMS);
441  void opJmp(SCRIPTOP_PARAMS);
442  void opJmpTrueV(SCRIPTOP_PARAMS);
443  void opJmpFalseV(SCRIPTOP_PARAMS);
444  void opJmpTrue(SCRIPTOP_PARAMS);
445  void opJmpFalse(SCRIPTOP_PARAMS);
446  void opJmpSwitch(SCRIPTOP_PARAMS);
447  void opJmpRandom(SCRIPTOP_PARAMS);
448  void opNegate(SCRIPTOP_PARAMS);
449  void opNot(SCRIPTOP_PARAMS);
450  void opCompl(SCRIPTOP_PARAMS);
451  void opIncV(SCRIPTOP_PARAMS);
452  void opDecV(SCRIPTOP_PARAMS);
453  void opPostInc(SCRIPTOP_PARAMS);
454  void opPostDec(SCRIPTOP_PARAMS);
455  void opAdd(SCRIPTOP_PARAMS);
456  void opSub(SCRIPTOP_PARAMS);
457  void opMul(SCRIPTOP_PARAMS);
458  void opDiv(SCRIPTOP_PARAMS);
459  void opMod(SCRIPTOP_PARAMS);
460  void opEq(SCRIPTOP_PARAMS);
461  void opNe(SCRIPTOP_PARAMS);
462  void opGt(SCRIPTOP_PARAMS);
463  void opLt(SCRIPTOP_PARAMS);
464  void opGe(SCRIPTOP_PARAMS);
465  void opLe(SCRIPTOP_PARAMS);
466  void opRsh(SCRIPTOP_PARAMS);
467  void opLsh(SCRIPTOP_PARAMS);
468  void opAnd(SCRIPTOP_PARAMS);
469  void opOr(SCRIPTOP_PARAMS);
470  void opXor(SCRIPTOP_PARAMS);
471  void opLAnd(SCRIPTOP_PARAMS);
472  void opLOr(SCRIPTOP_PARAMS);
473  void opLXor(SCRIPTOP_PARAMS);
474  void opSpeak(SCRIPTOP_PARAMS);
475  void opDialogBegin(SCRIPTOP_PARAMS);
476  void opDialogEnd(SCRIPTOP_PARAMS);
477  void opReply(SCRIPTOP_PARAMS);
478  void opAnimate(SCRIPTOP_PARAMS);
479  void opJmpSeedRandom(SCRIPTOP_PARAMS);
480 
481  // Script functions ----------------------------------------------------------
482  typedef void (Script::*ScriptFunctionType)(SCRIPTFUNC_PARAMS);
483 
485  ScriptFunctionType scriptFunction;
486  const char *scriptFunctionName;
487  };
488  const ScriptFunctionDescription *_scriptFunctionsList;
489 
490  void setupITEScriptFuncList();
491  void setupIHNMScriptFuncList();
492 
493  void sfPutString(SCRIPTFUNC_PARAMS);
494  void sfWait(SCRIPTFUNC_PARAMS);
495  void sfTakeObject(SCRIPTFUNC_PARAMS);
496  void sfIsCarried(SCRIPTFUNC_PARAMS);
497  void sfStatusBar(SCRIPTFUNC_PARAMS);
498  void sfMainMode(SCRIPTFUNC_PARAMS);
499  void sfScriptWalkTo(SCRIPTFUNC_PARAMS);
500  void sfScriptDoAction(SCRIPTFUNC_PARAMS);
501  void sfSetActorFacing(SCRIPTFUNC_PARAMS);
502  void sfStartBgdAnim(SCRIPTFUNC_PARAMS);
503  void sfStopBgdAnim(SCRIPTFUNC_PARAMS);
504  void sfLockUser(SCRIPTFUNC_PARAMS);
505  void sfPreDialog(SCRIPTFUNC_PARAMS);
506  void sfKillActorThreads(SCRIPTFUNC_PARAMS);
507  void sfFaceTowards(SCRIPTFUNC_PARAMS);
508  void sfSetFollower(SCRIPTFUNC_PARAMS);
509  void sfScriptGotoScene(SCRIPTFUNC_PARAMS);
510  void sfSetObjImage(SCRIPTFUNC_PARAMS);
511  void sfSetObjName(SCRIPTFUNC_PARAMS);
512  void sfGetObjImage(SCRIPTFUNC_PARAMS);
513  void sfGetNumber(SCRIPTFUNC_PARAMS);
514  void sfScriptOpenDoor(SCRIPTFUNC_PARAMS);
515  void sfScriptCloseDoor(SCRIPTFUNC_PARAMS);
516  void sfSetBgdAnimSpeed(SCRIPTFUNC_PARAMS);
517  void sfCycleColors(SCRIPTFUNC_PARAMS);
518  void sfDoCenterActor(SCRIPTFUNC_PARAMS);
519  void sfStartBgdAnimSpeed(SCRIPTFUNC_PARAMS);
520  void sfScriptWalkToAsync(SCRIPTFUNC_PARAMS);
521  void sfEnableZone(SCRIPTFUNC_PARAMS);
522  void sfSetActorState(SCRIPTFUNC_PARAMS);
523  void sfScriptMoveTo(SCRIPTFUNC_PARAMS);
524  void sfSceneEq(SCRIPTFUNC_PARAMS);
525  void sfDropObject(SCRIPTFUNC_PARAMS);
526  void sfFinishBgdAnim(SCRIPTFUNC_PARAMS);
527  void sfSwapActors(SCRIPTFUNC_PARAMS);
528  void sfSimulSpeech(SCRIPTFUNC_PARAMS);
529  void sfScriptWalk(SCRIPTFUNC_PARAMS);
530  void sfCycleFrames(SCRIPTFUNC_PARAMS);
531  void sfSetFrame(SCRIPTFUNC_PARAMS);
532  void sfSetPortrait(SCRIPTFUNC_PARAMS);
533  void sfSetProtagPortrait(SCRIPTFUNC_PARAMS);
534  void sfChainBgdAnim(SCRIPTFUNC_PARAMS);
535  void sfScriptSpecialWalk(SCRIPTFUNC_PARAMS);
536  void sfPlaceActor(SCRIPTFUNC_PARAMS);
537  void sfCheckUserInterrupt(SCRIPTFUNC_PARAMS);
538  void sfScriptWalkRelative(SCRIPTFUNC_PARAMS);
539  void sfScriptMoveRelative(SCRIPTFUNC_PARAMS);
540  void sfSimulSpeech2(SCRIPTFUNC_PARAMS);
541  void sfPlacard(SCRIPTFUNC_PARAMS);
542  void sfPlacardOff(SCRIPTFUNC_PARAMS);
543  void sfSetProtagState(SCRIPTFUNC_PARAMS);
544  void sfResumeBgdAnim(SCRIPTFUNC_PARAMS);
545  void sfThrowActor(SCRIPTFUNC_PARAMS);
546  void sfWaitWalk(SCRIPTFUNC_PARAMS);
547  void sfScriptSceneID(SCRIPTFUNC_PARAMS);
548  void sfChangeActorScene(SCRIPTFUNC_PARAMS);
549  void sfScriptClimb(SCRIPTFUNC_PARAMS);
550  void sfSetDoorState(SCRIPTFUNC_PARAMS);
551  void sfSetActorZ(SCRIPTFUNC_PARAMS);
552  void sfScriptText(SCRIPTFUNC_PARAMS);
553  void sfGetActorX(SCRIPTFUNC_PARAMS);
554  void sfGetActorY(SCRIPTFUNC_PARAMS);
555  void sfEraseDelta(SCRIPTFUNC_PARAMS);
556  void sfPlayMusic(SCRIPTFUNC_PARAMS);
557  void sfPickClimbOutPos(SCRIPTFUNC_PARAMS);
558  void sfTossRif(SCRIPTFUNC_PARAMS);
559  void sfShowControls(SCRIPTFUNC_PARAMS);
560  void sfShowMap(SCRIPTFUNC_PARAMS);
561  void sfPuzzleWon(SCRIPTFUNC_PARAMS);
562  void sfEnableEscape(SCRIPTFUNC_PARAMS);
563  void sfPlaySound(SCRIPTFUNC_PARAMS);
564  void sfPlayLoopedSound(SCRIPTFUNC_PARAMS);
565  void sfGetDeltaFrame(SCRIPTFUNC_PARAMS);
566  void sfShowProtect(SCRIPTFUNC_PARAMS);
567  void sfProtectResult(SCRIPTFUNC_PARAMS);
568  void sfRand(SCRIPTFUNC_PARAMS);
569  void sfFadeMusic(SCRIPTFUNC_PARAMS);
570  void sfScriptStartCutAway(SCRIPTFUNC_PARAMS);
571  void sfReturnFromCutAway(SCRIPTFUNC_PARAMS);
572  void sfEndCutAway(SCRIPTFUNC_PARAMS);
573  void sfGetMouseClicks(SCRIPTFUNC_PARAMS);
574  void sfResetMouseClicks(SCRIPTFUNC_PARAMS);
575  void sfWaitFrames(SCRIPTFUNC_PARAMS);
576  void sfScriptFade(SCRIPTFUNC_PARAMS);
577  void sfPlayVoice(SCRIPTFUNC_PARAMS);
578  void sfVstopFX(SCRIPTFUNC_PARAMS);
579  void sfVstopLoopedFX(SCRIPTFUNC_PARAMS);
580  void sfDemoIsInteractive(SCRIPTFUNC_PARAMS);
581  void sfVsetTrack(SCRIPTFUNC_PARAMS);
582  void sfDebugShowData(SCRIPTFUNC_PARAMS);
583  void sfNull(SCRIPTFUNC_PARAMS);
584  void sfWaitFramesEsc(SCRIPTFUNC_PARAMS);
585  void sfPsychicProfile(SCRIPTFUNC_PARAMS);
586  void sfPsychicProfileOff(SCRIPTFUNC_PARAMS);
587  void sfSetSpeechBox(SCRIPTFUNC_PARAMS);
588  void sfSetChapterPoints(SCRIPTFUNC_PARAMS);
589  void sfSetPortraitBgColor(SCRIPTFUNC_PARAMS);
590  void sfScriptStartVideo(SCRIPTFUNC_PARAMS);
591  void sfScriptReturnFromVideo(SCRIPTFUNC_PARAMS);
592  void sfScriptEndVideo(SCRIPTFUNC_PARAMS);
593  void sfShowIHNMDemoHelpBg(SCRIPTFUNC_PARAMS);
594  void sfAddIHNMDemoHelpTextLine(SCRIPTFUNC_PARAMS);
595  void sfShowIHNMDemoHelpPage(SCRIPTFUNC_PARAMS);
596  void sfGetPoints(SCRIPTFUNC_PARAMS);
597  void sfSetGlobalFlag(SCRIPTFUNC_PARAMS);
598  void sfDemoSetInteractive(SCRIPTFUNC_PARAMS);
599  void sfClearGlobalFlag(SCRIPTFUNC_PARAMS);
600  void sfTestGlobalFlag(SCRIPTFUNC_PARAMS);
601  void sfSetPoints(SCRIPTFUNC_PARAMS);
602  void sfQueueMusic(SCRIPTFUNC_PARAMS);
603  void sfDisableAbortSpeeches(SCRIPTFUNC_PARAMS);
604 
605  void sfStub(const char *name, ScriptThread *thread, int nArgs);
606 };
607 
608 class SAGA1Script : public Script {
609 public:
610  SAGA1Script(SagaEngine *vm);
611  ~SAGA1Script() override;
612 };
613 
614 } // End of namespace Saga
615 
616 #endif
Definition: font.h:78
Definition: resource.h:105
Definition: saga.h:497
Definition: script.h:130
Definition: script.h:608
void warning(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
void clear()
Definition: array.h:320
Definition: script.h:405
Definition: script.h:156
Definition: saga.h:356
Definition: saga.h:464
Definition: script.h:272
void debug(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
Definition: actor.h:34
Definition: script.h:123
Definition: rect.h:45
void NORETURN_PRE error(MSVC_PRINTF const char *s,...) GCC_PRINTF(1