22 #ifndef TSAGE_RINGWORLD2_LOGIC_H 23 #define TSAGE_RINGWORLD2_LOGIC_H 25 #include "common/scummsys.h" 26 #include "tsage/events.h" 27 #include "tsage/core.h" 28 #include "tsage/scenes.h" 29 #include "tsage/globals.h" 33 namespace Ringworld2 {
35 using namespace TsAGE;
37 #define R2_INVENTORY (*((::TsAGE::Ringworld2::Ringworld2InvObjectList *)g_globals->_inventory)) 41 static Scene *createScene(
int sceneNumber);
48 CursorType _cursorNum;
49 CursorType _savedCursorNum;
53 void setDetails(
const Rect &bounds, CursorType cursor);
57 void remove()
override;
58 void process(
Event &event)
override;
59 bool startAction(CursorType action,
Event &event)
override {
return false; }
60 void doAction(
int action)
override {}
70 virtual void setDetails(
const Rect &bounds, CursorType cursor,
int sceneNumber);
71 virtual void setDest(
const Common::Point &p) { _destPos = p; }
72 virtual void changeScene();
75 void process(
Event &event)
override;
80 static void startStrip();
81 static void endStrip();
83 byte _shadowPaletteMap[256];
84 bool _savedPlayerEnabled;
97 void remove()
override;
98 void process(
Event &event)
override;
99 void dispatch()
override;
100 void refreshBackground(
int xAmount,
int yAmount)
override;
101 virtual void saveCharacter(
int characterIndex);
102 virtual void restore() {}
104 bool display(CursorType action,
Event &event);
107 void scalePalette(
int RFactor,
int GFactor,
int BFactor);
108 void loadBlankScene();
114 void process(
Event &event)
override;
115 void postLoad(
int priorSceneBeforeLoad,
int currentSceneBeforeLoad)
override;
116 void dispatch()
override;
118 void setupPaletteMaps();
125 bool performAction(
int action);
129 void doAction(
int action)
override {
130 if (!performAction(action))
131 SceneHotspot::doAction(action);
138 bool performAction(
int action);
142 void doAction(
int action)
override {
143 if (!performAction(action))
144 SceneHotspot::doAction(action);
153 SceneObject::synchronize(s);
154 s.syncAsSint16LE(_state);
156 Common::String getClassName()
override {
return "SceneObjectExt"; }
163 static bool SelectItem(
int objectNumber);
164 static void selectDefault(
int obectNumber);
222 void setObjectScene(
int objectNum,
int sceneNumber);
224 Common::String getClassName()
override {
return "Ringworld2InvObjectList"; }
227 #define RING2_INVENTORY (*((::TsAGE::Ringworld2::Ringworld2InvObjectList *)g_globals->_inventory)) 231 void start()
override;
232 void restartGame()
override;
233 void restart()
override;
234 void endGame(
int resNum,
int lineNum)
override;
236 Scene *createScene(
int sceneNumber)
override;
237 void processEvent(
Event &event)
override;
238 void rightClick()
override;
239 bool canSaveGameStateCurrently()
override;
240 bool canLoadGameStateCurrently()
override;
247 bool startAction(CursorType action,
Event &event)
override;
258 NamedHotspot::synchronize(s);
259 s.syncAsSint16LE(_flag);
267 void remove()
override;
268 bool startAction(CursorType action,
Event &event)
override;
278 Common::String getClassName()
override {
return "SceneActorExt"; }
280 SceneActor::synchronize(s);
281 s.syncAsSint16LE(_state);
285 enum MazeDirection { MAZEDIR_NONE = 0, MAZEDIR_NORTH = 1, MAZEDIR_NORTHEAST = 2, MAZEDIR_EAST = 3,
286 MAZEDIR_SOUTHEAST = 4, MAZEDIR_SOUTH = 5, MAZEDIR_SOUTHWEST = 6, MAZEDIR_WEST = 7,
287 MAZEDIR_NORTHWEST = 8 };
314 void setDisplayBounds(
const Rect &r);
316 void load(
int resNum);
323 void reposition()
override;
324 void draw()
override;
335 void remove()
override;
336 void process(
Event &event)
override;
337 void setDetails(
int visage,
int strip,
int frameNumber,
const Common::Point &pt);
338 void setDetails(
int resNum,
int lookLineNum,
int talkLineNum,
int useLineNum);
370 int _framesPerSlices;
377 byte _palData[256 * 3];
391 enum AnimationPaletteMode { ANIMPALMODE_REPLACE_PALETTE = 0, ANIMPALMODE_CURR_PALETTE = 1,
392 ANIMPALMODE_NONE = 2 };
394 enum AnimationObjectMode { ANIMOBJMODE_1 = 1, ANIMOBJMODE_2 = 2, ANIMOBJMODE_42 = 42 };
398 void rleDecode(
const byte *pSrc, byte *pDest,
int size);
400 void drawFrame(
int sliceIndex);
408 Rect _rect1, _screenBounds;
411 AnimationPaletteMode _paletteMode;
412 AnimationObjectMode _objectMode;
414 byte _palIndexes[256];
420 int _playbackTickPrior;
422 int _nextSlicesPosition;
430 void remove()
override;
431 void process(
Event &event)
override;
432 void dispatch()
override;
433 virtual void flipPane() {}
434 virtual void changePane() {}
435 virtual void closing() {}
438 bool load(
int animId,
Action *endAction = NULL);
459 void remove()
override;
462 void process(
Event &event)
override;
463 virtual void setup2(
int visage,
int stripFrameNum,
int frameNum,
int posX,
int posY);
464 virtual void setup3(
int resNum,
int lookLineNum,
int talkLineNum,
int useLineNum);
477 void setup(
int buttonId);
480 Common::String getClassName()
override {
return "ScannerButton"; }
481 void process(
Event &event)
override;
482 bool startAction(CursorType action,
Event &event)
override;
496 void setup(
int initial,
int xStart,
int yp,
int width,
int xInc);
499 Common::String getClassName()
override {
return "ScannerSlider"; }
500 void remove()
override;
501 void process(
Event &event)
override;
502 bool startAction(CursorType action,
Event &event)
override;
515 Common::String getClassName()
override {
return "ScannerDialog"; }
516 void remove()
override;
517 void setup2(
int visage,
int stripFrameNum,
int frameNum,
int posX,
int posY)
override;
Definition: ringworld2_logic.h:243
Definition: ringworld2_logic.h:148
Definition: ringworld2_logic.h:78
Definition: ringworld2_logic.h:263
Definition: ringworld2_logic.h:467
Definition: ringworld2_logic.h:366
Definition: ringworld2_logic.h:251
Definition: ringworld2_logic.h:352
Definition: ringworld2_logic.h:452
Definition: ringworld2_logic.h:122
Definition: ringworld2_logic.h:343
Definition: ringworld2_logic.h:229
Definition: graphics.h:79
Definition: ringworld2_logic.h:384
Definition: ringworld2_logic.h:272
Definition: ringworld2_logic.h:396
Definition: saveload.h:115
Definition: blueforce_dialogs.h:30
Definition: ringworld2_logic.h:327
Definition: ringworld2_logic.h:39
Definition: saveload.h:63
Definition: ringworld2_logic.h:289
Definition: ringworld2_logic.h:443
Definition: ringworld2_logic.h:135
Definition: ringworld2_logic.h:161
Definition: graphics.h:40
Definition: ringworld2_logic.h:111
Definition: ringworld2_logic.h:44
Definition: ringworld2_logic.h:63