Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

Cine Namespace Reference

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.

Supported games:

Cinematique evo.1

Cinematique evo.2


struct  AdLibRegisterSoundInstrument
class  AdLibSoundDriver
class  AdLibSoundDriverADL
class  AdLibSoundDriverINS
struct  AdLibSoundInstrument
class  AnimData
struct  AnimDataEntry
struct  AnimHeader2Struct
struct  AnimHeaderStruct
struct  BGIncrust
struct  CharacterEntry
struct  ChunkHeader
class  CineEngine
struct  CINEGameDescription
class  CineUnpacker
class  FWRenderer
 Future Wars renderer. More...
class  FWScript
 Future Wars script, prcLinkedListStruct replacement. More...
class  FWScriptInfo
 Future Wars script factory and info. More...
class  Menu
struct  MouseCursor
struct  MouseStatusStruct
struct  ObjectStruct
struct  Opcode
class  OSRenderer
 Operation Stealth renderer. More...
class  OSScript
 Operation Stealth script, prcLinkedListStruct replacement. More...
class  OSScriptInfo
 Operation Stealth script factory and info. More...
struct  overlay
struct  palBg
 Background with palette. More...
struct  PalEntry
class  Palette
struct  PartBuffer
class  PaulaSound
class  PCSound
class  PCSoundDriver
class  PCSoundFxPlayer
class  RawObjectScript
 Object script class, RelObjectScript replacement. More...
class  RawScript
 Script bytecode and initial labels, ScriptStruct replacement. More...
class  ScriptVars
 Fixed size array for script variables. More...
struct  SelectedObjStruct
class  SelectionMenu
struct  SeqListElement
class  Sound
struct  TextHandler
class  TextInputMenu


typedef char CommandeType [20]
typedef int(FWScript::* OpFunc )()
typedef Common::Array
< RawObjectScriptPtr
typedef Common::SharedPtr
< RawObjectScript
typedef Common::Array
< RawScriptPtr
typedef Common::SharedPtr
< RawScript
typedef Common::List< ScriptPtrScriptList
typedef Common::SharedPtr
< FWScript
typedef Common::HashMap
< Common::String, const char * > 


enum  {
enum  { kCineDebugScript = 1 << 0, kCineDebugPart = 1 << 1, kCineDebugSound = 1 << 2 }
enum  { kCmpEQ = (1 << 0), kCmpGT = (1 << 1), kCmpLT = (1 << 2) }
enum  CineGameFeatures { GF_CD = 1 << 0, GF_DEMO = 1 << 1, GF_ALT_FONT = 1 << 2, GF_CRYPTED_BOOT_PRC = 1 << 3 }
enum  CineGameType { GType_FW = 1, GType_OS }
enum  CineSaveGameFormat {
 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. More...
enum  MouseButtonState { kLeftMouseButton = (1 << 0), kRightMouseButton = (1 << 1) }
 Bit masks for mouse buttons' states Bit on = mouse button down Bit off = mouse button up.
enum  xMoveKeybEnums { kKeybMoveCenterX = 0, kKeybMoveRight = 1, kKeybMoveLeft = 2 }
 Values used by the xMoveKeyb variable.
enum  yMoveKeybEnums { kKeybMoveCenterY = 0, kKeybMoveDown = 1, kKeybMoveUp = 2 }
 Values used by the yMoveKeyb variable.


uint16 addAni (uint16 param1, uint16 objIdx, const int8 *ptr, SeqListElement &element, uint16 param3, int16 *param4)
void addBackground (const char *bgName, uint16 bgIdx)
void addGfxElement (int16 objIdx, int16 param, int16 type)
 Add new background mask overlay.
void addMessage (byte param1, int16 param2, int16 param3, int16 param4, int16 param5)
void addObjectParam (byte objIdx, byte paramIdx, int16 newValue)
void addOverlay (uint16 objIdx, uint16 type)
 Add new overlay sprite to the list.
void addPlayerCommandMessage (int16 cmd)
 Add action result message to overlay list.
void addScriptToGlobalScripts (uint16 idx)
void addSeqListElement (uint16 objIdx, int16 param1, int16 param2, int16 frame, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8)
void addSpriteFilledToBGList (int16 objIdx)
 Add filled sprite to the background.
void addToBGList (int16 objIdx)
 Add masked sprite to the background.
void blitRawScreen (byte *frontBuffer)
void blitScreen (byte *frontBuffer, byte *backbuffer)
int16 buildObjectListCommand (int16 param)
int bytePos (const int bitPos, const int numBytes, const bool bigEndian)
 Calculate byte position of given bit position in a multibyte variable using defined endianness.
int16 checkCollision (int16 objIdx, int16 x, int16 y, int16 numZones, int16 zoneIdx)
void checkDataDisk (int16 param)
void checkForPendingDataLoad ()
void closePart ()
uint16 compareObjectParam (byte objIdx, byte type, int16 value)
uint16 compareObjectParamRanges (uint16 objIdx1, uint16 xAdd1, uint16 yAdd1, uint16 maskAdd1, uint16 objIdx2, uint16 xAdd2, uint16 yAdd2, uint16 maskAdd2)
bool compareRanges (uint16 aStart, uint16 aEnd, uint16 bStart, uint16 bEnd)
uint16 compareVars (int16 a, int16 b)
void computeMove1 (SeqListElement &element, int16 x, int16 y, int16 param1, int16 param2, int16 x2, int16 y2)
uint16 computeMove2 (SeqListElement &element)
void convert4BBP (byte *dest, const byte *source, int16 width, int16 height)
 Decode 4bpp sprite.
void convert8BBP (byte *dest, const byte *source, int16 width, int16 height)
 Decode 16 color image with palette.
void convert8BBP2 (byte *dest, byte *source, int16 width, int16 height)
 Decode 8bit image.
void convertMask (byte *dest, const byte *source, int16 width, int16 height)
 Decode 1bpp mask.
void createBgIncrustListElement (int16 objIdx, int16 param)
 Add new element to incrust list.
void decompileScript (const byte *scriptPtr, uint16 scriptSize, uint16 scriptIdx)
enum CineSaveGameFormat detectSaveGameFormat (Common::SeekableReadStream &fHandle)
 Savegame format detector.
void drawDoubleMessageBox (int16 x, int16 y, int16 width, int16 currentY, int16 color, byte *page)
void drawMessageBox (int16 x, int16 y, int16 width, int16 currentY, int16 offset, int16 color, byte *page)
void drawOverlays ()
void drawSprite (Common::List< overlay >::iterator it, const byte *spritePtr, const byte *maskPtr, uint16 width, uint16 height, byte *page, int16 x, int16 y)
void drawSpriteRaw (const byte *spritePtr, const byte *maskPtr, int16 width, int16 height, byte *page, int16 x, int16 y)
void drawSpriteRaw2 (const byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y)
void drawString (const char *string, byte param)
void dumpBundle (const char *fileName)
void dumpScript (char *dumpName)
int emptyAnimSpace (int start=0)
 Find next empty space animDataTable.
void executeGlobalScripts ()
void executeObjectScripts ()
uint16 executePlayerInput ()
void fadeFromBlack ()
void fadeToBlack ()
int16 findFileInBundle (const char *fileName)
int16 findPaletteFromName (const char *fileName)
int fitLine (const char *str, int maxWidth, int &words, int &width)
 Fit a substring of text into one line of fixed width text box.
static Common::String fixVolCnfFileName (const uint8 *src, uint len)
void flip ()
void freeAnimDataRange (byte startIdx, byte numIdx)
 Clear part of animDataTable.
void freeAnimDataTable ()
 Clear whole animDataTable.
void freeErrmessDat ()
void generateMask (const byte *sprite, byte *mask, uint16 size, byte transparency)
 Generate mask for image.
static byte getAnimTransparentColor (const char *animName)
 Find transparent color index for image.
int getKeyData ()
void getMouseData (uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY)
int16 getObjectParam (uint16 objIdx, uint16 paramIdx)
int16 getObjectUnderCursor (uint16 x, uint16 y)
 Find index of the object under cursor.
int16 getRelEntryForObject (uint16 param1, uint16 param2, SelectedObjStruct *pSelectedObject)
int16 getZoneFromPosition (byte *page, int16 x, int16 y, int16 width)
int16 getZoneFromPositionRaw (byte *page, int16 x, int16 y, int16 width)
void gfxConvertSpriteToRaw (byte *dst, const byte *src, uint16 w, uint16 h)
void gfxCopyPage (byte *source, byte *dest)
void gfxCopyRawPage (byte *source, byte *dest)
void gfxDrawLine (int16 x1, int16 y1, int16 x2, int16 y2, byte color, byte *page)
void gfxDrawMaskedSprite (const byte *spritePtr, const byte *maskPtr, uint16 width, uint16 height, byte *page, int16 x, int16 y)
void gfxDrawPlainBox (int16 x1, int16 y1, int16 x2, int16 y2, byte color)
void gfxDrawPlainBoxRaw (int16 x1, int16 y1, int16 x2, int16 y2, byte color, byte *page)
void gfxDrawSprite (byte *src4, uint16 sw, uint16 sh, byte *dst4, int16 sx, int16 sy)
void gfxFillSprite (const byte *spritePtr, uint16 width, uint16 height, byte *page, int16 x, int16 y, uint8 fillColor)
void gfxFlipPage ()
void gfxFlipRawPage (byte *frontBuffer)
int16 gfxGetBit (int16 x, int16 y, const byte *ptr, int16 width)
byte gfxGetColor (int16 x, int16 y, const byte *ptr, int16 width)
void gfxRedrawMouseCursor ()
void gfxResetPage (byte *pagePtr)
void gfxResetRawPage (byte *pageRaw)
void gfxUpdateIncrustMask (byte *destMask, int16 x, int16 y, int16 width, int16 height, const byte *srcMask, int16 xm, int16 ym, int16 maskWidth, int16 maskHeight)
void gfxUpdateSpriteMask (byte *destMask, int16 x, int16 y, int16 width, int16 height, const byte *srcMask, int16 xm, int16 ym, int16 maskWidth, int16 maskHeight)
void gfxWaitVBL ()
ScriptVars globalVars (NUM_MAX_VAR+1)
void hideMouse ()
void initLanguage (Common::Language lang)
bool isBigEndian (const EndianType endian)
 Is given endian type big endian? (Handles native endian type too, otherwise this would be trivial).
bool isSeqRunning (uint16 param1, uint16 param2, uint16 param3)
static const Graphics::PixelFormat kHighPalFormat (kHighPalBytesPerColor, 8, 8, 8, 0, 0, 8, 16, 0)
 High resolution (24-bit) color format used in Cine's 256-color modes.
static const Graphics::PixelFormat kLowPalFormat (kLowPalBytesPerColor, 3, 3, 3, 0, 8, 4, 0, 0)
 Low resolution (9-bit) color format used in Cine's 16-color modes.
static const Graphics::PixelFormat kSystemPalFormat (4, 8, 8, 8, 0, 0, 8, 16, 0)
 The color format used by OSystem's setPalette-function.
int loadAni (const char *resourceName, int16 idx)
 Load animation.
void loadAnimHeader (AnimHeaderStruct &animHeader, Common::MemoryReadStream readS)
 Read image header.
byte loadBg (const char *bgName)
void loadBgIncrustFromSave (Common::SeekableReadStream &fHandle)
 Restore incrust list from savefile.
bool loadChunkHeader (Common::SeekableReadStream &in, ChunkHeader &header)
bool loadCommandVariables (Common::SeekableReadStream &in)
byte loadCtFW (const char *ctName)
byte loadCtOS (const char *ctName)
void loadErrmessDat (const char *fname)
bool loadGlobalScripts (Common::SeekableReadStream &in)
void loadMsg (char *pMsgName)
int loadMsk (const char *resourceName, int16 idx)
 Load 1bpp mask.
void loadObject (char *pObjectName)
bool loadObjectScripts (Common::SeekableReadStream &in)
bool loadObjectTable (Common::SeekableReadStream &in)
void loadOverlayFromSave (Common::SeekableReadStream &fHandle)
 Restore overlay sprites from savefile.
bool loadOverlayList (Common::SeekableReadStream &in)
void loadPal (const char *fileName)
void loadPart (const char *partName)
void loadPoldatDat (const char *fname)
bool loadPrc (const char *pPrcName)
void loadRel (char *pRelName)
void loadRelatedPalette (const char *fileName)
int loadResource (const char *resourceName, int16 idx)
 Load a resource into animDataTable.
void loadResourcesFromSave (Common::SeekableReadStream &fHandle, enum CineSaveGameFormat saveGameFormat)
 Load animDataTable from save.
bool loadScreenParams (Common::SeekableReadStream &in)
void loadScriptFromSave (Common::SeekableReadStream &fHandle, bool isGlobal)
 Restore script list item from savefile.
int loadSeq (const char *resourceName, int16 idx)
 Load SEQ data into animDataTable.
bool loadSeqList (Common::SeekableReadStream &in)
int loadSet (const char *resourceName, int16 idx)
 Load image set.
int loadSpl (const char *resourceName, int16 idx)
 Load SPL data into animDataTable.
void loadTextData (const char *filename)
 Loads font data from the given file. The number of characters used in the font varies between game versions: 78 (Most PC, Amiga and Atari ST versions of Future Wars, but also Operation Stealth's Amiga demo), 85 (All observed versions of German Future Wars (Amiga and PC), possibly Spanish Future Wars too), 90 (Most PC, Amiga and Atari ST versions of Operation Stealth), 93 (All observed versions of German Operation Stealth (Amiga and PC)).
bool loadZoneData (Common::SeekableReadStream &in)
bool loadZoneQuery (Common::SeekableReadStream &in)
void mainLoop (int bootScriptIdx)
void mainLoopSub6 ()
void makeActionMenu ()
void makeCommandLine ()
int16 makeMenuChoice (const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width, bool recheckValue)
bool makeTextEntryMenu (const char *messagePtr, char *inputString, int stringMaxLength, int y)
void manageEvents ()
void maskBgOverlay (const byte *bgPtr, const byte *maskPtr, int16 width, int16 height, byte *page, int16 x, int16 y)
void modifyObjectParam (byte objIdx, byte paramIdx, int16 newValue)
void modifySeqListElement (uint16 objIdx, int16 var4Test, int16 param1, int16 param2, int16 param3, int16 param4)
void moveUsingKeyboard (int x, int y)
 Move the player character using the keyboard.
int power (int base, int power)
 Calculate the value of "base" to the power of "power".
static void processEvent (Common::Event &event)
void processInventory (int16 x, int16 y)
uint16 processKeyboard (uint16 param)
void processSeqList ()
void processSeqListElement (SeqListElement &element)
void purgeGlobalScripts ()
void purgeObjectScripts ()
void purgeSeqList ()
byte * readBundleFile (int16 foundFileIdx, uint32 *size)
byte * readBundleSoundFile (const char *entryName, uint32 *size)
byte * readFile (const char *filename, bool crypted)
void readFromPart (int16 idx, byte *dataPtr, uint32 maxSize)
void removeExtention (char *dest, const char *source)
void removeGfxElement (int16 objIdx, int16 param, int16 type)
 Remove background mask overlay.
void removeMessages ()
int removeOverlay (uint16 objIdx, uint16 param)
 Remove overlay sprite from the list.
void removeSeq (uint16 param1, uint16 param2, uint16 param3)
void resetBgIncrustList ()
 Reset var8 (probably something related to bgIncrustList).
void resetGfxEntityEntry (uint16 objIdx)
void resetObjectTable ()
 Resets all elements in the object table.
byte rolByte (byte value, uint n)
 Rotate byte value to the left by n bits.
void runObjectScript (int16 entryIdx)
void saveAnimDataTable (Common::OutSaveFile &out)
void saveBgIncrustList (Common::OutSaveFile &out)
void saveCommandBuffer (Common::OutSaveFile &out)
 Save the 80 bytes long command buffer padded to that length with zeroes.
void saveCommandVariables (Common::OutSaveFile &out)
void saveGlobalScripts (Common::OutSaveFile &out)
void saveObjectScripts (Common::OutSaveFile &out)
void saveObjectTable (Common::OutSaveFile &out)
void saveOverlayList (Common::OutSaveFile &out)
void saveScreenParams (Common::OutSaveFile &out)
void saveSeqList (Common::OutSaveFile &out)
void saveZoneData (Common::OutSaveFile &out)
void saveZoneQuery (Common::OutSaveFile &out)
int16 selectSubObject (int16 x, int16 y, int16 param)
void setMouseCursor (int cursor)
void setTextWindow (uint16 param1, uint16 param2, uint16 param3, uint16 param4)
void setupObject (byte objIdx, uint16 param1, uint16 param2, uint16 param3, uint16 param4)
void setupOpcodes ()
void stopMusicAfterFadeOut ()
void stopSample ()
void subObjectParam (byte objIdx, byte paramIdx, int16 newValue)
void transformPaletteRange (byte startColor, byte numColor, int8 r, int8 g, int8 b)
void waitPlayerInput ()
bool writeChunkHeader (Common::OutSaveFile &out, const ChunkHeader &header)


byte _danKeysPressed
uint16 _messageLen
bool _paletteNeedUpdate
byte * additionalBgTable [9]
uint16 allowPlayerInput
Common::Array< AnimData > animDataTable
Common::List< BGIncrust > bgIncrustList
uint16 bgVar0
static const int16 canUseOnItemTable [] = { 1, 0, 0, 1, 1, 0, 0 }
int16 canUseOnObject = 0
uint16 checkForPendingDataLoadSwitch
static const int16 choiceResultTable [] = { 1, 1, 1, 2, 1, 1, 1 }
byte * collisionPage
Common::String commandBuffer
const char ** commandPrepositionTable
int16 commandVar1
int16 commandVar2
int16 commandVar3 [4]
const CommandeType * confirmMenu
static const uint32 CURRENT_OS_SAVE_VER = 0
int16 currentAdditionalBgIdx = 0
int16 currentAdditionalBgIdx2 = 0
char currentCtName [15]
char currentDatName [30]
int16 currentDisk
char currentMsgName [20]
char currentObjectName [20]
char currentPartName [15]
char currentPrcName [20]
char currentRelName [20]
CommandeType currentSaveName [10]
SelectedObjStruct currentSelectedObject
static const byte cursorPalette []
const CommandeType * defaultActionCommand
const char * defaultCommandPreposition
bool disableSystemMenu = false
uint16 dummyU16
bool egoMovedWithKeyboard = false
uint16 errorVar
bool fadeRequired
const char ** failureMessages
static const CharacterEntry fontParamTable_alt [NUM_FONT_CHARS]
static const CharacterEntry fontParamTable_standard [NUM_FONT_CHARS]
CineEngine * g_cine
Sound * g_sound
static const CINEGameDescription gameDescriptions []
ScriptList globalScripts
ScriptVars globalVars
bool inMenu
uint16 isDrawCommandEnabled
byte isInPause = 0
static const int kCollisionPageBgIdxAlias = 8
int lastKeyStroke = 0
uint16 menuCommandLen
byte menuVar
uint16 menuVar4 = 0
uint16 menuVar5 = 0
Common::StringList messageTable
static const byte mouseCursorCross []
static const byte mouseCursorDisk []
static const byte mouseCursorNormal []
static struct Cine::MouseCursor mouseCursors []
MouseStatusStruct mouseData
uint16 mouseLeft = 0
uint16 mouseRight = 0
uint16 mouseUpdateStatus
uint16 musicIsPlaying
uint16 needMouseSave = 0
char newMsgName [20]
char newObjectName [20]
char newPrcName [20]
char newRelName [20]
CommandeType objectListCommand [20]
ScriptList objectScripts
Common::Array< ObjectStruct > objectTable
int16 objListTab [20]
const char ** otherMessages
Common::List< overlay > overlayList
Common::Array< PalEntry > palArray
static byte paletteBuffer1 [16]
static byte paletteBuffer2 [16]
Common::Array< PartBuffer > partBuffer
int16 playerCommand
RawObjectScriptArray relTable
 Object script bytecode table.
FWRendererrenderer = NULL
int16 saveVar2
 Script factory.
RawScriptArray scriptTable
 Table of script bytecode.
Common::List< SeqListElement > seqList
static const int16 subObjectUseTable [] = { 3, 3, 3, 3, 3, 0, 0 }
const CommandeType * systemMenu
static const uint32 TEMP_OS_FORMAT_ID = MKID_BE('TEMP')
static const AnimDataEntry transparencyData []
uint16 var2
uint16 var3
uint16 var4
uint16 var5
uint32 var8
uint16 waitForPlayerClick
uint16 xMoveKeyb = kKeybMoveCenterX
uint16 yMoveKeyb = kKeybMoveCenterY
Common::Array< uint16 > zoneData
Common::Array< uint16 > zoneQuery
 Only exists in Operation Stealth.

Generated by  Doxygen 1.6.0   Back to index