ScummVM API documentation
StarTrek Namespace Reference

Classes

struct  Action
 
struct  Actor
 
struct  Bitmap
 
struct  ComputerTopic
 
class  Console
 
struct  EnterpriseState
 
class  Font
 
class  Graphics
 
struct  Item
 
class  IWFile
 
struct  Menu
 
struct  MidiPlaybackSlot
 
struct  R3
 
class  Resource
 
struct  ResourceIndex
 
class  Room
 
struct  RoomAction
 
struct  RoomText
 
struct  RoomTextOffsets
 
struct  SavegameMetadata
 
class  Sound
 
class  Sprite
 
struct  Star
 
class  StarTrekEngine
 
struct  StarTrekGameDescription
 
struct  StubBitmap
 
struct  TextBitmap
 
class  TFixedInt
 
struct  TMatrix
 
struct  TPoint
 
struct  TrekEvent
 

Typedefs

typedef TFixedInt< int16, 16, 14 > Fixed14
 
typedef TFixedInt< int16, 16, 8 > Fixed8
 
typedef TFixedInt< int32, 32, 16 > Fixed16
 
typedef Fixed8 Angle
 
typedef Common::SharedPtr< Common::MemoryReadStreamEndianFileStream
 
typedef TPoint< int32 > Point3
 
typedef TPoint< int16 > Point3_Short
 
typedef TPoint< Fixed14Point_Fixed14
 
typedef TMatrix< Point_Fixed14Matrix
 
typedef String(StarTrekEngine::* TextGetterFunc) (int, uintptr, String *)
 
typedef int32 TextRef
 

Enumerations

enum  ActionTypes {
  ACTION_TICK = 0, ACTION_WALK = 1, ACTION_USE = 2, ACTION_GET = 3,
  ACTION_LOOK = 4, ACTION_TALK = 5, ACTION_TOUCHED_WARP = 6, ACTION_TOUCHED_HOTSPOT = 7,
  ACTION_TIMER_EXPIRED = 8, ACTION_DONE_ANIM = 10, ACTION_DONE_WALK = 12, ACTION_FINISHED_ANIMATION = 10,
  ACTION_FINISHED_WALKING = 12, ACTION_OPTIONS = 13, ACTION_LIST_END = -1
}
 
enum  BridgeMenuEvent {
  kBridgeNone = -1, kBridgeKirkCommand = 0, kBridgeUnk1 = 1, kBridgeUnk2 = 2,
  kBridgeStarfieldFullScreen = 3, kBridgeKirkCaptainsLog = 16, kBridgeKirkTransporter = 17, kBridgeKirkOptions = 18,
  kBridgeSpock = 32, kBridgeSpockComputer = 33, kBridgeScottyDamageControl = 48, kBridgeScottyEmergencyPower = 49,
  kBridgeUhura = 64, kBridgeSuluOrbit = 80, kBridgeSuluShields = 81, kBridgeChekovNavigation = 96,
  kBridgeChekovWeapons = 97, kBridgeChekovRepairShields = 112, kBridgeChekovRepairPhasers = 113, kBridgeChekovRepairPhotonTorpedoes = 114,
  kBridgeChekovRepairSensors = 115, kBridgeChekovRepairBridge = 116, kBridgeChekovRepairHull = 117, kBridgeChekovRepairWarpDrives = 118,
  kBridgeSuluTargetAnalysis = 119
}
 
enum  Planet {
  kPlanetNone = -1, kPlanetCenturius = 0, kPlanetCameronsStar = 1, kPlanetArk7 = 2,
  kPlanetHarlequin = 3, kPlanetHarrapa = 4, kPlanetElasiPrime = 5, kPlanetDigifal = 6,
  kPlanetStrahkeer = 7, kPlanetHrakkour = 8, kPlanetTriRhoNautica = 9, kPlanetShivaOmicron = 10,
  kPlanetAlphaProxima = 11, kPlanetOmegaMaelstrom = 12, kPlanetArgosIV = 13, kPlanetBetaMyamid = 14,
  kPlanetSirius = 15, kPlanetSigmaZhukova = 16, kPlanetCastor = 17, kPlanetPollux = 18,
  kPlanetChristgen = 19
}
 
enum  BridgeTalkers {
  kBridgeTalkerNone = -1, kBridgeTalkerKirk = 0, kBridgeTalkerSpock, kBridgeTalkerSulu,
  kBridgeTalkerChekov, kBridgeTalkerUhura, kBridgeTalkerScotty, kBridgeTalkerMcCoy,
  kBridgeTalkerCaptainsLog, kBridgeTalkerElasiCaptain, kBridgeTalkerElasiCereth, kBridgeTalkerAutobeacon,
  kBridgeTalkerHarryMuddsVoice, kBridgeTalkerHarryMudd, kBridgeTalkerTaraz, kBridgeTalkerAdmiralKenka,
  kBridgeTalkerKallarax
}
 
enum  RandomEncounterType { kRandomEncounterNone = 0, kRandomEncounterKlingon = 1, kRandomEncounterRomulan = 2, kRandomEncounterElasi = 3 }
 
enum  BridgeSequence {
  kSeqNone = -1, kSeqStartMissionDemon = 0, kSeqEndMockBattle = 1, kSeqShowDebriefDemon = 2,
  kSeqArrivedAtPolluxV = 3, kSeqEndMissionDemon = 4, kSeqStartMissionTug = 5, kSeqStartElasiPirateBattle = 6,
  kSeqArrivedAtBetaMyamid = 7, kSeqApproachedTheMasada = 8, kSeqEndMissionTug = 9, kSeqStartMissionLove = 10,
  kSeqAfterLoveDebrief = 11, kSeqStartRomulanBattle = 12, kSeqAfterRomulanBattle = 13, kSeqArrivedAtArk7 = 14,
  kSeqEndMissionLove = 15, kSeqStartMissionMudd = 16, kSeqFightElasiShipsAndContactMudd = 17, kSeqEndMissionMudd = 18,
  kSeqStartMissionFeather = 19, kSeqUnk20 = 20, kSeqEndMissionFeather = 21, kSeqStartMissionTrial = 22,
  kSeqEndMissionTrial = 23, kSeqStartMissionSins = 24, kSeqEndMissionSins = 25, kSeqStartMissionVeng = 26,
  kSeqEndMissionVengAndGame = 27
}
 
enum  StarTrekGameType { GType_ST25 = 1, GType_STJR = 2 }
 
enum  StarTrekGameFeatures { GF_DEMO = (1 << 0), GF_CDROM = (1 << 1) }
 
enum  Items {
  OBJECT_IPHASERS = 64, OBJECT_IPHASERK, OBJECT_IHAND, OBJECT_IROCK,
  OBJECT_ISTRICOR, OBJECT_IMTRICOR, OBJECT_IDEADGUY, OBJECT_ICOMM,
  OBJECT_IPBC, OBJECT_IRLG, OBJECT_IWRENCH, OBJECT_IINSULAT,
  OBJECT_ISAMPLE, OBJECT_ICURE, OBJECT_IDISHES, OBJECT_IRT,
  OBJECT_IRTWB, OBJECT_ICOMBBIT, OBJECT_IJNKMETL, OBJECT_IWIRING,
  OBJECT_IWIRSCRP, OBJECT_IPWF, OBJECT_IPWE, OBJECT_IDEADPH,
  OBJECT_IBOMB, OBJECT_IMETAL, OBJECT_ISKULL, OBJECT_IMINERAL,
  OBJECT_IMETEOR, OBJECT_ISHELLS, OBJECT_IDEGRIME, OBJECT_ILENSES,
  OBJECT_IDISKS, OBJECT_IANTIGRA, OBJECT_IN2GAS, OBJECT_IO2GAS,
  OBJECT_IH2GAS, OBJECT_IN2O, OBJECT_INH3, OBJECT_IH2O,
  OBJECT_IWROD, OBJECT_IIROD, OBJECT_IREDGEM1, OBJECT_IREDGEM2,
  OBJECT_IREDGEM3, OBJECT_IGRNGEM1, OBJECT_IGRNGEM2, OBJECT_IGRNGEM3,
  OBJECT_IBLUGEM1, OBJECT_IBLUGEM2, OBJECT_IBLUGEM3, OBJECT_ICONECT,
  OBJECT_IS8ROCKS, OBJECT_IIDCARD, OBJECT_ISNAKE, OBJECT_IFERN,
  OBJECT_ICRYSTAL, OBJECT_IKNIFE, OBJECT_IDETOXIN, OBJECT_IBERRY,
  OBJECT_IDOOVER, OBJECT_IALIENDV, OBJECT_ICAPSULE, OBJECT_IMEDKIT,
  OBJECT_IBEAM, OBJECT_IDRILL, OBJECT_IHYPO, OBJECT_IFUSION,
  OBJECT_ICABLE1, OBJECT_ICABLE2, OBJECT_ILMD, OBJECT_IDECK,
  OBJECT_ITECH
}
 
enum  Directions { DIR_N = 0, DIR_S = 1, DIR_E = 2, DIR_W = 3 }
 
enum  Objects {
  OBJECT_KIRK = 0, OBJECT_SPOCK = 1, OBJECT_MCCOY = 2, OBJECT_REDSHIRT = 3,
  OBJECT_INVENTORY_ICON = 31
}
 
enum  kDebugLevels {
  kDebugSound = 1 << 0, kDebugGraphics = 1 << 1, kDebugSavegame = 1 << 2, kDebugSpace = 1 << 3,
  kDebugGeneral = 1 << 4
}
 
enum  GameMode {
  GAMEMODE_START = 0, GAMEMODE_BRIDGE, GAMEMODE_AWAYMISSION, GAMEMODE_BEAMDOWN,
  GAMEMODE_BEAMUP
}
 
enum  TextDisplayMode { TEXTDISPLAY_WAIT = 0, TEXTDISPLAY_SUBTITLES, TEXTDISPLAY_NONE }
 
enum  TextColor { TEXTCOLOR_GREY = 0x88, TEXTCOLOR_RED = 0xa1, TEXTCOLOR_YELLOW = 0xb0, TEXTCOLOR_BLUE = 0xc0 }
 
enum  MenuEvent { MENUEVENT_RCLICK_OFFBUTTON = -4, MENUEVENT_ENABLEINPUT, MENUEVENT_RCLICK_ONBUTTON, MENUEVENT_LCLICK_OFFBUTTON }
 
enum  TextButtons {
  TEXTBUTTON_CONFIRM = 0, TEXTBUTTON_SCROLLUP, TEXTBUTTON_SCROLLDOWN, TEXTBUTTON_PREVCHOICE,
  TEXTBUTTON_NEXTCHOICE, TEXTBUTTON_SCROLLUP_ONELINE, TEXTBUTTON_SCROLLDOWN_ONELINE, TEXTBUTTON_GOTO_TOP,
  TEXTBUTTON_GOTO_BOTTOM, TEXTBUTTON_SPEECH_DONE
}
 
enum  OptionMenuButtons {
  OPTIONBUTTON_TEXT, OPTIONBUTTON_SAVE, OPTIONBUTTON_LOAD, OPTIONBUTTON_ENABLEMUSIC,
  OPTIONBUTTON_DISABLEMUSIC, OPTIONBUTTON_ENABLESFX, OPTIONBUTTON_DISABLESFX, OPTIONBUTTON_QUIT
}
 
enum  TrekEventType {
  TREKEVENT_TICK = 0, TREKEVENT_LBUTTONDOWN = 1, TREKEVENT_MOUSEMOVE = 2, TREKEVENT_LBUTTONUP = 3,
  TREKEVENT_RBUTTONDOWN = 4, TREKEVENT_RBUTTONUP = 5, TREKEVENT_KEYDOWN = 6
}
 
enum  GroundTextIDs {
  GROUNDTX_LOOK_KIRK = 0x49, GROUNDTX_LOOK_SPOCK = 0x4a, GROUNDTX_LOOK_MCCOY = 0x4b, GROUNDTX_LOOK_REDSHIRT = 0x4c,
  GROUNDTX_LOOK_ANYWHERE = 0x4d, GROUNDTX_TALK_TO_CREWMAN = 0x4e, GROUNDTX_NO_RESPONSE = 0x4f, GROUNDTX_KIRK_USE = 0x50,
  GROUNDTX_SPOCK_USE = 0x51, GROUNDTX_MCCOY_USE = 0x52, GROUNDTX_REDSHIRT_USE = 0x53, GROUNDTX_SPOCK_SCAN = 0x54,
  GROUNDTX_MCCOY_SCAN = 0x55, GROUNDTX_USE_MEDKIT = 0x56, GROUNDTX_PHASER_ON_MCCOY = 0x57, GROUNDTX_PHASER_ON_SPOCK = 0x5f,
  GROUNDTX_PHASER_ON_REDSHIRT = 0x67, GROUNDTX_PHASER_ANYWHERE = 0x6f, GROUNDTX_USE_COMMUNICATOR = 0x76, GROUNDTX_NOTHING_HAPPENS = 0x77,
  GROUNDTX_FAIL_TO_OBTAIN_ANYTHING = 0x78
}
 
enum  GlobalGameStringIDs { TX_END = -2, TX_EMPTY = -1 }
 

Functions

void serializeRect (Common::Rect rect, Common::Serializer &ser)
 
template<typename T , uint totalBits, uint decimalBits>
int32 operator* (const int16 lhs, const TFixedInt< T, totalBits, decimalBits > &rhs)
 
Common::SeekableReadStreamdecodeLZSS (Common::SeekableReadStream *indata, uint32 uncompressedSize)
 
bool saveOrLoadMetadata (Common::SeekableReadStream *in, Common::WriteStream *out, SavegameMetadata *meta)
 
Common::String patchRoomMessage (const char *text)
 

Variables

const int SCREEN_WIDTH = 320
 
const int SCREEN_HEIGHT = 200
 
const int MAX_SPRITES = 32
 
const Item g_itemList []
 
const int NUM_ITEMS = ARRAYSIZE(g_itemList) - 64
 
const int MAX_KEY_POSITIONS = 32
 
const int ACTORS_START = 0
 
const int SCALED_ACTORS_END = 8
 
const int ACTORS_END = 32
 
const int NUM_ACTORS = ACTORS_END - ACTORS_START
 
const int HOTSPOTS_START = 32
 
const int HOTSPOTS_END = 64
 
const int NUM_HOTSPOTS = HOTSPOTS_END - HOTSPOTS_START
 
const int ITEMS_START = 64
 
const int ITEMS_END = ITEMS_START + NUM_ITEMS
 
const int NUM_OBJECTS = ITEMS_END
 
const int RDF_BAN_DATA_START = 0x1e
 
const int RDF_BAN_DATA_END = 0x20
 
const int RDF_WARP_ROOM_INDICES = 0x22
 
const int RDF_ROOM_ENTRY_POSITIONS = 0x2a
 
const int RDF_BEAM_IN_POSITIONS = 0xaa
 
const int RDF_SPAWN_POSITIONS = 0xba
 
const RoomAction demon0ActionList []
 
const RoomAction demon1ActionList []
 
const RoomAction demon2ActionList []
 
const RoomAction demon3ActionList []
 
const RoomAction demon4ActionList []
 
const RoomAction demon5ActionList []
 
const RoomAction demon6ActionList []
 
const RoomTextOffsets demon0TextOffsets []
 
const RoomTextOffsets demon1TextOffsets []
 
const RoomTextOffsets demon2TextOffsets []
 
const RoomTextOffsets demon3TextOffsets []
 
const RoomTextOffsets demon4TextOffsets []
 
const RoomTextOffsets demon5TextOffsets []
 
const RoomTextOffsets demon6TextOffsets []
 
const RoomText demon0Texts []
 
const RoomText demon1Texts []
 
const RoomText demon2Texts []
 
const RoomText demon3Texts []
 
const RoomText demon4Texts []
 
const RoomText demon5Texts []
 
const RoomText demon6Texts []
 
const RoomAction tug0ActionList []
 
const RoomAction tug1ActionList []
 
const RoomAction tug2ActionList []
 
const RoomAction tug3ActionList []
 
const RoomTextOffsets tug0TextOffsets []
 
const RoomTextOffsets tug1TextOffsets []
 
const RoomTextOffsets tug2TextOffsets []
 
const RoomTextOffsets tug3TextOffsets []
 
const RoomText tug0Texts []
 
const RoomText tug1Texts []
 
const RoomText tug2Texts []
 
const RoomText tug3Texts []
 
const RoomAction love0ActionList []
 
const RoomAction love1ActionList []
 
const RoomAction love2ActionList []
 
const RoomAction love3ActionList []
 
const RoomAction love4ActionList []
 
const RoomAction love5ActionList []
 
const RoomTextOffsets love0TextOffsets []
 
const RoomTextOffsets love1TextOffsets []
 
const RoomTextOffsets love2TextOffsets []
 
const RoomTextOffsets love3TextOffsets []
 
const RoomTextOffsets love4TextOffsets []
 
const RoomTextOffsets love5TextOffsets []
 
const RoomText love0Texts []
 
const RoomText love1Texts []
 
const RoomText love2Texts []
 
const RoomText love3Texts []
 
const RoomText love4Texts []
 
const RoomText love5Texts []
 
const RoomTextOffsets loveTextOffsets []
 
const RoomAction mudd0ActionList []
 
const RoomAction mudd1ActionList []
 
const RoomAction mudd2ActionList []
 
const RoomAction mudd3ActionList []
 
const RoomAction mudd4ActionList []
 
const RoomAction mudd5ActionList []
 
const RoomTextOffsets mudd0TextOffsets []
 
const RoomTextOffsets mudd1TextOffsets []
 
const RoomTextOffsets mudd2TextOffsets []
 
const RoomTextOffsets mudd3TextOffsets []
 
const RoomTextOffsets mudd4TextOffsets []
 
const RoomTextOffsets mudd5TextOffsets []
 
const RoomText mudd0Texts []
 
const RoomText mudd1Texts []
 
const RoomText mudd2Texts []
 
const RoomText mudd3Texts []
 
const RoomText mudd4Texts []
 
const RoomText mudd5Texts []
 
const RoomTextOffsets muddTextOffsets []
 
const RoomAction feather0ActionList []
 
const RoomAction feather1ActionList []
 
const RoomAction feather2ActionList []
 
const RoomAction feather3ActionList []
 
const RoomAction feather4ActionList []
 
const RoomAction feather5ActionList []
 
const RoomAction feather6ActionList []
 
const RoomAction feather7ActionList []
 
const RoomTextOffsets feather0TextOffsets []
 
const RoomTextOffsets feather1TextOffsets []
 
const RoomTextOffsets feather2TextOffsets []
 
const RoomTextOffsets feather3TextOffsets []
 
const RoomTextOffsets feather4TextOffsets []
 
const RoomTextOffsets feather5TextOffsets []
 
const RoomTextOffsets feather6TextOffsets []
 
const RoomTextOffsets feather7TextOffsets []
 
const RoomText feather0Texts []
 
const RoomText feather1Texts []
 
const RoomText feather2Texts []
 
const RoomText feather3Texts []
 
const RoomText feather4Texts []
 
const RoomText feather5Texts []
 
const RoomText feather6Texts []
 
const RoomText feather7Texts []
 
const RoomAction trial0ActionList []
 
const RoomAction trial1ActionList []
 
const RoomAction trial2ActionList []
 
const RoomAction trial3ActionList []
 
const RoomAction trial4ActionList []
 
const RoomAction trial5ActionList []
 
const RoomTextOffsets trial0TextOffsets []
 
const RoomTextOffsets trial1TextOffsets []
 
const RoomTextOffsets trial2TextOffsets []
 
const RoomTextOffsets trial3TextOffsets []
 
const RoomTextOffsets trial4TextOffsets []
 
const RoomTextOffsets trial5TextOffsets []
 
const RoomText trial0Texts []
 
const RoomText trial1Texts []
 
const RoomText trial2Texts []
 
const RoomText trial3Texts []
 
const RoomText trial4Texts []
 
const RoomText trial5Texts []
 
const RoomTextOffsets trialTextOffsets []
 
const RoomAction sins0ActionList []
 
const RoomAction sins1ActionList []
 
const RoomAction sins2ActionList []
 
const RoomAction sins3ActionList []
 
const RoomAction sins4ActionList []
 
const RoomAction sins5ActionList []
 
const RoomTextOffsets sins0TextOffsets []
 
const RoomTextOffsets sins1TextOffsets []
 
const RoomTextOffsets sins2TextOffsets []
 
const RoomTextOffsets sins3TextOffsets []
 
const RoomTextOffsets sins4TextOffsets []
 
const RoomTextOffsets sins5TextOffsets []
 
const RoomText sins0Texts []
 
const RoomText sins1Texts []
 
const RoomText sins2Texts []
 
const RoomText sins3Texts []
 
const RoomText sins4Texts []
 
const RoomText sins5Texts []
 
const RoomAction veng0ActionList []
 
const RoomAction veng1ActionList []
 
const RoomAction veng2ActionList []
 
const RoomAction veng3ActionList []
 
const RoomAction veng4ActionList []
 
const RoomAction veng5ActionList []
 
const RoomAction veng6ActionList []
 
const RoomAction veng7ActionList []
 
const RoomAction veng8ActionList []
 
const RoomTextOffsets veng0TextOffsets []
 
const RoomTextOffsets veng1TextOffsets []
 
const RoomTextOffsets veng2TextOffsets []
 
const RoomTextOffsets veng3TextOffsets []
 
const RoomTextOffsets veng4TextOffsets []
 
const RoomTextOffsets veng5TextOffsets []
 
const RoomTextOffsets veng6TextOffsets []
 
const RoomTextOffsets veng7TextOffsets []
 
const RoomTextOffsets veng8TextOffsets []
 
const RoomText veng0Texts []
 
const RoomText veng1Texts []
 
const RoomText veng2Texts []
 
const RoomText veng3Texts []
 
const RoomText veng4Texts []
 
const RoomText veng5Texts []
 
const RoomText veng6Texts []
 
const RoomText veng7Texts []
 
const RoomText veng8Texts []
 
const RoomTextOffsets vengTextOffsets []
 
const int MAX_SFX_PLAYING = 4
 
const int NUM_MIDI_SLOTS = 8
 
const int SAVEGAME_DESCRIPTION_LEN = 30
 
const int MAX_MENUBUTTONS = 32
 
const int TEXTBOX_WIDTH = 26
 
const int TEXT_CHARS_PER_LINE = TEXTBOX_WIDTH - 2
 
const int MAX_TEXTBOX_LINES = 12
 
const int TEXT_INPUT_BUFFER_SIZE = 134
 
const int MAX_TEXT_INPUT_LEN = 20
 
const int MAX_BUFFERED_WALK_ACTIONS = 32
 
const int MAX_BAN_FILES = 16
 
const char *const g_gameStrings []
 

Detailed Description

Files with the ".iw" extension define a set of "key points" through a room used for pathing. This is a basic interface for that.