diff options
author | Simon Howard | 2006-10-11 22:55:06 +0000 |
---|---|---|
committer | Simon Howard | 2006-10-11 22:55:06 +0000 |
commit | 396de0009d3a045f10e101efc2d3f1b8eb07ab16 (patch) | |
tree | 79319fb3b2ec55f488e584daa97b7326c75155df | |
parent | 5db5fe7d42dbcc3912762c6327e34919dc131ca7 (diff) | |
download | chocolate-doom-396de0009d3a045f10e101efc2d3f1b8eb07ab16.tar.gz chocolate-doom-396de0009d3a045f10e101efc2d3f1b8eb07ab16.tar.bz2 chocolate-doom-396de0009d3a045f10e101efc2d3f1b8eb07ab16.zip |
Shut up compiler warnings.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 694
-rw-r--r-- | src/deh_cheat.c | 13 | ||||
-rw-r--r-- | src/deh_mapping.h | 4 | ||||
-rw-r--r-- | src/deh_misc.c | 4 | ||||
-rw-r--r-- | src/f_finale.c | 116 | ||||
-rw-r--r-- | src/g_game.c | 8 | ||||
-rw-r--r-- | src/m_cheat.h | 6 | ||||
-rw-r--r-- | src/m_menu.c | 8 | ||||
-rw-r--r-- | src/memio.c | 6 | ||||
-rw-r--r-- | src/net_client.c | 6 | ||||
-rw-r--r-- | src/net_defs.h | 8 | ||||
-rw-r--r-- | src/net_server.c | 27 | ||||
-rw-r--r-- | src/p_enemy.c | 12 | ||||
-rw-r--r-- | src/p_pspr.c | 6 | ||||
-rw-r--r-- | src/p_spec.c | 6 | ||||
-rw-r--r-- | src/r_plane.c | 10 | ||||
-rw-r--r-- | src/r_things.c | 8 | ||||
-rw-r--r-- | src/st_lib.c | 8 | ||||
-rw-r--r-- | src/st_lib.h | 4 |
18 files changed, 143 insertions, 117 deletions
diff --git a/src/deh_cheat.c b/src/deh_cheat.c index 68d4ce88..ff599ef9 100644 --- a/src/deh_cheat.c +++ b/src/deh_cheat.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: deh_cheat.c 687 2006-10-05 22:12:22Z fraggle $ +// $Id: deh_cheat.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -101,7 +101,7 @@ static void DEH_CheatParseLine(deh_context_t *context, char *line, void *tag) char *variable_name; char *value; unsigned char *unsvalue; - int i; + unsigned int i; if (!DEH_ParseAssignment(line, &variable_name, &value)) { @@ -123,10 +123,13 @@ static void DEH_CheatParseLine(deh_context_t *context, char *line, void *tag) // write the value into the cheat sequence - for (i=0; - i<cheat->seq->sequence_len && unsvalue[i] != 0 && unsvalue[i] != 0xff; - ++i) + i = 0; + + while (i<cheat->seq->sequence_len && unsvalue[i] != 0 && unsvalue[i] != 0xff) + { cheat->seq->sequence[i] = unsvalue[i]; + ++i; + } cheat->seq->sequence[i] = '\0'; } diff --git a/src/deh_mapping.h b/src/deh_mapping.h index 6644ba46..ac5a3569 100644 --- a/src/deh_mapping.h +++ b/src/deh_mapping.h @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: deh_mapping.h 687 2006-10-05 22:12:22Z fraggle $ +// $Id: deh_mapping.h 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -62,7 +62,7 @@ {deh_name, NULL, -1}, #define DEH_END_MAPPING \ - {NULL} \ + {NULL, NULL, -1} \ } \ }; diff --git a/src/deh_misc.c b/src/deh_misc.c index a00057ff..e81ba211 100644 --- a/src/deh_misc.c +++ b/src/deh_misc.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: deh_misc.c 687 2006-10-05 22:12:22Z fraggle $ +// $Id: deh_misc.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -255,7 +255,7 @@ static void DEH_MiscParseLine(deh_context_t *context, char *line, void *tag) static void DEH_MiscMD5Sum(md5_context_t *context) { - int i; + unsigned int i; for (i=0; i<sizeof(misc_settings) / sizeof(*misc_settings); ++i) { diff --git a/src/f_finale.c b/src/f_finale.c index 4c540b00..893489f3 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: f_finale.c 641 2006-09-21 11:13:28Z rtc_marine $ +// $Id: f_finale.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -48,7 +48,7 @@ static const char -rcsid[] = "$Id: f_finale.c 641 2006-09-21 11:13:28Z rtc_marine $"; +rcsid[] = "$Id: f_finale.c 694 2006-10-11 22:55:06Z fraggle $"; #include <ctype.h> @@ -68,16 +68,22 @@ rcsid[] = "$Id: f_finale.c 641 2006-09-21 11:13:28Z rtc_marine $"; #include "doomstat.h" #include "r_state.h" +typedef enum +{ + F_STAGE_TEXT, + F_STAGE_ARTSCREEN, + F_STAGE_CAST, +} finalestage_t; + // ? //#include "doomstat.h" //#include "r_local.h" //#include "f_finale.h" // Stage of animation: -// 0 = text, 1 = art screen, 2 = character cast -int finalestage; +finalestage_t finalestage; -int finalecount; +unsigned int finalecount; #define TEXTSPEED 3 #define TEXTWAIT 250 @@ -168,7 +174,7 @@ void F_StartFinale (void) finaletext = DEH_String(finaletext); finaleflat = DEH_String(finaleflat); - finalestage = 0; + finalestage = F_STAGE_TEXT; finalecount = 0; } @@ -177,7 +183,7 @@ void F_StartFinale (void) boolean F_Responder (event_t *event) { - if (finalestage == 2) + if (finalestage == F_STAGE_CAST) return F_CastResponder (event); return false; @@ -212,7 +218,7 @@ void F_Ticker (void) // advance animation finalecount++; - if (finalestage == 2) + if (finalestage == F_STAGE_CAST) { F_CastTicker (); return; @@ -221,10 +227,11 @@ void F_Ticker (void) if ( gamemode == commercial) return; - if (!finalestage && finalecount>strlen (finaletext)*TEXTSPEED + TEXTWAIT) + if (finalestage == F_STAGE_TEXT + && finalecount>strlen (finaletext)*TEXTSPEED + TEXTWAIT) { finalecount = 0; - finalestage = 1; + finalestage = F_STAGE_ARTSCREEN; wipegamestate = -1; // force a wipe if (gameepisode == 3) S_StartMusic (mus_bunny); @@ -247,7 +254,7 @@ void F_TextWrite (void) byte* dest; int x,y,w; - int count; + signed int count; char* ch; int c; int cx; @@ -278,7 +285,7 @@ void F_TextWrite (void) cy = 10; ch = finaletext; - count = (finalecount - 10)/TEXTSPEED; + count = ((signed int) finalecount - 10) / TEXTSPEED; if (count < 0) count = 0; for ( ; count ; count-- ) @@ -364,7 +371,7 @@ void F_StartCast (void) caststate = &states[mobjinfo[castorder[castnum].type].seestate]; casttics = caststate->tics; castdeath = false; - finalestage = 2; + finalestage = F_STAGE_CAST; castframes = 0; castonmelee = 0; castattacking = false; @@ -626,7 +633,7 @@ F_DrawPatchCol // void F_BunnyScroll (void) { - int scrolled; + signed int scrolled; int x; patch_t* p1; patch_t* p2; @@ -639,7 +646,7 @@ void F_BunnyScroll (void) V_MarkRect (0, 0, SCREENWIDTH, SCREENHEIGHT); - scrolled = 320 - (finalecount-230)/2; + scrolled = (signed int) (320 - (finalecount-230)/2); if (scrolled > 320) scrolled = 320; if (scrolled < 0) @@ -678,46 +685,61 @@ void F_BunnyScroll (void) W_CacheLumpName (name,PU_CACHE)); } +static void F_ArtScreenDrawer(void) +{ + char *lumpname; + + if (gameepisode == 3) + { + F_BunnyScroll(); + } + else + { + switch (gameepisode) + { + case 1: + if (gamemode == retail) + { + lumpname = "CREDIT"; + } + else + { + lumpname = "HELP2"; + } + break; + case 2: + lumpname = "VICTORY2"; + break; + case 4: + lumpname = "ENDPIC"; + break; + default: + return; + } + + lumpname = DEH_String(lumpname); + + V_DrawPatch (0, 0, 0, W_CacheLumpName(lumpname, PU_CACHE)); + } +} // // F_Drawer // void F_Drawer (void) { - if (finalestage == 2) + switch (finalestage) { - F_CastDrawer (); - return; - } - - if (!finalestage) - F_TextWrite (); - else - { - switch (gameepisode) - { - case 1: - if ( gamemode == retail ) - V_DrawPatch (0,0,0, - W_CacheLumpName(DEH_String("CREDIT"),PU_CACHE)); - else - V_DrawPatch (0,0,0, - W_CacheLumpName(DEH_String("HELP2"),PU_CACHE)); - break; - case 2: - V_DrawPatch(0,0,0, - W_CacheLumpName(DEH_String("VICTORY2"),PU_CACHE)); - break; - case 3: - F_BunnyScroll (); - break; - case 4: - V_DrawPatch (0,0,0, - W_CacheLumpName(DEH_String("ENDPIC"),PU_CACHE)); - break; - } + case F_STAGE_CAST: + F_CastDrawer(); + break; + case F_STAGE_TEXT: + F_TextWrite(); + break; + case F_STAGE_ARTSCREEN: + F_ArtScreenDrawer(); + break; } - } diff --git a/src/g_game.c b/src/g_game.c index 7019c74e..03c8a024 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: g_game.c 667 2006-09-25 21:45:30Z fraggle $ +// $Id: g_game.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -134,7 +134,7 @@ static const char -rcsid[] = "$Id: g_game.c 667 2006-09-25 21:45:30Z fraggle $"; +rcsid[] = "$Id: g_game.c 694 2006-10-11 22:55:06Z fraggle $"; #include <string.h> #include <stdlib.h> @@ -325,10 +325,10 @@ int mousex; int mousey; int dclicktime; -int dclickstate; +boolean dclickstate; int dclicks; int dclicktime2; -int dclickstate2; +boolean dclickstate2; int dclicks2; // joystick values are repeated diff --git a/src/m_cheat.h b/src/m_cheat.h index add80337..660b3c14 100644 --- a/src/m_cheat.h +++ b/src/m_cheat.h @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: m_cheat.h 650 2006-09-22 12:16:00Z fraggle $ +// $Id: m_cheat.h 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -47,12 +47,12 @@ typedef struct // settings for this cheat char sequence[MAX_CHEAT_LEN]; - int sequence_len; + size_t sequence_len; int parameter_chars; // state used during the game - int chars_read; + size_t chars_read; int param_chars_read; char parameter_buf[MAX_CHEAT_PARAMS]; } cheatseq_t; diff --git a/src/m_menu.c b/src/m_menu.c index e7c7f63f..859c9b13 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: m_menu.c 665 2006-09-25 20:42:37Z fraggle $ +// $Id: m_menu.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -78,7 +78,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: m_menu.c 665 2006-09-25 20:42:37Z fraggle $"; +rcsid[] = "$Id: m_menu.c 694 2006-10-11 22:55:06Z fraggle $"; #include <stdlib.h> #include <ctype.h> @@ -1856,8 +1856,8 @@ void M_Drawer (void) { static short x; static short y; - short i; - short max; + unsigned int i; + unsigned int max; char string[40]; char *name; int start; diff --git a/src/memio.c b/src/memio.c index 69d7b5fc..5a78f11b 100644 --- a/src/memio.c +++ b/src/memio.c @@ -42,7 +42,7 @@ struct _MEMFILE { unsigned char *buf; size_t buflen; size_t alloced; - int position; + unsigned int position; memfile_mode_t mode; }; @@ -172,7 +172,7 @@ long mem_ftell(MEMFILE *stream) int mem_fseek(MEMFILE *stream, signed long position, mem_rel_t whence) { - int newpos; + unsigned int newpos; switch (whence) { @@ -191,7 +191,7 @@ int mem_fseek(MEMFILE *stream, signed long position, mem_rel_t whence) return -1; } - if (newpos >= 0 && newpos < stream->buflen) + if (newpos < stream->buflen) { stream->position = newpos; return 0; diff --git a/src/net_client.c b/src/net_client.c index 6147a727..bc31740d 100644 --- a/src/net_client.c +++ b/src/net_client.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: net_client.c 689 2006-10-06 17:06:05Z fraggle $ +// $Id: net_client.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -347,7 +347,7 @@ static void NET_CL_Disconnected(void) // the d_net.c structures (netcmds/nettics) and save the new ticcmd // back into recvwindow_cmd_base. -static void NET_CL_ExpandFullTiccmd(net_full_ticcmd_t *cmd, int seq) +static void NET_CL_ExpandFullTiccmd(net_full_ticcmd_t *cmd, unsigned int seq) { int latency; fixed_t adjustment; @@ -711,7 +711,7 @@ static void NET_CL_ParseGameStart(net_packet_t *packet) net_gamesettings_t settings; unsigned int num_players; signed int player_number; - int i; + unsigned int i; if (!NET_ReadInt8(packet, &num_players) || !NET_ReadSInt8(packet, &player_number) diff --git a/src/net_defs.h b/src/net_defs.h index f8bca1d8..709801cc 100644 --- a/src/net_defs.h +++ b/src/net_defs.h @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: net_defs.h 680 2006-09-29 21:25:13Z fraggle $ +// $Id: net_defs.h 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -93,9 +93,9 @@ typedef struct _net_context_s net_context_t; struct _net_packet_s { byte *data; - int len; - int alloced; - int pos; + size_t len; + size_t alloced; + unsigned int pos; }; struct _net_module_s diff --git a/src/net_server.c b/src/net_server.c index 478fbd6c..ed664a93 100644 --- a/src/net_server.c +++ b/src/net_server.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: net_server.c 689 2006-10-06 17:06:05Z fraggle $ +// $Id: net_server.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -215,7 +215,7 @@ typedef struct // Latest acknowledged by the client - int acknowledged; + unsigned int acknowledged; // Observer: receives data but does not participate in the game. @@ -254,8 +254,8 @@ static boolean server_initialised = false; static net_client_t clients[MAXNETNODES]; static net_client_t *sv_players[MAXPLAYERS]; static net_context_t *server_context; -static int sv_gamemode; -static int sv_gamemission; +static unsigned int sv_gamemode; +static unsigned int sv_gamemission; static net_gamesettings_t sv_settings; // receive window @@ -399,16 +399,16 @@ static int NET_SV_NumClients(void) // Find the latest tic which has been acknowledged as received by // all clients. -static int NET_SV_LatestAcknowledged(void) +static unsigned int NET_SV_LatestAcknowledged(void) { - int lowtic = -1; + unsigned int lowtic = UINT_MAX; int i; for (i=0; i<MAXNETNODES; ++i) { if (ClientConnected(&clients[i])) { - if (lowtic < 0 || clients[i].acknowledged < lowtic) + if (clients[i].acknowledged < lowtic) { lowtic = clients[i].acknowledged; } @@ -424,16 +424,16 @@ static int NET_SV_LatestAcknowledged(void) static void NET_SV_AdvanceWindow(void) { - int lowtic; + unsigned int lowtic; int i; - lowtic = NET_SV_LatestAcknowledged(); - - if (lowtic < 0) + if (NET_SV_NumPlayers() <= 0) { return; } + lowtic = NET_SV_LatestAcknowledged(); + // Advance the recv window until it catches up with lowtic while (recvwindow_start < lowtic) @@ -1077,10 +1077,11 @@ static void NET_SV_ParseGameDataACK(net_packet_t *packet, net_client_t *client) } } -static void NET_SV_SendTics(net_client_t *client, int start, int end) +static void NET_SV_SendTics(net_client_t *client, + unsigned int start, unsigned int end) { net_packet_t *packet; - int i; + unsigned int i; packet = NET_NewPacket(500); diff --git a/src/p_enemy.c b/src/p_enemy.c index b09dbc6d..797e6c9f 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: p_enemy.c 223 2005-10-24 18:50:39Z fraggle $ +// $Id: p_enemy.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -44,7 +44,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: p_enemy.c 223 2005-10-24 18:50:39Z fraggle $"; +rcsid[] = "$Id: p_enemy.c 694 2006-10-11 22:55:06Z fraggle $"; #include <stdlib.h> @@ -420,7 +420,7 @@ void P_NewChaseDir (mobj_t* actor) && d[2] != DI_NODIR) { actor->movedir = diags[((deltay<0)<<1)+(deltax>0)]; - if (actor->movedir != turnaround && P_TryWalk(actor)) + if (actor->movedir != (int) turnaround && P_TryWalk(actor)) return; } @@ -473,7 +473,7 @@ void P_NewChaseDir (mobj_t* actor) tdir<=DI_SOUTHEAST; tdir++ ) { - if (tdir!=turnaround) + if (tdir != (int) turnaround) { actor->movedir =tdir; @@ -488,9 +488,9 @@ void P_NewChaseDir (mobj_t* actor) tdir != (DI_EAST-1); tdir-- ) { - if (tdir!=turnaround) + if (tdir != (int) turnaround) { - actor->movedir =tdir; + actor->movedir = tdir; if ( P_TryWalk(actor) ) return; diff --git a/src/p_pspr.c b/src/p_pspr.c index cf56839d..ec41465d 100644 --- a/src/p_pspr.c +++ b/src/p_pspr.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: p_pspr.c 206 2005-10-17 20:27:05Z fraggle $ +// $Id: p_pspr.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -40,7 +40,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: p_pspr.c 206 2005-10-17 20:27:05Z fraggle $"; +rcsid[] = "$Id: p_pspr.c 694 2006-10-11 22:55:06Z fraggle $"; #include "doomdef.h" #include "d_event.h" @@ -542,7 +542,7 @@ A_Saw linetarget->x, linetarget->y); if (angle - player->mo->angle > ANG180) { - if (angle - player->mo->angle < -ANG90/20) + if ((signed int) (angle - player->mo->angle) < -ANG90/20) player->mo->angle = angle + ANG90/21; else player->mo->angle -= ANG90/20; diff --git a/src/p_spec.c b/src/p_spec.c index 6fbaccb2..a556214e 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: p_spec.c 653 2006-09-22 20:32:00Z fraggle $ +// $Id: p_spec.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -45,7 +45,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: p_spec.c 653 2006-09-22 20:32:00Z fraggle $"; +rcsid[] = "$Id: p_spec.c 694 2006-10-11 22:55:06Z fraggle $"; #include <stdlib.h> @@ -92,7 +92,7 @@ typedef struct // typedef struct { - boolean istexture; // if false, it is a flat + int istexture; // if false, it is a flat char endname[9]; char startname[9]; int speed; diff --git a/src/r_plane.c b/src/r_plane.c index 5c9cb745..00ad8b7a 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: r_plane.c 8 2005-07-23 16:44:57Z fraggle $ +// $Id: r_plane.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -38,7 +38,7 @@ static const char -rcsid[] = "$Id: r_plane.c 8 2005-07-23 16:44:57Z fraggle $"; +rcsid[] = "$Id: r_plane.c 694 2006-10-11 22:55:06Z fraggle $"; #include <stdlib.h> @@ -143,9 +143,9 @@ R_MapPlane #ifdef RANGECHECK if (x2 < x1 - || x1<0 - || x2>=viewwidth - || (unsigned)y>viewheight) + || x1 < 0 + || x2 >= viewwidth + || y > viewheight) { I_Error ("R_MapPlane: %i, %i at %i",x1,x2,y); } diff --git a/src/r_things.c b/src/r_things.c index 4e4b051a..2e56430f 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: r_things.c 177 2005-10-08 21:02:55Z fraggle $ +// $Id: r_things.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -48,7 +48,7 @@ static const char -rcsid[] = "$Id: r_things.c 177 2005-10-08 21:02:55Z fraggle $"; +rcsid[] = "$Id: r_things.c 694 2006-10-11 22:55:06Z fraggle $"; #include <stdio.h> @@ -528,7 +528,7 @@ void R_ProjectSprite (mobj_t* thing) // decide which patch to use for sprite relative to player #ifdef RANGECHECK - if ((unsigned)thing->sprite >= numsprites) + if (thing->sprite >= (unsigned int) numsprites) I_Error ("R_ProjectSprite: invalid sprite number %i ", thing->sprite); #endif @@ -681,7 +681,7 @@ void R_DrawPSprite (pspdef_t* psp) // decide which patch to use #ifdef RANGECHECK - if ( (unsigned)psp->state->sprite >= numsprites) + if ( (unsigned)psp->state->sprite >= (unsigned int) numsprites) I_Error ("R_ProjectSprite: invalid sprite number %i ", psp->state->sprite); #endif diff --git a/src/st_lib.c b/src/st_lib.c index 1ad85de4..615cd02d 100644 --- a/src/st_lib.c +++ b/src/st_lib.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: st_lib.c 653 2006-09-22 20:32:00Z fraggle $ +// $Id: st_lib.c 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -36,7 +36,7 @@ static const char -rcsid[] = "$Id: st_lib.c 653 2006-09-22 20:32:00Z fraggle $"; +rcsid[] = "$Id: st_lib.c 694 2006-10-11 22:55:06Z fraggle $"; #include <ctype.h> @@ -266,7 +266,7 @@ STlib_initBinIcon { b->x = x; b->y = y; - b->oldval = 0; + b->oldval = false; b->val = val; b->on = on; b->p = i; @@ -285,7 +285,7 @@ STlib_updateBinIcon int h; if (*bi->on - && (bi->oldval != *bi->val || refresh)) + && (bi->oldval != *bi->val || refresh)) { x = bi->x - SHORT(bi->p->leftoffset); y = bi->y - SHORT(bi->p->topoffset); diff --git a/src/st_lib.h b/src/st_lib.h index 8f1f3da0..3ba1ff27 100644 --- a/src/st_lib.h +++ b/src/st_lib.h @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: st_lib.h 8 2005-07-23 16:44:57Z fraggle $ +// $Id: st_lib.h 694 2006-10-11 22:55:06Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -129,7 +129,7 @@ typedef struct int y; // last icon value - int oldval; + boolean oldval; // pointer to current icon status boolean* val; |