]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
indentation consistency mostly
authordrjaska <drjaska83@gmail.com>
Sat, 13 May 2023 21:10:40 +0000 (00:10 +0300)
committerdrjaska <drjaska83@gmail.com>
Sat, 13 May 2023 21:15:19 +0000 (00:15 +0300)
Signed-off-by: drjaska <drjaska83@gmail.com>
16 files changed:
cl_video.h
cl_video_jamdecode.c
crypto-keygen-standalone.c
jpeg.c
mdfour.c
menu.c
model_brush.c
model_iqm.h
model_shared.c
model_shared.h
mvm_cmds.c
netconn.c
prvm_cmds.c
r_shadow.c
snd_oss.c
sv_phys.c

index 7c6140fa26545a34e5b028d2156bac69d48924b3..806358f605778449920835f5c599407d0fa988f2 100644 (file)
@@ -68,7 +68,7 @@ typedef struct clvideo_s
 
        // if a video is suspended, it is automatically paused (else we'd still have to process the frames)
        // used to determine whether the video's resources should be freed or not
-    double  lasttime;
+       double  lasttime;
        // when lasttime - realtime > THRESHOLD, all but the stream is freed
        qbool suspended;
 
index 3cd7b817acbe6de3a2b13823a89518f79359c9ab..3da95a1b3bf7cce30d12d4973b68a73d2155f7b9 100644 (file)
@@ -125,11 +125,11 @@ void *jam_open(clvideo_t *video, char *filename, const char **errorstring)
        s->frame_output = AvCodec_AllocFrame();
        s->frame_output_scale = AvCodec_AllocFrame();
        if (!s->frame_output_buffer || !s->frame_output || !s->frame_output_scale)
-    {
+       {
                *errorstring = "JamDecoder: failed to allocate LibAvcodec frame";
                jam_close(s);
                Z_Free(s);
-        return NULL;
+               return NULL;
        }
 #endif
 
index d9206915a775453043d36bc3817e9f0fccd362da..5bf61cc33423fd6e9bba36acafeff01d3c6acc3d 100644 (file)
@@ -200,7 +200,7 @@ void USAGE(const char *me)
                        "%s -p public.d0pk -I idkey.d0si -d file-to-sign.dat -O signature.dat\n"
                        "%s -p public.d0pk -d file-to-sign.dat -s signature.dat [-O id.d0pi]\n",
                        me, me, me, me, me, me, me, me, me, me, me, me, me, me, me, me, me, me
-                  );
+                       );
 }
 
 unsigned int seconds;
diff --git a/jpeg.c b/jpeg.c
index beab84335221c9ad4e3f06cb4e765fdc8bbc45b8..34ac192ad24d476aec68dd0829cf1d4e1796a989 100644 (file)
--- a/jpeg.c
+++ b/jpeg.c
@@ -105,20 +105,20 @@ typedef unsigned int JDIMENSION;
 
 struct jpeg_memory_mgr
 {
-  void* (*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject);
-  void (*_reserve_space_for_alloc_large) (void *dummy, ...);
-  void (*_reserve_space_for_alloc_sarray) (void *dummy, ...);
-  void (*_reserve_space_for_alloc_barray) (void *dummy, ...);
-  void (*_reserve_space_for_request_virt_sarray) (void *dummy, ...);
-  void (*_reserve_space_for_request_virt_barray) (void *dummy, ...);
-  void (*_reserve_space_for_realize_virt_arrays) (void *dummy, ...);
-  void (*_reserve_space_for_access_virt_sarray) (void *dummy, ...);
-  void (*_reserve_space_for_access_virt_barray) (void *dummy, ...);
-  void (*_reserve_space_for_free_pool) (void *dummy, ...);
-  void (*_reserve_space_for_self_destruct) (void *dummy, ...);
-
-  long max_memory_to_use;
-  long max_alloc_chunk;
+       void* (*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject);
+       void (*_reserve_space_for_alloc_large) (void *dummy, ...);
+       void (*_reserve_space_for_alloc_sarray) (void *dummy, ...);
+       void (*_reserve_space_for_alloc_barray) (void *dummy, ...);
+       void (*_reserve_space_for_request_virt_sarray) (void *dummy, ...);
+       void (*_reserve_space_for_request_virt_barray) (void *dummy, ...);
+       void (*_reserve_space_for_realize_virt_arrays) (void *dummy, ...);
+       void (*_reserve_space_for_access_virt_sarray) (void *dummy, ...);
+       void (*_reserve_space_for_access_virt_barray) (void *dummy, ...);
+       void (*_reserve_space_for_free_pool) (void *dummy, ...);
+       void (*_reserve_space_for_self_destruct) (void *dummy, ...);
+
+       long max_memory_to_use;
+       long max_alloc_chunk;
 };
 
 struct jpeg_error_mgr
@@ -155,68 +155,68 @@ struct jpeg_source_mgr
 };
 
 typedef struct {
-  /* These values are fixed over the whole image. */
-  /* For compression, they must be supplied by parameter setup; */
-  /* for decompression, they are read from the SOF marker. */
-  int component_id;             /* identifier for this component (0..255) */
-  int component_index;          /* its index in SOF or cinfo->comp_info[] */
-  int h_samp_factor;            /* horizontal sampling factor (1..4) */
-  int v_samp_factor;            /* vertical sampling factor (1..4) */
-  int quant_tbl_no;             /* quantization table selector (0..3) */
-  /* These values may vary between scans. */
-  /* For compression, they must be supplied by parameter setup; */
-  /* for decompression, they are read from the SOS marker. */
-  /* The decompressor output side may not use these variables. */
-  int dc_tbl_no;                /* DC entropy table selector (0..3) */
-  int ac_tbl_no;                /* AC entropy table selector (0..3) */
-
-  /* Remaining fields should be treated as private by applications. */
-
-  /* These values are computed during compression or decompression startup: */
-  /* Component's size in DCT blocks.
-   * Any dummy blocks added to complete an MCU are not counted; therefore
-   * these values do not depend on whether a scan is interleaved or not.
-   */
-  JDIMENSION width_in_blocks;
-  JDIMENSION height_in_blocks;
-  /* Size of a DCT block in samples.  Always DCTSIZE for compression.
-   * For decompression this is the size of the output from one DCT block,
-   * reflecting any scaling we choose to apply during the IDCT step.
-   * Values of 1,2,4,8 are likely to be supported.  Note that different
-   * components may receive different IDCT scalings.
-   */
-  int DCT_scaled_size;
-  /* The downsampled dimensions are the component's actual, unpadded number
-   * of samples at the main buffer (preprocessing/compression interface), thus
-   * downsampled_width = ceil(image_width * Hi/Hmax)
-   * and similarly for height.  For decompression, IDCT scaling is included, so
-   * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE)
-   */
-  JDIMENSION downsampled_width;  /* actual width in samples */
-  JDIMENSION downsampled_height; /* actual height in samples */
-  /* This flag is used only for decompression.  In cases where some of the
-   * components will be ignored (eg grayscale output from YCbCr image),
-   * we can skip most computations for the unused components.
-   */
-  jboolean component_needed;     /* do we need the value of this component? */
-
-  /* These values are computed before starting a scan of the component. */
-  /* The decompressor output side may not use these variables. */
-  int MCU_width;                /* number of blocks per MCU, horizontally */
-  int MCU_height;               /* number of blocks per MCU, vertically */
-  int MCU_blocks;               /* MCU_width * MCU_height */
-  int MCU_sample_width;         /* MCU width in samples, MCU_width*DCT_scaled_size */
-  int last_col_width;           /* # of non-dummy blocks across in last MCU */
-  int last_row_height;          /* # of non-dummy blocks down in last MCU */
-
-  /* Saved quantization table for component; NULL if none yet saved.
-   * See jdinput.c comments about the need for this information.
-   * This field is currently used only for decompression.
-   */
-  void *quant_table;
-
-  /* Private per-component storage for DCT or IDCT subsystem. */
-  void * dct_table;
+       /* These values are fixed over the whole image. */
+       /* For compression, they must be supplied by parameter setup; */
+       /* for decompression, they are read from the SOF marker. */
+       int component_id;             /* identifier for this component (0..255) */
+       int component_index;          /* its index in SOF or cinfo->comp_info[] */
+       int h_samp_factor;            /* horizontal sampling factor (1..4) */
+       int v_samp_factor;            /* vertical sampling factor (1..4) */
+       int quant_tbl_no;             /* quantization table selector (0..3) */
+       /* These values may vary between scans. */
+       /* For compression, they must be supplied by parameter setup; */
+       /* for decompression, they are read from the SOS marker. */
+       /* The decompressor output side may not use these variables. */
+       int dc_tbl_no;                /* DC entropy table selector (0..3) */
+       int ac_tbl_no;                /* AC entropy table selector (0..3) */
+
+       /* Remaining fields should be treated as private by applications. */
+
+       /* These values are computed during compression or decompression startup: */
+       /* Component's size in DCT blocks.
+        * Any dummy blocks added to complete an MCU are not counted; therefore
+        * these values do not depend on whether a scan is interleaved or not.
+        */
+       JDIMENSION width_in_blocks;
+       JDIMENSION height_in_blocks;
+       /* Size of a DCT block in samples.  Always DCTSIZE for compression.
+        * For decompression this is the size of the output from one DCT block,
+        * reflecting any scaling we choose to apply during the IDCT step.
+        * Values of 1,2,4,8 are likely to be supported.  Note that different
+        * components may receive different IDCT scalings.
+        */
+       int DCT_scaled_size;
+       /* The downsampled dimensions are the component's actual, unpadded number
+        * of samples at the main buffer (preprocessing/compression interface), thus
+        * downsampled_width = ceil(image_width * Hi/Hmax)
+        * and similarly for height.  For decompression, IDCT scaling is included, so
+        * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE)
+        */
+       JDIMENSION downsampled_width;  /* actual width in samples */
+       JDIMENSION downsampled_height; /* actual height in samples */
+       /* This flag is used only for decompression.  In cases where some of the
+        * components will be ignored (eg grayscale output from YCbCr image),
+        * we can skip most computations for the unused components.
+        */
+       jboolean component_needed;     /* do we need the value of this component? */
+
+       /* These values are computed before starting a scan of the component. */
+       /* The decompressor output side may not use these variables. */
+       int MCU_width;                /* number of blocks per MCU, horizontally */
+       int MCU_height;               /* number of blocks per MCU, vertically */
+       int MCU_blocks;               /* MCU_width * MCU_height */
+       int MCU_sample_width;         /* MCU width in samples, MCU_width*DCT_scaled_size */
+       int last_col_width;           /* # of non-dummy blocks across in last MCU */
+       int last_row_height;          /* # of non-dummy blocks down in last MCU */
+
+       /* Saved quantization table for component; NULL if none yet saved.
+        * See jdinput.c comments about the need for this information.
+        * This field is currently used only for decompression.
+        */
+       void *quant_table;
+
+       /* Private per-component storage for DCT or IDCT subsystem. */
+       void * dct_table;
 } jpeg_component_info;
 
 struct jpeg_decompress_struct
@@ -556,23 +556,23 @@ static void JPEG_Noop (j_decompress_ptr cinfo) {}
 
 static jboolean JPEG_FillInputBuffer (j_decompress_ptr cinfo)
 {
-    // Insert a fake EOI marker
-    cinfo->src->next_input_byte = jpeg_eoi_marker;
-    cinfo->src->bytes_in_buffer = 2;
+       // Insert a fake EOI marker
+       cinfo->src->next_input_byte = jpeg_eoi_marker;
+       cinfo->src->bytes_in_buffer = 2;
 
        return true;
 }
 
 static void JPEG_SkipInputData (j_decompress_ptr cinfo, long num_bytes)
 {
-    if (cinfo->src->bytes_in_buffer <= (unsigned long)num_bytes)
+       if (cinfo->src->bytes_in_buffer <= (unsigned long)num_bytes)
        {
                cinfo->src->bytes_in_buffer = 0;
                return;
        }
 
-    cinfo->src->next_input_byte += num_bytes;
-    cinfo->src->bytes_in_buffer -= num_bytes;
+       cinfo->src->next_input_byte += num_bytes;
+       cinfo->src->bytes_in_buffer -= num_bytes;
 }
 
 static void JPEG_MemSrc (j_decompress_ptr cinfo, const unsigned char *buffer, size_t filesize)
@@ -1066,7 +1066,7 @@ qbool Image_Compress(const char *imagename, size_t maxsize, void **buf, size_t *
        {
                *size = i->compressed_size;
                *buf = i->compressed;
-        return (*buf != NULL);
+               return (*buf != NULL);
        }
 
        // load the image
index ae92e3758af2ac487f1b732662fe731a6d1cda79..8e34a349cdb5b69c77f2d2b94813b175a911c6dc 100644 (file)
--- a/mdfour.c
+++ b/mdfour.c
@@ -59,31 +59,31 @@ static void mdfour64(struct mdfour_s *md, uint32_t *M)
        A = md->A; B = md->B; C = md->C; D = md->D;
        AA = A; BB = B; CC = C; DD = D;
 
-        ROUND1(A,B,C,D,  0,  3);  ROUND1(D,A,B,C,  1,  7);
+       ROUND1(A,B,C,D,  0,  3);  ROUND1(D,A,B,C,  1,  7);
        ROUND1(C,D,A,B,  2, 11);  ROUND1(B,C,D,A,  3, 19);
-        ROUND1(A,B,C,D,  4,  3);  ROUND1(D,A,B,C,  5,  7);
+       ROUND1(A,B,C,D,  4,  3);  ROUND1(D,A,B,C,  5,  7);
        ROUND1(C,D,A,B,  6, 11);  ROUND1(B,C,D,A,  7, 19);
-        ROUND1(A,B,C,D,  8,  3);  ROUND1(D,A,B,C,  9,  7);
+       ROUND1(A,B,C,D,  8,  3);  ROUND1(D,A,B,C,  9,  7);
        ROUND1(C,D,A,B, 10, 11);  ROUND1(B,C,D,A, 11, 19);
-        ROUND1(A,B,C,D, 12,  3);  ROUND1(D,A,B,C, 13,  7);
+       ROUND1(A,B,C,D, 12,  3);  ROUND1(D,A,B,C, 13,  7);
        ROUND1(C,D,A,B, 14, 11);  ROUND1(B,C,D,A, 15, 19);
 
-        ROUND2(A,B,C,D,  0,  3);  ROUND2(D,A,B,C,  4,  5);
+       ROUND2(A,B,C,D,  0,  3);  ROUND2(D,A,B,C,  4,  5);
        ROUND2(C,D,A,B,  8,  9);  ROUND2(B,C,D,A, 12, 13);
-        ROUND2(A,B,C,D,  1,  3);  ROUND2(D,A,B,C,  5,  5);
+       ROUND2(A,B,C,D,  1,  3);  ROUND2(D,A,B,C,  5,  5);
        ROUND2(C,D,A,B,  9,  9);  ROUND2(B,C,D,A, 13, 13);
-        ROUND2(A,B,C,D,  2,  3);  ROUND2(D,A,B,C,  6,  5);
+       ROUND2(A,B,C,D,  2,  3);  ROUND2(D,A,B,C,  6,  5);
        ROUND2(C,D,A,B, 10,  9);  ROUND2(B,C,D,A, 14, 13);
-        ROUND2(A,B,C,D,  3,  3);  ROUND2(D,A,B,C,  7,  5);
+       ROUND2(A,B,C,D,  3,  3);  ROUND2(D,A,B,C,  7,  5);
        ROUND2(C,D,A,B, 11,  9);  ROUND2(B,C,D,A, 15, 13);
 
        ROUND3(A,B,C,D,  0,  3);  ROUND3(D,A,B,C,  8,  9);
        ROUND3(C,D,A,B,  4, 11);  ROUND3(B,C,D,A, 12, 15);
-        ROUND3(A,B,C,D,  2,  3);  ROUND3(D,A,B,C, 10,  9);
+       ROUND3(A,B,C,D,  2,  3);  ROUND3(D,A,B,C, 10,  9);
        ROUND3(C,D,A,B,  6, 11);  ROUND3(B,C,D,A, 14, 15);
-        ROUND3(A,B,C,D,  1,  3);  ROUND3(D,A,B,C,  9,  9);
+       ROUND3(A,B,C,D,  1,  3);  ROUND3(D,A,B,C,  9,  9);
        ROUND3(C,D,A,B,  5, 11);  ROUND3(B,C,D,A, 13, 15);
-        ROUND3(A,B,C,D,  3,  3);  ROUND3(D,A,B,C, 11,  9);
+       ROUND3(A,B,C,D,  3,  3);  ROUND3(D,A,B,C, 11,  9);
        ROUND3(C,D,A,B,  7, 11);  ROUND3(B,C,D,A, 15, 15);
 
        A += AA; B += BB; C += CC; D += DD;
@@ -197,7 +197,7 @@ void mdfour(unsigned char *out, const unsigned char *in, int n)
 unsigned Com_BlockChecksum (void *buffer, int length)
 {
        int                             digest[4];
-       unsigned                val;
+       unsigned                val;
 
        mdfour ( (unsigned char *) digest, (unsigned char *) buffer, length );
 
diff --git a/menu.c b/menu.c
index 8b41f28919ce8c1e0f48d0170618b857f660d668..4b8ee4b2f27918a20facab56205b0f07c93ffc44 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -106,7 +106,7 @@ static void M_GameOptions_Key(cmd_state_t *cmd, int key, int ascii);
 static void M_ServerList_Key(cmd_state_t *cmd, int key, int ascii);
 static void M_ModList_Key(cmd_state_t *cmd, int key, int ascii);
 
-static qbool   m_entersound;           ///< play after drawing a frame, so caching won't disrupt the sound
+static qbool m_entersound;  ///< play after drawing a frame, so caching won't disrupt the sound
 
 void M_Update_Return_Reason(const char *s)
 {
@@ -115,8 +115,8 @@ void M_Update_Return_Reason(const char *s)
                Con_DPrintf("%s\n", s);
 }
 
-#define StartingGame   (m_multiplayer_cursor == 1)
-#define JoiningGame            (m_multiplayer_cursor == 0)
+#define StartingGame (m_multiplayer_cursor == 1)
+#define JoiningGame  (m_multiplayer_cursor == 0)
 
 // Nehahra
 #define NumberOfNehahraDemos 34
@@ -354,7 +354,7 @@ static void M_Demo_Key (cmd_state_t *cmd, int k, int ascii)
 //=============================================================================
 /* MAIN MENU */
 
-static int     m_main_cursor;
+static int   m_main_cursor;
 static qbool m_missingdata = false;
 
 static int MAIN_ITEMS = 4; // Nehahra: Menu Disable
@@ -431,8 +431,8 @@ void M_Menu_Main_f(cmd_state_t *cmd)
 
 static void M_Main_Draw (void)
 {
-       int             f;
-       cachepic_t      *p;
+       int  f;
+       cachepic_t *p;
        char vabuf[1024];
 
        if (m_missingdata)
@@ -506,7 +506,7 @@ static void M_Main_Key(cmd_state_t *cmd, int key, int ascii)
                m_state = m_none;
                //cls.demonum = m_save_demonum;
                //if (cls.demonum != -1 && !cls.demoplayback && cls.state != ca_connected)
-               //      CL_NextDemo ();
+               //  CL_NextDemo ();
                break;
 
        case K_DOWNARROW:
@@ -731,8 +731,8 @@ static void M_Main_Key(cmd_state_t *cmd, int key, int ascii)
 //=============================================================================
 /* SINGLE PLAYER MENU */
 
-static int     m_singleplayer_cursor;
-#define        SINGLEPLAYER_ITEMS      3
+static int m_singleplayer_cursor;
+#define SINGLEPLAYER_ITEMS 3
 
 
 void M_Menu_SinglePlayer_f(cmd_state_t *cmd)
@@ -745,7 +745,7 @@ void M_Menu_SinglePlayer_f(cmd_state_t *cmd)
 
 static void M_SinglePlayer_Draw (void)
 {
-       cachepic_t      *p;
+       cachepic_t *p;
        char vabuf[1024];
 
        M_Background(320, 200);
@@ -767,7 +767,7 @@ static void M_SinglePlayer_Draw (void)
        }
        else
        {
-               int             f;
+               int f;
 
                M_DrawPic ( (320-Draw_GetPicWidth(p))/2, 4, "gfx/ttl_sgl");
                M_DrawPic (72, 32, "gfx/sp_menu");
@@ -841,20 +841,20 @@ static void M_SinglePlayer_Key(cmd_state_t *cmd, int key, int ascii)
 //=============================================================================
 /* LOAD/SAVE MENU */
 
-static int             load_cursor;            ///< 0 < load_cursor < MAX_SAVEGAMES
+static int  load_cursor;  ///< 0 < load_cursor < MAX_SAVEGAMES
 
-static char    m_filenames[MAX_SAVEGAMES][SAVEGAME_COMMENT_LENGTH+1];
-static int             loadable[MAX_SAVEGAMES];
+static char m_filenames[MAX_SAVEGAMES][SAVEGAME_COMMENT_LENGTH+1];
+static int  loadable[MAX_SAVEGAMES];
 
 static void M_ScanSaves (void)
 {
-       int             i, j;
-       size_t  len;
-       char    name[MAX_OSPATH];
-       char    buf[SAVEGAME_COMMENT_LENGTH + 256];
+       int     i, j;
+       size_t  len;
+       char    name[MAX_OSPATH];
+       char    buf[SAVEGAME_COMMENT_LENGTH + 256];
        const char *t;
-       qfile_t *f;
-//     int             version;
+       qfile_t *f;
+//     int     version;
 
        for (i=0 ; i<MAX_SAVEGAMES ; i++)
        {
@@ -917,8 +917,8 @@ void M_Menu_Save_f(cmd_state_t *cmd)
 
 static void M_Load_Draw (void)
 {
-       int             i;
-       cachepic_t      *p;
+       int i;
+       cachepic_t *p;
 
        M_Background(320, 200);
 
@@ -935,8 +935,8 @@ static void M_Load_Draw (void)
 
 static void M_Save_Draw (void)
 {
-       int             i;
-       cachepic_t      *p;
+       int i;
+       cachepic_t *p;
 
        M_Background(320, 200);
 
@@ -1032,8 +1032,8 @@ static void M_Save_Key(cmd_state_t *cmd, int k, int ascii)
 //=============================================================================
 /* Transfusion Single Player Episode Menu */
 
-static int     m_episode_cursor;
-#define        EPISODE_ITEMS   6
+static int m_episode_cursor;
+#define EPISODE_ITEMS 6
 
 void M_Menu_Transfusion_Episode_f(cmd_state_t *cmd)
 {
@@ -1090,8 +1090,8 @@ static void M_Transfusion_Episode_Key(cmd_state_t *cmd, int key, int ascii)
 //=============================================================================
 /* Transfusion Single Player Skill Menu */
 
-static int     m_skill_cursor = 2;
-#define        SKILL_ITEMS     5
+static int m_skill_cursor = 2;
+#define SKILL_ITEMS 5
 
 void M_Menu_Transfusion_Skill_f(cmd_state_t *cmd)
 {
@@ -1103,7 +1103,7 @@ void M_Menu_Transfusion_Skill_f(cmd_state_t *cmd)
 static void M_Transfusion_Skill_Draw (void)
 {
        int y;
-       cachepic_t      *p;
+       cachepic_t *p;
        char vabuf[1024];
        M_Background(640, 480);
 
@@ -1191,8 +1191,8 @@ static void M_Transfusion_Skill_Key(cmd_state_t *cmd, int key, int ascii)
 //=============================================================================
 /* MULTIPLAYER MENU */
 
-static int     m_multiplayer_cursor;
-#define        MULTIPLAYER_ITEMS       3
+static int m_multiplayer_cursor;
+#define MULTIPLAYER_ITEMS 3
 
 
 void M_Menu_MultiPlayer_f(cmd_state_t *cmd)
@@ -1205,8 +1205,8 @@ void M_Menu_MultiPlayer_f(cmd_state_t *cmd)
 
 static void M_MultiPlayer_Draw (void)
 {
-       int             f;
-       cachepic_t      *p;
+       int  f;
+       cachepic_t *p;
        char vabuf[1024];
 
        if (gamemode == GAME_TRANSFUSION)
@@ -1271,18 +1271,18 @@ static void M_MultiPlayer_Key(cmd_state_t *cmd, int key, int ascii)
 //=============================================================================
 /* SETUP MENU */
 
-static int             setup_cursor = 4;
-static int             setup_cursor_table[] = {40, 64, 88, 124, 140};
+static int  setup_cursor = 4;
+static int  setup_cursor_table[] = {40, 64, 88, 124, 140};
 
-static char    setup_myname[MAX_SCOREBOARDNAME];
-static int             setup_oldtop;
-static int             setup_oldbottom;
-static int             setup_top;
-static int             setup_bottom;
-static int             setup_rate;
-static int             setup_oldrate;
+static char setup_myname[MAX_SCOREBOARDNAME];
+static int  setup_oldtop;
+static int  setup_oldbottom;
+static int  setup_top;
+static int  setup_bottom;
+static int  setup_rate;
+static int  setup_oldrate;
 
-#define        NUM_SETUP_CMDS  5
+#define NUM_SETUP_CMDS 5
 
 extern cvar_t cl_topcolor;
 extern cvar_t cl_bottomcolor;
@@ -1338,7 +1338,7 @@ static int setup_rateindex(int rate)
 static void M_Setup_Draw (void)
 {
        int i, j;
-       cachepic_t      *p;
+       cachepic_t *p;
        char vabuf[1024];
 
        M_Background(320, 200);
@@ -1431,7 +1431,7 @@ static void M_Setup_Draw (void)
 
 static void M_Setup_Key(cmd_state_t *cmd, int k, int ascii)
 {
-       int                     l;
+       int  l;
        char vabuf[1024];
 
        switch (k)
@@ -1542,7 +1542,7 @@ forward:
 //=============================================================================
 /* OPTIONS MENU */
 
-#define        SLIDER_RANGE    10
+#define SLIDER_RANGE 10
 
 static void M_DrawSlider (int x, int y, float num, float rangemin, float rangemax)
 {
@@ -1673,7 +1673,7 @@ static void M_Options_PrintSlider(const char *s, int enabled, float value, float
 static void M_Options_Draw (void)
 {
        int visible;
-       cachepic_t      *p;
+       cachepic_t *p;
 
        M_Background(320, bound(200, 32 + OPTIONS_ITEMS * 8, vid_conheight.integer));
 
@@ -1805,7 +1805,7 @@ static void M_Options_Key(cmd_state_t *cmd, int k, int ascii)
        }
 }
 
-#define        OPTIONS_EFFECTS_ITEMS   35
+#define OPTIONS_EFFECTS_ITEMS 35
 
 static int options_effects_cursor;
 
@@ -1880,7 +1880,7 @@ static void M_Menu_Options_Effects_AdjustSliders (int dir)
 static void M_Options_Effects_Draw (void)
 {
        int visible;
-       cachepic_t      *p;
+       cachepic_t *p;
 
        M_Background(320, bound(200, 32 + OPTIONS_EFFECTS_ITEMS * 8, vid_conheight.integer));
 
@@ -1968,7 +1968,7 @@ static void M_Options_Effects_Key(cmd_state_t *cmd, int k, int ascii)
 }
 
 
-#define        OPTIONS_GRAPHICS_ITEMS  20
+#define OPTIONS_GRAPHICS_ITEMS 20
 
 static int options_graphics_cursor;
 
@@ -2003,23 +2003,23 @@ static void M_Menu_Options_Graphics_AdjustSliders (cmd_state_t *cmd, int dir)
 
        optnum = 0;
 
-            if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_coronas, bound(0, r_coronas.value + dir * 0.125, 4));
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&gl_flashblend, !gl_flashblend.integer);
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_gloss,                                                      bound(0, r_shadow_gloss.integer + dir, 2));
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_dlight,                            !r_shadow_realtime_dlight.integer);
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_dlight_shadows,            !r_shadow_realtime_dlight_shadows.integer);
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world,                                     !r_shadow_realtime_world.integer);
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_lightmaps,           bound(0, r_shadow_realtime_world_lightmaps.value + dir * 0.1, 1));
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_shadows,                     !r_shadow_realtime_world_shadows.integer);
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom,                                 !r_bloom.integer);
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_hdr_scenebrightness,                   bound(0.25, r_hdr_scenebrightness.value + dir * 0.125, 4));
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_hdr_glowintensity,                     bound(0, r_hdr_glowintensity.value + dir * 0.25, 4));
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_colorscale,                      bound(0.0625, r_bloom_colorscale.value + dir * 0.0625, 1));
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_colorsubtract,                   bound(0, r_bloom_colorsubtract.value + dir * 0.0625, 1-0.0625));
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_colorexponent,                   bound(1, r_bloom_colorexponent.value * (dir > 0 ? 2.0 : 0.5), 8));
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_brighten,                        bound(1, r_bloom_brighten.value + dir * 0.0625, 4));
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_blur,                            bound(1, r_bloom_blur.value + dir * 1, 16));
-       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_resolution,                      bound(64, r_bloom_resolution.value + dir * 64, 2048));
+            if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_coronas,                            bound(0, r_coronas.value + dir * 0.125, 4));
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&gl_flashblend,                        !gl_flashblend.integer);
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_gloss,                       bound(0, r_shadow_gloss.integer + dir, 2));
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_dlight,             !r_shadow_realtime_dlight.integer);
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_dlight_shadows,     !r_shadow_realtime_dlight_shadows.integer);
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world,              !r_shadow_realtime_world.integer);
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_lightmaps,    bound(0, r_shadow_realtime_world_lightmaps.value + dir * 0.1, 1));
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_shadow_realtime_world_shadows,      !r_shadow_realtime_world_shadows.integer);
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom,                              !r_bloom.integer);
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_hdr_scenebrightness,                bound(0.25, r_hdr_scenebrightness.value + dir * 0.125, 4));
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_hdr_glowintensity,                  bound(0, r_hdr_glowintensity.value + dir * 0.25, 4));
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_colorscale,                   bound(0.0625, r_bloom_colorscale.value + dir * 0.0625, 1));
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_colorsubtract,                bound(0, r_bloom_colorsubtract.value + dir * 0.0625, 1-0.0625));
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_colorexponent,                bound(1, r_bloom_colorexponent.value * (dir > 0 ? 2.0 : 0.5), 8));
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_brighten,                     bound(1, r_bloom_brighten.value + dir * 0.0625, 4));
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_blur,                         bound(1, r_bloom_blur.value + dir * 1, 16));
+       else if (options_graphics_cursor == optnum++) Cvar_SetValueQuick (&r_bloom_resolution,                   bound(64, r_bloom_resolution.value + dir * 64, 2048));
        else if (options_graphics_cursor == optnum++) Cbuf_AddText(cmd, "r_restart\n");
 }
 
@@ -2027,7 +2027,7 @@ static void M_Menu_Options_Graphics_AdjustSliders (cmd_state_t *cmd, int dir)
 static void M_Options_Graphics_Draw (void)
 {
        int visible;
-       cachepic_t      *p;
+       cachepic_t *p;
 
        M_Background(320, bound(200, 32 + OPTIONS_GRAPHICS_ITEMS * 8, vid_conheight.integer));
 
@@ -2098,9 +2098,9 @@ static void M_Options_Graphics_Key (cmd_state_t *cmd, int k, int ascii)
 }
 
 
-#define        OPTIONS_COLORCONTROL_ITEMS      18
+#define OPTIONS_COLORCONTROL_ITEMS 18
 
-static int             options_colorcontrol_cursor;
+static int options_colorcontrol_cursor;
 
 // intensity value to match up to 50% dither to 'correct' quake
 static cvar_t menu_options_colorcontrol_correctionvalue = {CF_CLIENT, "menu_options_colorcontrol_correctionvalue", "0.5", "intensity value that matches up to white/black dither pattern, should be 0.5 for linear color"};
@@ -2215,7 +2215,7 @@ static void M_Options_ColorControl_Draw (void)
        int visible;
        float x, s, t, u, v;
        float c[3];
-       cachepic_t      *p, *dither;
+       cachepic_t *p, *dither;
 
        dither = Draw_CachePic_Flags ("gfx/colorcontrol/ditherpattern", CACHEPICFLAG_NOCLAMP);
 
@@ -2352,106 +2352,106 @@ static void M_Options_ColorControl_Key(cmd_state_t *cmd, int k, int ascii)
 
 static const char *quakebindnames[][2] =
 {
-{"+attack",            "attack"},
-{"impulse 10",                 "next weapon"},
-{"impulse 12",                 "previous weapon"},
-{"+jump",                      "jump / swim up"},
-{"+forward",           "walk forward"},
-{"+back",                      "backpedal"},
-{"+left",                      "turn left"},
-{"+right",                     "turn right"},
-{"+speed",                     "run"},
-{"+moveleft",          "step left"},
-{"+moveright",                 "step right"},
-{"+strafe",            "sidestep"},
-{"+lookup",            "look up"},
-{"+lookdown",          "look down"},
-{"centerview",                 "center view"},
-{"+mlook",                     "mouse look"},
-{"+klook",                     "keyboard look"},
-{"+moveup",                    "swim up"},
-{"+movedown",          "swim down"}
+{"+attack",     "attack"},
+{"impulse 10",  "next weapon"},
+{"impulse 12",  "previous weapon"},
+{"+jump",       "jump / swim up"},
+{"+forward",    "walk forward"},
+{"+back",       "backpedal"},
+{"+left",       "turn left"},
+{"+right",      "turn right"},
+{"+speed",      "run"},
+{"+moveleft",   "step left"},
+{"+moveright",  "step right"},
+{"+strafe",     "sidestep"},
+{"+lookup",     "look up"},
+{"+lookdown",   "look down"},
+{"centerview",  "center view"},
+{"+mlook",      "mouse look"},
+{"+klook",      "keyboard look"},
+{"+moveup",     "swim up"},
+{"+movedown",   "swim down"}
 };
 
 static const char *transfusionbindnames[][2] =
 {
-{"",                           "Movement"},            // Movement commands
-{"+forward",           "walk forward"},
-{"+back",                      "backpedal"},
-{"+left",                      "turn left"},
-{"+right",                     "turn right"},
-{"+moveleft",          "step left"},
-{"+moveright",                 "step right"},
-{"+jump",                      "jump / swim up"},
-{"+movedown",          "swim down"},
-{"",                           "Combat"},                      // Combat commands
-{"impulse 1",          "Pitch Fork"},
-{"impulse 2",          "Flare Gun"},
-{"impulse 3",          "Shotgun"},
-{"impulse 4",          "Machine Gun"},
-{"impulse 5",          "Incinerator"},
-{"impulse 6",          "Bombs (TNT)"},
-{"impulse 35",         "Proximity Bomb"},
-{"impulse 36",         "Remote Detonator"},
-{"impulse 7",          "Aerosol Can"},
-{"impulse 8",          "Tesla Cannon"},
-{"impulse 9",          "Life Leech"},
-{"impulse 10",         "Voodoo Doll"},
-{"impulse 21",         "next weapon"},
-{"impulse 22",         "previous weapon"},
-{"+attack",            "attack"},
-{"+button3",           "altfire"},
-{"",                           "Inventory"},           // Inventory commands
-{"impulse 40",         "Dr.'s Bag"},
-{"impulse 41",         "Crystal Ball"},
-{"impulse 42",         "Beast Vision"},
-{"impulse 43",         "Jump Boots"},
-{"impulse 23",         "next item"},
-{"impulse 24",         "previous item"},
-{"impulse 25",         "use item"},
-{"",                           "Misc"},                        // Misc commands
-{"+button4",           "use"},
-{"impulse 50",         "add bot (red)"},
-{"impulse 51",         "add bot (blue)"},
-{"impulse 52",         "kick a bot"},
-{"impulse 26",         "next armor type"},
-{"impulse 27",         "identify player"},
-{"impulse 55",         "voting menu"},
-{"impulse 56",         "observer mode"},
-{"",                           "Taunts"},            // Taunts
-{"impulse 70",         "taunt 0"},
-{"impulse 71",         "taunt 1"},
-{"impulse 72",         "taunt 2"},
-{"impulse 73",         "taunt 3"},
-{"impulse 74",         "taunt 4"},
-{"impulse 75",         "taunt 5"},
-{"impulse 76",         "taunt 6"},
-{"impulse 77",         "taunt 7"},
-{"impulse 78",         "taunt 8"},
-{"impulse 79",         "taunt 9"}
+{"",            "Movement"},          // Movement commands
+{"+forward",    "walk forward"},
+{"+back",       "backpedal"},
+{"+left",       "turn left"},
+{"+right",      "turn right"},
+{"+moveleft",   "step left"},
+{"+moveright",  "step right"},
+{"+jump",       "jump / swim up"},
+{"+movedown",   "swim down"},
+{"",            "Combat"},            // Combat commands
+{"impulse 1",   "Pitch Fork"},
+{"impulse 2",   "Flare Gun"},
+{"impulse 3",   "Shotgun"},
+{"impulse 4",   "Machine Gun"},
+{"impulse 5",   "Incinerator"},
+{"impulse 6",   "Bombs (TNT)"},
+{"impulse 35",  "Proximity Bomb"},
+{"impulse 36",  "Remote Detonator"},
+{"impulse 7",   "Aerosol Can"},
+{"impulse 8",   "Tesla Cannon"},
+{"impulse 9",   "Life Leech"},
+{"impulse 10",  "Voodoo Doll"},
+{"impulse 21",  "next weapon"},
+{"impulse 22",  "previous weapon"},
+{"+attack",     "attack"},
+{"+button3",    "altfire"},
+{"",            "Inventory"},         // Inventory commands
+{"impulse 40",  "Dr.'s Bag"},
+{"impulse 41",  "Crystal Ball"},
+{"impulse 42",  "Beast Vision"},
+{"impulse 43",  "Jump Boots"},
+{"impulse 23",  "next item"},
+{"impulse 24",  "previous item"},
+{"impulse 25",  "use item"},
+{"",            "Misc"},              // Misc commands
+{"+button4",    "use"},
+{"impulse 50",  "add bot (red)"},
+{"impulse 51",  "add bot (blue)"},
+{"impulse 52",  "kick a bot"},
+{"impulse 26",  "next armor type"},
+{"impulse 27",  "identify player"},
+{"impulse 55",  "voting menu"},
+{"impulse 56",  "observer mode"},
+{"",            "Taunts"},            // Taunts
+{"impulse 70",  "taunt 0"},
+{"impulse 71",  "taunt 1"},
+{"impulse 72",  "taunt 2"},
+{"impulse 73",  "taunt 3"},
+{"impulse 74",  "taunt 4"},
+{"impulse 75",  "taunt 5"},
+{"impulse 76",  "taunt 6"},
+{"impulse 77",  "taunt 7"},
+{"impulse 78",  "taunt 8"},
+{"impulse 79",  "taunt 9"}
 };
 
 static const char *goodvsbad2bindnames[][2] =
 {
-{"impulse 69",         "Power 1"},
-{"impulse 70",         "Power 2"},
-{"impulse 71",         "Power 3"},
-{"+jump",                      "jump / swim up"},
-{"+forward",           "walk forward"},
-{"+back",                      "backpedal"},
-{"+left",                      "turn left"},
-{"+right",                     "turn right"},
-{"+speed",                     "run"},
-{"+moveleft",          "step left"},
-{"+moveright",                 "step right"},
-{"+strafe",            "sidestep"},
-{"+lookup",            "look up"},
-{"+lookdown",          "look down"},
-{"centerview",                 "center view"},
-{"+mlook",                     "mouse look"},
-{"kill",                       "kill yourself"},
-{"+moveup",                    "swim up"},
-{"+movedown",          "swim down"}
+{"impulse 69",  "Power 1"},
+{"impulse 70",  "Power 2"},
+{"impulse 71",  "Power 3"},
+{"+jump",       "jump / swim up"},
+{"+forward",    "walk forward"},
+{"+back",       "backpedal"},
+{"+left",       "turn left"},
+{"+right",      "turn right"},
+{"+speed",      "run"},
+{"+moveleft",   "step left"},
+{"+moveright",  "step right"},
+{"+strafe",     "sidestep"},
+{"+lookup",     "look up"},
+{"+lookdown",   "look down"},
+{"centerview",  "center view"},
+{"+mlook",      "mouse look"},
+{"kill",        "kill yourself"},
+{"+moveup",     "swim up"},
+{"+movedown",   "swim down"}
 };
 
 static int numcommands;
@@ -2548,8 +2548,8 @@ static void M_DefaultBinds (void)
 */
 
 
-static int             keys_cursor;
-static int             bind_grab;
+static int keys_cursor;
+static int bind_grab;
 
 void M_Menu_Keys_f(cmd_state_t *cmd)
 {
@@ -2589,8 +2589,8 @@ void M_Menu_Keys_f(cmd_state_t *cmd)
 
 static void M_UnbindCommand (const char *command)
 {
-       int             j;
-       const char      *b;
+       int j;
+       const char *b;
 
        for (j = 0; j < (int)sizeof (keybindings[0]) / (int)sizeof (keybindings[0][0]); j++)
        {
@@ -2605,11 +2605,11 @@ static void M_UnbindCommand (const char *command)
 
 static void M_Keys_Draw (void)
 {
-       int             i, j;
-       int             keys[NUMKEYS];
-       int             y;
-       cachepic_t      *p;
-       char    keystring[MAX_INPUTLINE];
+       int  i, j;
+       int  keys[NUMKEYS];
+       int  y;
+       cachepic_t *p;
+       char keystring[MAX_INPUTLINE];
 
        M_Background(320, 48 + 8 * numcommands);
 
@@ -2667,12 +2667,12 @@ static void M_Keys_Draw (void)
 
 static void M_Keys_Key(cmd_state_t *cmd, int k, int ascii)
 {
-       char    line[80];
-       int             keys[NUMKEYS];
-       char    tinystr[TINYSTR_LEN];
+       char line[80];
+       int  keys[NUMKEYS];
+       char tinystr[TINYSTR_LEN];
 
        if (bind_grab)
-       {       // defining a key
+       { // defining a key
                S_LocalSound ("sound/misc/menu1.wav");
                if (k == K_ESCAPE)
                {
@@ -2718,7 +2718,7 @@ static void M_Keys_Key(cmd_state_t *cmd, int k, int ascii)
                while (bindnames[keys_cursor][0][0] == '\0');  // skip sections
                break;
 
-       case K_ENTER:           // go into bind mode
+       case K_ENTER:      // go into bind mode
                Key_FindKeysForCommand (bindnames[keys_cursor][0], keys, NUMKEYS, 0);
                S_LocalSound ("sound/misc/menu2.wav");
                if (keys[NUMKEYS - 1] != -1)
@@ -2726,8 +2726,8 @@ static void M_Keys_Key(cmd_state_t *cmd, int k, int ascii)
                bind_grab = true;
                break;
 
-       case K_BACKSPACE:               // delete bindings
-       case K_DEL:                             // delete bindings
+       case K_BACKSPACE:  // delete bindings
+       case K_DEL:        // delete bindings
                S_LocalSound ("sound/misc/menu2.wav");
                M_UnbindCommand (bindnames[keys_cursor][0]);
                break;
@@ -2911,7 +2911,7 @@ void M_Menu_Video_f(cmd_state_t *cmd)
 static void M_Video_Draw (void)
 {
        int t;
-       cachepic_t      *p;
+       cachepic_t *p;
        char vabuf[1024];
 
        if(!!vid_fullscreen.integer != menu_video_resolutions_forfullscreen)
@@ -2925,7 +2925,7 @@ static void M_Video_Draw (void)
 
        M_DrawPic(16, 4, "gfx/qplaque");
        p = Draw_CachePic ("gfx/vidmodes");
-       M_DrawPic((320-Draw_GetPicWidth(p))/2, 4, "gfx/vidmodes");
+       M_DrawPic((320 - Draw_GetPicWidth(p)) / 2, 4, "gfx/vidmodes");
 
        t = 0;
 
@@ -3089,8 +3089,8 @@ static void M_Video_Key(cmd_state_t *cmd, int key, int ascii)
 //=============================================================================
 /* HELP MENU */
 
-static int             help_page;
-#define        NUM_HELP_PAGES  6
+static int help_page;
+#define NUM_HELP_PAGES 6
 
 
 void M_Menu_Help_f(cmd_state_t *cmd)
@@ -3167,8 +3167,8 @@ static void M_Credits_Key(cmd_state_t *cmd, int key, int ascii)
 /* QUIT MENU */
 
 static const char *m_quit_message[9];
-static int             m_quit_prevstate;
-static qbool   wasInMenus;
+static int         m_quit_prevstate;
+static qbool       wasInMenus;
 
 
 static int M_QuitMessage(const char *line1, const char *line2, const char *line3, const char *line4, const char *line5, const char *line6, const char *line7, const char *line8)
@@ -3321,13 +3321,13 @@ static void M_Quit_Draw (void)
 //=============================================================================
 /* LAN CONFIG MENU */
 
-static int             lanConfig_cursor = -1;
-static int             lanConfig_cursor_table [] = {56, 76, 84, 120};
-#define NUM_LANCONFIG_CMDS     4
+static int  lanConfig_cursor = -1;
+static int  lanConfig_cursor_table [] = {56, 76, 84, 120};
+#define NUM_LANCONFIG_CMDS 4
 
-static int     lanConfig_port;
-static char    lanConfig_portname[6];
-static char    lanConfig_joinname[40];
+static int  lanConfig_port;
+static char lanConfig_portname[6];
+static char lanConfig_joinname[40];
 
 void M_Menu_LanConfig_f(cmd_state_t *cmd)
 {
@@ -3350,10 +3350,10 @@ void M_Menu_LanConfig_f(cmd_state_t *cmd)
 
 static void M_LanConfig_Draw (void)
 {
-       cachepic_t      *p;
-       int             basex;
-       const char      *startJoin;
-       const char      *protocol;
+       cachepic_t *p;
+       int basex;
+       const char *startJoin;
+       const char *protocol;
        char vabuf[1024];
 
        M_Background(320, 200);
@@ -3404,7 +3404,7 @@ static void M_LanConfig_Draw (void)
 
 static void M_LanConfig_Key(cmd_state_t *cmd, int key, int ascii)
 {
-       int             l;
+       int  l;
        char vabuf[1024];
 
        switch (key)
@@ -3518,15 +3518,15 @@ static void M_LanConfig_Key(cmd_state_t *cmd, int key, int ascii)
 
 typedef struct level_s
 {
-       const char      *name;
-       const char      *description;
+       const char *name;
+       const char *description;
 } level_t;
 
 typedef struct episode_s
 {
-       const char      *description;
-       int             firstLevel;
-       int             levels;
+       const char *description;
+       int firstLevel;
+       int levels;
 } episode_t;
 
 typedef struct gamelevels_s
@@ -3538,55 +3538,55 @@ typedef struct gamelevels_s
 }
 gamelevels_t;
 
-static level_t quakelevels[] =
-{
-       {"start", "Entrance"},  // 0
-
-       {"e1m1", "Slipgate Complex"},                           // 1
-       {"e1m2", "Castle of the Damned"},
-       {"e1m3", "The Necropolis"},
-       {"e1m4", "The Grisly Grotto"},
-       {"e1m5", "Gloom Keep"},
-       {"e1m6", "The Door To Chthon"},
-       {"e1m7", "The House of Chthon"},
-       {"e1m8", "Ziggurat Vertigo"},
-
-       {"e2m1", "The Installation"},                           // 9
-       {"e2m2", "Ogre Citadel"},
-       {"e2m3", "Crypt of Decay"},
-       {"e2m4", "The Ebon Fortress"},
-       {"e2m5", "The Wizard's Manse"},
-       {"e2m6", "The Dismal Oubliette"},
-       {"e2m7", "Underearth"},
-
-       {"e3m1", "Termination Central"},                        // 16
-       {"e3m2", "The Vaults of Zin"},
-       {"e3m3", "The Tomb of Terror"},
-       {"e3m4", "Satan's Dark Delight"},
-       {"e3m5", "Wind Tunnels"},
-       {"e3m6", "Chambers of Torment"},
-       {"e3m7", "The Haunted Halls"},
-
-       {"e4m1", "The Sewage System"},                          // 23
-       {"e4m2", "The Tower of Despair"},
-       {"e4m3", "The Elder God Shrine"},
-       {"e4m4", "The Palace of Hate"},
-       {"e4m5", "Hell's Atrium"},
-       {"e4m6", "The Pain Maze"},
-       {"e4m7", "Azure Agony"},
-       {"e4m8", "The Nameless City"},
-
-       {"end", "Shub-Niggurath's Pit"},                        // 31
-
-       {"dm1", "Place of Two Deaths"},                         // 32
-       {"dm2", "Claustrophobopolis"},
-       {"dm3", "The Abandoned Base"},
-       {"dm4", "The Bad Place"},
-       {"dm5", "The Cistern"},
-       {"dm6", "The Dark Zone"}
+static level_t     quakelevels[] =
+{
+       {"start",      "Entrance"},              // 0
+
+       {"e1m1",       "Slipgate Complex"},      // 1
+       {"e1m2",       "Castle of the Damned"},
+       {"e1m3",       "The Necropolis"},
+       {"e1m4",       "The Grisly Grotto"},
+       {"e1m5",       "Gloom Keep"},
+       {"e1m6",       "The Door To Chthon"},
+       {"e1m7",       "The House of Chthon"},
+       {"e1m8",       "Ziggurat Vertigo"},
+
+       {"e2m1",       "The Installation"},      // 9
+       {"e2m2",       "Ogre Citadel"},
+       {"e2m3",       "Crypt of Decay"},
+       {"e2m4",       "The Ebon Fortress"},
+       {"e2m5",       "The Wizard's Manse"},
+       {"e2m6",       "The Dismal Oubliette"},
+       {"e2m7",       "Underearth"},
+
+       {"e3m1",       "Termination Central"},   // 16
+       {"e3m2",       "The Vaults of Zin"},
+       {"e3m3",       "The Tomb of Terror"},
+       {"e3m4",       "Satan's Dark Delight"},
+       {"e3m5",       "Wind Tunnels"},
+       {"e3m6",       "Chambers of Torment"},
+       {"e3m7",       "The Haunted Halls"},
+
+       {"e4m1",       "The Sewage System"},     // 23
+       {"e4m2",       "The Tower of Despair"},
+       {"e4m3",       "The Elder God Shrine"},
+       {"e4m4",       "The Palace of Hate"},
+       {"e4m5",       "Hell's Atrium"},
+       {"e4m6",       "The Pain Maze"},
+       {"e4m7",       "Azure Agony"},
+       {"e4m8",       "The Nameless City"},
+
+       {"end",        "Shub-Niggurath's Pit"},  // 31
+
+       {"dm1",        "Place of Two Deaths"},   // 32
+       {"dm2",        "Claustrophobopolis"},
+       {"dm3",        "The Abandoned Base"},
+       {"dm4",        "The Bad Place"},
+       {"dm5",        "The Cistern"},
+       {"dm6",        "The Dark Zone"}
 };
 
-static episode_t quakeepisodes[] =
+static episode_t   quakeepisodes[] =
 {
        {"Welcome to Quake", 0, 1},
        {"Doomed Dimension", 1, 8},
@@ -3600,68 +3600,68 @@ static episode_t quakeepisodes[] =
  //MED 01/06/97 added hipnotic levels
 static level_t     hipnoticlevels[] =
 {
-   {"start", "Command HQ"},  // 0
+       {"start",      "Command HQ"},  // 0
 
-   {"hip1m1", "The Pumping Station"},          // 1
-   {"hip1m2", "Storage Facility"},
-   {"hip1m3", "The Lost Mine"},
-   {"hip1m4", "Research Facility"},
-   {"hip1m5", "Military Complex"},
+       {"hip1m1",     "The Pumping Station"},   // 1
+       {"hip1m2",     "Storage Facility"},
+       {"hip1m3",     "The Lost Mine"},
+       {"hip1m4",     "Research Facility"},
+       {"hip1m5",     "Military Complex"},
 
-   {"hip2m1", "Ancient Realms"},          // 6
-   {"hip2m2", "The Black Cathedral"},
-   {"hip2m3", "The Catacombs"},
-   {"hip2m4", "The Crypt"},
-   {"hip2m5", "Mortum's Keep"},
-   {"hip2m6", "The Gremlin's Domain"},
+       {"hip2m1",     "Ancient Realms"},        // 6
+       {"hip2m2",     "The Black Cathedral"},
+       {"hip2m3",     "The Catacombs"},
+       {"hip2m4",     "The Crypt"},
+       {"hip2m5",     "Mortum's Keep"},
+       {"hip2m6",     "The Gremlin's Domain"},
 
-   {"hip3m1", "Tur Torment"},       // 12
-   {"hip3m2", "Pandemonium"},
-   {"hip3m3", "Limbo"},
-   {"hip3m4", "The Gauntlet"},
+       {"hip3m1",     "Tur Torment"},           // 12
+       {"hip3m2",     "Pandemonium"},
+       {"hip3m3",     "Limbo"},
+       {"hip3m4",     "The Gauntlet"},
 
-   {"hipend", "Armagon's Lair"},       // 16
+       {"hipend",     "Armagon's Lair"},        // 16
 
-   {"hipdm1", "The Edge of Oblivion"}           // 17
+       {"hipdm1",     "The Edge of Oblivion"}   // 17
 };
 
 //MED 01/06/97  added hipnotic episodes
-static episode_t   hipnoticepisodes[] =
-{
-   {"Scourge of Armagon", 0, 1},
-   {"Fortress of the Dead", 1, 5},
-   {"Dominion of Darkness", 6, 6},
-   {"The Rift", 12, 4},
-   {"Final Level", 16, 1},
-   {"Deathmatch Arena", 17, 1}
+static episode_t hipnoticepisodes[] =
+{
+       {"Scourge of Armagon", 0, 1},
+       {"Fortress of the Dead", 1, 5},
+       {"Dominion of Darkness", 6, 6},
+       {"The Rift", 12, 4},
+       {"Final Level", 16, 1},
+       {"Deathmatch Arena", 17, 1}
 };
 
 //PGM 01/07/97 added rogue levels
 //PGM 03/02/97 added dmatch level
-static level_t         roguelevels[] =
-{
-       {"start",       "Split Decision"},
-       {"r1m1",        "Deviant's Domain"},
-       {"r1m2",        "Dread Portal"},
-       {"r1m3",        "Judgement Call"},
-       {"r1m4",        "Cave of Death"},
-       {"r1m5",        "Towers of Wrath"},
-       {"r1m6",        "Temple of Pain"},
-       {"r1m7",        "Tomb of the Overlord"},
-       {"r2m1",        "Tempus Fugit"},
-       {"r2m2",        "Elemental Fury I"},
-       {"r2m3",        "Elemental Fury II"},
-       {"r2m4",        "Curse of Osiris"},
-       {"r2m5",        "Wizard's Keep"},
-       {"r2m6",        "Blood Sacrifice"},
-       {"r2m7",        "Last Bastion"},
-       {"r2m8",        "Source of Evil"},
-       {"ctf1",    "Division of Change"}
+static level_t     roguelevels[] =
+{
+       {"start",      "Split Decision"},
+       {"r1m1",       "Deviant's Domain"},
+       {"r1m2",       "Dread Portal"},
+       {"r1m3",       "Judgement Call"},
+       {"r1m4",       "Cave of Death"},
+       {"r1m5",       "Towers of Wrath"},
+       {"r1m6",       "Temple of Pain"},
+       {"r1m7",       "Tomb of the Overlord"},
+       {"r2m1",       "Tempus Fugit"},
+       {"r2m2",       "Elemental Fury I"},
+       {"r2m3",       "Elemental Fury II"},
+       {"r2m4",       "Curse of Osiris"},
+       {"r2m5",       "Wizard's Keep"},
+       {"r2m6",       "Blood Sacrifice"},
+       {"r2m7",       "Last Bastion"},
+       {"r2m8",       "Source of Evil"},
+       {"ctf1",       "Division of Change"}
 };
 
 //PGM 01/07/97 added rogue episodes
 //PGM 03/02/97 added dmatch episode
-static episode_t       rogueepisodes[] =
+static episode_t   rogueepisodes[] =
 {
        {"Introduction", 0, 1},
        {"Hell's Fortress", 1, 7},
@@ -3669,30 +3669,30 @@ static episode_t        rogueepisodes[] =
        {"Deathmatch Arena", 16, 1}
 };
 
-static level_t         nehahralevels[] =
-{
-       {"nehstart",    "Welcome to Nehahra"},
-       {"neh1m1",      "Forge City1: Slipgates"},
-       {"neh1m2",      "Forge City2: Boiler"},
-       {"neh1m3",      "Forge City3: Escape"},
-       {"neh1m4",      "Grind Core"},
-       {"neh1m5",      "Industrial Silence"},
-       {"neh1m6",      "Locked-Up Anger"},
-       {"neh1m7",      "Wanderer of the Wastes"},
-       {"neh1m8",      "Artemis System Net"},
-       {"neh1m9",      "To the Death"},
-       {"neh2m1",      "The Gates of Ghoro"},
-       {"neh2m2",      "Sacred Trinity"},
-       {"neh2m3",      "Realm of the Ancients"},
-       {"neh2m4",      "Temple of the Ancients"},
-       {"neh2m5",      "Dreams Made Flesh"},
-       {"neh2m6",      "Your Last Cup of Sorrow"},
-       {"nehsec",      "Ogre's Bane"},
-       {"nehahra",     "Nehahra's Den"},
-       {"nehend",      "Quintessence"}
+static level_t     nehahralevels[] =
+{
+       {"nehstart",   "Welcome to Nehahra"},
+       {"neh1m1",     "Forge City1: Slipgates"},
+       {"neh1m2",     "Forge City2: Boiler"},
+       {"neh1m3",     "Forge City3: Escape"},
+       {"neh1m4",     "Grind Core"},
+       {"neh1m5",     "Industrial Silence"},
+       {"neh1m6",     "Locked-Up Anger"},
+       {"neh1m7",     "Wanderer of the Wastes"},
+       {"neh1m8",     "Artemis System Net"},
+       {"neh1m9",     "To the Death"},
+       {"neh2m1",     "The Gates of Ghoro"},
+       {"neh2m2",     "Sacred Trinity"},
+       {"neh2m3",     "Realm of the Ancients"},
+       {"neh2m4",     "Temple of the Ancients"},
+       {"neh2m5",     "Dreams Made Flesh"},
+       {"neh2m6",     "Your Last Cup of Sorrow"},
+       {"nehsec",     "Ogre's Bane"},
+       {"nehahra",    "Nehahra's Den"},
+       {"nehend",     "Quintessence"}
 };
 
-static episode_t       nehahraepisodes[] =
+static episode_t nehahraepisodes[] =
 {
        {"Welcome to Nehahra", 0, 1},
        {"The Fall of Forge", 1, 9},
@@ -3701,115 +3701,115 @@ static episode_t      nehahraepisodes[] =
 };
 
 // Map list for Transfusion
-static level_t         transfusionlevels[] =
-{
-       {"e1m1",                "Cradle to Grave"},
-       {"e1m2",                "Wrong Side of the Tracks"},
-       {"e1m3",                "Phantom Express"},
-       {"e1m4",                "Dark Carnival"},
-       {"e1m5",                "Hallowed Grounds"},
-       {"e1m6",                "The Great Temple"},
-       {"e1m7",                "Altar of Stone"},
-       {"e1m8",                "House of Horrors"},
-
-       {"e2m1",                "Shipwrecked"},
-       {"e2m2",                "The Lumber Mill"},
-       {"e2m3",                "Rest for the Wicked"},
-       {"e2m4",                "The Overlooked Hotel"},
-       {"e2m5",                "The Haunting"},
-       {"e2m6",                "The Cold Rush"},
-       {"e2m7",                "Bowels of the Earth"},
-       {"e2m8",                "The Lair of Shial"},
-       {"e2m9",                "Thin Ice"},
-
-       {"e3m1",                "Ghost Town"},
-       {"e3m2",                "The Siege"},
-       {"e3m3",                "Raw Sewage"},
-       {"e3m4",                "The Sick Ward"},
-       {"e3m5",                "Spare Parts"},
-       {"e3m6",                "Monster Bait"},
-       {"e3m7",                "The Pit of Cerberus"},
-       {"e3m8",                "Catacombs"},
-
-       {"e4m1",                "Butchery Loves Company"},
-       {"e4m2",                "Breeding Grounds"},
-       {"e4m3",                "Charnel House"},
-       {"e4m4",                "Crystal Lake"},
-       {"e4m5",                "Fire and Brimstone"},
-       {"e4m6",                "The Ganglion Depths"},
-       {"e4m7",                "In the Flesh"},
-       {"e4m8",                "The Hall of the Epiphany"},
-       {"e4m9",                "Mall of the Dead"},
-
-       {"bb1",                 "The Stronghold"},
-       {"bb2",                 "Winter Wonderland"},
-       {"bb3",                 "Bodies"},
-       {"bb4",                 "The Tower"},
-       {"bb5",                 "Click!"},
-       {"bb6",                 "Twin Fortress"},
-       {"bb7",                 "Midgard"},
-       {"bb8",                 "Fun With Heads"},
-       {"dm1",                 "Monolith Building 11"},
-       {"dm2",                 "Power!"},
-       {"dm3",                 "Area 15"},
-
-       {"e6m1",                "Welcome to Your Life"},
-       {"e6m2",                "They Are Here"},
-       {"e6m3",                "Public Storage"},
-       {"e6m4",                "Aqueducts"},
-       {"e6m5",                "The Ruined Temple"},
-       {"e6m6",                "Forbidden Rituals"},
-       {"e6m7",                "The Dungeon"},
-       {"e6m8",                "Beauty and the Beast"},
-       {"e6m9",                "Forgotten Catacombs"},
-
-       {"cp01",                "Boat Docks"},
-       {"cp02",                "Old Opera House"},
-       {"cp03",                "Gothic Library"},
-       {"cp04",                "Lost Monastery"},
-       {"cp05",                "Steamboat"},
-       {"cp06",                "Graveyard"},
-       {"cp07",                "Mountain Pass"},
-       {"cp08",                "Abysmal Mine"},
-       {"cp09",                "Castle"},
-       {"cps1",                "Boggy Creek"},
-
-       {"cpbb01",              "Crypt of Despair"},
-       {"cpbb02",              "Pits of Blood"},
-       {"cpbb03",              "Unholy Cathedral"},
-       {"cpbb04",              "Deadly Inspirations"},
-
-       {"b2a15",               "Area 15 (B2)"},
-       {"b2bodies",    "BB_Bodies (B2)"},
-       {"b2cabana",    "BB_Cabana"},
-       {"b2power",             "BB_Power"},
-       {"barena",              "Blood Arena"},
-       {"bkeep",               "Blood Keep"},
-       {"bstar",               "Brown Star"},
-       {"crypt",               "The Crypt"},
-
-       {"bb3_2k1",             "Bodies Infusion"},
-       {"captasao",    "Captasao"},
-       {"curandero",   "Curandero"},
-       {"dcamp",               "DeathCamp"},
-       {"highnoon",    "HighNoon"},
-       {"qbb1",                "The Confluence"},
-       {"qbb2",                "KathartiK"},
-       {"qbb3",                "Caleb's Woodland Retreat"},
-       {"zoo",                 "Zoo"},
-
-       {"dranzbb6",    "Black Coffee"},
-       {"fragm",               "Frag'M"},
-       {"maim",                "Maim"},
-       {"qe1m7",               "The House of Chthon"},
-       {"qdm1",                "Place of Two Deaths"},
-       {"qdm4",                "The Bad Place"},
-       {"qdm5",                "The Cistern"},
-       {"qmorbias",    "DM-Morbias"},
-       {"simple",              "Dead Simple"}
+static level_t transfusionlevels[] =
+{
+       {"e1m1",       "Cradle to Grave"},
+       {"e1m2",       "Wrong Side of the Tracks"},
+       {"e1m3",       "Phantom Express"},
+       {"e1m4",       "Dark Carnival"},
+       {"e1m5",       "Hallowed Grounds"},
+       {"e1m6",       "The Great Temple"},
+       {"e1m7",       "Altar of Stone"},
+       {"e1m8",       "House of Horrors"},
+
+       {"e2m1",       "Shipwrecked"},
+       {"e2m2",       "The Lumber Mill"},
+       {"e2m3",       "Rest for the Wicked"},
+       {"e2m4",       "The Overlooked Hotel"},
+       {"e2m5",       "The Haunting"},
+       {"e2m6",       "The Cold Rush"},
+       {"e2m7",       "Bowels of the Earth"},
+       {"e2m8",       "The Lair of Shial"},
+       {"e2m9",       "Thin Ice"},
+
+       {"e3m1",       "Ghost Town"},
+       {"e3m2",       "The Siege"},
+       {"e3m3",       "Raw Sewage"},
+       {"e3m4",       "The Sick Ward"},
+       {"e3m5",       "Spare Parts"},
+       {"e3m6",       "Monster Bait"},
+       {"e3m7",       "The Pit of Cerberus"},
+       {"e3m8",       "Catacombs"},
+
+       {"e4m1",       "Butchery Loves Company"},
+       {"e4m2",       "Breeding Grounds"},
+       {"e4m3",       "Charnel House"},
+       {"e4m4",       "Crystal Lake"},
+       {"e4m5",       "Fire and Brimstone"},
+       {"e4m6",       "The Ganglion Depths"},
+       {"e4m7",       "In the Flesh"},
+       {"e4m8",       "The Hall of the Epiphany"},
+       {"e4m9",       "Mall of the Dead"},
+
+       {"bb1",        "The Stronghold"},
+       {"bb2",        "Winter Wonderland"},
+       {"bb3",        "Bodies"},
+       {"bb4",        "The Tower"},
+       {"bb5",        "Click!"},
+       {"bb6",        "Twin Fortress"},
+       {"bb7",        "Midgard"},
+       {"bb8",        "Fun With Heads"},
+       {"dm1",        "Monolith Building 11"},
+       {"dm2",        "Power!"},
+       {"dm3",        "Area 15"},
+
+       {"e6m1",       "Welcome to Your Life"},
+       {"e6m2",       "They Are Here"},
+       {"e6m3",       "Public Storage"},
+       {"e6m4",       "Aqueducts"},
+       {"e6m5",       "The Ruined Temple"},
+       {"e6m6",       "Forbidden Rituals"},
+       {"e6m7",       "The Dungeon"},
+       {"e6m8",       "Beauty and the Beast"},
+       {"e6m9",       "Forgotten Catacombs"},
+
+       {"cp01",       "Boat Docks"},
+       {"cp02",       "Old Opera House"},
+       {"cp03",       "Gothic Library"},
+       {"cp04",       "Lost Monastery"},
+       {"cp05",       "Steamboat"},
+       {"cp06",       "Graveyard"},
+       {"cp07",       "Mountain Pass"},
+       {"cp08",       "Abysmal Mine"},
+       {"cp09",       "Castle"},
+       {"cps1",       "Boggy Creek"},
+
+       {"cpbb01",     "Crypt of Despair"},
+       {"cpbb02",     "Pits of Blood"},
+       {"cpbb03",     "Unholy Cathedral"},
+       {"cpbb04",     "Deadly Inspirations"},
+
+       {"b2a15",      "Area 15 (B2)"},
+       {"b2bodies",   "BB_Bodies (B2)"},
+       {"b2cabana",   "BB_Cabana"},
+       {"b2power",    "BB_Power"},
+       {"barena",     "Blood Arena"},
+       {"bkeep",      "Blood Keep"},
+       {"bstar",      "Brown Star"},
+       {"crypt",      "The Crypt"},
+
+       {"bb3_2k1",    "Bodies Infusion"},
+       {"captasao",   "Captasao"},
+       {"curandero",  "Curandero"},
+       {"dcamp",      "DeathCamp"},
+       {"highnoon",   "HighNoon"},
+       {"qbb1",       "The Confluence"},
+       {"qbb2",       "KathartiK"},
+       {"qbb3",       "Caleb's Woodland Retreat"},
+       {"zoo",        "Zoo"},
+
+       {"dranzbb6",   "Black Coffee"},
+       {"fragm",      "Frag'M"},
+       {"maim",       "Maim"},
+       {"qe1m7",      "The House of Chthon"},
+       {"qdm1",       "Place of Two Deaths"},
+       {"qdm4",       "The Bad Place"},
+       {"qdm5",       "The Cistern"},
+       {"qmorbias",   "DM-Morbias"},
+       {"simple",     "Dead Simple"}
 };
 
-static episode_t       transfusionepisodes[] =
+static episode_t transfusionepisodes[] =
 {
        {"The Way of All Flesh", 0, 8},
        {"Even Death May Die", 8, 9},
@@ -3826,58 +3826,58 @@ static episode_t        transfusionepisodes[] =
 
 static level_t goodvsbad2levels[] =
 {
-       {"rts", "Many Paths"},  // 0
-       {"chess", "Chess, Scott Hess"},                         // 1
-       {"dot", "Big Wall"},
-       {"city2", "The Big City"},
-       {"bwall", "0 G like Psychic TV"},
-       {"snow", "Wireframed"},
-       {"telep", "Infinite Falling"},
-       {"faces", "Facing Bases"},
-       {"island", "Adventure Islands"},
+       {"rts",        "Many Paths"},            // 0
+       {"chess",      "Chess, Scott Hess"},     // 1
+       {"dot",        "Big Wall"},
+       {"city2",      "The Big City"},
+       {"bwall",      "0 G like Psychic TV"},
+       {"snow",       "Wireframed"},
+       {"telep",      "Infinite Falling"},
+       {"faces",      "Facing Bases"},
+       {"island",     "Adventure Islands"},
 };
 
-static episode_t goodvsbad2episodes[] =
+static episode_t   goodvsbad2episodes[] =
 {
        {"Levels? Bevels!", 0, 8},
 };
 
-static level_t battlemechlevels[] =
+static level_t     battlemechlevels[] =
 {
-       {"start", "Parking Level"},
-       {"dm1", "Hot Dump"},                        // 1
-       {"dm2", "The Pits"},
-       {"dm3", "Dimber Died"},
-       {"dm4", "Fire in the Hole"},
-       {"dm5", "Clubhouses"},
-       {"dm6", "Army go Underground"},
+       {"start",      "Parking Level"},
+       {"dm1",        "Hot Dump"},              // 1
+       {"dm2",        "The Pits"},
+       {"dm3",        "Dimber Died"},
+       {"dm4",        "Fire in the Hole"},
+       {"dm5",        "Clubhouses"},
+       {"dm6",        "Army go Underground"},
 };
 
-static episode_t battlemechepisodes[] =
+static episode_t   battlemechepisodes[] =
 {
        {"Time for Battle", 0, 7},
 };
 
-static level_t openquartzlevels[] =
+static level_t     openquartzlevels[] =
 {
-       {"start", "Welcome to Openquartz"},
+       {"start",      "Welcome to Openquartz"},
 
-       {"void1", "The center of nowhere"},                        // 1
-       {"void2", "The place with no name"},
-       {"void3", "The lost supply base"},
-       {"void4", "Past the outer limits"},
-       {"void5", "Into the nonexistance"},
-       {"void6", "Void walk"},
+       {"void1",      "The center of nowhere"}, // 1
+       {"void2",      "The place with no name"},
+       {"void3",      "The lost supply base"},
+       {"void4",      "Past the outer limits"},
+       {"void5",      "Into the nonexistance"},
+       {"void6",      "Void walk"},
 
-       {"vtest", "Warp Central"},
-       {"box", "The deathmatch box"},
-       {"bunkers", "Void command"},
-       {"house", "House of chaos"},
-       {"office", "Overnight office kill"},
-       {"am1", "The nameless chambers"},
+       {"vtest",      "Warp Central"},
+       {"box",        "The deathmatch box"},
+       {"bunkers",    "Void command"},
+       {"house",      "House of chaos"},
+       {"office",     "Overnight office kill"},
+       {"am1",        "The nameless chambers"},
 };
 
-static episode_t openquartzepisodes[] =
+static episode_t   openquartzepisodes[] =
 {
        {"Single Player", 0, 1},
        {"Void Deathmatch", 1, 6},
@@ -3886,9 +3886,9 @@ static episode_t openquartzepisodes[] =
 
 static level_t defeatindetail2levels[] =
 {
-       {"atac3",       "River Crossing"},
-       {"atac4",       "Canyon Chaos"},
-       {"atac7",       "Desert Stormer"},
+       {"atac3",      "River Crossing"},
+       {"atac4",      "Canyon Chaos"},
+       {"atac7",      "Desert Stormer"},
 };
 
 static episode_t defeatindetail2episodes[] =
@@ -3898,9 +3898,9 @@ static episode_t defeatindetail2episodes[] =
 
 static level_t prydonlevels[] =
 {
-       {"curig2", "Capel Curig"},      // 0
+       {"curig2",     "Capel Curig"},  // 0
 
-       {"tdastart", "Gateway"},                                // 1
+       {"tdastart",   "Gateway"},      // 1
 };
 
 static episode_t prydonepisodes[] =
@@ -3946,8 +3946,8 @@ static gameinfo_t gamelist[] =
 
 static gamelevels_t *gameoptions_levels  = NULL;
 
-static int     startepisode;
-static int     startlevel;
+static int startepisode;
+static int startlevel;
 static int maxplayers;
 static qbool m_serverInfoMessage = false;
 static double m_serverInfoMessageTime;
@@ -3971,13 +3971,13 @@ void M_Menu_GameOptions_f(cmd_state_t *cmd)
 
 
 static int gameoptions_cursor_table[] = {40, 56, 64, 72, 80, 88, 96, 104, 112, 140, 160, 168};
-#define        NUM_GAMEOPTIONS 12
-static int             gameoptions_cursor;
+#define NUM_GAMEOPTIONS        12
+static int gameoptions_cursor;
 
 void M_GameOptions_Draw (void)
 {
-       cachepic_t      *p;
-       int             x;
+       cachepic_t *p;
+       int x;
        char vabuf[1024];
 
        M_Background(320, 200);
@@ -4501,13 +4501,13 @@ static void M_ServerList_Key(cmd_state_t *cmd, int k, int ascii)
 /* MODLIST MENU */
 // same limit of mod dirs as in fs.c
 #define MODLIST_MAXDIRS 16
-static int modlist_enabled [MODLIST_MAXDIRS];  //array of indexs to modlist
-static int modlist_numenabled;                 //number of enabled (or in process to be..) mods
+static int modlist_enabled [MODLIST_MAXDIRS]; //array of indexs to modlist
+static int modlist_numenabled; //number of enabled (or in process to be..) mods
 
 typedef struct modlist_entry_s
 {
-       qbool loaded;   // used to determine whether this entry is loaded and running
-       int enabled;            // index to array of modlist_enabled
+       qbool loaded; // used to determine whether this entry is loaded and running
+       int enabled;  // index to array of modlist_enabled
 
        // name of the modification, this is (will...be) displayed on the menu entry
        char name[128];
@@ -4868,7 +4868,7 @@ void M_Draw (void)
 
        if (gamemode == GAME_TRANSFUSION && !m_missingdata) {
                if (m_state != m_credits) {
-                       cachepic_t      *p, *drop1, *drop2, *drop3;
+                       cachepic_t *p, *drop1, *drop2, *drop3;
                        int g, scale_x, scale_y, scale_y_repeat, top_offset;
                        float scale_y_rate;
                        scale_y_repeat = vid_conheight.integer * 2;
index a9acb456fa7e55cdf48af0e83b15cacba61477c0..e1655ca950dd3d263d0c341bff9a83e97ee98e3c 100644 (file)
@@ -1820,7 +1820,7 @@ static void Mod_Q1BSP_LoadTextures(sizebuf_t *sb)
                // try to load shader or external textures, but first we have to backup the texture_t because shader loading overwrites it even if it fails
                backuptex = loadmodel->data_textures[i];
                if (name[0] && /* HACK */ strncmp(name, "sky", 3) /* END HACK */ && (Mod_LoadTextureFromQ3Shader(loadmodel->mempool, loadmodel->name, loadmodel->data_textures + i, va(vabuf, sizeof(vabuf), "%s/%s", mapname, name), false, false, TEXF_ALPHA | TEXF_MIPMAP | TEXF_ISWORLD | TEXF_PICMIP | TEXF_COMPRESS, MATERIALFLAG_WALL) ||
-                               Mod_LoadTextureFromQ3Shader(loadmodel->mempool, loadmodel->name, loadmodel->data_textures + i, va(vabuf, sizeof(vabuf), "%s"   , name), false, false, TEXF_ALPHA | TEXF_MIPMAP | TEXF_ISWORLD | TEXF_PICMIP | TEXF_COMPRESS, MATERIALFLAG_WALL)))
+                               Mod_LoadTextureFromQ3Shader(loadmodel->mempool, loadmodel->name, loadmodel->data_textures + i, va(vabuf, sizeof(vabuf), "%s"   , name), false, false, TEXF_ALPHA | TEXF_MIPMAP | TEXF_ISWORLD | TEXF_PICMIP | TEXF_COMPRESS, MATERIALFLAG_WALL)))
                {
                        // set the width/height fields which are used for parsing texcoords in this bsp format
                        tx->width = mtwidth;
index 485892dd7a1d7d2dacdc5e14023abeb48948c24a..430e6eb8b14849e2f65d78b08032f53135348d70 100644 (file)
@@ -110,9 +110,9 @@ iqmvertexarray_t;
 
 typedef struct iqmextension_s
 {
-    unsigned int name;
-    unsigned int num_data, ofs_data;
-    unsigned int ofs_extensions; // pointer to next extension
+       unsigned int name;
+       unsigned int num_data, ofs_data;
+       unsigned int ofs_extensions; // pointer to next extension
 }
 iqmextension_t;
 
index 99bd8c6f17f480851270987704a7fa830415a1f1..c6f89dad1f3af8b5d4c57ed562ace80940eae31d 100644 (file)
@@ -1444,7 +1444,7 @@ static void Q3Shader_AddToHash (shader_t* shader)
                {
                        /* Add to chain */
                        q3shader_hash_entry_t* newEntry = (q3shader_hash_entry_t*)
-                         Mem_ExpandableArray_AllocRecord (&q3shader_data->hash_entries);
+                               Mem_ExpandableArray_AllocRecord (&q3shader_data->hash_entries);
 
                        while (lastEntry->chain != NULL) lastEntry = lastEntry->chain;
                        lastEntry->chain = newEntry;
@@ -1789,7 +1789,7 @@ void Mod_LoadQ3Shaders(void)
                                                        {
                                                                for (i = 0;i < numparameters - 2 && i < Q3TCMOD_MAXPARMS;i++)
                                                                        layer->tcmods[tcmodindex].parms[i] = atof(parameter[i+2]);
-                                                                        if (!strcasecmp(parameter[1], "entitytranslate")) layer->tcmods[tcmodindex].tcmod = Q3TCMOD_ENTITYTRANSLATE;
+                                                                    if (!strcasecmp(parameter[1], "entitytranslate")) layer->tcmods[tcmodindex].tcmod = Q3TCMOD_ENTITYTRANSLATE;
                                                                else if (!strcasecmp(parameter[1], "rotate"))          layer->tcmods[tcmodindex].tcmod = Q3TCMOD_ROTATE;
                                                                else if (!strcasecmp(parameter[1], "scale"))           layer->tcmods[tcmodindex].tcmod = Q3TCMOD_SCALE;
                                                                else if (!strcasecmp(parameter[1], "scroll"))          layer->tcmods[tcmodindex].tcmod = Q3TCMOD_SCROLL;
@@ -3281,7 +3281,7 @@ static void Mod_Decompile_SMD(model_t *model, const char *filename, int firstpos
                                                const blendweights_t *w = model->surfmesh.data_blendweights + b - model->num_bones;
                                                const unsigned char *wi = w->index;
                                                const unsigned char *wf = w->influence;
-                                           if (wf[3]) l = dpsnprintf(outbuffer + outbufferpos, outbuffermax - outbufferpos, "%3i %f %f %f %f %f %f %f %f 4 %i %f %i %f %i %f %i %f\n", wi[0], v[0], v[1], v[2], vn[0], vn[1], vn[2], vt[0], 1 - vt[1], wi[0], wf[0]/255.0f, wi[1], wf[1]/255.0f, wi[2], wf[2]/255.0f, wi[3], wf[3]/255.0f);
+                                                    if (wf[3]) l = dpsnprintf(outbuffer + outbufferpos, outbuffermax - outbufferpos, "%3i %f %f %f %f %f %f %f %f 4 %i %f %i %f %i %f %i %f\n", wi[0], v[0], v[1], v[2], vn[0], vn[1], vn[2], vt[0], 1 - vt[1], wi[0], wf[0]/255.0f, wi[1], wf[1]/255.0f, wi[2], wf[2]/255.0f, wi[3], wf[3]/255.0f);
                                                else if (wf[2]) l = dpsnprintf(outbuffer + outbufferpos, outbuffermax - outbufferpos, "%3i %f %f %f %f %f %f %f %f 3 %i %f %i %f %i %f\n"      , wi[0], v[0], v[1], v[2], vn[0], vn[1], vn[2], vt[0], 1 - vt[1], wi[0], wf[0]/255.0f, wi[1], wf[1]/255.0f, wi[2], wf[2]/255.0f);
                                                else if (wf[1]) l = dpsnprintf(outbuffer + outbufferpos, outbuffermax - outbufferpos, "%3i %f %f %f %f %f %f %f %f 2 %i %f %i %f\n"            , wi[0], v[0], v[1], v[2], vn[0], vn[1], vn[2], vt[0], 1 - vt[1], wi[0], wf[0]/255.0f, wi[1], wf[1]/255.0f);
                                                else            l = dpsnprintf(outbuffer + outbufferpos, outbuffermax - outbufferpos, "%3i %f %f %f %f %f %f %f %f\n"                          , wi[0], v[0], v[1], v[2], vn[0], vn[1], vn[2], vt[0], 1 - vt[1]);
index cf5e02dc1ec4450210fceb52f9767a01ca738caf..6e569a1ecb9aec0529f91499643b62ada4f3266e 100644 (file)
@@ -337,7 +337,7 @@ typedef struct texture_s
        int mesh_defaulttexflags;
        int mesh_defaultmaterialflags;
 }
- texture_t;
+texture_t;
 
 typedef struct mtexinfo_s
 {
@@ -517,7 +517,7 @@ typedef struct model_s
        void(*DrawDebug)(struct entity_render_s *ent);
        // draw geometry textures for deferred rendering
        void(*DrawPrepass)(struct entity_render_s *ent);
-    // compile an optimized shadowmap mesh for the model based on light source
+       // compile an optimized shadowmap mesh for the model based on light source
        void(*CompileShadowMap)(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativelightdirection, float lightradius, int numsurfaces, const int *surfacelist);
        // draw depth into a shadowmap
        void(*DrawShadowMap)(int side, struct entity_render_s *ent, const vec3_t relativelightorigin, const vec3_t relativelightdirection, float lightradius, int numsurfaces, const int *surfacelist, const unsigned char *surfacesides, const vec3_t lightmins, const vec3_t lightmaxs);
@@ -564,7 +564,8 @@ typedef struct modloader_s
        const char *header;
        size_t headersize; // The header might not be NULL terminated
        void (*Load)(model_t *, void *, void *);
-} modloader_t;
+}
+modloader_t;
 
 // sky/water subdivision
 //extern struct cvar_s gl_subdivide_size;
index 224ddd2a56d0108145af07039026a3ab6c549b6f..75114e0a63a58b624e607fc17b3808666223d63d 100644 (file)
@@ -958,7 +958,7 @@ void VM_cin_open(prvm_prog_t *prog)
        name = PRVM_G_STRING( OFS_PARM1 );
 
        VM_CheckEmptyString(prog,  file );
-    VM_CheckEmptyString(prog,  name );
+       VM_CheckEmptyString(prog,  name );
 
        if( CL_OpenVideo( file, name, MENUOWNER, "" ) )
                PRVM_G_FLOAT( OFS_RETURN ) = 1;
index 0fa3b26d39b75929845ba2eca5b09cdf3d391565..d7ddb28b82d33fd143abe81415f5093c0493caee 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -194,7 +194,7 @@ void NetConn_UpdateFavorites_c(cvar_t *var)
 /// spare entries will be removed
 static void _ServerList_ViewList_Helper_InsertBefore( int index, serverlist_entry_t *entry )
 {
-    int i;
+       int i;
        if( serverlist_viewcount < SERVERLIST_VIEWLISTSIZE ) {
                i = serverlist_viewcount++;
        } else {
@@ -3835,7 +3835,7 @@ void Net_Slist_f(cmd_state_t *cmd)
        ServerList_ResetMasks();
        serverlist_sortbyfield = SLIF_PING;
        serverlist_sortflags = 0;
-    if (m_state != m_slist) {
+       if (m_state != m_slist) {
                Con_Print("Sending requests to master servers\n");
                ServerList_QueryList(true, true, false, true);
                Con_Print("Listening for replies...\n");
@@ -3848,7 +3848,7 @@ void Net_SlistQW_f(cmd_state_t *cmd)
        ServerList_ResetMasks();
        serverlist_sortbyfield = SLIF_PING;
        serverlist_sortflags = 0;
-    if (m_state != m_slist) {
+       if (m_state != m_slist) {
                Con_Print("Sending requests to master servers\n");
                ServerList_QueryList(true, false, true, true);
                serverlist_consoleoutput = true;
index 49ce46aa97f37f704d11947f1fec72f3a6598187..30a41be042459a5daab22a9c27e8132120ee2e45 100644 (file)
@@ -2140,7 +2140,7 @@ void VM_getentityfieldstring(prvm_prog_t *prog)
 
        if (i < 0 || i >= prog->numfielddefs)
        {
-        VM_Warning(prog, "VM_entityfielddata: %s: field index out of bounds\n", prog->name);
+               VM_Warning(prog, "VM_entityfielddata: %s: field index out of bounds\n", prog->name);
                PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "");
                return;
        }
@@ -2187,7 +2187,7 @@ void VM_putentityfieldstring(prvm_prog_t *prog)
 
        if (i < 0 || i >= prog->numfielddefs)
        {
-        VM_Warning(prog, "VM_entityfielddata: %s: field index out of bounds\n", prog->name);
+               VM_Warning(prog, "VM_entityfielddata: %s: field index out of bounds\n", prog->name);
                PRVM_G_FLOAT(OFS_RETURN) = 0.0f;
                return;
        }
@@ -3663,7 +3663,7 @@ string altstr_set(string altstr, float num, string set)
 */
 void VM_altstr_set(prvm_prog_t *prog)
 {
-    int num;
+       int num;
        const char *altstr, *str;
        const char *in;
        char *out;
@@ -4794,7 +4794,6 @@ void VM_uncolorstring (prvm_prog_t *prog)
        szString = PRVM_G_STRING(OFS_PARM0);
        COM_StringDecolorize(szString, 0, szNewString, sizeof(szNewString), true);
        PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, szNewString);
-
 }
 
 // #221 float(string str, string sub[, float startpos]) strstrofs (FTE_STRINGS)
@@ -4946,6 +4945,7 @@ static int chrchar_alpha(int i, int basec, int baset, int convc, int convt, int
        }
        return i + basec + baset;
 }
+
 // #224 string(float ccase, float calpha, float cnum, string s, ...) strconv (FTE_STRINGS)
 //bulk convert a string. change case or colouring.
 void VM_strconv (prvm_prog_t *prog)
@@ -6383,36 +6383,36 @@ void VM_getsurfaceclippedpoint(prvm_prog_t *prog)
 //PF_getsurfacenumtriangles, // #??? float(entity e, float s) getsurfacenumtriangles = #???;
 void VM_getsurfacenumtriangles(prvm_prog_t *prog)
 {
-       model_t *model;
-       msurface_t *surface;
-       VM_SAFEPARMCOUNT(2, VM_getsurfacenumtriangles);
-       // return 0 if no such surface
-       if (!(model = getmodel(prog, PRVM_G_EDICT(OFS_PARM0))) || !(surface = getsurface(model, (int)PRVM_G_FLOAT(OFS_PARM1))))
-       {
-               PRVM_G_FLOAT(OFS_RETURN) = 0;
-               return;
-       }
+       model_t *model;
+       msurface_t *surface;
+       VM_SAFEPARMCOUNT(2, VM_getsurfacenumtriangles);
+       // return 0 if no such surface
+       if (!(model = getmodel(prog, PRVM_G_EDICT(OFS_PARM0))) || !(surface = getsurface(model, (int)PRVM_G_FLOAT(OFS_PARM1))))
+       {
+               PRVM_G_FLOAT(OFS_RETURN) = 0;
+               return;
+       }
 
-       PRVM_G_FLOAT(OFS_RETURN) = surface->num_triangles;
+       PRVM_G_FLOAT(OFS_RETURN) = surface->num_triangles;
 }
 //PF_getsurfacetriangle,     // #??? vector(entity e, float s, float n) getsurfacetriangle = #???;
 void VM_getsurfacetriangle(prvm_prog_t *prog)
 {
-       const vec3_t d = {-1, -1, -1};
-       prvm_edict_t *ed;
-       model_t *model;
-       msurface_t *surface;
-       int trinum;
-       VM_SAFEPARMCOUNT(3, VM_getsurfacetriangle);
-       VectorClear(PRVM_G_VECTOR(OFS_RETURN));
-       ed = PRVM_G_EDICT(OFS_PARM0);
-       if (!(model = getmodel(prog, ed)) || !(surface = getsurface(model, (int)PRVM_G_FLOAT(OFS_PARM1))))
-               return;
-       trinum = (int)PRVM_G_FLOAT(OFS_PARM2);
-       if (trinum < 0 || trinum >= surface->num_triangles)
-               return;
-       // FIXME: implement rotation/scaling
-       VectorMA(&(model->surfmesh.data_element3i + 3 * surface->num_firsttriangle)[trinum * 3], surface->num_firstvertex, d, PRVM_G_VECTOR(OFS_RETURN));
+       const vec3_t d = {-1, -1, -1};
+       prvm_edict_t *ed;
+       model_t *model;
+       msurface_t *surface;
+       int trinum;
+       VM_SAFEPARMCOUNT(3, VM_getsurfacetriangle);
+       VectorClear(PRVM_G_VECTOR(OFS_RETURN));
+       ed = PRVM_G_EDICT(OFS_PARM0);
+       if (!(model = getmodel(prog, ed)) || !(surface = getsurface(model, (int)PRVM_G_FLOAT(OFS_PARM1))))
+               return;
+       trinum = (int)PRVM_G_FLOAT(OFS_PARM2);
+       if (trinum < 0 || trinum >= surface->num_triangles)
+               return;
+       // FIXME: implement rotation/scaling
+       VectorMA(&(model->surfmesh.data_element3i + 3 * surface->num_firsttriangle)[trinum * 3], surface->num_firstvertex, d, PRVM_G_VECTOR(OFS_RETURN));
 }
 
 //
index aca5fd5ef2ee81ee07c086775ad87efc70fa4fcc..e0a3494c41368fddfacbacc0fa1ef03bf6367881 100644 (file)
@@ -4051,7 +4051,7 @@ void R_Shadow_PrepareLights(void)
 
        if (r_shadow_shadowmode_shadowmapping != r_shadow_shadowmapping.integer ||
                r_shadow_shadowmode_deferred != r_shadow_deferred.integer ||
-           r_shadow_shadowmaptexturesize != shadowmaptexturesize ||
+               r_shadow_shadowmaptexturesize != shadowmaptexturesize ||
                r_shadow_shadowmapvsdct != (r_shadow_shadowmapping_vsdct.integer != 0 && vid.renderpath == RENDERPATH_GL32) ||
                r_shadow_shadowmapfilterquality != r_shadow_shadowmapping_filterquality.integer ||
                r_shadow_shadowmapshadowsampler != r_shadow_shadowmapping_useshadowsampler.integer ||
index a6cf71b1ebde919ea156ece4bc2cbe3030825f50..ac7fe47579e152252b45b8635c0013f29edd2c6a 100644 (file)
--- a/snd_oss.c
+++ b/snd_oss.c
@@ -70,10 +70,10 @@ qbool SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
                }
 
                return false;
-    }
+       }
 
        // Open /dev/dsp
-    audio_fd = open("/dev/dsp", O_WRONLY);
+       audio_fd = open("/dev/dsp", O_WRONLY);
        if (audio_fd < 0)
        {
                perror("/dev/dsp");
index 96139467879a79e2dc211e0ced41e83ea08614f3..40127195b894d1aed3fee6d3871c8de8225f748a 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -1811,7 +1811,7 @@ static void SV_PushMove (prvm_edict_t *pusher, float movetime)
        if (PRVM_serveredictfloat(pusher, movetype) == MOVETYPE_FAKEPUSH) // Tenebrae's MOVETYPE_PUSH variant that doesn't push...
                numcheckentities = 0;
        else // MOVETYPE_PUSH
-               numcheckentities = SV_EntitiesInBox(mins, maxs, MAX_EDICTS, checkentities);
+               numcheckentities = SV_EntitiesInBox(mins, maxs, MAX_EDICTS, checkentities);
        for (e = 0;e < numcheckentities;e++)
        {
                prvm_edict_t *check = checkentities[e];