shithub: choc

Download patch

ref: 06c73f7a43b0b569c63fb1153e9f8da25f3ddfb7
parent: 4a70f989d2aacabffc2f02017704de042be7418a
parent: 508c3fd3fa5b3149d329e15ea3e072ad2a7aa2f2
author: Simon Howard <[email protected]>
date: Wed Sep 30 21:10:17 EDT 2009

Merge from trunk.

Subversion-branch: /branches/opl-branch
Subversion-revision: 1702

--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,4 +1,9 @@
 
+dnl
+dnl SDL workaround autoconf macros, by Simon Howard.
+dnl I release the contents of this file to the public domain.
+dnl
+
 dnl Macro to check if autoconf's compile tests have been broken by
 dnl SDL.  Tries to build the simplest possible program, and if it
 dnl fails, calls the given block.
--- a/pcsound/pcsound.c
+++ b/pcsound/pcsound.c
@@ -109,7 +109,7 @@
                 }
                 else
                 {
-                    printf("Failed to initialise PC sound driver: %s\n",
+                    printf("Failed to initialize PC sound driver: %s\n",
                            drivers[i]->name);
                     break;
                 }
--- a/pcsound/pcsound_sdl.c
+++ b/pcsound/pcsound_sdl.c
@@ -35,10 +35,10 @@
 #define MAX_SOUND_SLICE_TIME 70 /* ms */
 #define SQUARE_WAVE_AMP 0x2000
 
-// If true, we initialised SDL and have the responsibility to shut it 
+// If true, we initialized SDL and have the responsibility to shut it 
 // down
 
-static int sdl_was_initialised = 0;
+static int sdl_was_initialized = 0;
 
 // Callback function to invoke when we want new sound data
 
@@ -146,7 +146,7 @@
     }
 }
 
-static int SDLIsInitialised(void)
+static int SDLIsInitialized(void)
 {
     int freq, channels;
     Uint16 format;
@@ -156,11 +156,11 @@
 
 static void PCSound_SDL_Shutdown(void)
 {
-    if (sdl_was_initialised)
+    if (sdl_was_initialized)
     {
         Mix_CloseAudio();
         SDL_QuitSubSystem(SDL_INIT_AUDIO);
-        sdl_was_initialised = 0;
+        sdl_was_initialized = 0;
     }
 }
 
@@ -196,9 +196,9 @@
     int slicesize;
 
     // Check if SDL_mixer has been opened already
-    // If not, we must initialise it now
+    // If not, we must initialize it now
 
-    if (!SDLIsInitialised())
+    if (!SDLIsInitialized())
     {
         if (SDL_Init(SDL_INIT_AUDIO) < 0)
         {
@@ -210,7 +210,7 @@
 
         if (Mix_OpenAudio(pcsound_sample_rate, AUDIO_S16SYS, 2, slicesize) < 0)
         {
-            fprintf(stderr, "Error initialising SDL_mixer: %s\n", Mix_GetError());
+            fprintf(stderr, "Error initializing SDL_mixer: %s\n", Mix_GetError());
 
             SDL_QuitSubSystem(SDL_INIT_AUDIO);
             return 0;
@@ -221,7 +221,7 @@
         // When this module shuts down, it has the responsibility to 
         // shut down SDL.
 
-        sdl_was_initialised = 1;
+        sdl_was_initialized = 1;
     }
 
     // Get the mixer frequency, format and number of channels.
--- a/setup/joystick.c
+++ b/setup/joystick.c
@@ -34,7 +34,7 @@
     CALIBRATE_UP,
 } calibration_stage_t;
 
-// SDL joystick successfully initialised?
+// SDL joystick successfully initialized?
 
 static int joystick_initted = 0;
 
--- a/setup/mainmenu.c
+++ b/setup/mainmenu.c
@@ -138,7 +138,7 @@
 }
 
 //
-// Initialise all configuration variables, load config file, etc
+// Initialize all configuration variables, load config file, etc
 //
 
 static void InitConfig(void)
@@ -194,7 +194,7 @@
 }
 
 // 
-// Initialise and run the textscreen GUI.
+// Initialize and run the textscreen GUI.
 //
 
 static void RunGUI(void)
@@ -203,7 +203,7 @@
 
     if (!TXT_Init())
     {
-        fprintf(stderr, "Failed to initialise GUI\n");
+        fprintf(stderr, "Failed to initialize GUI\n");
         exit(-1);
     }
 
--- a/setup/multiplayer.c
+++ b/setup/multiplayer.c
@@ -716,7 +716,7 @@
         HUSTR_CHATMACRO0,
     };
     
-    // If the chat macros have not been set, initialise with defaults.
+    // If the chat macros have not been set, initialize with defaults.
 
     for (i=0; i<10; ++i)
     {
--- a/src/d_iwad.c
+++ b/src/d_iwad.c
@@ -19,7 +19,7 @@
 // 02111-1307, USA.
 //
 // DESCRIPTION:
-//     Search for and locate an IWAD file, and initialise according
+//     Search for and locate an IWAD file, and initialize according
 //     to the IWAD type.
 //
 //-----------------------------------------------------------------------------
--- a/src/d_iwad.h
+++ b/src/d_iwad.h
@@ -19,7 +19,7 @@
 // 02111-1307, USA.
 //
 // DESCRIPTION:
-//     Find IWAD and initialise according to IWAD type.
+//     Find IWAD and initialize according to IWAD type.
 //
 //-----------------------------------------------------------------------------
 
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -666,7 +666,7 @@
     { NULL,                  NULL,         0},
 };
 
-// Initialise the game version
+// Initialize the game version
 
 static void InitGameVersion(void)
 {
@@ -1450,7 +1450,7 @@
     I_Init ();
 
 #ifdef FEATURE_MULTIPLAYER
-    printf ("NET_Init: Initialise network subsystem.\n");
+    printf ("NET_Init: Init network subsystem.\n");
     NET_Init ();
 #endif
 
--- a/src/d_net.h
+++ b/src/d_net.h
@@ -47,7 +47,7 @@
 //? how many ticks to run?
 void TryRunTics (void);
 
-// Called at start of game loop to initialise timers
+// Called at start of game loop to initialize timers
 void D_StartGameLoop(void);
 
 extern boolean drone;
--- a/src/deh_defs.h
+++ b/src/deh_defs.h
@@ -41,7 +41,7 @@
 {
     char *name;
 
-    // Called on startup to initialise code
+    // Called on startup to initialize code
 
     deh_section_init_t init;
     
--- a/src/deh_main.c
+++ b/src/deh_main.c
@@ -108,7 +108,7 @@
 
 // Called on startup to call the Init functions
 
-static void InitialiseSections(void)
+static void InitializeSections(void)
 {
     unsigned int i;
 
@@ -383,7 +383,7 @@
     char *filename;
     int p;
 
-    InitialiseSections();
+    InitializeSections();
 
     //!
     // @category mod
--- a/src/deh_ptr.c
+++ b/src/deh_ptr.c
@@ -56,7 +56,7 @@
 {
     int i;
     
-    // Initialise list of dehacked pointers
+    // Initialize list of dehacked pointers
 
     for (i=0; i<NUMSTATES; ++i)
         codeptrs[i] = states[i].action;
--- a/src/deh_text.c
+++ b/src/deh_text.c
@@ -66,7 +66,7 @@
 {
     int entry;
 
-    // Fallback if we have not initialised the hash table yet
+    // Fallback if we have not initialized the hash table yet
 
     if (hash_table_length < 0)
 	return s;
--- a/src/doomdef.h
+++ b/src/doomdef.h
@@ -52,7 +52,7 @@
 //
 // The packed attribute forces structures to be packed into the minimum 
 // space necessary.  If this is not done, the compiler may align structure
-// fields differently to optimise memory access, inflating the overall
+// fields differently to optimize memory access, inflating the overall
 // structure size.  It is important to use the packed attribute on certain
 // structures where alignment is important, particularly data read/written
 // to disk.
--- a/src/i_joystick.c
+++ b/src/i_joystick.c
@@ -115,7 +115,7 @@
 
     SDL_JoystickEventState(SDL_ENABLE);
 
-    // Initialised okay!
+    // Initialized okay!
 
     printf("I_InitJoystick: %s\n", SDL_JoystickName(joystick_index));
 }
--- a/src/i_pcsound.c
+++ b/src/i_pcsound.c
@@ -37,7 +37,7 @@
 
 #include "pcsound.h"
 
-static boolean pcs_initialised = false;
+static boolean pcs_initialized = false;
 
 static SDL_mutex *sound_lock;
 
@@ -151,7 +151,7 @@
 {
     int result;
 
-    if (!pcs_initialised)
+    if (!pcs_initialized)
     {
         return -1;
     }
@@ -192,7 +192,7 @@
 
 static void I_PCS_StopSound(int handle)
 {
-    if (!pcs_initialised)
+    if (!pcs_initialized)
     {
         return;
     }
@@ -229,7 +229,7 @@
 
 static boolean I_PCS_SoundIsPlaying(int handle)
 {
-    if (!pcs_initialised)
+    if (!pcs_initialized)
     {
         return false;
     }
@@ -248,21 +248,21 @@
 
     PCSound_SetSampleRate(snd_samplerate);
 
-    // Initialise the PC speaker subsystem.
+    // Initialize the PC speaker subsystem.
 
-    pcs_initialised = PCSound_Init(PCSCallbackFunc);
+    pcs_initialized = PCSound_Init(PCSCallbackFunc);
 
-    if (pcs_initialised)
+    if (pcs_initialized)
     {
         sound_lock = SDL_CreateMutex();
     }
 
-    return pcs_initialised;
+    return pcs_initialized;
 }
 
 static void I_PCS_ShutdownSound(void)
 {
-    if (pcs_initialised)
+    if (pcs_initialized)
     {
         PCSound_Shutdown();
     }
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -42,12 +42,12 @@
 
 #define MAXMIDLENGTH (96 * 1024)
 
-static boolean music_initialised = false;
+static boolean music_initialized = false;
 
-// If this is true, this module initialised SDL sound and has the 
+// If this is true, this module initialized SDL sound and has the 
 // responsibility to shut it down
 
-static boolean sdl_was_initialised = false;
+static boolean sdl_was_initialized = false;
 
 static boolean musicpaused = false;
 static int current_music_volume;
@@ -56,21 +56,21 @@
 
 static void I_SDL_ShutdownMusic(void)
 {    
-    if (music_initialised)
+    if (music_initialized)
     {
         Mix_HaltMusic();
-        music_initialised = false;
+        music_initialized = false;
 
-        if (sdl_was_initialised)
+        if (sdl_was_initialized)
         {
             Mix_CloseAudio();
             SDL_QuitSubSystem(SDL_INIT_AUDIO);
-            sdl_was_initialised = false;
+            sdl_was_initialized = false;
         }
     }
 }
 
-static boolean SDLIsInitialised(void)
+static boolean SDLIsInitialized(void)
 {
     int freq, channels;
     Uint16 format;
@@ -78,7 +78,7 @@
     return Mix_QuerySpec(&freq, &format, &channels) != 0;
 }
 
-// Initialise music subsystem
+// Initialize music subsystem
 
 static boolean I_SDL_InitMusic(void)
 { 
@@ -93,10 +93,10 @@
            "\n");
 #endif
     
-    // If SDL_mixer is not initialised, we have to initialise it 
+    // If SDL_mixer is not initialized, we have to initialize it
     // and have the responsibility to shut it down later on.
 
-    if (!SDLIsInitialised())
+    if (!SDLIsInitialized())
     {
         if (SDL_Init(SDL_INIT_AUDIO) < 0)
         {
@@ -106,7 +106,7 @@
 
         if (Mix_OpenAudio(snd_samplerate, AUDIO_S16SYS, 2, 1024) < 0)
         {
-            fprintf(stderr, "Error initialising SDL_mixer: %s\n", Mix_GetError());
+            fprintf(stderr, "Error initializing SDL_mixer: %s\n", Mix_GetError());
             SDL_QuitSubSystem(SDL_INIT_AUDIO);
             return false;
         }
@@ -113,10 +113,10 @@
 
         SDL_PauseAudio(0);
 
-        sdl_was_initialised = true;
+        sdl_was_initialized = true;
     }
 
-    music_initialised = true;
+    music_initialized = true;
 
     return true;
 }
@@ -159,7 +159,7 @@
     Mix_Music *music = (Mix_Music *) handle;
     int loops;
 
-    if (!music_initialised)
+    if (!music_initialized)
     {
         return;
     }
@@ -183,7 +183,7 @@
 
 static void I_SDL_PauseSong(void)
 {
-    if (!music_initialised)
+    if (!music_initialized)
     {
         return;
     }
@@ -195,7 +195,7 @@
 
 static void I_SDL_ResumeSong(void)
 {
-    if (!music_initialised)
+    if (!music_initialized)
     {
         return;
     }
@@ -207,7 +207,7 @@
 
 static void I_SDL_StopSong(void)
 {
-    if (!music_initialised)
+    if (!music_initialized)
     {
         return;
     }
@@ -219,7 +219,7 @@
 {
     Mix_Music *music = (Mix_Music *) handle;
 
-    if (!music_initialised)
+    if (!music_initialized)
     {
         return;
     }
@@ -270,7 +270,7 @@
     char *filename;
     Mix_Music *music;
 
-    if (!music_initialised)
+    if (!music_initialized)
     {
         return NULL;
     }
@@ -314,7 +314,7 @@
 // Is the song playing?
 static boolean I_SDL_MusicIsPlaying(void)
 {
-    if (!music_initialised)
+    if (!music_initialized)
     {
         return false;
     }
--- a/src/i_sdlsound.c
+++ b/src/i_sdlsound.c
@@ -52,7 +52,7 @@
 #define MAX_SOUND_SLICE_TIME 70 /* ms */
 #define NUM_CHANNELS 16
 
-static boolean sound_initialised = false;
+static boolean sound_initialized = false;
 
 static Mix_Chunk sound_chunks[NUMSFX];
 static int channels_playing[NUM_CHANNELS];
@@ -180,7 +180,7 @@
     destination->abuf 
         = Z_Malloc(expanded_length, PU_STATIC, &destination->abuf);
 
-    // If we can, use the standard / optimised SDL conversion routines.
+    // If we can, use the standard / optimized SDL conversion routines.
     
     if (samplerate <= mixer_freq
      && ConvertibleRatio(samplerate, mixer_freq)
@@ -548,7 +548,7 @@
 {
     int left, right;
 
-    if (!sound_initialised)
+    if (!sound_initialized)
     {
         return;
     }
@@ -577,7 +577,7 @@
 {
     Mix_Chunk *chunk;
 
-    if (!sound_initialised)
+    if (!sound_initialized)
     {
         return -1;
     }
@@ -611,7 +611,7 @@
 
 static void I_SDL_StopSound (int handle)
 {
-    if (!sound_initialised)
+    if (!sound_initialized)
     {
         return;
     }
@@ -659,7 +659,7 @@
 
 static void I_SDL_ShutdownSound(void)
 {    
-    if (!sound_initialised)
+    if (!sound_initialized)
     {
         return;
     }
@@ -667,7 +667,7 @@
     Mix_CloseAudio();
     SDL_QuitSubSystem(SDL_INIT_AUDIO);
 
-    sound_initialised = false;
+    sound_initialized = false;
 }
 
 // Calculate slice size, based on MAX_SOUND_SLICE_TIME.
@@ -721,7 +721,7 @@
 
     if (Mix_OpenAudio(snd_samplerate, AUDIO_S16SYS, 2, GetSliceSize()) < 0)
     {
-        fprintf(stderr, "Error initialising SDL_mixer: %s\n", Mix_GetError());
+        fprintf(stderr, "Error initializing SDL_mixer: %s\n", Mix_GetError());
         return false;
     }
 
@@ -751,7 +751,7 @@
     
     SDL_PauseAudio(0);
 
-    sound_initialised = true;
+    sound_initialized = true;
 
     return true;
 }
--- a/src/i_timer.c
+++ b/src/i_timer.c
@@ -76,7 +76,7 @@
 
 void I_InitTimer(void)
 {
-    // initialise timer
+    // initialize timer
 
     SDL_Init(SDL_INIT_TIMER);
 }
--- a/src/i_timer.h
+++ b/src/i_timer.h
@@ -38,7 +38,7 @@
 // Pause for a specified number of ms
 void I_Sleep(int ms);
 
-// Initialise timer
+// Initialize timer
 void I_InitTimer(void);
 
 #endif
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -101,7 +101,7 @@
 
 // display has been set up?
 
-static boolean initialised = false;
+static boolean initialized = false;
 
 // disable mouse?
 
@@ -246,7 +246,7 @@
     state = SDL_GetAppState();
 
     // We should have input (keyboard) focus and be visible 
-    // (not minimised)
+    // (not minimized)
 
     window_focused = (state & SDL_APPINPUTFOCUS) && (state & SDL_APPACTIVE);
 
@@ -396,7 +396,7 @@
 
 void I_ShutdownGraphics(void)
 {
-    if (initialised)
+    if (initialized)
     {
         SDL_ShowCursor(1);
         SDL_WM_GrabInput(SDL_GRAB_OFF);
@@ -403,7 +403,7 @@
 
         SDL_QuitSubSystem(SDL_INIT_VIDEO);
     
-        initialised = false;
+        initialized = false;
     }
 }
 
@@ -622,7 +622,7 @@
 //
 void I_StartTic (void)
 {
-    if (!initialised)
+    if (!initialized)
     {
         return;
     }
@@ -741,7 +741,7 @@
                     + (SCREENWIDTH - LOADING_DISK_W);
     int y;
 
-    if (!initialised || disk_image == NULL)
+    if (!initialized || disk_image == NULL)
         return;
 
     // save background and copy the disk image in
@@ -769,7 +769,7 @@
                     + (SCREENWIDTH - LOADING_DISK_W);
     int y;
 
-    if (!initialised || disk_image == NULL)
+    if (!initialized || disk_image == NULL)
         return;
 
     // save background and copy the disk image in
@@ -797,7 +797,7 @@
     int		i;
     // UNUSED static unsigned char *bigscreen=0;
 
-    if (!initialised)
+    if (!initialized)
         return;
 
     if (noblit)
@@ -1500,7 +1500,7 @@
 
     if (SDL_Init(SDL_INIT_VIDEO) < 0) 
     {
-        I_Error("Failed to initialise video: %s", SDL_GetError());
+        I_Error("Failed to initialize video: %s", SDL_GetError());
     }
 
     // Check for command-line video-related parameters.
@@ -1564,6 +1564,8 @@
         flags |= SDL_FULLSCREEN;
     }
 
+    flags |= SDL_NOFRAME;
+
     screen = SDL_SetVideoMode(windowwidth, windowheight, 8, flags);
 
     if (screen == NULL)
@@ -1679,6 +1681,6 @@
         CenterMouse();
     }
 
-    initialised = true;
+    initialized = true;
 }
 
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1152,7 +1152,7 @@
 
     client_context = NET_NewContext();
     
-    // initialise module for client mode
+    // initialize module for client mode
 
     if (!addr->module->InitClient())
     {
@@ -1164,7 +1164,7 @@
     net_client_connected = true;
     net_client_received_wait_data = false;
 
-    // Initialise connection
+    // Initialize connection
 
     NET_Conn_InitClient(&client_connection, addr);
 
--- a/src/net_common.c
+++ b/src/net_common.c
@@ -59,7 +59,7 @@
     conn->reliable_recv_seq = 0;
 }
 
-// Initialise as a client connection
+// Initialize as a client connection
 
 void NET_Conn_InitClient(net_connection_t *conn, net_addr_t *addr)
 {
@@ -67,7 +67,7 @@
     conn->state = NET_CONN_STATE_CONNECTING;
 }
 
-// Initialise as a server connection
+// Initialize as a server connection
 
 void NET_Conn_InitServer(net_connection_t *conn, net_addr_t *addr)
 {
--- a/src/net_defs.h
+++ b/src/net_defs.h
@@ -45,11 +45,11 @@
 
 struct _net_module_s
 {
-    // Initialise this module for use as a client
+    // Initialize this module for use as a client
 
     boolean (*InitClient)(void);
 
-    // Initialise this module for use as a server
+    // Initialize this module for use as a server
 
     boolean (*InitServer)(void);
 
--- a/src/net_gui.c
+++ b/src/net_gui.c
@@ -262,7 +262,7 @@
 {
     if (!TXT_Init())
     {
-        fprintf(stderr, "Failed to initialise GUI\n");
+        fprintf(stderr, "Failed to initialize GUI\n");
         exit(-1);
     }
 
--- a/src/net_loop.c
+++ b/src/net_loop.c
@@ -99,7 +99,7 @@
 
 static boolean NET_CL_InitServer(void)
 {
-    I_Error("NET_CL_InitServer: attempted to initialise client pipe end as a server!");
+    I_Error("NET_CL_InitServer: attempted to initialize client pipe end as a server!");
     return false;
 }
 
@@ -161,7 +161,7 @@
 
 static boolean NET_SV_InitClient(void)
 {
-    I_Error("NET_SV_InitClient: attempted to initialise server pipe end as a client!");
+    I_Error("NET_SV_InitClient: attempted to initialize server pipe end as a client!");
     return false;
 }
 
--- a/src/net_sdl.c
+++ b/src/net_sdl.c
@@ -57,7 +57,7 @@
 static addrpair_t **addr_table;
 static int addr_table_size = -1;
 
-// Initialises the address table
+// Initializes the address table
 
 static void NET_SDL_InitAddrTable(void)
 {
--- a/src/net_server.c
+++ b/src/net_server.c
@@ -119,7 +119,7 @@
 } net_client_recv_t;
 
 static net_server_state_t server_state;
-static boolean server_initialised = false;
+static boolean server_initialized = false;
 static net_client_t clients[MAXNETNODES];
 static net_client_t *sv_players[MAXPLAYERS];
 static net_context_t *server_context;
@@ -612,7 +612,7 @@
             return;
         }
         
-        // Activate, initialise connection
+        // Activate, initialize connection
 
         NET_SV_InitNewClient(client, addr, player_name);
 
@@ -1489,13 +1489,13 @@
     NET_AddModule(server_context, module);
 }
 
-// Initialise server and wait for connections
+// Initialize server and wait for connections
 
 void NET_SV_Init(void)
 {
     int i;
 
-    // initialise send/receive context
+    // initialize send/receive context
 
     server_context = NET_NewContext();
 
@@ -1510,7 +1510,7 @@
 
     server_state = SERVER_WAITING_START;
     sv_gamemode = indetermined;
-    server_initialised = true;
+    server_initialized = true;
 }
 
 // Run server code to check for new packets/send packets as the server
@@ -1522,7 +1522,7 @@
     net_packet_t *packet;
     int i;
 
-    if (!server_initialised)
+    if (!server_initialized)
     {
         return;
     }
@@ -1564,7 +1564,7 @@
     boolean running;
     int start_time;
 
-    if (!server_initialised)
+    if (!server_initialized)
     {
         return;
     }
--- a/src/net_server.h
+++ b/src/net_server.h
@@ -24,7 +24,7 @@
 #ifndef NET_SERVER_H
 #define NET_SERVER_H
 
-// initialise server and wait for connections
+// initialize server and wait for connections
 
 void NET_SV_Init(void);
 
--- a/src/s_sound.c
+++ b/src/s_sound.c
@@ -178,7 +178,7 @@
     return false;
 }
 
-// Find and initialise a sound_module_t appropriate for the setting
+// Find and initialize a sound_module_t appropriate for the setting
 // in snd_sfxdevice.
 
 static void InitSfxModule(void)
@@ -196,7 +196,7 @@
                             sound_modules[i]->sound_devices,
                             sound_modules[i]->num_sound_devices))
         {
-            // Initialise the module
+            // Initialize the module
 
             if (sound_modules[i]->Init())
             {
@@ -207,7 +207,7 @@
     }
 }
 
-// Initialise music according to snd_musicdevice.
+// Initialize music according to snd_musicdevice.
 
 static void InitMusicModule(void)
 {
@@ -224,7 +224,7 @@
                             music_modules[i]->sound_devices,
                             music_modules[i]->num_sound_devices))
         {
-            // Initialise the module
+            // Initialize the module
 
             if (music_modules[i]->Init())
             {
@@ -270,7 +270,7 @@
 
     nomusic = M_CheckParm("-nomusic") > 0;
 
-    // Initialise the sound and music subsystems.
+    // Initialize the sound and music subsystems.
 
     if (!nosound && !screensaver_mode)
     {
--- a/src/s_sound.h
+++ b/src/s_sound.h
@@ -54,8 +54,8 @@
     snddevice_t *sound_devices;
     int num_sound_devices;
 
-    // Initialise sound module
-    // Returns true if successfully initialised
+    // Initialize sound module
+    // Returns true if successfully initialized
 
     boolean (*Init)(void);
 
@@ -99,7 +99,7 @@
     snddevice_t *sound_devices;
     int num_sound_devices;
 
-    // Initialise the music subsystem
+    // Initialize the music subsystem
 
     boolean (*Init)(void);
 
--- a/src/w_merge.c
+++ b/src/w_merge.c
@@ -143,7 +143,7 @@
     SetupList(&pwad_sprites, &pwad, "S_START", "S_END", "SS_START", "SS_END");
 }
 
-// Initialise the replace list
+// Initialize the replace list
 
 static void InitSpriteList(void)
 {
--- a/textscreen/txt_desktop.c
+++ b/textscreen/txt_desktop.c
@@ -61,7 +61,7 @@
     num_windows = to;
 }
 
-static void DrawDesktopBackground(char *title)
+static void DrawDesktopBackground(const char *title)
 {
     int i;
     unsigned char *screendata;
@@ -117,7 +117,7 @@
 void TXT_DrawDesktop(void)
 {
     int i;
-    char *title;
+    const char *title;
 
     TXT_InitClipArea();
 
--- a/textscreen/txt_dropdown.c
+++ b/textscreen/txt_dropdown.c
@@ -193,7 +193,7 @@
 {
     TXT_CAST_ARG(txt_dropdown_list_t, list);
     unsigned int i;
-    char *str;
+    const char *str;
 
     // Set bg/fg text colors.
 
--- a/textscreen/txt_gui.c
+++ b/textscreen/txt_gui.c
@@ -55,7 +55,7 @@
 #define VALID_X(x) ((x) >= cliparea->x1 && (x) < cliparea->x2)
 #define VALID_Y(y) ((y) >= cliparea->y1 && (y) < cliparea->y2)
 
-void TXT_DrawDesktopBackground(char *title)
+void TXT_DrawDesktopBackground(const char *title)
 {
     int i;
     unsigned char *screendata;
@@ -125,7 +125,7 @@
     }
 }
 
-void TXT_DrawWindowFrame(char *title, int x, int y, int w, int h)
+void TXT_DrawWindowFrame(const char *title, int x, int y, int w, int h)
 {
     int x1, y1;
     int bx, by;
@@ -224,11 +224,11 @@
     }
 }
 
-void TXT_DrawString(char *s)
+void TXT_DrawString(const char *s)
 {
     int x, y;
     int x1;
-    char *p;
+    const char *p;
 
     TXT_GetXY(&x, &y);
 
--- a/textscreen/txt_gui.h
+++ b/textscreen/txt_gui.h
@@ -27,10 +27,10 @@
 #ifndef TXT_GUI_H
 #define TXT_GUI_H
 
-void TXT_DrawDesktopBackground(char *title);
-void TXT_DrawWindowFrame(char *title, int x, int y, int w, int h);
+void TXT_DrawDesktopBackground(const char *title);
+void TXT_DrawWindowFrame(const char *title, int x, int y, int w, int h);
 void TXT_DrawSeparator(int x, int y, int w);
-void TXT_DrawString(char *s);
+void TXT_DrawString(const char *s);
 
 void TXT_DrawHorizScrollbar(int x, int y, int w, int cursor, int range);
 void TXT_DrawVertScrollbar(int x, int y, int h, int cursor, int range);
--- a/textscreen/txt_inputbox.c
+++ b/textscreen/txt_inputbox.c
@@ -53,7 +53,7 @@
 
     w = inputbox->widget.w;
 
-    // Select the background colour based on whether we are currently
+    // Select the background color based on whether we are currently
     // editing, and if not, whether the widget is selected.
 
     if (inputbox->editing && selected)
--- a/textscreen/txt_io.c
+++ b/textscreen/txt_io.c
@@ -33,7 +33,7 @@
 static struct 
 {
     txt_color_t color;
-    char *name;
+    const char *name;
 } colors[] = {
     {TXT_COLOR_BLACK,           "black"},
     {TXT_COLOR_BLUE,            "blue"},
@@ -147,11 +147,11 @@
     PutChar(screen, c);
 }
 
-void TXT_Puts(char *s)
+void TXT_Puts(const char *s)
 {
     int previous_color = TXT_COLOR_BLACK;
     unsigned char *screen;
-    char *p;
+    const char *p;
     char colorname_buf[20];
     char *ending;
     int col;
--- a/textscreen/txt_io.h
+++ b/textscreen/txt_io.h
@@ -30,7 +30,7 @@
 #include "txt_main.h"
 
 void TXT_PutChar(int c);
-void TXT_Puts(char *s);
+void TXT_Puts(const char *s);
 void TXT_GotoXY(int x, int y);
 void TXT_GetXY(int *x, int *y);
 void TXT_FGColor(txt_color_t color);
--- a/textscreen/txt_main.h
+++ b/textscreen/txt_main.h
@@ -67,7 +67,7 @@
     TXT_COLOR_BRIGHT_WHITE,
 } txt_color_t;
 
-// Initialise the screen
+// Initialize the screen
 // Returns 1 if successful, 0 if failed.
 
 int TXT_Init(void);
--- a/textscreen/txt_sdl.c
+++ b/textscreen/txt_sdl.c
@@ -162,7 +162,7 @@
 }
 
 //
-// Initialise text mode screen
+// Initialize text mode screen
 //
 // Returns 1 if successful, 0 if an error occurred
 //
@@ -217,7 +217,7 @@
     unsigned char *p;
     unsigned char *s, *s1;
     int bg, fg;
-    int x1, y1;
+    unsigned int x1, y1;
 
     p = &screendata[(y * TXT_SCREEN_W + x) * 2];
     character = p[0];
@@ -458,7 +458,7 @@
     return -1;
 }
 
-static char *SpecialKeyName(int key)
+static const char *SpecialKeyName(int key)
 {
     switch (key)
     {
@@ -524,7 +524,7 @@
 
 void TXT_GetKeyDescription(int key, char *buf)
 {
-    char *keyname;
+    const char *keyname;
 
     keyname = SpecialKeyName(key);
 
--- a/textscreen/txt_widget.c
+++ b/textscreen/txt_widget.c
@@ -94,7 +94,7 @@
 }
 
 void TXT_SignalConnect(TXT_UNCAST_ARG(widget),
-                       char *signal_name,
+                       const char *signal_name,
                        TxtWidgetSignalFunc func, 
                        void *user_data)
 {
@@ -117,7 +117,7 @@
     callback->user_data = user_data;
 }
 
-void TXT_EmitSignal(TXT_UNCAST_ARG(widget), char *signal_name)
+void TXT_EmitSignal(TXT_UNCAST_ARG(widget), const char *signal_name)
 {
     TXT_CAST_ARG(txt_widget_t, widget);
     txt_callback_table_t *table;
--- a/textscreen/txt_widget.h
+++ b/textscreen/txt_widget.h
@@ -106,7 +106,7 @@
 void TXT_InitWidget(TXT_UNCAST_ARG(widget), txt_widget_class_t *widget_class);
 void TXT_CalcWidgetSize(TXT_UNCAST_ARG(widget));
 void TXT_DrawWidget(TXT_UNCAST_ARG(widget), int selected);
-void TXT_EmitSignal(TXT_UNCAST_ARG(widget), char *signal_name);
+void TXT_EmitSignal(TXT_UNCAST_ARG(widget), const char *signal_name);
 int TXT_WidgetKeyPress(TXT_UNCAST_ARG(widget), int key);
 void TXT_WidgetMousePress(TXT_UNCAST_ARG(widget), int x, int y, int b);
 void TXT_DestroyWidget(TXT_UNCAST_ARG(widget));
@@ -121,7 +121,7 @@
  * @param user_data    User-specified pointer to pass to the callback function.
  */
 
-void TXT_SignalConnect(TXT_UNCAST_ARG(widget), char *signal_name,
+void TXT_SignalConnect(TXT_UNCAST_ARG(widget), const char *signal_name,
                        TxtWidgetSignalFunc func, void *user_data);
 
 /**
--- a/textscreen/txt_window_action.c
+++ b/textscreen/txt_window_action.c
@@ -101,7 +101,7 @@
     NULL,
 };
 
-txt_window_action_t *TXT_NewWindowAction(int key, char *label)
+txt_window_action_t *TXT_NewWindowAction(int key, const char *label)
 {
     txt_window_action_t *action;
 
--- a/textscreen/txt_window_action.h
+++ b/textscreen/txt_window_action.h
@@ -59,7 +59,7 @@
  * @return              Pointer to the new window action widget.
  */
 
-txt_window_action_t *TXT_NewWindowAction(int key, char *label);
+txt_window_action_t *TXT_NewWindowAction(int key, const char *label);
 
 /**
  * Create a new window action that closes the window when the