ScummVM API documentation
Cruise Namespace Reference

Classes

struct  actorStruct
 
struct  backgroundIncrustStruct
 
struct  backgroundTableStruct
 
struct  cellStruct
 
class  CruiseEngine
 
struct  CRUISEGameDescription
 
struct  CruiseSavegameHeader
 
class  CtEntry
 
struct  ctpVar19Struct
 
struct  ctpVar19SubStruct
 
class  CtStruct
 
struct  dataFileEntry
 
struct  dataFileEntrySub
 
struct  dataFileName
 
class  Debugger
 
struct  exportEntryStruct
 
struct  fileEntry
 
struct  filesData2Struct
 
struct  FontEntry
 
struct  FontInfo
 
struct  gfxEntryStruct
 
struct  gfxModuleDataStruct
 
struct  importDataStruct
 
struct  importScriptStruct
 
struct  linkDataStruct
 
struct  menuElementStruct
 
struct  menuElementSubStruct
 
struct  menuStruct
 
struct  MovementEntry
 
struct  objDataStruct
 
struct  objectParams
 
struct  objectParamsQuery
 
struct  overlayStruct
 
struct  ovlData3Struct
 
struct  ovlDataStruct
 
struct  palEntry
 
class  PCSound
 
struct  persoStruct
 
struct  point
 
struct  preloadStruct
 
struct  scriptInstanceStruct
 
struct  setHeaderEntry
 
struct  SoundEntry
 
struct  stackElementStruct
 
struct  stringEntryStruct
 
struct  volumeDataStruct
 

Typedefs

typedef char ColorP
 
typedef int32(* opcodeTypeFunction) ()
 
typedef int16(* opcodeFunction) ()
 

Enumerations

enum  animPhase {
  ANIM_PHASE_WAIT = 0, ANIM_PHASE_STATIC = 1, ANIM_PHASE_MOVE = 2, ANIM_PHASE_STATIC_END = 3,
  ANIM_PHASE_END = 4
}
 
enum  ATP { ATP_MOUSE = 0, ATP_TRACK = 1 }
 
enum  CRUISEAction {
  kActionNone, kActionFastMode, kActionExit, kActionEscape,
  kActionPause, kActionPlayerMenu, kActionInventory, kActionEndUserWaiting,
  kActionIncreaseGameSpeed, kActionDecreaseGameSpeed
}
 
enum  LangStringId {
  ID_PAUSED = 0, ID_INVENTORY = 5, ID_SPEAK_ABOUT = 6, ID_PLAYER_MENU = 7,
  ID_SAVE = 9, ID_LOAD = 10, ID_RESTART = 11, ID_QUIT = 12
}
 
enum  { VAR_MOUSE_X_MODE = 253, VAR_MOUSE_X_POS = 249, VAR_MOUSE_Y_MODE = 251, VAR_MOUSE_Y_POS = 250 }
 
enum  { MOUSE_CURSOR_NORMAL = 0, MOUSE_CURSOR_DISK, MOUSE_CURSOR_CROSS }
 
enum  { kCruiseDebugScript = 1 << 0, kCruiseDebugSound = 1 << 1 }
 
enum  { kCmpEQ = (1 << 0), kCmpGT = (1 << 1), kCmpLT = (1 << 2) }
 
enum  MouseButton { CRS_MB_LEFT = 1, CRS_MB_RIGHT = 2, CRS_MB_MIDDLE = 4, CRS_MB_BOTH = CRS_MB_LEFT | CRS_MB_RIGHT }
 
enum  ResType {
  OBJ_TYPE_LINE = 0, OBJ_TYPE_MASK = 1, OBJ_TYPE_BGMASK = 2, OBJ_TYPE_VIRTUAL = 3,
  OBJ_TYPE_SPRITE = 4, OBJ_TYPE_MESSAGE = 5, OBJ_TYPE_SOUND = 6, OBJ_TYPE_FONT = 7,
  OBJ_TYPE_POLY = 8, OBJ_TYPE_EXIT = 9
}
 
enum  CursorType {
  CURSOR_NORMAL = 0, CURSOR_DISK = 1, CURSOR_CROSS = 2, CURSOR_NOMOUSE = 3,
  CURSOR_WALK = 4, CURSOR_EXIT = 5, CURSOR_MAGNIFYING_GLASS = 6, CURSOR_MAX = 7
}
 
enum  eClass { MULTIPLE = 0, VARIABLE = 1, UNIQUE = 2, THEME = 3 }
 
enum  { NUM_NODES = 20, NUM_PERSONS = 10 }
 
enum  scriptTypeEnum { scriptType_MinusPROC = -20, scriptType_Minus30 = -30, scriptType_PROC = 20, scriptType_REL = 30 }
 
enum  stackElementTypeEnum { STACK_SHORT, STACK_PTR }
 

Functions

bool isAnimFinished (int overlayIdx, int idx, actorStruct *pStartEntry, int objType)
 
actorStructfindActor (actorStruct *pStartEntry, int overlayIdx, int objIdx, int type)
 
void processAnimation ()
 
void getPixel (int x, int y)
 
int loadBackground (const char *name, int idx)
 
void resetBackgroundIncrustList (backgroundIncrustStruct *pHead)
 
backgroundIncrustStructaddBackgroundIncrust (int16 overlayIdx, int16 param2, backgroundIncrustStruct *pHead, int16 scriptNumber, int16 scriptOverlay, int16 backgroundIdx, int16 param4)
 
void regenerateBackgroundIncrust (backgroundIncrustStruct *pHead)
 
void freeBackgroundIncrustList (backgroundIncrustStruct *pHead)
 
void removeBackgroundIncrust (int overlay, int idx, backgroundIncrustStruct *pHead)
 
void unmergeBackgroundIncrust (backgroundIncrustStruct *pHead, int ovl, int idx)
 
void resetPtr (cellStruct *ptr)
 
cellStructaddCell (cellStruct *pHead, int16 overlayIdx, int16 objIdx, int16 type, int16 backgroundPlane, int16 scriptOverlay, int16 scriptNumber, int16 scriptType)
 
void createTextObject (cellStruct *pObject, int overlayIdx, int messageIdx, int x, int y, int width, int16 color, int backgroundPlane, int parentOvl, int parentIdx)
 
void removeCell (cellStruct *objPtr, int ovlNumber, int objectIdx, int objType, int backgroundPlane)
 
void freezeCell (cellStruct *pObject, int overlayIdx, int objIdx, int objType, int backgroundPlane, int oldFreeze, int newFreeze)
 
void sortCells (int16 param1, int16 param2, cellStruct *objPtr)
 
void linkCell (cellStruct *pHead, int ovl, int obj, int type, int ovl2, int obj2)
 
bool delphineUnpack (byte *dst, const byte *src, int len)
 
int findHighColor ()
 
ovlData3StructgetOvlData3Entry (int32 scriptNumber, int32 param)
 
ovlData3StructscriptFunc1Sub2 (int32 scriptNumber, int32 param)
 
void resetFileEntry (int32 entryNumber)
 
uint8 * mainProc14 (uint16 overlay, uint16 idx)
 
void printInfoBlackBox (const char *string)
 
void waitForPlayerInput ()
 
void loadPackedFileToMem (int fileIdx, uint8 *buffer)
 
int getNumObjectsByClass (int scriptIdx, int param)
 
void resetFileEntryRange (int param1, int param2)
 
int getProcParam (int overlayIdx, int param2, const char *name)
 
void changeScriptParamInList (int param1, int param2, scriptInstanceStruct *pScriptInstance, int newValue, int param3)
 
uint8 * getDataFromData3 (ovlData3Struct *ptr, int param)
 
void removeExtension (const char *name, char *buffer, size_t ln)
 
void resetPtr2 (scriptInstanceStruct *ptr)
 
void getFileExtension (const char *name, char *buffer, size_t ln)
 
void * allocAndZero (int size)
 
void freeStuff2 ()
 
void mainLoop ()
 
void getMouseStatus (int16 *pMouseVar, int16 *pMouseX, int16 *pMouseButton, int16 *pMouseY)
 
bool testMask (int x, int y, unsigned char *pData, int stride)
 
menuElementSubStructgetSelectedEntryInMenu (menuStruct *pMenu)
 
void closeAllMenu ()
 
int removeFinishedScripts (scriptInstanceStruct *ptrHandle)
 
void initBigVar3 ()
 
void resetActorPtr (actorStruct *ptr)
 
void removeAllScripts (scriptInstanceStruct *ptrHandle)
 
void MemoryList ()
 
void * MemoryAlloc (uint32 size, bool clearFlag, int32 lineNum, const char *fname)
 
void MemoryFree (void *v)
 
int initCt (const char *ctpName)
 
int computeDistance (int varX, int varY, int paramX, int paramY)
 
int getNode (int nodeResult[2], int nodeId)
 
int setNodeColor (int nodeIdx, int nodeColor)
 
int setNodeState (int nodeIdx, int nodeState)
 
int loadFNTSub (uint8 *ptr, int destIdx)
 
int loadSPLSub (uint8 *ptr, int destIdx)
 
int loadSetEntry (const char *name, uint8 *ptr, int currentEntryIdx, int currentDestEntry)
 
int loadFile (const char *name, int idx, int destIdx)
 
int loadData (const char *name, int startIdx)
 
int loadFileRange (const char *name, int param, int startIdx, int numIdx)
 
int loadFileSub1 (uint8 **ptr, const char *name, uint8 *ptr2)
 
int loadFullBundle (const char *name, int startIdx)
 
void loadFNT (const char *fileName)
 
void initSystem ()
 
void freeSystem ()
 
void bigEndianShortToNative (void *var)
 
void bigEndianLongToNative (void *var)
 
void flipGen (void *var, int32 length)
 
int32 getLineHeight (int16 charCount, const FontEntry *fontPtr, const uint8 *fontPrt_Desc)
 
int32 getTextLineCount (int32 rightBorder_X, int32 wordSpacingWidth, const FontEntry *fontData, const char *textString)
 
void renderWord (uint8 *fontPtr_Data, uint8 *outBufferPtr, int32 drawPosPixel_X, int32 heightOff, int32 height, int32 param4, int32 stringRenderBufferSize, int32 width, int32 charWidth)
 
gfxEntryStructrenderText (int inRightBorder_X, const char *string)
 
void drawString (int32 x, int32 y, const char *string, uint8 *buffer, uint8 fontColor, int32 inRightBorder_X)
 
void freeGfx (gfxEntryStruct *pGfx)
 
int32 opcodeType8 ()
 
int16 computeZoom (int param)
 
int16 subOp23 (int param1, int param2)
 
void freeObjectList (cellStruct *pListHead)
 
int removeAnimation (actorStruct *pHead, int overlay, int objIdx, int objType)
 
int16 Op_FadeOut ()
 
void gfxModuleData_gfxClearFrameBuffer (uint8 *ptr)
 
void gfxModuleData_setDirtyColors (int min, int max)
 
void gfxModuleData_setPalColor (int idx, int r, int g, int b)
 
void gfxModuleData_field_90 ()
 
void gfxModuleData_gfxWaitVSync ()
 
void gfxModuleData_flip ()
 
void gfxModuleData_updatePalette ()
 
void gfxModuleData_updateScreen ()
 
void gfxCopyRect (const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int color)
 
void gfxModuleData_gfxCopyScreen (const uint8 *sourcePtr, uint8 *destPtr)
 
void convertGfxFromMode4 (const uint8 *sourcePtr, int width, int height, uint8 *destPtr)
 
void convertGfxFromMode5 (const uint8 *sourcePtr, int width, int height, uint8 *destPtr)
 
void gfxModuleData_Init ()
 
void gfxModuleData_flipScreen ()
 
void gfxModuleData_convertOldPalColor (uint16 oldColor, uint8 *pOutput)
 
void gfxModuleData_setPalEntries (const byte *ptr, int start, int num)
 
void gfxModuleData_setPal256 (const byte *ptr)
 
void gfxModuleData_addDirtyRect (const Common::Rect &r)
 
void flip ()
 
void drawSolidBox (int32 x1, int32 y1, int32 x2, int32 y2, uint8 color)
 
void resetBitmap (uint8 *dataPtr, int32 dataSize)
 
void switchBackground (const byte *newBg)
 
void updateAllScriptsImports ()
 
int upscaleValue (int value, int scale)
 
void pixel (int x, int y, char color)
 
void mainDraw (bool waitFl)
 
void flipScreen ()
 
void buildPolyModel (int X, int Y, int scale, char *ptr2, char *destBuffer, char *dataPtr)
 
void drawSprite (int width, int height, cellStruct *currentObjPtr, const uint8 *dataIn, int ys, int xs, uint8 *output, const uint8 *dataBuf)
 
void flipPoly (int fileId, int16 *dataPtr, int scale, char **newFrame, int X, int Y, int *outX, int *outY, int *outScale)
 
void getPolySize (int positionX, int positionY, int scale, int sizeTable[4], unsigned char *dataPtr)
 
bool findPoly (char *dataPtr, int x, int y, int zoom, int mouseX, int mouseY)
 
unsigned char * drawPolyMode2 (unsigned char *dataPointer, int linesToDraw)
 
void calcRGB (uint8 *pColorSrc, uint8 *pColorDst, int *offsetTable)
 
void drawMessage (const gfxEntryStruct *pGfxPtr, int globalX, int globalY, int width, int newColor, uint8 *ouputPtr)
 
menuStructcreateMenu (int X, int Y, const char *menuName)
 
void addSelectableMenuEntry (int var0, int var1, menuStruct *pMenu, int var2, int color, const char *menuText)
 
void updateMenuMouse (int mouseX, int mouseY, menuStruct *pMenu)
 
int processMenu (menuStruct *pMenu)
 
void freeMenu (menuStruct *pMenu)
 
int playerMenu (int menuX, int menuY)
 
void changeCursor (CursorType eType)
 
bool isMouseOn ()
 
void mouseOff ()
 
void mouseOn ()
 
objDataStructgetObjectDataFromOverlay (int ovlIdx, int objIdx)
 
int16 getSingleObjectParam (int16 overlayIdx, int16 param2, int16 param3, int16 *returnParam)
 
int16 getMultipleObjectParam (int16 overlayIdx, int16 objectIdx, objectParamsQuery *returnParam)
 
void objectReset ()
 
const char * getObjectName (int index, const char *string)
 
int getObjectClass (int overlayIdx, int objIdx)
 
void initOverlayTable ()
 
int loadOverlay (const char *scriptName)
 
int32 findOverlayByName2 (const char *name)
 
int findOverlayByName (const char *overlayName)
 
int releaseOverlay (const char *name)
 
int freeOverlay (int overlayIdx)
 
void freeOverlayTable ()
 
int cor_droite (int x1, int y1, int x2, int y2, point *outputTable)
 
void freePerso (int persoIdx)
 
void freeCTP ()
 
void affiche_chemin (int16 persoIdx, MovementEntry &data)
 
int direction (int x1, int y1, int x2, int y2, int inc_jo1, int inc_jo2)
 
void fillpoly (int16 *point_data, int n, ColorP c)
 
void line (int x1, int y1, int x2, int y2, ColorP color)
 
Common::Error saveSavegameData (int saveGameIdx, const Common::String &saveName)
 
Common::Error loadSavegameData (int saveGameIdx)
 
WARN_UNUSED_RESULT bool readSavegameHeader (Common::InSaveFile *in, CruiseSavegameHeader &header, bool skipThumbnail=true)
 
void initVars ()
 
void setupFuncArray ()
 
int8 getByteFromScript ()
 
int removeScript (int overlay, int idx, scriptInstanceStruct *headPtr)
 
uint8 * attacheNewScriptToTail (scriptInstanceStruct *scriptHandlePtr, int16 overlayNumber, int16 param, int16 arg0, int16 arg1, int16 arg2, scriptTypeEnum scriptType)
 
void manageScripts (scriptInstanceStruct *scriptHandle)
 
int16 popVar ()
 
void pushVar (int16 var)
 
void pushPtr (void *ptr)
 
void * popPtr ()
 
int16 objInit (int ovlIdx, int param1, int param2)
 
char * getText (int textIndex, int overlayIndex)
 
int16 readVolCnf ()
 
int closeCnf ()
 
int16 findFileInDisks (const char *name)
 
void freeDisk ()
 
int16 findFileInList (const char *fileName)
 
void strToUpper (char *string)
 
void drawMsgString (const char *string)
 
void askDisk (int16 discNumber)
 
void setObjectPosition (int16 param1, int16 param2, int16 param3, int16 param4)
 
int closeBase ()
 

Variables

short int cvtPalette [0x20]
 
int CVTLoaded
 
uint8 * backgroundScreens [8]
 
bool backgroundChanged [8]
 
backgroundTableStruct backgroundTable [8]
 
backgroundIncrustStruct backgroundIncrustHead
 
cellStruct cellHead
 
CruiseEngine_vm
 
gfxEntryStructlinkedMsgList
 
int buttonDown
 
int selectDown
 
int menuDown
 
uint8 * ctpVar17
 
struct Cruise::FontInfo PACKED_STRUCT
 
int flag_obstacle
 
int vblLimit
 
gfxModuleDataStruct gfxModuleData
 
int currentTransparent
 
int16 * polyBuffer2
 
int16 * XMIN_XMAX
 
int m_color
 
menuStructmenuTable [8]
 
int16 main10
 
CursorType currentCursor
 
overlayStruct overlayTable [90]
 
int numOfLoadedOverlay
 
persoStructpersoTable [NUM_PERSONS]
 
int16 numPoly
 
scriptInstanceStruct relHead
 
scriptInstanceStruct procHead
 
scriptInstanceStructcurrentScriptPtr
 
const int actor_move [][13]
 
const int actor_end [][13]
 
const int actor_stat [][13]
 
const int actor_invstat [][13]
 
const int16 english_fontCharacterTable [256]
 
const int16 german_fontCharacterTable [256]
 
const int16 spanish_fontCharacterTable [256]
 
const int16 russian_fontCharacterTable [256]
 
const byte mouseCursorNormal []
 
const byte mouseCursorDisk []
 
const byte mouseCursorCross []
 
const byte mouseCursorNoMouse []
 
const byte mouseCursorWalk []
 
const byte mouseCursorExit []
 
const byte mouseCursorMagnifyingGlass []
 
const char * englishLanguageStrings [13]
 
const char * frenchLanguageStrings [13]
 
const char * germanLanguageStrings [13]
 
const char * italianLanguageStrings [13]
 
const char * spanishLanguageStrings [13]
 
const char * russianLanguageStrings [13]
 
bool remdo
 
bool PCFadeFlag
 
uint8 * _systemFNT
 
int16 fontFileIndex
 
uint8 itemColor
 
uint8 selectColor
 
uint8 titleColor
 
uint8 subColor
 
int16 scroll
 
int16 switchPal
 
char cmdLine [90]
 
int16 masterScreen
 
int16 doFade
 
int16 fadeFlag
 
preloadStruct preloadData [64]
 
volumeDataStruct volumeData [20]
 
int32 volumeDataLoaded
 
int16 numOfDisks
 
char lastOverlay [38]
 
char nextOverlay [38]
 
int16 currentActiveMenu
 
int16 autoMsg
 
menuElementSubStructlinkedRelation
 
bool userWait
 
int16 autoTrack
 
int16 currentDiskNumber
 
int16 volumeNumEntry
 
fileEntryvolumePtrToFileDescriptor
 
uint32 volumeFileDescriptorSize
 
int16 volumeSizeOfEntry
 
int16 volumeNumberOfEntry
 
int16 displayOn
 
int16 protectionCode
 
int16 globalVars [2000]
 
dataFileEntry filesDatabase [257]
 
int16 bootOverlayNumber
 
SoundEntry soundList [4]
 
opcodeTypeFunction opcodeTypeTable [64]
 
int16 positionInStack
 
actorStruct actorHead
 
int16 stateID
 
int16 xdial
 
uint8 * currentData3DataPtr
 
uint8 * scriptDataPtrTable [7]
 
int16 currentScriptOpcodeType
 
int16 saveOpcodeVar
 
int16 narratorOvl
 
int16 narratorIdx
 
int16 songLoaded
 
int16 songPlayed
 
int16 songLoop
 
int16 activeMouse
 
int16 userEnabled
 
int16 var5
 
int16 dialogueEnabled
 
int16 dialogueOvl
 
int16 dialogueObj
 
int16 userDelay
 
int16 sysKey
 
int16 sysX
 
int16 sysY
 
int16 automoveInc
 
int16 automoveMax
 
int16 isMessage
 
int16 automaticMode
 
int16 aniX
 
int16 aniY
 
bool animationStart
 
int16 autoOvl
 
int16 var39
 
int16 playerMenuEnabled
 
int16 var41
 
int16 var42
 
int16 var45
 
int16 var46
 
int16 var47
 
int16 var48
 
int16 flagCt
 
uint8 newPal [256 *3]
 
uint8 workpal [256 *3]
 
uint8 palScreen [8][256 *3]
 
char currentCtpName [40]
 
int16 saveVar1
 
uint8 saveVar2 [97]
 
int16 numberOfWalkboxes
 
int16 walkboxColor [15]
 
int16 walkboxState [15]
 
uint8 lastAni [16]
 
int32 loadFileVar1
 
int16 loadCtFromSave
 
int16 ctp_routeCoordCount
 
int16 ctp_routeCoords [20][2]
 
int16 ctp_routes [20][10]
 
int16 ctp_walkboxTable [15][40]
 
int16 walkboxColorIndex [16]
 
int16 walkboxZoom [15]
 
int16 distanceTable [20][10]
 
int16 flagSpeed
 
int16 speedGame
 
int16 oldSpeedGame
 
uint8 globalScreen [320 *200]
 

Detailed Description

This is the namespace of the Cruise engine.

Status of this engine: Game is completable, engine needs objectifying

Games using this engine: