diff options
author | Matthew Stewart | 2018-05-23 19:56:15 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | ca3a9dcc8764909e163a860e4a472404620480e2 (patch) | |
tree | 4b546d6c1ad2466e25d4c24bbb642d7c0eb49c58 /engines/startrek/startrek.h | |
parent | bd79e4d653f9476de1501de149589e583e47411d (diff) | |
download | scummvm-rg350-ca3a9dcc8764909e163a860e4a472404620480e2.tar.gz scummvm-rg350-ca3a9dcc8764909e163a860e4a472404620480e2.tar.bz2 scummvm-rg350-ca3a9dcc8764909e163a860e4a472404620480e2.zip |
STARTREK: Finish implementing first room
Doors now work, and the system of "walking, then performing an action
afterward" is implemented.
Diffstat (limited to 'engines/startrek/startrek.h')
-rw-r--r-- | engines/startrek/startrek.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/engines/startrek/startrek.h b/engines/startrek/startrek.h index 217a06652b..b408b393b0 100644 --- a/engines/startrek/startrek.h +++ b/engines/startrek/startrek.h @@ -65,6 +65,8 @@ const int MAX_MENUBUTTONS = 32; const int TEXTBOX_WIDTH = 26; const int MAX_TEXTBOX_LINES = 12; +const int MAX_BUFFERED_WALK_ACTIONS = 32; + enum StarTrekGameType { GType_ST25 = 1, @@ -190,12 +192,14 @@ public: int loadActorAnimWithRoomScaling(int actorIndex, const Common::String &animName, int16 x, int16 y); uint16 getActorScaleAtPosition(int16 y); void addAction(const Action &action); + void addAction(byte b1, byte b2, byte b3, byte b4) { addAction(Action(b1, b2, b3, b4)); } bool checkItemInteractionExists(int action, int activeItem, int passiveItem, int16 arg6); void handleAwayMissionAction(); bool isPointInPolygon(int16 *data, int16 x, int16 y); void checkTouchedLoadingZone(int16 x, int16 y); bool isPositionSolid(int16 x, int16 y); + void loadRoomIndex(int roomIndex, int spawnIndex); public: SharedPtr<Room> getRoom(); @@ -231,9 +235,12 @@ public: int findObjectAt(int x, int y); int findObjectAt(Common::Point p) { return findObjectAt(p.x, p.y); } SharedPtr<Bitmap> loadAnimationFrame(const Common::String &filename, Fixed16 scale); + + int selectObjectForUseAction(); Common::String getCrewmanAnimFilename(int actorIndex, const Common::String &basename); void updateMouseBitmap(); - bool sub_2330c() { return false; } // TODO + bool walkActiveObjectToHotspot(); + bool isObjectUnusable(int objectIndex, int action); void showInventoryIcons(bool showItem); void hideInventoryIcons(); int showInventoryMenu(int x, int y, bool restoreMouse); @@ -384,6 +391,15 @@ public: Sprite _inventoryIconSprite; Sprite _itemIconSprite; + // Certain hotspots store a position value where objects must walk to before + // interacting with them. After calling "findObjectAt", these values are updated. + bool _objectHasWalkPosition; + Common::Point _objectWalkPosition; + + // Actions to perform after a crewman finishes walking to a position. + Action _actionOnWalkCompletion[MAX_BUFFERED_WALK_ACTIONS]; + bool _actionOnWalkCompletionInUse[MAX_BUFFERED_WALK_ACTIONS]; + // _clockTicks is based on DOS interrupt 1A, AH=0; read system clock counter. // Updates 18.206 times every second. uint32 _clockTicks; |