[Scummvm-cvs-logs] SF.net SVN: scummvm:[33282] scummvm/trunk/engines/tinsel

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Jul 25 11:19:06 CEST 2008


Revision: 33282
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33282&view=rev
Author:   fingolfin
Date:     2008-07-25 09:19:06 +0000 (Fri, 25 Jul 2008)

Log Message:
-----------
TINSEL: Got rid of PIMAGE, PINT_CONTEXT, PINV_OBJECT, PINV_DEF, PCONFBOX, PCONFINIT

Modified Paths:
--------------
    scummvm/trunk/engines/tinsel/actors.cpp
    scummvm/trunk/engines/tinsel/bg.cpp
    scummvm/trunk/engines/tinsel/cursor.cpp
    scummvm/trunk/engines/tinsel/events.cpp
    scummvm/trunk/engines/tinsel/font.cpp
    scummvm/trunk/engines/tinsel/inventory.cpp
    scummvm/trunk/engines/tinsel/inventory.h
    scummvm/trunk/engines/tinsel/object.h
    scummvm/trunk/engines/tinsel/pcode.cpp
    scummvm/trunk/engines/tinsel/pcode.h
    scummvm/trunk/engines/tinsel/play.cpp
    scummvm/trunk/engines/tinsel/rince.cpp
    scummvm/trunk/engines/tinsel/scene.cpp
    scummvm/trunk/engines/tinsel/tinlib.cpp

Modified: scummvm/trunk/engines/tinsel/actors.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/actors.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/actors.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -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 @@
 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 @@
 //---------------------------------------------------------------------------
 
 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 @@
 	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));

Modified: scummvm/trunk/engines/tinsel/bg.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/bg.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/bg.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -161,7 +161,7 @@
  */
 void startupBackground(SCNHANDLE bfilm) {
 	const FILM *pfilm;
-	PIMAGE	pim;
+	IMAGE *pim;
 
 	BgroundHandle = bfilm;		// Save handle in case of Save_Scene()
 

Modified: scummvm/trunk/engines/tinsel/cursor.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/cursor.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/cursor.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -105,7 +105,7 @@
  */
 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 @@
  * 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 @@
 	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

Modified: scummvm/trunk/engines/tinsel/events.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/events.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/events.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -138,7 +138,7 @@
 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);
 

Modified: scummvm/trunk/engines/tinsel/font.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/font.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/font.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -78,18 +78,18 @@
  */
 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);
 }
 

Modified: scummvm/trunk/engines/tinsel/inventory.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/inventory.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/inventory.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -224,7 +224,7 @@
 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 @@
 	bool bMax;		// Maximised last time open?
 
 };
-typedef INV_DEF *PINV_DEF;
 
 static INV_DEF InvD[NUM_INV];		// Conversation + 2 inventories + ...
 
@@ -362,24 +361,27 @@
 // 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 @@
 	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 @@
 
 
 
-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 @@
 
 // Conf window globals
 static struct {
-	PCONFBOX Box;
+	CONFBOX *Box;
 	int	NumBoxes;
 	bool bExtraWin;
 	int	ixHeading;
@@ -693,7 +695,7 @@
 // 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 @@
  * 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 @@
  */
 
 void InventoryIconCursor(void) {
-	PINV_OBJECT invObj;
+	INV_OBJECT *invObj;
 
 	if (HeldItem != INV_NOICON) {
 		invObj = findInvObject(HeldItem);
@@ -924,7 +926,7 @@
 /**************************************************************************/
 
 struct ITP_INIT {
-	PINV_OBJECT	pinvo;
+	INV_OBJECT *pinvo;
 	USER_EVENT	event;
 	BUTEVENT	bev;
 };
@@ -935,7 +937,7 @@
 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 @@
 /**
  * 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 HoldItem(int item) {
-	PINV_OBJECT	invObj;
+	INV_OBJECT *invObj;
 
 	if (HeldItem != item) {
 		if (item == INV_NOICON && HeldItem != INV_NOICON)
@@ -1279,7 +1281,7 @@
 	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 @@
 	}
 }
 
-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 @@
 	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 @@
 
 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 @@
  */
 
 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 @@
 
 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 @@
  */
 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 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 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 InvAction(void) {
 	int index;
-	PINV_OBJECT invObj;
+	INV_OBJECT *invObj;
 	int aniX, aniY;
 	int i;
 
@@ -4109,7 +4111,7 @@
 
 void InvLook(void) {
 	int index;
-	PINV_OBJECT invObj;
+	INV_OBJECT *invObj;
 	int aniX, aniY;
 
 	GetCursorXY(&aniX, &aniY, false);
@@ -4283,7 +4285,7 @@
  */
 
 void invObjectFilm(int object, SCNHANDLE hFilm) {
-	PINV_OBJECT	invObj;
+	INV_OBJECT *invObj;
 
 	invObj = findInvObject(object);
 	invObj->hFilm = hFilm;
@@ -4334,7 +4336,7 @@
 // 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;
 }
 
 /**

Modified: scummvm/trunk/engines/tinsel/inventory.h
===================================================================
--- scummvm/trunk/engines/tinsel/inventory.h	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/inventory.h	2008-07-25 09:19:06 UTC (rev 33282)
@@ -52,7 +52,6 @@
 	SCNHANDLE hScript;	// inventory objects event handling script
 	int32 attribute;		// inventory object's attribute
 };
-typedef INV_OBJECT *PINV_OBJECT;
 
 void PopUpInventory(int invno);
 

Modified: scummvm/trunk/engines/tinsel/object.h
===================================================================
--- scummvm/trunk/engines/tinsel/object.h	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/object.h	2008-07-25 09:19:06 UTC (rev 33282)
@@ -65,7 +65,6 @@
 	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 */

Modified: scummvm/trunk/engines/tinsel/pcode.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/pcode.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/pcode.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -39,7 +39,7 @@
 
 //----------------- 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 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 @@
 /**
  * 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 @@
  * 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 @@
  * 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 @@
  * 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 @@
  * 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 @@
  * @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 @@
 /**
  * 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 @@
 		}
 
 		// 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 @@
 /**
  * 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 @@
 /**
  * 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;

Modified: scummvm/trunk/engines/tinsel/pcode.h
===================================================================
--- scummvm/trunk/engines/tinsel/pcode.h	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/pcode.h	2008-07-25 09:19:06 UTC (rev 33282)
@@ -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 @@
 
 	void syncWithSerializer(Serializer &s);
 };
-typedef INT_CONTEXT *PINT_CONTEXT;
 
 
 /*----------------------------------------------------------------------*\
@@ -86,7 +83,7 @@
 
 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

Modified: scummvm/trunk/engines/tinsel/play.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/play.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/play.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -45,14 +45,14 @@
  */
 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());
 	}

Modified: scummvm/trunk/engines/tinsel/rince.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/rince.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/rince.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -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 @@
 	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 @@
 	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);

Modified: scummvm/trunk/engines/tinsel/scene.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/scene.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/scene.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -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 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

Modified: scummvm/trunk/engines/tinsel/tinlib.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/tinlib.cpp	2008-07-25 09:18:39 UTC (rev 33281)
+++ scummvm/trunk/engines/tinsel/tinlib.cpp	2008-07-25 09:19:06 UTC (rev 33282)
@@ -1065,13 +1065,13 @@
 }
 
 
-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 @@
 	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 @@
  * @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:


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list