diff options
author | Max Horn | 2008-07-25 09:19:06 +0000 |
---|---|---|
committer | Max Horn | 2008-07-25 09:19:06 +0000 |
commit | 04985c8ac94027fd05351866f243bbb6d590c4f9 (patch) | |
tree | e863f0a5b4f30afe3f1d5f2f40a19a96ba8c1e9e /engines/tinsel | |
parent | 054fe75422167ecc30757f944cb16c2fc6a56416 (diff) | |
download | scummvm-rg350-04985c8ac94027fd05351866f243bbb6d590c4f9.tar.gz scummvm-rg350-04985c8ac94027fd05351866f243bbb6d590c4f9.tar.bz2 scummvm-rg350-04985c8ac94027fd05351866f243bbb6d590c4f9.zip |
TINSEL: Got rid of PIMAGE, PINT_CONTEXT, PINV_OBJECT, PINV_DEF, PCONFBOX, PCONFINIT
svn-id: r33282
Diffstat (limited to 'engines/tinsel')
-rw-r--r-- | engines/tinsel/actors.cpp | 9 | ||||
-rw-r--r-- | engines/tinsel/bg.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/cursor.cpp | 6 | ||||
-rw-r--r-- | engines/tinsel/events.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/font.cpp | 6 | ||||
-rw-r--r-- | engines/tinsel/inventory.cpp | 110 | ||||
-rw-r--r-- | engines/tinsel/inventory.h | 1 | ||||
-rw-r--r-- | engines/tinsel/object.h | 1 | ||||
-rw-r--r-- | engines/tinsel/pcode.cpp | 34 | ||||
-rw-r--r-- | engines/tinsel/pcode.h | 5 | ||||
-rw-r--r-- | engines/tinsel/play.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/rince.cpp | 5 | ||||
-rw-r--r-- | engines/tinsel/scene.cpp | 3 | ||||
-rw-r--r-- | engines/tinsel/tinlib.cpp | 8 |
14 files changed, 98 insertions, 98 deletions
diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp index 5e4a17fb65..c2f01added 100644 --- a/engines/tinsel/actors.cpp +++ b/engines/tinsel/actors.cpp @@ -34,6 +34,7 @@ #include "tinsel/object.h" // for POBJECT #include "tinsel/pcode.h" #include "tinsel/pid.h" +#include "tinsel/polygons.h" #include "tinsel/rince.h" #include "tinsel/sched.h" #include "tinsel/serializer.h" @@ -177,7 +178,7 @@ struct ATP_INIT { static void ActorTinselProcess(CORO_PARAM, const void *param) { // COROUTINE CORO_BEGIN_CONTEXT; - PINT_CONTEXT pic; + INT_CONTEXT *pic; CORO_END_CONTEXT(_ctx); // get the stuff copied to process when it was created @@ -203,14 +204,14 @@ static void ActorTinselProcess(CORO_PARAM, const void *param) { //--------------------------------------------------------------------------- struct RATP_INIT { - PINT_CONTEXT pic; + INT_CONTEXT *pic; int id; // Actor number }; static void ActorRestoredProcess(CORO_PARAM, const void *param) { // COROUTINE CORO_BEGIN_CONTEXT; - PINT_CONTEXT pic; + INT_CONTEXT *pic; CORO_END_CONTEXT(_ctx); // get the stuff copied to process when it was created @@ -227,7 +228,7 @@ static void ActorRestoredProcess(CORO_PARAM, const void *param) { CORO_END_CODE; } -void RestoreActorProcess(int id, PINT_CONTEXT pic) { +void RestoreActorProcess(int id, INT_CONTEXT *pic) { RATP_INIT r = { pic, id }; g_scheduler->createProcess(PID_TCODE, ActorRestoredProcess, &r, sizeof(r)); diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp index 922e21bd18..9c1e5f1540 100644 --- a/engines/tinsel/bg.cpp +++ b/engines/tinsel/bg.cpp @@ -161,7 +161,7 @@ void ChangePalette(SCNHANDLE hPal) { */ void startupBackground(SCNHANDLE bfilm) { const FILM *pfilm; - PIMAGE pim; + IMAGE *pim; BgroundHandle = bfilm; // Save handle in case of Save_Scene() diff --git a/engines/tinsel/cursor.cpp b/engines/tinsel/cursor.cpp index 042c5b88e3..4eb6b98da3 100644 --- a/engines/tinsel/cursor.cpp +++ b/engines/tinsel/cursor.cpp @@ -105,7 +105,7 @@ static void MoveCursor(void); */ static void InitCurTrailObj(int i, int x, int y) { const FREEL *pfr; // pointer to reel - PIMAGE pim; // pointer to image + IMAGE *pim; // pointer to image const MULTI_INIT *pmi; // MULTI_INIT structure const FILM *pfilm; @@ -354,7 +354,7 @@ void DelAuxCursor(void) { * Save animation offsets from the image if required. */ void SetAuxCursor(SCNHANDLE hFilm) { - PIMAGE pim; // Pointer to auxillary cursor's image + IMAGE *pim; // Pointer to auxillary cursor's image const FREEL *pfr; const MULTI_INIT *pmi; const FILM *pfilm; @@ -461,7 +461,7 @@ static void InitCurObj(void) { const FILM *pfilm; const FREEL *pfr; const MULTI_INIT *pmi; - PIMAGE pim; + IMAGE *pim; pim = GetImageFromFilm(CursorHandle, 0, &pfr, &pmi, &pfilm);// Get pointer to image assert(BackPal()); // no background palette diff --git a/engines/tinsel/events.cpp b/engines/tinsel/events.cpp index dea699a75d..bf9f428fd4 100644 --- a/engines/tinsel/events.cpp +++ b/engines/tinsel/events.cpp @@ -138,7 +138,7 @@ struct TP_INIT { static void PolyTinselProcess(CORO_PARAM, const void *param) { // COROUTINE CORO_BEGIN_CONTEXT; - PINT_CONTEXT pic; + INT_CONTEXT *pic; bool took_control; // Set if this function takes control CORO_END_CONTEXT(_ctx); diff --git a/engines/tinsel/font.cpp b/engines/tinsel/font.cpp index 335ba031fe..620298867e 100644 --- a/engines/tinsel/font.cpp +++ b/engines/tinsel/font.cpp @@ -78,18 +78,18 @@ void TalkFontHandle(SCNHANDLE hf) { */ void fettleFontPal(SCNHANDLE fontPal) { const FONT *pFont; - PIMAGE pImg; + IMAGE *pImg; assert(fontPal); assert(hTagFont); // Tag font not declared assert(hTalkFont); // Talk font not declared pFont = (const FONT *)LockMem(hTagFont); - pImg = (PIMAGE)LockMem(FROM_LE_32(pFont->fontInit.hObjImg)); // get image for char 0 + pImg = (IMAGE *)LockMem(FROM_LE_32(pFont->fontInit.hObjImg)); // get image for char 0 pImg->hImgPal = TO_LE_32(fontPal); pFont = (const FONT *)LockMem(hTalkFont); - pImg = (PIMAGE)LockMem(FROM_LE_32(pFont->fontInit.hObjImg)); // get image for char 0 + pImg = (IMAGE *)LockMem(FROM_LE_32(pFont->fontInit.hObjImg)); // get image for char 0 pImg->hImgPal = TO_LE_32(fontPal); } diff --git a/engines/tinsel/inventory.cpp b/engines/tinsel/inventory.cpp index aef171c2a2..2a0f3695c0 100644 --- a/engines/tinsel/inventory.cpp +++ b/engines/tinsel/inventory.cpp @@ -224,7 +224,7 @@ static SCNHANDLE winPartsf = 0; // Window members and cursors' graphic data static SCNHANDLE flagFilm = 0; // Window members and cursors' graphic data static SCNHANDLE configStrings[20]; -static PINV_OBJECT pio = 0; // Inventory objects' data +static INV_OBJECT *pio = 0; // Inventory objects' data static int numObjects = 0; // Number of inventory objects @@ -267,7 +267,6 @@ struct INV_DEF { bool bMax; // Maximised last time open? }; -typedef INV_DEF *PINV_DEF; static INV_DEF InvD[NUM_INV]; // Conversation + 2 inventories + ... @@ -362,24 +361,27 @@ static int lX = 0; // used by SlideMSlider() - last x-coordinate // AATBUT Action always, text box // AAGBUT Action always, graphic button // SLIDER Not a button at all -typedef enum {RGROUP, ARSBUT, AABUT, AATBUT, ARSGBUT, AAGBUT, SLIDER, - TOGGLE, DCTEST, FLIP, FRGROUP, NOTHING} BTYPE; +enum BTYPE { + RGROUP, ARSBUT, AABUT, AATBUT, ARSGBUT, AAGBUT, SLIDER, + TOGGLE, DCTEST, FLIP, FRGROUP, NOTHING +}; -typedef enum {NOFUNC, SAVEGAME, LOADGAME, IQUITGAME, CLOSEWIN, - OPENLOAD, OPENSAVE, OPENREST, - OPENSOUND, OPENCONT, +enum BFUNC { + NOFUNC, SAVEGAME, LOADGAME, IQUITGAME, CLOSEWIN, + OPENLOAD, OPENSAVE, OPENREST, + OPENSOUND, OPENCONT, #ifndef JAPAN - OPENSUBT, + OPENSUBT, #endif - OPENQUIT, - INITGAME, MIDIVOL, - CLANG, RLANG + OPENQUIT, + INITGAME, MIDIVOL, + CLANG, RLANG #ifdef MAC_OPTIONS - , MASTERVOL, SAMPVOL + , MASTERVOL, SAMPVOL #endif - } BFUNC; +}; -typedef struct { +struct CONFBOX { BTYPE boxType; BFUNC boxFunc; char *boxText; @@ -390,7 +392,7 @@ typedef struct { int h; // Doubles as iteration size for SLIDERs int *ival; int bi; // Base index for AAGBUTs -} CONFBOX, *PCONFBOX; +}; #define NO_HEADING (-1) @@ -624,40 +626,40 @@ CONFBOX topwinBox[] = { -typedef struct { +struct CONFINIT { int h; int v; int x; int y; bool bExtraWin; - PCONFBOX Box; + CONFBOX *Box; int NumBoxes; int ixHeading; -} CONFINIT, *PCONFINIT; +}; -CONFINIT ciOption = { 6, 5, 72, 23, false, optionBox, sizeof(optionBox)/sizeof(CONFBOX), NO_HEADING }; +CONFINIT ciOption = { 6, 5, 72, 23, false, optionBox, ARRAYSIZE(optionBox), NO_HEADING }; -CONFINIT ciLoad = { 10, 6, 20, 16, true, loadBox, sizeof(loadBox)/sizeof(CONFBOX), SIX_LOAD_HEADING }; -CONFINIT ciSave = { 10, 6, 20, 16, true, saveBox, sizeof(saveBox)/sizeof(CONFBOX), SIX_SAVE_HEADING }; +CONFINIT ciLoad = { 10, 6, 20, 16, true, loadBox, ARRAYSIZE(loadBox), SIX_LOAD_HEADING }; +CONFINIT ciSave = { 10, 6, 20, 16, true, saveBox, ARRAYSIZE(saveBox), SIX_SAVE_HEADING }; #ifdef JAPAN -CONFINIT ciRestart = { 6, 2, 72, 53, false, restartBox, sizeof(restartBox)/sizeof(CONFBOX), SIX_RESTART_HEADING }; +CONFINIT ciRestart = { 6, 2, 72, 53, false, restartBox, ARRAYSIZE(restartBox), SIX_RESTART_HEADING }; #else -CONFINIT ciRestart = { 4, 2, 98, 53, false, restartBox, sizeof(restartBox)/sizeof(CONFBOX), SIX_RESTART_HEADING }; +CONFINIT ciRestart = { 4, 2, 98, 53, false, restartBox, ARRAYSIZE(restartBox), SIX_RESTART_HEADING }; #endif -CONFINIT ciSound = { 10, 5, 20, 16, false, soundBox, sizeof(soundBox)/sizeof(CONFBOX), NO_HEADING }; +CONFINIT ciSound = { 10, 5, 20, 16, false, soundBox, ARRAYSIZE(soundBox), NO_HEADING }; #ifdef MAC_OPTIONS - CONFINIT ciControl = { 10, 3, 20, 40, false, controlBox, sizeof(controlBox)/sizeof(CONFBOX), NO_HEADING }; + CONFINIT ciControl = { 10, 3, 20, 40, false, controlBox, ARRAYSIZE(controlBox), NO_HEADING }; #else - CONFINIT ciControl = { 10, 5, 20, 16, false, controlBox, sizeof(controlBox)/sizeof(CONFBOX), NO_HEADING }; + CONFINIT ciControl = { 10, 5, 20, 16, false, controlBox, ARRAYSIZE(controlBox), NO_HEADING }; #endif #ifndef JAPAN #if defined(USE_3FLAGS) || defined(USE_4FLAGS) || defined(USE_5FLAGS) -CONFINIT ciSubtitles = { 10, 6, 20, 16, false, subtitlesBox, sizeof(subtitlesBox)/sizeof(CONFBOX), NO_HEADING }; +CONFINIT ciSubtitles = { 10, 6, 20, 16, false, subtitlesBox, ARRAYSIZE(subtitlesBox), NO_HEADING }; #else -CONFINIT ciSubtitles = { 10, 3, 20, 16, false, subtitlesBox, sizeof(subtitlesBox)/sizeof(CONFBOX), NO_HEADING }; +CONFINIT ciSubtitles = { 10, 3, 20, 16, false, subtitlesBox, ARRAYSIZE(subtitlesBox), NO_HEADING }; #endif #endif -CONFINIT ciQuit = { 4, 2, 98, 53, false, quitBox, sizeof(quitBox)/sizeof(CONFBOX), SIX_QUIT_HEADING }; +CONFINIT ciQuit = { 4, 2, 98, 53, false, quitBox, ARRAYSIZE(quitBox), SIX_QUIT_HEADING }; CONFINIT ciTopWin = { 6, 5, 72, 23, false, topwinBox, 0, NO_HEADING }; @@ -665,7 +667,7 @@ CONFINIT ciTopWin = { 6, 5, 72, 23, false, topwinBox, 0, NO_HEADING }; // Conf window globals static struct { - PCONFBOX Box; + CONFBOX *Box; int NumBoxes; bool bExtraWin; int ixHeading; @@ -693,7 +695,7 @@ char sedit[SG_DESC_LEN+2]; // Data for button press/toggle effects static struct { bool bButAnim; - PCONFBOX box; + CONFBOX *box; bool press; // true = button press; false = button toggle } g_buttonEffect = { false, 0, false }; @@ -838,8 +840,8 @@ static void DumpObjArray(void) { * Convert item ID number to pointer to item's compiled data * i.e. Image data and Glitter code. */ -PINV_OBJECT findInvObject(int num) { - PINV_OBJECT retval = pio; +INV_OBJECT *findInvObject(int num) { + INV_OBJECT *retval = pio; for (int i = 0; i < numObjects; i++, retval++) { if (retval->id == num) @@ -895,7 +897,7 @@ int WhichItemHeld(void) { */ void InventoryIconCursor(void) { - PINV_OBJECT invObj; + INV_OBJECT *invObj; if (HeldItem != INV_NOICON) { invObj = findInvObject(HeldItem); @@ -924,7 +926,7 @@ int WhichInventoryOpen(void) { /**************************************************************************/ struct ITP_INIT { - PINV_OBJECT pinvo; + INV_OBJECT *pinvo; USER_EVENT event; BUTEVENT bev; }; @@ -935,7 +937,7 @@ struct ITP_INIT { static void InvTinselProcess(CORO_PARAM, const void *param) { // COROUTINE CORO_BEGIN_CONTEXT; - PINT_CONTEXT pic; + INT_CONTEXT *pic; int ThisPointedWait; // Fix the 'repeated pressing bug' CORO_END_CONTEXT(_ctx); @@ -973,7 +975,7 @@ static void InvTinselProcess(CORO_PARAM, const void *param) { /** * Run inventory item's Glitter code */ -void RunInvTinselCode(PINV_OBJECT pinvo, USER_EVENT event, BUTEVENT be, int index) { +void RunInvTinselCode(INV_OBJECT *pinvo, USER_EVENT event, BUTEVENT be, int index) { ITP_INIT to = { pinvo, event, be }; if (InventoryHidden) @@ -1238,7 +1240,7 @@ void Select(int i, bool force) { */ void HoldItem(int item) { - PINV_OBJECT invObj; + INV_OBJECT *invObj; if (HeldItem != item) { if (item == INV_NOICON && HeldItem != INV_NOICON) @@ -1279,7 +1281,7 @@ void AddToInventory(int invno, int icon, bool hold) { int i; bool bOpen; #ifdef DEBUG - PINV_OBJECT invObj; + INV_OBJECT *invObj; #endif assert((invno == INV_1 || invno == INV_2 || invno == INV_CONV || invno == INV_OPEN)); // Trying to add to illegal inventory @@ -1674,7 +1676,7 @@ void InvBoxes(bool InBody, int curX, int curY) { } } -static void ButtonPress(CORO_PARAM, PCONFBOX box) { +static void ButtonPress(CORO_PARAM, CONFBOX *box) { CORO_BEGIN_CONTEXT; CORO_END_CONTEXT(_ctx); @@ -1722,7 +1724,7 @@ static void ButtonPress(CORO_PARAM, PCONFBOX box) { CORO_END_CODE; } -static void ButtonToggle(CORO_PARAM, PCONFBOX box) { +static void ButtonToggle(CORO_PARAM, CONFBOX *box) { CORO_BEGIN_CONTEXT; CORO_END_CONTEXT(_ctx); @@ -1801,7 +1803,7 @@ static void ButtonToggle(CORO_PARAM, PCONFBOX box) { void InvLabels(bool InBody, int aniX, int aniY) { int index; // Icon pointed to on this call - PINV_OBJECT invObj; + INV_OBJECT *invObj; // Find out which icon is currently pointed to if (!InBody) @@ -1904,10 +1906,10 @@ void AdjustTop(void) { */ OBJECT *AddInvObject(int num, const FREEL **pfreel, const FILM **pfilm) { - PINV_OBJECT invObj; // Icon data + INV_OBJECT *invObj; // Icon data const MULTI_INIT *pmi; // Its INIT structure - from the reel - PIMAGE pim; // ... you get the picture - OBJECT * pPlayObj; // The object we insert + IMAGE *pim; // ... you get the picture + OBJECT *pPlayObj; // The object we insert invObj = findInvObject(num); @@ -2011,8 +2013,8 @@ void AddBackground(OBJECT **rect, OBJECT **title, int extraH, int extraV, int te static OBJECT *AddObject(const FREEL *pfreel, int num) { const MULTI_INIT *pmi; // Get the MULTI_INIT structure - PIMAGE pim; - OBJECT * pPlayObj; + IMAGE *pim; + OBJECT *pPlayObj; // Get pointer to image pim = GetImageFromReel(pfreel, &pmi); @@ -2564,7 +2566,7 @@ bool RePosition(void) { */ void AlterCursor(int num) { const FREEL *pfreel; - PIMAGE pim; + IMAGE *pim; // Get pointer to image pim = GetImageFromFilm(winPartsf, num, &pfreel); @@ -2833,7 +2835,7 @@ void PopUpInventory(int invno) { } } -void SetConfGlobals(PCONFINIT ci) { +void SetConfGlobals(CONFINIT *ci) { InvD[INV_CONF].MinHicons = InvD[INV_CONF].MaxHicons = InvD[INV_CONF].NoofHicons = ci->h; InvD[INV_CONF].MaxVicons = InvD[INV_CONF].MinVicons = InvD[INV_CONF].NoofVicons = ci->v; InvD[INV_CONF].inventoryX = ci->x; @@ -3921,7 +3923,7 @@ void InvPdProcess(CORO_PARAM, const void *param) { } void InvPickup(int index) { - PINV_OBJECT invObj; + INV_OBJECT *invObj; if (index != INV_NOICON) { if (HeldItem == INV_NOICON && InvD[ino].ItemOrder[index] && InvD[ino].ItemOrder[index] != HeldItem) { @@ -4028,7 +4030,7 @@ void InvSLClick(void) { void InvAction(void) { int index; - PINV_OBJECT invObj; + INV_OBJECT *invObj; int aniX, aniY; int i; @@ -4109,7 +4111,7 @@ void InvAction(void) { void InvLook(void) { int index; - PINV_OBJECT invObj; + INV_OBJECT *invObj; int aniX, aniY; GetCursorXY(&aniX, &aniY, false); @@ -4283,7 +4285,7 @@ void KeyToInventory(KEYEVENT ke) { */ void invObjectFilm(int object, SCNHANDLE hFilm) { - PINV_OBJECT invObj; + INV_OBJECT *invObj; invObj = findInvObject(object); invObj->hFilm = hFilm; @@ -4334,7 +4336,7 @@ void syncInvInfo(Serializer &s) { // Note: the SCHANDLE type here has been changed to a void* void RegisterIcons(void *cptr, int num) { numObjects = num; - pio = (PINV_OBJECT) cptr; + pio = (INV_OBJECT *) cptr; } /** diff --git a/engines/tinsel/inventory.h b/engines/tinsel/inventory.h index 6b0c10e3de..d83439c68f 100644 --- a/engines/tinsel/inventory.h +++ b/engines/tinsel/inventory.h @@ -52,7 +52,6 @@ struct INV_OBJECT { SCNHANDLE hScript; // inventory objects event handling script int32 attribute; // inventory object's attribute }; -typedef INV_OBJECT *PINV_OBJECT; void PopUpInventory(int invno); diff --git a/engines/tinsel/object.h b/engines/tinsel/object.h index 01c56737e4..8b61571a3e 100644 --- a/engines/tinsel/object.h +++ b/engines/tinsel/object.h @@ -65,7 +65,6 @@ struct IMAGE { SCNHANDLE hImgBits; //!< image bitmap handle SCNHANDLE hImgPal; //!< image palette handle }; -typedef IMAGE *PIMAGE; /** a multi-object animation frame is a list of multi-image handles */ diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp index 9408149ebd..023417fe3c 100644 --- a/engines/tinsel/pcode.cpp +++ b/engines/tinsel/pcode.cpp @@ -39,7 +39,7 @@ namespace Tinsel { //----------------- EXTERN FUNCTIONS -------------------- -extern int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const PINT_CONTEXT pic, RESUME_STATE *pResumeState); +extern int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pic, RESUME_STATE *pResumeState); //----------------- LOCAL DEFINES -------------------- @@ -105,12 +105,12 @@ static int32 *pGlobals = 0; // global vars static int numGlobals = 0; // How many global variables to save/restore -static PINT_CONTEXT icList = 0; +static INT_CONTEXT *icList = 0; /** * Keeps the code array pointer up to date. */ -void LockCode(PINT_CONTEXT ic) { +void LockCode(INT_CONTEXT *ic) { if (ic->GSort == GS_MASTER) ic->code = (byte *)FindChunk(MASTER_SCNHANDLE, CHUNK_PCODE); else @@ -120,8 +120,8 @@ void LockCode(PINT_CONTEXT ic) { /** * Find a free interpret context and allocate it to the calling process. */ -static PINT_CONTEXT AllocateInterpretContext(GSORT gsort) { - PINT_CONTEXT pic; +static INT_CONTEXT *AllocateInterpretContext(GSORT gsort) { + INT_CONTEXT *pic; int i; for (i = 0, pic = icList; i < MAX_INTERPRET; i++, pic++) { @@ -145,7 +145,7 @@ static PINT_CONTEXT AllocateInterpretContext(GSORT gsort) { * Normal release of an interpret context. * Called from the end of Interpret(). */ -static void FreeInterpretContextPi(PINT_CONTEXT pic) { +static void FreeInterpretContextPi(INT_CONTEXT *pic) { pic->GSort = GS_NONE; } @@ -155,7 +155,7 @@ static void FreeInterpretContextPi(PINT_CONTEXT pic) { * call doesn't complete. */ void FreeInterpretContextPr(PROCESS *pProc) { - PINT_CONTEXT pic; + INT_CONTEXT *pic; int i; for (i = 0, pic = icList; i < MAX_INTERPRET; i++, pic++) { @@ -170,7 +170,7 @@ void FreeInterpretContextPr(PROCESS *pProc) { * Free all interpret contexts except for the master script's */ void FreeMostInterpretContexts(void) { - PINT_CONTEXT pic; + INT_CONTEXT *pic; int i; for (i = 0, pic = icList; i < MAX_INTERPRET; i++, pic++) { @@ -184,7 +184,7 @@ void FreeMostInterpretContexts(void) { * Free the master script's interpret context. */ void FreeMasterInterpretContext(void) { - PINT_CONTEXT pic; + INT_CONTEXT *pic; int i; for (i = 0, pic = icList; i < MAX_INTERPRET; i++, pic++) { @@ -205,9 +205,9 @@ void FreeMasterInterpretContext(void) { * @param actorId Associated actor (if any) * @param pinvo Associated inventory object */ -PINT_CONTEXT InitInterpretContext(GSORT gsort, SCNHANDLE hCode, USER_EVENT event, - HPOLYGON hpoly, int actorid, PINV_OBJECT pinvo) { - PINT_CONTEXT ic; +INT_CONTEXT *InitInterpretContext(GSORT gsort, SCNHANDLE hCode, USER_EVENT event, + HPOLYGON hpoly, int actorid, INV_OBJECT *pinvo) { + INT_CONTEXT *ic; ic = AllocateInterpretContext(gsort); @@ -235,8 +235,8 @@ PINT_CONTEXT InitInterpretContext(GSORT gsort, SCNHANDLE hCode, USER_EVENT event /** * Allocate and initialise an interpret context with restored data. */ -PINT_CONTEXT RestoreInterpretContext(PINT_CONTEXT ric) { - PINT_CONTEXT ic; +INT_CONTEXT *RestoreInterpretContext(INT_CONTEXT *ric) { + INT_CONTEXT *ic; ic = AllocateInterpretContext(GS_NONE); // Sort will soon be overridden @@ -263,7 +263,7 @@ void RegisterGlobals(int num) { } // Allocate RAM for interpret contexts and make sure it's allocated - icList = (PINT_CONTEXT)calloc(MAX_INTERPRET, sizeof(INT_CONTEXT)); + icList = (INT_CONTEXT *)calloc(MAX_INTERPRET, sizeof(INT_CONTEXT)); if (icList == NULL) { error("Cannot allocate memory for interpret contexts"); } @@ -326,7 +326,7 @@ void INT_CONTEXT::syncWithSerializer(Serializer &s) { /** * Return pointer to and size of global data for save/restore game. */ -void SaveInterpretContexts(PINT_CONTEXT sICInfo) { +void SaveInterpretContexts(INT_CONTEXT *sICInfo) { memcpy(sICInfo, icList, MAX_INTERPRET * sizeof(INT_CONTEXT)); } @@ -355,7 +355,7 @@ static int32 Fetch(byte opcode, byte *code, int &ip) { /** * Interprets the PCODE instructions in the code array. */ -void Interpret(CORO_PARAM, PINT_CONTEXT ic) { +void Interpret(CORO_PARAM, INT_CONTEXT *ic) { do { int tmp, tmp2; int ip = ic->ip; diff --git a/engines/tinsel/pcode.h b/engines/tinsel/pcode.h index 1fc87e6e50..1c7e0a942c 100644 --- a/engines/tinsel/pcode.h +++ b/engines/tinsel/pcode.h @@ -28,8 +28,6 @@ #define TINSEL_PCODE_H #include "tinsel/events.h" // for USER_EVENT -//#include "tinsel/inventory.h" // for PINV_OBJECT -#include "tinsel/polygons.h" // for PPOLYGON #include "tinsel/sched.h" // for PROCESS namespace Tinsel { @@ -77,7 +75,6 @@ struct INT_CONTEXT { void syncWithSerializer(Serializer &s); }; -typedef INT_CONTEXT *PINT_CONTEXT; /*----------------------------------------------------------------------*\ @@ -86,7 +83,7 @@ typedef INT_CONTEXT *PINT_CONTEXT; void Interpret(CORO_PARAM, INT_CONTEXT *ic); // Interprets the PCODE instructions in the code array -PINT_CONTEXT InitInterpretContext( +INT_CONTEXT *InitInterpretContext( GSORT gsort, SCNHANDLE hCode, // code to execute USER_EVENT event, // causal event diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp index 7c4f6be7e6..90fa51d6fc 100644 --- a/engines/tinsel/play.cpp +++ b/engines/tinsel/play.cpp @@ -45,14 +45,14 @@ namespace Tinsel { */ static void PokeInPalette(SCNHANDLE hMulFrame) { const FRAME *pFrame; // Pointer to frame - PIMAGE pim; // Pointer to image + IMAGE *pim; // Pointer to image // Could be an empty column if (hMulFrame) { pFrame = (const FRAME *)LockMem(hMulFrame); // get pointer to image - pim = (PIMAGE)LockMem(READ_LE_UINT32(pFrame)); // handle to image + pim = (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); // handle to image pim->hImgPal = TO_LE_32(BackPal()); } diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp index 2f8f055472..a9b24bcac9 100644 --- a/engines/tinsel/rince.cpp +++ b/engines/tinsel/rince.cpp @@ -37,6 +37,7 @@ #include "tinsel/object.h" #include "tinsel/pcode.h" #include "tinsel/pid.h" +#include "tinsel/polygons.h" #include "tinsel/rince.h" #include "tinsel/sched.h" #include "tinsel/timers.h" @@ -550,7 +551,7 @@ static void MActorProcessHelper(int X, int Y, int id, PMACTOR pActor) { const FILM *pfilm; const MULTI_INIT *pmi; const FRAME *pFrame; - PIMAGE pim; + IMAGE *pim; assert(BackPal()); // Can't start actor without a background palette @@ -566,7 +567,7 @@ static void MActorProcessHelper(int X, int Y, int id, PMACTOR pActor) { pFrame = (const FRAME *)LockMem(FROM_LE_32(pmi->hMulFrame)); // get pointer to image - pim = (PIMAGE)LockMem(READ_LE_UINT32(pFrame)); // handle to image + pim = (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); // handle to image pim->hImgPal = TO_LE_32(BackPal()); //--- pActor->actorObj = MultiInitObject(pmi); diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp index ab48e26c4c..70700c16a3 100644 --- a/engines/tinsel/scene.cpp +++ b/engines/tinsel/scene.cpp @@ -43,6 +43,7 @@ #include "tinsel/object.h" #include "tinsel/pcode.h" #include "tinsel/pid.h" // process IDs +#include "tinsel/polygons.h" #include "tinsel/token.h" @@ -105,7 +106,7 @@ static SCNHANDLE SceneHandle = 0; // Current scene handle - stored in case of Sa static void SceneTinselProcess(CORO_PARAM, const void *param) { // COROUTINE CORO_BEGIN_CONTEXT; - PINT_CONTEXT pic; + INT_CONTEXT *pic; CORO_END_CONTEXT(_ctx); // get the stuff copied to process when it was created diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index 84904e5138..e8364e20dd 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -1065,13 +1065,13 @@ void print(CORO_PARAM, int x, int y, SCNHANDLE text, int time, int hold, bool es } -static void printobjPointed(CORO_PARAM, const SCNHANDLE text, const PINV_OBJECT pinvo, OBJECT *&pText, const int textx, const int texty, const int item); +static void printobjPointed(CORO_PARAM, const SCNHANDLE text, const INV_OBJECT *pinvo, OBJECT *&pText, const int textx, const int texty, const int item); static void printobjNonPointed(CORO_PARAM, const SCNHANDLE text, const OBJECT *pText); /** * Print the given inventory object's name or whatever. */ -void printobj(CORO_PARAM, const SCNHANDLE text, const PINV_OBJECT pinvo, const int event) { +void printobj(CORO_PARAM, const SCNHANDLE text, const INV_OBJECT *pinvo, const int event) { CORO_BEGIN_CONTEXT; OBJECT *pText; // text object pointer int textx, texty; @@ -1142,7 +1142,7 @@ void printobj(CORO_PARAM, const SCNHANDLE text, const PINV_OBJECT pinvo, const i CORO_END_CODE; } -static void printobjPointed(CORO_PARAM, const SCNHANDLE text, const PINV_OBJECT pinvo, OBJECT *&pText, const int textx, const int texty, const int item) { +static void printobjPointed(CORO_PARAM, const SCNHANDLE text, const INV_OBJECT *pinvo, OBJECT *&pText, const int textx, const int texty, const int item) { CORO_BEGIN_CONTEXT; CORO_END_CONTEXT(_ctx); @@ -2404,7 +2404,7 @@ int whichinventory(void) { * @param operand Library function * @param pp Top of parameter stack */ -int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const PINT_CONTEXT pic, RESUME_STATE *pResumeState) { +int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pic, RESUME_STATE *pResumeState) { debug(7, "CallLibraryRoutine op %d (escOn %d, myescEvent %d)", operand, pic->escOn, pic->myescEvent); switch (operand) { case ACTORATTR: |