shithub: duke3d

Download patch

ref: cbe0afdea7e9d6c21c3e1bbe9cfbc523c85cfaa9
parent: 87618da55e0264d844e86bee5fc8f6cc8c2c4a33
author: Fabien Sanglard <[email protected]>
date: Thu Dec 13 21:09:32 EST 2012

Still doing a lot of clean up with unit8_t and char. Thebuild is now broken :(.

--- a/Engine/src/engine.c
+++ b/Engine/src/engine.c
@@ -117,7 +117,7 @@
 static uint8_t  globalpolytype;
 static short *dotp1[MAXYDIM], *dotp2[MAXYDIM];
 
-static uint8_t  tempbuf[MAXWALLS];
+static char  tempbuf[MAXWALLS];
 
 int32_t ebpbak, espbak;
 int32_t slopalookup[16384];
@@ -151,7 +151,7 @@
 };
 int32_t reciptable[2048], fpuasm;
 
-uint8_t  kensmessage[128];
+char  kensmessage[128];
 
 
 
@@ -274,7 +274,7 @@
 int32_t searchx = -1, searchy;                     /* search input  */
 short searchsector, searchwall, searchstat;     /* search output */
 
-static uint8_t  artfilename[20];
+static char  artfilename[20];
 static int32_t numtilefiles, artfil = -1, artfilnum, artfilplc;
 
 static uint8_t  inpreparemirror = 0;
--- a/Game/src/audiolib/fx_man.c
+++ b/Game/src/audiolib/fx_man.c
@@ -33,16 +33,9 @@
 #include "sndcards.h"
 #include "multivoc.h"
 
-#ifdef PLAT_DOS
-#include "blaster.h"
-#include "pas16.h"
-#include "sndscape.h"
-#include "guswave.h"
-#include "sndsrc.h"
-#else
 #include "dsl.h"
-#endif
 
+
 #include "ll_man.h"
 #include "user.h"
 #include "fx_man.h"
@@ -88,42 +81,9 @@
             "(c) Copyright 1995 James R. Dose.  All Rights Reserved.\n";
          break;
 
-#ifdef PLAT_DOS
-      case FX_BlasterError :
-         ErrorString = BLASTER_ErrorString( BLASTER_Error );
-         break;
-#endif
 
       case FX_SoundCardError :
-#ifdef PLAT_DOS
-         switch( FX_SoundDevice )
-         {
-            case SoundBlaster :
-            case Awe32 :
-               ErrorString = BLASTER_ErrorString( BLASTER_Error );
-               break;
-
-            case ProAudioSpectrum :
-            case SoundMan16 :
-               ErrorString = PAS_ErrorString( PAS_Error );
-               break;
-
-            case SoundScape :
-               ErrorString = SOUNDSCAPE_ErrorString( SOUNDSCAPE_Error );
-               break;
-
-            case UltraSound :
-               ErrorString = GUSWAVE_ErrorString( GUSWAVE_Error );
-               break;
-
-            case SoundSource :
-            case TandySoundSource :
-               ErrorString = SS_ErrorString( SS_Error );
-               break;
-            }
-#else
          ErrorString = DSL_ErrorString( DSL_Error );
-#endif
          break;
 
       case FX_InvalidCard :
@@ -174,88 +134,7 @@
    status = FX_Ok;
    FX_SetErrorCode( FX_Ok );
 
-#ifdef PLAT_DOS
-   switch( SoundCard )
-      {
-      case SoundBlaster :
-      case Awe32 :
-         DeviceStatus = BLASTER_Init();
-         if ( DeviceStatus != BLASTER_Ok )
-            {
-            FX_SetErrorCode( FX_SoundCardError );
-            status = FX_Error;
-            break;
-            }
 
-         device->MaxVoices = 32;
-         BLASTER_GetCardInfo( &device->MaxSampleBits, &device->MaxChannels );
-         break;
-
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         DeviceStatus = PAS_Init();
-         if ( DeviceStatus != PAS_Ok )
-            {
-            FX_SetErrorCode( FX_SoundCardError );
-            status = FX_Error;
-            break;
-            }
-
-         device->MaxVoices = 32;
-         PAS_GetCardInfo( &device->MaxSampleBits, &device->MaxChannels );
-         break;
-
-      case GenMidi :
-      case SoundCanvas :
-      case WaveBlaster :
-         device->MaxVoices     = 0;
-         device->MaxSampleBits = 0;
-         device->MaxChannels   = 0;
-         break;
-
-      case SoundScape :
-         device->MaxVoices = 32;
-         DeviceStatus = SOUNDSCAPE_GetCardInfo( &device->MaxSampleBits,
-            &device->MaxChannels );
-         if ( DeviceStatus != SOUNDSCAPE_Ok )
-            {
-            FX_SetErrorCode( FX_SoundCardError );
-            status = FX_Error;
-            }
-         break;
-
-      case UltraSound :
-         if ( GUSWAVE_Init( 8 ) != GUSWAVE_Ok )
-            {
-            FX_SetErrorCode( FX_SoundCardError );
-            status = FX_Error;
-            break;
-            }
-
-         device->MaxVoices     = 8;
-         device->MaxSampleBits = 0;
-         device->MaxChannels   = 0;
-         break;
-
-      case SoundSource :
-      case TandySoundSource :
-         DeviceStatus = SS_Init( SoundCard );
-         if ( DeviceStatus != SS_Ok )
-            {
-            FX_SetErrorCode( FX_SoundCardError );
-            status = FX_Error;
-            break;
-            }
-         SS_Shutdown();
-         device->MaxVoices     = 32;
-         device->MaxSampleBits = 8;
-         device->MaxChannels   = 1;
-         break;
-      default :
-         FX_SetErrorCode( FX_InvalidCard );
-         status = FX_Error;
-      }
-#else
       DeviceStatus = DSL_Init();
       if ( DeviceStatus != DSL_Ok )
          {
@@ -268,8 +147,8 @@
          device->MaxSampleBits = 0;
          device->MaxChannels   = 0;
          }
-#endif
 
+
    return( status );
    }
 
@@ -286,28 +165,7 @@
    )
 
    {
-#ifdef PLAT_DOS
-   int status;
-   BLASTER_CONFIG Blaster;
 
-   FX_SetErrorCode( FX_Ok );
-
-   status = BLASTER_GetEnv( &Blaster );
-   if ( status != BLASTER_Ok )
-      {
-      FX_SetErrorCode( FX_BlasterError );
-      return( FX_Error );
-      }
-
-   blaster->Type      = Blaster.Type;
-   blaster->Address   = Blaster.Address;
-   blaster->Interrupt = Blaster.Interrupt;
-   blaster->Dma8      = Blaster.Dma8;
-   blaster->Dma16     = Blaster.Dma16;
-   blaster->Midi      = Blaster.Midi;
-   blaster->Emu       = Blaster.Emu;
-#endif
-
    return( FX_Ok );
    }
 
@@ -327,35 +185,8 @@
    )
 
    {
-#ifdef PLAT_DOS
-   int DeviceStatus;
-   BLASTER_CONFIG Blaster;
 
-   FX_SetErrorCode( FX_Ok );
 
-   FX_SoundDevice = SoundBlaster;
-
-   Blaster.Type      = blaster.Type;
-   Blaster.Address   = blaster.Address;
-   Blaster.Interrupt = blaster.Interrupt;
-   Blaster.Dma8      = blaster.Dma8;
-   Blaster.Dma16     = blaster.Dma16;
-   Blaster.Midi      = blaster.Midi;
-   Blaster.Emu       = blaster.Emu;
-
-   BLASTER_SetCardSettings( Blaster );
-
-   DeviceStatus = BLASTER_Init();
-   if ( DeviceStatus != BLASTER_Ok )
-      {
-      FX_SetErrorCode( FX_SoundCardError );
-      return( FX_Error );
-      }
-
-   *MaxVoices = 8;
-   BLASTER_GetCardInfo( MaxSampleBits, MaxChannels );
-#endif
-
    return( FX_Ok );
    }
 
@@ -532,59 +363,11 @@
    Sets the volume of the current sound device.
 ---------------------------------------------------------------------*/
 
-void FX_SetVolume
-   (
-   int volume
-   )
-
+void FX_SetVolume(int volume)
    {
-   int status;
 
-#ifdef PLAT_DOS
-   switch( FX_SoundDevice )
-      {
-      case SoundBlaster :
-      case Awe32 :
-         if ( BLASTER_CardHasMixer() )
-            {
-            BLASTER_SetVoiceVolume( volume );
-            }
-         else
-            {
-            MV_SetVolume( volume );
-            }
-         break;
-
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         status = PAS_SetPCMVolume( volume );
-         if ( status != PAS_Ok )
-            {
-            MV_SetVolume( volume );
-            }
-         break;
-
-      case GenMidi :
-      case SoundCanvas :
-      case WaveBlaster :
-         break;
-
-      case SoundScape :
-         MV_SetVolume( volume );
-         break;
-
-      case UltraSound :
-         GUSWAVE_SetVolume( volume );
-         break;
-
-      case SoundSource :
-      case TandySoundSource :
-         MV_SetVolume( volume );
-         break;
-      }
-#else
    MV_SetVolume( volume );
-#endif
+
    }
 
 
@@ -594,64 +377,14 @@
    Returns the volume of the current sound device.
 ---------------------------------------------------------------------*/
 
-int FX_GetVolume
-   (
-   void
-   )
-
+int FX_GetVolume(void)
    {
    int volume;
 
-#ifdef PLAT_DOS
-   switch( FX_SoundDevice )
-      {
-      case SoundBlaster :
-      case Awe32 :
-         if ( BLASTER_CardHasMixer() )
-            {
-            volume = BLASTER_GetVoiceVolume();
-            }
-         else
-            {
-            volume = MV_GetVolume();
-            }
-         break;
 
-      case ProAudioSpectrum :
-      case SoundMan16 :
-         volume = PAS_GetPCMVolume();
-         if ( volume == PAS_Error )
-            {
-            volume = MV_GetVolume();
-            }
-         break;
-
-      case GenMidi :
-      case SoundCanvas :
-      case WaveBlaster :
-         volume = 255;
-         break;
-
-      case SoundScape :
-         volume = MV_GetVolume();
-         break;
-
-      case UltraSound :
-         volume = GUSWAVE_GetVolume();
-         break;
-
-      case SoundSource :
-      case TandySoundSource :
-         volume = MV_GetVolume();
-         break;
-
-      default :
-         volume = 0;
-      }
-#else
    volume = MV_GetVolume();
-#endif
 
+
    return( volume );
    }
 
@@ -662,10 +395,7 @@
    Set the orientation of the left and right channels.
 ---------------------------------------------------------------------*/
 
-void FX_SetReverseStereo
-   (
-   int setting
-   )
+void FX_SetReverseStereo(int setting)
 
    {
    MV_SetReverseStereo( setting );
@@ -678,10 +408,7 @@
    Returns the orientation of the left and right channels.
 ---------------------------------------------------------------------*/
 
-int FX_GetReverseStereo
-   (
-   void
-   )
+int FX_GetReverseStereo(void)
 
    {
    return MV_GetReverseStereo();
--- a/Game/src/config.c
+++ b/Game/src/config.c
@@ -395,7 +395,7 @@
       SCRIPT_GetString(scripthandle, "Controls", str,temp);
       function = CONFIG_FunctionNameToNum(temp);
       CONTROL_MapDigitalAxis( i, function, 1 );
-      sprintf(str,"MouseAnalogScale%ld",i);
+      sprintf(str,"MouseAnalogScale%d",i);
       SCRIPT_GetNumber(scripthandle, "Controls", str,&scale);
       //TODO: Fix the Analog mouse scale issue. Just make a new function for registering them.
 	  //CONTROL_SetAnalogAxisScale( i, scale );
@@ -532,7 +532,7 @@
    {
 	  for(j=0; j < 8; j++) // 8? because hats can have 8 different values
 	  { 
-		  sprintf(str,"JoystickHat%ld_%d",i, j);
+		  sprintf(str,"JoystickHat%d_%d",i, j);
 		  memset(temp,0,sizeof(temp));
 		  SCRIPT_GetString( scripthandle,"Controls", str,temp);
 		  function = CONFIG_FunctionNameToNum(temp);
@@ -629,12 +629,7 @@
        SCRIPT_GetString( scripthandle, "Comm Setup",commmacro,ud.ridecule[dummy]);
    }
 
-//   /* DDOI - Check version */
-//   if (!SCRIPT_GetNumber( scripthandle, "Misc", "UseOldVersion", &dukever13))
-//	   dukever13 = 0; // assume 1.5
-//#ifdef VOLUMEONE
-//   dukever13 = 1;
-//#endif
+
 
    SCRIPT_GetString( scripthandle, "Comm Setup","PlayerName",&myname[0]);
 
--- a/Game/src/cvar_defs.c
+++ b/Game/src/cvar_defs.c
@@ -15,7 +15,7 @@
 //We need to access debug soundinfo
 #include "sounddebugdefs.h"
 
-#include "../../Engine/src/sdl_driver.h"
+#include "joystick.h"
 
 // Bind our Cvars at startup. You can still add bindings after this call, but
 // it is recommanded that you bind your default CVars here.
@@ -103,13 +103,13 @@
         char  buf[128];
         minitext(2, 2, "Debug Sound", 17,10+16);
 
-		sprintf(buf, "Active sounds: %lu", sounddebugActiveSounds);
+		sprintf(buf, "Active sounds: %u", sounddebugActiveSounds);
 		minitext(2, 10, buf, 23,10+16);
 		
-		sprintf(buf, "Allocate Calls: %lu", sounddebugAllocateSoundCalls);
+		sprintf(buf, "Allocate Calls: %u", sounddebugAllocateSoundCalls);
 		minitext(2, 18, buf, 23,10+16);
 
-		sprintf(buf, "Deallocate Calls: %ld", sounddebugDeallocateSoundCalls);
+		sprintf(buf, "Deallocate Calls: %d", sounddebugDeallocateSoundCalls);
 		minitext(2, 26, buf, 23,10+16);
 	}
 
--- a/Game/src/duke3d.h
+++ b/Game/src/duke3d.h
@@ -355,7 +355,7 @@
 
 typedef struct
 {
-    uint8_t  *ptr;
+    char  *ptr;
     uint8_t  lock;
     int  length, num;
 } SAMPLE;
@@ -542,7 +542,7 @@
 extern SOUNDOWNER SoundOwner[NUM_SOUNDS][4];
 
 extern uint8_t  playerreadyflag[MAXPLAYERS],playerquitflag[MAXPLAYERS];
-extern uint8_t  sounds[NUM_SOUNDS][14];
+extern char  sounds[NUM_SOUNDS][14];
 
 extern int32_t script[MAXSCRIPTSIZE],*scriptptr,*insptr,*labelcode,labelcnt;
 extern char  *label,*textptr,error,warning;
@@ -553,8 +553,9 @@
 
 extern uint8_t  ipath[80],opath[80];
 
-extern uint8_t  music_fn[4][11][13],music_select;
-extern uint8_t  env_music_fn[4][13];
+extern char  music_fn[4][11][13];
+extern uint8_t music_select;
+extern char  env_music_fn[4][13];
 extern short camsprite;
 
 // extern uint8_t  gotz;
--- a/Game/src/funct.h
+++ b/Game/src/funct.h
@@ -45,7 +45,7 @@
 //#line "sounds.c" 200
 extern void intomenusounds(void );
 //#line "sounds.c" 227
-extern void playmusic(uint8_t  *fn);
+extern void playmusic(char  *fn);
 //#line "sounds.c" 251
 extern uint8_t  loadsound(unsigned short num);
 //#line "sounds.c" 277
@@ -262,7 +262,7 @@
 //#line "menues.c" 2436
 extern void drawoverheadmap(int32_t cposx,int32_t cposy,int32_t czoom,short cang);
 //#line "menues.c" 2685
-extern void playanm(uint8_t  *fn,uint8_t );
+extern void playanm(char  *fn,uint8_t );
 //#line "gamedef.c" 122
 extern short getincangle(short a,short na);
 //#line "gamedef.c" 140
--- a/Game/src/game.c
+++ b/Game/src/game.c
@@ -89,7 +89,8 @@
 // For addfaz's stun server. use /stun to activate
 unsigned short g_bStun = 0;
 
-char  confilename[128] = {"GAME.CON"},boardfilename[128] = {0};
+char confilename[128] = {"GAME.CON"};
+char boardfilename[128] = {0};
 char  waterpal[768], slimepal[768], titlepal[768], drealms[768], endingpal[768];
 char  firstdemofile[80] = { '\0' };
 
@@ -366,7 +367,7 @@
 }
 
 
-uint8_t  recbuf[80];
+char  recbuf[80];
 void allowtimetocorrecterrorswhenquitting(void)
 {
      int32_t i, j, oldtotalclock;
@@ -2155,7 +2156,7 @@
 void tics(short offx, short offy, short color)
 {
     int32_t i;
-	uint8_t  fps[512], mapname[512];
+	char  fps[512], mapname[512];
 	int32_t currentFps;
 	static int32_t fpsAvg = 0, savedFps = 0;
 	static boolean toggle = true;
@@ -2203,7 +2204,7 @@
 	else
 		savedFps = fpsAvg;
 
-	sprintf(fps," %ld", savedFps);
+	sprintf(fps," %d", savedFps);
 	strcat(tempbuf, fps);
 
 	minitext(offx,offy,tempbuf,color,2+8+16+128);
@@ -8701,7 +8702,7 @@
     uint8_t  *fname = d;
     uint8_t  ver;
     short i,j;
-	uint8_t  firstdemofile_[512];
+
 	int32 dummy;
 	int32_t groupefil_crc32_from_demo[MAXGROUPFILES];
 
--- a/Game/src/gamedef.c
+++ b/Game/src/gamedef.c
@@ -30,7 +30,8 @@
 extern short otherp;
 
 static short total_lines,line_number;
-static uint8_t  checking_ifelse,parsing_state,*last_used_text;
+static uint8_t  checking_ifelse,parsing_state;
+char *last_used_text;
 static short num_squigilly_brackets;
 static int32_t last_used_size;
 
@@ -418,7 +419,7 @@
 
     for(i=0;i<labelcnt;i++)
     {
-        if( strcmp((const uint8_t *)tempbuf,label+(i<<6)) == 0 )
+        if( strcmp((const char *)tempbuf,label+(i<<6)) == 0 )
         {
             *scriptptr = labelcode[i];
             scriptptr++;
@@ -445,7 +446,9 @@
 uint8_t  parsecommand(int readfromGRP)
 {
     int32_t i, j, k, *tempscrptr;
-    uint8_t  done, *origtptr, temp_ifelse_check, tw;
+    uint8_t  done, temp_ifelse_check;
+    int32_t tw;
+    char *origtptr;
     short temp_line_number;
     int fp;
 
@@ -467,7 +470,7 @@
                 if(*textptr == 0x0a) line_number++;
                 if( *textptr == 0 )
                 {
-                    printf("  * ERROR!(L%ld) Found '/*' with no '*/'.\n",j);
+                    printf("  * ERROR!(L%d) Found '/*' with no '*/'.\n",j);
                     error++;
                     return 0;
                 }
--- a/Game/src/global.c
+++ b/Game/src/global.c
@@ -113,7 +113,7 @@
 
 short soundps[NUM_SOUNDS],soundpe[NUM_SOUNDS],soundvo[NUM_SOUNDS];
 uint8_t  soundm[NUM_SOUNDS],soundpr[NUM_SOUNDS];
-uint8_t  sounds[NUM_SOUNDS][14];
+char  sounds[NUM_SOUNDS][14];
 
 short title_zoom;
 
@@ -164,8 +164,9 @@
 
 uint8_t  display_mirror,typebuflen,typebuf[41];
 
-uint8_t  music_fn[4][11][13],music_select;
-uint8_t  env_music_fn[4][13];
+char  music_fn[4][11][13];
+uint8_t music_select;
+char  env_music_fn[4][13];
 uint8_t  rtsplaying;
 
 
@@ -648,7 +649,7 @@
 	}
 }
 
-void SafeWriteString (int handle, uint8_t  * buffer)
+void SafeWriteString (int handle, char  * buffer)
 {
 	unsigned	iocount;
 
--- a/Game/src/joystick.h
+++ b/Game/src/joystick.h
@@ -4,8 +4,13 @@
 extern "C" {
 #endif
 
-void   JOYSTICK_UpdateHats( void );
-
+    void   JOYSTICK_UpdateHats( void );
+    void _joystick_deinit(void);
+    int _joystick_update(void);
+    int _joystick_axis(int axis);
+    int _joystick_hat(int hat);
+    int _joystick_button(int button);
+    
 #ifdef __cplusplus
 };
 
--- a/Game/src/keyboard.c
+++ b/Game/src/keyboard.c
@@ -252,7 +252,7 @@
 	{ NULL,		0		}
 };
 
-uint8_t  *KB_ScanCodeToString( kb_scancode scancode )
+char  *KB_ScanCodeToString( kb_scancode scancode )
 {
 	int i;
 	for(i = 0; keyname2scancode[i].name != NULL; i++)
@@ -266,7 +266,7 @@
 
 kb_scancode KB_StringToScanCode( char  * string )
 {
-	uint8_t * name = NULL;
+	char * name = NULL;
 	int32 i=0;
 	name = keyname2scancode[i].name;
 	for(;name;++i, name=keyname2scancode[i].name)
--- a/Game/src/keyboard.h
+++ b/Game/src/keyboard.h
@@ -210,7 +210,7 @@
 void    KB_Addch( uint8_t  ch );           // Adds key to end of queue
 void    KB_FlushKeyboardQueue( void ); // Empties the keyboard queue of all waiting characters.
 void    KB_ClearKeysDown( void );      // Clears all keys down flags.
-uint8_t  *  KB_ScanCodeToString( kb_scancode scancode ); // convert scancode into a string
+char  *  KB_ScanCodeToString( kb_scancode scancode ); // convert scancode into a string
 kb_scancode KB_StringToScanCode( char  * string );  // convert a string into a scancode
 void    KB_TurnKeypadOn( void );       // turn the keypad on
 void    KB_TurnKeypadOff( void );      // turn the keypad off
--- a/Game/src/menues.c
+++ b/Game/src/menues.c
@@ -38,7 +38,8 @@
 short probey=0,lastprobey=0,last_menu,globalskillsound=-1;
 short sh,onbar,buttonstat,deletespot;
 short last_zero,last_fifty,last_threehundred = 0;
-static uint8_t  fileselect = 1, menunamecnt, menuname[256][17];
+static uint8_t  fileselect = 1, menunamecnt;
+static char menuname[256][17];
 
 // File tree info
 //
@@ -178,7 +179,7 @@
 int loadpheader(uint8_t  spot,int32 *vn,int32 *ln,int32 *psk,int32 *nump)
 {
 
-    uint8_t  fn[] = "game0.sav";
+    char  fn[] = "game0.sav";
     int32_t fil;
     int32_t bv;
 
@@ -4121,20 +4122,20 @@
             menutext(c,57-9,SHX(-2),PHX(-2),"GAME TYPE");
 
 if (VOLUMEONE)
-{            sprintf(tempbuf,"EPISODE %ld",ud.m_volume_number+1);
+{            sprintf(tempbuf,"EPISODE %d",ud.m_volume_number+1);
             menutext(c,57+16-9,SHX(-3),1,tempbuf);
 } 
 else 
-{
-            sprintf(tempbuf,"EPISODE %ld",ud.m_volume_number+1);
+
+            sprintf(tempbuf,"EPISODE %d",ud.m_volume_number+1);
             menutext(c,57+16-9,SHX(-3),PHX(-3),tempbuf);
 }
 
 #ifndef ONELEVELDEMO
-            sprintf(tempbuf,"LEVEL %ld",ud.m_level_number+1);
+            sprintf(tempbuf,"LEVEL %d",ud.m_level_number+1);
             menutext(c,57+16+16-9,SHX(-4),PHX(-4),tempbuf);
 #else
-            sprintf(tempbuf,"LEVEL %ld",ud.m_level_number+1);
+            sprintf(tempbuf,"LEVEL %d",ud.m_level_number+1);
             menutext(c,57+16+16-9,SHX(-4),1,tempbuf);
 #endif
             menutext(c,57+16+16+16-9,SHX(-5),PHX(-5),"MONSTERS");
@@ -4160,7 +4161,7 @@
 
             menutext(c,57+16+16+16+16+16+16+16-9,SHX(-8),PHX(-8),"START GAME");
 
-            break;
+    break;
     }
 
     if( (ps[myconnectindex].gm&MODE_MENU) != MODE_MENU)
@@ -4623,7 +4624,7 @@
 
 
 int32_t lastanimhack=0;
-void playanm(uint8_t  *fn,uint8_t  t)
+void playanm(char  *fn,uint8_t  t)
 {
         uint8_t  *animbuf, *palptr;
     int32_t i, j, k, length=0, numframes=0;
--- a/Game/src/player.c
+++ b/Game/src/player.c
@@ -2621,12 +2621,12 @@
                     {
                         if(snum == screenpeek)
                         {
-                            sprintf(&fta_quotes[115][0],"KILLED BY PLAYER %ld",1+p->frag_ps);
+                            sprintf(&fta_quotes[115][0],"KILLED BY PLAYER %d",1+p->frag_ps);
                             FTA(115,p,1);
                         }
                         else if(screenpeek == p->frag_ps)
                         {
-                            sprintf(&fta_quotes[116][0],"KILLED PLAYER %ld",1+snum);
+                            sprintf(&fta_quotes[116][0],"KILLED PLAYER %d",1+snum);
                             FTA(116,&ps[p->frag_ps],1);
                         }
                     }
--- a/Game/src/premap.c
+++ b/Game/src/premap.c
@@ -552,7 +552,6 @@
 void resetinventory(short snum)
 {
     struct player_struct *p;
-    short i;
 
     p = &ps[snum];
 
@@ -1282,7 +1281,7 @@
 {
     int32_t j,fp;
     int8_t look_pos;
-    uint8_t  *lookfn = "lookup.dat";
+    char  *lookfn = "lookup.dat";
     uint8_t  numl;
 
     fp = TCkopen4load(lookfn,0);
--- a/Game/src/scriplib.c
+++ b/Game/src/scriplib.c
@@ -50,7 +50,7 @@
 typedef struct scriptnode_s {
 	struct scriptnode_s *child;
 	struct scriptnode_s *sibling;
-	uint8_t  *key;
+	char  *key;
 	scriptflag_t type;
 	union {
 		char  *string[2];
@@ -188,11 +188,11 @@
 	}
 }
 
-static uint8_t  *SCRIPT_copystring (uint8_t  * s)
+static char  *SCRIPT_copystring (char  * s)
 {
-	uint8_t  *ret;
+	char  *ret;
 
-	ret = (uint8_t  *) malloc (strlen (s)+1);
+	ret = (char  *) malloc (strlen (s)+1);
 	if (ret != NULL)
 	{
 		strcpy (ret, s);
@@ -200,7 +200,7 @@
 	return ret;
 }
 
-static int SCRIPT_getnexttoken (uint8_t  *buffer, uint8_t * token, int start)
+static int SCRIPT_getnexttoken (char  *buffer, char * token, int start)
 {
 	int iterator = start;
 
@@ -225,9 +225,9 @@
 }
 
 /* Fills in a scriptnode with the interpreted contents of a line */
-static void SCRIPT_parseline (uint8_t  *curline, scriptnode_t *node)
+static void SCRIPT_parseline (char  *curline, scriptnode_t *node)
 {
-	uint8_t  token[128];
+	char  token[128];
 	int i;
 
 	/* Needs to handle 5 cases: */
@@ -279,7 +279,7 @@
 		node->type = SCRIPTFLAG_DECIMAL;
 		node->data.number = -1;
 	}else if (token[0] == '"') {
-		uint8_t  workbuf[128];
+		char  workbuf[128];
 		int r;
 
 		/* Found one of possibly two strings */
@@ -566,7 +566,7 @@
 =
 ==============
 */
-uint8_t  * SCRIPT_Entry( int32 scripthandle, char  * sectionname, int32 which )
+char  * SCRIPT_Entry( int32 scripthandle, char  * sectionname, int32 which )
 {
 	scriptnode_t *node = NULL;
 	int32 entrynum = 0;
@@ -599,7 +599,7 @@
 =
 ==============
 */
-uint8_t  * SCRIPT_GetRaw(int32 scripthandle, char  * sectionname, char  * entryname)
+char  * SCRIPT_GetRaw(int32 scripthandle, char  * sectionname, char  * entryname)
 {
 	STUBBED("GetRaw");
 	
@@ -741,8 +741,8 @@
 boolean SCRIPT_GetFloat
    (
    int32 scripthandle,
-   uint8_t  * sectionname,
-   uint8_t  * entryname,
+   char  * sectionname,
+   char  * entryname,
    float * floatnumber
    )
 {
--- a/Game/src/scriplib.h
+++ b/Game/src/scriplib.h
@@ -120,7 +120,7 @@
 ==============
 */
 
-uint8_t  * SCRIPT_Entry( int32 scripthandle, char  * sectionname, int32 which );
+char  * SCRIPT_Entry( int32 scripthandle, char  * sectionname, int32 which );
 
 
 /*
@@ -130,7 +130,7 @@
 =
 ==============
 */
-uint8_t  * SCRIPT_GetRaw(int32 scripthandle, char  * sectionname, char  * entryname);
+char  * SCRIPT_GetRaw(int32 scripthandle, char  * sectionname, char  * entryname);
 
 /*
 ==============
@@ -204,8 +204,8 @@
 boolean SCRIPT_GetFloat
    (
    int32 scripthandle,
-   uint8_t  * sectionname,
-   uint8_t  * entryname,
+   char  * sectionname,
+   char  * entryname,
    float * floatnumber
    );
 
--- a/Game/src/sounds.c
+++ b/Game/src/sounds.c
@@ -252,7 +252,7 @@
     menunum %= 17;
 }
 
-void playmusic(uint8_t  *fn)
+void playmusic(char  *fn)
 {
     if(MusicToggle == 0) return;
     if(MusicDevice == NumSoundCards) return;
--- a/xcode/Duke3D.xcodeproj/project.pbxproj
+++ b/xcode/Duke3D.xcodeproj/project.pbxproj
@@ -180,7 +180,6 @@
 		2D7C17D5167AD6A500E1BBA1 /* pitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pitch.h; path = ../../Game/src/audiolib/pitch.h; sourceTree = "<group>"; };
 		2D7C17D6167AD6A500E1BBA1 /* user.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = user.c; path = ../../Game/src/audiolib/user.c; sourceTree = "<group>"; };
 		2D7C17DF167ADE1F00E1BBA1 /* pitch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pitch.c; path = ../../Game/src/audiolib/pitch.c; sourceTree = "<group>"; };
-		2D7C17E2167AF7DE00E1BBA1 /* sdl_driver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sdl_driver.h; path = ../../Engine/src/sdl_driver.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -232,7 +231,6 @@
 		2D7B61F01678884400E35E54 /* Engine */ = {
 			isa = PBXGroup;
 			children = (
-				2D7C17E2167AF7DE00E1BBA1 /* sdl_driver.h */,
 				2D7B61F11678885A00E35E54 /* a.c */,
 				2D7B61F21678885A00E35E54 /* a.h */,
 				2D7B61F31678885A00E35E54 /* build.h */,