diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index fbee86b2e..1e608d6d6 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -196,8 +196,8 @@ void CONFIG_SetDefaults( void ) // JBF 20031211 int32 i,f; - FXDevice = -1; - MusicDevice = -1; + FXDevice = 0; + MusicDevice = 0; NumVoices = 32; NumChannels = 2; NumBits = 16; @@ -251,65 +251,65 @@ void CONFIG_SetDefaults( void ) Bstrcpy(ud.ridecule[9], "AARRRGHHHHH!!!"); // JBF 20031211 - memset(KeyboardKeys, 0xff, sizeof(KeyboardKeys)); - for (i=0; i < NUMGAMEFUNCTIONS; i+=3) { - f = CONFIG_FunctionNameToNum( keydefaults[i+0] ); - if (f == -1) continue; - KeyboardKeys[f][0] = KB_StringToScanCode( keydefaults[i+1] ); - KeyboardKeys[f][1] = KB_StringToScanCode( keydefaults[i+2] ); + memset(KeyboardKeys, 0xff, sizeof(KeyboardKeys)); + for (i=0; i < (int32)(sizeof(keydefaults)/sizeof(keydefaults[0])); i+=3) { + f = CONFIG_FunctionNameToNum( keydefaults[i+0] ); + if (f == -1) continue; + KeyboardKeys[f][0] = KB_StringToScanCode( keydefaults[i+1] ); + KeyboardKeys[f][1] = KB_StringToScanCode( keydefaults[i+2] ); - if (f == gamefunc_Show_Console) OSD_CaptureKey(KeyboardKeys[f][0]); - else CONTROL_MapKey( f, KeyboardKeys[f][0], KeyboardKeys[f][1] ); - } + if (f == gamefunc_Show_Console) OSD_CaptureKey(KeyboardKeys[f][0]); + else CONTROL_MapKey( f, KeyboardKeys[f][0], KeyboardKeys[f][1] ); + } - memset(MouseFunctions, -1, sizeof(MouseFunctions)); - for (i=0; i= 0) ud.wchoice[0][i] = dummy; } - } SCRIPT_GetNumber( scripthandle, "Sound Setup", "FXDevice",&FXDevice); SCRIPT_GetNumber( scripthandle, "Sound Setup", "MusicDevice",&MusicDevice); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 8c4ae3d6c..e1f47b8b5 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -61,6 +61,7 @@ static int32 CommandSoundToggleOff = 0; static int32 CommandMusicToggleOff = 0; static char *CommandMap = NULL; static char *CommandName = NULL; +int32 CommandWeaponChoice = 0; char confilename[BMAX_PATH] = {"EDUKE.CON"}, boardfilename[BMAX_PATH] = {0}; char waterpal[768], slimepal[768], titlepal[768], drealms[768], endingpal[768]; @@ -7458,6 +7459,16 @@ void checkcommandline(int argc,char **argv) ud.warp_on = 0; ud.cashman = 0; ud.m_player_skill = ud.player_skill = 2; + ud.wchoice[0][0] = 3; + ud.wchoice[0][1] = 4; + ud.wchoice[0][2] = 5; + ud.wchoice[0][3] = 7; + ud.wchoice[0][4] = 8; + ud.wchoice[0][5] = 6; + ud.wchoice[0][6] = 0; + ud.wchoice[0][7] = 2; + ud.wchoice[0][8] = 9; + ud.wchoice[0][9] = 1; if(argc > 1) { @@ -7742,6 +7753,7 @@ void checkcommandline(int argc,char **argv) break; case 'u': case 'U': + CommandWeaponChoice = 1; c++; j = 0; if(*c)