22 #ifndef LILLIPUT_SCRIPT_H 23 #define LILLIPUT_SCRIPT_H 25 #include "common/memstream.h" 26 #include "common/stack.h" 27 #include "common/random.h" 28 #include "common/rect.h" 30 #include "lilliput/stream.h" 75 byte _characterScriptEnabled[40];
76 int8 _interfaceHotspotStatus[20];
78 int8 _characterNextSequence[40];
79 int8 _characterPose[40];
80 byte _interfaceButtonActivationDelay[20];
82 byte _characterSeek[40];
83 int16 _interactions[40 * 40];
88 int16 _viewportCharacterTarget;
89 int16 _talkingCharacter;
91 int _heroismBarBottomY;
94 byte _characterMapPixelColor[40];
95 int8 _characterLastSequence[40];
112 byte _byte16F05_ScriptHandler;
114 byte _lastRandomValue;
117 byte _speechDisplaySpeed;
119 int16 _word16F00_characterId;
120 int _currentSpeechId;
122 int _monitoredCharacter;
125 char _monitoredAttr[4];
128 byte handleOpcodeType1(
int curWord);
129 void handleOpcodeType2(
int curWord);
131 void enableCharacterScript(byte index, byte var1, byte *curBufPtr);
132 void skipOpcodes(
int var1);
133 void copySequence(
int index, byte *buf);
134 void setSequence(
int charIdx, int8 seqIdx);
135 void checkSpeechAllowed(
bool &forceReturnFl);
136 void decodePackedText(
char *buf);
137 void startSpeech(
int var);
140 byte *getCurrentCharacterVarFromScript();
141 void sendSignal(int16 var1, byte var2h, byte characterId, int16 var4);
142 void getSpeechVariant(
int speechIndex,
int speechVariant);
144 void formatSpeechString();
146 int getPackedStringStartRelativeIndex(
int index);
151 byte *getCharacterAttributesPtr();
152 byte compareValues(int16 var1, uint16 oper, int16 var2);
153 void computeOperation(byte *bufPtr, uint16 oper, int16 var2);
156 byte OC_checkCharacterGoalPos();
157 byte OC_comparePos();
158 byte OC_checkIsoMap3();
159 byte OC_compareCharacterVariable();
160 byte OC_CompareLastRandomValue();
163 byte OC_compCurrentSpeechId();
164 byte OC_checkSaveFlag();
165 byte OC_compScriptForVal();
166 byte OC_isCarrying();
167 byte OC_CompareCharacterVariables();
168 byte OC_compareCoords_1();
169 byte OC_compareCoords_2();
170 byte OC_CompareDistanceFromCharacterToPositionWith();
171 byte OC_compareRandomCharacterId();
172 byte OC_IsCurrentCharacterIndex();
173 byte OC_hasVisibilityLevel();
174 byte OC_hasGainedVisibilityLevel();
175 byte OC_hasReducedVisibilityLevel();
177 byte OC_isSequenceActive();
178 byte OC_isSequenceFinished();
179 byte OC_CompareMapValueWith();
180 byte OC_IsCharacterValid();
181 byte OC_CheckWaitingSignal();
182 byte OC_CurrentCharacterVar0AndVar1Equals();
183 byte OC_CurrentCharacterVar0Equals();
184 byte OC_checkLastInterfaceHotspotIndexMenu13();
185 byte OC_checkLastInterfaceHotspotIndexMenu2();
186 byte OC_CompareNumberOfCharacterWithVar0Equals();
187 byte OC_IsPositionInViewport();
188 byte OC_CompareGameVariables();
189 byte OC_skipNextOpcode();
190 byte OC_CheckCurrentCharacterAttr2();
191 byte OC_CheckCurrentCharacterType();
192 byte OC_CheckCurrentCharacterAttr0And();
193 byte OC_IsCurrentCharacterAttr0LessEqualThan();
195 byte OC_CheckCurrentCharacterAttr1();
196 byte OC_isCurrentCharacterSpecial();
197 byte OC_CurrentCharacterAttr3Equals1();
198 byte OC_checkCharacterDirection();
199 byte OC_checkLastInterfaceHotspotIndex();
200 byte OC_checkSelectedCharacter();
201 byte OC_checkDelayedReactivation();
202 byte OC_checkTargetReached();
203 byte OC_checkFunctionKeyPressed();
204 byte OC_checkCodeEntered();
205 byte OC_checkViewPortCharacterTarget();
208 void OC_setWord18821();
209 void OC_ChangeIsoMap();
210 void OC_startSpeech();
211 void OC_getComputedVariantSpeech();
212 void OC_getRotatingVariantSpeech();
213 void OC_startSpeechIfMute();
214 void OC_getComputedVariantSpeechIfMute();
215 void OC_startSpeechIfSilent();
216 void OC_ComputeCharacterVariable();
217 void OC_setAttributeToRandom();
218 void OC_setCharacterPosition();
219 void OC_DisableCharacter();
220 void OC_saveAndQuit();
221 void OC_nSkipOpcodes();
222 void OC_startSpeech5();
223 void OC_resetHandleOpcodeFlag();
224 void OC_deleteSavegameAndQuit();
225 void OC_incScriptForVal();
226 void OC_computeChararacterAttr();
227 void OC_setTextVarNumber();
228 void OC_callScript();
229 void OC_callScriptAndReturn();
230 void OC_setCurrentScriptCharacterPos();
231 void OC_initScriptFor();
232 void OC_setCurrentCharacterSequence();
233 void OC_setNextCharacterSequence();
235 void OC_changeMapCube();
236 void OC_setCharacterCarry();
237 void OC_dropCarried();
238 void OC_setCurrentCharacter();
239 void OC_sendSeeSignal();
240 void OC_sendHearSignal();
241 void OC_sendVarSignal();
242 void OC_sendBroadcastSignal();
243 void OC_resetWaitingSignal();
244 void OC_enableCurrentCharacterScript();
245 void OC_IncCurrentCharacterVar1();
246 void OC_setCurrentCharacterPos();
247 void OC_setCurrentCharacterBehavior();
248 void OC_changeCurrentCharacterSprite();
251 void OC_setCharacterDirectionTowardsPos();
252 void OC_turnCharacterTowardsAnother();
254 void OC_scrollAwayFromCharacter();
255 void OC_skipNextVal();
256 void OC_setCurrentCharacterAttr6();
257 void OC_setCurrentCharacterPose();
258 void OC_setCharacterScriptEnabled();
259 void OC_setCurrentCharacterAttr2();
260 void OC_clearCurrentCharacterAttr2();
261 void OC_setCharacterProperties();
262 void OC_setMonitoredCharacter();
263 void OC_setNewPose();
264 void OC_setCurrentCharacterDirection();
265 void OC_setInterfaceHotspot();
266 void OC_scrollViewPort();
267 void OC_setViewPortPos();
268 void OC_setCurrentCharacterAltitude();
269 void OC_setModePriority();
271 void OC_setComputedModePriority();
272 void OC_selectBestMode();
273 void OC_magicPuffEntrance();
274 void OC_spawnCharacterAtPos();
275 void OC_CharacterVariableAddOrRemoveFlag();
276 void OC_PaletteFadeOut();
277 void OC_PaletteFadeIn();
278 void OC_loadAndDisplayCubesGfx();
279 void OC_setCurrentCharacterAttr3();
280 void OC_setArray122C1();
282 void OC_enableCharacterScript();
283 void OC_setRulesBuffer2Element();
284 void OC_setDebugFlag();
285 void OC_setDebugFlag2();
286 void OC_waitForEvent();
287 void OC_disableInterfaceHotspot();
288 void OC_loadFileAerial();
289 void OC_startSpeechIfSoundOff();
291 void OC_displayNumericCharacterVariable();
292 void OC_displayVGAFile();
293 void OC_startSpeechWithoutSpeeker();
294 void OC_displayTitleScreen();
295 void OC_initGameAreaDisplay();
296 void OC_displayCharacterStatBar();
297 void OC_initSmallAnim();
298 void OC_setCharacterHeroismBar();
299 void OC_setCharacterHome();
300 void OC_setViewPortCharacterTarget();
301 void OC_showObject();
302 void OC_playObjectSound();
303 void OC_startLocationSound();
304 void OC_stopObjectSound();
305 void OC_stopLocationSound();
306 void OC_toggleSound();
309 void OC_setCharacterMapColor();
Definition: lilliput.h:83