aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tinsel')
-rw-r--r--engines/tinsel/actors.cpp6
-rw-r--r--engines/tinsel/actors.h4
-rw-r--r--engines/tinsel/anim.h40
-rw-r--r--engines/tinsel/background.h32
-rw-r--r--engines/tinsel/dialogs.cpp18
-rw-r--r--engines/tinsel/handle.cpp24
-rw-r--r--engines/tinsel/multiobj.h14
-rw-r--r--engines/tinsel/object.h72
-rw-r--r--engines/tinsel/palette.cpp10
-rw-r--r--engines/tinsel/palette.h32
-rw-r--r--engines/tinsel/pcode.cpp94
-rw-r--r--engines/tinsel/pcode.h30
-rw-r--r--engines/tinsel/polygons.cpp28
-rw-r--r--engines/tinsel/scene.cpp4
-rw-r--r--engines/tinsel/scene.h10
-rw-r--r--engines/tinsel/sched.h14
-rw-r--r--engines/tinsel/text.h38
17 files changed, 235 insertions, 235 deletions
diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp
index 6b7809e52b..284e166899 100644
--- a/engines/tinsel/actors.cpp
+++ b/engines/tinsel/actors.cpp
@@ -56,9 +56,9 @@ namespace Tinsel {
/** actor struct - one per actor */
struct T1_ACTOR_STRUC {
- int32 masking; //!< type of actor masking
- SCNHANDLE hActorId; //!< handle actor ID string index
- SCNHANDLE hActorCode; //!< handle to actor script
+ int32 masking; ///< type of actor masking
+ SCNHANDLE hActorId; ///< handle actor ID string index
+ SCNHANDLE hActorCode; ///< handle to actor script
} PACKED_STRUCT;
struct T2_ACTOR_STRUC {
diff --git a/engines/tinsel/actors.h b/engines/tinsel/actors.h
index 02976acaed..0cf77e8be1 100644
--- a/engines/tinsel/actors.h
+++ b/engines/tinsel/actors.h
@@ -145,8 +145,8 @@ struct SAVED_ACTOR {
short zFactor;
bool bAlive;
bool bHidden;
- SCNHANDLE presFilm; //!< the film that reel belongs to
- short presRnum; //!< the present reel number
+ SCNHANDLE presFilm; ///< the film that reel belongs to
+ short presRnum; ///< the present reel number
short presPlayX, presPlayY;
};
typedef SAVED_ACTOR *PSAVED_ACTOR;
diff --git a/engines/tinsel/anim.h b/engines/tinsel/anim.h
index 6022edfc08..97065f6a54 100644
--- a/engines/tinsel/anim.h
+++ b/engines/tinsel/anim.h
@@ -35,11 +35,11 @@ struct OBJECT;
/** animation structure */
struct ANIM {
- int aniRate; //!< animation speed
- int aniDelta; //!< animation speed delta counter
- OBJECT *pObject; //!< object to animate (assumed to be multi-part)
- uint32 hScript; //!< animation script handle
- int scriptIndex; //!< current position in animation script
+ int aniRate; ///< animation speed
+ int aniDelta; ///< animation speed delta counter
+ OBJECT *pObject; ///< object to animate (assumed to be multi-part)
+ uint32 hScript; ///< animation script handle
+ int scriptIndex; ///< current position in animation script
};
typedef ANIM *PANIM;
@@ -47,25 +47,25 @@ typedef void (*PANI_ADDR)(struct ANIM *);
/** Animation script commands */
enum {
- ANI_END = 0, //!< end of animation script
- ANI_JUMP = 1, //!< animation script jump
- ANI_HFLIP = 2, //!< flip animated object horizontally
- ANI_VFLIP = 3, //!< flip animated object vertically
- ANI_HVFLIP = 4, //!< flip animated object in both directions
- ANI_ADJUSTX = 5, //!< adjust animated object x animation point
- ANI_ADJUSTY = 6, //!< adjust animated object y animation point
- ANI_ADJUSTXY = 7, //!< adjust animated object x & y animation points
- ANI_NOSLEEP = 8, //!< do not sleep for this frame
- ANI_CALL = 9, //!< call routine
- ANI_HIDE = 10, //!< hide animated object
- ANI_STOP = 11 //!< stop sound
+ ANI_END = 0, ///< end of animation script
+ ANI_JUMP = 1, ///< animation script jump
+ ANI_HFLIP = 2, ///< flip animated object horizontally
+ ANI_VFLIP = 3, ///< flip animated object vertically
+ ANI_HVFLIP = 4, ///< flip animated object in both directions
+ ANI_ADJUSTX = 5, ///< adjust animated object x animation point
+ ANI_ADJUSTY = 6, ///< adjust animated object y animation point
+ ANI_ADJUSTXY = 7, ///< adjust animated object x & y animation points
+ ANI_NOSLEEP = 8, ///< do not sleep for this frame
+ ANI_CALL = 9, ///< call routine
+ ANI_HIDE = 10, ///< hide animated object
+ ANI_STOP = 11 ///< stop sound
};
/** animation script command possibilities */
union ANI_SCRIPT {
- int32 op; //!< treat as an opcode or operand
- uint32 hFrame; //!< treat as a animation frame handle
-// PANI_ADDR pFunc; //!< treat as a animation function call
+ int32 op; ///< treat as an opcode or operand
+ uint32 hFrame; ///< treat as a animation frame handle
+// PANI_ADDR pFunc; ///< treat as a animation function call
};
diff --git a/engines/tinsel/background.h b/engines/tinsel/background.h
index b3599d77ae..e6074f7bb4 100644
--- a/engines/tinsel/background.h
+++ b/engines/tinsel/background.h
@@ -49,26 +49,26 @@ enum {
/** background playfield structure - a playfield is a container for modules */
struct PLAYFIELD {
- OBJECT *pDispList; //!< object display list for this playfield
- frac_t fieldX; //!< current world x position of playfield
- frac_t fieldY; //!< current world y position of playfield
- frac_t fieldXvel; //!< current x velocity of playfield
- frac_t fieldYvel; //!< current y velocity of playfield
- Common::Rect rcClip; //!< clip rectangle for this playfield
- bool bMoved; //!< set when playfield has moved
+ OBJECT *pDispList; ///< object display list for this playfield
+ frac_t fieldX; ///< current world x position of playfield
+ frac_t fieldY; ///< current world y position of playfield
+ frac_t fieldXvel; ///< current x velocity of playfield
+ frac_t fieldYvel; ///< current y velocity of playfield
+ Common::Rect rcClip; ///< clip rectangle for this playfield
+ bool bMoved; ///< set when playfield has moved
};
/** multi-playfield background structure - a backgnd is a container of playfields */
struct BACKGND {
- COLORREF rgbSkyColour; //!< background sky colour
- Common::Point ptInitWorld; //!< initial world position
- Common::Rect rcScrollLimits; //!< scroll limits
- int refreshRate; //!< background update process refresh rate
- frac_t *pXscrollTable; //!< pointer to x direction scroll table for this background
- frac_t *pYscrollTable; //!< pointer to y direction scroll table for this background
- int numPlayfields; //!< number of playfields for this background
- PLAYFIELD *fieldArray; //!< pointer to array of all playfields for this background
- bool bAutoErase; //!< when set - screen is cleared before anything is plotted (unused)
+ COLORREF rgbSkyColour; ///< background sky colour
+ Common::Point ptInitWorld; ///< initial world position
+ Common::Rect rcScrollLimits; ///< scroll limits
+ int refreshRate; ///< background update process refresh rate
+ frac_t *pXscrollTable; ///< pointer to x direction scroll table for this background
+ frac_t *pYscrollTable; ///< pointer to y direction scroll table for this background
+ int numPlayfields; ///< number of playfields for this background
+ PLAYFIELD *fieldArray; ///< pointer to array of all playfields for this background
+ bool bAutoErase; ///< when set - screen is cleared before anything is plotted (unused)
};
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index 9550500867..3fdfb0ce41 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -507,16 +507,16 @@ static bool bRemember;
enum BTYPE {
- RGROUP, //!< Radio button group - 1 is selectable at a time. Action on double click
- ARSBUT, //!< Action if a radio button is selected
- AABUT, //!< Action always
- AATBUT, //!< Action always, text box
+ RGROUP, ///< Radio button group - 1 is selectable at a time. Action on double click
+ ARSBUT, ///< Action if a radio button is selected
+ AABUT, ///< Action always
+ AATBUT, ///< Action always, text box
ARSGBUT,
- AAGBUT, //!< Action always, graphic button
- SLIDER, //!< Not a button at all
- TOGGLE, //!< Discworld 1 toggle
- TOGGLE1, //!< Discworld 2 toggle type 1
- TOGGLE2, //!< Discworld 2 toggle type 2
+ AAGBUT, ///< Action always, graphic button
+ SLIDER, ///< Not a button at all
+ TOGGLE, ///< Discworld 1 toggle
+ TOGGLE1, ///< Discworld 2 toggle type 1
+ TOGGLE2, ///< Discworld 2 toggle type 2
DCTEST,
FLIP,
FRGROUP,
diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp
index 93536fd4e5..4ec398fa40 100644
--- a/engines/tinsel/handle.cpp
+++ b/engines/tinsel/handle.cpp
@@ -58,25 +58,25 @@ bool bLockedScene = 0;
//----------------- LOCAL DEFINES --------------------
struct MEMHANDLE {
- char szName[12]; //!< 00 - file name of graphics file
- int32 filesize; //!< 12 - file size and flags
- MEM_NODE *pNode; //!< 16 - memory node for the graphics
+ char szName[12]; ///< 00 - file name of graphics file
+ int32 filesize; ///< 12 - file size and flags
+ MEM_NODE *pNode; ///< 16 - memory node for the graphics
uint32 flags2;
};
/** memory allocation flags - stored in the top bits of the filesize field */
enum {
- fPreload = 0x01000000L, //!< preload memory
- fDiscard = 0x02000000L, //!< discard memory
- fSound = 0x04000000L, //!< sound data
- fGraphic = 0x08000000L, //!< graphic data
- fCompressed = 0x10000000L, //!< compressed data
- fLoaded = 0x20000000L //!< set when file data has been loaded
+ fPreload = 0x01000000L, ///< preload memory
+ fDiscard = 0x02000000L, ///< discard memory
+ fSound = 0x04000000L, ///< sound data
+ fGraphic = 0x08000000L, ///< graphic data
+ fCompressed = 0x10000000L, ///< compressed data
+ fLoaded = 0x20000000L ///< set when file data has been loaded
};
-#define FSIZE_MASK 0x00FFFFFFL //!< mask to isolate the filesize
-#define MALLOC_MASK 0xFF000000L //!< mask to isolate the memory allocation flags
-//#define HANDLEMASK 0xFF800000L //!< get handle of address
+#define FSIZE_MASK 0x00FFFFFFL ///< mask to isolate the filesize
+#define MALLOC_MASK 0xFF000000L ///< mask to isolate the memory allocation flags
+//#define HANDLEMASK 0xFF800000L ///< get handle of address
//----------------- LOCAL GLOBAL DATA --------------------
diff --git a/engines/tinsel/multiobj.h b/engines/tinsel/multiobj.h
index 79984f8dff..b94d63e79f 100644
--- a/engines/tinsel/multiobj.h
+++ b/engines/tinsel/multiobj.h
@@ -40,13 +40,13 @@ struct OBJECT;
* multi-object initialisation structure (parallels OBJ_INIT struct)
*/
struct MULTI_INIT {
- SCNHANDLE hMulFrame; //!< multi-objects shape - NULL terminated list of IMAGE structures
- int32 mulFlags; //!< multi-objects flags
- int32 mulID; //!< multi-objects id
- int32 mulX; //!< multi-objects initial x ani position
- int32 mulY; //!< multi-objects initial y ani position
- int32 mulZ; //!< multi-objects initial z position
- uint32 otherFlags; //!< multi-objects Tinsel 2 - other flags
+ SCNHANDLE hMulFrame; ///< multi-objects shape - NULL terminated list of IMAGE structures
+ int32 mulFlags; ///< multi-objects flags
+ int32 mulID; ///< multi-objects id
+ int32 mulX; ///< multi-objects initial x ani position
+ int32 mulY; ///< multi-objects initial y ani position
+ int32 mulZ; ///< multi-objects initial z position
+ uint32 otherFlags; ///< multi-objects Tinsel 2 - other flags
} PACKED_STRUCT;
typedef MULTI_INIT *PMULTI_INIT;
diff --git a/engines/tinsel/object.h b/engines/tinsel/object.h
index 3dafcb3522..88854502e7 100644
--- a/engines/tinsel/object.h
+++ b/engines/tinsel/object.h
@@ -40,17 +40,17 @@ enum {
NUM_OBJECTS = 256,
// object flags
- DMA_WNZ = 0x0001, //!< write non-zero data
- DMA_CNZ = 0x0002, //!< write constant on non-zero data
- DMA_CONST = 0x0004, //!< write constant on both zero & non-zero data
- DMA_WA = 0x0008, //!< write all data
- DMA_FLIPH = 0x0010, //!< flip object horizontally
- DMA_FLIPV = 0x0020, //!< flip object vertically
- DMA_CLIP = 0x0040, //!< clip object
- DMA_TRANS = 0x0084, //!< translucent rectangle object
- DMA_ABS = 0x0100, //!< position of object is absolute
- DMA_CHANGED = 0x0200, //!< object has changed in some way since the last frame
- DMA_USERDEF = 0x0400, //!< user defined flags start here
+ DMA_WNZ = 0x0001, ///< write non-zero data
+ DMA_CNZ = 0x0002, ///< write constant on non-zero data
+ DMA_CONST = 0x0004, ///< write constant on both zero & non-zero data
+ DMA_WA = 0x0008, ///< write all data
+ DMA_FLIPH = 0x0010, ///< flip object horizontally
+ DMA_FLIPV = 0x0020, ///< flip object vertically
+ DMA_CLIP = 0x0040, ///< clip object
+ DMA_TRANS = 0x0084, ///< translucent rectangle object
+ DMA_ABS = 0x0100, ///< position of object is absolute
+ DMA_CHANGED = 0x0200, ///< object has changed in some way since the last frame
+ DMA_USERDEF = 0x0400, ///< user defined flags start here
DMA_GHOST = 0x0080,
@@ -61,12 +61,12 @@ enum {
/** structure for image */
#include "common/pack-start.h" // START STRUCT PACKING
struct IMAGE {
- short imgWidth; //!< image width
- unsigned short imgHeight; //!< image height
- short anioffX; //!< image x animation offset
- short anioffY; //!< image y animation offset
- SCNHANDLE hImgBits; //!< image bitmap handle
- SCNHANDLE hImgPal; //!< image palette handle
+ short imgWidth; ///< image width
+ unsigned short imgHeight; ///< image height
+ short anioffX; ///< image x animation offset
+ short anioffY; ///< image y animation offset
+ SCNHANDLE hImgBits; ///< image bitmap handle
+ SCNHANDLE hImgPal; ///< image palette handle
} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
@@ -76,25 +76,25 @@ typedef uint32 FRAME;
// object structure
struct OBJECT {
- OBJECT *pNext; //!< pointer to next object in list
- OBJECT *pSlave; //!< pointer to slave object (multi-part objects)
-// char *pOnDispList; //!< pointer to display list byte for background objects
-// frac_t xVel; //!< x velocity of object
-// frac_t yVel; //!< y velocity of object
- frac_t xPos; //!< x position of object
- frac_t yPos; //!< y position of object
- int zPos; //!< z position of object
- Common::Rect rcPrev; //!< previous screen coordinates of object bounding rectangle
- int flags; //!< object flags - see above for list
- PALQ *pPal; //!< objects palette Q position
- int constant; //!< which colour in palette for monochrome objects
- int width; //!< width of object
- int height; //!< height of object
- SCNHANDLE hBits; //!< image bitmap handle
- SCNHANDLE hImg; //!< handle to object image definition
- SCNHANDLE hShape; //!< objects current animation frame
- SCNHANDLE hMirror; //!< objects previous animation frame
- int oid; //!< object identifier
+ OBJECT *pNext; ///< pointer to next object in list
+ OBJECT *pSlave; ///< pointer to slave object (multi-part objects)
+// char *pOnDispList; ///< pointer to display list byte for background objects
+// frac_t xVel; ///< x velocity of object
+// frac_t yVel; ///< y velocity of object
+ frac_t xPos; ///< x position of object
+ frac_t yPos; ///< y position of object
+ int zPos; ///< z position of object
+ Common::Rect rcPrev; ///< previous screen coordinates of object bounding rectangle
+ int flags; ///< object flags - see above for list
+ PALQ *pPal; ///< objects palette Q position
+ int constant; ///< which colour in palette for monochrome objects
+ int width; ///< width of object
+ int height; ///< height of object
+ SCNHANDLE hBits; ///< image bitmap handle
+ SCNHANDLE hImg; ///< handle to object image definition
+ SCNHANDLE hShape; ///< objects current animation frame
+ SCNHANDLE hMirror; ///< objects previous animation frame
+ int oid; ///< object identifier
};
typedef OBJECT *POBJECT;
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index 8918aa47e6..a6e0a81406 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -40,12 +40,12 @@ namespace Tinsel {
/** video DAC transfer Q structure */
struct VIDEO_DAC_Q {
union {
- SCNHANDLE hRGBarray; //!< handle of palette or
- COLORREF *pRGBarray; //!< list of palette colours
+ SCNHANDLE hRGBarray; ///< handle of palette or
+ COLORREF *pRGBarray; ///< list of palette colours
} pal;
- bool bHandle; //!< when set - use handle of palette
- int destDACindex; //!< start index of palette in video DAC
- int numColours; //!< number of colours in "hRGBarray"
+ bool bHandle; ///< when set - use handle of palette
+ int destDACindex; ///< start index of palette in video DAC
+ int numColours; ///< number of colours in "hRGBarray"
};
diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h
index d5b64ae11f..1fb34a0782 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -42,18 +42,18 @@ typedef uint32 COLORREF;
#define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10)))
enum {
- MAX_COLOURS = 256, //!< maximum number of colours - for VGA 256
- BITS_PER_PIXEL = 8, //!< number of bits per pixel for VGA 256
- MAX_INTENSITY = 255, //!< the biggest value R, G or B can have
- NUM_PALETTES = 32, //!< number of palettes
+ MAX_COLOURS = 256, ///< maximum number of colours - for VGA 256
+ BITS_PER_PIXEL = 8, ///< number of bits per pixel for VGA 256
+ MAX_INTENSITY = 255, ///< the biggest value R, G or B can have
+ NUM_PALETTES = 32, ///< number of palettes
// Discworld has some fixed apportioned bits in the palette.
- BGND_DAC_INDEX = 0, //!< index of background colour in Video DAC
- FGND_DAC_INDEX = 1, //!< index of first foreground colour in Video DAC
- TBLUE1 = 228, //!< Blue used in translucent rectangles
- TBLUE2 = 229, //!< Blue used in translucent rectangles
- TBLUE3 = 230, //!< Blue used in translucent rectangles
- TBLUE4 = 231, //!< Blue used in translucent rectangles
+ BGND_DAC_INDEX = 0, ///< index of background colour in Video DAC
+ FGND_DAC_INDEX = 1, ///< index of first foreground colour in Video DAC
+ TBLUE1 = 228, ///< Blue used in translucent rectangles
+ TBLUE2 = 229, ///< Blue used in translucent rectangles
+ TBLUE3 = 230, ///< Blue used in translucent rectangles
+ TBLUE4 = 231, ///< Blue used in translucent rectangles
TALKFONT_COL = 233
};
@@ -73,8 +73,8 @@ enum {
/** hardware palette structure */
struct PALETTE {
- int32 numColours; //!< number of colours in the palette
- COLORREF palRGB[MAX_COLOURS]; //!< actual palette colours
+ int32 numColours; ///< number of colours in the palette
+ COLORREF palRGB[MAX_COLOURS]; ///< actual palette colours
} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
@@ -82,10 +82,10 @@ struct PALETTE {
/** palette queue structure */
struct PALQ {
- SCNHANDLE hPal; //!< handle to palette data struct
- int objCount; //!< number of objects using this palette
- int posInDAC; //!< palette position in the video DAC
- int numColours; //!< number of colours in the palette
+ SCNHANDLE hPal; ///< handle to palette data struct
+ int objCount; ///< number of objects using this palette
+ int posInDAC; ///< palette position in the video DAC
+ int numColours; ///< number of colours in the palette
// Discworld 2 fields
bool bFading; // Whether or not fading
COLORREF palRGB[MAX_COLOURS]; // actual palette colours
diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp
index 448972b7ed..63806a4d30 100644
--- a/engines/tinsel/pcode.cpp
+++ b/engines/tinsel/pcode.cpp
@@ -48,57 +48,57 @@ extern int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONT
/** list of all opcodes */
enum OPCODE {
- OP_HALT = 0, //!< end of program
- OP_IMM = 1, //!< loads signed immediate onto stack
- OP_ZERO = 2, //!< loads zero onto stack
- OP_ONE = 3, //!< loads one onto stack
- OP_MINUSONE = 4, //!< loads minus one onto stack
- OP_STR = 5, //!< loads string offset onto stack
- OP_FILM = 6, //!< loads film offset onto stack
- OP_FONT = 7, //!< loads font offset onto stack
- OP_PAL = 8, //!< loads palette offset onto stack
- OP_LOAD = 9, //!< loads local variable onto stack
- OP_GLOAD = 10, //!< loads global variable onto stack - long offset to variable
- OP_STORE = 11, //!< pops stack and stores in local variable - long offset to variable
- OP_GSTORE = 12, //!< pops stack and stores in global variable - long offset to variable
- OP_CALL = 13, //!< procedure call
- OP_LIBCALL = 14, //!< library procedure call - long offset to procedure
- OP_RET = 15, //!< procedure return
- OP_ALLOC = 16, //!< allocate storage on stack
- OP_JUMP = 17, //!< unconditional jump - signed word offset
- OP_JMPFALSE = 18, //!< conditional jump - signed word offset
- OP_JMPTRUE = 19, //!< conditional jump - signed word offset
- OP_EQUAL = 20, //!< tests top two items on stack for equality
- OP_LESS, //!< tests top two items on stack
- OP_LEQUAL, //!< tests top two items on stack
- OP_NEQUAL, //!< tests top two items on stack
- OP_GEQUAL, //!< tests top two items on stack
- OP_GREAT = 25, //!< tests top two items on stack
- OP_PLUS, //!< adds top two items on stack and replaces with result
- OP_MINUS, //!< subs top two items on stack and replaces with result
- OP_LOR, //!< logical or of top two items on stack and replaces with result
- OP_MULT, //!< multiplies top two items on stack and replaces with result
- OP_DIV = 30, //!< divides top two items on stack and replaces with result
- OP_MOD, //!< divides top two items on stack and replaces with modulus
- OP_AND, //!< bitwise ands top two items on stack and replaces with result
- OP_OR, //!< bitwise ors top two items on stack and replaces with result
- OP_EOR, //!< bitwise exclusive ors top two items on stack and replaces with result
- OP_LAND = 35, //!< logical ands top two items on stack and replaces with result
- OP_NOT, //!< logical nots top item on stack
- OP_COMP, //!< complements top item on stack
- OP_NEG, //!< negates top item on stack
- OP_DUP, //!< duplicates top item on stack
- OP_ESCON = 40, //!< start of escapable sequence
- OP_ESCOFF = 41, //!< end of escapable sequence
- OP_CIMM, //!< loads signed immediate onto stack (special to case statements)
- OP_CDFILM //!< loads film offset onto stack but not in current scene
+ OP_HALT = 0, ///< end of program
+ OP_IMM = 1, ///< loads signed immediate onto stack
+ OP_ZERO = 2, ///< loads zero onto stack
+ OP_ONE = 3, ///< loads one onto stack
+ OP_MINUSONE = 4, ///< loads minus one onto stack
+ OP_STR = 5, ///< loads string offset onto stack
+ OP_FILM = 6, ///< loads film offset onto stack
+ OP_FONT = 7, ///< loads font offset onto stack
+ OP_PAL = 8, ///< loads palette offset onto stack
+ OP_LOAD = 9, ///< loads local variable onto stack
+ OP_GLOAD = 10, ///< loads global variable onto stack - long offset to variable
+ OP_STORE = 11, ///< pops stack and stores in local variable - long offset to variable
+ OP_GSTORE = 12, ///< pops stack and stores in global variable - long offset to variable
+ OP_CALL = 13, ///< procedure call
+ OP_LIBCALL = 14, ///< library procedure call - long offset to procedure
+ OP_RET = 15, ///< procedure return
+ OP_ALLOC = 16, ///< allocate storage on stack
+ OP_JUMP = 17, ///< unconditional jump - signed word offset
+ OP_JMPFALSE = 18, ///< conditional jump - signed word offset
+ OP_JMPTRUE = 19, ///< conditional jump - signed word offset
+ OP_EQUAL = 20, ///< tests top two items on stack for equality
+ OP_LESS, ///< tests top two items on stack
+ OP_LEQUAL, ///< tests top two items on stack
+ OP_NEQUAL, ///< tests top two items on stack
+ OP_GEQUAL, ///< tests top two items on stack
+ OP_GREAT = 25, ///< tests top two items on stack
+ OP_PLUS, ///< adds top two items on stack and replaces with result
+ OP_MINUS, ///< subs top two items on stack and replaces with result
+ OP_LOR, ///< logical or of top two items on stack and replaces with result
+ OP_MULT, ///< multiplies top two items on stack and replaces with result
+ OP_DIV = 30, ///< divides top two items on stack and replaces with result
+ OP_MOD, ///< divides top two items on stack and replaces with modulus
+ OP_AND, ///< bitwise ands top two items on stack and replaces with result
+ OP_OR, ///< bitwise ors top two items on stack and replaces with result
+ OP_EOR, ///< bitwise exclusive ors top two items on stack and replaces with result
+ OP_LAND = 35, ///< logical ands top two items on stack and replaces with result
+ OP_NOT, ///< logical nots top item on stack
+ OP_COMP, ///< complements top item on stack
+ OP_NEG, ///< negates top item on stack
+ OP_DUP, ///< duplicates top item on stack
+ OP_ESCON = 40, ///< start of escapable sequence
+ OP_ESCOFF = 41, ///< end of escapable sequence
+ OP_CIMM, ///< loads signed immediate onto stack (special to case statements)
+ OP_CDFILM ///< loads film offset onto stack but not in current scene
};
// modifiers for the above opcodes
-#define OPSIZE8 0x40 //!< when this bit is set - the operand size is 8 bits
-#define OPSIZE16 0x80 //!< when this bit is set - the operand size is 16 bits
+#define OPSIZE8 0x40 ///< when this bit is set - the operand size is 8 bits
+#define OPSIZE16 0x80 ///< when this bit is set - the operand size is 16 bits
-#define OPMASK 0x3F //!< mask to isolate the opcode
+#define OPMASK 0x3F ///< mask to isolate the opcode
bool bNoPause = false;
diff --git a/engines/tinsel/pcode.h b/engines/tinsel/pcode.h
index 02a091e617..81feb5c241 100644
--- a/engines/tinsel/pcode.h
+++ b/engines/tinsel/pcode.h
@@ -44,7 +44,7 @@ enum RESUME_STATE {
};
enum {
- PCODE_STACK_SIZE = 128 //!< interpeters stack size
+ PCODE_STACK_SIZE = 128 ///< interpeters stack size
};
enum GSORT {
@@ -68,25 +68,25 @@ struct WorkaroundEntry {
struct INT_CONTEXT {
// Elements for interpret context management
- PROCESS *pProc; //!< processes owning this context
- GSORT GSort; //!< sort of this context
+ PROCESS *pProc; ///< processes owning this context
+ GSORT GSort; ///< sort of this context
// Previously parameters to Interpret()
- SCNHANDLE hCode; //!< scene handle of the code to execute
- byte *code; //!< pointer to the code to execute
- TINSEL_EVENT event; //!< causal event
- HPOLYGON hPoly; //!< associated polygon (if any)
- int idActor; //!< associated actor (if any)
- INV_OBJECT *pinvo; //!< associated inventory object
+ SCNHANDLE hCode; ///< scene handle of the code to execute
+ byte *code; ///< pointer to the code to execute
+ TINSEL_EVENT event; ///< causal event
+ HPOLYGON hPoly; ///< associated polygon (if any)
+ int idActor; ///< associated actor (if any)
+ INV_OBJECT *pinvo; ///< associated inventory object
// Previously local variables in Interpret()
- int32 stack[PCODE_STACK_SIZE]; //!< interpeters run time stack
- int sp; //!< stack pointer
- int bp; //!< base pointer
- int ip; //!< instruction pointer
- bool bHalt; //!< set to exit interpeter
+ int32 stack[PCODE_STACK_SIZE]; ///< interpeters run time stack
+ int sp; ///< stack pointer
+ int bp; ///< base pointer
+ int ip; ///< instruction pointer
+ bool bHalt; ///< set to exit interpeter
bool escOn;
- int myEscape; //!< only initialised to prevent compiler warning!
+ int myEscape; ///< only initialised to prevent compiler warning!
uint32 waitNumber1; // The waiting numbert
uint32 waitNumber2; // The wait for number
diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp
index 53358aa9a2..5d9cac1a76 100644
--- a/engines/tinsel/polygons.cpp
+++ b/engines/tinsel/polygons.cpp
@@ -123,10 +123,10 @@ struct LINEINFO {
int32 b;
int32 c;
- int32 a2; //!< a squared
- int32 b2; //!< b squared
- int32 a2pb2; //!< a squared + b squared
- int32 ra2pb2; //!< root(a squared + b squared)
+ int32 a2; ///< a squared
+ int32 b2; ///< b squared
+ int32 a2pb2; ///< a squared + b squared
+ int32 ra2pb2; ///< root(a squared + b squared)
int32 ab;
int32 ac;
@@ -165,7 +165,7 @@ public:
LINEINFO *getLineinfo(int i) const { return ((LINEINFO *)(_pStart + (int)FROM_LE_32(plinelist))) + i; }
protected:
- POLY_TYPE type; //!< type of polygon
+ POLY_TYPE type; ///< type of polygon
public:
int32 x[4], y[4]; // Polygon definition
uint32 xoff, yoff; // DW2 - polygon offset
@@ -174,9 +174,9 @@ public:
SCNHANDLE hTagtext; // } i.e. EXIT, TAG, EFFECT
int32 nodex, nodey; // EXIT, TAG, REFER
- SCNHANDLE hFilm; //!< film reel handle for EXIT, TAG
+ SCNHANDLE hFilm; ///< film reel handle for EXIT, TAG
- int32 reftype; //!< Type of REFER
+ int32 reftype; ///< Type of REFER
int32 id; // } EXIT and TAG
@@ -187,15 +187,15 @@ public:
int32 zFactor; // }
protected:
- int32 nodecount; //!<The number of nodes in this polygon
- int32 pnodelistx, pnodelisty; //!<offset in chunk to this array if present
+ int32 nodecount; ///<The number of nodes in this polygon
+ int32 pnodelistx, pnodelisty; ///<offset in chunk to this array if present
int32 plinelist;
int32 *nlistx;
int32 *nlisty;
public:
- SCNHANDLE hScript; //!< handle of code segment for polygon events
+ SCNHANDLE hScript; ///< handle of code segment for polygon events
};
Poly::Poly(const byte *pSrc) : _pStart(pSrc) {
@@ -610,10 +610,10 @@ void FindBestPoint(HPOLYGON hp, int *x, int *y, int *pline) {
// One bad thing: We use sqrt to compute a square root. Might not be a good idea,
// speed wise. Maybe we should take Vicent's fp_sqroot. But that's a problem for later.
- int32 a2 = (int)FROM_LE_32(line->a2); //!< a squared
- int32 b2 = (int)FROM_LE_32(line->b2); //!< b squared
- int32 a2pb2 = (int)FROM_LE_32(line->a2pb2); //!< a squared + b squared
- int32 ra2pb2 = (int)FROM_LE_32(line->ra2pb2); //!< root(a squared + b squared)
+ int32 a2 = (int)FROM_LE_32(line->a2); ///< a squared
+ int32 b2 = (int)FROM_LE_32(line->b2); ///< b squared
+ int32 a2pb2 = (int)FROM_LE_32(line->a2pb2); ///< a squared + b squared
+ int32 ra2pb2 = (int)FROM_LE_32(line->ra2pb2); ///< root(a squared + b squared)
int32 ab = (int)FROM_LE_32(line->ab);
int32 ac = (int)FROM_LE_32(line->ac);
diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp
index 3f28018c71..2e35ec10c5 100644
--- a/engines/tinsel/scene.cpp
+++ b/engines/tinsel/scene.cpp
@@ -94,8 +94,8 @@ struct SCENE_STRUC {
/** entrance structure - one per entrance */
struct ENTRANCE_STRUC {
- int32 eNumber; //!< entrance number
- SCNHANDLE hScript; //!< handle to entrance script
+ int32 eNumber; ///< entrance number
+ SCNHANDLE hScript; ///< handle to entrance script
// Tinsel 2 fields
SCNHANDLE hEntDesc; // handle to entrance description
uint32 flags;
diff --git a/engines/tinsel/scene.h b/engines/tinsel/scene.h
index 8420c3f1cc..4b0029fb5f 100644
--- a/engines/tinsel/scene.h
+++ b/engines/tinsel/scene.h
@@ -33,11 +33,11 @@
namespace Tinsel {
enum {
- MAX_NODES = 32, //!< maximum nodes in a Node Path
- MAX_NOSCROLL = 16, //!< maximum number of NoScroll commands in a scene
- MAX_ENTRANCE = 25, //!< maximum number of entrances in a scene
- MAX_POLY = 256, //!< maximum number of polygons in a scene
- MAX_ACTOR = 32 //!< maximum number of actors in a scene
+ MAX_NODES = 32, ///< maximum nodes in a Node Path
+ MAX_NOSCROLL = 16, ///< maximum number of NoScroll commands in a scene
+ MAX_ENTRANCE = 25, ///< maximum number of entrances in a scene
+ MAX_POLY = 256, ///< maximum number of polygons in a scene
+ MAX_ACTOR = 32 ///< maximum number of actors in a scene
};
// ENTRANCE_STRUC bitflags
diff --git a/engines/tinsel/sched.h b/engines/tinsel/sched.h
index 07ca44bf54..8c71127cc9 100644
--- a/engines/tinsel/sched.h
+++ b/engines/tinsel/sched.h
@@ -45,15 +45,15 @@ typedef void (*CORO_ADDR)(CoroContext &, const void *);
/** process structure */
struct PROCESS {
- PROCESS *pNext; //!< pointer to next process in active or free list
- PROCESS *pPrevious; //!< pointer to previous process in active or free list
+ PROCESS *pNext; ///< pointer to next process in active or free list
+ PROCESS *pPrevious; ///< pointer to previous process in active or free list
- CoroContext state; //!< the state of the coroutine
- CORO_ADDR coroAddr; //!< the entry point of the coroutine
+ CoroContext state; ///< the state of the coroutine
+ CORO_ADDR coroAddr; ///< the entry point of the coroutine
- int sleepTime; //!< number of scheduler cycles to sleep
- int pid; //!< process ID
- char param[PARAM_SIZE]; //!< process specific info
+ int sleepTime; ///< number of scheduler cycles to sleep
+ int pid; ///< process ID
+ char param[PARAM_SIZE]; ///< process specific info
};
typedef PROCESS *PPROCESS;
diff --git a/engines/tinsel/text.h b/engines/tinsel/text.h
index 3a61eb3cfc..664f0d207c 100644
--- a/engines/tinsel/text.h
+++ b/engines/tinsel/text.h
@@ -34,10 +34,10 @@ namespace Tinsel {
/** text mode flags - defaults to left justify */
enum {
- TXT_CENTRE = 0x0001, //!< centre justify text
- TXT_RIGHT = 0x0002, //!< right justify text
- TXT_SHADOW = 0x0004, //!< shadow each character
- TXT_ABSOLUTE = 0x0008 //!< position of text is absolute (only for object text)
+ TXT_CENTRE = 0x0001, ///< centre justify text
+ TXT_RIGHT = 0x0002, ///< right justify text
+ TXT_SHADOW = 0x0004, ///< shadow each character
+ TXT_ABSOLUTE = 0x0008 ///< position of text is absolute (only for object text)
};
/** maximum number of characters in a font */
@@ -56,13 +56,13 @@ enum {
* It is currently set at 300 because it suited me for debugging.
*/
struct FONT {
- int xSpacing; //!< x spacing between characters
- int ySpacing; //!< y spacing between characters
- int xShadow; //!< x shadow offset
- int yShadow; //!< y shadow offset
- int spaceSize; //!< x spacing to use for a space character
- OBJ_INIT fontInit; //!< structure used to init text objects
- SCNHANDLE fontDef[300]; //!< image handle array for all characters in the font
+ int xSpacing; ///< x spacing between characters
+ int ySpacing; ///< y spacing between characters
+ int xShadow; ///< x shadow offset
+ int yShadow; ///< y shadow offset
+ int spaceSize; ///< x spacing to use for a space character
+ OBJ_INIT fontInit; ///< structure used to init text objects
+ SCNHANDLE fontDef[300]; ///< image handle array for all characters in the font
} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
@@ -70,14 +70,14 @@ struct FONT {
/** structure for passing the correct parameters to ObjectTextOut */
struct TEXTOUT {
- OBJECT *pList; //!< object list to add text to
- char *szStr; //!< string to output
- int colour; //!< colour for monochrome text
- int xPos; //!< x position of string
- int yPos; //!< y position of string
- SCNHANDLE hFont; //!< which font to use
- int mode; //!< mode flags for the string
- int sleepTime; //!< sleep time between each character (if non-zero)
+ OBJECT *pList; ///< object list to add text to
+ char *szStr; ///< string to output
+ int colour; ///< colour for monochrome text
+ int xPos; ///< x position of string
+ int yPos; ///< y position of string
+ SCNHANDLE hFont; ///< which font to use
+ int mode; ///< mode flags for the string
+ int sleepTime; ///< sleep time between each character (if non-zero)
};