mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 01:42:04 +00:00
gcc-4.0 fixes. even found some bugs :) (names /not/ mangled this time)
This commit is contained in:
parent
fd54b1a245
commit
501180aaac
45 changed files with 100 additions and 100 deletions
|
@ -141,6 +141,4 @@ void Menu_KeyEvent (knum_t key, short unicode, qboolean down);
|
|||
void Menu_Enter (void);
|
||||
void Menu_Leave (void);
|
||||
|
||||
extern struct cvar_s *con_size;
|
||||
|
||||
#endif // __console_h
|
||||
|
|
|
@ -51,8 +51,8 @@ typedef struct snd_output_funcs_s {
|
|||
} snd_output_funcs_t;
|
||||
|
||||
typedef struct snd_output_data_s {
|
||||
int *soundtime;
|
||||
int *paintedtime;
|
||||
unsigned *soundtime;
|
||||
unsigned *paintedtime;
|
||||
} snd_output_data_t;
|
||||
|
||||
#endif // __QF_plugin_snd_output_h_
|
||||
|
|
|
@ -84,8 +84,8 @@ typedef struct snd_render_data_s {
|
|||
double *host_frametime;
|
||||
int *viewentity;
|
||||
|
||||
int *soundtime;
|
||||
int *paintedtime;
|
||||
unsigned int *soundtime;
|
||||
unsigned int *paintedtime;
|
||||
struct plugin_s *output;
|
||||
} snd_render_data_t;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "QF/quakeio.h"
|
||||
|
||||
typedef struct riff_d_chunk_s {
|
||||
unsigned char name[4];
|
||||
char name[4];
|
||||
unsigned len;
|
||||
} riff_d_chunk_t;
|
||||
|
||||
|
@ -107,8 +107,10 @@ typedef struct riff_list_s {
|
|||
} riff_list_t;
|
||||
typedef riff_list_t riff_t; // a riff file is one huge list chunk
|
||||
|
||||
#define RIFF_SWITCH(name) switch (((name)[0] << 24) | ((name)[1] << 16) \
|
||||
| ((name)[2] << 8) | (name)[3])
|
||||
#define RIFF_SWITCH(name) switch ((((unsigned char) (name)[0]) << 24) \
|
||||
| (((unsigned char) (name)[1]) << 16) \
|
||||
| (((unsigned char) (name)[2]) << 8) \
|
||||
| ((unsigned char) (name)[3]))
|
||||
#define RIFF_CASE(a,b,c,d) (((unsigned char)(a) << 24) \
|
||||
| ((unsigned char)(b) << 16) \
|
||||
| ((unsigned char)(c) << 8) \
|
||||
|
|
|
@ -112,32 +112,14 @@ struct channel_s *S_AllocChannel (void);
|
|||
// number of times S_Update() is called per second.
|
||||
//
|
||||
|
||||
extern qboolean fakedma;
|
||||
extern int fakedma_updates;
|
||||
extern unsigned paintedtime;
|
||||
extern unsigned soundtime;
|
||||
extern vec3_t listener_origin;
|
||||
extern vec3_t listener_forward;
|
||||
extern vec3_t listener_right;
|
||||
extern vec3_t listener_up;
|
||||
extern vec_t sound_nominal_clip_dist;
|
||||
|
||||
extern struct cvar_s *snd_loadas8bit;
|
||||
extern struct cvar_s *bgmvolume;
|
||||
extern struct cvar_s *volume;
|
||||
|
||||
extern struct cvar_s *snd_mixahead;
|
||||
extern struct cvar_s *snd_device;
|
||||
extern struct cvar_s *snd_rate;
|
||||
extern struct cvar_s *snd_bits;
|
||||
extern struct cvar_s *snd_stereo;
|
||||
extern struct cvar_s *snd_interp;
|
||||
extern struct cvar_s *snd_stereo_phase_separation;
|
||||
|
||||
extern qboolean snd_initialized;
|
||||
|
||||
extern int snd_blocked;
|
||||
|
||||
void S_LocalSound (const char *s);
|
||||
|
||||
void S_AmbientOff (void);
|
||||
|
|
|
@ -51,12 +51,10 @@ extern Visual *x_vis;
|
|||
extern Window x_root;
|
||||
extern Window x_win;
|
||||
extern XVisualInfo *x_visinfo;
|
||||
extern vec3_t x_gamma;
|
||||
extern int x_screen;
|
||||
extern int x_shmeventtype;
|
||||
extern Time x_time;
|
||||
extern Time x_mouse_time;
|
||||
extern qboolean doShm;
|
||||
extern qboolean oktodraw;
|
||||
extern qboolean x_have_focus;
|
||||
|
||||
|
|
|
@ -76,8 +76,8 @@ qboolean NET_IsClientLegal(netadr_t *adr);
|
|||
|
||||
int Net_Log_Init (const char **sound_precache);
|
||||
void Net_LogPrintf (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
void Log_Incoming_Packet (const char *p, int len, int has_sequence);
|
||||
void Log_Outgoing_Packet (const char *p, int len, int has_sequence);
|
||||
void Log_Incoming_Packet (const byte *p, int len, int has_sequence);
|
||||
void Log_Outgoing_Packet (const byte *p, int len, int has_sequence);
|
||||
void Net_LogStop (void);
|
||||
void Analyze_Client_Packet (const byte * data, int len, int has_sequence);
|
||||
void Analyze_Server_Packet (const byte * data, int len, int has_sequence);
|
||||
|
|
|
@ -73,6 +73,8 @@ get_info (void * handle) {
|
|||
wavinfo_t info;
|
||||
struct _WM_Info *wm_info;
|
||||
|
||||
memset (&info, 0, sizeof (info));
|
||||
|
||||
if ((wm_info = WildMidi_GetInfo (handle)) == NULL) {
|
||||
Sys_Printf ("Could not obtain midi information\n");
|
||||
return info;
|
||||
|
|
|
@ -268,7 +268,7 @@ snd_paint_mono_8 (int offs, channel_t *ch, void *bytes, unsigned int count)
|
|||
|
||||
lscale = snd_scaletable[ch->leftvol >> 3];
|
||||
rscale = snd_scaletable[ch->rightvol >> 3];
|
||||
sfx = (signed char *) bytes;
|
||||
sfx = (unsigned char *) bytes;
|
||||
|
||||
pair = paintbuffer + offs;
|
||||
|
||||
|
|
|
@ -133,7 +133,8 @@ vorbis_read (OggVorbis_File *vf, byte *buf, int len)
|
|||
int current_section;
|
||||
|
||||
while (len) {
|
||||
int res = ov_read (vf, buf, len, 0, 2, 1, ¤t_section);
|
||||
int res = ov_read (vf, (char *) buf, len, 0, 2, 1,
|
||||
¤t_section);
|
||||
if (res > 0) {
|
||||
count += res;
|
||||
len -= res;
|
||||
|
|
|
@ -212,8 +212,7 @@ get_info (QFile *file)
|
|||
|
||||
wavinfo_t info;
|
||||
|
||||
|
||||
info.rate = 0;
|
||||
memset (&info, 0, sizeof (info));
|
||||
|
||||
if (!(riff = riff_read (file))) {
|
||||
Sys_Printf ("bad riff file\n");
|
||||
|
|
|
@ -70,7 +70,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
|||
|
||||
#include "compat.h"
|
||||
|
||||
static console_data_t con_data;
|
||||
console_data_t con_data;
|
||||
|
||||
static QFile *log_file;
|
||||
static cvar_t *sv_logfile;
|
||||
|
@ -346,7 +346,7 @@ C_Print (const char *fmt, va_list args)
|
|||
|
||||
dvsprintf (buffer, fmt, args);
|
||||
|
||||
txt = buffer->str;
|
||||
txt = (unsigned char *) buffer->str;
|
||||
|
||||
if (log_file) {
|
||||
Qputs (log_file, buffer->str);
|
||||
|
|
|
@ -192,7 +192,8 @@ Object_Class_Children_f (gib_object_t *obj, gib_method_t *method, void *data,
|
|||
unsigned int size;
|
||||
unsigned int i = 0;
|
||||
|
||||
static qboolean
|
||||
auto qboolean iterator (gib_class_t *class, void *unused);
|
||||
qboolean
|
||||
iterator (gib_class_t *class, void *unused)
|
||||
{
|
||||
reply[i++] = class->name;
|
||||
|
@ -610,13 +611,15 @@ GIB_Classes_Build_Scripted (const char *name, const char *parentname,
|
|||
gib_classdesc_t desc;
|
||||
enum {CLASS, INSTANCE} mode = INSTANCE;
|
||||
|
||||
static void
|
||||
auto void mtabfree (void *mtab, void *unused);
|
||||
void
|
||||
mtabfree (void *mtab, void *unused)
|
||||
{
|
||||
free (mtab);
|
||||
}
|
||||
|
||||
static const char *
|
||||
auto const char *fname (const char *str);
|
||||
const char *
|
||||
fname (const char *str)
|
||||
{
|
||||
if (mode == INSTANCE)
|
||||
|
|
|
@ -169,7 +169,8 @@ GIB_Function_Prepare_Args (cbuf_t * cbuf, const char **args, unsigned int
|
|||
gib_var_t *var;
|
||||
static char argss[] = "args";
|
||||
|
||||
static qboolean
|
||||
auto qboolean iterate (char *arg, llist_node_t *node);
|
||||
qboolean
|
||||
iterate (char *arg, llist_node_t *node)
|
||||
{
|
||||
var = GIB_Var_Get_Complex (&GIB_DATA(cbuf)->locals, &zero,
|
||||
|
@ -207,7 +208,8 @@ GIB_Function_Prepare_Args_D (cbuf_t * cbuf, dstring_t **args, unsigned int
|
|||
gib_var_t *var;
|
||||
static char argss[] = "args";
|
||||
|
||||
static qboolean
|
||||
auto qboolean iterate (char *arg, llist_node_t *node);
|
||||
qboolean
|
||||
iterate (char *arg, llist_node_t *node)
|
||||
{
|
||||
var = GIB_Var_Get_Complex (&GIB_DATA(cbuf)->locals, &zero,
|
||||
|
|
|
@ -89,7 +89,9 @@ GIB_Thread_Count (void)
|
|||
void
|
||||
GIB_Thread_Execute (void)
|
||||
{
|
||||
static qboolean iterator (cbuf_t *cbuf, llist_node_t *node)
|
||||
auto qboolean iterator (cbuf_t *cbuf, llist_node_t *node);
|
||||
qboolean
|
||||
iterator (cbuf_t *cbuf, llist_node_t *node)
|
||||
{
|
||||
if (GIB_DATA(cbuf)->program)
|
||||
Cbuf_Execute_Stack (cbuf);
|
||||
|
|
|
@ -3839,7 +3839,8 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
|
|||
/* Compare that many; failure if mismatch, else move
|
||||
past them. */
|
||||
if (translate
|
||||
? bcmp_translate (d, d2, mcnt, translate)
|
||||
? bcmp_translate ((unsigned char *) d,
|
||||
(unsigned char *) d2, mcnt, translate)
|
||||
: bcmp (d, d2, mcnt))
|
||||
goto fail;
|
||||
d += mcnt, d2 += mcnt;
|
||||
|
|
|
@ -364,7 +364,7 @@ UDP_CheckNewConnections (void)
|
|||
int
|
||||
UDP_Read (int socket, byte * buf, int len, struct qsockaddr *addr)
|
||||
{
|
||||
int addrlen = sizeof (struct qsockaddr);
|
||||
size_t addrlen = sizeof (struct qsockaddr);
|
||||
int ret;
|
||||
|
||||
ret = recvfrom (socket, buf, len, 0, (struct sockaddr *) addr, &addrlen);
|
||||
|
@ -451,7 +451,7 @@ int
|
|||
UDP_GetSocketAddr (int socket, struct qsockaddr *addr)
|
||||
{
|
||||
unsigned int a;
|
||||
int addrlen = sizeof (struct qsockaddr);
|
||||
size_t addrlen = sizeof (struct qsockaddr);
|
||||
|
||||
memset (addr, 0, sizeof (struct qsockaddr));
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ Info_SetValueForStarKey (info_t *info, const char *key, const char *value,
|
|||
}
|
||||
if (!(str = strdup (value)))
|
||||
Sys_Error ("Info_SetValueForStarKey: out of memory");
|
||||
for (d = s = str; *s; s++) {
|
||||
for (d = s = (byte *) str; *s; s++) {
|
||||
if (flags & 1) {
|
||||
*s &= 127;
|
||||
if (*s < 32)
|
||||
|
|
|
@ -300,7 +300,7 @@ MSG_ReadString (qmsg_t *msg)
|
|||
return "";
|
||||
}
|
||||
|
||||
string = &msg->message->data[msg->readcount];
|
||||
string = (char *) &msg->message->data[msg->readcount];
|
||||
|
||||
maxlen = msg->message->cursize - msg->readcount;
|
||||
len = strnlen (string, maxlen);
|
||||
|
|
|
@ -61,7 +61,7 @@ init_quotables (void)
|
|||
"abcdefghijklmnopqrstuvwxyz!#$%&*+-./:?@|~_^";
|
||||
const byte *c;
|
||||
memset (quotable_bitmap, ~0, sizeof (quotable_bitmap));
|
||||
for (c = unquotables; *c; c++)
|
||||
for (c = (byte *) unquotables; *c; c++)
|
||||
quotable_bitmap[*c / 8] &= ~(1 << (*c % 8));
|
||||
}
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ enter_notify (XEvent *event)
|
|||
static void
|
||||
XLateKey (XKeyEvent * ev, int *k, int *u)
|
||||
{
|
||||
unsigned char buffer[4];
|
||||
char buffer[4];
|
||||
int bytes, unicode;
|
||||
int key = 0;
|
||||
KeySym keysym, shifted_keysym;
|
||||
|
@ -197,7 +197,7 @@ XLateKey (XKeyEvent * ev, int *k, int *u)
|
|||
keysym = XLookupKeysym (ev, 0);
|
||||
bytes = XLookupString (ev, buffer, sizeof(buffer), &shifted_keysym,
|
||||
&compose);
|
||||
unicode = buffer[0];
|
||||
unicode = (byte) buffer[0];
|
||||
|
||||
switch (keysym) {
|
||||
case XK_KP_Page_Up:
|
||||
|
|
|
@ -132,7 +132,7 @@ GLF_FindFunctions (void)
|
|||
string. Don't be fooled by sub-strings, etc.
|
||||
*/
|
||||
static qboolean
|
||||
QFGL_ParseExtensionList (const GLubyte * list, const char *name)
|
||||
QFGL_ParseExtensionList (const GLubyte *list, const char *name)
|
||||
{
|
||||
const char *start;
|
||||
char *where, *terminator;
|
||||
|
@ -141,11 +141,11 @@ QFGL_ParseExtensionList (const GLubyte * list, const char *name)
|
|||
return 0;
|
||||
|
||||
// Extension names must not have spaces.
|
||||
where = (GLubyte *) strchr (name, ' ');
|
||||
where = strchr (name, ' ');
|
||||
if (where || *name == '\0')
|
||||
return 0;
|
||||
|
||||
start = list;
|
||||
start = (const char *) list;
|
||||
for (;;) {
|
||||
where = strstr (start, name);
|
||||
if (!where)
|
||||
|
|
|
@ -313,7 +313,7 @@ GL_Common_Init_Cvars (void)
|
|||
static void
|
||||
CheckGLVersionString (void)
|
||||
{
|
||||
gl_version = qfglGetString (GL_VERSION);
|
||||
gl_version = (char *) qfglGetString (GL_VERSION);
|
||||
if (sscanf (gl_version, "%d.%d", &gl_major, &gl_minor) == 2) {
|
||||
gl_release_number = 0;
|
||||
if (gl_major >= 1) {
|
||||
|
@ -337,11 +337,11 @@ CheckGLVersionString (void)
|
|||
}
|
||||
Con_Printf ("GL_VERSION: %s\n", gl_version);
|
||||
|
||||
gl_vendor = qfglGetString (GL_VENDOR);
|
||||
gl_vendor = (char *) qfglGetString (GL_VENDOR);
|
||||
Con_Printf ("GL_VENDOR: %s\n", gl_vendor);
|
||||
gl_renderer = qfglGetString (GL_RENDERER);
|
||||
gl_renderer = (char *) qfglGetString (GL_RENDERER);
|
||||
Con_Printf ("GL_RENDERER: %s\n", gl_renderer);
|
||||
gl_extensions = qfglGetString (GL_EXTENSIONS);
|
||||
gl_extensions = (char *) qfglGetString (GL_EXTENSIONS);
|
||||
Con_Printf ("GL_EXTENSIONS: %s\n", gl_extensions);
|
||||
|
||||
if (strstr (gl_renderer, "Mesa DRI Mach64"))
|
||||
|
|
|
@ -92,7 +92,7 @@ static int fbdev_backgrounded = 0;
|
|||
static cvar_t *vid_redrawfull;
|
||||
static cvar_t *vid_waitforrefresh;
|
||||
|
||||
static char *framebuffer_ptr;
|
||||
static byte *framebuffer_ptr;
|
||||
|
||||
static byte backingbuf[48 * 24];
|
||||
|
||||
|
@ -321,7 +321,7 @@ VID_SetMode (const char *name, unsigned char *palette)
|
|||
smem_start = (unsigned long)fix.smem_start & PAGE_MASK;
|
||||
smem_offset = (unsigned long)fix.smem_start & ~PAGE_MASK;
|
||||
fb_map_length = (smem_offset+fix.smem_len+~PAGE_MASK) & PAGE_MASK;
|
||||
fb_map_addr = (char *)mmap(0, fb_map_length, PROT_WRITE, MAP_SHARED,
|
||||
fb_map_addr = mmap(0, fb_map_length, PROT_WRITE, MAP_SHARED,
|
||||
fb_fd, 0);
|
||||
if (!fb_map_addr)
|
||||
Sys_Error ("This mode isn't hapnin'");
|
||||
|
|
|
@ -70,7 +70,7 @@ static vga_modeinfo *modes;
|
|||
|
||||
static byte vid_current_palette[768];
|
||||
static byte backingbuf[48 * 24];
|
||||
static char *framebuffer_ptr;
|
||||
static byte *framebuffer_ptr;
|
||||
|
||||
static int svgalib_inited = 0;
|
||||
static int svgalib_backgrounded = 0;
|
||||
|
@ -322,7 +322,7 @@ VID_SetMode (int modenum, unsigned char *palette)
|
|||
}
|
||||
VID_SetPalette (palette);
|
||||
|
||||
VGA_pagebase = vid.direct = framebuffer_ptr = (char *) vga_getgraphmem ();
|
||||
VGA_pagebase = vid.direct = framebuffer_ptr = vga_getgraphmem ();
|
||||
#if 0
|
||||
if (vga_setlinearaddressing () > 0) {
|
||||
framebuffer_ptr = (char *) vga_getgraphmem ();
|
||||
|
|
|
@ -446,7 +446,7 @@ SV_DropClient (qboolean crash)
|
|||
void
|
||||
Host_ShutdownServer (qboolean crash)
|
||||
{
|
||||
char message[4];
|
||||
byte message[4];
|
||||
double start;
|
||||
int count, i;
|
||||
sizebuf_t buf;
|
||||
|
|
|
@ -709,7 +709,7 @@ Host_Say (qboolean teamonly)
|
|||
client_t *save;
|
||||
int j;
|
||||
char *p;
|
||||
unsigned char text[64];
|
||||
char text[64];
|
||||
qboolean fromServer = false;
|
||||
|
||||
if (cmd_source == src_command) {
|
||||
|
|
|
@ -850,7 +850,7 @@ SV_CreateBaseline (void)
|
|||
static void
|
||||
SV_SendReconnect (void)
|
||||
{
|
||||
char data[128];
|
||||
byte data[128];
|
||||
sizebuf_t msg;
|
||||
|
||||
msg.data = data;
|
||||
|
@ -1012,7 +1012,7 @@ SV_SpawnServer (const char *server)
|
|||
*sv_globals.serverflags = svs.serverflags;
|
||||
|
||||
*sv_globals.time = sv.time;
|
||||
if ((buf = QFS_LoadFile (va ("maps/%s.ent", server), 0))) {
|
||||
if ((buf = (char *) QFS_LoadFile (va ("maps/%s.ent", server), 0))) {
|
||||
ED_LoadFromFile (&sv_pr_state, buf);
|
||||
free (buf);
|
||||
} else {
|
||||
|
|
|
@ -209,7 +209,7 @@ typedef struct client_s {
|
|||
// back buffers for client reliable data
|
||||
backbuf_t backbuf;
|
||||
|
||||
byte stufftext_buf[MAX_STUFFTEXT];
|
||||
char stufftext_buf[MAX_STUFFTEXT];
|
||||
|
||||
double connection_started; // or time of disconnect for zombies
|
||||
qboolean send_message; // set on frames a datagram arived on
|
||||
|
|
|
@ -66,7 +66,9 @@ CL_Ignore_Compare (const void *ele, const void *cmp, void *unused)
|
|||
static void
|
||||
CL_Ignore_Sanity_Check (void)
|
||||
{
|
||||
static qboolean iterator (ignore_t *ig, llist_node_t *node)
|
||||
auto qboolean iterator (ignore_t *ig, llist_node_t *node);
|
||||
qboolean
|
||||
iterator (ignore_t *ig, llist_node_t *node)
|
||||
{
|
||||
if (cl.players[ig->slot].userid != ig->uid) // We got out of sync somehow
|
||||
llist_remove (node);
|
||||
|
@ -80,12 +82,14 @@ CL_Ignore_f (void)
|
|||
{
|
||||
CL_Ignore_Sanity_Check ();
|
||||
if (Cmd_Argc () == 1) {
|
||||
static qboolean live_iterator (ignore_t *ig, llist_node_t *node)
|
||||
auto qboolean live_iterator (ignore_t *ig, llist_node_t *node);
|
||||
qboolean live_iterator (ignore_t *ig, llist_node_t *node)
|
||||
{
|
||||
Sys_Printf ("%5i - %s\n", ig->uid, Info_ValueForKey (cl.players[ig->slot].userinfo, "name"));
|
||||
return true;
|
||||
}
|
||||
static qboolean dead_iterator (ignore_t *ig, llist_node_t *node)
|
||||
auto qboolean dead_iterator (ignore_t *ig, llist_node_t *node);
|
||||
qboolean dead_iterator (ignore_t *ig, llist_node_t *node)
|
||||
{
|
||||
Sys_Printf ("%s\n", ig->lastname);
|
||||
return true;
|
||||
|
@ -145,7 +149,8 @@ CL_Chat_Allow_Message (const char *str)
|
|||
dstring_t *test = dstring_newstr ();
|
||||
qboolean allowed = true;
|
||||
|
||||
static qboolean iterator (ignore_t *ig, llist_node_t *node)
|
||||
auto qboolean iterator (ignore_t *ig, llist_node_t *node);
|
||||
qboolean iterator (ignore_t *ig, llist_node_t *node)
|
||||
{
|
||||
if (cl.players[ig->slot].userid != ig->uid) { // We got out of sync somehow
|
||||
llist_remove (node);
|
||||
|
@ -183,7 +188,8 @@ CL_Chat_Check_Name (const char *name, int slot)
|
|||
{
|
||||
ignore_t *found = 0;
|
||||
|
||||
static qboolean iterator (ignore_t *ig, llist_node_t *node)
|
||||
auto qboolean iterator (ignore_t *ig, llist_node_t *node);
|
||||
qboolean iterator (ignore_t *ig, llist_node_t *node)
|
||||
{
|
||||
if (!strcmp (ig->lastname, name)) {
|
||||
found = ig;
|
||||
|
|
|
@ -512,7 +512,7 @@ CL_WriteSetDemoMessage (void)
|
|||
void
|
||||
CL_Record (const char *argv1)
|
||||
{
|
||||
char buf_data[MAX_MSGLEN + 10]; // + 10 for header
|
||||
byte buf_data[MAX_MSGLEN + 10]; // + 10 for header
|
||||
char name[MAX_OSPATH];
|
||||
char *s;
|
||||
char timestring[20];
|
||||
|
|
|
@ -485,7 +485,7 @@ CL_Disconnect (void)
|
|||
CL_Stop_f ();
|
||||
|
||||
final[0] = clc_stringcmd;
|
||||
strcpy (final + 1, "drop");
|
||||
strcpy ((char *) final + 1, "drop");
|
||||
Netchan_Transmit (&cls.netchan, 6, final);
|
||||
Netchan_Transmit (&cls.netchan, 6, final);
|
||||
Netchan_Transmit (&cls.netchan, 6, final);
|
||||
|
|
|
@ -225,7 +225,7 @@ ascii_dump_buf (unsigned char *buf, int len)
|
|||
}
|
||||
*/
|
||||
void
|
||||
Log_Incoming_Packet (const char *p, int len, int has_sequence)
|
||||
Log_Incoming_Packet (const byte *p, int len, int has_sequence)
|
||||
{
|
||||
if (!net_loglevel->int_val)
|
||||
return;
|
||||
|
@ -249,7 +249,7 @@ Log_Incoming_Packet (const char *p, int len, int has_sequence)
|
|||
}
|
||||
|
||||
void
|
||||
Log_Outgoing_Packet (const char *p, int len, int has_sequence)
|
||||
Log_Outgoing_Packet (const byte *p, int len, int has_sequence)
|
||||
{
|
||||
if (!net_loglevel->int_val)
|
||||
return;
|
||||
|
@ -281,6 +281,8 @@ Log_Delta (int bits)
|
|||
// set everything to the state we are delta'ing from
|
||||
|
||||
to.number = bits & 511;
|
||||
to.frame = 0;
|
||||
to.effects = 0;
|
||||
bits &= ~511;
|
||||
|
||||
if (bits & U_MOREBITS) { // read in the low order bits
|
||||
|
|
|
@ -228,6 +228,8 @@ PM_PlayerMove (const vec3_t start, const vec3_t end)
|
|||
if (pe->hull) {
|
||||
hull = pe->hull;
|
||||
check_box = 0;
|
||||
VectorZero (mins);
|
||||
VectorZero (maxs);
|
||||
} else {
|
||||
check_box = 1;
|
||||
if (pe->model) {
|
||||
|
|
|
@ -1136,7 +1136,7 @@ Sbar_LogFrags (void)
|
|||
fph = calc_fph (f, total);
|
||||
|
||||
name = malloc (strlen (s->name) + 1);
|
||||
for (cp = s->name, d = 0; *cp; cp++, d++)
|
||||
for (cp = (byte *) s->name, d = 0; *cp; cp++, d++)
|
||||
name[d] = sys_char_map[*cp];
|
||||
name[d] = 0;
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ static void
|
|||
SV_Record (char *name)
|
||||
{
|
||||
sizebuf_t buf;
|
||||
char buf_data[MAX_MSGLEN];
|
||||
byte buf_data[MAX_MSGLEN];
|
||||
int n, i;
|
||||
const char *info;
|
||||
|
||||
|
@ -599,7 +599,7 @@ SV_Record (char *name)
|
|||
*/
|
||||
|
||||
static char *
|
||||
SV_CleanName (const unsigned char *name)
|
||||
SV_CleanName (const char *name)
|
||||
{
|
||||
static char *text;
|
||||
static size_t text_len;
|
||||
|
@ -612,7 +612,7 @@ SV_CleanName (const unsigned char *name)
|
|||
|
||||
out = text;
|
||||
do {
|
||||
c = sys_char_map[*name++];
|
||||
c = sys_char_map[(byte) *name++];
|
||||
if (c != '_')
|
||||
*out++ = c;
|
||||
} while (c);
|
||||
|
|
|
@ -414,7 +414,7 @@ SV_SpawnServer (const char *server)
|
|||
|
||||
// load and spawn all other entities
|
||||
*sv_globals.time = sv.time;
|
||||
if ((buf = QFS_LoadFile (va ("maps/%s.ent", server), 0))) {
|
||||
if ((buf = (char *) QFS_LoadFile (va ("maps/%s.ent", server), 0))) {
|
||||
ED_LoadFromFile (&sv_pr_state, buf);
|
||||
free (buf);
|
||||
} else {
|
||||
|
|
|
@ -229,7 +229,7 @@ PF_str2byte (progs_t * pr)
|
|||
static void
|
||||
PF_str2short (progs_t * pr)
|
||||
{
|
||||
const unsigned char *str = P_GSTRING (pr, 0);
|
||||
const byte *str = (byte *) P_GSTRING (pr, 0);
|
||||
|
||||
R_FLOAT (pr) = (short) ((str[1] << 8) | str[0]);
|
||||
}
|
||||
|
@ -429,10 +429,10 @@ PF_strstr (progs_t * pr)
|
|||
}
|
||||
|
||||
static inline void
|
||||
clean_text (unsigned char *text)
|
||||
clean_text (char *text)
|
||||
{
|
||||
while (*text) {
|
||||
*text = sys_char_map[*text];
|
||||
*text = sys_char_map[(byte) *text];
|
||||
text++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,7 +171,8 @@ SV_Print (const char *fmt, va_list args)
|
|||
struct tm *local = NULL;
|
||||
qboolean timestamps = false;
|
||||
|
||||
unsigned char *in, *out;
|
||||
char *in;
|
||||
unsigned char *out;
|
||||
|
||||
vsnprintf (premsg, sizeof (premsg), fmt, args);
|
||||
in = premsg;
|
||||
|
@ -179,7 +180,7 @@ SV_Print (const char *fmt, va_list args)
|
|||
|
||||
// expand FFnickFF to nick <userid>
|
||||
do {
|
||||
switch (*in) {
|
||||
switch ((byte) *in) {
|
||||
case 0xFF: {
|
||||
char *end = strchr (in + 1, 0xFF);
|
||||
int userid = 0;
|
||||
|
@ -197,7 +198,7 @@ SV_Print (const char *fmt, va_list args)
|
|||
break;
|
||||
}
|
||||
}
|
||||
len = snprintf (out, sizeof (msg) - (out - msg),
|
||||
len = snprintf ((char *) out, sizeof (msg) - (out - msg),
|
||||
"%s <%d>", in + 1, userid);
|
||||
out += len;
|
||||
in = end + 1;
|
||||
|
@ -210,7 +211,7 @@ SV_Print (const char *fmt, va_list args)
|
|||
*out = '\0';
|
||||
|
||||
if (sv_redirected) { // Add to redirected message
|
||||
dstring_appendstr (&outputbuf, msg);
|
||||
dstring_appendstr (&outputbuf, (char *) msg);
|
||||
}
|
||||
if (!con_printf_no_log) {
|
||||
// We want to output to console and maybe logfile
|
||||
|
@ -242,8 +243,8 @@ SV_Print (const char *fmt, va_list args)
|
|||
static void
|
||||
SV_PrintToClient (client_t *cl, int level, const char *string)
|
||||
{
|
||||
static unsigned char *buffer;
|
||||
const unsigned char *a;
|
||||
static char *buffer;
|
||||
const char *a;
|
||||
unsigned char *b;
|
||||
int size;
|
||||
static int buffer_size;
|
||||
|
@ -260,7 +261,7 @@ SV_PrintToClient (client_t *cl, int level, const char *string)
|
|||
}
|
||||
|
||||
a = string;
|
||||
b = buffer;
|
||||
b = (byte *) buffer;
|
||||
// strip 0xFFs
|
||||
while ((*b = *a++))
|
||||
if (*b != 0xFF)
|
||||
|
|
|
@ -586,13 +586,14 @@ render_map (bsp_t *bsp)
|
|||
|
||||
e1 = &edgelist[abs (ledges[j])];
|
||||
e2 = &edgelist[abs (ledges[k])];
|
||||
//FIXME verify directions
|
||||
if (ledges[j] > 0) {
|
||||
SUB (vertexlist[e1->v[0]], vertexlist[e1->v[1]], v0);
|
||||
SUB (vertexlist[e2->v[0]], vertexlist[e2->v[1]], v0);
|
||||
SUB (vertexlist[e2->v[0]], vertexlist[e2->v[1]], v1);
|
||||
} else {
|
||||
/* negative index, therefore walk in reverse order */
|
||||
SUB (vertexlist[e1->v[1]], vertexlist[e1->v[0]], v0);
|
||||
SUB (vertexlist[e2->v[1]], vertexlist[e2->v[0]], v0);
|
||||
SUB (vertexlist[e2->v[1]], vertexlist[e2->v[0]], v1);
|
||||
}
|
||||
|
||||
/* cross product */
|
||||
|
|
|
@ -460,7 +460,7 @@ WriteMiptex (void)
|
|||
if (!len)
|
||||
l->dataofs[i] = -1; // didn't find the texture
|
||||
}
|
||||
BSP_AddTextures (bsp, data->str, data->size);
|
||||
BSP_AddTextures (bsp, (byte *) data->str, data->size);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -102,6 +102,4 @@ void clear_selectors (void);
|
|||
|
||||
struct expr_s *method_check_params (method_t *method, struct expr_s *args);
|
||||
|
||||
extern struct hashtab_s *known_methods;
|
||||
|
||||
#endif//__method_h
|
||||
|
|
|
@ -166,7 +166,7 @@ LightWorld (void)
|
|||
VisStats ();
|
||||
RunThreadsOn (LightThread);
|
||||
|
||||
BSP_AddLighting (bsp, lightdata->str, lightdata->size);
|
||||
BSP_AddLighting (bsp, (byte *) lightdata->str, lightdata->size);
|
||||
|
||||
if (options.verbosity >= 0)
|
||||
printf ("lightdatasize: %i\n", bsp->lightdatasize);
|
||||
|
|
|
@ -393,7 +393,7 @@ ClusterFlow (int clusternum)
|
|||
|
||||
i = CompressRow (outbuffer, compressed);
|
||||
cluster->visofs = visdata->size;
|
||||
dstring_append (visdata, compressed, i);
|
||||
dstring_append (visdata, (char *) compressed, i);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -849,7 +849,7 @@ main (int argc, char **argv)
|
|||
printf ("c_chains: %i%s\n", c_chains,
|
||||
options.threads > 1 ? " (not reliable)" :"");
|
||||
|
||||
BSP_AddVisibility (bsp, visdata->str, visdata->size);
|
||||
BSP_AddVisibility (bsp, (byte *) visdata->str, visdata->size);
|
||||
if (options.verbosity >= 0)
|
||||
printf ("visdatasize:%i compressed from %i\n", bsp->visdatasize,
|
||||
originalvismapsize);
|
||||
|
|
|
@ -231,7 +231,7 @@ wad_extract (wad_t *wad, lumpinfo_t *pf)
|
|||
size_t count;
|
||||
int len, i;
|
||||
QFile *file;
|
||||
char buffer[16384];
|
||||
byte buffer[16384];
|
||||
pcx_t *pcx;
|
||||
qpic_t *qpic;
|
||||
miptex_t *mip;
|
||||
|
|
Loading…
Reference in a new issue