Mostly whitespace, some type fixing, and boostrap/configure fixes.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2007-12-16 18:28:03 +00:00
parent 9d7ee224d2
commit 451ad97dfa
8 changed files with 153 additions and 166 deletions

View file

@ -20,6 +20,8 @@ fi
# when one can just read the README
aclocal && \
autoheader && \
touch ltconfig && \
libtoolize --copy --automake && \
automake --foreign --add-missing --copy && \
touch depcomp && \
autoconf

View file

@ -5,6 +5,8 @@ AC_CONFIG_AUX_DIR(.)
AC_CONFIG_SRCDIR(src/main.c)
AM_CONFIG_HEADER(config.h)
AM_PROG_AS
AC_CANONICAL_SYSTEM
AC_DEFINE_UNQUOTED(BUILDHOST, "${target_cpu}-${target_os}",
[Set to the canonical name of the target machine])

View file

@ -1434,7 +1434,7 @@ void GL_InitImages(void){
Draw_GetPalette();
if( qglColorTableEXT){
ri.FS_LoadFile( "pics/16to8.dat",(void **)&gl_state.d_16to8table);
ri.FS_LoadFile( "pics/16to8.dat",(void **)(char *)&gl_state.d_16to8table);
if( !gl_state.d_16to8table)
ri.Sys_Error( ERR_FATAL, "Couldn't load pics/16to8.pcx");
}

View file

@ -42,16 +42,14 @@ static int buffer_bytes;
/*
* The sample rates which will be attempted.
*/
static int RATES[] = {
44100, 22050, 11025, 8000
};
static int RATES[] = { 48000, 44100, 22050, 11025, 8000 };
/*
* Initialize ALSA pcm device, and bind it to sndinfo.
*/
qboolean SNDDMA_Init(struct sndinfo *s){
int i, r, err, dir;
int i, err, dir;
unsigned int r;
si = s;
if(!strcmp(si->device->string, "/dev/dsp")) //silly oss default
@ -85,7 +83,6 @@ qboolean SNDDMA_Init(struct sndinfo *s){
si->dma->samplebits = si->bits->value;
if(si->dma->samplebits != 8){ //try 16 by default
si->dma->samplebits = 16; //ensure this is set for other calculations
if((err = snd_pcm_hw_params_set_format(pcm_handle, hw_params,
@ -105,7 +102,6 @@ qboolean SNDDMA_Init(struct sndinfo *s){
si->dma->speed =(int)si->speed->value;
if(si->dma->speed){ //try specified rate
r = si->dma->speed;
if((err = snd_pcm_hw_params_set_rate_near(pcm_handle, hw_params, &r, &dir)) < 0)
@ -117,9 +113,7 @@ qboolean SNDDMA_Init(struct sndinfo *s){
}
}
if(!si->dma->speed){ //or all available ones
for(i = 0; i < sizeof(RATES); i++){
r = RATES[i];
dir = 0;
@ -196,7 +190,6 @@ qboolean SNDDMA_Init(struct sndinfo *s){
* Returns the current sample position, if sound is running.
*/
int SNDDMA_GetDMAPos(void){
if(si->dma->buffer)
return si->dma->samplepos;
@ -208,7 +201,6 @@ int SNDDMA_GetDMAPos(void){
* Closes the ALSA pcm device and frees the dma buffer.
*/
void SNDDMA_Shutdown(void){
if(si->dma->buffer){
snd_pcm_drop(pcm_handle);
snd_pcm_close(pcm_handle);

View file

@ -447,10 +447,9 @@ __declspec( naked) void S_PaintChannelFrom8(channel_t *ch, sfxcache_t *sc, int c
#else /* HAVE_MASM */
# ifndef USE_ASM
void S_PaintChannelFrom8(channel_t *ch, sfxcache_t *sc, int count, int offset){
int data;
int data, i;
int *lscale, *rscale;
unsigned char *sfx;
int i;
portable_samplepair_t *samp;
if(ch->leftvol > 255)
@ -462,7 +461,7 @@ void S_PaintChannelFrom8(channel_t *ch, sfxcache_t *sc, int count, int offset){
//as it would always be zero.
lscale = snd_scaletable[ch->leftvol >> 3];
rscale = snd_scaletable[ch->rightvol >> 3];
sfx =(signed char *)sc->data + ch->pos;
sfx = (unsigned char *)sc->data + ch->pos;
samp = &paintbuffer[offset];

View file

@ -110,7 +110,6 @@ void SV_New_f(void){
MSG_WriteByte(&sv_client->netchan.message, svc_stufftext);
MSG_WriteString(&sv_client->netchan.message, va("cmd configstrings %i 0\n", svs.spawncount));
}
}
/*
@ -242,9 +241,7 @@ SV_NextDownload_f
==================
*/
void SV_NextDownload_f(void){
int r;
int percent;
int size;
int percent, size, r;
if(!sv_client->download)
return;
@ -319,7 +316,7 @@ void SV_BeginDownload_f(void){
if(sv_client->download)
FS_FreeFile(sv_client->download);
sv_client->downloadsize = FS_LoadFile(name,(void **) & sv_client->download);
sv_client->downloadsize = FS_LoadFile(name, (void **)(char *)&sv_client->download);
sv_client->downloadcount = offset;
if(offset > sv_client->downloadsize)
@ -379,7 +376,6 @@ void SV_ShowServerinfo_f(void){
}
for(cvar = cvar_vars; cvar; cvar = cvar->next){
if(!(cvar->flags & CVAR_SERVERINFO))
continue; //only print serverinfo cvars
@ -600,21 +596,16 @@ void SV_ExecuteClientMessage(client_t *cl){
if(!paused->value){
net_drop = cl->netchan.dropped;
if(net_drop < 20){
// if(net_drop > 2)
// Com_Printf("drop %i\n", net_drop);
while(net_drop > 2){
SV_ClientThink(cl, &cl->lastcmd);
net_drop--;
}
if(net_drop > 1)
SV_ClientThink(cl, &oldest);
if(net_drop > 0)
SV_ClientThink(cl, &oldcmd);
}
SV_ClientThink(cl, &newcmd);
}
@ -635,4 +626,3 @@ void SV_ExecuteClientMessage(client_t *cl){
}
}
}

View file

@ -224,6 +224,7 @@ void VID_MenuInit( void){
"[1152 768 ]", /* apple tibook */
"[1280 854 ]", /* apple tibook */
"[1440 900 ]", /* apple powerbook g4 17" */
"[1680 1050]", /* 20" widescreen LCD */
0
};
static const char *refs[] = {

View file

@ -166,7 +166,8 @@ vidmode_t vid_modes[] = {
{ "Mode 11: 1024x480", 1024, 480, 11 }, /* Sony VAIO Pocketbook */
{ "Mode 12: 1152x768", 1152, 768, 12 }, /* Apple TiBook */
{ "Mode 13: 1280x854", 1280, 854, 13 }, /* Apple TiBook */
{ "Mode 14: 1440x900", 1440, 900, 14 } /* Apple 17" Powerbook G4 */
{ "Mode 14: 1440x900", 1440, 900, 14 }, /* Apple 17" Powerbook G4 */
{ "Mode 15: 1680x1050", 1680, 1050, 15 } /* 20" widescreen LCD */
};
qboolean VID_GetModeInfo( unsigned int *width, unsigned int *height, int mode){