911 lines
26 KiB
Diff
911 lines
26 KiB
Diff
diff -ur rott-1.0.orig/rott/audiolib/dpmi.h rott-1.0/rott/audiolib/dpmi.h
|
|
--- rott-1.0.orig/rott/audiolib/dpmi.h 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/audiolib/dpmi.h 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -62,8 +62,8 @@
|
|
unsigned long DPMI_GetRealModeVector( int num );
|
|
void DPMI_SetRealModeVector( int num, unsigned long vector );
|
|
int DPMI_CallRealModeFunction( dpmi_regs *callregs );
|
|
-int DPMI_GetDOSMemory( void **ptr, int *descriptor, unsigned length );
|
|
-int DPMI_FreeDOSMemory( int descriptor );
|
|
+int DPMI_GetDOSMemory( void **ptr, long *descriptor, unsigned length );
|
|
+int DPMI_FreeDOSMemory( long descriptor );
|
|
int DPMI_LockMemory( void *address, unsigned length );
|
|
int DPMI_LockMemoryRegion( void *start, void *end );
|
|
int DPMI_UnlockMemory( void *address, unsigned length );
|
|
diff -ur rott-1.0.orig/rott/audiolib/multivoc.c rott-1.0/rott/audiolib/multivoc.c
|
|
--- rott-1.0.orig/rott/audiolib/multivoc.c 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/audiolib/multivoc.c 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -107,7 +107,7 @@
|
|
|
|
static int MV_TotalMemory;
|
|
|
|
-static int MV_BufferDescriptor;
|
|
+static long MV_BufferDescriptor;
|
|
static int MV_BufferEmpty[ NumberOfBuffers ];
|
|
char *MV_MixBuffer[ NumberOfBuffers + 1 ];
|
|
|
|
diff -ur rott-1.0.orig/rott/audiolib/nodpmi.c rott-1.0/rott/audiolib/nodpmi.c
|
|
--- rott-1.0.orig/rott/audiolib/nodpmi.c 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/audiolib/nodpmi.c 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -160,18 +160,18 @@
|
|
return( status );
|
|
}
|
|
|
|
-int DPMI_GetDOSMemory( void **ptr, int *descriptor, unsigned length )
|
|
+int DPMI_GetDOSMemory( void **ptr, long *descriptor, unsigned length )
|
|
{
|
|
/* Lovely... */
|
|
|
|
*ptr = (void *)malloc(length);
|
|
|
|
- *descriptor = (int) *ptr;
|
|
+ *descriptor = (long) *ptr;
|
|
|
|
return (descriptor == 0) ? DPMI_Error : DPMI_Ok;
|
|
}
|
|
|
|
-int DPMI_FreeDOSMemory( int descriptor )
|
|
+int DPMI_FreeDOSMemory( long descriptor )
|
|
{
|
|
free((void *)descriptor);
|
|
|
|
diff -ur rott-1.0.orig/rott/modexlib.c rott-1.0/rott/modexlib.c
|
|
--- rott-1.0.orig/rott/modexlib.c 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/modexlib.c 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -45,12 +45,12 @@
|
|
|
|
int linewidth;
|
|
int ylookup[MAXSCREENHEIGHT];
|
|
-int page1start;
|
|
-int page2start;
|
|
-int page3start;
|
|
+byte *page1start;
|
|
+byte *page2start;
|
|
+byte *page3start;
|
|
int screensize;
|
|
-unsigned bufferofs;
|
|
-unsigned displayofs;
|
|
+byte *bufferofs;
|
|
+byte *displayofs;
|
|
boolean graphicsmode=false;
|
|
|
|
#ifdef DOS
|
|
@@ -248,7 +248,7 @@
|
|
=
|
|
=======================
|
|
*/
|
|
-void VL_CopyBufferToAll ( unsigned buffer )
|
|
+void VL_CopyBufferToAll ( byte *buffer )
|
|
{
|
|
int plane;
|
|
|
|
@@ -506,9 +506,9 @@
|
|
|
|
screensize=MAXSCREENHEIGHT*MAXSCREENWIDTH;
|
|
|
|
- page1start=(int)sdl_surface->pixels;
|
|
- page2start=(int)sdl_surface->pixels;
|
|
- page3start=(int)sdl_surface->pixels;
|
|
+ page1start=sdl_surface->pixels;
|
|
+ page2start=sdl_surface->pixels;
|
|
+ page3start=sdl_surface->pixels;
|
|
displayofs = page1start;
|
|
bufferofs = page2start;
|
|
XFlipPage ();
|
|
@@ -570,7 +570,7 @@
|
|
=
|
|
=======================
|
|
*/
|
|
-void VL_CopyBufferToAll ( unsigned buffer )
|
|
+void VL_CopyBufferToAll ( byte *buffer )
|
|
{
|
|
#ifdef DOS
|
|
int plane;
|
|
@@ -611,7 +611,7 @@
|
|
=================
|
|
*/
|
|
|
|
-void VL_ClearBuffer (unsigned buf, byte color)
|
|
+void VL_ClearBuffer (byte *buf, byte color)
|
|
{
|
|
#ifdef DOS
|
|
VGAMAPMASK(15);
|
|
diff -ur rott-1.0.orig/rott/modexlib.h rott-1.0/rott/modexlib.h
|
|
--- rott-1.0.orig/rott/modexlib.h 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/modexlib.h 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -105,23 +105,23 @@
|
|
|
|
extern int ylookup[MAXSCREENHEIGHT]; // Table of row offsets
|
|
extern int linewidth;
|
|
-extern int page1start;
|
|
-extern int page2start;
|
|
-extern int page3start;
|
|
+extern byte *page1start;
|
|
+extern byte *page2start;
|
|
+extern byte *page3start;
|
|
extern int screensize;
|
|
-extern unsigned bufferofs;
|
|
-extern unsigned displayofs;
|
|
+extern byte *bufferofs;
|
|
+extern byte *displayofs;
|
|
extern boolean graphicsmode;
|
|
|
|
|
|
void GraphicsMode ( void );
|
|
void SetTextMode ( void );
|
|
void VL_SetVGAPlaneMode ( void );
|
|
-void VL_ClearBuffer (unsigned buf, byte color);
|
|
+void VL_ClearBuffer (byte *buf, byte color);
|
|
void VL_ClearVideo (byte color);
|
|
void VL_DePlaneVGA (void);
|
|
void VL_CopyDisplayToHidden ( void );
|
|
-void VL_CopyBufferToAll ( unsigned buffer );
|
|
+void VL_CopyBufferToAll ( byte *buffer );
|
|
void VL_CopyPlanarPage ( byte * src, byte * dest );
|
|
void VL_CopyPlanarPageToMemory ( byte * src, byte * dest );
|
|
void XFlipPage ( void );
|
|
diff -ur rott-1.0.orig/rott/rt_actor.c rott-1.0/rott/rt_actor.c
|
|
--- rott-1.0.orig/rott/rt_actor.c 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/rt_actor.c 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -88,7 +88,7 @@
|
|
|
|
byte deathshapeoffset[8] = {0,7,7,8,8,9,8,7};
|
|
|
|
-unsigned MAXFUNCTION,MINFUNCTION,MAXSTATE,MINSTATE;
|
|
+unsigned long MAXFUNCTION,MINFUNCTION,MAXSTATE,MINSTATE;
|
|
|
|
objtype *PLAYER0MISSILE;
|
|
objtype *SCREENEYE;
|
|
@@ -992,16 +992,16 @@
|
|
void FindAddresses(void)
|
|
{
|
|
int i;
|
|
- unsigned tstate,tfunct;
|
|
+ unsigned long tstate,tfunct;
|
|
|
|
- MINFUNCTION = 0xffffffff;
|
|
+ MINFUNCTION = -1l;
|
|
MAXFUNCTION = 0x00000000;
|
|
- MINSTATE = 0xffffffff;
|
|
+ MINSTATE = -1l;
|
|
MAXSTATE = 0x00000000;
|
|
|
|
for(i=0;i<MAXSTATES;i++)
|
|
{
|
|
- tstate = (unsigned)(statetable[i]);
|
|
+ tstate = (unsigned long)(statetable[i]);
|
|
if (tstate < MINSTATE)
|
|
MINSTATE = tstate;
|
|
|
|
@@ -1009,7 +1009,7 @@
|
|
MAXSTATE = tstate;
|
|
if (statetable[i]!=NULL)
|
|
{
|
|
- tfunct = (unsigned)(statetable[i]->think);
|
|
+ tfunct = (unsigned long)(statetable[i]->think);
|
|
if (tfunct < MINFUNCTION)
|
|
MINFUNCTION = tfunct;
|
|
|
|
@@ -1021,10 +1021,10 @@
|
|
|
|
void CheckBounds(objtype*ob)
|
|
{
|
|
- unsigned tstate,tfunct;
|
|
+ unsigned long tstate,tfunct;
|
|
|
|
- tstate = (unsigned)(ob->state);
|
|
- tfunct = (unsigned)(ob->state->think);
|
|
+ tstate = (unsigned long)(ob->state);
|
|
+ tfunct = (unsigned long)(ob->state->think);
|
|
|
|
if ((tfunct < MINFUNCTION) || (tfunct > MAXFUNCTION) ||
|
|
(tstate < MINSTATE) || (tstate > MAXSTATE))
|
|
@@ -10077,7 +10077,7 @@
|
|
if (ob->hitpoints <= 0)
|
|
{objtype*column = (objtype*)(ob->whatever);
|
|
|
|
- EnableObject((int)column);
|
|
+ EnableObject((long)column);
|
|
ob->whatever = NULL;
|
|
|
|
KillActor(ob);
|
|
@@ -10442,7 +10442,7 @@
|
|
{
|
|
objtype*column = (objtype*)(ob->whatever);
|
|
|
|
- EnableObject((int)column);
|
|
+ EnableObject((long)column);
|
|
ob->whatever = NULL;
|
|
|
|
KillActor(ob);
|
|
@@ -10663,7 +10663,7 @@
|
|
{touchplatetype *tplate;
|
|
|
|
for(tplate=touchplate[tempstat->linked_to];tplate;tplate = tplate->nextaction)
|
|
- if (tplate->whichobj == (int)(tempstat))
|
|
+ if (tplate->whichobj == (long)(tempstat))
|
|
RemoveTouchplateAction(tplate,tempstat->linked_to);
|
|
}
|
|
|
|
@@ -10879,7 +10879,7 @@
|
|
(tempstat->itemnumber == stat_tntcrate)
|
|
)
|
|
{
|
|
- tempstat->linked_to = (int)(LASTSTAT);
|
|
+ tempstat->linked_to = (long)(LASTSTAT);
|
|
tempstat->flags |= FL_RESPAWN;
|
|
}
|
|
|
|
@@ -10900,7 +10900,7 @@
|
|
|
|
|
|
|
|
-void EnableObject(int object)
|
|
+void EnableObject(long object)
|
|
{
|
|
objtype* ob;
|
|
int i,gasicon;
|
|
@@ -10951,7 +10951,7 @@
|
|
}
|
|
}
|
|
|
|
-void DisableObject(int object)
|
|
+void DisableObject(long object)
|
|
{objtype*ob;
|
|
|
|
ob = (objtype*)object;
|
|
diff -ur rott-1.0.orig/rott/rt_actor.h rott-1.0/rott/rt_actor.h
|
|
--- rott-1.0.orig/rott/rt_actor.h 2007-05-06 22:30:12.000000000 +0200
|
|
+++ rott-1.0/rott/rt_actor.h 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -358,8 +358,8 @@
|
|
void A_Drain(objtype*ob);
|
|
void T_Explosion(objtype*ob);
|
|
void T_MoveColumn(objtype*);
|
|
-void EnableObject(int object);
|
|
-void DisableObject(int);
|
|
+void EnableObject(long object);
|
|
+void DisableObject(long object);
|
|
|
|
void T_Collide(objtype*);
|
|
void Collision(objtype*ob,objtype *attacker,int hitmomentumx,int hitmomentumy);
|
|
diff -ur rott-1.0.orig/rott/rt_def.h rott-1.0/rott/rt_def.h
|
|
--- rott-1.0.orig/rott/rt_def.h 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/rt_def.h 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -300,7 +300,7 @@
|
|
typedef unsigned char byte;
|
|
typedef unsigned short int word;
|
|
typedef unsigned long longword;
|
|
-typedef long fixed;
|
|
+typedef int fixed;
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
diff -ur rott-1.0.orig/rott/rt_door.c rott-1.0/rott/rt_door.c
|
|
--- rott-1.0.orig/rott/rt_door.c 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/rt_door.c 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -94,7 +94,7 @@
|
|
|
|
// Local Variables
|
|
|
|
-static void (*touchactions[NUMTOUCHPLATEACTIONS])(int) =
|
|
+static void (*touchactions[NUMTOUCHPLATEACTIONS])(long) =
|
|
{ActivatePushWall,
|
|
ActivateMoveWall,
|
|
LinkedOpenDoor,
|
|
@@ -315,7 +315,7 @@
|
|
}
|
|
|
|
|
|
-int GetIndexForAction(void (*action)(int))
|
|
+int GetIndexForAction(void (*action)(long))
|
|
{int i;
|
|
|
|
for(i=0;i<NUMTOUCHPLATEACTIONS;i++)
|
|
@@ -486,10 +486,10 @@
|
|
temp->complete = dummy.complete;
|
|
|
|
if (dummy.whichobj & FL_TACT)
|
|
- temp->whichobj = (int)(objlist[dummy.whichobj & ~FL_TACT]);
|
|
+ temp->whichobj = (long)(objlist[dummy.whichobj & ~FL_TACT]);
|
|
|
|
else if (dummy.whichobj & FL_TSTAT)
|
|
- temp->whichobj = (int)(GetStatForIndex(dummy.whichobj & ~FL_TSTAT));
|
|
+ temp->whichobj = (long)(GetStatForIndex(dummy.whichobj & ~FL_TSTAT));
|
|
else
|
|
temp->whichobj = dummy.whichobj;
|
|
if (dummy.actionindex != -1)
|
|
@@ -613,7 +613,7 @@
|
|
|
|
|
|
|
|
-void Link_To_Touchplate(word touchlocx, word touchlocy, void (*maction)(int), void (*swapaction)(int), int wobj, int delaytime)
|
|
+void Link_To_Touchplate(word touchlocx, word touchlocy, void (*maction)(long), void (*swapaction)(long), long wobj, int delaytime)
|
|
{touchplatetype *temp;
|
|
int index;
|
|
|
|
@@ -640,7 +640,7 @@
|
|
|
|
|
|
|
|
-void ClockLink (void (*saction)(int), void (*eaction)(int), int wobj,int whichclock)
|
|
+void ClockLink (void (*saction)(long), void (*eaction)(long), long wobj,int whichclock)
|
|
{touchplatetype*temp;
|
|
|
|
|
|
@@ -731,7 +731,7 @@
|
|
touchplatetype *temp;
|
|
int i,touchcomplete,j;
|
|
int playeron;
|
|
- void (*tempact)(int);
|
|
+ void (*tempact)(long);
|
|
boolean wallmessage,doormessage,columnmessage;
|
|
|
|
for(i=0;i<lasttouch;i++)
|
|
@@ -1789,7 +1789,7 @@
|
|
=====================
|
|
*/
|
|
|
|
-void LinkedOpenDoor (int door)
|
|
+void LinkedOpenDoor (long door)
|
|
{
|
|
UtilizeDoor(door,OpenDoor);
|
|
}
|
|
@@ -1802,7 +1802,7 @@
|
|
=====================
|
|
*/
|
|
|
|
-void LinkedCloseDoor (int door)
|
|
+void LinkedCloseDoor (long door)
|
|
{
|
|
if (DoorReadyToClose(door)==true)
|
|
UtilizeDoor(door,CloseDoor);
|
|
@@ -3477,7 +3477,7 @@
|
|
=====================
|
|
*/
|
|
|
|
-void ActivatePushWall (int pwall)
|
|
+void ActivatePushWall (long pwall)
|
|
{
|
|
pwallobj_t * pw;
|
|
|
|
@@ -3508,7 +3508,7 @@
|
|
=====================
|
|
*/
|
|
|
|
-void ActivateMoveWall (int pwall)
|
|
+void ActivateMoveWall (long pwall)
|
|
{
|
|
pwallobj_t * pw;
|
|
|
|
diff -ur rott-1.0.orig/rott/rt_door.h rott-1.0/rott/rt_door.h
|
|
--- rott-1.0.orig/rott/rt_door.h 2002-12-20 21:15:28.000000000 +0100
|
|
+++ rott-1.0/rott/rt_door.h 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -124,11 +124,11 @@
|
|
} pwallobj_t;
|
|
|
|
typedef struct tplate
|
|
-{ void (*action)(int);
|
|
- void (*swapaction)(int);
|
|
+{ void (*action)(long);
|
|
+ void (*swapaction)(long);
|
|
struct tplate * nextaction;
|
|
struct tplate * prevaction;
|
|
- int whichobj;
|
|
+ long whichobj;
|
|
byte tictime;
|
|
byte ticcount;
|
|
byte triggered;
|
|
@@ -213,9 +213,9 @@
|
|
|
|
|
|
int PlatformHeight(int,int);
|
|
-void Link_To_Touchplate(word, word, void (*)(int), void (*)(int),int, int);
|
|
+void Link_To_Touchplate(word, word, void (*)(long), void (*)(long), long, int);
|
|
void TriggerStuff(void);
|
|
-void ClockLink(void (*)(int),void(*)(int),int,int);
|
|
+void ClockLink(void (*)(long),void(*)(long),long,int);
|
|
void RecursiveConnect(int);
|
|
void ConnectAreas(void);
|
|
void InitAreas(void);
|
|
@@ -234,8 +234,8 @@
|
|
void WallPushing (int pwall);
|
|
void PushWall (int pwall, int dir);
|
|
void OperatePushWall (int pwall, int dir, boolean localplayer );
|
|
-void ActivatePushWall (int pwall);
|
|
-void ActivateMoveWall (int pwall);
|
|
+void ActivatePushWall (long pwall);
|
|
+void ActivateMoveWall (long pwall);
|
|
int UpdateMaskedWall (int num);
|
|
|
|
void FixDoorAreaNumbers ( void );
|
|
@@ -262,8 +262,8 @@
|
|
void LoadElevators(byte * buffer,int size);
|
|
|
|
void MakeWideDoorVisible ( int doornum );
|
|
-void LinkedCloseDoor (int door);
|
|
-void LinkedOpenDoor (int door);
|
|
+void LinkedCloseDoor (long door);
|
|
+void LinkedOpenDoor (long door);
|
|
int IsWall (int tilex, int tiley);
|
|
int IsDoor (int tilex, int tiley);
|
|
int IsMaskedWall (int tilex, int tiley);
|
|
diff -ur rott-1.0.orig/rott/rt_draw.c rott-1.0/rott/rt_draw.c
|
|
--- rott-1.0.orig/rott/rt_draw.c 2003-01-01 10:24:25.000000000 +0100
|
|
+++ rott-1.0/rott/rt_draw.c 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -100,7 +100,7 @@
|
|
//
|
|
|
|
short tantable[FINEANGLES];
|
|
-long sintable[FINEANGLES+FINEANGLEQUAD+1],
|
|
+int sintable[FINEANGLES+FINEANGLEQUAD+1],
|
|
*costable = sintable+(FINEANGLES/4);
|
|
|
|
//
|
|
@@ -200,7 +200,7 @@
|
|
{
|
|
byte * table;
|
|
byte * ptr;
|
|
- long length;
|
|
+ int length;
|
|
int i;
|
|
|
|
//
|
|
@@ -244,7 +244,7 @@
|
|
//
|
|
// get sin/cos table
|
|
//
|
|
- memcpy(&sintable[0],ptr,length*sizeof(long));
|
|
+ memcpy(&sintable[0],ptr,length*sizeof(int));
|
|
SwapIntelLongArray(&sintable[0], length);
|
|
ptr+=(length)*sizeof(int);
|
|
|
|
diff -ur rott-1.0.orig/rott/rt_game.c rott-1.0/rott/rt_game.c
|
|
--- rott-1.0.orig/rott/rt_game.c 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/rt_game.c 2007-05-06 22:13:20.000000000 +0200
|
|
@@ -998,7 +998,7 @@
|
|
|
|
void DrawGameString (int x, int y, const char * str, boolean bufferofsonly)
|
|
{
|
|
- unsigned tempbuf;
|
|
+ byte *tempbuf;
|
|
|
|
px=x;
|
|
py=y;
|
|
@@ -1543,8 +1543,8 @@
|
|
|
|
void DrawMPPic (int xpos, int ypos, int width, int height, int heightmod, byte *src, boolean bufferofsonly)
|
|
{
|
|
- byte *olddest;
|
|
- byte *dest;
|
|
+ int olddest;
|
|
+ int dest;
|
|
int x;
|
|
int y;
|
|
int planes;
|
|
@@ -1554,9 +1554,9 @@
|
|
mask = 1 << (xpos&3);
|
|
|
|
#ifdef DOS
|
|
- olddest = (byte *)(ylookup[ypos] + (xpos>>2));
|
|
+ olddest = ylookup[ypos] + (xpos>>2);
|
|
#else
|
|
- olddest = (byte *)(ylookup[ypos] + xpos);
|
|
+ olddest = ylookup[ypos] + xpos;
|
|
#endif
|
|
|
|
for (planes = 0; planes < 4; planes++)
|
|
@@ -1637,8 +1637,8 @@
|
|
|
|
void DrawColoredMPPic (int xpos, int ypos, int width, int height, int heightmod, byte *src, boolean bufferofsonly, int color)
|
|
{
|
|
- byte *olddest;
|
|
- byte *dest;
|
|
+ int olddest;
|
|
+ int dest;
|
|
int x;
|
|
int y;
|
|
int planes;
|
|
@@ -1651,9 +1651,9 @@
|
|
mask = 1 << (xpos&3);
|
|
|
|
#ifdef DOS
|
|
- olddest = (byte *)(ylookup[ypos] + (xpos>>2));
|
|
+ olddest = ylookup[ypos] + (xpos>>2);
|
|
#else
|
|
- olddest = (byte *)(ylookup[ypos] + xpos);
|
|
+ olddest = ylookup[ypos] + xpos;
|
|
#endif
|
|
|
|
for (planes = 0; planes < 4; planes++)
|
|
@@ -1822,8 +1822,8 @@
|
|
|
|
void DrawPPic (int xpos, int ypos, int width, int height, byte *src, int num, boolean up, boolean bufferofsonly)
|
|
{
|
|
- byte *olddest;
|
|
- byte *dest;
|
|
+ int olddest;
|
|
+ int dest;
|
|
int x;
|
|
int y;
|
|
int planes;
|
|
@@ -1847,9 +1847,9 @@
|
|
mask = 1;
|
|
|
|
#ifdef DOS
|
|
- olddest = (byte *)(ylookup[ypos] + (xpos>>2));
|
|
+ olddest = ylookup[ypos] + (xpos>>2);
|
|
#else
|
|
- olddest = (byte *)(ylookup[ypos] + xpos);
|
|
+ olddest = ylookup[ypos] + xpos;
|
|
#endif
|
|
|
|
for (planes = 0; planes < 4; planes++)
|
|
@@ -2254,7 +2254,7 @@
|
|
void DrawPause (void)
|
|
{
|
|
pic_t *p;
|
|
- int bufftemp = bufferofs;
|
|
+ byte *bufftemp = bufferofs;
|
|
|
|
bufferofs -= screenofs;
|
|
|
|
@@ -2610,15 +2610,16 @@
|
|
|
|
void GM_MemToScreen (byte *source, int width, int height, int x, int y)
|
|
{
|
|
- byte *dest, *dest1, *dest2, *dest3, mask;
|
|
+ int dest;
|
|
+ byte *dest1, *dest2, *dest3, mask;
|
|
byte *screen1, *screen2, *screen3;
|
|
int plane;
|
|
int w;
|
|
|
|
#ifdef DOS
|
|
- dest = (byte *)(ylookup[y]+(x>>2));
|
|
+ dest = ylookup[y]+(x>>2);
|
|
#else
|
|
- dest = (byte *)(ylookup[y]+x);
|
|
+ dest = ylookup[y]+x;
|
|
#endif
|
|
mask = 1 << (x&3);
|
|
|
|
@@ -4450,7 +4451,7 @@
|
|
{
|
|
if ((SaveTime+1) < GetTicCount())
|
|
{
|
|
- int temp = bufferofs;
|
|
+ byte *temp = bufferofs;
|
|
|
|
bufferofs = displayofs;
|
|
SaveTime = GetTicCount();
|
|
diff -ur rott-1.0.orig/rott/rt_main.c rott-1.0/rott/rt_main.c
|
|
--- rott-1.0.orig/rott/rt_main.c 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/rt_main.c 2007-05-06 22:13:55.000000000 +0200
|
|
@@ -962,7 +962,7 @@
|
|
while ((!LastScan) && (!IN_GetMouseButtons()))
|
|
{
|
|
int i;
|
|
- unsigned tempbuf;
|
|
+ byte *tempbuf;
|
|
MenuFadeOut();
|
|
ClearGraphicsScreen();
|
|
SetPalette(&dimpal[0]);
|
|
diff -ur rott-1.0.orig/rott/rt_stat.c rott-1.0/rott/rt_stat.c
|
|
--- rott-1.0.orig/rott/rt_stat.c 2002-12-24 05:34:15.000000000 +0100
|
|
+++ rott-1.0/rott/rt_stat.c 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -397,7 +397,7 @@
|
|
}
|
|
|
|
|
|
-void ActivateLight(int light)
|
|
+void ActivateLight(long light)
|
|
{statobj_t*tstat;
|
|
|
|
tstat = (statobj_t*)light;
|
|
@@ -409,7 +409,7 @@
|
|
}
|
|
|
|
|
|
-void DeactivateLight(int light)
|
|
+void DeactivateLight(long light)
|
|
{statobj_t*tstat;
|
|
|
|
tstat = (statobj_t*)light;
|
|
diff -ur rott-1.0.orig/rott/rt_stat.h rott-1.0/rott/rt_stat.h
|
|
--- rott-1.0.orig/rott/rt_stat.h 2002-12-20 21:15:28.000000000 +0100
|
|
+++ rott-1.0/rott/rt_stat.h 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -151,7 +151,7 @@
|
|
short int whichstat;
|
|
short int areanumber;
|
|
|
|
- int linked_to;
|
|
+ long linked_to;
|
|
struct statstruct *statnext;
|
|
struct statstruct *statprev;
|
|
struct statstruct *nextactive;
|
|
@@ -167,8 +167,7 @@
|
|
int spawnz;
|
|
struct respstruct *next;
|
|
struct respstruct *prev;
|
|
- int linked_to;
|
|
-
|
|
+ long linked_to;
|
|
} respawn_t;
|
|
|
|
|
|
@@ -205,8 +204,8 @@
|
|
void Set_NewZ_to_MapValue(fixed*,int,const char*,int,int);
|
|
void RemoveFromFreeStaticList(statobj_t*);
|
|
void CheckCriticalStatics(void);
|
|
-void ActivateLight(int);
|
|
-void DeactivateLight(int);
|
|
+void ActivateLight(long);
|
|
+void DeactivateLight(long);
|
|
void TurnOnLight(int,int);
|
|
void TurnOffLight(int,int);
|
|
void MakeStatActive(statobj_t*);
|
|
diff -ur rott-1.0.orig/rott/rt_ted.c rott-1.0/rott/rt_ted.c
|
|
--- rott-1.0.orig/rott/rt_ted.c 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/rt_ted.c 2007-05-06 22:14:56.000000000 +0200
|
|
@@ -1139,7 +1139,7 @@
|
|
int lastmem=0;
|
|
int lastcache=0;
|
|
int ticdelay;
|
|
- unsigned tempbuf;
|
|
+ byte *tempbuf;
|
|
|
|
#if defined(PLATFORM_MACOSX) || defined(__sparc__)
|
|
#warning "Precaching is disabled. Fix."
|
|
@@ -1329,7 +1329,7 @@
|
|
{
|
|
int filehandle;
|
|
char RTLSignature[ 4 ];
|
|
- unsigned long RTLVersion;
|
|
+ unsigned int RTLVersion;
|
|
|
|
filehandle = SafeOpenRead( filename );
|
|
|
|
@@ -1395,12 +1395,12 @@
|
|
SEEK_SET );
|
|
SafeRead( filehandle, &RTLMap, sizeof( RTLMap ) );
|
|
|
|
- SwapIntelLong((long *)&RTLMap.used);
|
|
- SwapIntelLong((long *)&RTLMap.CRC);
|
|
- SwapIntelLong((long *)&RTLMap.RLEWtag);
|
|
- SwapIntelLong((long *)&RTLMap.MapSpecials);
|
|
- SwapIntelLongArray((long *)&RTLMap.planestart, NUMPLANES);
|
|
- SwapIntelLongArray((long *)&RTLMap.planelength, NUMPLANES);
|
|
+ SwapIntelLong((int *)&RTLMap.used);
|
|
+ SwapIntelLong((int *)&RTLMap.CRC);
|
|
+ SwapIntelLong((int *)&RTLMap.RLEWtag);
|
|
+ SwapIntelLong((int *)&RTLMap.MapSpecials);
|
|
+ SwapIntelLongArray((int *)&RTLMap.planestart, NUMPLANES);
|
|
+ SwapIntelLongArray((int *)&RTLMap.planelength, NUMPLANES);
|
|
|
|
if ( !RTLMap.used )
|
|
{
|
|
@@ -3568,7 +3568,7 @@
|
|
|
|
|
|
void LinkActor (objtype *ob,int tilex,int tiley,
|
|
- void (*action)(int),void (*swapaction)(int)
|
|
+ void (*action)(long),void (*swapaction)(long)
|
|
)
|
|
{
|
|
word touchx,touchy;
|
|
@@ -3585,7 +3585,7 @@
|
|
if ((clockx == tilex) && (clocky == tiley))
|
|
{
|
|
clocklinked = 1;
|
|
- ClockLink(EnableObject,DisableObject,(int)ob,k);
|
|
+ ClockLink(EnableObject,DisableObject,(long)ob,k);
|
|
}
|
|
}
|
|
|
|
@@ -3612,9 +3612,9 @@
|
|
|
|
|
|
if (tswitch && (tswitch->flags & FL_ON))
|
|
- Link_To_Touchplate(touchx,touchy,swapaction,action,(int)ob,0);
|
|
+ Link_To_Touchplate(touchx,touchy,swapaction,action,(long)ob,0);
|
|
else
|
|
- Link_To_Touchplate(touchx,touchy,action,swapaction,(int)ob,0);
|
|
+ Link_To_Touchplate(touchx,touchy,action,swapaction,(long)ob,0);
|
|
if (ob->obclass == gasgrateobj)
|
|
{
|
|
ob->temp1 = touchx;
|
|
@@ -3645,7 +3645,7 @@
|
|
{
|
|
int i,j,linked;
|
|
word *map,tile;
|
|
- void (*action)(int),(*swapaction)(int);
|
|
+ void (*action)(long),(*swapaction)(long);
|
|
|
|
|
|
map = mapplanes[1];
|
|
@@ -4051,7 +4051,7 @@
|
|
if (!(tswitch->flags & FL_ON))
|
|
{sprites[i][j]->shapenum --;
|
|
if (touchindices[touchx][touchy])
|
|
- {Link_To_Touchplate(touchx,touchy,ActivateLight,DeactivateLight,(int)(sprites[i][j]),0);
|
|
+ {Link_To_Touchplate(touchx,touchy,ActivateLight,DeactivateLight,(long)(sprites[i][j]),0);
|
|
sprites[i][j]->linked_to = touchindices[touchx][touchy]-1;
|
|
}
|
|
else
|
|
@@ -4059,7 +4059,7 @@
|
|
}
|
|
else
|
|
{if (touchindices[touchx][touchy])
|
|
- {Link_To_Touchplate(touchx,touchy,DeactivateLight,ActivateLight,(int)(sprites[i][j]),0);
|
|
+ {Link_To_Touchplate(touchx,touchy,DeactivateLight,ActivateLight,(long)(sprites[i][j]),0);
|
|
sprites[i][j]->linked_to = touchindices[touchx][touchy]-1;
|
|
}
|
|
else
|
|
@@ -4069,7 +4069,7 @@
|
|
}
|
|
else
|
|
{if (touchindices[touchx][touchy])
|
|
- {Link_To_Touchplate(touchx,touchy,DeactivateLight,ActivateLight,(int)(sprites[i][j]),0);
|
|
+ {Link_To_Touchplate(touchx,touchy,DeactivateLight,ActivateLight,(long)(sprites[i][j]),0);
|
|
sprites[i][j]->linked_to = touchindices[touchx][touchy]-1;
|
|
}
|
|
else
|
|
diff -ur rott-1.0.orig/rott/rt_util.c rott-1.0/rott/rt_util.c
|
|
--- rott-1.0.orig/rott/rt_util.c 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/rt_util.c 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -1171,7 +1171,7 @@
|
|
}
|
|
|
|
|
|
-long SwapLong (long l)
|
|
+int SwapLong (int l)
|
|
{
|
|
byte b1,b2,b3,b4;
|
|
|
|
@@ -1180,10 +1180,10 @@
|
|
b3 = (l>>16)&255;
|
|
b4 = (l>>24)&255;
|
|
|
|
- return ((long)b1<<24) + ((long)b2<<16) + ((long)b3<<8) + b4;
|
|
+ return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
|
|
}
|
|
|
|
-long KeepLong (long l)
|
|
+int KeepLong (int l)
|
|
{
|
|
return l;
|
|
}
|
|
@@ -1194,7 +1194,7 @@
|
|
#undef SwapShort
|
|
#undef SwapLong
|
|
|
|
-void SwapIntelLong(long *l)
|
|
+void SwapIntelLong(int *l)
|
|
{
|
|
*l = IntelLong(*l);
|
|
}
|
|
@@ -1204,7 +1204,7 @@
|
|
*s = IntelShort(*s);
|
|
}
|
|
|
|
-void SwapIntelLongArray(long *l, int num)
|
|
+void SwapIntelLongArray(int *l, int num)
|
|
{
|
|
while (num--) {
|
|
SwapIntelLong(l);
|
|
diff -ur rott-1.0.orig/rott/rt_util.h rott-1.0/rott/rt_util.h
|
|
--- rott-1.0.orig/rott/rt_util.h 2002-12-25 09:00:13.000000000 +0100
|
|
+++ rott-1.0/rott/rt_util.h 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -67,11 +67,11 @@
|
|
long ParseNum (char *str);
|
|
short MotoShort (short l);
|
|
short IntelShort (short l);
|
|
-long MotoLong (long l);
|
|
-long IntelLong (long l);
|
|
-void SwapIntelLong (long *l);
|
|
+int MotoLong (int l);
|
|
+int IntelLong (int l);
|
|
+void SwapIntelLong (int *l);
|
|
void SwapIntelShort(short *s);
|
|
-void SwapIntelLongArray (long *l, int num);
|
|
+void SwapIntelLongArray (int *l, int num);
|
|
void SwapIntelShortArray (short *s, int num);
|
|
int US_CheckParm (char *parm, char **strings);
|
|
byte BestColor (int r, int g, int b, byte *palette);
|
|
diff -ur rott-1.0.orig/rott/rt_vid.c rott-1.0/rott/rt_vid.c
|
|
--- rott-1.0.orig/rott/rt_vid.c 2002-12-24 08:29:52.000000000 +0100
|
|
+++ rott-1.0/rott/rt_vid.c 2007-05-06 22:15:21.000000000 +0200
|
|
@@ -968,7 +968,7 @@
|
|
|
|
void SwitchPalette (byte * newpal, int steps)
|
|
{
|
|
- int temp;
|
|
+ byte *temp;
|
|
|
|
VL_FadeOut(0,255,0,0,0,steps>>1);
|
|
|
|
diff -ur rott-1.0.orig/rott/rt_view.c rott-1.0/rott/rt_view.c
|
|
--- rott-1.0.orig/rott/rt_view.c 2003-01-01 10:24:39.000000000 +0100
|
|
+++ rott-1.0/rott/rt_view.c 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -220,7 +220,7 @@
|
|
{
|
|
int i;
|
|
int frac;
|
|
- long intang;
|
|
+ int intang;
|
|
byte * table;
|
|
byte * ptr;
|
|
int length;
|
|
@@ -246,7 +246,7 @@
|
|
//
|
|
|
|
memcpy(&length,ptr,sizeof(int));
|
|
- SwapIntelLong((long *)&length);
|
|
+ SwapIntelLong(&length);
|
|
ptr+=sizeof(int);
|
|
pangle=SafeMalloc(length*sizeof(int));
|
|
memcpy(pangle,ptr,length*sizeof(int));
|
|
@@ -447,7 +447,7 @@
|
|
lump = W_GetNumForName("colormap");
|
|
length = W_LumpLength (lump) + 255;
|
|
colormap = SafeMalloc (length);
|
|
- colormap = (byte *)( ((int)colormap + 255)&~0xff);
|
|
+ colormap = (byte *)( ((long)colormap + 255)&~0xff);
|
|
W_ReadLump (lump,colormap);
|
|
|
|
// Fix fire colors in colormap
|
|
@@ -461,7 +461,7 @@
|
|
lump = W_GetNumForName("specmaps");
|
|
length = W_LumpLength (lump+1) + 255;
|
|
redmap = SafeMalloc (length);
|
|
- redmap = (byte *)( ((int)redmap + 255)&~0xff);
|
|
+ redmap = (byte *)( ((long)redmap + 255)&~0xff);
|
|
W_ReadLump (lump+1,redmap);
|
|
greenmap = redmap+(16*256);
|
|
|
|
@@ -474,7 +474,7 @@
|
|
{
|
|
length = W_LumpLength (lump+i) + 255;
|
|
playermaps[i] = SafeMalloc (length);
|
|
- playermaps[i] = (byte *)( ((int)playermaps[i] + 255)&~0xff);
|
|
+ playermaps[i] = (byte *)( ((long)playermaps[i] + 255)&~0xff);
|
|
W_ReadLump (lump+i,playermaps[i]);
|
|
}
|
|
}
|
|
diff -ur rott-1.0.orig/rott/watcom.c rott-1.0/rott/watcom.c
|
|
--- rott-1.0.orig/rott/watcom.c 2007-05-06 22:30:08.000000000 +0200
|
|
+++ rott-1.0/rott/watcom.c 2007-05-06 22:03:17.000000000 +0200
|
|
@@ -24,8 +24,8 @@
|
|
|
|
fixed FixedDiv2(fixed a, fixed b)
|
|
{
|
|
- __int64 x = (signed long)a;
|
|
- __int64 y = (signed long)b;
|
|
+ __int64 x = (signed int)a;
|
|
+ __int64 y = (signed int)b;
|
|
__int64 z = x * 65536 / y;
|
|
|
|
return (z) & 0xffffffff;
|
|
diff -ur rott-1.0.orig/rott/rt_main.h rott-1.0/rott/rt_main.h
|
|
--- rott-1.0.orig/rott/rt_main.h 2002-12-20 22:18:39.000000000 +0100
|
|
+++ rott-1.0/rott/rt_main.h 2007-05-10 11:49:11.000000000 +0200
|
|
@@ -76,8 +76,8 @@
|
|
// Variable for which version of the game can be played
|
|
version_type Product;
|
|
|
|
- long TimeCount;
|
|
- long frame;
|
|
+ int TimeCount;
|
|
+ int frame;
|
|
int secrettotal,treasuretotal,killtotal;
|
|
int secretcount,treasurecount,killcount;
|
|
int supertotal,healthtotal,missiletotal;
|
|
@@ -88,7 +88,7 @@
|
|
int difficulty;
|
|
int violence;
|
|
int mapon;
|
|
- long score;
|
|
+ int score;
|
|
int episode;
|
|
int battlemode;
|
|
int battleoption;
|