git-svn-id: https://svn.eduke32.com/eduke32@849 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-07-10 02:45:24 +00:00
parent 4ddfc3e9d9
commit a6c68170d0
6 changed files with 36 additions and 19 deletions

View File

@ -104,7 +104,7 @@ void initcache(intptr_t dacachestart, int dacachesize)
cac[0].lock = &zerochar;
cacnum = 1;
initprintf("initcache(): Initialized with %d bytes\n", dacachesize);
initprintf("Initialized %.1f megabytes of cache\n", (float)(dacachesize/1024.f/1024.f));
}
void allocache(intptr_t *newhandle, int newbytes, char *newlockptr)

View File

@ -212,9 +212,11 @@ int main(int argc, char *argv[])
//
int initsystem(void)
{
/*
#ifdef DEBUGGINGAIDS
const SDL_VideoInfo *vid;
#endif
*/
const SDL_version *linked = SDL_Linked_Version();
SDL_version compiled;
char drvname[32];
@ -272,6 +274,7 @@ int initsystem(void)
if (SDL_VideoDriverName(drvname, 32))
initprintf("Using \"%s\" video driver\n", drvname);
/*
// dump a quick summary of the graphics hardware
#ifdef DEBUGGINGAIDS
vid = SDL_GetVideoInfo();
@ -287,7 +290,7 @@ int initsystem(void)
initprintf(" Accelerated colour fills? %s\n", (vid->blit_fill)?"Yes":"No");
initprintf(" Total video memory: %dKB\n", vid->video_mem);
#endif
*/
return 0;
}
@ -734,7 +737,7 @@ void getvalidmodes(void)
if (modeschecked) return;
validmodecnt=0;
initprintf("Detecting video modes:\n");
// initprintf("Detecting video modes:\n");
#define ADDMODE(x,y,c,f) if (validmodecnt<MAXVALIDMODES) { \
int mn; \
@ -747,7 +750,7 @@ void getvalidmodes(void)
validmode[validmodecnt].bpp=c; \
validmode[validmodecnt].fs=f; \
validmodecnt++; \
initprintf(" - %dx%d %d-bit %s\n", x, y, c, (f&1)?"fullscreen":"windowed"); \
/*initprintf(" - %dx%d %d-bit %s\n", x, y, c, (f&1)?"fullscreen":"windowed");*/ \
} \
}

View File

@ -1896,7 +1896,7 @@ static void ReadPaletteTable()
kread(fp,REALMSpalette,768);
kread(fp,BOSS1palette,768);
kclose(fp);
initprintf("success.\n");
// initprintf("success.\n");
}// end ReadPaletteTable
static void ReadGamePalette()
@ -1910,11 +1910,11 @@ static void ReadGamePalette()
wm_msgbox(tempbuf,"palette.dat not found");
exit(0);
}
initprintf("Loading game palette... ");
// initprintf("Loading game palette... ");
kread(fp,GAMEpalette,768);
for (i=0;i<768;++i) GAMEpalette[i]=GAMEpalette[i];
kclose(fp);
initprintf("success.\n");
// initprintf("success.\n");
ReadPaletteTable();
}

View File

@ -359,8 +359,8 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
rotatesprite(x<<16,(y<<16)+(small?ud.config.ScreenHeight<<15:0),z,0,ac,s,p,small?(8|16):(2|orientation),x1,y1,x2,y2);
// if ((*t >= '0' && *t <= '9'))
x += 8*z/65536;
// else x += tilesizx[ac]*z/65536;//(tilesizx[ac]>>small);
x += 8*z/65536;
// else x += tilesizx[ac]*z/65536;//(tilesizx[ac]>>small);
if (t-oldt >= (signed)TEXTWRAPLEN-!small) oldt = (char *)t, x = oldx, y+=8*z/65536;
t++;
}
@ -9029,6 +9029,18 @@ static void checkcommandline(int argc, const char **argv)
continue;
}
#endif
if (!Bstrcasecmp(c+1,"cachesize"))
{
if (argc > i+1)
{
unsigned int j = atol((char *)argv[i+1]);
MAXCACHE1DSIZE = j<<10;
initprintf("Cache size: %dkB\n",j);
i++;
}
i++;
continue;
}
}
if (firstnet > 0)

View File

@ -241,10 +241,12 @@ int DSOUND_Init(int soundcard, int mixrate, int numchannels, int samplebits, int
return DSOUND_Error;
}
initprintf(" - Setting primary buffer format\n"
/* initprintf(" - Setting primary buffer format\n"
" Channels: %d\n"
" Sample rate: %dHz\n"
" Sample size: %d bits\n",
numchannels, mixrate, samplebits); */
initprintf(" - Primary buffer format: %d ch, %dHz, %d bits\n",
numchannels, mixrate, samplebits);
ZeroMemory(&wfex, sizeof(wfex));
wfex.wFormatTag = WAVE_FORMAT_PCM;

View File

@ -2856,7 +2856,7 @@ int MV_Init(int soundcard, int MixRate, int Voices, int numchannels, int sampleb
// Set number of voices before calculating volume table
MV_MaxVoices = Voices;
initprintf(" - Maximum voices: %d\n", MV_MaxVoices);
// initprintf(" - Maximum voices: %d\n", MV_MaxVoices);
LL_Reset(&VoiceList, next, prev);
LL_Reset(&VoicePool, next, prev);
@ -2869,7 +2869,8 @@ int MV_Init(int soundcard, int MixRate, int Voices, int numchannels, int sampleb
// Set the sampling rate
MV_RequestedMixRate = MixRate;
initprintf(" - Using %d byte mixing buffers\n", MixBufferSize);
// initprintf(" - Using %d byte mixing buffers\n", MixBufferSize);
initprintf(" - %d voices, %d byte mixing buffers\n", MV_MaxVoices, MixBufferSize);
// Allocate mix buffer within 1st megabyte
// use calloc to clear the memory for the first playback.
@ -2890,8 +2891,13 @@ int MV_Init(int soundcard, int MixRate, int Voices, int numchannels, int sampleb
// Initialize the sound card
#if defined(_WIN32)
status = DSOUND_Init(soundcard, MixRate, numchannels, samplebits, TotalBufferSize);
if (status != DSOUND_Ok)
{
MV_SetErrorCode(MV_BlasterError);
}
#ifdef USE_OPENAL
if (AL_Init())
else if (AL_Init())
{
int i;
@ -2904,12 +2910,6 @@ int MV_Init(int soundcard, int MixRate, int Voices, int numchannels, int sampleb
}
}
#endif
status = DSOUND_Init(soundcard, MixRate, numchannels, samplebits, TotalBufferSize);
if (status != DSOUND_Ok)
{
MV_SetErrorCode(MV_BlasterError);
}
#else
status = DSL_Init();
if (status != DSL_Ok)