mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@849 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4ddfc3e9d9
commit
a6c68170d0
6 changed files with 36 additions and 19 deletions
|
@ -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)
|
||||
|
|
|
@ -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");*/ \
|
||||
} \
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue