ScummVM
StarTrek::StarTrekEngine Class Reference

#include <startrek.h>

Inheritance diagram for StarTrek::StarTrekEngine:
Collaboration diagram for StarTrek::StarTrekEngine:

Public Member Functions

 StarTrekEngine (OSystem *syst, const StarTrekGameDescription *gamedesc)
 
virtual ~StarTrekEngine ()
 
Common::Error run ()
 Init the engine and start its main loop. More...
 
Common::Error runGameMode (int mode, bool resume)
 
void runTransportSequence (const Common::String &name)
 
void initBridge (bool b)
 
void cleanupBridge ()
 
Common::MemoryReadStreamEndianloadFile (Common::String filename, int fileIndex=0)
 TODO: More...
 
Common::MemoryReadStreamEndianloadFileWithParams (Common::String filename, bool unk1, bool unk2, bool unk3)
 TODO: Figure out what the extra parameters are, and if they're important. More...
 
void playMovie (Common::String filename)
 
void playMovieMac (Common::String filename)
 
uint16 getRandomWord ()
 
Common::String getLoadedText (int textIndex)
 ".txt" files are just lists of strings. More...
 
Fixed14 sin (Angle angle)
 Unit of the angle is "quadrants" (90 degrees = 1.0) More...
 
Fixed14 cos (Angle angle)
 
Angle atan2 (int32 deltaX, int32 deltaZ)
 
void initAwayMission ()
 
void runAwayMission ()
 
void cleanupAwayMission ()
 
void loadRoom (const Common::String &missionName, int roomIndex)
 
void initAwayCrewPositions (int warpEntryIndex)
 
void handleAwayMissionEvents ()
 
void awayMissionLeftClick ()
 
void awayMissionSelectAction (bool openActionMenu)
 Called on right-click (select action), or when certain actions are otherwise selected (checks whether to show inventory icon, etc) More...
 
void awayMissionUseObject (int16 clickedObject)
 
void awayMissionGetLookOrTalk (int16 clickedObject)
 
void unloadRoom ()
 
int loadActorAnimWithRoomScaling (int actorIndex, const Common::String &animName, int16 x, int16 y)
 Similar to loadActorAnim, but scale is determined by the y-position in the room. More...
 
Fixed8 getActorScaleAtPosition (int16 y)
 
void addAction (const Action &action)
 
void addAction (byte type, byte b1, byte b2, byte b3)
 
bool checkItemInteractionExists (int action, int activeItem, int passiveItem, int16 arg6)
 
void handleAwayMissionAction ()
 
bool isPointInPolygon (int16 *data, int16 x, int16 y)
 Returns true if the given position is contained in a polygon. More...
 
void checkTouchedLoadingZone (int16 x, int16 y)
 
void updateAwayMissionTimers ()
 Updates any nonzero away mission timers, and invokes ACTION_TIMER_EXPIRED when any one reaches 0. More...
 
bool isPositionSolid (int16 x, int16 y)
 Returns true if the given position in the room is solid (not walkable). More...
 
void loadRoomIndex (int roomIndex, int spawnIndex)
 
RoomgetRoom ()
 
void initActors ()
 
int loadActorAnim (int actorIndex, const Common::String &animName, int16 x, int16 y, Fixed8 scale)
 Set an actor's animation, position, and scale. More...
 
void loadBanFile (const Common::String &name)
 
bool actorWalkToPosition (int actorIndex, const Common::String &animFile, int16 srcX, int16 srcY, int16 destX, int16 destY)
 Tries to make an actor walk to a position. More...
 
void updateActorAnimations ()
 
void renderBanBelowSprites ()
 ".BAN" files relate to drawing background animations, ie. More...
 
void renderBan (byte *pixelDest, FileStream file)
 
void renderBanAboveSprites ()
 
void removeActorFromScreen (int actorIndex)
 
void actorFunc1 ()
 
void drawActorToScreen (Actor *actor, const Common::String &animName, int16 x, int16 y, Fixed8 scale, bool addSprite)
 
void releaseAnim (Actor *actor)
 
void initStandAnim (int actorIndex)
 
void updateActorPositionWhileWalking (Actor *actor, int16 x, int16 y)
 
void chooseActorDirectionForWalking (Actor *actor, int16 srcX, int16 srcY, int16 destX, int16 destY)
 Chooses a value for the actor's speed and direction, based on a source position and a destination position it's walking to. More...
 
bool directPathExists (int16 srcX, int16 srcY, int16 destX, int16 destY)
 Returns true if an actor can walk directly from a source position to a destination position without running into unwalkable terrain. More...
 
int findObjectAt (int x, int y)
 
int findObjectAt (Common::Point p)
 
BitmaploadAnimationFrame (const Common::String &filename, Fixed8 scale)
 Loads a bitmap for the animation frame with the given scale. More...
 
int selectObjectForUseAction ()
 Called when the "get" action is first selected. More...
 
Common::String getCrewmanAnimFilename (int actorIndex, const Common::String &basename)
 
void updateMouseBitmap ()
 Checks whether to change the mouse bitmap to have the red outline. More...
 
bool walkActiveObjectToHotspot ()
 Checks whether to walk a crewman to a hotspot (the last one obtained from a "findObjectAt" call). More...
 
bool isObjectUnusable (int objectIndex, int action)
 Return true if an object is unselectable with the given action? More...
 
void updateCrewmanGetupTimers ()
 When a crewman is collapsed, they get once a timer reaches 0. More...
 
void showInventoryIcons (bool showItem)
 
void hideInventoryIcons ()
 
int showInventoryMenu (int x, int y, bool restoreMouse)
 
void initStarfieldSprite (Sprite *sprite, Bitmap *bitmap, const Common::Rect &rect)
 
BitmapscaleBitmap (Bitmap *bitmap, Fixed8 scale)
 
void scaleBitmapRow (byte *src, byte *dest, uint16 origWidth, uint16 scaledWidth)
 This takes a row of an unscaled bitmap, and copies it to a row of a scaled bitmap. More...
 
void pollEvents (bool queueEvents=true)
 Checks for all events, and updates Star Trek's event queue if queueEvents is set. More...
 
void waitForNextTick (bool queueEvents=true)
 
void initializeEventsAndMouse ()
 
bool getNextEvent (TrekEvent *e, bool poll=true)
 Returns false if there is no event waiting. More...
 
void removeNextEvent ()
 
bool popNextEvent (TrekEvent *e, bool poll=true)
 
void addEventToQueue (const TrekEvent &e)
 
void clearEventBuffer ()
 
void updateEvents ()
 
void updateTimerEvent ()
 
void updateMouseEvents ()
 
void updateKeyboardEvents ()
 
void updateClockTicks ()
 
bool checkKeyPressed ()
 
Common::EventManagergetEventMan ()
 
const char * getNextTextLine (const char *text, char *line, int lineWidth)
 Gets one line of text (does not include words that won't fit). More...
 
void drawTextLineToBitmap (const char *text, int textLen, int x, int y, SharedPtr< Bitmap > bitmap)
 Draw a line of text to a standard bitmap (NOT a "TextBitmap", whose pixel array is an array of characters, but an actual standard bitmap). More...
 
String centerTextboxHeader (String headerText)
 
void getTextboxHeader (String *headerTextOutput, String speakerText, int choiceIndex)
 
String readTextFromRdf (int choiceIndex, uintptr data, String *headerTextOutput)
 Text getter for showText which reads from an rdf file. More...
 
String readTextFromBuffer (int choiceIndex, uintptr data, String *headerTextOutput)
 
void showTextbox (String headerText, const String &mainText, int xoffset, int yoffset, byte textColor, int maxTextLines)
 Shows text with the given header and main text. More...
 
String skipTextAudioPrompt (const String &str)
 
String playTextAudio (const String &str)
 Plays an audio prompt, if it exists, and returns the string starting at the end of the prompt. More...
 
int showText (TextGetterFunc textGetter, uintptr var, int xoffset, int yoffset, int textColor, bool loopChoices, int maxTextLines, bool rclickCancelsChoice)
 
int getNumTextboxLines (const String &str)
 Returns the number of lines this string will take up in a textbox. More...
 
String putTextIntoLines (const String &text)
 
TextBitmapinitTextSprite (int *xoffsetPtr, int *yoffsetPtr, byte textColor, int numTextLines, bool withHeader, Sprite *sprite)
 Creates a blank textbox in a TextBitmap, and initializes a sprite to use it. More...
 
void drawMainText (TextBitmap *bitmap, int numTextLines, int numTextboxLines, const String &text, bool withHeader)
 Draws the "main" text (everything but the header at the top) to a TextBitmap. More...
 
String readLineFormattedText (TextGetterFunc textGetter, uintptr var, int choiceIndex, TextBitmap *textBitmap, int numTextboxLines, int *numLines)
 
String readTextFromArray (int choiceIndex, uintptr data, String *headerTextOutput)
 Text getter for showText which reads choices from an array of pointers. More...
 
String readTextFromArrayWithChoices (int choiceIndex, uintptr data, String *headerTextOutput)
 Similar to above, but shows the choice index when multiple choices are present. More...
 
Common::String showCodeInputBox ()
 
void redrawTextInput ()
 
void addCharToTextInputBuffer (char c)
 
Common::String showTextInputBox (int16 arg0, int16 arg2, const Common::String &headerText)
 Shows a textbox that the player can type a string into. More...
 
void initTextInputSprite (int16 arg0, int16 arg2, const Common::String &headerText)
 
void cleanupTextInputSprite ()
 
int getMenuButtonAt (Sprite *sprites, int numSprites, int x, int y)
 Returns the index of the button at the given position, or -1 if none. More...
 
void chooseMousePositionFromSprites (Sprite *sprites, int numSprites, int spriteIndex, int mode)
 This chooses a sprite from the list to place the mouse cursor at. More...
 
void drawMenuButtonOutline (SharedPtr< Bitmap > bitmap, byte color)
 Draws or removes the outline on menu buttons when the cursor hovers on them, or leaves them. More...
 
void showOptionsMenu (int x, int y)
 
int showActionMenu ()
 Show the "action selection" menu, ie. More...
 
void loadMenuButtons (String mnuFilename, int xpos, int ypos)
 Loads a .MNU file, which is a list of buttons to display. More...
 
void setVisibleMenuButtons (uint32 bits)
 Sets which buttons are visible based on the given bitmask. More...
 
void disableMenuButtons (uint32 bits)
 Disables the given bitmask of buttons. More...
 
void enableMenuButtons (uint32 bits)
 
int handleMenuEvents (uint32 ticksUntilClickingEnabled, bool inTextbox)
 This returns either a special menu event (negative number) or the retval of the button clicked (usually an index, always positive). More...
 
void unloadMenuButtons ()
 
void chooseMouseBitmapForAction (int action, bool withRedOutline)
 Sets the mouse bitmap based on which action is selected. More...
 
void showQuitGamePrompt (int x, int y)
 
void showGameOverMenu ()
 
void showTextConfigurationMenu (bool fromOptionMenu)
 This can be called from startup or from the options menu. More...
 
int loadTextDisplayMode ()
 
void saveTextDisplayMode (int value)
 
void showRepublicMap (int16 arg0, int16 turbolift)
 Show the republic map, only used in mission 7. More...
 
int getRepublicMapAreaAtMouse ()
 Checks the mouse position to return and index for the area selected. More...
 
int getRepublicMapAreaOrFailure (int16 turbolift)
 Same as above, but returns 6 or 7 as error conditions (can't reach due to radiation or wrong turbolift). More...
 
bool showSaveMenu ()
 
bool showLoadMenu ()
 
bool saveGame (int slot, Common::String desc)
 
bool loadGame (int slot)
 
bool saveOrLoadGameData (Common::SeekableReadStream *in, Common::WriteStream *out, SavegameMetadata *meta)
 Call this after loading "saveOrLoadMetadata" to load all the data pertaining to game execution. More...
 
Common::String getSavegameFilename (int slotId) const
 
uint32 getFeatures () const
 
Common::Platform getPlatform () const
 
uint8 getGameType () const
 
Common::Language getLanguage () const
 
Common::String getScreenName () const
 
- Public Member Functions inherited from Engine
void pauseEngine (bool pause)
 Pause or resume the engine. More...
 
bool isPaused () const
 Return whether the engine is currently paused or not. More...
 
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
 
uint32 getTotalPlayTime () const
 Get the total play time. More...
 
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
 
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
virtual bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
 
virtual void syncSoundSettings ()
 Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc. More...
 
virtual void initKeymap ()
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 
virtual bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
 
virtual Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
 
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 

Public Attributes

const StarTrekGameDescription_gameDescription
 
int _gameMode
 
int _lastGameMode
 
bool _resetGameMode
 
Common::String _missionToLoad
 
int _roomIndexToLoad
 
int _spawnIndexToLoad
 
Common::String _missionName
 
int _roomIndex
 
Common::MemoryReadStreamEndian_mapFile
 
Fixed16 _playerActorScale
 
Common::String _txtFilename
 
Common::String _loadedText
 
Common::Queue< Action_actionQueue
 
AwayMission _awayMission
 
bool _warpHotspotsActive
 
int16 _activeWarpHotspot
 
int16 _activeDoorWarpHotspot
 
int16 _lookActionBitmapIndex
 
Item _itemList [NUM_OBJECTS]
 
Actor _actorList [NUM_ACTORS]
 
Actor *const _kirkActor
 
Actor *const _spockActor
 
Actor *const _mccoyActor
 
Actor *const _redshirtActor
 
FileStream _banFiles [MAX_BAN_FILES]
 
uint16 _banFileOffsets [MAX_BAN_FILES]
 
Sprite _inventoryIconSprite
 
Sprite _itemIconSprite
 
bool _objectHasWalkPosition
 
Common::Point _objectWalkPosition
 
Action _actionOnWalkCompletion [MAX_BUFFERED_WALK_ACTIONS]
 
bool _actionOnWalkCompletionInUse [MAX_BUFFERED_WALK_ACTIONS]
 
uint32 _clockTicks
 
uint32 _frameIndex
 
uint32 _roomFrameCounter
 
bool _musicEnabled
 
bool _sfxEnabled
 
uint16 _word_467a6
 
uint16 _musicWorking
 
bool _sfxWorking
 
bool _finishedPlayingSpeech
 
bool _mouseControllingShip
 
bool _keyboardControlsMouse
 
bool _inQuitGameMenu
 
bool _showSubtitles
 
byte _byte_45b3c
 
Sprite _starfieldSprite
 
Star _starList [NUM_STARS]
 
Point3 _starfieldPosition
 
int32 _starfieldPointDivisor
 
int16 _starfieldXVar1
 
int16 _starfieldYVar1
 
int16 _starfieldXVar2
 
int16 _starfieldYVar2
 
Common::Rect _starfieldRect
 
R3 _enterpriseR3
 
R3_r3List [NUM_SPACE_OBJECTS]
 
R3_orderedR3List [NUM_SPACE_OBJECTS]
 
Matrix _starPositionMatrix
 
Matrix _someMatrix
 
float _flt_50898
 
Graphics_gfx
 
Sound_sound
 
Console_console
 
IWFile_iwFile
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Private Member Functions

void playIntro ()
 
void initIntroR3ObjectToMove (R3 *r3, int16 srcAngle, int16 srcDepth, int16 destAngle, int16 destDepth, int16 ticks)
 Initializes an object to spawn at one position and move toward another position. More...
 
void loadSubtitleSprite (int index, Sprite *sprite)
 
void initStarfieldPosition ()
 
void initStarfield (int16 x, int16 y, int16 width, int16 height, int16 arg8)
 
void addR3 (R3 *r3)
 
void delR3 (R3 *r3)
 
void clearStarfieldPixels ()
 
void drawStarfield ()
 
void updateStarfieldAndShips (bool arg0)
 
R3sub_19f24 (R3 *r3)
 
void drawR3Shape (R3 *r3)
 
bool sub_1c022 (R3 *r3)
 
Point3 constructPoint3ForStarfield (int16 x, int16 y, int16 z)
 
Point3 matrixMult (const Matrix &weight, const Point3 &point)
 
Point3 matrixMult (const Point3 &point, const Matrix &weight)
 
int32 scaleSpacePosition (int32 x, int32 z)
 
Matrix initMatrix ()
 Creates an identity matrix. More...
 
Matrix initSpeedMatrixForXZMovement (Angle angle, const Matrix &matrix)
 

Private Attributes

Common::List< TrekEvent_eventQueue
 
bool _mouseMoveEventInQueue
 
bool _tickEventInQueue
 
uint32 _frameStartMillis
 
char _textInputBuffer [TEXT_INPUT_BUFFER_SIZE]
 
int16 _textInputCursorPos
 
char _textInputCursorChar
 
SharedPtr< Bitmap_textInputBitmapSkeleton
 
SharedPtr< Bitmap_textInputBitmap
 
Sprite _textInputSprite
 
int16 _textDisplayMode
 
uint32 _textboxVar2
 
uint16 _textboxVar6
 
bool _textboxHasMultipleChoices
 
Menu_activeMenu
 
bool _keyboardControlsMouseOutsideMenu
 
Common::RandomSource _randomSource
 
Common::SineTable _sineTable
 
Room_room
 
Common::MacResManager_macResFork
 

Friends

class Console
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsJoystick
}
 A feature in this context means an ability of the engine which can be either available or not. More...
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
 
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
 
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Detailed Description

Definition at line 227 of file startrek.h.

Constructor & Destructor Documentation

◆ StarTrekEngine()

StarTrek::StarTrekEngine::StarTrekEngine ( OSystem syst,
const StarTrekGameDescription gamedesc 
)

Definition at line 48 of file startrek.cpp.

◆ ~StarTrekEngine()

StarTrek::StarTrekEngine::~StarTrekEngine ( )
virtual

Definition at line 110 of file startrek.cpp.

Member Function Documentation

◆ actorFunc1()

void StarTrek::StarTrekEngine::actorFunc1 ( )

Definition at line 419 of file actors.cpp.

◆ actorWalkToPosition()

bool StarTrek::StarTrekEngine::actorWalkToPosition ( int  actorIndex,
const Common::String animFile,
int16  srcX,
int16  srcY,
int16  destX,
int16  destY 
)

Tries to make an actor walk to a position.

Returns true if successful in initiating the walk.

Definition at line 80 of file actors.cpp.

◆ addAction() [1/2]

void StarTrek::StarTrekEngine::addAction ( const Action action)

Definition at line 496 of file awaymission.cpp.

◆ addAction() [2/2]

void StarTrek::StarTrekEngine::addAction ( byte  type,
byte  b1,
byte  b2,
byte  b3 
)

Definition at line 502 of file awaymission.cpp.

◆ addCharToTextInputBuffer()

void StarTrek::StarTrekEngine::addCharToTextInputBuffer ( char  c)

Definition at line 694 of file textbox.cpp.

◆ addEventToQueue()

void StarTrek::StarTrekEngine::addEventToQueue ( const TrekEvent e)

Definition at line 166 of file events.cpp.

◆ addR3()

void StarTrek::StarTrekEngine::addR3 ( R3 r3)
private

Definition at line 50 of file space.cpp.

◆ atan2()

Angle StarTrek::StarTrekEngine::atan2 ( int32  deltaX,
int32  deltaZ 
)

Definition at line 48 of file math.cpp.

◆ awayMissionGetLookOrTalk()

void StarTrek::StarTrekEngine::awayMissionGetLookOrTalk ( int16  clickedObject)

Definition at line 449 of file awaymission.cpp.

◆ awayMissionLeftClick()

void StarTrek::StarTrekEngine::awayMissionLeftClick ( )

Definition at line 284 of file awaymission.cpp.

◆ awayMissionSelectAction()

void StarTrek::StarTrekEngine::awayMissionSelectAction ( bool  openActionMenu)

Called on right-click (select action), or when certain actions are otherwise selected (checks whether to show inventory icon, etc)

Definition at line 362 of file awaymission.cpp.

◆ awayMissionUseObject()

void StarTrek::StarTrekEngine::awayMissionUseObject ( int16  clickedObject)

Definition at line 391 of file awaymission.cpp.

◆ centerTextboxHeader()

String StarTrek::StarTrekEngine::centerTextboxHeader ( String  headerText)

Definition at line 139 of file textbox.cpp.

◆ checkItemInteractionExists()

bool StarTrek::StarTrekEngine::checkItemInteractionExists ( int  action,
int  activeItem,
int  passiveItem,
int16  arg6 
)

◆ checkKeyPressed()

bool StarTrek::StarTrekEngine::checkKeyPressed ( )

◆ checkTouchedLoadingZone()

void StarTrek::StarTrekEngine::checkTouchedLoadingZone ( int16  x,
int16  y 
)

Definition at line 701 of file awaymission.cpp.

◆ chooseActorDirectionForWalking()

void StarTrek::StarTrekEngine::chooseActorDirectionForWalking ( Actor actor,
int16  srcX,
int16  srcY,
int16  destX,
int16  destY 
)

Chooses a value for the actor's speed and direction, based on a source position and a destination position it's walking to.

Definition at line 541 of file actors.cpp.

◆ chooseMouseBitmapForAction()

void StarTrek::StarTrekEngine::chooseMouseBitmapForAction ( int  action,
bool  withRedOutline 
)

Sets the mouse bitmap based on which action is selected.

Definition at line 862 of file menu.cpp.

◆ chooseMousePositionFromSprites()

void StarTrek::StarTrekEngine::chooseMousePositionFromSprites ( Sprite sprites,
int  numSprites,
int  spriteIndex,
int  mode 
)

This chooses a sprite from the list to place the mouse cursor at.

The sprite it chooses may be, for example, the top-leftmost one in the list. Exact behaviour is determined by the "mode" parameter.

If "containMouseSprite" is a valid index, it's ensured that the mouse is contained within it. "mode" should be -1 in this case.

Definition at line 52 of file menu.cpp.

◆ cleanupAwayMission()

void StarTrek::StarTrekEngine::cleanupAwayMission ( )

Definition at line 72 of file awaymission.cpp.

◆ cleanupBridge()

void StarTrek::StarTrekEngine::cleanupBridge ( )
inline

Definition at line 244 of file startrek.h.

◆ cleanupTextInputSprite()

void StarTrek::StarTrekEngine::cleanupTextInputSprite ( )

Definition at line 917 of file textbox.cpp.

◆ clearEventBuffer()

void StarTrek::StarTrekEngine::clearEventBuffer ( )

◆ clearStarfieldPixels()

void StarTrek::StarTrekEngine::clearStarfieldPixels ( )
private

Definition at line 73 of file space.cpp.

◆ constructPoint3ForStarfield()

Point3 StarTrek::StarTrekEngine::constructPoint3ForStarfield ( int16  x,
int16  y,
int16  z 
)
private

Definition at line 506 of file space.cpp.

◆ cos()

Fixed14 StarTrek::StarTrekEngine::cos ( Angle  angle)

Definition at line 44 of file math.cpp.

◆ delR3()

void StarTrek::StarTrekEngine::delR3 ( R3 r3)
private

Definition at line 61 of file space.cpp.

◆ directPathExists()

bool StarTrek::StarTrekEngine::directPathExists ( int16  srcX,
int16  srcY,
int16  destX,
int16  destY 
)

Returns true if an actor can walk directly from a source position to a destination position without running into unwalkable terrain.

Definition at line 595 of file actors.cpp.

◆ disableMenuButtons()

void StarTrek::StarTrekEngine::disableMenuButtons ( uint32  bits)

Disables the given bitmask of buttons.

Definition at line 587 of file menu.cpp.

◆ drawActorToScreen()

void StarTrek::StarTrekEngine::drawActorToScreen ( Actor actor,
const Common::String animName,
int16  x,
int16  y,
Fixed8  scale,
bool  addSprite 
)

Definition at line 431 of file actors.cpp.

◆ drawMainText()

void StarTrek::StarTrekEngine::drawMainText ( TextBitmap bitmap,
int  numTextLines,
int  numTextboxLines,
const String text,
bool  withHeader 
)

Draws the "main" text (everything but the header at the top) to a TextBitmap.

Definition at line 579 of file textbox.cpp.

◆ drawMenuButtonOutline()

void StarTrek::StarTrekEngine::drawMenuButtonOutline ( SharedPtr< Bitmap bitmap,
byte  color 
)

Draws or removes the outline on menu buttons when the cursor hovers on them, or leaves them.

Definition at line 159 of file menu.cpp.

◆ drawR3Shape()

void StarTrek::StarTrekEngine::drawR3Shape ( R3 r3)
private

Definition at line 229 of file space.cpp.

◆ drawStarfield()

void StarTrek::StarTrekEngine::drawStarfield ( )
private

Definition at line 77 of file space.cpp.

◆ drawTextLineToBitmap()

void StarTrek::StarTrekEngine::drawTextLineToBitmap ( const char *  text,
int  textLen,
int  x,
int  y,
SharedPtr< Bitmap bitmap 
)

Draw a line of text to a standard bitmap (NOT a "TextBitmap", whose pixel array is an array of characters, but an actual standard bitmap).

Definition at line 83 of file textbox.cpp.

◆ enableMenuButtons()

void StarTrek::StarTrekEngine::enableMenuButtons ( uint32  bits)

Definition at line 599 of file menu.cpp.

◆ findObjectAt() [1/2]

int StarTrek::StarTrekEngine::findObjectAt ( int  x,
int  y 
)

Definition at line 648 of file actors.cpp.

◆ findObjectAt() [2/2]

int StarTrek::StarTrekEngine::findObjectAt ( Common::Point  p)
inline

Definition at line 398 of file startrek.h.

◆ getActorScaleAtPosition()

Fixed8 StarTrek::StarTrekEngine::getActorScaleAtPosition ( int16  y)

Definition at line 479 of file awaymission.cpp.

◆ getCrewmanAnimFilename()

Common::String StarTrek::StarTrekEngine::getCrewmanAnimFilename ( int  actorIndex,
const Common::String basename 
)

Definition at line 889 of file actors.cpp.

◆ getEventMan()

Common::EventManager* StarTrek::StarTrekEngine::getEventMan ( )
inline

Definition at line 467 of file startrek.h.

◆ getFeatures()

uint32 StarTrek::StarTrekEngine::getFeatures ( ) const

Definition at line 44 of file detection.cpp.

◆ getGameType()

uint8 StarTrek::StarTrekEngine::getGameType ( ) const

Definition at line 52 of file detection.cpp.

◆ getLanguage()

Common::Language StarTrek::StarTrekEngine::getLanguage ( ) const

Definition at line 56 of file detection.cpp.

◆ getLoadedText()

Common::String StarTrek::StarTrekEngine::getLoadedText ( int  textIndex)

".txt" files are just lists of strings.

This traverses the file to get a particular string index.

Definition at line 560 of file startrek.cpp.

◆ getMenuButtonAt()

int StarTrek::StarTrekEngine::getMenuButtonAt ( Sprite sprites,
int  numSprites,
int  x,
int  y 
)

Returns the index of the button at the given position, or -1 if none.

Definition at line 31 of file menu.cpp.

◆ getNextEvent()

bool StarTrek::StarTrekEngine::getNextEvent ( TrekEvent e,
bool  poll = true 
)

Returns false if there is no event waiting.

If "poll" is true, this always returns something (waits until an event occurs if necessary).

Definition at line 108 of file events.cpp.

◆ getNextTextLine()

const char * StarTrek::StarTrekEngine::getNextTextLine ( const char *  text,
char *  line,
int  lineWidth 
)

Gets one line of text (does not include words that won't fit).

Returns position of text to continue from, or nullptr if done.

Definition at line 33 of file textbox.cpp.

◆ getNumTextboxLines()

int StarTrek::StarTrekEngine::getNumTextboxLines ( const String str)

Returns the number of lines this string will take up in a textbox.

Definition at line 470 of file textbox.cpp.

◆ getPlatform()

Common::Platform StarTrek::StarTrekEngine::getPlatform ( ) const

Definition at line 48 of file detection.cpp.

◆ getRandomWord()

uint16 StarTrek::StarTrekEngine::getRandomWord ( )

Definition at line 556 of file startrek.cpp.

◆ getRepublicMapAreaAtMouse()

int StarTrek::StarTrekEngine::getRepublicMapAreaAtMouse ( )

Checks the mouse position to return and index for the area selected.

Definition at line 1205 of file menu.cpp.

◆ getRepublicMapAreaOrFailure()

int StarTrek::StarTrekEngine::getRepublicMapAreaOrFailure ( int16  turbolift)

Same as above, but returns 6 or 7 as error conditions (can't reach due to radiation or wrong turbolift).

Definition at line 1224 of file menu.cpp.

◆ getRoom()

Room * StarTrek::StarTrekEngine::getRoom ( )

Definition at line 492 of file awaymission.cpp.

◆ getSavegameFilename()

Common::String StarTrek::StarTrekEngine::getSavegameFilename ( int  slotId) const

Definition at line 393 of file saveload.cpp.

◆ getScreenName()

Common::String StarTrek::StarTrekEngine::getScreenName ( ) const
inline

Definition at line 674 of file startrek.h.

◆ getTextboxHeader()

void StarTrek::StarTrekEngine::getTextboxHeader ( String headerTextOutput,
String  speakerText,
int  choiceIndex 
)

Definition at line 152 of file textbox.cpp.

◆ handleAwayMissionAction()

void StarTrek::StarTrekEngine::handleAwayMissionAction ( )

Definition at line 507 of file awaymission.cpp.

◆ handleAwayMissionEvents()

void StarTrek::StarTrekEngine::handleAwayMissionEvents ( )

Definition at line 176 of file awaymission.cpp.

◆ handleMenuEvents()

int StarTrek::StarTrekEngine::handleMenuEvents ( uint32  ticksUntilClickingEnabled,
bool  inTextbox 
)

This returns either a special menu event (negative number) or the retval of the button clicked (usually an index, always positive).

Definition at line 603 of file menu.cpp.

◆ hideInventoryIcons()

void StarTrek::StarTrekEngine::hideInventoryIcons ( )

Definition at line 1055 of file actors.cpp.

◆ initActors()

void StarTrek::StarTrekEngine::initActors ( )

Definition at line 32 of file actors.cpp.

◆ initAwayCrewPositions()

void StarTrek::StarTrekEngine::initAwayCrewPositions ( int  warpEntryIndex)

Definition at line 118 of file awaymission.cpp.

◆ initAwayMission()

void StarTrek::StarTrekEngine::initAwayMission ( )

Definition at line 29 of file awaymission.cpp.

◆ initBridge()

void StarTrek::StarTrekEngine::initBridge ( bool  b)
inline

Definition at line 243 of file startrek.h.

◆ initializeEventsAndMouse()

void StarTrek::StarTrekEngine::initializeEventsAndMouse ( )

Definition at line 100 of file events.cpp.

◆ initIntroR3ObjectToMove()

void StarTrek::StarTrekEngine::initIntroR3ObjectToMove ( R3 r3,
int16  srcAngle,
int16  srcDepth,
int16  destAngle,
int16  destDepth,
int16  ticks 
)
private

Initializes an object to spawn at one position and move toward another position.

Parameters
ticksThe number of ticks it should take for the object to reach the destination

Definition at line 199 of file intro.cpp.

◆ initMatrix()

Matrix StarTrek::StarTrekEngine::initMatrix ( )
private

Creates an identity matrix.

Definition at line 539 of file space.cpp.

◆ initSpeedMatrixForXZMovement()

Matrix StarTrek::StarTrekEngine::initSpeedMatrixForXZMovement ( Angle  angle,
const Matrix matrix 
)
private

Definition at line 547 of file space.cpp.

◆ initStandAnim()

void StarTrek::StarTrekEngine::initStandAnim ( int  actorIndex)

Definition at line 493 of file actors.cpp.

◆ initStarfield()

void StarTrek::StarTrekEngine::initStarfield ( int16  x,
int16  y,
int16  width,
int16  height,
int16  arg8 
)
private

Definition at line 33 of file space.cpp.

◆ initStarfieldPosition()

void StarTrek::StarTrekEngine::initStarfieldPosition ( )
private

Definition at line 28 of file space.cpp.

◆ initStarfieldSprite()

void StarTrek::StarTrekEngine::initStarfieldSprite ( Sprite sprite,
Bitmap bitmap,
const Common::Rect rect 
)

Definition at line 1281 of file actors.cpp.

◆ initTextInputSprite()

void StarTrek::StarTrekEngine::initTextInputSprite ( int16  arg0,
int16  arg2,
const Common::String headerText 
)

Definition at line 828 of file textbox.cpp.

◆ initTextSprite()

TextBitmap * StarTrek::StarTrekEngine::initTextSprite ( int xoffsetPtr,
int yoffsetPtr,
byte  textColor,
int  numTextLines,
bool  withHeader,
Sprite sprite 
)

Creates a blank textbox in a TextBitmap, and initializes a sprite to use it.

Definition at line 505 of file textbox.cpp.

◆ isObjectUnusable()

bool StarTrek::StarTrekEngine::isObjectUnusable ( int  objectIndex,
int  action 
)

Return true if an object is unselectable with the given action?

Definition at line 1041 of file actors.cpp.

◆ isPointInPolygon()

bool StarTrek::StarTrekEngine::isPointInPolygon ( int16 data,
int16  x,
int16  y 
)

Returns true if the given position is contained in a polygon.

The data passed contains the following words in this order:

  • Index of polygon (unused here)
  • Number of vertices in polygon
  • For each vertex: x and y coordinates.

Definition at line 680 of file awaymission.cpp.

◆ isPositionSolid()

bool StarTrek::StarTrekEngine::isPositionSolid ( int16  x,
int16  y 
)

Returns true if the given position in the room is solid (not walkable).

Reads from a ".map" file which has a bit for each position in the room, which is true when that position is solid.

Definition at line 749 of file awaymission.cpp.

◆ loadActorAnim()

int StarTrek::StarTrekEngine::loadActorAnim ( int  actorIndex,
const Common::String animName,
int16  x,
int16  y,
Fixed8  scale 
)

Set an actor's animation, position, and scale.

Definition at line 44 of file actors.cpp.

◆ loadActorAnimWithRoomScaling()

int StarTrek::StarTrekEngine::loadActorAnimWithRoomScaling ( int  actorIndex,
const Common::String animName,
int16  x,
int16  y 
)

Similar to loadActorAnim, but scale is determined by the y-position in the room.

The further up (away) the object is, the smaller it is.

Definition at line 474 of file awaymission.cpp.

◆ loadAnimationFrame()

Bitmap * StarTrek::StarTrekEngine::loadAnimationFrame ( const Common::String filename,
Fixed8  scale 
)

Loads a bitmap for the animation frame with the given scale.

Definition at line 697 of file actors.cpp.

◆ loadBanFile()

void StarTrek::StarTrekEngine::loadBanFile ( const Common::String name)

Definition at line 67 of file actors.cpp.

◆ loadFile()

Common::MemoryReadStreamEndian * StarTrek::StarTrekEngine::loadFile ( Common::String  filename,
int  fileIndex = 0 
)

TODO:

  • Should return nullptr on failure to open a file?
  • This is supposed to cache results, return same FileStream on multiple accesses.
  • This is supposed to read from a "patches" folder which overrides files in the packed blob.

Definition at line 337 of file startrek.cpp.

◆ loadFileWithParams()

Common::MemoryReadStreamEndian * StarTrek::StarTrekEngine::loadFileWithParams ( Common::String  filename,
bool  unk1,
bool  unk2,
bool  unk3 
)

TODO: Figure out what the extra parameters are, and if they're important.

Definition at line 505 of file startrek.cpp.

◆ loadGame()

bool StarTrek::StarTrekEngine::loadGame ( int  slot)

Definition at line 115 of file saveload.cpp.

◆ loadMenuButtons()

void StarTrek::StarTrekEngine::loadMenuButtons ( String  mnuFilename,
int  xpos,
int  ypos 
)

Loads a .MNU file, which is a list of buttons to display.

Definition at line 497 of file menu.cpp.

◆ loadRoom()

void StarTrek::StarTrekEngine::loadRoom ( const Common::String missionName,
int  roomIndex 
)

Definition at line 76 of file awaymission.cpp.

◆ loadRoomIndex()

void StarTrek::StarTrekEngine::loadRoomIndex ( int  roomIndex,
int  spawnIndex 
)

Definition at line 756 of file awaymission.cpp.

◆ loadSubtitleSprite()

void StarTrek::StarTrekEngine::loadSubtitleSprite ( int  index,
Sprite sprite 
)
private

Definition at line 229 of file intro.cpp.

◆ loadTextDisplayMode()

int StarTrek::StarTrekEngine::loadTextDisplayMode ( )

Definition at line 1008 of file menu.cpp.

◆ matrixMult() [1/2]

Point3 StarTrek::StarTrekEngine::matrixMult ( const Matrix weight,
const Point3 point 
)
private

Definition at line 515 of file space.cpp.

◆ matrixMult() [2/2]

Point3 StarTrek::StarTrekEngine::matrixMult ( const Point3 point,
const Matrix weight 
)
private

Definition at line 525 of file space.cpp.

◆ playIntro()

void StarTrek::StarTrekEngine::playIntro ( )
private

Definition at line 27 of file intro.cpp.

◆ playMovie()

void StarTrek::StarTrekEngine::playMovie ( Common::String  filename)

Definition at line 509 of file startrek.cpp.

◆ playMovieMac()

void StarTrek::StarTrekEngine::playMovieMac ( Common::String  filename)

Definition at line 516 of file startrek.cpp.

◆ playTextAudio()

String StarTrek::StarTrekEngine::playTextAudio ( const String str)

Plays an audio prompt, if it exists, and returns the string starting at the end of the prompt.

Definition at line 227 of file textbox.cpp.

◆ pollEvents()

void StarTrek::StarTrekEngine::pollEvents ( bool  queueEvents = true)

Checks for all events, and updates Star Trek's event queue if queueEvents is set.

This does not account for "tick" events (getNextEvent/popNextEvent handle that).

Definition at line 27 of file events.cpp.

◆ popNextEvent()

bool StarTrek::StarTrekEngine::popNextEvent ( TrekEvent e,
bool  poll = true 
)

Definition at line 158 of file events.cpp.

◆ putTextIntoLines()

String StarTrek::StarTrekEngine::putTextIntoLines ( const String text)

Definition at line 483 of file textbox.cpp.

◆ readLineFormattedText()

String StarTrek::StarTrekEngine::readLineFormattedText ( TextGetterFunc  textGetter,
uintptr  var,
int  choiceIndex,
TextBitmap textBitmap,
int  numTextboxLines,
int numLines 
)

Definition at line 605 of file textbox.cpp.

◆ readTextFromArray()

String StarTrek::StarTrekEngine::readTextFromArray ( int  choiceIndex,
uintptr  data,
String headerTextOutput 
)

Text getter for showText which reads choices from an array of pointers.

Last element in the array must be an empty string.

Definition at line 636 of file textbox.cpp.

◆ readTextFromArrayWithChoices()

String StarTrek::StarTrekEngine::readTextFromArrayWithChoices ( int  choiceIndex,
uintptr  data,
String headerTextOutput 
)

Similar to above, but shows the choice index when multiple choices are present.

Effectively replaces the "readTextFromRdf" function.

Definition at line 652 of file textbox.cpp.

◆ readTextFromBuffer()

String StarTrek::StarTrekEngine::readTextFromBuffer ( int  choiceIndex,
uintptr  data,
String headerTextOutput 
)

◆ readTextFromRdf()

String StarTrek::StarTrekEngine::readTextFromRdf ( int  choiceIndex,
uintptr  data,
String headerTextOutput 
)

Text getter for showText which reads from an rdf file.

Not really used, since it would require hardcoding text locations in RDF files. "readTextFromArrayWithChoices" replaces this.

Definition at line 161 of file textbox.cpp.

◆ redrawTextInput()

void StarTrek::StarTrekEngine::redrawTextInput ( )

Definition at line 679 of file textbox.cpp.

◆ releaseAnim()

void StarTrek::StarTrekEngine::releaseAnim ( Actor actor)

Definition at line 475 of file actors.cpp.

◆ removeActorFromScreen()

void StarTrek::StarTrekEngine::removeActorFromScreen ( int  actorIndex)

Definition at line 403 of file actors.cpp.

◆ removeNextEvent()

void StarTrek::StarTrekEngine::removeNextEvent ( )

Definition at line 144 of file events.cpp.

◆ renderBan()

void StarTrek::StarTrekEngine::renderBan ( byte pixelDest,
FileStream  file 
)

Definition at line 284 of file actors.cpp.

◆ renderBanAboveSprites()

void StarTrek::StarTrekEngine::renderBanAboveSprites ( )

Definition at line 321 of file actors.cpp.

◆ renderBanBelowSprites()

void StarTrek::StarTrekEngine::renderBanBelowSprites ( )

".BAN" files relate to drawing background animations, ie.

flashing computer lights. "renderBanBelowSprites()" does the work of drawing it, while "renderBanAboveSprites()" redraws sprites above them if necessary.

Definition at line 248 of file actors.cpp.

◆ run()

Common::Error StarTrek::StarTrekEngine::run ( )
virtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 120 of file startrek.cpp.

◆ runAwayMission()

void StarTrek::StarTrekEngine::runAwayMission ( )

Definition at line 47 of file awaymission.cpp.

◆ runGameMode()

Common::Error StarTrek::StarTrekEngine::runGameMode ( int  mode,
bool  resume 
)

Definition at line 168 of file startrek.cpp.

◆ runTransportSequence()

void StarTrek::StarTrekEngine::runTransportSequence ( const Common::String name)

Definition at line 254 of file startrek.cpp.

◆ saveGame()

bool StarTrek::StarTrekEngine::saveGame ( int  slot,
Common::String  desc 
)

Definition at line 80 of file saveload.cpp.

◆ saveOrLoadGameData()

bool StarTrek::StarTrekEngine::saveOrLoadGameData ( Common::SeekableReadStream in,
Common::WriteStream out,
SavegameMetadata meta 
)

Call this after loading "saveOrLoadMetadata" to load all the data pertaining to game execution.

Definition at line 169 of file saveload.cpp.

◆ saveTextDisplayMode()

void StarTrek::StarTrekEngine::saveTextDisplayMode ( int  value)

Definition at line 1011 of file menu.cpp.

◆ scaleBitmap()

Bitmap * StarTrek::StarTrekEngine::scaleBitmap ( Bitmap bitmap,
Fixed8  scale 
)

Definition at line 1292 of file actors.cpp.

◆ scaleBitmapRow()

void StarTrek::StarTrekEngine::scaleBitmapRow ( byte src,
byte dest,
uint16  origWidth,
uint16  scaledWidth 
)

This takes a row of an unscaled bitmap, and copies it to a row of a scaled bitmap.

This was heavily optimized in the original game (manually constructed an unrolled loop).

Definition at line 1368 of file actors.cpp.

◆ scaleSpacePosition()

int32 StarTrek::StarTrekEngine::scaleSpacePosition ( int32  x,
int32  z 
)
private

Definition at line 535 of file space.cpp.

◆ selectObjectForUseAction()

int StarTrek::StarTrekEngine::selectObjectForUseAction ( )

Called when the "get" action is first selected.

Returns a selected object. This behaves like other menus in that it holds game execution, but no actual menu pops up; it just waits for the player to select something on the screen.

Definition at line 799 of file actors.cpp.

◆ setVisibleMenuButtons()

void StarTrek::StarTrekEngine::setVisibleMenuButtons ( uint32  bits)

Sets which buttons are visible based on the given bitmask.

Definition at line 545 of file menu.cpp.

◆ showActionMenu()

int StarTrek::StarTrekEngine::showActionMenu ( )

Show the "action selection" menu, ie.

look, talk, etc.

Definition at line 253 of file menu.cpp.

◆ showCodeInputBox()

Common::String StarTrek::StarTrekEngine::showCodeInputBox ( )

Definition at line 674 of file textbox.cpp.

◆ showGameOverMenu()

void StarTrek::StarTrekEngine::showGameOverMenu ( )

Definition at line 945 of file menu.cpp.

◆ showInventoryIcons()

void StarTrek::StarTrekEngine::showInventoryIcons ( bool  showItem)

Definition at line 997 of file actors.cpp.

◆ showInventoryMenu()

int StarTrek::StarTrekEngine::showInventoryMenu ( int  x,
int  y,
bool  restoreMouse 
)

Definition at line 1117 of file actors.cpp.

◆ showLoadMenu()

bool StarTrek::StarTrekEngine::showLoadMenu ( )

Definition at line 63 of file saveload.cpp.

◆ showOptionsMenu()

void StarTrek::StarTrekEngine::showOptionsMenu ( int  x,
int  y 
)

Definition at line 183 of file menu.cpp.

◆ showQuitGamePrompt()

void StarTrek::StarTrekEngine::showQuitGamePrompt ( int  x,
int  y 
)

Definition at line 924 of file menu.cpp.

◆ showRepublicMap()

void StarTrek::StarTrekEngine::showRepublicMap ( int16  arg0,
int16  turbolift 
)

Show the republic map, only used in mission 7.

Definition at line 1015 of file menu.cpp.

◆ showSaveMenu()

bool StarTrek::StarTrekEngine::showSaveMenu ( )

Definition at line 37 of file saveload.cpp.

◆ showText()

int StarTrek::StarTrekEngine::showText ( TextGetterFunc  textGetter,
uintptr  var,
int  xoffset,
int  yoffset,
int  textColor,
bool  loopChoices,
int  maxTextLines,
bool  rclickCancelsChoice 
)
Parameters
rclickCancelsChoiceIf true, right-clicks return "-1" as choice instead of whatever was selected.

Definition at line 248 of file textbox.cpp.

◆ showTextbox()

void StarTrek::StarTrekEngine::showTextbox ( String  headerText,
const String mainText,
int  xoffset,
int  yoffset,
byte  textColor,
int  maxTextLines 
)

Shows text with the given header and main text.

Definition at line 187 of file textbox.cpp.

◆ showTextConfigurationMenu()

void StarTrek::StarTrekEngine::showTextConfigurationMenu ( bool  fromOptionMenu)

This can be called from startup or from the options menu.

On startup, this tries to load the setting without user input.

Definition at line 980 of file menu.cpp.

◆ showTextInputBox()

Common::String StarTrek::StarTrekEngine::showTextInputBox ( int16  arg0,
int16  arg2,
const Common::String headerText 
)

Shows a textbox that the player can type a string into.

Definition at line 706 of file textbox.cpp.

◆ sin()

Fixed14 StarTrek::StarTrekEngine::sin ( Angle  angle)

Unit of the angle is "quadrants" (90 degrees = 1.0)

Definition at line 27 of file math.cpp.

◆ skipTextAudioPrompt()

String StarTrek::StarTrekEngine::skipTextAudioPrompt ( const String str)

Definition at line 211 of file textbox.cpp.

◆ sub_19f24()

R3 * StarTrek::StarTrekEngine::sub_19f24 ( R3 r3)
private

Definition at line 211 of file space.cpp.

◆ sub_1c022()

bool StarTrek::StarTrekEngine::sub_1c022 ( R3 r3)
private

Definition at line 499 of file space.cpp.

◆ unloadMenuButtons()

void StarTrek::StarTrekEngine::unloadMenuButtons ( )

Definition at line 833 of file menu.cpp.

◆ unloadRoom()

void StarTrek::StarTrekEngine::unloadRoom ( )

Definition at line 462 of file awaymission.cpp.

◆ updateActorAnimations()

void StarTrek::StarTrekEngine::updateActorAnimations ( )

Definition at line 133 of file actors.cpp.

◆ updateActorPositionWhileWalking()

void StarTrek::StarTrekEngine::updateActorPositionWhileWalking ( Actor actor,
int16  x,
int16  y 
)

Definition at line 524 of file actors.cpp.

◆ updateAwayMissionTimers()

void StarTrek::StarTrekEngine::updateAwayMissionTimers ( )

Updates any nonzero away mission timers, and invokes ACTION_TIMER_EXPIRED when any one reaches 0.

Definition at line 739 of file awaymission.cpp.

◆ updateClockTicks()

void StarTrek::StarTrekEngine::updateClockTicks ( )

◆ updateCrewmanGetupTimers()

void StarTrek::StarTrekEngine::updateCrewmanGetupTimers ( )

When a crewman is collapsed, they get once a timer reaches 0.

Definition at line 1077 of file actors.cpp.

◆ updateEvents()

void StarTrek::StarTrekEngine::updateEvents ( )

◆ updateKeyboardEvents()

void StarTrek::StarTrekEngine::updateKeyboardEvents ( )

◆ updateMouseBitmap()

void StarTrek::StarTrekEngine::updateMouseBitmap ( )

Checks whether to change the mouse bitmap to have the red outline.

Definition at line 895 of file actors.cpp.

◆ updateMouseEvents()

void StarTrek::StarTrekEngine::updateMouseEvents ( )

◆ updateStarfieldAndShips()

void StarTrek::StarTrekEngine::updateStarfieldAndShips ( bool  arg0)
private

Definition at line 149 of file space.cpp.

◆ updateTimerEvent()

void StarTrek::StarTrekEngine::updateTimerEvent ( )

◆ waitForNextTick()

void StarTrek::StarTrekEngine::waitForNextTick ( bool  queueEvents = true)

Definition at line 80 of file events.cpp.

◆ walkActiveObjectToHotspot()

bool StarTrek::StarTrekEngine::walkActiveObjectToHotspot ( )

Checks whether to walk a crewman to a hotspot (the last one obtained from a "findObjectAt" call).

Definition at line 937 of file actors.cpp.

Friends And Related Function Documentation

◆ Console

friend class Console
friend

Definition at line 234 of file startrek.h.

Member Data Documentation

◆ _actionOnWalkCompletion

Action StarTrek::StarTrekEngine::_actionOnWalkCompletion[MAX_BUFFERED_WALK_ACTIONS]

Definition at line 732 of file startrek.h.

◆ _actionOnWalkCompletionInUse

bool StarTrek::StarTrekEngine::_actionOnWalkCompletionInUse[MAX_BUFFERED_WALK_ACTIONS]

Definition at line 733 of file startrek.h.

◆ _actionQueue

Common::Queue<Action> StarTrek::StarTrekEngine::_actionQueue

Definition at line 700 of file startrek.h.

◆ _activeDoorWarpHotspot

int16 StarTrek::StarTrekEngine::_activeDoorWarpHotspot

Definition at line 705 of file startrek.h.

◆ _activeMenu

Menu* StarTrek::StarTrekEngine::_activeMenu
private

Definition at line 645 of file startrek.h.

◆ _activeWarpHotspot

int16 StarTrek::StarTrekEngine::_activeWarpHotspot

Definition at line 704 of file startrek.h.

◆ _actorList

Actor StarTrek::StarTrekEngine::_actorList[NUM_ACTORS]

Definition at line 710 of file startrek.h.

◆ _awayMission

AwayMission StarTrek::StarTrekEngine::_awayMission

Definition at line 702 of file startrek.h.

◆ _banFileOffsets

uint16 StarTrek::StarTrekEngine::_banFileOffsets[MAX_BAN_FILES]

Definition at line 719 of file startrek.h.

◆ _banFiles

FileStream StarTrek::StarTrekEngine::_banFiles[MAX_BAN_FILES]

Definition at line 718 of file startrek.h.

◆ _byte_45b3c

byte StarTrek::StarTrekEngine::_byte_45b3c

Definition at line 758 of file startrek.h.

◆ _clockTicks

uint32 StarTrek::StarTrekEngine::_clockTicks

Definition at line 737 of file startrek.h.

◆ _console

Console* StarTrek::StarTrekEngine::_console

Definition at line 777 of file startrek.h.

◆ _enterpriseR3

R3 StarTrek::StarTrekEngine::_enterpriseR3

Definition at line 768 of file startrek.h.

◆ _eventQueue

Common::List<TrekEvent> StarTrek::StarTrekEngine::_eventQueue
private

Definition at line 472 of file startrek.h.

◆ _finishedPlayingSpeech

bool StarTrek::StarTrekEngine::_finishedPlayingSpeech

Definition at line 746 of file startrek.h.

◆ _flt_50898

float StarTrek::StarTrekEngine::_flt_50898

Definition at line 773 of file startrek.h.

◆ _frameIndex

uint32 StarTrek::StarTrekEngine::_frameIndex

Definition at line 738 of file startrek.h.

◆ _frameStartMillis

uint32 StarTrek::StarTrekEngine::_frameStartMillis
private

Definition at line 475 of file startrek.h.

◆ _gameDescription

const StarTrekGameDescription* StarTrek::StarTrekEngine::_gameDescription

Definition at line 667 of file startrek.h.

◆ _gameMode

int StarTrek::StarTrekEngine::_gameMode

Definition at line 680 of file startrek.h.

◆ _gfx

Graphics* StarTrek::StarTrekEngine::_gfx

Definition at line 775 of file startrek.h.

◆ _inQuitGameMenu

bool StarTrek::StarTrekEngine::_inQuitGameMenu

Definition at line 755 of file startrek.h.

◆ _inventoryIconSprite

Sprite StarTrek::StarTrekEngine::_inventoryIconSprite

Definition at line 721 of file startrek.h.

◆ _itemIconSprite

Sprite StarTrek::StarTrekEngine::_itemIconSprite

Definition at line 722 of file startrek.h.

◆ _itemList

Item StarTrek::StarTrekEngine::_itemList[NUM_OBJECTS]

Definition at line 708 of file startrek.h.

◆ _iwFile

IWFile* StarTrek::StarTrekEngine::_iwFile

Definition at line 778 of file startrek.h.

◆ _keyboardControlsMouse

bool StarTrek::StarTrekEngine::_keyboardControlsMouse

Definition at line 753 of file startrek.h.

◆ _keyboardControlsMouseOutsideMenu

bool StarTrek::StarTrekEngine::_keyboardControlsMouseOutsideMenu
private

Definition at line 647 of file startrek.h.

◆ _kirkActor

Actor* const StarTrek::StarTrekEngine::_kirkActor

Definition at line 711 of file startrek.h.

◆ _lastGameMode

int StarTrek::StarTrekEngine::_lastGameMode

Definition at line 681 of file startrek.h.

◆ _loadedText

Common::String StarTrek::StarTrekEngine::_loadedText

Definition at line 697 of file startrek.h.

◆ _lookActionBitmapIndex

int16 StarTrek::StarTrekEngine::_lookActionBitmapIndex

Definition at line 706 of file startrek.h.

◆ _macResFork

Common::MacResManager* StarTrek::StarTrekEngine::_macResFork
private

Definition at line 784 of file startrek.h.

◆ _mapFile

Common::MemoryReadStreamEndian* StarTrek::StarTrekEngine::_mapFile

Definition at line 693 of file startrek.h.

◆ _mccoyActor

Actor* const StarTrek::StarTrekEngine::_mccoyActor

Definition at line 713 of file startrek.h.

◆ _missionName

Common::String StarTrek::StarTrekEngine::_missionName

Definition at line 691 of file startrek.h.

◆ _missionToLoad

Common::String StarTrek::StarTrekEngine::_missionToLoad

Definition at line 687 of file startrek.h.

◆ _mouseControllingShip

bool StarTrek::StarTrekEngine::_mouseControllingShip

Definition at line 748 of file startrek.h.

◆ _mouseMoveEventInQueue

bool StarTrek::StarTrekEngine::_mouseMoveEventInQueue
private

Definition at line 473 of file startrek.h.

◆ _musicEnabled

bool StarTrek::StarTrekEngine::_musicEnabled

Definition at line 741 of file startrek.h.

◆ _musicWorking

uint16 StarTrek::StarTrekEngine::_musicWorking

Definition at line 744 of file startrek.h.

◆ _objectHasWalkPosition

bool StarTrek::StarTrekEngine::_objectHasWalkPosition

Definition at line 726 of file startrek.h.

◆ _objectWalkPosition

Common::Point StarTrek::StarTrekEngine::_objectWalkPosition

Definition at line 727 of file startrek.h.

◆ _orderedR3List

R3* StarTrek::StarTrekEngine::_orderedR3List[NUM_SPACE_OBJECTS]

Definition at line 770 of file startrek.h.

◆ _playerActorScale

Fixed16 StarTrek::StarTrekEngine::_playerActorScale

Definition at line 694 of file startrek.h.

◆ _r3List

R3* StarTrek::StarTrekEngine::_r3List[NUM_SPACE_OBJECTS]

Definition at line 769 of file startrek.h.

◆ _randomSource

Common::RandomSource StarTrek::StarTrekEngine::_randomSource
private

Definition at line 781 of file startrek.h.

◆ _redshirtActor

Actor* const StarTrek::StarTrekEngine::_redshirtActor

Definition at line 714 of file startrek.h.

◆ _resetGameMode

bool StarTrek::StarTrekEngine::_resetGameMode

Definition at line 682 of file startrek.h.

◆ _room

Room* StarTrek::StarTrekEngine::_room
private

Definition at line 783 of file startrek.h.

◆ _roomFrameCounter

uint32 StarTrek::StarTrekEngine::_roomFrameCounter

Definition at line 739 of file startrek.h.

◆ _roomIndex

int StarTrek::StarTrekEngine::_roomIndex

Definition at line 692 of file startrek.h.

◆ _roomIndexToLoad

int StarTrek::StarTrekEngine::_roomIndexToLoad

Definition at line 688 of file startrek.h.

◆ _sfxEnabled

bool StarTrek::StarTrekEngine::_sfxEnabled

Definition at line 742 of file startrek.h.

◆ _sfxWorking

bool StarTrek::StarTrekEngine::_sfxWorking

Definition at line 745 of file startrek.h.

◆ _showSubtitles

bool StarTrek::StarTrekEngine::_showSubtitles

Definition at line 756 of file startrek.h.

◆ _sineTable

Common::SineTable StarTrek::StarTrekEngine::_sineTable
private

Definition at line 782 of file startrek.h.

◆ _someMatrix

Matrix StarTrek::StarTrekEngine::_someMatrix

Definition at line 772 of file startrek.h.

◆ _sound

Sound* StarTrek::StarTrekEngine::_sound

Definition at line 776 of file startrek.h.

◆ _spawnIndexToLoad

int StarTrek::StarTrekEngine::_spawnIndexToLoad

Definition at line 689 of file startrek.h.

◆ _spockActor

Actor* const StarTrek::StarTrekEngine::_spockActor

Definition at line 712 of file startrek.h.

◆ _starfieldPointDivisor

int32 StarTrek::StarTrekEngine::_starfieldPointDivisor

Definition at line 764 of file startrek.h.

◆ _starfieldPosition

Point3 StarTrek::StarTrekEngine::_starfieldPosition

Definition at line 763 of file startrek.h.

◆ _starfieldRect

Common::Rect StarTrek::StarTrekEngine::_starfieldRect

Definition at line 767 of file startrek.h.

◆ _starfieldSprite

Sprite StarTrek::StarTrekEngine::_starfieldSprite

Definition at line 761 of file startrek.h.

◆ _starfieldXVar1

int16 StarTrek::StarTrekEngine::_starfieldXVar1

Definition at line 765 of file startrek.h.

◆ _starfieldXVar2

int16 StarTrek::StarTrekEngine::_starfieldXVar2

Definition at line 766 of file startrek.h.

◆ _starfieldYVar1

int16 StarTrek::StarTrekEngine::_starfieldYVar1

Definition at line 765 of file startrek.h.

◆ _starfieldYVar2

int16 StarTrek::StarTrekEngine::_starfieldYVar2

Definition at line 766 of file startrek.h.

◆ _starList

Star StarTrek::StarTrekEngine::_starList[NUM_STARS]

Definition at line 762 of file startrek.h.

◆ _starPositionMatrix

Matrix StarTrek::StarTrekEngine::_starPositionMatrix

Definition at line 771 of file startrek.h.

◆ _textboxHasMultipleChoices

bool StarTrek::StarTrekEngine::_textboxHasMultipleChoices
private

Definition at line 644 of file startrek.h.

◆ _textboxVar2

uint32 StarTrek::StarTrekEngine::_textboxVar2
private

Definition at line 642 of file startrek.h.

◆ _textboxVar6

uint16 StarTrek::StarTrekEngine::_textboxVar6
private

Definition at line 643 of file startrek.h.

◆ _textDisplayMode

int16 StarTrek::StarTrekEngine::_textDisplayMode
private

Definition at line 641 of file startrek.h.

◆ _textInputBitmap

SharedPtr<Bitmap> StarTrek::StarTrekEngine::_textInputBitmap
private

Definition at line 562 of file startrek.h.

◆ _textInputBitmapSkeleton

SharedPtr<Bitmap> StarTrek::StarTrekEngine::_textInputBitmapSkeleton
private

Definition at line 561 of file startrek.h.

◆ _textInputBuffer

char StarTrek::StarTrekEngine::_textInputBuffer[TEXT_INPUT_BUFFER_SIZE]
private

Definition at line 558 of file startrek.h.

◆ _textInputCursorChar

char StarTrek::StarTrekEngine::_textInputCursorChar
private

Definition at line 560 of file startrek.h.

◆ _textInputCursorPos

int16 StarTrek::StarTrekEngine::_textInputCursorPos
private

Definition at line 559 of file startrek.h.

◆ _textInputSprite

Sprite StarTrek::StarTrekEngine::_textInputSprite
private

Definition at line 563 of file startrek.h.

◆ _tickEventInQueue

bool StarTrek::StarTrekEngine::_tickEventInQueue
private

Definition at line 474 of file startrek.h.

◆ _txtFilename

Common::String StarTrek::StarTrekEngine::_txtFilename

Definition at line 696 of file startrek.h.

◆ _warpHotspotsActive

bool StarTrek::StarTrekEngine::_warpHotspotsActive

Definition at line 703 of file startrek.h.

◆ _word_467a6

uint16 StarTrek::StarTrekEngine::_word_467a6

Definition at line 743 of file startrek.h.


The documentation for this class was generated from the following files: