Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9132 → Rev 9133

/contrib/games/wolf3d/SDL/uSDL.c
23,6 → 23,6
void uSDL_Delay(unsigned ms){
unsigned start = uSDL_GetTicks();
do{
__asm__("int $0x40" :: "a"(68),"b"(1));
__asm__ __volatile__("int $0x40" :: "a"(5),"b"(1));
}while (uSDL_GetTicks()-start < ms);
}
/contrib/games/wolf3d/id_sd.cpp
83,7 → 83,7
int DigiChannel[STARTMUSIC - STARTDIGISOUNDS];
 
// Internal variables
static boolean SD_Started;
boolean SD_Started;
static boolean nextsoundpos;
static soundnames SoundNumber;
static soundnames DigiNumber;
/contrib/games/wolf3d/wl_main.cpp
30,6 → 30,7
extern "C"{
extern void uSDL_StartTicks(void);
}
extern boolean SD_Started;
/*
=============================================================================
 
1215,17 → 1216,18
#if defined _WIN32
putenv("SDL_VIDEODRIVER=directx");
#endif
if(SDL_Init(SDL_INIT_VIDEO) < 0)
#ifdef _KOLIBRI
uSDL_StartTicks();
#endif
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0)
{
printf("Unable to init SDL: %s\n", SDL_GetError());
exit(1);
}
#ifdef _KOLIBRI
uSDL_StartTicks();
#endif
SDL_AudioInit(NULL);
atexit(SDL_Quit);
 
#if 0
int numJoysticks = SDL_NumJoysticks();
if(param_joystickindex && (param_joystickindex < -1 || param_joystickindex >= numJoysticks))
{
1236,6 → 1238,8
exit(1);
}
 
#endif
#if defined(GP2X_940)
GP2X_MemoryInit();
#endif
1292,7 → 1296,9
//
// build some tables
//
if(AdLibPresent || SoundBlasterPresent){
InitDigiMap ();
}
 
ReadConfig ();
 
1721,6 → 1727,9
}
else param_tedlevel = atoi(argv[i]);
}
else IFARG("--nosound")
SD_Started=true;
#ifndef _KOLIBRI
else IFARG("--windowed")
fullscreen = false;
else IFARG("--windowed-mouse")
1728,6 → 1737,7
fullscreen = false;
forcegrabmouse = true;
}
#endif
else IFARG("--res")
{
if(i + 2 >= argc)
1805,6 → 1815,7
}
}
}
#ifndef _KOLIBRI
else IFARG("--joystick")
{
if(++i >= argc)
1833,6 → 1844,7
else param_samplerate = atoi(argv[i]);
sampleRateGiven = true;
}
#endif
else IFARG("--audiobuffer")
{
if(++i >= argc)
1904,6 → 1916,7
"Usage: Wolf4SDL [options]\n"
"Options:\n"
" --help This help page\n"
" --goobers Run in debug mode\n"
" --tedlevel <level> Starts the game in the given level\n"
" --baby Sets the difficulty to baby for tedlevel\n"
" --easy Sets the difficulty to easy for tedlevel\n"
1910,6 → 1923,7
" --normal Sets the difficulty to normal for tedlevel\n"
" --hard Sets the difficulty to hard for tedlevel\n"
" --nowait Skips intro screens\n"
" --nosound Don't use sound\n"
#ifndef _KOLIBRI
" --windowed[-mouse] Starts the game in a window [and grabs mouse]\n"
#endif
1927,8 → 1941,8
" --joystick <index> Use the index-th joystick if available\n"
" (-1 to disable joystick, default: 0)\n"
" --joystickhat <index> Enables movement with the given coolie hat\n"
" --samplerate <rate> Sets the sound sample rate (given in Hz, default: %i)\n"
#endif
" --samplerate <rate> Sets the sound sample rate (given in Hz, default: %i)\n"
" --audiobuffer <size> Sets the size of the audio buffer (-> sound latency)\n"
" (given in bytes, default: 2048 / (44100 / samplerate))\n"
" --ignorenumchunks Ignores the number of chunks in VGAHEAD.*\n"