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; cac[0].lock = &zerochar;
cacnum = 1; 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) void allocache(intptr_t *newhandle, int newbytes, char *newlockptr)

View file

@ -212,9 +212,11 @@ int main(int argc, char *argv[])
// //
int initsystem(void) int initsystem(void)
{ {
/*
#ifdef DEBUGGINGAIDS #ifdef DEBUGGINGAIDS
const SDL_VideoInfo *vid; const SDL_VideoInfo *vid;
#endif #endif
*/
const SDL_version *linked = SDL_Linked_Version(); const SDL_version *linked = SDL_Linked_Version();
SDL_version compiled; SDL_version compiled;
char drvname[32]; char drvname[32];
@ -272,6 +274,7 @@ int initsystem(void)
if (SDL_VideoDriverName(drvname, 32)) if (SDL_VideoDriverName(drvname, 32))
initprintf("Using \"%s\" video driver\n", drvname); initprintf("Using \"%s\" video driver\n", drvname);
/*
// dump a quick summary of the graphics hardware // dump a quick summary of the graphics hardware
#ifdef DEBUGGINGAIDS #ifdef DEBUGGINGAIDS
vid = SDL_GetVideoInfo(); vid = SDL_GetVideoInfo();
@ -287,7 +290,7 @@ int initsystem(void)
initprintf(" Accelerated colour fills? %s\n", (vid->blit_fill)?"Yes":"No"); initprintf(" Accelerated colour fills? %s\n", (vid->blit_fill)?"Yes":"No");
initprintf(" Total video memory: %dKB\n", vid->video_mem); initprintf(" Total video memory: %dKB\n", vid->video_mem);
#endif #endif
*/
return 0; return 0;
} }
@ -734,7 +737,7 @@ void getvalidmodes(void)
if (modeschecked) return; if (modeschecked) return;
validmodecnt=0; validmodecnt=0;
initprintf("Detecting video modes:\n"); // initprintf("Detecting video modes:\n");
#define ADDMODE(x,y,c,f) if (validmodecnt<MAXVALIDMODES) { \ #define ADDMODE(x,y,c,f) if (validmodecnt<MAXVALIDMODES) { \
int mn; \ int mn; \
@ -747,7 +750,7 @@ void getvalidmodes(void)
validmode[validmodecnt].bpp=c; \ validmode[validmodecnt].bpp=c; \
validmode[validmodecnt].fs=f; \ validmode[validmodecnt].fs=f; \
validmodecnt++; \ 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,REALMSpalette,768);
kread(fp,BOSS1palette,768); kread(fp,BOSS1palette,768);
kclose(fp); kclose(fp);
initprintf("success.\n"); // initprintf("success.\n");
}// end ReadPaletteTable }// end ReadPaletteTable
static void ReadGamePalette() static void ReadGamePalette()
@ -1910,11 +1910,11 @@ static void ReadGamePalette()
wm_msgbox(tempbuf,"palette.dat not found"); wm_msgbox(tempbuf,"palette.dat not found");
exit(0); exit(0);
} }
initprintf("Loading game palette... "); // initprintf("Loading game palette... ");
kread(fp,GAMEpalette,768); kread(fp,GAMEpalette,768);
for (i=0;i<768;++i) GAMEpalette[i]=GAMEpalette[i]; for (i=0;i<768;++i) GAMEpalette[i]=GAMEpalette[i];
kclose(fp); kclose(fp);
initprintf("success.\n"); // initprintf("success.\n");
ReadPaletteTable(); 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); 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')) // if ((*t >= '0' && *t <= '9'))
x += 8*z/65536; x += 8*z/65536;
// else x += tilesizx[ac]*z/65536;//(tilesizx[ac]>>small); // else x += tilesizx[ac]*z/65536;//(tilesizx[ac]>>small);
if (t-oldt >= (signed)TEXTWRAPLEN-!small) oldt = (char *)t, x = oldx, y+=8*z/65536; if (t-oldt >= (signed)TEXTWRAPLEN-!small) oldt = (char *)t, x = oldx, y+=8*z/65536;
t++; t++;
} }
@ -9029,6 +9029,18 @@ static void checkcommandline(int argc, const char **argv)
continue; continue;
} }
#endif #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) if (firstnet > 0)

View file

@ -241,10 +241,12 @@ int DSOUND_Init(int soundcard, int mixrate, int numchannels, int samplebits, int
return DSOUND_Error; return DSOUND_Error;
} }
initprintf(" - Setting primary buffer format\n" /* initprintf(" - Setting primary buffer format\n"
" Channels: %d\n" " Channels: %d\n"
" Sample rate: %dHz\n" " Sample rate: %dHz\n"
" Sample size: %d bits\n", " Sample size: %d bits\n",
numchannels, mixrate, samplebits); */
initprintf(" - Primary buffer format: %d ch, %dHz, %d bits\n",
numchannels, mixrate, samplebits); numchannels, mixrate, samplebits);
ZeroMemory(&wfex, sizeof(wfex)); ZeroMemory(&wfex, sizeof(wfex));
wfex.wFormatTag = WAVE_FORMAT_PCM; 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 // Set number of voices before calculating volume table
MV_MaxVoices = Voices; MV_MaxVoices = Voices;
initprintf(" - Maximum voices: %d\n", MV_MaxVoices); // initprintf(" - Maximum voices: %d\n", MV_MaxVoices);
LL_Reset(&VoiceList, next, prev); LL_Reset(&VoiceList, next, prev);
LL_Reset(&VoicePool, 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 // Set the sampling rate
MV_RequestedMixRate = MixRate; 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 // Allocate mix buffer within 1st megabyte
// use calloc to clear the memory for the first playback. // 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 // Initialize the sound card
#if defined(_WIN32) #if defined(_WIN32)
status = DSOUND_Init(soundcard, MixRate, numchannels, samplebits, TotalBufferSize);
if (status != DSOUND_Ok)
{
MV_SetErrorCode(MV_BlasterError);
}
#ifdef USE_OPENAL #ifdef USE_OPENAL
if (AL_Init()) else if (AL_Init())
{ {
int i; int i;
@ -2904,12 +2910,6 @@ int MV_Init(int soundcard, int MixRate, int Voices, int numchannels, int sampleb
} }
} }
#endif #endif
status = DSOUND_Init(soundcard, MixRate, numchannels, samplebits, TotalBufferSize);
if (status != DSOUND_Ok)
{
MV_SetErrorCode(MV_BlasterError);
}
#else #else
status = DSL_Init(); status = DSL_Init();
if (status != DSL_Ok) if (status != DSL_Ok)