22 #ifndef TOLTECS_SCRIPT_H 23 #define TOLTECS_SCRIPT_H 25 #include "common/func.h" 29 const int kMaxScriptSlots = 50;
30 const int kScriptStackSize = 4096 + 4;
44 void loadScript(uint resIndex, uint slotIndex);
45 void setMainScript(uint slotIndex);
48 byte *getSlotData(
int slotIndex)
const {
return _slots[slotIndex].data; }
50 int16 getGameVar(uint variable);
51 void setGameVar(uint variable, int16 value);
56 void setSwitchLocalDataNear(
bool newValue) { _switchLocalDataNear = newValue; }
84 byte *_code, *_subCode, *_codeStart;
86 bool _switchLocalDataNear, _switchLocalDataFar, _switchLocalDataToStack;
97 void execOpcode(byte opcode);
99 void setupScriptFunctions();
100 void execScriptFunction(uint16 index);
102 byte arg8(int16 offset);
103 int16 arg16(int16 offset);
105 void pushInt16(int16 value);
108 void localWrite8(int16 offset, byte value);
109 byte localRead8(int16 offset);
110 void localWrite16(int16 offset, int16 value);
111 int16 localRead16(int16 offset);
112 byte *localPtr(int16 offset);
117 void sfUpdateScreen();
118 void sfGetRandomNumber();
119 void sfDrawGuiTextMulti();
120 void sfUpdateVerbLine();
121 void sfSetFontColor();
122 void sfGetTalkTextDuration();
124 void sfFindPaletteFragment();
125 void sfClearPaletteFragments();
126 void sfAddPaletteFragment();
127 void sfSetDeltaAnimPalette();
128 void sfSetUnkPaletteEffect();
129 void sfBuildColorTransTable();
130 void sfSetDeltaMainPalette();
132 void sfRegisterFont();
133 void sfLoadAddPalette();
135 void sfSetGuiHeight();
136 void sfFindMouseInRectIndex1();
137 void sfFindMouseInRectIndex2();
138 void sfDrawGuiImage();
139 void sfAddAnimatedSpriteNoLoop();
140 void sfAddAnimatedSprite();
141 void sfAddStaticSprite();
142 void sfAddAnimatedSpriteScaled();
145 void sfScrollCameraUp();
146 void sfScrollCameraDown();
147 void sfScrollCameraLeft();
148 void sfScrollCameraRight();
149 void sfScrollCameraUpEx();
150 void sfScrollCameraDownEx();
151 void sfScrollCameraLeftEx();
152 void sfScrollCameraRightEx();
154 void sfGetCameraChanged();
155 void sfGetRgbModifiertAtPoint();
157 void sfAnimNextFrame();
158 void sfGetAnimFrameNumber();
159 void sfGetAnimStatus();
160 void sfStartShakeScreen();
161 void sfStopShakeScreen();
162 void sfStartSequence();
163 void sfEndSequence();
164 void sfSetSequenceVolume();
165 void sfPlayPositionalSound();
167 void sfClearScreen();
168 void sfHandleInput();
169 void sfRunOptionsScreen();
170 void sfPrecacheSprites();
171 void sfPrecacheSounds1();
172 void sfDeletePrecachedFiles();
173 void sfPrecacheSounds2();
174 void sfRestoreStackPtr();
175 void sfSaveStackPtr();
Definition: animation.h:28