ScummVM API documentation
dreamweb.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 #ifndef DREAMWEB_DREAMWEB_H
23 #define DREAMWEB_DREAMWEB_H
24 
25 #include "common/error.h"
26 #include "common/keyboard.h"
27 #include "common/random.h"
28 #include "common/rect.h"
29 #include "common/scummsys.h"
30 #include "common/system.h"
31 
32 #include "engines/engine.h"
33 
34 #include "graphics/surface.h"
35 
36 #include "dreamweb/console.h"
37 
38 #include "dreamweb/structs.h"
39 
40 #define SCUMMVM_HEADER MKTAG('S', 'C', 'V', 'M')
41 #define SCUMMVM_BLOCK_MAGIC_SIZE 0x1234
42 #define SAVEGAME_VERSION 1
43 
44 namespace Common {
45 class File;
46 }
47 
48 namespace DreamWeb {
49 
50 const unsigned int kNumReelRoutines = 57;
51 const unsigned int kUnderTextSizeX = 180;
52 const unsigned int kUnderTextSizeY = 10;
53 const unsigned int kUnderTimedTextSizeY = 24;
54 const unsigned int kUnderTextSizeX_f = 228; // foreign version
55 const unsigned int kUnderTextSizeY_f = 13; // foreign version
56 const unsigned int kUnderTimedTextSizeY_f = 30;
57 const unsigned int kUnderTextBufSize = kUnderTextSizeX_f * kUnderTextSizeY_f;
58 const unsigned int kUnderTimedTextBufSize = 256 * kUnderTimedTextSizeY_f;
59 const unsigned int kLengthOfVars = 68;
60 const unsigned int kNumChanges = 250;
61 const unsigned int kLenOfMapStore = 22*8*20*8;
62 const unsigned int kMapWidth = 66;
63 const unsigned int kMapHeight = 60;
64 const unsigned int kLengthOfMap = kMapWidth * kMapHeight;
65 const unsigned int kNumExObjects = 114;
66 const unsigned int kScreenwidth = 320;
67 const unsigned int kScreenheight = 200;
68 const unsigned int kDiaryx = (68+24);
69 const unsigned int kDiaryy = (48+12);
70 const unsigned int kInventx = 80;
71 const unsigned int kInventy = 58;
72 const unsigned int kMenux = (80+40);
73 const unsigned int kMenuy = 60;
74 const unsigned int kOpsx = 60;
75 const unsigned int kOpsy = 52;
76 const unsigned int kSymbolx = 64;
77 const unsigned int kSymboly = 56;
78 const unsigned int kLengthofvars = 68;
79 const unsigned int kFrameBlocksize = 2080;
80 const unsigned int kGraphicsFileFrameSize = 347; // ceil(2080 / sizeof(Frame))
81 const unsigned int kNumexobjects = 114;
82 const unsigned int kNumExTexts = kNumexobjects + 2;
83 const uint16 kExtextlen = 18000;
84 const uint16 kExframeslen = 30000;
85 const unsigned int kLengthofextra = kFrameBlocksize + kExframeslen + sizeof(DynObject)*kNumexobjects + sizeof(uint16)*kNumExTexts + kExtextlen;
86 const unsigned int kItempicsize = 44;
87 const unsigned int kNumSetTexts = 130;
88 const unsigned int kNumBlockTexts = 98;
89 const unsigned int kNumRoomTexts = 38;
90 const unsigned int kNumFreeTexts = 82;
91 const unsigned int kNumPersonTexts = 1026;
92 
93 // Engine Debug Flags
94 enum {
95  kDebugAnimation = (1 << 0),
96  kDebugSaveLoad = (1 << 1)
97 };
98 
99 struct DreamWebGameDescription;
100 class DreamWebSound;
101 
102 class DreamWebEngine : public Engine {
103 private:
104  DreamWebSound *_sound;
105  uint32 _vSyncPrevTick;
106 
107 protected:
108  // Engine APIs
109  Common::Error run() override;
110  bool hasFeature(EngineFeature f) const override;
111  void pauseEngineIntern(bool pause) override;
112 
113 public:
114  DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gameDesc);
115  ~DreamWebEngine() override;
116 
117  void waitForVSync();
118 
119  Common::Error loadGameState(int slot) override;
120  Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
121 
122  uint8 randomNumber() { return _rnd.getRandomNumber(255); }
123 
124  void mouseCall(uint16 *x, uint16 *y, uint16 *state); //fill mouse pos and button state
125  void processEvents(bool processSoundEvents = true);
126  void blit(const uint8 *src, int pitch, int x, int y, int w, int h);
127  void cls();
128  bool isCD();
129  bool hasSpeech();
130 
131  void getPalette(uint8 *data, uint start, uint count);
132  void setPalette(const uint8 *data, uint start, uint count);
133 
134  Common::String getSavegameFilename(int slot) const;
135 
136  void setShakePos(int pos) { _system->setShakePos(0, pos); }
137  void printUnderMonitor();
138 
139  void quit();
140 
141  Common::Language getLanguage() const;
142  uint8 modifyChar(uint8 c) const;
143  Common::Path modifyFileName(const char *);
144 
145  const Common::String& getDatafilePrefix() { return _datafilePrefix; }
146  const Common::Path& getSpeechDirName() { return _speechDirName; }
147 
148 private:
149  // Keyboard buffer. _bufferIn and _bufferOut are indexes
150  // into this, making it a ring buffer
151  uint8 _keyBuffer[16];
152  uint16 _bufferIn;
153  uint16 _bufferOut;
154 
155  void keyPressed(uint16 ascii);
156  void setSpeed(uint speed);
157 
158  const DreamWebGameDescription *_gameDescription;
159  Graphics::Surface _thumbnail;
161  Common::String _datafilePrefix;
162  Common::Path _speechDirName;
163 
164  uint _speed;
165  bool _turbo;
166  uint _oldMouseState;
167 
168 protected:
169  GameVars _vars; // saved variables
170 
171  // from backdrop.cpp
172  uint8 *_backdropBlocks;
173  BackdropMapFlag _backdropFlags[96];
174  uint8 _mapData[kLengthOfMap + 32];
175 
176  // from keypad.cpp
177  uint8 _pressList[6];
178  uint8 _pressed;
179  uint16 _pressPointer;
180  uint8 _graphicPress;
181  uint8 _pressCount;
182  uint8 _lightCount;
183  uint8 _folderPage;
184  uint8 _diaryPage;
185  uint8 _menuCount;
186  uint8 _symbolTopX;
187  uint8 _symbolTopNum;
188  int8 _symbolTopDir;
189  uint8 _symbolBotX;
190  uint8 _symbolBotNum;
191  int8 _symbolBotDir;
192 
193  // from monitor.cpp
194  char _inputLine[64];
195  char _operand1[64];
196  char _currentFile[14];
197 
198  // from newplace.cpp
199  uint8 _roomsCanGo[16];
200 
201  // from object.cpp
202  uint16 _openChangeSize;
203  ObjectRef _oldSubject;
204 
205  // from pathfind.cpp
206  Common::Point _lineData[200]; // Output of Bresenham
207 
208  // from saveload.cpp
209  char _saveNames[17*21];
210  char _saveNamesOld[17*21];
211 
212  // from vgagrafx.cpp
213  uint8 _workspace[(0x1000 + 2) * 16];
214  uint8 _mapStore[kLenOfMapStore + 32];
215 
216  // from people.cpp
217  ReelRoutine _reelRoutines[kNumReelRoutines+1];
218  ReelRoutine *_personData;
219 
220  // from Buffers
221  uint8 _textUnder[kUnderTextBufSize];
222  ObjectRef _openInvList[16];
223  ObjectRef _ryanInvList[30];
224  uint8 _pointerBack[32*32];
225  MapFlag _mapFlags[11*10];
226  uint8 _startPal[3*256];
227  uint8 _endPal[3*256];
228  uint8 _mainPal[3*256];
229  Common::List<Sprite> _spriteTable;
230  Common::List<ObjPos> _setList;
231  Common::List<ObjPos> _freeList;
232  Common::List<ObjPos> _exList;
233  Common::List<People> _peopleList;
234  uint8 _zoomSpace[46*40];
235  Change _listOfChanges[kNumChanges]; // Note: this array is saved
236  uint8 _underTimedText[kUnderTimedTextBufSize];
237  Common::List<Rain> _rainList;
238 
239  // textfiles
240  TextFile _textFile1;
241  TextFile _textFile2;
242  TextFile _textFile3;
243  TextFile _travelText;
244  TextFile _puzzleText;
245  TextFile _commandText;
246 
247  // local graphics files
248  GraphicsFile _keypadGraphics;
249  GraphicsFile _menuGraphics;
250  GraphicsFile _menuGraphics2;
251  GraphicsFile _folderGraphics;
252  GraphicsFile _folderGraphics2;
253  GraphicsFile _folderGraphics3;
254  GraphicsFile _folderCharset;
255  GraphicsFile _symbolGraphics;
256  GraphicsFile _diaryGraphics;
257  GraphicsFile _diaryCharset;
258  GraphicsFile _monitorGraphics;
259  GraphicsFile _monitorCharset;
260  GraphicsFile _newplaceGraphics;
261  GraphicsFile _newplaceGraphics2;
262  GraphicsFile _newplaceGraphics3;
263  GraphicsFile _cityGraphics;
264  GraphicsFile _saveGraphics;
265 
266  // global graphics files
267  GraphicsFile _icons1;
268  GraphicsFile _icons2;
269  GraphicsFile _charset1;
270  GraphicsFile _mainSprites;
271  const GraphicsFile *_currentCharset;
272 
273  // room files
274  GraphicsFile _setFrames;
275  GraphicsFile _freeFrames;
276  GraphicsFile _reel1;
277  GraphicsFile _reel2;
278  GraphicsFile _reel3;
279  TextFile _setDesc;
280  TextFile _blockDesc;
281  TextFile _roomDesc;
282  TextFile _freeDesc;
283  TextFile _personText;
284  uint16 _personFramesLE[12];
285  RoomPaths _pathData[36];
286  Reel *_reelList;
287  SetObject _setDat[128];
288  DynObject _freeDat[80];
289 
290  // Extras segment (NB: this is saved)
291  GraphicsFile _exFrames;
292  DynObject _exData[kNumExObjects];
293  TextFile _exText;
294 
295 public:
296  bool _quitRequested;
297  bool _subtitles;
298  bool _foreignRelease;
299 
300  bool _wonGame;
301  bool _hasSpeech;
302 
303  // sound related
304  uint8 _roomsSample;
305  bool _speechLoaded;
306 
307  // misc variables
308  uint8 _speechCount;
309  uint16 _charShift;
310  bool _brightPalette;
311  bool _copyProtection;
312  uint8 _roomLoaded;
313  uint8 _didZoom;
314  uint16 _lineSpacing;
315  uint16 _textAddressX;
316  uint16 _textAddressY;
317  uint8 _textLen;
318  uint16 _lastXPos;
319  uint8 _itemFrame;
320  uint8 _withObject;
321  uint8 _withType;
322  uint16 _lookCounter;
323  uint8 _command;
324  uint8 _commandType;
325  uint8 _objectType;
326  uint8 _getBack;
327  uint8 _invOpen;
328  uint8 _mainMode;
329  uint8 _pickUp;
330  uint8 _lastInvPos;
331  uint8 _examAgain;
332  uint8 _newTextLine;
333  uint8 _openedOb;
334  uint8 _openedType;
335  uint16 _mapAdX;
336  uint16 _mapAdY;
337  uint16 _mapOffsetX;
338  uint16 _mapOffsetY;
339  uint16 _mapXStart;
340  uint16 _mapYStart;
341  uint8 _mapXSize;
342  uint8 _mapYSize;
343  uint8 _haveDoneObs;
344  uint8 _manIsOffScreen;
345  uint8 _facing;
346  uint8 _leaveDirection;
347  uint8 _turnToFace;
348  uint8 _turnDirection;
349  uint16 _mainTimer;
350  uint8 _introCount;
351  uint8 _currentKey;
352  uint8 _timerCount;
353  uint8 _mapX;
354  uint8 _mapY;
355  uint8 _ryanX;
356  uint8 _ryanY;
357  uint8 _lastFlag;
358  uint8 _destPos;
359  uint8 _realLocation;
360  uint8 _roomNum;
361  uint8 _nowInNewRoom;
362  uint8 _resetManXY;
363  uint8 _newLocation;
364  uint8 _autoLocation;
365  uint16 _mouseX;
366  uint16 _mouseY;
367  uint16 _mouseButton;
368  uint16 _oldButton;
369  uint16 _oldX;
370  uint16 _oldY;
371  uint16 _oldPointerX;
372  uint16 _oldPointerY;
373  uint16 _delHereX;
374  uint16 _delHereY;
375  uint8 _pointerXS;
376  uint8 _pointerYS;
377  uint8 _delXS;
378  uint8 _delYS;
379  uint8 _pointerFrame;
380  uint8 _pointerPower;
381  uint8 _pointerMode;
382  uint8 _pointerSpeed;
383  uint8 _pointerCount;
384  uint8 _inMapArea;
385  uint8 _talkMode;
386  uint8 _talkPos;
387  uint8 _character;
388  uint8 _watchDump;
389  uint8 _logoNum;
390  uint8 _oldLogoNum;
391  uint8 _walkAndExam;
392  uint8 _walkExamType;
393  uint8 _walkExamNum;
394  uint16 _cursLocX;
395  uint16 _cursLocY;
396  uint16 _curPos;
397  uint16 _monAdX;
398  uint16 _monAdY;
399  uint16 _timeCount;
400  uint8 _needToDumpTimed;
401  TimedTemp _previousTimedTemp;
402  TimedTemp _timedTemp;
403  uint8 _loadingOrSave;
404  uint8 _saveLoadPage;
405  uint8 _currentSlot;
406  uint8 _cursorPos;
407  uint8 _colorPos;
408  uint8 _fadeDirection;
409  uint8 _numToFade;
410  uint8 _fadeCount;
411  uint8 _addToGreen;
412  uint8 _addToRed;
413  uint8 _addToBlue;
414  uint16 _lastSoundReel;
415  Common::KeyCode _lastHardKey;
416  uint8 _blinkFrame;
417  uint8 _blinkCount;
418  uint8 _reAssesChanges;
419  uint8 _pointersPath;
420  uint8 _mansPath;
421  uint8 _pointerFirstPath;
422  uint8 _finalDest;
423  uint8 _destination;
424  uint16 _lineStartX;
425  uint16 _lineStartY;
426  uint16 _lineEndX;
427  uint16 _lineEndY;
428  uint8 _linePointer;
429  uint8 _lineDirection;
430  uint8 _lineLength;
431 
432  Common::String _lastText;
434  Common::CodePage _textEncoding;
435 
436  // from backdrop.cpp
437  void doBlocks();
438  uint8 getXAd(const uint8 *setData, uint8 *result);
439  uint8 getYAd(const uint8 *setData, uint8 *result);
440  uint8 getMapAd(const uint8 *setData, uint16 *x, uint16 *y);
441  void calcFrFrame(const Frame &frame, uint8* width, uint8* height, uint16 x, uint16 y, ObjPos *objPos);
442  void makeBackOb(SetObject *objData, uint16 x, uint16 y);
443  void showAllObs();
444  void getDimension(uint8 *mapXstart, uint8 *mapYstart, uint8 *mapXsize, uint8 *mapYsize);
445  void calcMapAd();
446  void showAllFree();
447  void drawFlags();
448  void showAllEx();
449 
450  // from keypad.cpp
451  void getUnderMenu();
452  void putUnderMenu();
453  void singleKey(uint8 key, uint16 x, uint16 y);
454  void loadKeypad();
455  void showKeypad();
456  bool isItRight(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3);
457  void addToPressList();
458  void buttonOne();
459  void buttonTwo();
460  void buttonThree();
461  void buttonFour();
462  void buttonFive();
463  void buttonSix();
464  void buttonSeven();
465  void buttonEight();
466  void buttonNine();
467  void buttonNought();
468  void buttonEnter();
469  void buttonPress(uint8 buttonId);
470  void showOuterPad();
471  void dumpKeypad();
472  void dumpSymbol();
473  void quitSymbol();
474  void enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3);
475 
476  // from monitor.cpp
477  void input();
478  byte makeCaps(byte c);
479  void delChar();
480  void monMessage(uint8 index);
481  void netError();
482  void monitorLogo();
483  void randomAccess(uint16 count);
484  void printOuterMon();
485  void showCurrentFile();
486  void accessLightOn();
487  void accessLightOff();
488  void turnOnPower();
489  void powerLightOn();
490  void powerLightOff();
491  void printLogo();
492  void scrollMonitor();
493  const char *monPrint(const char *string);
494  void lockLightOn();
495  void lockLightOff();
496  void loadPersonal();
497  void loadNews();
498  void loadCart();
499  void showKeys();
500  const char *parser();
501  const char *searchForString(const char *topic, const char *text);
502  const char *getKeyAndLogo(const char *foundString);
503  void read();
504  void dirFile(const char *dirName);
505  void dirCom();
506  void useMon();
507  bool execCommand();
508  int findCommand(const char *const cmdList[]);
509 
510  // from newplace.cpp
511  void getUnderCenter();
512  void putUnderCenter();
513  void showArrows();
514  uint8 getLocation(uint8 index);
515  void setLocation(uint8 index);
516  void clearLocation(uint8 index);
517  void resetLocation(uint8 index);
518  void readCityPic();
519  void readDestIcon();
520  void showCity();
521  void locationPic();
522  void selectLocation();
523  void newPlace();
524  void nextDest();
525  void lastDest();
526  void destSelect();
527  void lookAtPlace();
528 
529  // from object.cpp
530  void obIcons();
531  void fillRyan();
532  void findAllRyan();
533  void obToInv(uint8 index, uint8 flag, uint16 x, uint16 y);
534  void obPicture();
535  void removeObFromInv();
536  void deleteExObject(uint8 index);
537  void deleteExFrame(uint8 frameNum);
538  void deleteExText(uint8 textNum);
539  void purgeALocation(uint8 index);
540  const uint8 *getObTextStart();
541  void wornError();
542  void makeWorn(DynObject *object);
543  void dropObject();
544  ObjectRef findOpenPos();
545  byte getOpenedSlotSize();
546  byte getOpenedSlotCount();
547  void openOb();
548  void findAllOpen();
549  void fillOpen();
550  ObjectRef findInvPos();
551  void reExFromInv();
552  void swapWithInv();
553  void transferText(uint8 from, uint8 to);
554  void pickupConts(uint8 from, uint8 containerEx);
555  byte transferToEx(uint8 from);
556  void swapWithOpen();
557  void outOfOpen();
558  void inToInv();
559  void outOfInv();
560  bool checkObjectSize();
561  void useOpened();
562  void setPickup();
563  void selectOpenOb();
564  void examineOb(bool examineAgain = true);
565  void selectOb();
566  void inventory();
567  void identifyOb();
568 
569  // from pathfind.cpp
570  void turnPathOn(uint8 param);
571  void turnPathOff(uint8 param);
572  void turnAnyPathOn(uint8 param, uint8 room);
573  void turnAnyPathOff(uint8 param, uint8 room);
574  RoomPaths *getRoomsPaths();
575  void faceRightWay();
576  void setWalk();
577  void autoSetWalk();
578  void checkDest(const RoomPaths *roomsPaths);
579  void findXYFromPath();
580  bool checkIfPathIsOn(uint8 index);
581  void bresenhams();
582  void workoutFrames();
583  byte findFirstPath(byte x, byte y);
584  byte findPathOfPoint(byte x, byte y);
585 
586  // from people.cpp
587  void setupInitialReelRoutines();
588  void updatePeople();
589  void madmanText();
590  void madman(ReelRoutine &routine);
591  void madMode();
592  void addToPeopleList(ReelRoutine *routine);
593  bool checkSpeed(ReelRoutine &routine);
594  void sparkyDrip(ReelRoutine &routine);
595  void genericPerson(ReelRoutine &routine);
596  void gamer(ReelRoutine &routine);
597  void eden(ReelRoutine &routine);
598  void sparky(ReelRoutine &routine);
599  void rockstar(ReelRoutine &routine);
600  void madmansTelly(ReelRoutine &routine);
601  void smokeBloke(ReelRoutine &routine);
602  void manAsleep(ReelRoutine &routine);
603  void drunk(ReelRoutine &routine);
604  void introMagic1(ReelRoutine &routine);
605  void introMagic2(ReelRoutine &routine);
606  void introMagic3(ReelRoutine &routine);
607  void introMusic(ReelRoutine &routine);
608  void candles(ReelRoutine &routine);
609  void candles1(ReelRoutine &routine);
610  void candles2(ReelRoutine &routine);
611  void smallCandle(ReelRoutine &routine);
612  void gates(ReelRoutine &routine);
613  void security(ReelRoutine &routine);
614  void edenInBath(ReelRoutine &routine);
615  void louis(ReelRoutine &routine);
616  void handClap(ReelRoutine &routine);
617  void carParkDrip(ReelRoutine &routine);
618  void foghornSound(ReelRoutine &routine);
619  void train(ReelRoutine &routine);
620  void attendant(ReelRoutine &routine);
621  void keeper(ReelRoutine &routine);
622  void interviewer(ReelRoutine &routine);
623  void drinker(ReelRoutine &routine);
624  void alleyBarkSound(ReelRoutine &routine);
625  void louisChair(ReelRoutine &routine);
626  void bossMan(ReelRoutine &routine);
627  void priest(ReelRoutine &routine);
628  void monkAndRyan(ReelRoutine &routine);
629  void copper(ReelRoutine &routine);
630  void introMonks1(ReelRoutine &routine);
631  void introMonks2(ReelRoutine &routine);
632  void soldier1(ReelRoutine &routine);
633  void receptionist(ReelRoutine &routine);
634  void bartender(ReelRoutine &routine);
635  void heavy(ReelRoutine &routine);
636  void helicopter(ReelRoutine &routine);
637  void mugger(ReelRoutine &routine);
638  void businessMan(ReelRoutine &routine);
639  void endGameSeq(ReelRoutine &routine);
640  void poolGuard(ReelRoutine &routine);
641 
642  // from print.cpp
643  uint8 getNextWord(const GraphicsFile &charSet, const uint8 *string, uint8 *totalWidth, uint8 *charCount);
644  void printChar(const GraphicsFile &charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height, bool kerning = false);
645  void printChar(const GraphicsFile &charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height);
646  void printBoth(const GraphicsFile &charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar);
647  uint8 printDirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered, bool kerning = false);
648  uint8 printDirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
649  uint8 getNumber(const GraphicsFile &charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16 *offset);
650  uint8 kernChars(uint8 firstChar, uint8 secondChar, uint8 width);
651  uint8 printSlow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
652  uint16 waitFrames();
653  void printCurs();
654  void delCurs();
655  void rollEndCreditsGameWon();
656  void rollEndCreditsGameLost();
657 
658  // from saveload.cpp
659  void loadGame();
660  void doLoad(int slot);
661  void saveGame();
662  void namesToOld();
663  void oldToNames();
664  void saveLoad();
665  void doSaveLoad();
666  void showMainOps();
667  void showDiscOps();
668  void discOps();
669  void actualSave();
670  void actualLoad();
671  void loadPosition(unsigned int slot);
672  void savePosition(unsigned int slot, const char *descbuf);
673  uint scanForNames();
674  void loadOld();
675  void showDecisions();
676  void loadSaveBox();
677  void showNames();
678  void checkInput();
679  void selectSaveLoadPage();
680  void selectSlot();
681  void showSlots();
682  void showOpBox();
683  void showSaveOps();
684  void showLoadOps();
685 
686  // from sprite.cpp
687  void printSprites();
688  void printASprite(const Sprite *sprite);
689  void clearSprites();
690  Sprite *makeSprite(uint8 x, uint8 y, bool _mainManCallback, const GraphicsFile *frameData);
691  void initMan();
692  void walking(Sprite *sprite);
693  void aboutTurn(Sprite *sprite);
694  void backObject(Sprite *sprite);
695  void constant(Sprite *sprite, SetObject *objData);
696  void randomSprite(Sprite *sprite, SetObject *objData);
697  void doorway(Sprite *sprite, SetObject *objData);
698  void wideDoor(Sprite *sprite, SetObject *objData);
699  void doDoor(Sprite *sprite, SetObject *objData, Common::Rect check);
700  void steady(Sprite *sprite, SetObject *objData);
701  void lockedDoorway(Sprite *sprite, SetObject *objData);
702  void liftSprite(Sprite *sprite, SetObject *objData);
703 
704  Reel *getReelStart(uint16 reelPointer);
705  const GraphicsFile *findSource(uint16 &frame);
706  void showReelFrame(Reel *reel);
707  void showGameReel(ReelRoutine *routine);
708  const Frame *getReelFrameAX(uint16 frame);
709  void moveMap(uint8 param);
710  void checkOne(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY);
711 
712  uint8 getBlockOfPixel(uint8 x, uint8 y);
713  void splitIntoLines(uint8 x, uint8 y);
714  void initRain();
715 
716  void intro1Text();
717  void intro2Text(uint16 nextReelPointer);
718  void intro3Text(uint16 nextReelPointer);
719 
720  void monks2text();
721  void monks2ShowText(uint8 textIndex, uint8 x, uint8 y);
722  void textForEnd();
723  void textForMonkHelper(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount);
724  void textForMonk();
725  void priestText(ReelRoutine &routine);
726  void soundOnReels(uint16 reelPointer);
727  void clearBeforeLoad();
728  void clearReels();
729  void getRidOfReels();
730  void liftNoise(uint8 index);
731  void checkForExit(Sprite *sprite);
732  void mainMan(Sprite *sprite);
733  void spriteUpdate();
734  void showRain();
735  void reconstruct();
736  void reelsOnScreen();
737 
738  // from stubs.cpp
739  void setupInitialVars();
740  void crosshair();
741  void delTextLine();
742  void showBlink();
743  void dumpBlink();
744  void dumpPointer();
745  void showPointer();
746  void delPointer();
747  void showRyanPage();
748  void switchRyanOn();
749  void switchRyanOff();
750  void showDiary();
751  void readMouse();
752  uint16 readMouseState();
753  void hangOn(uint16 frameCount);
754  void lockMon();
755  void readKey();
756  void findOrMake(uint8 index, uint8 value, uint8 type);
757  DynObject *getFreeAd(uint8 index);
758  DynObject *getExAd(uint8 index);
759  DynObject *getEitherAd();
760  void *getAnyAdDir(uint8 index, uint8 flag);
761  void showWatch();
762  void showTime();
763  void showExit();
764  void showMan();
765  void panelIcons1();
766  SetObject *getSetAd(uint8 index);
767  void *getAnyAd(uint8 *slotSize, uint8 *slotCount);
768  const uint8 *getTextInFile1(uint16 index);
769  uint8 findNextColon(const uint8 **string);
770  void allocateBuffers();
771  void loadTextFile(TextFile &file, const char *suffix);
772  void loadGraphicsFile(GraphicsFile &file, const char *suffix);
773  void loadGraphicsSegment(GraphicsFile &file, Common::File &inFile, unsigned int len);
774  void loadTextSegment(TextFile &file, Common::File &inFile, unsigned int len);
775  void loadTravelText();
776  void loadTempText(const char *suffix);
777  void sortOutMap();
778  void loadRoomData(const Room &room, bool skipDat);
779  void useTempCharset(GraphicsFile *charset);
780  void useCharset1();
781  void useCharsetIcons1();
782  void useCharsetTempgraphics();
783  void resetCharset();
784  void printMessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered);
785  void printMessage2(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered, uint8 count);
786  bool isItDescribed(const ObjPos *objPos);
787  void zoomIcon();
788  void roomName();
789  void showIcon();
790  void eraseOldObs();
791  void commandOnlyCond(uint8 command, uint8 commandType);
792  void commandOnly(uint8 command);
793  void commandWithOb(uint8 command, uint8 type, uint8 index);
794  void blank();
795  void setTopLeft();
796  void setTopRight();
797  void setBotLeft();
798  void setBotRight();
799  void examIcon();
800  void animPointer();
801  void getFlagUnderP(uint8 *flag, uint8 *flagEx);
802  void workToScreenM();
803  void quitKey();
804  void restoreReels();
805  void loadFolder();
806  void folderHints();
807  void folderExit();
808  void showFolder();
809  void showLeftPage();
810  void showRightPage();
811  void underTextLine();
812  void hangOnP(uint16 count);
813  void getUnderZoom();
814  void putUnderZoom();
815  void examineInventory();
816  void openInv();
817  void getBack1();
818  void getBackFromOb();
819  void getBackFromOps();
820  void getBackToOps();
821  void DOSReturn();
822  bool isItWorn(const DynObject *object);
823  bool compare(uint8 index, uint8 flag, const char id[4]);
824  void hangOnW(uint16 frameCount);
825  void getRidOfTempText();
826  void getRidOfAll();
827  void placeSetObject(uint8 index);
828  void removeSetObject(uint8 index);
829  bool isSetObOnMap(uint8 index);
830  void dumpZoom();
831  void diaryKeyP();
832  void diaryKeyN();
833  void findRoomInLoc();
834  void loadMenu();
835  void showMenu();
836  void dumpMenu();
837  void dealWithSpecial(uint8 firstParam, uint8 secondParam);
838  void plotReel(uint16 &reelPointer);
839  void setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount);
840  void getUnderTimed();
841  void putUnderTimed();
842  void dumpTextLine();
843  void useTimedText();
844  void dumpTimedText();
845  void getTime();
846  void doChange(uint8 index, uint8 value, uint8 type);
847  bool isRyanHolding(const char *id);
848  void clearBuffers();
849  void clearChanges();
850  void drawFloor();
851  uint16 findSetObject(const char *id);
852  void hangOnCurs(uint16 frameCount);
853  const uint8 *findObName(uint8 type, uint8 index);
854  void copyName(uint8 type, uint8 index, uint8 *dst);
855  uint16 findExObject(const char *id);
856  void makeMainScreen();
857  void showWatchReel();
858  void watchReel();
859  void examineObText();
860  void blockNameText();
861  void personNameText();
862  void walkToText();
863  void entryTexts();
864  void setAllChanges();
865  void restoreAll();
866  void redrawMainScrn();
867  void checkCoords(const RectWithCallback *rectWithCallbacks);
868  void newGame();
869  void deleteTaken();
870  void autoAppear();
871  void loadRoom();
872  void startLoading(const Room &room);
873  void startup();
874  void atmospheres();
875  bool objectMatches(void *object, const char *id);
876  void checkFolderCoords();
877  void nextFolder();
878  void lastFolder();
879  void lookAtCard();
880  void obsThatDoThings();
881  void describeOb();
882  void speakObject(const char *text);
883  void putBackObStuff();
884  void showDiaryPage();
885  void showDiaryKeys();
886  void dumpDiaryKeys();
887  void useMenu();
888  void incRyanPage();
889  void edensFlatReminders();
890  void dropError();
891  void cantDrop();
892  void entryAnims();
893  bool finishedWalking();
894  void emergencyPurge(uint8 from);
895  void purgeAnItem();
896  uint8 nextSymbol(uint8 symbol);
897  void enterSymbol();
898  void showSymbol();
899  void updateSymbolTop();
900  void updateSymbolBot();
901  void pickupOb(uint8 command, uint8 pos);
902  void errorMessage1();
903  void errorMessage2();
904  void errorMessage3();
905  void decide();
906  void allPointer();
907  void dumpWatch();
908  void watchCount();
909  void signOn();
910  void searchForFiles(const char *filesString);
911  void triggerMessage(uint16 index);
912  void processTrigger();
913  void dreamwebFinalize();
914  void dreamweb();
915  void screenUpdate();
916  void startup1();
917  bool checkIfPerson(uint8 x, uint8 y);
918  bool checkIfFree(uint8 x, uint8 y);
919  bool checkIfEx(uint8 x, uint8 y);
920  void walkAndExamine();
921  void obName(uint8 command, uint8 commandType);
922  bool checkIfSet(uint8 x, uint8 y);
923  void readSetData();
924  void look();
925  void autoLook();
926  void doLook();
927  void mainScreen();
928  void zoomOnOff();
929  void initialInv();
930  void walkIntoRoom();
931  void afterNewRoom();
932  void madmanRun();
933  void showGun();
934 
935  // from talk.cpp
936  void talk();
937  void convIcons();
938  uint16 getPersFrame(uint8 index);
939  const uint8 *getPersonText(uint8 index, uint8 talkPos);
940  void startTalk();
941  void moreTalk();
942  void doSomeTalk();
943  bool hangOnPQ();
944  void redes();
945 
946  // from titles.cpp
947  void endGame();
948  void monkSpeaking();
949  void gettingShot();
950  void bibleQuote();
951  void hangOne(uint16 delay);
952  void intro();
953  void runIntroSeq();
954  void runEndSeq();
955  void loadIntroRoom();
956  void set16ColPalette();
957  void realCredits();
958  uint8 getExPos();
959 
960  // from use.cpp
961  void useRoutine();
962  void useObject();
963  void placeFreeObject(uint8 index);
964  void removeFreeObject(uint8 index);
965  void setupTimedUse(uint16 offset, uint16 countToTimed, uint16 timeCount, byte x, byte y);
966  void withWhat();
967  uint16 checkInside(uint16 command, uint16 type);
968  void showPuzText(uint16 command, uint16 count);
969  void useText(const uint8 *string);
970  void showFirstUse();
971  void showSecondUse();
972  void viewFolder();
973  void edensCDPlayer();
974  void hotelBell();
975  void playGuitar();
976  void useElevator1();
977  void useElevator2();
978  void useElevator3();
979  void useElevator4();
980  void useElevator5();
981  void useHatch();
982  void wheelSound();
983  void callHotelLift();
984  void useShield();
985  void useCoveredBox();
986  void useRailing();
987  void useChurchHole();
988  void sitDownInBar();
989  void useBalcony();
990  void useWindow();
991  void trapDoor();
992  void useDryer();
993  void callEdensDLift();
994  void callEdensLift();
995  void openYourNeighbor();
996  void openRyan();
997  void openPoolBoss();
998  void openEden();
999  void openSarters();
1000  void openLouis();
1001  void useWall();
1002  void useChurchGate();
1003  void useLadder();
1004  void useLadderB();
1005  bool defaultUseHandler(const char *id);
1006  void slabDoorA();
1007  void slabDoorB();
1008  void slabDoorC();
1009  void slabDoorE();
1010  void slabDoorD();
1011  void slabDoorF();
1012  void useGun();
1013  void useFullCart();
1014  void useClearBox();
1015  void openTVDoor();
1016  void usePlate();
1017  void usePlinth();
1018  void useElvDoor();
1019  void useWinch();
1020  void useCart();
1021  void useHole();
1022  void openHotelDoor();
1023  void openHotelDoor2();
1024  void grafittiDoor();
1025  void useCardReader1();
1026  void useCardReader2();
1027  void useCardReader3();
1028  void usePoolReader();
1029  void useLighter();
1030  void useWire();
1031  void openTomb();
1032  void hotelControl();
1033  void useCooker();
1034  void useDiary();
1035  void useControl();
1036  void useSlab();
1037  void usePipe();
1038  void useOpenBox();
1039  void runTap();
1040  void useAxe();
1041  void useHandle();
1042  void useAltar();
1043  void notHeldError();
1044  void useCashCard();
1045  void useButtonA();
1046  void wearWatch();
1047  void wearShades();
1048  void useTrainer();
1049  void useStereo();
1050  void chewy();
1051  void delEverything();
1052  void afterIntroRoom();
1053 
1054  // from vgafades.cpp
1055  void clearStartPal();
1056  void clearEndPal();
1057  void palToStartPal();
1058  void endPalToStart();
1059  void startPalToEnd();
1060  void palToEndPal();
1061  void fadeDOS();
1062  void doFade();
1063  void fadeCalculation();
1064  void fadeUpYellows();
1065  void fadeUpMonFirst();
1066  void fadeUpMon();
1067  void fadeDownMon();
1068  void initialMonCols();
1069  void fadeScreenUp();
1070  void fadeScreenUps();
1071  void fadeScreenUpHalf();
1072  void fadeScreenDown();
1073  void fadeScreenDowns();
1074  void fadeScreenDownHalf();
1075  void clearPalette();
1076  void greyscaleSum();
1077  void allPalette();
1078  void dumpCurrent();
1079 
1080  // from vgagrafx.cpp
1081  inline uint8 *workspace() { return _workspace; }
1082  void clearWork();
1083 
1084  void panelToMap();
1085  void mapToPanel();
1086  void dumpMap();
1087  void transferFrame(uint8 from, uint8 to, uint8 offset);
1088  void zoom();
1089  void multiGet(uint8 *dst, uint16 x, uint16 y, uint8 width, uint8 height);
1090  void multiPut(const uint8 *src, uint16 x, uint16 y, uint8 width, uint8 height);
1091  void multiDump(uint16 x, uint16 y, uint8 width, uint8 height);
1092  void workToScreen();
1093  void frameOutV(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y);
1094  void frameOutNm(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
1095  void frameOutBh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
1096  void frameOutFx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
1097  void doShake();
1098  void setMode();
1099  void showPCX(const Common::String &suffix);
1100  void showFrameInternal(const uint8 *pSrc, uint16 x, uint16 y, uint8 effectsFlag, uint8 width, uint8 height);
1101  void showFrame(const GraphicsFile &frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height);
1102  void showFrame(const GraphicsFile &frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag);
1103  bool pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y);
1104  void loadPalFromIFF();
1105  void createPanel();
1106  void createPanel2();
1107  void showPanel();
1108 };
1109 
1110 } // End of namespace DreamWeb
1111 
1112 #endif
Definition: structs.h:96
Definition: str.h:59
Definition: surface.h:66
EngineFeature
Definition: engine.h:250
Definition: error.h:84
Definition: structs.h:265
Definition: structs.h:49
Definition: structs.h:394
Definition: random.h:44
Definition: structs.h:332
Definition: rect.h:144
Definition: path.h:52
Definition: structs.h:282
Definition: console.h:27
Definition: structs.h:154
Definition: structs.h:33
Definition: structs.h:63
Definition: file.h:47
Definition: algorithm.h:29
Definition: sound.h:33
Definition: rect.h:45
Definition: structs.h:131
Definition: detection.h:27
Definition: structs.h:270
Definition: text-to-speech.h:145
Definition: structs.h:249
Definition: structs.h:117
Definition: structs.h:84
Definition: structs.h:312
Definition: structs.h:210
Definition: system.h:167
Definition: structs.h:107
Definition: engine.h:143
Definition: structs.h:187
Language
Definition: language.h:45
Definition: dreamweb.h:102