Merge errors for compile

This commit is contained in:
mazmazz 2019-01-07 15:43:58 -05:00
parent 7aa55f24f5
commit b3f7b169b2
11 changed files with 48 additions and 41 deletions

View File

@ -39,7 +39,6 @@ OBJS:=$(OBJS) \
$(OBJDIR)/lvm.o \ $(OBJDIR)/lvm.o \
$(OBJDIR)/lua_script.o \ $(OBJDIR)/lua_script.o \
$(OBJDIR)/lua_baselib.o \ $(OBJDIR)/lua_baselib.o \
$(OBJDIR)/lua_blockmaplib.o \
$(OBJDIR)/lua_mathlib.o \ $(OBJDIR)/lua_mathlib.o \
$(OBJDIR)/lua_hooklib.o \ $(OBJDIR)/lua_hooklib.o \
$(OBJDIR)/lua_consolelib.o \ $(OBJDIR)/lua_consolelib.o \

View File

@ -237,7 +237,7 @@ static UINT8 promptbgcolor = UINT8_MAX;
void CON_SetupBackColormapEx(INT32 color, boolean prompt) void CON_SetupBackColormapEx(INT32 color, boolean prompt)
{ {
UINT16 i, palsum; UINT16 i, palsum;
UINT8 j, palindex, shift; UINT8 j, palindex;
UINT8 *pal = W_CacheLumpName(GetPalette(), PU_CACHE); UINT8 *pal = W_CacheLumpName(GetPalette(), PU_CACHE);
INT32 shift = 6; INT32 shift = 6;

View File

@ -2959,7 +2959,7 @@ static void Got_Verification(UINT8 **cp, INT32 playernum)
static void Command_RemoveAdmin_f(void) static void Command_RemoveAdmin_f(void)
{ {
XBOXSTATIC char buf[8]; // Should be plenty char buf[8]; // Should be plenty
char *temp; char *temp;
INT32 playernum; INT32 playernum;
@ -2996,7 +2996,7 @@ static void Got_Removal(UINT8 **cp, INT32 playernum)
CONS_Alert(CONS_WARNING, M_GetText("Illegal demotion received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]); CONS_Alert(CONS_WARNING, M_GetText("Illegal demotion received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]);
if (server) if (server)
{ {
XBOXSTATIC UINT8 buf[2]; UINT8 buf[2];
buf[0] = (UINT8)playernum; buf[0] = (UINT8)playernum;
buf[1] = KICK_MSG_CON_FAIL; buf[1] = KICK_MSG_CON_FAIL;

View File

@ -1206,7 +1206,7 @@ void F_CreditDrawer(void)
V_DrawSciencePatch(credits_pics[i].x<<FRACBITS, (credits_pics[i].y<<FRACBITS) - 4*(animtimer<<FRACBITS)/5, 0, W_CachePatchName(credits_pics[i].patch, PU_CACHE), FRACUNIT>>1); V_DrawSciencePatch(credits_pics[i].x<<FRACBITS, (credits_pics[i].y<<FRACBITS) - 4*(animtimer<<FRACBITS)/5, 0, W_CachePatchName(credits_pics[i].patch, PU_CACHE), FRACUNIT>>1);
// Dim the background // Dim the background
V_DrawFadeScreen(); V_DrawFadeScreen(0xFF00, 16);
// Draw credits text on top // Draw credits text on top
for (i = 0; credits[i]; i++) for (i = 0; credits[i]; i++)
@ -2553,7 +2553,7 @@ void F_TextPromptTicker(void)
{ {
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
{ {
if (netgame && i != serverplayer && i != adminplayer) if (netgame && i != serverplayer && !IsPlayerAdmin(i))
continue; continue;
else if (splitscreen) { else if (splitscreen) {
// Both players' controls are locked, // Both players' controls are locked,
@ -2584,7 +2584,7 @@ void F_TextPromptTicker(void)
{ {
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
{ {
if (netgame && i != serverplayer && i != adminplayer) if (netgame && i != serverplayer && !IsPlayerAdmin(i))
continue; continue;
else if (splitscreen) { else if (splitscreen) {
// Both players' controls are locked, // Both players' controls are locked,

View File

@ -1047,11 +1047,11 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
axis = JoyAxis(AXISMOVE); axis = JoyAxis(AXISMOVE);
altaxis = JoyAxis(AXISLOOK); altaxis = JoyAxis(AXISLOOK);
if (movefkey || (gamepadjoystickmove && axis < 0) if (movefkey || (gamepadjoystickmove && axis < 0)
|| ((player->pflags & PF_NIGHTSMODE) || ((player->powers[pw_carry] == CR_NIGHTSMODE)
&& (PLAYER1INPUTDOWN(gc_lookup) || (gamepadjoystickmove && altaxis < 0)))) && (PLAYER1INPUTDOWN(gc_lookup) || (gamepadjoystickmove && altaxis < 0))))
forward = forwardmove[speed]; forward = forwardmove[speed];
if (movebkey || (gamepadjoystickmove && axis > 0) if (movebkey || (gamepadjoystickmove && axis > 0)
|| ((player->pflags & PF_NIGHTSMODE) || ((player->powers[pw_carry] == CR_NIGHTSMODE)
&& (PLAYER1INPUTDOWN(gc_lookdown) || (gamepadjoystickmove && altaxis > 0)))) && (PLAYER1INPUTDOWN(gc_lookdown) || (gamepadjoystickmove && altaxis > 0))))
forward -= forwardmove[speed]; forward -= forwardmove[speed];
@ -1147,7 +1147,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
if (!keyboard_look && cv_lookaxis.value == 0 && !joyaiming && !mouseaiming) if (!keyboard_look && cv_lookaxis.value == 0 && !joyaiming && !mouseaiming)
localaiming = 0; localaiming = 0;
if (!(player->pflags & PF_NIGHTSMODE)) if (!(player->powers[pw_carry] == CR_NIGHTSMODE))
{ {
if (PLAYER1INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0)) if (PLAYER1INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0))
{ {
@ -1371,11 +1371,11 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
axis = Joy2Axis(AXISMOVE); axis = Joy2Axis(AXISMOVE);
altaxis = Joy2Axis(AXISLOOK); altaxis = Joy2Axis(AXISLOOK);
if (movefkey || (gamepadjoystickmove && axis < 0) if (movefkey || (gamepadjoystickmove && axis < 0)
|| ((player->pflags & PF_NIGHTSMODE) || ((player->powers[pw_carry] == CR_NIGHTSMODE)
&& (PLAYER2INPUTDOWN(gc_lookup) || (gamepadjoystickmove && altaxis < 0)))) && (PLAYER2INPUTDOWN(gc_lookup) || (gamepadjoystickmove && altaxis < 0))))
forward = forwardmove[speed]; forward = forwardmove[speed];
if (movebkey || (gamepadjoystickmove && axis > 0) if (movebkey || (gamepadjoystickmove && axis > 0)
|| ((player->pflags & PF_NIGHTSMODE) || ((player->powers[pw_carry] == CR_NIGHTSMODE)
&& (PLAYER2INPUTDOWN(gc_lookdown) || (gamepadjoystickmove && altaxis > 0)))) && (PLAYER2INPUTDOWN(gc_lookdown) || (gamepadjoystickmove && altaxis > 0))))
forward -= forwardmove[speed]; forward -= forwardmove[speed];
@ -1468,7 +1468,7 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
if (!keyboard_look && cv_lookaxis2.value == 0 && !joyaiming && !mouseaiming) if (!keyboard_look && cv_lookaxis2.value == 0 && !joyaiming && !mouseaiming)
localaiming2 = 0; localaiming2 = 0;
if (!(player->pflags & PF_NIGHTSMODE)) if (!(player->powers[pw_carry] == CR_NIGHTSMODE))
{ {
if (PLAYER2INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0)) if (PLAYER2INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0))
{ {

View File

@ -366,7 +366,6 @@ static void M_DrawControl(void);
static void M_DrawMainVideoMenu(void); static void M_DrawMainVideoMenu(void);
static void M_DrawVideoMode(void); static void M_DrawVideoMode(void);
static void M_DrawColorMenu(void); static void M_DrawColorMenu(void);
static void M_DrawSoundMenu(void);
static void M_DrawScreenshotMenu(void); static void M_DrawScreenshotMenu(void);
static void M_DrawMonitorToggles(void); static void M_DrawMonitorToggles(void);
#ifdef HWRENDER #ifdef HWRENDER
@ -1861,8 +1860,7 @@ menu_t OP_ColorOptionsDef =
NULL NULL
}; };
menu_t OP_SoundOptionsDef = DEFAULTMENUSTYLE("M_SOUND", OP_SoundOptionsMenu, &OP_MainDef, 60, 30); menu_t OP_SoundOptionsDef = DEFAULTSCROLLMENUSTYLE("M_SOUND", OP_SoundOptionsMenu, &OP_MainDef, 60, 30);
menu_t OP_P1ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_P1ControlsMenu, &OP_MainDef, 50, 30);
menu_t OP_ServerOptionsDef = DEFAULTSCROLLMENUSTYLE("M_SERVER", OP_ServerOptionsMenu, &OP_MainDef, 30, 30); menu_t OP_ServerOptionsDef = DEFAULTSCROLLMENUSTYLE("M_SERVER", OP_ServerOptionsMenu, &OP_MainDef, 30, 30);
menu_t OP_MonitorToggleDef = menu_t OP_MonitorToggleDef =
@ -3141,6 +3139,7 @@ static void M_DrawStaticBox(fixed_t x, fixed_t y, INT32 flags, fixed_t w, fixed_
// //
// Draw border for the savegame description // Draw border for the savegame description
// //
#if 0 // once used for joysticks and savegames, now no longer
static void M_DrawSaveLoadBorder(INT32 x,INT32 y) static void M_DrawSaveLoadBorder(INT32 x,INT32 y)
{ {
INT32 i; INT32 i;
@ -3155,6 +3154,7 @@ static void M_DrawSaveLoadBorder(INT32 x,INT32 y)
V_DrawScaledPatch (x,y+7,0,W_CachePatchName("M_LSRGHT",PU_CACHE)); V_DrawScaledPatch (x,y+7,0,W_CachePatchName("M_LSRGHT",PU_CACHE));
} }
#endif
// horizontally centered text // horizontally centered text
static void M_CentreText(INT32 y, const char *string) static void M_CentreText(INT32 y, const char *string)
@ -4270,7 +4270,8 @@ static void M_HandleLevelPlatter(INT32 choice)
} }
break; break;
} }
// intentionall fallthrough // below comment, verbatim: gcc 7 -Werror-implicit-fallthrough workaround
// fall through
case KEY_RIGHTARROW: case KEY_RIGHTARROW:
if (levellistmode == LLM_CREATESERVER && !lsrow) if (levellistmode == LLM_CREATESERVER && !lsrow)
{ {
@ -9274,19 +9275,23 @@ static void M_Setup1PControlsMenu(INT32 choice)
setupcontrols = gamecontrol; // was called from main Options (for console player, then) setupcontrols = gamecontrol; // was called from main Options (for console player, then)
currentMenu->lastOn = itemOn; currentMenu->lastOn = itemOn;
// Unhide the five non-P2 controls and their headers // Unhide the nine non-P2 controls and their headers
OP_ChangeControlsMenu[18+0].status = IT_HEADER; //OP_ChangeControlsMenu[18+0].status = IT_HEADER;
OP_ChangeControlsMenu[18+1].status = IT_SPACE; //OP_ChangeControlsMenu[18+1].status = IT_SPACE;
// ... // ...
OP_ChangeControlsMenu[18+2].status = IT_CALL|IT_STRING2; OP_ChangeControlsMenu[18+2].status = IT_CALL|IT_STRING2;
OP_ChangeControlsMenu[18+3].status = IT_CALL|IT_STRING2; OP_ChangeControlsMenu[18+3].status = IT_CALL|IT_STRING2;
OP_ChangeControlsMenu[18+4].status = IT_CALL|IT_STRING2; OP_ChangeControlsMenu[18+4].status = IT_CALL|IT_STRING2;
OP_ChangeControlsMenu[18+5].status = IT_CALL|IT_STRING2;
OP_ChangeControlsMenu[18+6].status = IT_CALL|IT_STRING2;
//OP_ChangeControlsMenu[18+7].status = IT_CALL|IT_STRING2;
OP_ChangeControlsMenu[18+8].status = IT_CALL|IT_STRING2;
// ... // ...
OP_ChangeControlsMenu[23+0].status = IT_HEADER; OP_ChangeControlsMenu[27+0].status = IT_HEADER;
OP_ChangeControlsMenu[23+1].status = IT_SPACE; OP_ChangeControlsMenu[27+1].status = IT_SPACE;
// ... // ...
OP_ChangeControlsMenu[23+2].status = IT_CALL|IT_STRING2; OP_ChangeControlsMenu[27+2].status = IT_CALL|IT_STRING2;
OP_ChangeControlsMenu[23+3].status = IT_CALL|IT_STRING2; OP_ChangeControlsMenu[27+3].status = IT_CALL|IT_STRING2;
OP_ChangeControlsDef.prevMenu = &OP_P1ControlsDef; OP_ChangeControlsDef.prevMenu = &OP_P1ControlsDef;
M_SetupNextMenu(&OP_ChangeControlsDef); M_SetupNextMenu(&OP_ChangeControlsDef);
@ -9301,21 +9306,21 @@ static void M_Setup2PControlsMenu(INT32 choice)
// Hide the nine non-P2 controls and their headers // Hide the nine non-P2 controls and their headers
//OP_ChangeControlsMenu[18+0].status = IT_GRAYEDOUT2; //OP_ChangeControlsMenu[18+0].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[18+1].status = IT_GRAYEDOUT2; //OP_ChangeControlsMenu[18+1].status = IT_GRAYEDOUT2;
// ... // ...
OP_ChangeControlsMenu[18+2].status = IT_GRAYEDOUT2; OP_ChangeControlsMenu[18+2].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[18+3].status = IT_GRAYEDOUT2; OP_ChangeControlsMenu[18+3].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[18+4].status = IT_GRAYEDOUT2; OP_ChangeControlsMenu[18+4].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[18+5].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[18+6].status = IT_GRAYEDOUT2;
//OP_ChangeControlsMenu[18+7].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[18+8].status = IT_GRAYEDOUT2;
// ... // ...
OP_ChangeControlsMenu[23+0].status = IT_GRAYEDOUT2; OP_ChangeControlsMenu[27+0].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[23+1].status = IT_GRAYEDOUT2; OP_ChangeControlsMenu[27+1].status = IT_GRAYEDOUT2;
//OP_ChangeControlsMenu[23+2].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[23+3].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[23+4].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[23+5].status = IT_GRAYEDOUT2;
// ... // ...
OP_ChangeControlsMenu[29+0].status = IT_GRAYEDOUT2; OP_ChangeControlsMenu[27+2].status = IT_GRAYEDOUT2;
OP_ChangeControlsMenu[29+1].status = IT_GRAYEDOUT2; OP_ChangeControlsMenu[27+3].status = IT_GRAYEDOUT2;
OP_ChangeControlsDef.prevMenu = &OP_P2ControlsDef; OP_ChangeControlsDef.prevMenu = &OP_P2ControlsDef;
M_SetupNextMenu(&OP_ChangeControlsDef); M_SetupNextMenu(&OP_ChangeControlsDef);

View File

@ -444,7 +444,8 @@ void Command_LoadConfig_f(void)
// load default control // load default control
G_ClearAllControlKeys(); G_ClearAllControlKeys();
G_Controldefault(); G_CopyControls(gamecontrol, gamecontroldefault[gcs_fps], NULL, 0);
G_CopyControls(gamecontrolbis, gamecontrolbisdefault[gcs_fps], NULL, 0);
// temporarily reset execversion to default // temporarily reset execversion to default
CV_ToggleExecVersion(true); CV_ToggleExecVersion(true);

View File

@ -2643,7 +2643,8 @@ static boolean P_CanSave(void)
|| (modeattacking || ultimatemode || G_IsSpecialStage(gamemap))) // Specialized instances || (modeattacking || ultimatemode || G_IsSpecialStage(gamemap))) // Specialized instances
return false; return false;
if (mapheaderinfo[gamemap-1]->saveoverride == SAVE_ALWAYS) if (mapheaderinfo[gamemap-1]->saveoverride == SAVE_ALWAYS
|| (mapheaderinfo[gamemap-1]->levelflags & LF_SAVEGAME))
return true; // Saving should ALWAYS happen! return true; // Saving should ALWAYS happen!
else if (mapheaderinfo[gamemap-1]->saveoverride == SAVE_NEVER) else if (mapheaderinfo[gamemap-1]->saveoverride == SAVE_NEVER)
return false; // Saving should NEVER happen! return false; // Saving should NEVER happen!
@ -2651,7 +2652,7 @@ static boolean P_CanSave(void)
// Default condition: In a non-hidden map, at the beginning of a zone or on a completed save-file, and not on save reload. // Default condition: In a non-hidden map, at the beginning of a zone or on a completed save-file, and not on save reload.
return (!(mapheaderinfo[gamemap-1]->menuflags & LF2_HIDEINMENU) return (!(mapheaderinfo[gamemap-1]->menuflags & LF2_HIDEINMENU)
&& (mapheaderinfo[gamemap-1]->actnum < 2 || gamecomplete) && (mapheaderinfo[gamemap-1]->actnum < 2 || gamecomplete)
&& (gamemap != lastmapsaved)); && (gamemap != lastmaploaded));
} }
/** Loads a level from a lump or external wad. /** Loads a level from a lump or external wad.
@ -3348,7 +3349,7 @@ boolean P_AddWadFile(const char *wadfilename)
char *name; char *name;
lumpinfo_t *lumpinfo; lumpinfo_t *lumpinfo;
boolean texturechange = false; ///\todo Useless; broken when back-frontporting PK3 changes? //boolean texturechange = false; ///\todo Useless; broken when back-frontporting PK3 changes?
boolean mapsadded = false; boolean mapsadded = false;
boolean replacedcurrentmap = false; boolean replacedcurrentmap = false;

View File

@ -9097,8 +9097,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
} }
} }
height = camheight;
// sets ideal cam pos // sets ideal cam pos
if (twodlevel || (mo->flags2 & MF2_TWOD)) if (twodlevel || (mo->flags2 & MF2_TWOD))
dist = 480<<FRACBITS; dist = 480<<FRACBITS;
@ -9370,7 +9368,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
} }
if (mo->type == MT_EGGTRAP) if (mo->type == MT_EGGTRAP)
z = mo->z + 128*FRACUNIT + pviewheight + height; z = mo->z + 128*FRACUNIT + pviewheight + camheight;
if (thiscam->z < thiscam->floorz && !cameranoclip) if (thiscam->z < thiscam->floorz && !cameranoclip)
thiscam->z = thiscam->floorz; thiscam->z = thiscam->floorz;

View File

@ -74,6 +74,8 @@ consvar_t cv_csaturation = {"csaturation", "10", CV_SAVE|CV_CALL, saturation_con
consvar_t cv_bsaturation = {"bsaturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_bsaturation = {"bsaturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_msaturation = {"msaturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_msaturation = {"msaturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_allcaps = {"allcaps", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t constextsize_cons_t[] = { static CV_PossibleValue_t constextsize_cons_t[] = {
{V_NOSCALEPATCH, "Small"}, {V_SMALLSCALEPATCH, "Medium"}, {V_MEDSCALEPATCH, "Large"}, {0, "Huge"}, {V_NOSCALEPATCH, "Small"}, {V_SMALLSCALEPATCH, "Medium"}, {V_MEDSCALEPATCH, "Large"}, {0, "Huge"},
{0, NULL}}; {0, NULL}};

View File

@ -31,7 +31,8 @@ extern consvar_t cv_ticrate, cv_constextsize,\
cv_globalgamma, cv_globalsaturation, \ cv_globalgamma, cv_globalsaturation, \
cv_rhue, cv_yhue, cv_ghue, cv_chue, cv_bhue, cv_mhue,\ cv_rhue, cv_yhue, cv_ghue, cv_chue, cv_bhue, cv_mhue,\
cv_rgamma, cv_ygamma, cv_ggamma, cv_cgamma, cv_bgamma, cv_mgamma, \ cv_rgamma, cv_ygamma, cv_ggamma, cv_cgamma, cv_bgamma, cv_mgamma, \
cv_rsaturation, cv_ysaturation, cv_gsaturation, cv_csaturation, cv_bsaturation, cv_msaturation; cv_rsaturation, cv_ysaturation, cv_gsaturation, cv_csaturation, cv_bsaturation, cv_msaturation,\
cv_allcaps;
// Allocates buffer screens, call before R_Init. // Allocates buffer screens, call before R_Init.
void V_Init(void); void V_Init(void);