31 #include "common/func.h" 32 #include "common/hashmap.h" 34 #include "gob/goblin.h" 35 #include "gob/variables.h" 36 #include "gob/iniconfig.h" 37 #include "gob/databases.h" 54 #ifndef REDUCE_MEMORY_USAGE 55 #define _OPCODEDRAW(ver, x) setProc(new Common::Functor0Mem<void, ver>(this, &ver::x), #x) 56 #define _OPCODEFUNC(ver, x) setProc(new Common::Functor1Mem<OpFuncParams &, void, ver>(this, &ver::x), #x) 57 #define _OPCODEGOB(ver, x) setProc(new Common::Functor1Mem<OpGobParams &, void, ver>(this, &ver::x), #x) 59 #define _OPCODEDRAW(ver, x) setProc(new Common::Functor0Mem<void, ver>(this, &ver::x), "") 60 #define _OPCODEFUNC(ver, x) setProc(new Common::Functor1Mem<OpFuncParams &, void, ver>(this, &ver::x), "") 61 #define _OPCODEGOB(ver, x) setProc(new Common::Functor1Mem<OpGobParams &, void, ver>(this, &ver::x), "") 64 #define CLEAROPCODEDRAW(i) _opcodesDraw[i].setProc(0, 0) 65 #define CLEAROPCODEFUNC(i) _opcodesFunc[i].setProc(0, 0) 66 #define CLEAROPCODEGOB(i) _opcodesGob.erase(i) 95 void setProc(T *p,
const char *d) {
108 int16 *_breakFromLevel;
111 uint32 _soundEndTimeKey;
118 void initControlVars(
char full);
119 void renewTimeInVars();
121 void storeKey(int16 key);
123 void writeVar(uint32 offset, uint16 type, uint32 value);
125 void funcBlock(int16 retFlag);
126 void callSub(int16 retFlag);
128 void allocateVars(uint32 count);
131 virtual int16 loadSound(int16 slot) = 0;
132 virtual void animPalette() = 0;
144 int16 _animPalLowIndex[8];
145 int16 _animPalHighIndex[8];
146 int16 _animPalDir[8];
152 uint32 _lastBusyWait;
156 void executeOpcodeDraw(byte i);
157 void executeOpcodeFunc(byte i, byte j,
OpFuncParams ¶ms);
160 const char *getDescOpcodeDraw(byte i);
161 const char *getDescOpcodeFunc(byte i, byte j);
162 const char *getDescOpcodeGob(
int i);
164 virtual void setupOpcodesDraw() = 0;
165 virtual void setupOpcodesFunc() = 0;
166 virtual void setupOpcodesGob() = 0;
168 virtual void checkSwitchTable(uint32 &offset) = 0;
174 void storeValue(uint16 index, uint16 type, uint32 value);
175 void storeValue(uint32 value);
177 void storeString(uint16 index, uint16 type,
const char *value);
178 void storeString(
const char *value);
180 uint32 readValue(uint16 index, uint16 type);
182 void handleBusyWait();
190 int16 loadSound(int16 slot)
override;
191 void animPalette()
override;
194 void setupOpcodesDraw()
override;
195 void setupOpcodesFunc()
override;
196 void setupOpcodesGob()
override;
198 void checkSwitchTable(uint32 &offset)
override;
202 void o1_freeMultKeys();
203 void o1_initCursor();
204 void o1_initCursorAnim();
205 void o1_clearCursorAnim();
206 void o1_setRenderFlags();
209 void o1_updateAnim();
213 void o1_loadMultObject();
214 void o1_getAnimLayerInfo();
215 void o1_getObjAnimSize();
216 void o1_loadStatic();
217 void o1_freeStatic();
218 void o1_renderStatic();
219 void o1_loadCurLayer();
220 void o1_playCDTrack();
221 void o1_getCDTrackPos();
223 void o1_loadFontToSprite();
224 void o1_freeFontToSprite();
315 void o1_manipulateMapIndirect(
OpGobParams ¶ms);
353 void manipulateMap(int16 xPos, int16 yPos, int16 item);
356 bool _ignoreSpeakerOff =
false;
365 void setupOpcodesDraw()
override;
366 void setupOpcodesFunc()
override;
367 void setupOpcodesGob()
override;
386 int16 loadSound(int16 slot)
override;
400 int16 loadSound(int16 search)
override;
401 void animPalette()
override;
404 void setupOpcodesDraw()
override;
405 void setupOpcodesFunc()
override;
406 void setupOpcodesGob()
override;
408 void checkSwitchTable(uint32 &offset)
override;
411 void o2_freeMultKeys();
412 void o2_setRenderFlags();
415 void o2_loadMultObject();
416 void o2_renderStatic();
417 void o2_loadCurLayer();
418 void o2_playCDTrack();
419 void o2_waitCDTrackEnd();
423 void o2_getCDTrackPos();
424 void o2_loadFontToSprite();
426 void o2_switchTotSub();
429 void o2_loadMapObjects();
430 void o2_freeGoblins();
431 void o2_moveGoblin();
432 void o2_writeGoblinPos();
433 void o2_stopGoblin();
434 void o2_setGoblinState();
435 void o2_placeGoblin();
436 void o2_initScreen();
438 void o2_setScrollOffset();
440 void o2_getImdInfo();
443 void o2_setImdFrontSurf();
444 void o2_resetImdFrontSurf();
473 void setupOpcodesDraw()
override;
474 void setupOpcodesFunc()
override;
475 void setupOpcodesGob()
override;
495 void setupOpcodesDraw()
override;
496 void setupOpcodesFunc()
override;
497 void setupOpcodesGob()
override;
519 void oFascin_setWinSize();
520 void oFascin_closeWin();
521 void oFascin_activeWin();
522 void oFascin_openWin();
523 void oFascin_initCursorAnim();
524 void oFascin_setRenderFlags();
525 void oFascin_setWinFlags();
534 void setupOpcodesDraw()
override;
535 void setupOpcodesFunc()
override;
536 void setupOpcodesGob()
override;
548 void setupOpcodesDraw()
override;
549 void setupOpcodesFunc()
override;
550 void setupOpcodesGob()
override;
554 void oAdibou1_fillAreaAtPoint(
OpGobParams ¶ms);
555 void oAdibou1_getAppliNameFromId(
OpGobParams ¶ms);
556 void oAdibou1_listApplications(
OpGobParams ¶ms);
565 void setupOpcodesDraw()
override;
566 void setupOpcodesFunc()
override;
567 void setupOpcodesGob()
override;
576 bool _ignoreSpeakerOff;
585 void setupOpcodesDraw()
override;
586 void setupOpcodesFunc()
override;
587 void setupOpcodesGob()
override;
599 void setupOpcodesDraw()
override;
600 void setupOpcodesFunc()
override;
601 void setupOpcodesGob()
override;
603 void o4_initScreen();
604 void o4_playVmdOrMusic();
615 void setupOpcodesDraw()
override;
616 void setupOpcodesFunc()
override;
617 void setupOpcodesGob()
override;
619 void o5_deleteFile();
620 void o5_initScreen();
648 bool _gotFirstPalette;
650 void setupOpcodesDraw()
override;
651 void setupOpcodesFunc()
override;
652 void setupOpcodesGob()
override;
655 void o6_playVmdOrMusic();
671 void setupOpcodesDraw()
override;
672 void setupOpcodesFunc()
override;
673 void setupOpcodesGob()
override;
682 void oPlaytoons_loadMultObject();
683 void oPlaytoons_getObjAnimSize();
684 void oPlaytoons_CD_20_23();
685 void oPlaytoons_CD_25();
686 void oPlaytoons_copyFile();
687 void oPlaytoons_openItk();
691 bool readSprite(
Common::String file, int32 dataVar, int32 size, int32 offset);
700 void setupOpcodesDraw()
override;
701 void setupOpcodesFunc()
override;
702 void setupOpcodesGob()
override;
705 void o7_setCursorToLoadFromExec();
707 void o7_loadMultObject();
709 void o7_displayWarning();
711 void o7_moveGoblin();
712 void o7_setGoblinState();
713 void o7_intToString();
714 void o7_callFunction();
715 void o7_loadFunctions();
718 void o7_deleteFile();
719 void o7_playVmdOrMusic();
720 void o7_initScreen();
721 void o7_setActiveCD();
723 void o7_findNextFile();
724 void o7_getSystemProperty();
728 void o7_getINIValue();
729 void o7_setINIValue();
730 void o7_loadIFFPalette();
732 void o7_closedBase();
733 void o7_getDBString();
763 #endif // GOB_INTER_H
Definition: variables.h:33
Definition: variables.h:166
Definition: noncopyable.h:39
Definition: algorithm.h:29
Definition: variables.h:133
Definition: databases.h:40
Definition: penetration.h:51
Definition: iniconfig.h:37