ScummVM API documentation
Cine Namespace Reference

Classes

class  AnimData
 
struct  AnimDataEntry
 
struct  AnimDataMapping
 
struct  AnimHeaderStruct
 
struct  BGIncrust
 
struct  CharacterEntry
 
struct  ChunkHeader
 
class  CineConsole
 
class  CineEngine
 
struct  CINEGameDescription
 
class  CineUnpacker
 
class  FWRenderer
 
class  FWScript
 
class  FWScriptInfo
 
class  Menu
 
struct  ObjectStruct
 
struct  Opcode
 
class  OSRenderer
 
class  OSScript
 
class  OSScriptInfo
 
struct  overlay
 
struct  palBg
 
struct  PalEntry
 
class  Palette
 
struct  PartBuffer
 
class  PaulaSound
 
class  PCSound
 
class  RawObjectScript
 
class  RawScript
 
class  ScriptVars
 
struct  SelectedObjStruct
 
class  SelectionMenu
 
struct  SeqListElement
 
class  Sound
 
struct  TextHandler
 
class  TextInputMenu
 
struct  VolumeResource
 

Typedefs

typedef Common::HashMap< Common::String, Common::Array< VolumeResource > > StringToVolumeResourceArrayHashMap
 
typedef int(FWScript::* OpFunc) ()
 
typedef Common::SharedPtr< FWScriptScriptPtr
 
typedef Common::SharedPtr< RawScriptRawScriptPtr
 
typedef Common::SharedPtr< RawObjectScriptRawObjectScriptPtr
 
typedef Common::List< ScriptPtrScriptList
 
typedef Common::Array< RawScriptPtrRawScriptArray
 
typedef Common::Array< RawObjectScriptPtrRawObjectScriptArray
 
typedef char CommandeType[20]
 

Enumerations

enum  {
  VAR_MOUSE_X_POS = 249, VAR_MOUSE_Y_POS = 250, VAR_MOUSE_X_MODE = 253, VAR_MOUSE_Y_MODE = 251,
  VAR_MOUSE_X_POS_2ND = 251, VAR_MOUSE_Y_POS_2ND = 252, VAR_BYPASS_PROTECTION = 255, VAR_LOW_MEMORY = 0
}
 
enum  { MOUSE_CURSOR_NORMAL = 0, MOUSE_CURSOR_DISK, MOUSE_CURSOR_CROSS }
 
enum  { kCineDebugScript = 1 << 0, kCineDebugPart = 1 << 1, kCineDebugSound = 1 << 2, kCineDebugCollision = 1 << 3 }
 
enum  { kCmpEQ = (1 << 0), kCmpGT = (1 << 1), kCmpLT = (1 << 2) }
 
enum  CineGameType { GType_FW = 1, GType_OS }
 
enum  CineGameFeatures { GF_CD = 1 << 0, GF_DEMO = 1 << 1, GF_ALT_FONT = 1 << 2, GF_CRYPTED_BOOT_PRC = 1 << 3 }
 
enum  BackBufferSource { BEFORE_OPENING_MENU = 0, BEFORE_TAKING_THUMBNAIL, MAX_BACK_BUFFER_SOURCES }
 
enum  CallSource {
  EXECUTE_PLAYER_INPUT, MAIN_LOOP_WAIT_FOR_PLAYER_CLICK, MAKE_MENU_CHOICE, MAKE_SYSTEM_MENU,
  MAKE_TEXT_ENTRY_MENU, PROCESS_INVENTORY, WAIT_PLAYER_INPUT
}
 
enum  EventTarget {
  UNTIL_MOUSE_BUTTON_UP_DOWN_UP, UNTIL_MOUSE_BUTTON_DOWN_UP, UNTIL_MOUSE_BUTTON_UP, UNTIL_MOUSE_BUTTON_UP_AND_WAIT_ENDED,
  UNTIL_MOUSE_BUTTON_UP_DOWN, UNTIL_MOUSE_BUTTON_DOWN, UNTIL_MOUSE_BUTTON_DOWN_OR_KEY_UP_OR_DOWN_OR_IN_RECTS, UNTIL_MOUSE_BUTTON_DOWN_OR_KEY_INPUT,
  UNTIL_WAIT_ENDED, EMPTY_EVENT_QUEUE
}
 
enum  EndianType { CINE_NATIVE_ENDIAN, CINE_LITTLE_ENDIAN, CINE_BIG_ENDIAN }
 
enum  CineSaveGameFormat {
  ANIMSIZE_UNKNOWN, ANIMSIZE_23, ANIMSIZE_30_PTRS_BROKEN, ANIMSIZE_30_PTRS_INTACT,
  TEMP_OS_FORMAT, VERSIONED_FW_FORMAT, VERSIONED_OS_FORMAT
}
 

Functions

void freeAnimDataTable ()
 
void freeAnimDataRange (byte startIdx, byte numIdx)
 
int loadResource (const char *resourceName, int16 idx=-1, int16 frameIndex=-1)
 
void loadResourcesFromSave (Common::SeekableReadStream &fHandle, enum CineSaveGameFormat saveGameFormat)
 
void generateMask (const byte *sprite, byte *mask, uint16 size, byte transparency)
 
int16 loadBg (const char *bgName)
 
int16 loadCtFW (const char *bgName)
 
int16 loadCtOS (const char *bgName)
 
void addToBGList (int16 objIdx)
 
void addSpriteFilledToBGList (int16 idx)
 
void removeBgIncrustsWithBgIdx (int16 bgIdx)
 
void createBgIncrustListElement (int16 objIdx, int16 param)
 
void resetBgIncrustList ()
 
void loadBgIncrustFromSave (Common::SeekableReadStream &fHandle, bool hasBgIdx=false)
 
void gfxDrawSprite (byte *src4, uint16 sw, uint16 sh, byte *dst4, int16 sx, int16 sy)
 
void setMouseCursor (int cursor)
 
void gfxCopyPage (byte *source, byte *dest)
 
void transformPaletteRange (byte startColor, byte numColor, int8 r, int8 g, int8 b)
 
void gfxFlipPage ()
 
void gfxDrawMaskedSprite (const byte *ptr, const byte *msk, uint16 width, uint16 height, byte *page, int16 x, int16 y)
 
void gfxFillSprite (const byte *src4, uint16 sw, uint16 sh, byte *dst4, int16 sx, int16 sy, uint8 fillColor=0)
 
void gfxUpdateSpriteMask (byte *destMask, int16 x, int16 y, int16 width, int16 height, const byte *maskPtr, int16 xm, int16 ym, int16 maskWidth, int16 maskHeight)
 
void gfxDrawLine (int16 x1, int16 y1, int16 x2, int16 y2, byte color, byte *page)
 
void gfxDrawPlainBox (int16 x1, int16 y1, int16 x2, int16 y2, byte color)
 
void gfxResetPage (byte *pagePtr)
 
int16 gfxGetBit (int16 x, int16 y, const byte *ptr, int16 width)
 
byte gfxGetColor (int16 x, int16 y, const byte *ptr, int16 width)
 
void gfxResetRawPage (byte *pageRaw)
 
void gfxConvertSpriteToRaw (byte *dst, const byte *src, uint16 w, uint16 h)
 
void gfxCopyRawPage (byte *source, byte *dest)
 
void gfxFlipRawPage (byte *frontBuffer)
 
void drawSpriteRaw (const byte *spritePtr, const byte *maskPtr, int16 width, int16 height, byte *page, int16 x, int16 y)
 
void gfxDrawPlainBoxRaw (int16 x1, int16 y1, int16 x2, int16 y2, byte color, byte *page)
 
void drawSpriteRaw2 (const byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y)
 
void maskBgOverlay (int targetBgIdx, const byte *spritePtr, const byte *maskPtr, int16 width, int16 height, byte *page, int16 x, int16 y)
 
void fadeFromBlack ()
 
void fadeToBlack ()
 
void gfxWaitVBL ()
 
void gfxRedrawMouseCursor ()
 
void blitScreen (byte *frontBuffer, byte *backbuffer)
 
void blitRawScreen (byte *frontBuffer)
 
void flip ()
 
void mainLoop (int bootScriptIdx)
 
void manageEvents (CallSource callSource, EventTarget eventTarget, bool useMaxMouseButtonState=false, Common::Array< Common::Rect > rects=Common::Array< Common::Rect >())
 
int16 loadMsg (char *pMsgName)
 
void resetObjectTable ()
 
int16 loadObject (char *pObjectName)
 
void setupObject (byte objIdx, uint16 param1, uint16 param2, uint16 param3, uint16 param4)
 
void modifyObjectParam (byte objIdx, byte paramIdx, int16 newValue)
 
void addOverlay (uint16 objIdx, uint16 type)
 
int removeOverlay (uint16 objIdx, uint16 param)
 
void addGfxElement (int16 objIdx, int16 param, int16 type)
 
void removeGfxElement (int16 objIdx, int16 param, int16 type)
 
int16 getObjectParam (uint16 objIdx, uint16 paramIdx)
 
void addObjectParam (byte objIdx, byte paramIdx, int16 newValue)
 
void subObjectParam (byte objIdx, byte paramIdx, int16 newValue)
 
bool compareRanges (uint16 aStart, uint16 aEnd, uint16 bStart, uint16 bEnd)
 
uint16 compareObjectParamRanges (uint16 objIdx1, uint16 xAdd1, uint16 yAdd1, uint16 maskAdd1, uint16 objIdx2, uint16 xAdd2, uint16 yAdd2, uint16 maskAdd2)
 
uint16 compareObjectParam (byte objIdx, byte param1, int16 param2)
 
void loadPal (const char *fileName)
 
void loadRelatedPalette (const char *fileName)
 
void loadPart (const char *partName)
 
void closePart ()
 
int16 findFileInBundle (const char *fileName)
 
void readFromPart (int16 idx, byte *dataPtr, uint32 maxSize)
 
byte * readBundleFile (int16 foundFileIdx, uint32 *size=NULL)
 
byte * readBundleSoundFile (const char *entryName, uint32 *size=0)
 
byte * readFile (const char *filename, bool crypted=false)
 
void checkDataDisk (int16 param)
 
void dumpBundle (const char *filename)
 
bool loadPrc (const char *pPrcName)
 
void loadRel (char *pRelName)
 
FWScriptInfosetupOpcodes ()
 
void decompileScript (const byte *scriptPtr, uint16 scriptSize, uint16 scriptIdx)
 
void dumpScript (char *dumpName)
 
void addScriptToGlobalScripts (uint16 idx)
 
int16 checkCollision (int16 objIdx, int16 x, int16 y, int16 numZones, int16 zoneIdx)
 
void runObjectScript (int16 entryIdx)
 
void executeObjectScripts ()
 
void executeGlobalScripts ()
 
void purgeObjectScripts ()
 
void purgeGlobalScripts ()
 
void loadTextData (const char *filename)
 
void loadErrmessDat (const char *fname)
 
void setFailureMessages (const char *const *messages, bool allocated)
 
void freeErrmessDat ()
 
void loadPoldatDat (const char *fname)
 
int fitLine (const char *ptr, int maxWidth, int &words, int &width)
 
void initLanguage (Common::Language lang)
 
int16 makeMenuChoice (const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width, int minY=0, bool recheckValue=false, bool allowEmpty=false)
 
void makeCommandLine ()
 
void makeFWCommandLine ()
 
void makeOSCommandLine ()
 
void makeActionMenu ()
 
void waitPlayerInput ()
 
void setTextWindow (uint16 param1, uint16 param2, uint16 param3, uint16 param4)
 
void stopSample ()
 
void stopMusicAfterFadeOut ()
 
void playerCommandMouseLeftRightUp (uint16 mouseX, uint16 mouseY)
 
uint16 executePlayerInput ()
 
void drawOverlays ()
 
void getMouseData (uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY)
 
uint16 processKeyboard (uint16 param)
 
void mainLoopSub6 ()
 
void checkForPendingDataLoad ()
 
void hideMouse ()
 
void removeExtention (char *dest, const char *source, size_t sz)
 
void addMessage (byte param1, int16 param2, int16 param3, int16 param4, int16 param5)
 
void removeMessages ()
 
void removeSeq (uint16 param1, uint16 param2, uint16 param3)
 
bool isSeqRunning (uint16 param1, uint16 param2, uint16 param3)
 
void addSeqListElement (uint16 objIdx, int16 param1, int16 param2, int16 frame, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8)
 
void modifySeqListElement (uint16 objIdx, int16 var4Test, int16 param1, int16 param2, int16 param3, int16 param4)
 
void processSeqList ()
 
void resetGfxEntityEntry (uint16 objIdx)
 
bool makeTextEntryMenu (const char *caption, char *string, int strLen, int y)
 
void moveUsingKeyboard (int x, int y)
 
int16 getObjectUnderCursor (uint16 x, uint16 y)
 

Variables

uint16 bgVar0
 
uint32 var8
 
CineEngineg_cine
 
Soundg_sound
 
bool labyrinthCheat
 
bool hacksEnabled
 
byte * collisionPage
 
FWRendererrenderer
 
int16 currentDisk
 
const char *const * failureMessages
 
const CommandeType * defaultActionCommand
 
const CommandeType * systemMenu
 
const CommandeType * confirmMenu
 
const char *const * otherMessages
 
const char * defaultCommandPreposition
 
const char *const * commandPrepositionTable
 
int16 disableSystemMenu
 
bool inMenu
 
bool runOnlyUntilFreePartRangeFirst200
 
CommandeType currentSaveName [100]
 
uint16 var2
 
uint16 var3
 
uint16 var4
 
uint16 lastType20OverlayBgIdx
 
uint16 reloadBgPalOnNextFlip
 
uint16 forbidBgPalReload
 
uint16 gfxFadeOutCompleted
 
uint16 gfxFadeInRequested
 
uint32 safeControlsLastAccessedMs
 Time in milliseconds when safe controls were last accessed.
 
int16 lastSafeControlObjIdx
 Object index of the last safe control accessed.
 
int16 commandVar1
 
int16 commandVar2
 
int16 commandVar3 [4]
 
char currentDatName [30]
 
uint16 musicIsPlaying
 
uint16 errorVar
 
byte menuVar
 
uint16 allowPlayerInput
 
uint16 checkForPendingDataLoadSwitch
 
uint16 isDrawCommandEnabled
 
uint16 waitForPlayerClick
 
uint16 menuCommandLen
 
bool _paletteNeedUpdate
 
uint16 _messageLen
 
int16 playerCommand
 
char currentPrcName [20]
 
char currentRelName [20]
 
char currentObjectName [20]
 
char currentMsgName [20]
 
char newPrcName [20]
 
char newRelName [20]
 
char newObjectName [20]
 
char newMsgName [20]
 
char currentCtName [15]
 
char currentPartName [15]
 
uint16 mouseUpdateStatus
 
uint16 dummyU16
 

Detailed Description

This is the namespace of the Cine engine.

Status of this engine:

This enigne has 2 generations Cinematique evo.1 and Cinematique evo.2 first generation is fairly complete, and second one is under development

Cinematique evo.1 status: The engine supports Future Wars and is basically complete with support of all known game variants. Based on Yaz0r's engine.

Cinematique evo.2 status: This generation supports Operation Stealth, originally developed by Yaz0r for French variant of the game which heared to be completable. Later the work was renewed as part of GSoC'08, by Kari Salminen, but it has not yet been finished. The game is not completable.

Games using this engine:

Cinematique evo.1

  • Future Wars

Cinematique evo.2

  • Operation Stealth

Enumeration Type Documentation

◆ CallSource

Enumerator
EXECUTE_PLAYER_INPUT 

Called from executePlayerInput function.

MAIN_LOOP_WAIT_FOR_PLAYER_CLICK 

Called from mainLoop function's waiting for player click section.

MAKE_MENU_CHOICE 

Called from makeMenuChoice function.

MAKE_SYSTEM_MENU 

Called from makeSystemMenu function.

MAKE_TEXT_ENTRY_MENU 

Called from makeTextEntryMenu function.

PROCESS_INVENTORY 

Called from processInventory function.

WAIT_PLAYER_INPUT 

Called from waitPlayerInput function.

◆ EventTarget

Enumerator
UNTIL_MOUSE_BUTTON_UP_DOWN_UP 

Wait until first mouse buttons all up, then at least one down, finally all up.

UNTIL_MOUSE_BUTTON_DOWN_UP 

Wait until first at least one mouse button down, finally all up.

UNTIL_MOUSE_BUTTON_UP 

Wait until all mouse buttons up.

UNTIL_MOUSE_BUTTON_UP_AND_WAIT_ENDED 

Wait until all mouse buttons up and wait period (getTimerDelay()) ended.

UNTIL_MOUSE_BUTTON_UP_DOWN 

Wait until first all mouse buttons up, finally at least one down.

UNTIL_MOUSE_BUTTON_DOWN 

Wait until at least one mouse button down.

UNTIL_MOUSE_BUTTON_DOWN_OR_KEY_UP_OR_DOWN_OR_IN_RECTS 

Wait until at least one mouse button down, up key pressed, down key pressed or mouse position in at least one of the given rectangles.

UNTIL_MOUSE_BUTTON_DOWN_OR_KEY_INPUT 

Wait until at least one mouse button down or a key pressed.

UNTIL_WAIT_ENDED 

Wait until wait period (getTimerDelay()) ended.

EMPTY_EVENT_QUEUE 

Empty the event queue.

◆ EndianType

Endian types. Used at least by Palette class's load and save functions. TODO: Move somewhere more general as this is definitely not Cine-engine specific

NOTE: It seems LITTLE_ENDIAN and/or BIG_ENDIAN were defined already on some platforms so therefore renamed the enumerations to something not clashing by giving them "CINE_"-prefixes.

◆ CineSaveGameFormat

Cine engine's save game formats. Enumeration entries (Excluding the one used as an error) are sorted according to age (i.e. top one is oldest, last one newest etc).

ANIMSIZE_UNKNOWN:

  • Animation data entry size is unknown (Used as an error).

ANIMSIZE_23:

  • Animation data entry size is 23 bytes.
  • Used at least by 0.11.0 and 0.11.1 releases of ScummVM.
  • Introduced in revision 21772, stopped using in revision 31444.

ANIMSIZE_30_PTRS_BROKEN:

  • Animation data entry size is 30 bytes.
  • Data and mask pointers in the saved structs are always NULL.
  • Introduced in revision 31453, stopped using in revision 32073.

ANIMSIZE_30_PTRS_INTACT:

  • Animation data entry size is 30 bytes.
  • Data and mask pointers in the saved structs are intact, so you can test them for equality or inequality with NULL but don't try using them for anything else, it won't work.
  • Introduced in revision 31444, got broken in revision 31453, got fixed in revision 32073 and used after that.

TEMP_OS_FORMAT:

  • Temporary Operation Stealth savegame format.
  • NOT backward compatible and NOT to be supported in the future. This format should ONLY be used during development and abandoned later in favor of a better format!