diff --git a/polymer/eduke32/source/_functio.h b/polymer/eduke32/source/_functio.h index 30b402ed2..95f55f406 100644 --- a/polymer/eduke32/source/_functio.h +++ b/polymer/eduke32/source/_functio.h @@ -217,8 +217,8 @@ static char * mousedefaults[] = "MedKit", "Jetpack", "", - "Next_Weapon", - "Previous_Weapon" + "Previous_Weapon", + "Next_Weapon" }; diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index b9d8285dc..1d15d9273 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -207,6 +207,23 @@ char * CONFIG_AnalogNumToName(int32 func) =================== */ +void CONFIG_SetDefaultKeys(void) +{ + int32 i,f; + + 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]); + } +} + void CONFIG_SetDefaults(void) { // JBF 20031211 @@ -275,17 +292,6 @@ void CONFIG_SetDefaults(void) Bstrcpy(ud.ridecule[9], "AARRRGHHHHH!!!"); // JBF 20031211 - 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]); - } memset(MouseFunctions, -1, sizeof(MouseFunctions)); for (i=0; inext; j = initgroupfile(CommandGrps->str); - if (j == -1) initprintf("Warning: could not find group file %s.\n",CommandGrps->str); + if (j == -1) initprintf("Could not find group file '%s'.\n",CommandGrps->str); else { groupfile = j; - initprintf("Using group file %s.\n",CommandGrps->str); + initprintf("Using group file '%s'.\n",CommandGrps->str); } free(CommandGrps->str); @@ -9932,6 +9932,7 @@ void app_main(int argc,char **argv) Bsprintf(ud.user_name[j],"PLAYER %d",j+1); ps[j].team = ud.pteam[j] = i; ps[j].weaponswitch = 3; + ps[j].auto_aim = 0; i = 1-i; } @@ -9968,7 +9969,7 @@ void app_main(int argc,char **argv) ud.last_level = -1; RTS_Init(ud.rtsname); - if (numlumps) initprintf("Using .RTS file: %s\n",ud.rtsname); + if (numlumps) initprintf("Using .RTS file '%s'\n",ud.rtsname); initprintf("Initializing OSD...\n"); @@ -10979,9 +10980,7 @@ static void fakedomovethings(void) } else if (syn->avel) //p->ang += syncangvel * constant { //ENGINE calculates angvel for you - long tempang; - - tempang = syn->avel<<1; + long tempang = syn->avel<<1; if (psectlotag == 2) myang += (tempang-(tempang>>3))*ksgn(doubvel); diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 30f82a647..5332974ce 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -812,7 +812,7 @@ LABELS userdefslabels[]= { "automsg", USERDEFS_AUTOMSG, 0, 0 }, { "idplayers", USERDEFS_IDPLAYERS, 0, 0 }, { "team", USERDEFS_TEAM, 0, 0 }, -#if 0 +#if 1 { "myx", USERDEFS_MYX, 0, 0 }, { "omyx", USERDEFS_OMYX, 0, 0 }, { "myxvel", USERDEFS_MYXVEL, 0, 0 }, diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 2eec2bdd5..096bcb00f 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -316,7 +316,7 @@ enum userdefslabels { USERDEFS_IDPLAYERS, USERDEFS_TEAM, // this stuff isn't really userdef stuff, but getuserdef/setuserdef is already set up for what I want to do -#if 0 +#if 1 USERDEFS_MYX, USERDEFS_OMYX, USERDEFS_MYXVEL, diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 186586dfa..6ec8dd43e 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -665,7 +665,7 @@ static void DoUserDef(int iSet, int lLabelID, int lVar2) SetGameVarID(lVar2, ud.team, g_i, g_p); break; -#if 0 +#if 1 case USERDEFS_MYX: if (iSet) myx = lValue; @@ -4785,7 +4785,7 @@ static int parse(void) if (x1 > x2) swaplong(&x1,&x2); if (y1 > y2) swaplong(&y1,&y2); - if (x1 < 0 || y1 < 0 || x2 > xdim-1 || y2 > ydim-1 || x2-x1 < 1 || y2-y1 < 1) + if (x1 < 0 || y1 < 0 || x2 > xdim-1 || y2 > ydim-1 || x2-x1 < 2 || y2-y1 < 2) break; #if defined(USE_OPENGL) && defined(POLYMOST) diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 97c1e515b..0fa5da4bc 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -3130,14 +3130,14 @@ cheat_for_port_credits: case 4: break; - + case 5: if (bpp==8) { ud.detail = 1-ud.detail; break; - } -#if defined(POLYMOST) && defined(USE_OPENGL) + } +#if defined(POLYMOST) && defined(USE_OPENGL) /* switch (gltexfiltermode) { case 0: @@ -3200,7 +3200,7 @@ cheat_for_port_credits: if (bpp == 8) { menutext(c,50+62+16+16,MENUHIGHLIGHT(5),0,"DETAIL"); - menutext(c+154,50+62+16+16,MENUHIGHLIGHT(5),0,ud.detail?"HIGH":"LOW"); + menutext(c+154,50+62+16+16,MENUHIGHLIGHT(5),0,ud.detail?"HIGH":"LOW"); modval(0,1,(int *)&ud.detail,1,probey==5); } @@ -3232,7 +3232,7 @@ cheat_for_port_credits: strcpy(tempbuf,"OTHER"); break; } - // menutext(c+154,50+62+16+16,MENUHIGHLIGHT(5),bpp==8,tempbuf); + // menutext(c+154,50+62+16+16,MENUHIGHLIGHT(5),bpp==8,tempbuf); gametextpal(c+154,50+62+16+16-8,tempbuf,MENUHIGHLIGHT(5),bpp==8); menutext(c,50+62+16+16+16,MENUHIGHLIGHT(6),bpp==8,"ANISOTROPY"); @@ -3251,13 +3251,19 @@ cheat_for_port_credits: c = (320>>1)-120; onbar = 0; - x = probe(0,0,0,NUMGAMEFUNCTIONS); + + x = probesm((probey == NUMGAMEFUNCTIONS)?60:0,(probey == NUMGAMEFUNCTIONS)?149:0,0,NUMGAMEFUNCTIONS+1); if (x==-1) { cmenu(202); probey = 4; } + else if (x == NUMGAMEFUNCTIONS) + { + CONFIG_SetDefaultKeys(); + break; + } else if (x>=0) { function = probey; @@ -3316,9 +3322,10 @@ cheat_for_port_credits: (m+l == probey && currentlist?0:16),2,10+16); } - gametext(160,144,"UP/DOWN = SELECT ACTION",0,2+8+16); - gametext(160,144+9,"LEFT/RIGHT = SELECT LIST",0,2+8+16); - gametext(160,144+9+9,"ENTER = MODIFY DELETE = CLEAR",0,2+8+16); + gametextpal(160,144,"RESET KEYS TO DEFAULTS",MENUHIGHLIGHT(NUMGAMEFUNCTIONS),10); + gametext(160,144+9+3,"UP/DOWN = SELECT ACTION",0,2+8+16); + gametext(160,144+9+9+3,"LEFT/RIGHT = SELECT LIST",0,2+8+16); + gametext(160,144+9+9+9+3,"ENTER = MODIFY DELETE = CLEAR",0,2+8+16); break;