diff --git a/src/command.c b/src/command.c index 97b8d4f14..f17e0d0e6 100644 --- a/src/command.c +++ b/src/command.c @@ -92,11 +92,7 @@ static boolean joyaxis_default[4] = {false,false,false,false}; static INT32 joyaxis_count[4] = {0,0,0,0}; #endif -<<<<<<< HEAD -#define COM_BUF_SIZE 0x4000 // command buffer size, 0x4000 = 16384 -======= #define COM_BUF_SIZE (32<<10) // command buffer size ->>>>>>> srb2/next #define MAX_ALIAS_RECURSION 100 // max recursion allowed for aliases static INT32 com_wait; // one command per frame (for cmd sequences) @@ -820,11 +816,8 @@ static void COM_Help_f(void) cvar = CV_FindVar(help); if (cvar) { -<<<<<<< HEAD -======= boolean floatmode = false; const char *cvalue = NULL; ->>>>>>> srb2/next CONS_Printf("\x82""Variable %s:\n", cvar->name); CONS_Printf(M_GetText(" flags :")); if (cvar->flags & CV_SAVE) @@ -843,22 +836,6 @@ static void COM_Help_f(void) CONS_Printf("\n"); if (cvar->PossibleValue) { -<<<<<<< HEAD - if (!stricmp(cvar->PossibleValue[0].strvalue, "MIN") && !stricmp(cvar->PossibleValue[1].strvalue, "MAX")) - { - CONS_Printf(" range from %d to %d\n", cvar->PossibleValue[0].value, - cvar->PossibleValue[1].value); - i = 2; - } - - { - const char *cvalue = NULL; - //CONS_Printf(M_GetText(" possible value : %s\n"), cvar->name); - while (cvar->PossibleValue[i].strvalue) - { - CONS_Printf(" %-2d : %s\n", cvar->PossibleValue[i].value, - cvar->PossibleValue[i].strvalue); -======= CONS_Printf(" Possible values:\n"); if (cvar->PossibleValue == CV_YesNo) CONS_Printf(" Yes or No (On or Off, 1 or 0)\n"); @@ -895,18 +872,10 @@ static void COM_Help_f(void) else CONS_Printf(" %-2d : %s\n", cvar->PossibleValue[i].value, cvar->PossibleValue[i].strvalue); ->>>>>>> srb2/next if (cvar->PossibleValue[i].value == cvar->value) cvalue = cvar->PossibleValue[i].strvalue; i++; } -<<<<<<< HEAD - if (cvalue) - CONS_Printf(" Current value: %s\n", cvalue); - else - CONS_Printf(" Current value: %d\n", cvar->value); -======= ->>>>>>> srb2/next } } @@ -931,24 +900,9 @@ static void COM_Help_f(void) } CONS_Printf("No exact match, searching...\n"); -<<<<<<< HEAD - // commands - CONS_Printf("\x82""Commands:\n"); - for (cmd = com_commands; cmd; cmd = cmd->next) - { - if (!strstr(cmd->name, help)) - continue; - CONS_Printf("%s ",cmd->name); - i++; - } - - // variables - CONS_Printf("\x82""\nVariables:\n"); -======= // variables CONS_Printf("\x82""Variables:\n"); ->>>>>>> srb2/next for (cvar = consvar_vars; cvar; cvar = cvar->next) { if ((cvar->flags & CV_NOSHOWHELP) || (!strstr(cvar->name, help))) @@ -957,8 +911,6 @@ static void COM_Help_f(void) i++; } -<<<<<<< HEAD -======= // commands CONS_Printf("\x82""\nCommands:\n"); for (cmd = com_commands; cmd; cmd = cmd->next) @@ -969,7 +921,6 @@ static void COM_Help_f(void) i++; } ->>>>>>> srb2/next CONS_Printf("\x82""\nCheck wiki.srb2.org for more or type help \n"); CONS_Debug(DBG_GAMELOGIC, "\x87Total : %d\n", i); @@ -978,15 +929,9 @@ static void COM_Help_f(void) } { -<<<<<<< HEAD - // commands - CONS_Printf("\x82""Commands:\n"); - for (cmd = com_commands; cmd; cmd = cmd->next) -======= // variables CONS_Printf("\x82""Variables:\n"); for (cvar = consvar_vars; cvar; cvar = cvar->next) ->>>>>>> srb2/next { if (cvar->flags & CV_NOSHOWHELP) continue; @@ -994,21 +939,11 @@ static void COM_Help_f(void) i++; } -<<<<<<< HEAD - // variables - CONS_Printf("\x82""\nVariables:\n"); - for (cvar = consvar_vars; cvar; cvar = cvar->next) - { - if (cvar->flags & CV_NOSHOWHELP) - continue; - CONS_Printf("%s ", cvar->name); -======= // commands CONS_Printf("\x82""\nCommands:\n"); for (cmd = com_commands; cmd; cmd = cmd->next) { CONS_Printf("%s ",cmd->name); ->>>>>>> srb2/next i++; } @@ -1068,14 +1003,10 @@ static void COM_Add_f(void) } if (( cvar->flags & CV_FLOAT )) -<<<<<<< HEAD - CV_Set(cvar, va("%f", FIXED_TO_FLOAT (cvar->value) + atof(COM_Argv(2)))); -======= { float n =FIXED_TO_FLOAT (cvar->value) + atof(COM_Argv(2)); CV_Set(cvar, va("%ld%s", (long)n, M_Ftrim(n))); } ->>>>>>> srb2/next else CV_AddValue(cvar, atoi(COM_Argv(2))); } @@ -1408,10 +1339,6 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth) #define MINVAL 0 #define MAXVAL 1 INT32 i; -<<<<<<< HEAD - -======= ->>>>>>> srb2/next #ifdef PARANOIA if (!var->PossibleValue[MAXVAL].strvalue) I_Error("Bounded cvar \"%s\" without maximum!\n", var->name); @@ -1419,21 +1346,13 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth) // search for other for (i = MAXVAL+1; var->PossibleValue[i].strvalue; i++) -<<<<<<< HEAD - if (!stricmp(var->PossibleValue[i].strvalue, valstr)) -======= if (v == var->PossibleValue[i].value || !stricmp(var->PossibleValue[i].strvalue, valstr)) ->>>>>>> srb2/next { var->value = var->PossibleValue[i].value; var->string = var->PossibleValue[i].strvalue; goto finish; } -<<<<<<< HEAD -======= - ->>>>>>> srb2/next if ((v != INT32_MIN && v < var->PossibleValue[MINVAL].value) || !stricmp(valstr, "MIN")) { v = var->PossibleValue[MINVAL].value; @@ -1720,12 +1639,12 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth) return; } -<<<<<<< HEAD if (var == &cv_kartencore && !M_SecretUnlocked(SECRET_ENCORE)) { CONS_Printf(M_GetText("You haven't unlocked Encore Mode yet!\n")); return; -======= + } + if (var == &cv_forceskin) { INT32 skin = R_SkinAvailable(value); @@ -1734,7 +1653,6 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth) CONS_Printf("Please provide a valid skin name (\"None\" disables).\n"); return; } ->>>>>>> srb2/next } // Only add to netcmd buffer if in a netgame, otherwise, just change it. @@ -1843,14 +1761,8 @@ void CV_AddValue(consvar_t *var, INT32 increment) if (!increment) return; - // count pointlimit better -<<<<<<< HEAD /*if (var == &cv_pointlimit && (gametype == GT_MATCH)) increment *= 50;*/ - newvalue = var->value + increment; -======= - if (var == &cv_pointlimit && (gametype == GT_MATCH)) - increment *= 50; if (var == &cv_forceskin) // Special handling. { @@ -1868,7 +1780,6 @@ void CV_AddValue(consvar_t *var, INT32 increment) } else newvalue = var->value + increment; ->>>>>>> srb2/next if (var->PossibleValue) { @@ -1908,11 +1819,7 @@ void CV_AddValue(consvar_t *var, INT32 increment) #define MINVAL 0 #define MAXVAL 1 else if (var->PossibleValue[MINVAL].strvalue && !strcmp(var->PossibleValue[MINVAL].strvalue, "MIN")) -<<<<<<< HEAD - { // SRB2Kart -======= { ->>>>>>> srb2/next #ifdef PARANOIA if (!var->PossibleValue[MAXVAL].strvalue) I_Error("Bounded cvar \"%s\" without maximum!\n", var->name); @@ -1922,23 +1829,6 @@ void CV_AddValue(consvar_t *var, INT32 increment) { INT32 currentindice = -1, newindice; for (max = MAXVAL+1; var->PossibleValue[max].strvalue; max++) -<<<<<<< HEAD - if (var->PossibleValue[max].value == var->value) - currentindice = max; - - if (currentindice == -1 && max != MAXVAL+1) - newindice = ((increment > 0) ? MAXVAL : max) + increment; - else - newindice = currentindice + increment; - - if (newindice >= max || newindice <= MAXVAL) - { - newvalue = var->PossibleValue[((increment > 0) ? MINVAL : MAXVAL)].value; - CV_SetValue(var, newvalue); - } - else - CV_Set(var, var->PossibleValue[newindice].strvalue); -======= { if (var->PossibleValue[max].value == newvalue) { @@ -1959,9 +1849,9 @@ void CV_AddValue(consvar_t *var, INT32 increment) if (newindice >= max || newindice <= MAXVAL) { - if (var == &cv_pointlimit && (gametype == GT_MATCH) && increment > 0) + /*if (var == &cv_pointlimit && (gametype == GT_MATCH) && increment > 0) CV_SetValue(var, 50); - else + else*/ { newvalue = var->PossibleValue[((increment > 0) ? MINVAL : MAXVAL)].value; CV_SetValue(var, newvalue); @@ -1972,7 +1862,6 @@ void CV_AddValue(consvar_t *var, INT32 increment) } else CV_Set(var, var->PossibleValue[currentindice].strvalue); ->>>>>>> srb2/next } else CV_SetValue(var, newvalue); @@ -2115,7 +2004,6 @@ static boolean CV_FilterJoyAxisVars(consvar_t *v, const char *valstr) for (i = 0; i < 4; i++) { -<<<<<<< HEAD if (joyaxis_default[i]) { if (!stricmp(v->name, "joyaxis_fire")) @@ -2147,122 +2035,6 @@ static boolean CV_FilterJoyAxisVars(consvar_t *v, const char *valstr) } } #endif -======= - if (!stricmp(v->name, "joyaxis_turn")) - { - if (joyaxis_count > 6) return false; - // we're currently setting the new defaults, don't interfere - else if (joyaxis_count == 6) return true; - - if (!stricmp(valstr, "X-Axis")) joyaxis_count++; - else joyaxis_default = false; - } - if (!stricmp(v->name, "joyaxis_move")) - { - if (joyaxis_count > 6) return false; - else if (joyaxis_count == 6) return true; - - if (!stricmp(valstr, "Y-Axis")) joyaxis_count++; - else joyaxis_default = false; - } - if (!stricmp(v->name, "joyaxis_side")) - { - if (joyaxis_count > 6) return false; - else if (joyaxis_count == 6) return true; - - if (!stricmp(valstr, "Z-Axis")) joyaxis_count++; - else joyaxis_default = false; - } - if (!stricmp(v->name, "joyaxis_look")) - { - if (joyaxis_count > 6) return false; - else if (joyaxis_count == 6) return true; - - if (!stricmp(valstr, "None")) joyaxis_count++; - else joyaxis_default = false; - } - if (!stricmp(v->name, "joyaxis_fire") - || !stricmp(v->name, "joyaxis_firenormal")) - { - if (joyaxis_count > 6) return false; - else if (joyaxis_count == 6) return true; - - if (!stricmp(valstr, "None")) joyaxis_count++; - else joyaxis_default = false; - } - // reset all axis settings to defaults - if (joyaxis_count == 6) - { - COM_BufInsertText(va("%s \"%s\"\n", cv_turnaxis.name, cv_turnaxis.defaultvalue)); - COM_BufInsertText(va("%s \"%s\"\n", cv_moveaxis.name, cv_moveaxis.defaultvalue)); - COM_BufInsertText(va("%s \"%s\"\n", cv_sideaxis.name, cv_sideaxis.defaultvalue)); - COM_BufInsertText(va("%s \"%s\"\n", cv_lookaxis.name, cv_lookaxis.defaultvalue)); - COM_BufInsertText(va("%s \"%s\"\n", cv_fireaxis.name, cv_fireaxis.defaultvalue)); - COM_BufInsertText(va("%s \"%s\"\n", cv_firenaxis.name, cv_firenaxis.defaultvalue)); - joyaxis_count++; - return false; - } - } - - if (joyaxis2_default) - { - if (!stricmp(v->name, "joyaxis2_turn")) - { - if (joyaxis2_count > 6) return false; - // we're currently setting the new defaults, don't interfere - else if (joyaxis2_count == 6) return true; - - if (!stricmp(valstr, "X-Axis")) joyaxis2_count++; - else joyaxis2_default = false; - } - if (!stricmp(v->name, "joyaxis2_move")) - { - if (joyaxis2_count > 6) return false; - else if (joyaxis2_count == 6) return true; - - if (!stricmp(valstr, "Y-Axis")) joyaxis2_count++; - else joyaxis2_default = false; - } - if (!stricmp(v->name, "joyaxis2_side")) - { - if (joyaxis2_count > 6) return false; - else if (joyaxis2_count == 6) return true; - - if (!stricmp(valstr, "Z-Axis")) joyaxis2_count++; - else joyaxis2_default = false; - } - if (!stricmp(v->name, "joyaxis2_look")) - { - if (joyaxis2_count > 6) return false; - else if (joyaxis2_count == 6) return true; - - if (!stricmp(valstr, "None")) joyaxis2_count++; - else joyaxis2_default = false; - } - if (!stricmp(v->name, "joyaxis2_fire") - || !stricmp(v->name, "joyaxis2_firenormal")) - { - if (joyaxis2_count > 6) return false; - else if (joyaxis2_count == 6) return true; - - if (!stricmp(valstr, "None")) joyaxis2_count++; - else joyaxis2_default = false; - } - - // reset all axis settings to defaults - if (joyaxis2_count == 6) - { - COM_BufInsertText(va("%s \"%s\"\n", cv_turnaxis2.name, cv_turnaxis2.defaultvalue)); - COM_BufInsertText(va("%s \"%s\"\n", cv_moveaxis2.name, cv_moveaxis2.defaultvalue)); - COM_BufInsertText(va("%s \"%s\"\n", cv_sideaxis2.name, cv_sideaxis2.defaultvalue)); - COM_BufInsertText(va("%s \"%s\"\n", cv_lookaxis2.name, cv_lookaxis2.defaultvalue)); - COM_BufInsertText(va("%s \"%s\"\n", cv_fireaxis2.name, cv_fireaxis2.defaultvalue)); - COM_BufInsertText(va("%s \"%s\"\n", cv_firenaxis2.name, cv_firenaxis2.defaultvalue)); - joyaxis2_count++; - return false; - } - } ->>>>>>> srb2/next // we haven't reached our counts yet, or we're not default return true; diff --git a/src/console.c b/src/console.c index 22f1a3c0e..ad1e04d36 100644 --- a/src/console.c +++ b/src/console.c @@ -140,7 +140,6 @@ static CV_PossibleValue_t backcolor_cons_t[] = {{0, "White"}, {1, "Black"}, { {0, NULL}}; consvar_t cons_backcolor = {"con_backcolor", "Black", CV_CALL|CV_SAVE, backcolor_cons_t, CONS_backcolor_Change, 0, NULL, NULL, 0, 0, NULL}; -<<<<<<< HEAD static CV_PossibleValue_t menuhighlight_cons_t[] = { {0, "Game type"}, @@ -162,10 +161,6 @@ static CV_PossibleValue_t menuhighlight_cons_t[] = {0, NULL} }; consvar_t cons_menuhighlight = {"menuhighlight", "Game type", CV_SAVE, menuhighlight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; -======= - -consvar_t cons_backcolor = {"con_backcolor", "Green", CV_CALL|CV_SAVE, backcolor_cons_t, CONS_backcolor_Change, 0, NULL, NULL, 0, 0, NULL}; ->>>>>>> srb2/next static void CON_Print(char *msg); @@ -252,16 +247,14 @@ static void CONS_Bind_f(void) // CONSOLE SETUP //====================================================================== -<<<<<<< HEAD -======= // Font colormap colors // TODO: This could probably be improved somehow... // These colormaps are 99% identical, with just a few changed bytes // This could EASILY be handled by modifying a centralised colormap // for software depending on the prior state - but yknow, OpenGL... -UINT8 *yellowmap, *magentamap, *lgreenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap, *purplemap, *aquamap, *peridotmap, *azuremap, *brownmap, *rosymap, *invertmap; +UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap,\ + *skymap, *goldmap, *lavendermap, *aquamap, *magentamap, *pinkmap, *brownmap, *tanmap; ->>>>>>> srb2/next // Console BG color UINT8 *consolebgmap = NULL; UINT8 *promptbgmap = NULL; @@ -281,7 +274,6 @@ void CON_SetupBackColormapEx(INT32 color, boolean prompt) switch (color) { -<<<<<<< HEAD case 0: palindex = 15; break; // White case 1: palindex = 31; break; // Black case 2: palindex = 251; break; // Sepia @@ -303,30 +295,7 @@ void CON_SetupBackColormapEx(INT32 color, boolean prompt) case 18: palindex = 207; shift = 7; break; // Rose // Default black default: palindex = 31; break; -======= - case 0: palindex = 15; break; // White - case 1: palindex = 31; break; // Black - case 2: palindex = 251; break; // Sepia - case 3: palindex = 239; break; // Brown - case 4: palindex = 215; shift = 7; break; // Pink - case 5: palindex = 37; shift = 7; break; // Raspberry - case 6: palindex = 47; shift = 7; break; // Red - case 7: palindex = 53; shift = 7; break; // Creamsicle - case 8: palindex = 63; break; // Orange - case 9: palindex = 56; shift = 7; break; // Gold - case 10: palindex = 79; shift = 7; break; // Yellow - case 11: palindex = 119; shift = 7; break; // Emerald - case 12: palindex = 111; break; // Green - case 13: palindex = 136; shift = 7; break; // Cyan - case 14: palindex = 175; shift = 7; break; // Steel - case 15: palindex = 166; shift = 7; break; // Periwinkle - case 16: palindex = 159; break; // Blue - case 17: palindex = 187; shift = 7; break; // Purple - case 18: palindex = 199; shift = 7; break; // Lavender - // Default green - default: palindex = 111; break; } ->>>>>>> srb2/next if (prompt) { @@ -363,18 +332,11 @@ static void CONS_backcolor_Change(void) CON_SetupBackColormapEx(cons_backcolor.value, false); } -// Font colormap colors -// TODO: This could probably be improved somehow... -// These colormaps are 99% identical, with just a few changed bytes -UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap,\ - *skymap, *goldmap, *lavendermap, *aquamap, *magentamap, *pinkmap, *brownmap, *tanmap; - static void CON_SetupColormaps(void) { INT32 i; UINT8 *memorysrc = (UINT8 *)Z_Malloc((256*15), PU_STATIC, NULL); -<<<<<<< HEAD purplemap = memorysrc; yellowmap = (purplemap+256); greenmap = (yellowmap+256); @@ -390,23 +352,6 @@ static void CON_SetupColormaps(void) pinkmap = (magentamap+256); brownmap = (pinkmap+256); tanmap = (brownmap+256); -======= - magentamap = memorysrc; - yellowmap = (magentamap+256); - lgreenmap = (yellowmap+256); - bluemap = (lgreenmap+256); - redmap = (bluemap+256); - graymap = (redmap+256); - orangemap = (graymap+256); - skymap = (orangemap+256); - purplemap = (skymap+256); - aquamap = (purplemap+256); - peridotmap = (aquamap+256); - azuremap = (peridotmap+256); - brownmap = (azuremap+256); - rosymap = (brownmap+256); - invertmap = (rosymap+256); ->>>>>>> srb2/next // setup the other colormaps, for console text @@ -416,8 +361,6 @@ static void CON_SetupColormaps(void) for (i = 0; i < (256*15); i++, ++memorysrc) *memorysrc = (UINT8)(i & 0xFF); // remap each color to itself... -<<<<<<< HEAD - // SRB2Kart: Different console font, new colors purplemap[0] = (UINT8)163; yellowmap[0] = (UINT8)73; greenmap[0] = (UINT8)98; @@ -433,31 +376,6 @@ static void CON_SetupColormaps(void) pinkmap[0] = (UINT8)210; brownmap[0] = (UINT8)224; tanmap[0] = (UINT8)217; // no longer nice :( -======= -#define colset(map, a, b, c) \ - map[1] = (UINT8)a;\ - map[3] = (UINT8)b;\ - map[9] = (UINT8)c - - colset(magentamap, 177, 178, 184); - colset(yellowmap, 82, 73, 66); - colset(lgreenmap, 97, 98, 106); - colset(bluemap, 146, 147, 155); - colset(redmap, 210, 32, 39); - colset(graymap, 6, 8, 14); - colset(orangemap, 51, 52, 57); - colset(skymap, 129, 130, 133); - colset(purplemap, 160, 161, 163); - colset(aquamap, 120, 121, 123); - colset(peridotmap, 88, 188, 190); - colset(azuremap, 144, 145, 170); - colset(brownmap, 219, 221, 224); - colset(rosymap, 200, 201, 203); - colset(invertmap, 27, 26, 22); - invertmap[26] = (UINT8)3; - -#undef colset ->>>>>>> srb2/next // Init back colormap CON_SetupBackColormap(); @@ -1424,13 +1342,8 @@ void CONS_Printf(const char *fmt, ...) // if not in display loop, force screen update if (con_startup && (!setrenderneeded)) { -<<<<<<< HEAD -#if (defined (_WINDOWS)) || (defined (__OS2__) && !defined (HAVE_SDL)) - patch_t *con_backpic = W_CachePatchName("KARTKREW", PU_CACHE); -======= #ifdef _WINDOWS - patch_t *con_backpic = W_CachePatchName("CONSBACK", PU_PATCH); ->>>>>>> srb2/next + patch_t *con_backpic = W_CachePatchName("KARTKREW", PU_CACHE); // Jimita: CON_DrawBackpic just called V_DrawScaledPatch V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, con_backpic, NULL); @@ -1673,7 +1586,7 @@ static void CON_DrawBackpic(void) int x, w, h; // Get the lumpnum for CONSBACK, or fallback into MISSING. - piclump = W_CheckNumForName("CONSBACK"); + piclump = W_CheckNumForName("KARTKREW"); if (piclump == LUMPERROR) piclump = W_GetNumForName("MISSING"); @@ -1731,18 +1644,7 @@ static void CON_DrawConsole(void) // draw console background if (cons_backpic.value || con_forcepic) -<<<<<<< HEAD - { - patch_t *con_backpic = W_CachePatchName("KARTKREW", PU_CACHE); - - // Jimita: CON_DrawBackpic just called V_DrawScaledPatch - V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, con_backpic, NULL); - - W_UnlockCachedPatch(con_backpic); - } -======= CON_DrawBackpic(); ->>>>>>> srb2/next else { // inu: no more width (was always 0 and vid.width) @@ -1808,13 +1710,7 @@ void CON_Drawer(void) if (con_curlines > 0) CON_DrawConsole(); -<<<<<<< HEAD else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS || gamestate == GS_VOTING || gamestate == GS_EVALUATION || gamestate == GS_WAITINGPLAYERS) -======= - else if (gamestate == GS_LEVEL - || gamestate == GS_INTERMISSION || gamestate == GS_ENDING || gamestate == GS_CUTSCENE - || gamestate == GS_CREDITS || gamestate == GS_EVALUATION) ->>>>>>> srb2/next CON_DrawHudlines(); } diff --git a/src/console.h b/src/console.h index eda0a7eb1..819a971b5 100644 --- a/src/console.h +++ b/src/console.h @@ -34,23 +34,15 @@ extern UINT32 con_scalefactor; // console text scale factor extern consvar_t cons_backcolor, cons_menuhighlight; -<<<<<<< HEAD extern UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap,\ *skymap, *goldmap, *lavendermap, *aquamap, *magentamap, *pinkmap, *brownmap, *tanmap; -======= -extern UINT8 *yellowmap, *magentamap, *lgreenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap, *purplemap, *aquamap, *peridotmap, *azuremap, *brownmap, *rosymap, *invertmap; ->>>>>>> srb2/next // Console bg color (auto updated to match) extern UINT8 *consolebgmap; extern UINT8 *promptbgmap; -<<<<<<< HEAD INT32 CON_ShiftChar(INT32 ch); - -======= void CON_SetupBackColormapEx(INT32 color, boolean prompt); ->>>>>>> srb2/next void CON_SetupBackColormap(void); void CON_ClearHUD(void); // clear heads up messages diff --git a/src/m_anigif.c b/src/m_anigif.c index e63315ad8..a1c1309d3 100644 --- a/src/m_anigif.c +++ b/src/m_anigif.c @@ -24,13 +24,6 @@ #ifdef HWRENDER #include "hardware/hw_main.h" #endif -<<<<<<< HEAD - -#ifdef HWRENDER -#include "hardware/hw_main.h" -#endif -======= ->>>>>>> srb2/next // GIFs are always little-endian #include "byteptr.h" @@ -414,15 +407,6 @@ const UINT8 gifhead_nsid[19] = {0x21,0xFF,0x0B, // extension block + size // static RGBA_t *GIF_getpalette(size_t palnum) { -<<<<<<< HEAD - // In hardware mode, uses the master palette - return ((gif_colorprofile -#ifdef HWRENDER - && (rendermode == render_soft) -#endif - ) ? &pLocalPalette[palnum*256] - : &pMasterPalette[palnum*256]); -======= // In hardware mode, always returns the local palette #ifdef HWRENDER if (rendermode == render_opengl) @@ -430,7 +414,6 @@ static RGBA_t *GIF_getpalette(size_t palnum) else #endif return (gif_colorprofile ? &pLocalPalette[palnum*256] : &pMasterPalette[palnum*256]); ->>>>>>> srb2/next } // @@ -483,13 +466,6 @@ static void GIF_headwrite(void) WRITEUINT16(p, rheight); // colors, aspect, etc -<<<<<<< HEAD - /* - also these are magical values, check out - https://tronche.com/computer-graphics/gif/gif89a.html#screen-descriptor - */ -======= ->>>>>>> srb2/next WRITEUINT8(p, 0xF7); // (0xF7 = 1111 0111) WRITEUINT8(p, 0x00); WRITEUINT8(p, 0x00); @@ -605,15 +581,11 @@ static void GIF_framewrite(void) I_ReadScreen(movie_screen); #ifdef HWRENDER else if (rendermode == render_opengl) -<<<<<<< HEAD - hwrconvert(); -======= { UINT8 *linear = HWR_GetScreenshot(); GIF_rgbconvert(linear, movie_screen); free(linear); } ->>>>>>> srb2/next #endif } else @@ -622,20 +594,6 @@ static void GIF_framewrite(void) blitw = vid.width; blith = vid.height; -<<<<<<< HEAD - if (gif_frames == 0) - { - if (rendermode == render_soft) - I_ReadScreen(movie_screen); -#ifdef HWRENDER - else if (rendermode == render_opengl) - { - hwrconvert(); - VID_BlitLinearScreen(screens[2], screens[0], vid.width*vid.bpp, vid.height, vid.width*vid.bpp, vid.rowbytes); - } -#endif - } -======= #ifdef HWRENDER // Copy the current OpenGL frame into the base screen if (rendermode == render_opengl) @@ -650,7 +608,6 @@ static void GIF_framewrite(void) // OpenGL already does the same above. if (gif_frames == 0 && rendermode == render_soft) I_ReadScreen(movie_screen); ->>>>>>> srb2/next movie_screen = screens[0]; } @@ -753,17 +710,6 @@ static void GIF_framewrite(void) // INT32 GIF_open(const char *filename) { -<<<<<<< HEAD -#if 0 - if (rendermode != render_soft) - { - CONS_Alert(CONS_WARNING, M_GetText("GIFs cannot be taken in non-software modes!\n")); - return 0; - } -#endif - -======= ->>>>>>> srb2/next gif_out = fopen(filename, "wb"); if (!gif_out) return 0; diff --git a/src/p_map.c b/src/p_map.c index ec25b17ef..34445f14f 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -129,7 +129,6 @@ boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z) // MOVEMENT ITERATOR FUNCTIONS // ========================================================================= -<<<<<<< HEAD // For our intermediate buffer, remove any duplicate entries by adding each one to // a temprary buffer if it's not already in there, copy the temporary buffer back over the intermediate afterwards static void spechitint_removedups(void) @@ -224,8 +223,14 @@ static boolean P_SpecialIsLinedefCrossType(UINT16 ldspecial) return linedefcrossspecial; } -//#define TELEPORTJANK - +// +// P_DoSpring +// +// mass = vertical speed +// damage = horizontal speed +// raisestate = state to change spring to on collision +// painchance = star effect color +// boolean P_DoSpring(mobj_t *spring, mobj_t *object) { //INT32 pflags; @@ -236,33 +241,6 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) UINT8 starcolor = (spring->info->painchance % MAXTRANSLATIONS); fixed_t savemomx = 0; fixed_t savemomy = 0; -======= -// P_DoSpring -// -// MF_SPRING does some weird, mildly hacky stuff sometimes. -// mass = vertical speed -// damage = horizontal speed -// raisestate = state to change spring to on collision -// reactiontime = number of times it can give 10 points (0 is standard) -// painchance = spring mode: -// 0 = standard vanilla spring behaviour -// Positive spring modes are minor variants of vanilla spring behaviour. -// 1 = launch players in jump -// 2 = don't modify player at all, just add momentum -// 3 = speed-booster mode (force onto ground, MF_AMBUSH causes auto-spin) -// Negative spring modes are mildly-related gimmicks with customisation. -// -1 = pinball bumper -// Any other spring mode defaults to standard vanilla spring behaviour, -// ****** but forward compatibility is not guaranteed for these. ****** -// - -boolean P_DoSpring(mobj_t *spring, mobj_t *object) -{ - fixed_t vertispeed = spring->info->mass; - fixed_t horizspeed = spring->info->damage; - boolean final = false; - UINT8 strong = 0; ->>>>>>> srb2/next // Object was already sprung this tic if (object->eflags & MFE_SPRUNG) @@ -276,138 +254,34 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) if (!spring->health || !object->health) return false; - if (object->player) - { - if (spring->info->painchance == 3) - ; - else if (object->player->charability == CA_TWINSPIN && object->player->panim == PA_ABILITY) - strong = 1; - else if (object->player->charability2 == CA2_MELEE && object->player->panim == PA_ABILITY2) - strong = 2; - } - - if (spring->info->painchance == -1) // Pinball bumper mode. - { - // The first of the entirely different spring modes! - // Some of the attributes mean different things here. - // mass = default strength (can be controlled by mapthing's spawnangle) - // damage = unused - angle_t horizangle, vertiangle; - - if (!vertispeed) - return false; - -<<<<<<< HEAD #if 0 if (horizspeed && vertispeed) // Mimic SA { object->momx = object->momy = 0; P_TryMove(object, spring->x, spring->y, true); -======= - if (object->player && object->player->homing) // Sonic Heroes and Shadow the Hedgehog are the only games to contain homing-attackable bumpers! - { - horizangle = 0; - vertiangle = ((object->eflags & MFE_VERTICALFLIP) ? ANGLE_270 : ANGLE_90) >> ANGLETOFINESHIFT; - object->player->pflags &= ~PF_THOKKED; - if (spring->eflags & MFE_VERTICALFLIP) - object->z = spring->z - object->height - 1; - else - object->z = spring->z + spring->height + 1; - } - else - { - horizangle = R_PointToAngle2(spring->x, spring->y, object->x, object->y); - vertiangle = (R_PointToAngle2( - 0, - spring->z + spring->height/2, - FixedHypot(object->x - spring->x, object->y - spring->y), - object->z + object->height/2) - >> ANGLETOFINESHIFT) & FINEMASK; - } - - if (spring->spawnpoint && spring->spawnpoint->angle > 0) - vertispeed = (spring->spawnpoint->angle<<(FRACBITS-1))/5; - vertispeed = FixedMul(vertispeed, FixedMul(object->scale, spring->scale)); - - if (object->player) - { - fixed_t playervelocity; - - if (strong) - vertispeed <<= 1; - - if (!(object->player->pflags & PF_THOKKED) && !(object->player->homing) - && ((playervelocity = FixedDiv(9*FixedHypot(object->player->speed, object->momz), 10< vertispeed)) - vertispeed = playervelocity; - - if (object->player->powers[pw_carry] == CR_NIGHTSMODE) // THIS has NiGHTS support, at least... - { - angle_t nightsangle = 0; - - if (object->player->bumpertime > (TICRATE/2)-5) - return false; - - if ((object->player->pflags & PF_TRANSFERTOCLOSEST) && object->player->axis1 && object->player->axis2) - { - nightsangle = R_PointToAngle2(object->player->axis1->x, object->player->axis1->y, object->player->axis2->x, object->player->axis2->y); - nightsangle += ANGLE_90; - } - else if (object->target) - { - if (object->target->flags2 & MF2_AMBUSH) - nightsangle = R_PointToAngle2(object->target->x, object->target->y, object->x, object->y); - else - nightsangle = R_PointToAngle2(object->x, object->y, object->target->x, object->target->y); - } - - object->player->flyangle = AngleFixed(R_PointToAngle2( - 0, - spring->z + spring->height/2, - FixedMul( - FINESINE(((nightsangle - horizangle) >> ANGLETOFINESHIFT) & FINEMASK), - FixedHypot(object->x - spring->x, object->y - spring->y)), - object->z + object->height/2))>>FRACBITS; - - object->player->bumpertime = TICRATE/2; - } - else - { - INT32 pflags = object->player->pflags & (PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING|PF_THOKKED|PF_BOUNCING); // Not identical to below... - UINT8 secondjump = object->player->secondjump; - if (object->player->pflags & PF_GLIDING) - P_SetPlayerMobjState(object, S_PLAY_FALL); - P_ResetPlayer(object->player); - object->player->pflags |= pflags; - object->player->secondjump = secondjump; - } - } - - if (!P_IsObjectOnGround(object)) // prevents uncurling when spinning due to "landing" - object->momz = FixedMul(vertispeed, FINESINE(vertiangle)); - P_InstaThrust(object, horizangle, FixedMul(vertispeed, FINECOSINE(vertiangle))); - - object->eflags |= MFE_SPRUNG; // apply this flag asap! - - goto springstate; ->>>>>>> srb2/next } #endif // Does nothing? if (!vertispeed && !horizspeed) + { return false; + } object->standingslope = NULL; // Okay, now we know it's not going to be relevant - no launching off at silly angles for you. if (spring->eflags & MFE_VERTICALFLIP) vertispeed *= -1; -<<<<<<< HEAD // Vertical springs teleport you on TOP of them. if (vertispeed > 0) + { object->z = spring->z + spring->height + 1; + } else if (vertispeed < 0) + { object->z = spring->z - object->height - 1; + } else { fixed_t offx, offy; @@ -416,108 +290,24 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) savemomx = object->momx; savemomy = object->momy; object->momx = object->momy = 0; -======= - if (object->player && (object->player->powers[pw_carry] == CR_NIGHTSMODE)) - { - /*Someone want to make these work like bumpers?*/ - return false; - } ->>>>>>> srb2/next - if (strong) - { - if (horizspeed) - horizspeed = FixedMul(horizspeed, (4*FRACUNIT)/3); - if (vertispeed) - vertispeed = FixedMul(vertispeed, (6*FRACUNIT)/5); // aprox square root of above - } + // Overestimate the distance to position you at + offx = P_ReturnThrustX(spring, spring->angle, (spring->radius + object->radius + 1) * 2); + offy = P_ReturnThrustY(spring, spring->angle, (spring->radius + object->radius + 1) * 2); -<<<<<<< HEAD // Then clip it down to a square, so it matches the hitbox size. if (offx > (spring->radius + object->radius + 1)) offx = spring->radius + object->radius + 1; else if (offx < -(spring->radius + object->radius + 1)) offx = -(spring->radius + object->radius + 1); -======= - object->eflags |= MFE_SPRUNG; // apply this flag asap! - spring->flags &= ~(MF_SPRING|MF_SPECIAL); // De-solidify ->>>>>>> srb2/next - if (spring->info->painchance != 2) - { - if (object->player) - { - object->player->pflags &= ~PF_APPLYAUTOBRAKE; -#ifndef SPRINGSPIN - object->player->powers[pw_justsprung] = 5; - if (horizspeed) - object->player->powers[pw_noautobrake] = ((horizspeed*TICRATE)>>(FRACBITS+3))/9; // TICRATE at 72*FRACUNIT - else if (P_MobjFlip(object) == P_MobjFlip(spring)) - object->player->powers[pw_justsprung] |= (1<<15); -#else - object->player->powers[pw_justsprung] = 15; - if (horizspeed) - object->player->powers[pw_noautobrake] = ((horizspeed*TICRATE)>>(FRACBITS+3))/9; // TICRATE at 72*FRACUNIT - else - { - if (abs(object->player->rmomx) > object->scale || abs(object->player->rmomy) > object->scale) - object->player->drawangle = R_PointToAngle2(0, 0, object->player->rmomx, object->player->rmomy); - if (P_MobjFlip(object) == P_MobjFlip(spring)) - object->player->powers[pw_justsprung] |= (1<<15); - } -#endif - } - - if ((horizspeed && vertispeed) || (object->player && object->player->homing)) // Mimic SA - { - object->momx = object->momy = 0; - P_TryMove(object, spring->x, spring->y, true); - } - - if (vertispeed > 0) - object->z = spring->z + spring->height + 1; - else if (vertispeed < 0) - object->z = spring->z - object->height - 1; - else - { - fixed_t offx, offy; - // Horizontal springs teleport you in FRONT of them. - object->momx = object->momy = 0; - - // Overestimate the distance to position you at - offx = P_ReturnThrustX(spring, spring->angle, (spring->radius + object->radius + 1) * 2); - offy = P_ReturnThrustY(spring, spring->angle, (spring->radius + object->radius + 1) * 2); - - // Make it square by clipping - if (offx > (spring->radius + object->radius + 1)) - offx = spring->radius + object->radius + 1; - else if (offx < -(spring->radius + object->radius + 1)) - offx = -(spring->radius + object->radius + 1); - -<<<<<<< HEAD P_TryMove(object, spring->x + offx, spring->y + offy, true); -======= - if (offy > (spring->radius + object->radius + 1)) - offy = spring->radius + object->radius + 1; - else if (offy < -(spring->radius + object->radius + 1)) - offy = -(spring->radius + object->radius + 1); - - // Set position! - P_TryMove(object, spring->x + offx, spring->y + offy, true); - - if ((spring->info->painchance == 3)) - { - object->z = spring->z; - if (spring->eflags & MFE_VERTICALFLIP) - object->z -= object->height; - object->momz = 0; - } - } ->>>>>>> srb2/next } if (vertispeed) + { object->momz = FixedMul(vertispeed, FixedSqrt(FixedMul(vscale, spring->scale))); + } if (horizspeed) { @@ -608,14 +398,11 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) if (object->player) { - INT32 pflags; - UINT8 secondjump; - boolean washoming; - if (spring->flags & MF_ENEMY) // Spring shells + { P_SetTarget(&spring->target, object); + } -<<<<<<< HEAD P_ResetPlayer(object->player); object->player->kartstuff[k_springstars] = max(vertispeed, horizspeed) / FRACUNIT / 2; @@ -623,98 +410,6 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) } return true; -======= - if (horizspeed) - { - object->angle = object->player->drawangle = spring->angle; - - if (!demoplayback || P_ControlStyle(object->player) == CS_LMAOGALOG) - { - if (object->player == &players[consoleplayer]) - localangle = spring->angle; - else if (object->player == &players[secondarydisplayplayer]) - localangle2 = spring->angle; - } - } - - if (object->player->pflags & PF_GLIDING) - P_SetPlayerMobjState(object, S_PLAY_FALL); - if ((spring->info->painchance == 3)) - { - if (!(pflags = (object->player->pflags & PF_SPINNING)) && - (((object->player->charability2 == CA2_SPINDASH) && (object->player->cmd.buttons & BT_USE)) - || (spring->flags2 & MF2_AMBUSH))) - { - pflags = PF_SPINNING; - P_SetPlayerMobjState(object, S_PLAY_ROLL); - S_StartSound(object, sfx_spin); - } - else - P_SetPlayerMobjState(object, S_PLAY_ROLL); - } - else - pflags = object->player->pflags & (PF_STARTJUMP|PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING|PF_THOKKED|PF_BOUNCING); // I still need these. - secondjump = object->player->secondjump; - washoming = object->player->homing; - P_ResetPlayer(object->player); - - if (spring->info->painchance == 1) // For all those ancient, SOC'd abilities. - { - object->player->pflags |= P_GetJumpFlags(object->player); - P_SetPlayerMobjState(object, S_PLAY_JUMP); - } - else if ((spring->info->painchance == 2) || ((spring->info->painchance != 3) && (pflags & PF_BOUNCING))) // Adding momentum only. - { - object->player->pflags |= (pflags &~ PF_STARTJUMP); - object->player->secondjump = secondjump; - if (washoming) - object->player->pflags &= ~PF_THOKKED; - } - else if (!vertispeed) - { - if (pflags & (PF_JUMPED|PF_SPINNING)) - { - object->player->pflags |= pflags; - object->player->secondjump = secondjump; - } - else if (object->player->dashmode >= DASHMODE_THRESHOLD) - P_SetPlayerMobjState(object, S_PLAY_DASH); - else if (P_IsObjectOnGround(object) && horizspeed >= FixedMul(object->player->runspeed, object->scale)) - P_SetPlayerMobjState(object, S_PLAY_RUN); - else - P_SetPlayerMobjState(object, S_PLAY_WALK); - } - else if (P_MobjFlip(object)*vertispeed > 0) - P_SetPlayerMobjState(object, S_PLAY_SPRING); - else - P_SetPlayerMobjState(object, S_PLAY_FALL); - } - - object->standingslope = NULL; // And again. - - final = true; - -springstate: - if ((statenum_t)(spring->state-states) < spring->info->raisestate) - { - P_SetMobjState(spring, spring->info->raisestate); - if (object->player && spring->reactiontime && !(spring->info->flags & MF_ENEMY)) - { - if (object->player->powers[pw_carry] != CR_NIGHTSMODE) // don't make graphic in NiGHTS - P_SetMobjState(P_SpawnMobj(spring->x, spring->y, spring->z + (spring->height/2), MT_SCORE), mobjinfo[MT_SCORE].spawnstate+11); - P_AddPlayerScore(object->player, 10); - spring->reactiontime--; - } - - if (strong) - { - P_TwinSpinRejuvenate(object->player, (strong == 1 ? object->player->thokitem : object->player->revitem)); - S_StartSound(object, sfx_sprong); // strong spring. sprong. - } - } - - return final; ->>>>>>> srb2/next } static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object) @@ -800,8 +495,6 @@ static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object) } } -<<<<<<< HEAD -======= static void P_DoPterabyteCarry(player_t *player, mobj_t *ptera) { if (player->powers[pw_carry] && player->powers[pw_carry] != CR_ROLLOUT) @@ -838,79 +531,6 @@ static void P_DoPterabyteCarry(player_t *player, mobj_t *ptera) ptera->watertop = ptera->waterbottom = ptera->cusval = 0; } -static void P_DoTailsCarry(player_t *sonic, player_t *tails) -{ - INT32 p; - fixed_t zdist; // z distance between the two players' bottoms - - if (tails->powers[pw_carry]) - return; - if (sonic->powers[pw_carry]) - return; - - if (tails->spectator) - return; - if (sonic->spectator) - return; - - if (!(tails->pflags & PF_CANCARRY)) - return; - - if ((sonic->mo->eflags & MFE_VERTICALFLIP) != (tails->mo->eflags & MFE_VERTICALFLIP)) - return; // Both should be in same gravity - - if (tails->mo->eflags & MFE_VERTICALFLIP) - { - if (tails->mo->ceilingz - (tails->mo->z + tails->mo->height) < sonic->mo->height-FixedMul(2*FRACUNIT, sonic->mo->scale)) - return; - } - else if (tails->mo->z - tails->mo->floorz < sonic->mo->height-FixedMul(2*FRACUNIT, sonic->mo->scale)) - return; // No room to pick up this guy! - - // Search in case another player is already being carried by this fox. - for (p = 0; p < MAXPLAYERS; p++) - if (playeringame[p] && players[p].mo - && players[p].powers[pw_carry] == CR_PLAYER && players[p].mo->tracer == tails->mo) - return; - - // Why block opposing teams from tailsflying each other? - // Sneaking into the hands of a flying tails player in Race might be a viable strategy, who knows. - /* - if ((gametyperules & GTR_RACE) - || (netgame && (tails->spectator || sonic->spectator)) - || (G_TagGametype() && (!(tails->pflags & PF_TAGIT) != !(sonic->pflags & PF_TAGIT))) - || (gametype == GT_MATCH) - || (G_GametypeHasTeams() && tails->ctfteam != sonic->ctfteam)) - return; */ - - if (tails->mo->eflags & MFE_VERTICALFLIP) - zdist = (sonic->mo->z + sonic->mo->height) - (tails->mo->z + tails->mo->height); - else - zdist = tails->mo->z - sonic->mo->z; - - if (zdist <= sonic->mo->height + sonic->mo->scale // FixedMul(FRACUNIT, sonic->mo->scale), but scale == FRACUNIT by default - && zdist > sonic->mo->height*2/3 - && P_MobjFlip(tails->mo)*sonic->mo->momz <= 0) - { - if (sonic-players == consoleplayer && botingame) - CV_SetValue(&cv_analog[1], false); - P_ResetPlayer(sonic); - P_SetTarget(&sonic->mo->tracer, tails->mo); - sonic->powers[pw_carry] = CR_PLAYER; - S_StartSound(sonic->mo, sfx_s3k4a); - P_UnsetThingPosition(sonic->mo); - sonic->mo->x = tails->mo->x; - sonic->mo->y = tails->mo->y; - P_SetThingPosition(sonic->mo); - } - else { - if (sonic-players == consoleplayer && botingame) - CV_SetValue(&cv_analog[1], true); - P_SetTarget(&sonic->mo->tracer, NULL); - sonic->powers[pw_carry] = CR_NONE; - } -} - // Boss 5 post-defeat comedy static void P_SlapStick(mobj_t *fang, mobj_t *pole) { @@ -978,7 +598,6 @@ static void P_PlayerBarrelCollide(mobj_t *toucher, mobj_t *barrel) P_DamageMobj(barrel, toucher, toucher, 1, 0); } ->>>>>>> srb2/next // // PIT_CheckThing // @@ -1003,8 +622,8 @@ static boolean PIT_CheckThing(mobj_t *thing) return true; #ifdef SEENAMES - // Do name checks all the way up here - // So that NOTHING ELSE can see MT_NAMECHECK because it is client-side. + // Do name checks all the way up here + // So that NOTHING ELSE can see MT_NAMECHECK because it is client-side. if (tmthing->type == MT_NAMECHECK) { // Ignore things that aren't players, ignore spectators, ignore yourself. @@ -1030,87 +649,6 @@ static boolean PIT_CheckThing(mobj_t *thing) } #endif - // Metal Sonic destroys tiny baby objects. -<<<<<<< HEAD - /*if (tmthing->type == MT_METALSONIC_RACE - && (thing->flags & (MF_MISSILE|MF_ENEMY|MF_BOSS) || thing->type == MT_SPIKE)) -======= - if (tmthing->type == MT_METALSONIC_RACE - && (thing->flags & (MF_MISSILE|MF_ENEMY|MF_BOSS) - || (thing->type == MT_SPIKE - || thing->type == MT_WALLSPIKE))) ->>>>>>> srb2/next - { - if ((thing->flags & (MF_ENEMY|MF_BOSS)) && (thing->health <= 0 || !(thing->flags & MF_SHOOTABLE))) - return true; - blockdist = thing->radius + tmthing->radius; - if (abs(thing->x - tmx) >= blockdist || abs(thing->y - tmy) >= blockdist) - return true; // didn't hit it - // see if it went over / under - if (tmthing->z > thing->z + thing->height) - return true; // overhead - if (tmthing->z + tmthing->height < thing->z) - return true; // underneath - if (thing->type == MT_SPIKE - || thing->type == MT_WALLSPIKE) - { - mobj_t *iter; - if (thing->flags & MF_SOLID) - S_StartSound(tmthing, thing->info->deathsound); - for (iter = thing->subsector->sector->thinglist; iter; iter = iter->snext) - if (iter->type == thing->type && iter->health > 0 && iter->flags & MF_SOLID && (iter == thing || P_AproxDistance(P_AproxDistance(thing->x - iter->x, thing->y - iter->y), thing->z - iter->z) < 56*thing->scale))//FixedMul(56*FRACUNIT, thing->scale)) - P_KillMobj(iter, tmthing, tmthing, 0); - } - else - { - thing->health = 0; - P_KillMobj(thing, tmthing, tmthing, 0); - } - return true; - }*/ - -<<<<<<< HEAD - if (!(thing->flags & (MF_SOLID|MF_SPECIAL|MF_PAIN|MF_SHOOTABLE)) || (thing->flags & MF_NOCLIPTHING)) -======= - // SF_DASHMODE users destroy spikes and monitors, CA_TWINSPIN users and CA2_MELEE users destroy spikes. - if ((tmthing->player) - && ((((tmthing->player->charflags & (SF_DASHMODE|SF_MACHINE)) == (SF_DASHMODE|SF_MACHINE)) && (tmthing->player->dashmode >= DASHMODE_THRESHOLD) - && (thing->flags & (MF_MONITOR) - || (thing->type == MT_SPIKE - || thing->type == MT_WALLSPIKE))) - || ((((tmthing->player->charability == CA_TWINSPIN) && (tmthing->player->panim == PA_ABILITY)) - || (tmthing->player->charability2 == CA2_MELEE && tmthing->player->panim == PA_ABILITY2)) - && (thing->type == MT_SPIKE - || thing->type == MT_WALLSPIKE)))) - { - if ((thing->flags & (MF_MONITOR)) && (thing->health <= 0 || !(thing->flags & MF_SHOOTABLE))) - return true; - blockdist = thing->radius + tmthing->radius; - if (abs(thing->x - tmx) >= blockdist || abs(thing->y - tmy) >= blockdist) - return true; // didn't hit it - // see if it went over / under - if (tmthing->z > thing->z + thing->height) - return true; // overhead - if (tmthing->z + tmthing->height < thing->z) - return true; // underneath - if (thing->type == MT_SPIKE - || thing->type == MT_WALLSPIKE) - { - mobj_t *iter; - if (thing->flags & MF_SOLID) - S_StartSound(tmthing, thing->info->deathsound); - for (iter = thing->subsector->sector->thinglist; iter; iter = iter->snext) - if (iter->type == thing->type && iter->health > 0 && iter->flags & MF_SOLID && (iter == thing || P_AproxDistance(P_AproxDistance(thing->x - iter->x, thing->y - iter->y), thing->z - iter->z) < 56*thing->scale))//FixedMul(56*FRACUNIT, thing->scale)) - P_KillMobj(iter, tmthing, tmthing, 0); - return true; - } - else - { - if (P_DamageMobj(thing, tmthing, tmthing, 1, 0)) - return true; - } - } - // vectorise metal - done in a special case as at this point neither has the right flags for touching if (thing->type == MT_METALSONIC_BATTLE && (tmthing->flags & MF_MISSILE) @@ -1133,7 +671,6 @@ static boolean PIT_CheckThing(mobj_t *thing) } if ((thing->flags & MF_NOCLIPTHING) || !(thing->flags & (MF_SOLID|MF_SPECIAL|MF_PAIN|MF_SHOOTABLE|MF_SPRING))) ->>>>>>> srb2/next return true; // Don't collide with your buddies while NiGHTS-flying. @@ -1431,8 +968,7 @@ static boolean PIT_CheckThing(mobj_t *thing) else thing->z = tmthing->z + tmthing->height + FixedMul(FRACUNIT, tmthing->scale); if (thing->flags & MF_SHOOTABLE) -<<<<<<< HEAD - P_DamageMobj(thing, tmthing, tmthing, 1); + P_DamageMobj(thing, tmthing, tmthing, 1, 0); return true; } @@ -1443,19 +979,31 @@ static boolean PIT_CheckThing(mobj_t *thing) return true; // overhead if (thing->z + thing->height < tmthing->z) return true; // underneath - if (tmthing->player && tmthing->flags & MF_SHOOTABLE && thing->health > 0) - P_DamageMobj(tmthing, thing, thing, 1); + if (tmthing->flags & MF_SHOOTABLE && thing->health > 0) + { + UINT32 damagetype = (thing->info->mass & 0xFF); + if (!damagetype && thing->flags & MF_FIRE) // BURN! + damagetype = DMG_FIRE; + if (P_DamageMobj(tmthing, thing, thing, 1, damagetype) && (damagetype = (thing->info->mass>>8))) + S_StartSound(thing, damagetype); + } return true; } - else if (tmthing->flags & MF_PAIN) + else if (tmthing->flags & MF_PAIN && thing->player) { // Painful thing splats player in the face // see if it went over / under if (tmthing->z > thing->z + thing->height) return true; // overhead if (tmthing->z + tmthing->height < thing->z) return true; // underneath - if (thing->player && thing->flags & MF_SHOOTABLE && tmthing->health > 0) - P_DamageMobj(thing, tmthing, tmthing, 1); + if (thing->flags & MF_SHOOTABLE && tmthing->health > 0) + { + UINT32 damagetype = (tmthing->info->mass & 0xFF); + if (!damagetype && tmthing->flags & MF_FIRE) // BURN! + damagetype = DMG_FIRE; + if (P_DamageMobj(thing, tmthing, tmthing, 1, damagetype) && (damagetype = (tmthing->info->mass>>8))) + S_StartSound(tmthing, damagetype); + } return true; } @@ -1741,58 +1289,23 @@ static boolean PIT_CheckThing(mobj_t *thing) if (tmthing->type == MT_SINK) { -======= - P_DamageMobj(thing, tmthing, tmthing, 1, 0); - return true; - } - - if (thing->flags & MF_PAIN && tmthing->player) - { // Player touches painful thing sitting on the floor ->>>>>>> srb2/next // see if it went over / under if (tmthing->z > thing->z + thing->height) return true; // overhead if (tmthing->z + tmthing->height < thing->z) return true; // underneath -<<<<<<< HEAD return K_KitchenSinkCollide(tmthing, thing); } else if (thing->type == MT_SINK) { -======= - if (tmthing->flags & MF_SHOOTABLE && thing->health > 0) - { - UINT32 damagetype = (thing->info->mass & 0xFF); - if (!damagetype && thing->flags & MF_FIRE) // BURN! - damagetype = DMG_FIRE; - if (P_DamageMobj(tmthing, thing, thing, 1, damagetype) && (damagetype = (thing->info->mass>>8))) - S_StartSound(thing, damagetype); - } - return true; - } - else if (tmthing->flags & MF_PAIN && thing->player) - { // Painful thing splats player in the face ->>>>>>> srb2/next // see if it went over / under if (tmthing->z > thing->z + thing->height) return true; // overhead if (tmthing->z + tmthing->height < thing->z) return true; // underneath -<<<<<<< HEAD return K_KitchenSinkCollide(thing, tmthing); -======= - if (thing->flags & MF_SHOOTABLE && tmthing->health > 0) - { - UINT32 damagetype = (tmthing->info->mass & 0xFF); - if (!damagetype && tmthing->flags & MF_FIRE) // BURN! - damagetype = DMG_FIRE; - if (P_DamageMobj(thing, tmthing, tmthing, 1, damagetype) && (damagetype = (tmthing->info->mass>>8))) - S_StartSound(tmthing, damagetype); - } - return true; ->>>>>>> srb2/next } if (tmthing->type == MT_FALLINGROCK) @@ -1838,7 +1351,7 @@ static boolean PIT_CheckThing(mobj_t *thing) } // missiles can hit other things - if (tmthing->flags & MF_MISSILE || tmthing->type == MT_SHELL) + if (tmthing->flags & MF_MISSILE) { // see if it went over / under if (tmthing->z > thing->z + thing->height) @@ -1846,7 +1359,7 @@ static boolean PIT_CheckThing(mobj_t *thing) if (tmthing->z + tmthing->height < thing->z) return true; // underneath - if (tmthing->type != MT_SHELL && tmthing->target && tmthing->target->type == thing->type) + if (tmthing->target && tmthing->target->type == thing->type) { // Don't hit same species as originator. if (thing == tmthing->target) @@ -1860,114 +1373,18 @@ static boolean PIT_CheckThing(mobj_t *thing) } } - // Special case for bounce rings so they don't get caught behind solid objects. - if ((tmthing->type == MT_THROWNBOUNCE && tmthing->fuse > 8*TICRATE) && thing->flags & MF_SOLID) - return true; - - // Missiles ignore Brak's helper. - /*if (thing->type == MT_BLACKEGGMAN_HELPER) - return true; - - // Hurting Brak - if (tmthing->type == MT_BLACKEGGMAN_MISSILE - && thing->type == MT_BLACKEGGMAN && tmthing->target != thing) - { - // Not if Brak's already in pain - if (!(thing->state >= &states[S_BLACKEGG_PAIN1] && thing->state <= &states[S_BLACKEGG_PAIN35])) - P_SetMobjState(thing, thing->info->painstate); - return false; - }*/ - - if (!(thing->flags & MF_SHOOTABLE)/* && !(thing->type == MT_EGGSHIELD)*/) + if (!(thing->flags & MF_SHOOTABLE)) { // didn't do any damage return !(thing->flags & MF_SOLID); } - if (tmthing->flags & MF_MISSILE && thing->player && tmthing->target && tmthing->target->player - && thing->player->ctfteam == tmthing->target->player->ctfteam - && thing->player->powers[pw_carry] == CR_PLAYER && thing->tracer == tmthing->target) - return true; // Don't give rings to your carry player by accident. - - /*if (thing->type == MT_EGGSHIELD) - { - angle_t angle = (R_PointToAngle2(thing->x, thing->y, tmthing->x - tmthing->momx, tmthing->y - tmthing->momy) - thing->angle) - ANGLE_90; - -<<<<<<< HEAD - if (!(angle > ANGLE_90 && angle < ANGLE_270)) // hit front of shield, didn't destroy it - return false; - else // hit shield from behind, shield is destroyed! - { - P_KillMobj(thing, tmthing, tmthing); - return false; - } - }*/ -======= - if (angle < ANGLE_180) // hit shield from behind, shield is destroyed! - P_KillMobj(thing, tmthing, tmthing, 0); - return false; - } ->>>>>>> srb2/next - // damage / explode if (tmthing->flags & MF_ENEMY) // An actual ENEMY! (Like the deton, for example) -<<<<<<< HEAD - P_DamageMobj(thing, tmthing, tmthing, 1); - /*else if (tmthing->type == MT_BLACKEGGMAN_MISSILE && thing->player -======= + { P_DamageMobj(thing, tmthing, tmthing, 1, 0); - else if (tmthing->type == MT_BLACKEGGMAN_MISSILE && thing->player ->>>>>>> srb2/next - && (thing->player->pflags & PF_JUMPED) - && !thing->player->powers[pw_flashing] - && thing->tracer != tmthing - && tmthing->target != thing) - { - // Hop on the missile for a ride! - thing->player->powers[pw_carry] = CR_GENERIC; - thing->player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE); - P_SetTarget(&thing->tracer, tmthing); - P_SetTarget(&tmthing->target, thing); // Set owner to the player - P_SetTarget(&tmthing->tracer, NULL); // Disable homing-ness - tmthing->momz = 0; - - thing->angle = tmthing->angle; - -<<<<<<< HEAD - if (!demo.playback) -======= - if (!demoplayback || P_ControlStyle(thing->player) == CS_LMAOGALOG) ->>>>>>> srb2/next - { - if (thing->player == &players[consoleplayer]) - localangle[0] = thing->angle; - else if (thing->player == &players[displayplayers[1]]) - localangle[1] = thing->angle; - else if (thing->player == &players[displayplayers[2]]) - localangle[2] = thing->angle; - else if (thing->player == &players[displayplayers[3]]) - localangle[3] = thing->angle; - } - - return true; } - else if (tmthing->type == MT_BLACKEGGMAN_MISSILE && thing->player && ((thing->player->powers[pw_carry] == CR_GENERIC) || (thing->player->pflags & PF_JUMPED))) - { - // Ignore - } - else if (tmthing->type == MT_BLACKEGGMAN_GOOPFIRE) - { - P_UnsetThingPosition(tmthing); - tmthing->x = thing->x; - tmthing->y = thing->y; - P_SetThingPosition(tmthing); -<<<<<<< HEAD - }*/ else - P_DamageMobj(thing, tmthing, tmthing->target, 1); -======= - } - else if (!(tmthing->type == MT_SHELL && thing->player)) // player collision handled in touchspecial for shell { UINT8 damagetype = tmthing->info->mass; if (!damagetype && tmthing->flags & MF_FIRE) // BURN! @@ -1975,15 +1392,8 @@ static boolean PIT_CheckThing(mobj_t *thing) P_DamageMobj(thing, tmthing, tmthing->target, 1, damagetype); } - // Fireball touched an enemy - // Don't bounce though, just despawn right there - if ((tmthing->type == MT_FIREBALL) && (thing->flags & MF_ENEMY)) - P_KillMobj(tmthing, NULL, NULL, 0); ->>>>>>> srb2/next - // don't traverse any more - - return (tmthing->type == MT_SHELL); + return false; } if (thing->flags & MF_PUSHABLE && (tmthing->player || tmthing->flags & MF_PUSHABLE) @@ -2046,47 +1456,6 @@ static boolean PIT_CheckThing(mobj_t *thing) P_SetTarget(&thing->target, tmthing); } -<<<<<<< HEAD - // Respawn rings and items - /*if ((tmthing->type == MT_NIGHTSDRONE || thing->type == MT_NIGHTSDRONE) -======= - // NiGHTS lap logic - if ((tmthing->type == MT_NIGHTSDRONE || thing->type == MT_NIGHTSDRONE) ->>>>>>> srb2/next - && (tmthing->player || thing->player)) - { - mobj_t *droneobj = (tmthing->type == MT_NIGHTSDRONE) ? tmthing : thing; - player_t *pl = (droneobj == thing) ? tmthing->player : thing->player; - - // Must be NiGHTS, must wait about a second - // must be flying in the SAME DIRECTION as the last time you came through. - // not (your direction) xor (stored direction) - // In other words, you can't u-turn and respawn rings near the drone. - if ((pl->powers[pw_carry] == CR_NIGHTSMODE) && (INT32)leveltime > droneobj->extravalue2 && ( - !(pl->flyangle > 90 && pl->flyangle < 270) - ^ (droneobj->extravalue1 > 90 && droneobj->extravalue1 < 270) - )) - { - pl->marelap++; - pl->totalmarelap++; - pl->lapbegunat = leveltime; - pl->lapstartedtime = pl->nightstime; - - if (pl->bonustime) - { - pl->marebonuslap++; - pl->totalmarebonuslap++; - - // Respawn rings and items - P_ReloadRings(); - } - - P_RunNightsLapExecutors(pl->mo); - } - droneobj->extravalue1 = pl->flyangle; - droneobj->extravalue2 = (INT32)leveltime + TICRATE; - }*/ - // check for special pickup if (thing->flags & MF_SPECIAL && tmthing->player) { @@ -2216,71 +1585,24 @@ static boolean PIT_CheckThing(mobj_t *thing) // Make sure they aren't able to damage you ANYWHERE along the Z axis, you have to be TOUCHING the person. && !(thing->z + thing->height < tmthing->z || thing->z > tmthing->z + tmthing->height)) { - if (tmthing->scale > thing->scale + (mapobjectscale/8)) // SRB2kart - Handle squishes first! - K_SquishPlayer(thing->player, tmthing, tmthing); - else if (thing->scale > tmthing->scale + (mapobjectscale/8)) - K_SquishPlayer(tmthing->player, thing, tmthing); - else if (tmthing->player->kartstuff[k_invincibilitytimer] && !thing->player->kartstuff[k_invincibilitytimer]) // SRB2kart - Then invincibility! - P_DamageMobj(thing, tmthing, tmthing, 1); - else if (thing->player->kartstuff[k_invincibilitytimer] && !tmthing->player->kartstuff[k_invincibilitytimer]) - P_DamageMobj(tmthing, thing, thing, 1); - else if ((tmthing->player->kartstuff[k_flamedash] && tmthing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD) - && !(thing->player->kartstuff[k_flamedash] && thing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)) // SRB2kart - Then flame shield! - P_DamageMobj(thing, tmthing, tmthing, 1); - else if ((thing->player->kartstuff[k_flamedash] && thing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD) - && !(tmthing->player->kartstuff[k_flamedash] && tmthing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)) // SRB2kart - Then flame shield! - P_DamageMobj(tmthing, thing, thing, 1); - - /*if (G_BattleGametype() && (!G_GametypeHasTeams() || tmthing->player->ctfteam != thing->player->ctfteam)) + if (!G_GametypeHasTeams() || tmthing->player->ctfteam != thing->player->ctfteam) { - if ((tmthing->player->powers[pw_invulnerability] || tmthing->player->powers[pw_super] || (((tmthing->player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL) && (tmthing->player->pflags & PF_SHIELDABILITY))) - && !thing->player->powers[pw_super]) - P_DamageMobj(thing, tmthing, tmthing, 1, 0); - else if ((thing->player->powers[pw_invulnerability] || thing->player->powers[pw_super] || (((thing->player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL) && (thing->player->pflags & PF_SHIELDABILITY))) - && !tmthing->player->powers[pw_super]) - P_DamageMobj(tmthing, thing, thing, 1, 0); - } - - // If players are using touch tag, seekers damage hiders. - if (G_TagGametype() && cv_touchtag.value && - ((thing->player->pflags & PF_TAGIT) != (tmthing->player->pflags & PF_TAGIT))) - { - if ((tmthing->player->pflags & PF_TAGIT) && !(thing->player->pflags & PF_TAGIT)) - P_DamageMobj(thing, tmthing, tmthing, 1, 0); - else if ((thing->player->pflags & PF_TAGIT) && !(tmthing->player->pflags & PF_TAGIT)) -<<<<<<< HEAD - P_DamageMobj(tmthing, thing, tmthing, 1); - }*/ -======= - P_DamageMobj(tmthing, thing, tmthing, 1, 0); - } ->>>>>>> srb2/next - } - - // Force solid players in hide and seek to avoid corner stacking. - // Kart: No Tailspickup ever, players are always solid - /*if (cv_tailspickup.value && gametype != GT_HIDEANDSEEK) - { - if (tmthing->player && thing->player) - { - P_DoTailsCarry(thing->player, tmthing->player); - return true; + if (tmthing->scale > thing->scale + (mapobjectscale/8)) // SRB2kart - Handle squishes first! + K_SquishPlayer(thing->player, tmthing, tmthing); + else if (thing->scale > tmthing->scale + (mapobjectscale/8)) + K_SquishPlayer(tmthing->player, thing, tmthing); + else if (tmthing->player->kartstuff[k_invincibilitytimer] && !thing->player->kartstuff[k_invincibilitytimer]) // SRB2kart - Then invincibility! + P_DamageMobj(thing, tmthing, tmthing, 1); + else if (thing->player->kartstuff[k_invincibilitytimer] && !tmthing->player->kartstuff[k_invincibilitytimer]) + P_DamageMobj(tmthing, thing, thing, 1); + else if ((tmthing->player->kartstuff[k_flamedash] && tmthing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD) + && !(thing->player->kartstuff[k_flamedash] && thing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)) // SRB2kart - Then flame shield! + P_DamageMobj(thing, tmthing, tmthing, 1); + else if ((thing->player->kartstuff[k_flamedash] && thing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD) + && !(tmthing->player->kartstuff[k_flamedash] && tmthing->player->kartstuff[k_itemtype] == KITEM_FLAMESHIELD)) // SRB2kart - Then flame shield! + P_DamageMobj(tmthing, thing, thing, 1); } } - else if (thing->player) { -<<<<<<< HEAD - thing->player->pflags &= ~PF_CARRIED; - }*/ -======= - if (thing->player-players == consoleplayer && botingame) - CV_SetValue(&cv_analog[1], true); - if (thing->player->powers[pw_carry] == CR_PLAYER) - { - P_SetTarget(&thing->tracer, NULL); - thing->player->powers[pw_carry] = CR_NONE; - } - } ->>>>>>> srb2/next if (thing->player) { @@ -2301,11 +1623,7 @@ static boolean PIT_CheckThing(mobj_t *thing) { // Objects kill you if it falls from above. if (thing != tmthing->target) -<<<<<<< HEAD - K_DoIngameRespawn(thing->player); -======= P_DamageMobj(thing, tmthing, tmthing->target, 1, DMG_CRUSHED); ->>>>>>> srb2/next tmthing->momz = -tmthing->momz/2; // Bounce, just for fun! // The tmthing->target allows the pusher of the object @@ -2332,7 +1650,6 @@ static boolean PIT_CheckThing(mobj_t *thing) return false; return true; } -<<<<<<< HEAD else if (thing->player) // bounce when players collide { // see if it went over / under @@ -2519,72 +1836,10 @@ static boolean PIT_CheckThing(mobj_t *thing) return false; } - // Are you touching the side of the object you're interacting with? - else if (thing->z - FixedMul(FRACUNIT, thing->scale) <= tmthing->z + tmthing->height - && thing->z + thing->height + FixedMul(FRACUNIT, thing->scale) >= tmthing->z) -======= - // Monitor? - else if (thing->flags & MF_MONITOR - && !((thing->type == MT_RING_REDBOX && tmthing->player->ctfteam != 1) || (thing->type == MT_RING_BLUEBOX && tmthing->player->ctfteam != 2)) - && (!(thing->flags & MF_SOLID) || P_PlayerCanDamage(tmthing->player, thing))) ->>>>>>> srb2/next - { - if (thing->z - thing->scale <= tmthing->z + tmthing->height - && thing->z + thing->height + thing->scale >= tmthing->z) - { - player_t *player = tmthing->player; - // 0 = none, 1 = elemental pierce, 2 = bubble bounce - UINT8 elementalpierce = (((player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL || (player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP) && (player->pflags & PF_SHIELDABILITY) - ? (((player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL) ? 1 : 2) - : 0); - SINT8 flipval = P_MobjFlip(thing); // Save this value in case monitor gets removed. - fixed_t *momz = &tmthing->momz; // tmthing gets changed by P_DamageMobj, so we need a new pointer?! X_x;; - fixed_t *z = &tmthing->z; // aau. - // Going down? Then bounce back up. - if (P_DamageMobj(thing, tmthing, tmthing, 1, 0) // break the monitor - && (flipval*(*momz) < 0) // monitor is on the floor and you're going down, or on the ceiling and you're going up - && (elementalpierce != 1)) // you're not piercing through the monitor... - { - if (elementalpierce == 2) - P_DoBubbleBounce(player); - else if (!(player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)) - { - *momz = -*momz; // Therefore, you should be thrust in the opposite direction, vertically. - if (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY) - P_TwinSpinRejuvenate(player, player->thokitem); - } - } - if (!(elementalpierce == 1 && thing->flags & MF_GRENADEBOUNCE)) // prevent gold monitor clipthrough. - { - if (player->pflags & PF_BOUNCING) - P_DoAbilityBounce(player, false); - return false; - } - else - *z -= *momz; // to ensure proper collision. - } - - return true; - } } -<<<<<<< HEAD - if (thing->flags & MF_SPRING && (tmthing->player || tmthing->flags & MF_PUSHABLE)) - { - if (iwassprung) // this spring caused you to gain MFE_SPRUNG just now... - return false; // "cancel" P_TryMove via blocking so you keep your current position - } - else if (tmthing->flags & MF_SPRING && (thing->player || thing->flags & MF_PUSHABLE)) - ; // Fix a few nasty spring-jumping bugs that happen sometimes. - // Monitors are not treated as solid to players who are jumping, spinning or gliding, - // unless it's a CTF team monitor and you're on the wrong team - /*else if (thing->flags & MF_MONITOR && tmthing->player && tmthing->player->pflags & (PF_JUMPED|PF_SPINNING|PF_GLIDING) - && !((thing->type == MT_REDRINGBOX && tmthing->player->ctfteam != 1) || (thing->type == MT_BLUERINGBOX && tmthing->player->ctfteam != 2))) - ;*/ -======= if ((tmthing->flags & MF_SPRING || tmthing->type == MT_STEAM || tmthing->type == MT_SPIKE || tmthing->type == MT_WALLSPIKE) && (thing->player)) ; // springs, gas jets and springs should never be able to step up onto a player ->>>>>>> srb2/next // z checking at last // Treat noclip things as non-solid! else if ((thing->flags & (MF_SOLID|MF_NOCLIP)) == MF_SOLID @@ -2982,11 +2237,7 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) continue; } -<<<<<<< HEAD - if (thing->player && P_CheckSolidLava(thing, rover)) -======= - if (thing->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(thing->player, rover))) ->>>>>>> srb2/next + if (thing->player && P_CheckSolidLava(rover)) ; else if (thing->type == MT_SKIM && (rover->flags & FF_SWIMMABLE)) ; @@ -3608,7 +2859,6 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) const fixed_t maxstepmove = FixedMul(MAXSTEPMOVE, mapobjectscale); fixed_t maxstep = maxstepmove; -<<<<<<< HEAD if (thing->player && thing->player->kartstuff[k_waterskip]) maxstep += maxstepmove; // Add some extra stepmove when waterskipping @@ -3618,21 +2868,6 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) // If using type Section1:12, no maxstep. For short walls, like Egg Zeppelin else if (P_MobjTouchingSectorSpecial(thing, 1, 12, false)) maxstep = 0; -======= - if (thing->player) - { - // If using type Section1:13, double the maxstep. - if (P_PlayerTouchingSectorSpecial(thing->player, 1, 13) - || GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 13) - maxstep <<= 1; - - // Don't 'step up' while springing, - // Only step up "if needed". - if (thing->player->panim == PA_SPRING - && P_MobjFlip(thing)*thing->momz > FixedMul(FRACUNIT, thing->scale)) - maxstep = 0; - } ->>>>>>> srb2/next if (thing->type == MT_SKIM) maxstep = 0; @@ -3668,10 +2903,6 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) thing->ceilingrover = tmceilingrover; thing->eflags |= MFE_JUSTSTEPPEDDOWN; } -<<<<<<< HEAD -#ifdef ESLOPE -======= ->>>>>>> srb2/next else if (tmceilingz < thingtop && thingtop - tmceilingz <= maxstep) { thing->z = (thing->ceilingz = thingtop = tmceilingz) - thing->height; @@ -3685,10 +2916,6 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) thing->floorrover = tmfloorrover; thing->eflags |= MFE_JUSTSTEPPEDDOWN; } -<<<<<<< HEAD -#ifdef ESLOPE -======= ->>>>>>> srb2/next else if (tmfloorz > thing->z && tmfloorz - thing->z <= maxstep) { thing->z = thing->floorz = tmfloorz; @@ -4190,106 +3417,6 @@ isblocking: } // -<<<<<<< HEAD -======= -// P_IsClimbingValid -// -// Unlike P_DoClimbing, don't use when up against a one-sided linedef. -// -static boolean P_IsClimbingValid(player_t *player, angle_t angle) -{ - fixed_t platx, platy; - sector_t *glidesector; - fixed_t floorz, ceilingz; - mobj_t *mo = player->mo; - ffloor_t *rover; - - platx = P_ReturnThrustX(mo, angle, mo->radius + FixedMul(8*FRACUNIT, mo->scale)); - platy = P_ReturnThrustY(mo, angle, mo->radius + FixedMul(8*FRACUNIT, mo->scale)); - - glidesector = R_PointInSubsector(mo->x + platx, mo->y + platy)->sector; - - floorz = P_GetSectorFloorZAt (glidesector, mo->x, mo->y); - ceilingz = P_GetSectorCeilingZAt(glidesector, mo->x, mo->y); - - if (glidesector != mo->subsector->sector) - { - boolean floorclimb = false; - fixed_t topheight, bottomheight; - - for (rover = glidesector->ffloors; rover; rover = rover->next) - { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER)) - continue; - - topheight = P_GetFFloorTopZAt (rover, mo->x, mo->y); - bottomheight = P_GetFFloorBottomZAt(rover, mo->x, mo->y); - - floorclimb = true; - - if (mo->eflags & MFE_VERTICALFLIP) - { - if ((topheight < mo->z + mo->height) && ((mo->z + mo->height + mo->momz) < topheight)) - floorclimb = true; - if (topheight < mo->z) // Waaaay below the ledge. - floorclimb = false; - if (bottomheight > mo->z + mo->height - FixedMul(16*FRACUNIT,mo->scale)) - floorclimb = false; - } - else - { - if ((bottomheight > mo->z) && ((mo->z - mo->momz) > bottomheight)) - floorclimb = true; - if (bottomheight > mo->z + mo->height) // Waaaay below the ledge. - floorclimb = false; - if (topheight < mo->z + FixedMul(16*FRACUNIT,mo->scale)) - floorclimb = false; - } - - if (floorclimb) - break; - } - - if (mo->eflags & MFE_VERTICALFLIP) - { - if ((floorz <= mo->z + mo->height) - && ((mo->z + mo->height - mo->momz) <= floorz)) - floorclimb = true; - - if ((floorz > mo->z) - && glidesector->floorpic == skyflatnum) - return false; - - if ((mo->z + mo->height - FixedMul(16*FRACUNIT,mo->scale) > ceilingz) - || (mo->z + mo->height <= floorz)) - floorclimb = true; - } - else - { - if ((ceilingz >= mo->z) - && ((mo->z - mo->momz) >= ceilingz)) - floorclimb = true; - - if ((ceilingz < mo->z+mo->height) - && glidesector->ceilingpic == skyflatnum) - return false; - - if ((mo->z + FixedMul(16*FRACUNIT,mo->scale) < floorz) - || (mo->z >= ceilingz)) - floorclimb = true; - } - - if (!floorclimb) - return false; - - return true; - } - - return false; -} - -// ->>>>>>> srb2/next // PTR_SlideTraverse // static boolean PTR_SlideTraverse(intercept_t *in) @@ -4342,110 +3469,7 @@ isblocking: P_ProcessSpecialSector(slidemo->player, slidemo->subsector->sector, li->polyobj->lines[0]->backsector); } -<<<<<<< HEAD if (in->frac < bestslidefrac) -======= - if (slidemo->player && (slidemo->player->pflags & PF_GLIDING || slidemo->player->climbing) - && slidemo->player->charability == CA_GLIDEANDCLIMB) - { - line_t *checkline = li; - sector_t *checksector; - ffloor_t *rover; - fixed_t topheight, bottomheight; - boolean fofline = false; - INT32 side = P_PointOnLineSide(slidemo->x, slidemo->y, li); - - if (!side && li->backsector) - checksector = li->backsector; - else - checksector = li->frontsector; - - if (checksector->ffloors) - { - for (rover = checksector->ffloors; rover; rover = rover->next) - { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || (rover->flags & FF_BUSTUP)) - continue; - - topheight = P_GetFFloorTopZAt (rover, slidemo->x, slidemo->y); - bottomheight = P_GetFFloorBottomZAt(rover, slidemo->x, slidemo->y); - - if (topheight < slidemo->z) - continue; - - if (bottomheight > slidemo->z + slidemo->height) - continue; - - // Got this far, so I guess it's climbable. // TODO: Climbing check, also, better method to do this? - if (rover->master->flags & ML_TFERLINE) - { - size_t linenum = li-checksector->lines[0]; - checkline = rover->master->frontsector->lines[0] + linenum; - fofline = true; - } - - break; - } - } - - // see about climbing on the wall - if (!(checkline->flags & ML_NOCLIMB) && checkline->special != HORIZONSPECIAL) - { - boolean canclimb; - angle_t climbangle, climbline; - INT32 whichside = P_PointOnLineSide(slidemo->x, slidemo->y, li); - - climbangle = climbline = R_PointToAngle2(li->v1->x, li->v1->y, li->v2->x, li->v2->y); - - if (whichside) // on second side? - climbline += ANGLE_180; - - climbangle += (ANGLE_90 * (whichside ? -1 : 1)); - - canclimb = (li->backsector ? P_IsClimbingValid(slidemo->player, climbangle) : true); - - if (((!slidemo->player->climbing && abs((signed)(slidemo->angle - ANGLE_90 - climbline)) < ANGLE_45) - || (slidemo->player->climbing == 1 && abs((signed)(slidemo->angle - climbline)) < ANGLE_135)) - && canclimb) - { - slidemo->angle = climbangle; - /*if (!demoplayback || P_ControlStyle(slidemo->player) == CS_LMAOGALOG) - { - if (slidemo->player == &players[consoleplayer]) - localangle = slidemo->angle; - else if (slidemo->player == &players[secondarydisplayplayer]) - localangle2 = slidemo->angle; - }*/ - - if (!slidemo->player->climbing) - { - S_StartSound(slidemo->player->mo, sfx_s3k4a); - slidemo->player->climbing = 5; - } - - slidemo->player->pflags &= ~(PF_GLIDING|PF_SPINNING|PF_JUMPED|PF_NOJUMPDAMAGE|PF_THOKKED); - slidemo->player->glidetime = 0; - slidemo->player->secondjump = 0; - - if (slidemo->player->climbing > 1) - slidemo->momz = slidemo->momx = slidemo->momy = 0; - - if (fofline) - whichside = 0; - - if (!whichside) - { - slidemo->player->lastsidehit = checkline->sidenum[whichside]; - slidemo->player->lastlinehit = (INT16)(checkline - lines); - } - - P_Thrust(slidemo, slidemo->angle, FixedMul(5*FRACUNIT, slidemo->scale)); - } - } - } - - if (in->frac < bestslidefrac && (!slidemo->player || !slidemo->player->climbing)) ->>>>>>> srb2/next { secondslidefrac = bestslidefrac; secondslideline = bestslideline; @@ -5309,23 +4333,8 @@ static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush) if (netgame && thing->player && thing->player->spectator) P_DamageMobj(thing, NULL, NULL, 1, DMG_SPECTATOR); // Respawn crushed spectators else -<<<<<<< HEAD - { - if (!killer) - { - //Nobody is responsible for crushing the object, so give a generic crush message - killer = P_SpawnMobj(thing->x, thing->y, thing->z, MT_NULL); - killer->threshold = 44; // Special flag for crushing - } - if (!thing->player) - P_DamageMobj(thing, killer, killer, 10000); - else - K_SquishPlayer(thing->player, killer, killer); // SRB2kart - Squish instead of kill - } -======= P_DamageMobj(thing, killer, killer, 1, DMG_CRUSHED); return true; ->>>>>>> srb2/next } } diff --git a/src/p_maputl.c b/src/p_maputl.c index 98d4519d2..7012b7736 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -303,67 +303,24 @@ void P_CameraLineOpening(line_t *linedef) // If you can see through it, why not move the camera through it too? if (front->camsec >= 0) { -<<<<<<< HEAD - frontfloor = sectors[front->camsec].floorheight; - frontceiling = sectors[front->camsec].ceilingheight; -#ifdef ESLOPE - if (sectors[front->camsec].f_slope) // SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope) - frontfloor = P_GetZAt(sectors[front->camsec].f_slope, camera[0].x, camera[0].y); - if (sectors[front->camsec].c_slope) - frontceiling = P_GetZAt(sectors[front->camsec].c_slope, camera[0].x, camera[0].y); -#endif -======= // SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope) frontfloor = P_GetSectorFloorZAt (§ors[front->camsec], camera.x, camera.y); frontceiling = P_GetSectorCeilingZAt(§ors[front->camsec], camera.x, camera.y); ->>>>>>> srb2/next - } else if (front->heightsec >= 0) { -<<<<<<< HEAD - frontfloor = sectors[front->heightsec].floorheight; - frontceiling = sectors[front->heightsec].ceilingheight; -#ifdef ESLOPE - if (sectors[front->heightsec].f_slope) // SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope) - frontfloor = P_GetZAt(sectors[front->heightsec].f_slope, camera[0].x, camera[0].y); - if (sectors[front->heightsec].c_slope) - frontceiling = P_GetZAt(sectors[front->heightsec].c_slope, camera[0].x, camera[0].y); -#endif -======= // SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope) frontfloor = P_GetSectorFloorZAt (§ors[front->heightsec], camera.x, camera.y); frontceiling = P_GetSectorCeilingZAt(§ors[front->heightsec], camera.x, camera.y); ->>>>>>> srb2/next } else { frontfloor = P_CameraGetFloorZ (mapcampointer, front, tmx, tmy, linedef); frontceiling = P_CameraGetCeilingZ(mapcampointer, front, tmx, tmy, linedef); } + if (back->camsec >= 0) { -<<<<<<< HEAD - backfloor = sectors[back->camsec].floorheight; - backceiling = sectors[back->camsec].ceilingheight; -#ifdef ESLOPE - if (sectors[back->camsec].f_slope) // SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope) - frontfloor = P_GetZAt(sectors[back->camsec].f_slope, camera[0].x, camera[0].y); - if (sectors[back->camsec].c_slope) - frontceiling = P_GetZAt(sectors[back->camsec].c_slope, camera[0].x, camera[0].y); -#endif - } - else if (back->heightsec >= 0) - { - backfloor = sectors[back->heightsec].floorheight; - backceiling = sectors[back->heightsec].ceilingheight; -#ifdef ESLOPE - if (sectors[back->heightsec].f_slope) // SRB2CBTODO: ESLOPE (sectors[front->heightsec].f_slope) - frontfloor = P_GetZAt(sectors[back->heightsec].f_slope, camera[0].x, camera[0].y); - if (sectors[back->heightsec].c_slope) - frontceiling = P_GetZAt(sectors[back->heightsec].c_slope, camera[0].x, camera[0].y); -#endif -======= // SRB2CBTODO: ESLOPE (sectors[back->heightsec].f_slope) backfloor = P_GetSectorFloorZAt (§ors[back->camsec], camera.x, camera.y); backceiling = P_GetSectorCeilingZAt(§ors[back->camsec], camera.x, camera.y); @@ -373,7 +330,6 @@ void P_CameraLineOpening(line_t *linedef) // SRB2CBTODO: ESLOPE (sectors[back->heightsec].f_slope) backfloor = P_GetSectorFloorZAt (§ors[back->heightsec], camera.x, camera.y); backceiling = P_GetSectorCeilingZAt(§ors[back->heightsec], camera.x, camera.y); ->>>>>>> srb2/next } else { @@ -595,27 +551,9 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) // Treat polyobj's backsector like a 3D Floor if (linedef->polyobj->flags & POF_TESTHEIGHT) { -<<<<<<< HEAD - fixed_t topheight, bottomheight; - if (!(rover->flags & FF_EXISTS)) - continue; - - if (mobj->player && P_CheckSolidLava(mobj, rover)) - ; - else if (!((rover->flags & FF_BLOCKPLAYER && mobj->player) - || (rover->flags & FF_BLOCKOTHERS && !mobj->player))) - continue; - - topheight = P_GetFOFTopZ(mobj, front, rover, tmx, tmy, linedef); - bottomheight = P_GetFOFBottomZ(mobj, front, rover, tmx, tmy, linedef); - - delta1 = abs(mobj->z - (bottomheight + ((topheight - bottomheight)/2))); - delta2 = abs(thingtop - (bottomheight + ((topheight - bottomheight)/2))); -======= const sector_t *polysec = linedef->backsector; fixed_t polytop, polybottom; fixed_t delta1, delta2; ->>>>>>> srb2/next if (linedef->polyobj->flags & POF_CLIPPLANES) { @@ -651,22 +589,14 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) ffloor_t *rover; fixed_t delta1, delta2; -<<<<<<< HEAD - if (mobj->player && P_CheckSolidLava(mobj, rover)) - ; - else if (!((rover->flags & FF_BLOCKPLAYER && mobj->player) - || (rover->flags & FF_BLOCKOTHERS && !mobj->player))) - continue; -======= // Check for frontsector's fake floors for (rover = front->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; if (!(rover->flags & FF_EXISTS)) continue; ->>>>>>> srb2/next - if (mobj->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(mobj->player, rover))) + if (mobj->player && P_CheckSolidLava(rover)) ; else if (!((rover->flags & FF_BLOCKPLAYER && mobj->player) || (rover->flags & FF_BLOCKOTHERS && !mobj->player))) @@ -708,7 +638,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) if (!(rover->flags & FF_EXISTS)) continue; - if (mobj->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(mobj->player, rover))) + if (mobj->player && P_CheckSolidLava(rover)) ; else if (!((rover->flags & FF_BLOCKPLAYER && mobj->player) || (rover->flags & FF_BLOCKOTHERS && !mobj->player))) diff --git a/src/sdl/SDL_icon.xpm b/src/sdl/SDL_icon.xpm index db3563582..0acac88ec 100644 --- a/src/sdl/SDL_icon.xpm +++ b/src/sdl/SDL_icon.xpm @@ -1,6 +1,5 @@ /* XPM */ static const char *SDL_icon_xpm[] = { -<<<<<<< HEAD /* columns rows colors chars-per-pixel */ "64 64 32 1", " c None", @@ -98,102 +97,4 @@ static const char *SDL_icon_xpm[] = { " ....}./1))))))))))))]/... ", " ........}3||1#$$$]1... ", " ................... ", -======= -"64 64 32 1", -" c None", -". c #000271", -"+ c #03035D", -"@ c #00009F", -"# c #0A0A1B", -"$ c #08058E", -"% c #060E4C", -"& c #11110E", -"* c #101339", -"= c #0D11CC", -"- c #1B1CFD", -"; c #342B24", -"> c #2325EC", -", c #3C3883", -"' c #3D3A9E", -") c #5B5170", -"! c #4B4CFF", -"~ c #795339", -"{ c #5E5B5C", -"] c #5F5ED3", -"^ c #5E5EFB", -"/ c #7271FF", -"( c #B37F5D", -"_ c #8F8883", -": c #8887FF", -"< c #D59E76", -"[ c #ABABA9", -"} c #A9AAFF", -"| c #C1C3C1", -"1 c #FAC296", -"2 c #D4D6D3", -"3 c #F9FCF8", -" ", -" ", -" #***,,,**** ", -" *,,]]]]]]]]]]]]]',,** ", -" *,']//////////////////]]',* ", -" *,']/////////////////////////]'% ", -" *,]////////////////////^^!!>>>>>>>$+ ", -" *,]////////////////////!>---------->=@% ", -" * ,]///////////////////]^>------->==@@@$.# ", -" +', *']//////////////////],,,=---->=@@@@@$.% ", -" #.=^'* ,]//////////////////],']^]$--=@@@@@@@$+# ", -" %$=-^'* ,]/////////////////],]/!>-^'=@@@@@@@$.% ", -" +$=->/,*,//////////////////]'/^!,$-!,$@@@@@@$+* ", -" +@=--!''/////////////////]']^!,(()->%$@@@@@$+# ", -" +@=--='/////////////////]']^${(<<)->,$@@@@$% ", -" +@=->']/////////:::////]]/^'(<111)->,$@@@$% ", -" #+@@>$]////////::}}}://///!,(<1111)--%$@@.% ", -" #+@@$$^////////:}}}}}://^>$(<<1111)--+$@.% ", -" +@$.>^///////:}}}}}}:/^>->,(<111<'--+$$*# ", -" +$.=-!///////:}}}}}:^!-----@(111<@--+$,'],,* ", -" %+%=->^///////:}}}:!--------@(11(=--$=^////],* ", -" ,]]'>->^//////^^!!-----------'<1_>--@-!//////]'* ", -" '!->@--->>>>>>--->===>--------)<,-->@->^///////]', ", -" *$--->----------='){__{'>------>'=--=@-->!^///////],* ", -" %$.=---------->$)[22332[)=----------=>----->^^//////], ", -" %$_,--------->'_|3333333['----------=--------->!^////],# ", -" *'[{=--------'_2333333333_=---------------------->!^///,* ", -" #)[_@-------@_|33333333332,------------------------->!^/'* ", -" #)2[$------=)|333332|23333{>--------------------------->^'* ", -" {2|,------$[233333___3333_=----------------------------->$ ", -" ;22)=---->)|333332{2_2333[@-------------------------------$ ", -" &22{@----$_233333|{2||333|'--------------------------------$ ", -" &|3_.----,|333333[;2|[333|'--------------------------------=+ ", -" [3_%=--={2333333[&___333|'-------------------->>>====>>----@ ", -" _3[#$=@.[2333333[&&&_333[$------------->>==@@@@@@@@@@@@@@@==+", -" {3|;+$$)|3333333[&&&[333_=-------->==@@@@@@@@@@@@@@@$$$$.+++%", -" {23{*$${23333333|;&&|332)>----->=@@@@@@@@@@@@@@$$$.++%** ", -";{{;[3{&*)[333333333{&&|332,=---==@@@@@@@@@@@@$$.++%* ", -"{22_{|[;_|2333333333_&;233_$@@@@@@@@@@@@@@@@$$+%* ", -"&_|2{;{{[233333333332_[33[,$@@@@@@@@@@@@@$$+%# ", -" &;{&&&;~(_|3333333333332)$@@@@@@@@@@@@$.+%# ", -" &&&&&;(11([33333333332{$@@@@@@@@@@@$...$@$* ", -" &~((1111<[333333332{%.$@@@@@@@@@$$$$@=--$ ", -" ~<<11111<[33333|[_(<~,$@@@@@@@@@@@@@>-->. ", -" ;(<111111<(____(11111(+@@@@@@@@@@@@=----=% ", -" ~(<11111111<11111<(<<;$@@$$@@@@@@@=-----. ", -" ~(<1111111111111(~<1{$$$.$@@@@@@@=-----= ", -" ~(<1111111<<(((<11<*$+.$@@@@@@@@@>---->+ ", -" ;(<1111111<<1111<~%+$@@@@@@@@@@@=-----$ ", -" ~(<<111111111(~&*+$$$@@@@@@@@@@=----=% ", -" ;~((<<<<(~~; *%+$$@@@@@@@@@>----+ ", -" ;;; #%+$$@@@@@@@----. ", -" *+$$@@@@@=---@ ", -" *+$@@@@@>--= ", -" *.$@@@@-->% ", -" #%.$@@=->+ ", -" *+$@@>-$ ", -" %$@=-$ ", -" %.@>@ ", -" +=@ ", -" .. ", -" * ", -" ", ->>>>>>> srb2/next " "}; diff --git a/src/sdl/hwsym_sdl.c b/src/sdl/hwsym_sdl.c index 2cd5b14a2..4f026bad0 100644 --- a/src/sdl/hwsym_sdl.c +++ b/src/sdl/hwsym_sdl.c @@ -92,10 +92,7 @@ void *hwSym(const char *funcName,void *handle) GETFUNC(DrawModel); GETFUNC(CreateModelVBOs); GETFUNC(SetTransform); -<<<<<<< HEAD -======= GETFUNC(GetRenderVersion); ->>>>>>> srb2/next GETFUNC(PostImgRedraw); GETFUNC(FlushScreenTextures); GETFUNC(StartScreenWipe); @@ -105,7 +102,7 @@ void *hwSym(const char *funcName,void *handle) GETFUNC(MakeScreenTexture); GETFUNC(MakeScreenFinalTexture); GETFUNC(DrawScreenFinalTexture); - + GETFUNC(RenderSkyDome); GETFUNC(LoadShaders); @@ -115,7 +112,7 @@ void *hwSym(const char *funcName,void *handle) GETFUNC(LoadCustomShader); GETFUNC(InitCustomShaders); - + GETFUNC(StartBatching); GETFUNC(RenderBatches); diff --git a/src/sdl/i_main.c b/src/sdl/i_main.c index f8c8bfe1e..9af94c5f1 100644 --- a/src/sdl/i_main.c +++ b/src/sdl/i_main.c @@ -27,11 +27,7 @@ #include #endif -<<<<<<< HEAD -#ifdef __unix__ -======= #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) ->>>>>>> srb2/next #include #endif @@ -146,87 +142,9 @@ int main(int argc, char **argv) const char *reldir; int left; boolean fileabs; -<<<<<<< HEAD - const char *link; - - logdir = D_Home(); - - my_time = time(NULL); - timeinfo = localtime(&my_time); - - if (M_CheckParm("-logfile") && M_IsNextParm()) - { - format = M_GetNextParm(); - fileabs = M_IsPathAbsolute(format); - } - else - { - format = "log-%Y-%m-%d_%H-%M-%S.txt"; - fileabs = false; - } - - if (fileabs) - { - strftime(logfilename, sizeof logfilename, format, timeinfo); - } - else - { - if (M_CheckParm("-logdir") && M_IsNextParm()) - reldir = M_GetNextParm(); - else - reldir = "logs"; - - if (M_IsPathAbsolute(reldir)) - { - left = snprintf(logfilename, sizeof logfilename, - "%s"PATHSEP, reldir); - } - else -#ifdef DEFAULTDIR - if (logdir) - { - left = snprintf(logfilename, sizeof logfilename, - "%s"PATHSEP DEFAULTDIR PATHSEP"%s"PATHSEP, logdir, reldir); - } - else -#endif/*DEFAULTDIR*/ - { - left = snprintf(logfilename, sizeof logfilename, - "."PATHSEP"%s"PATHSEP, reldir); - } -#endif/*LOGMESSAGES*/ - - strftime(&logfilename[left], sizeof logfilename - left, - format, timeinfo); - } - - M_MkdirEachUntil(logfilename, - M_PathParts(logdir) - 1, - M_PathParts(logfilename) - 1, 0755); - -#ifdef __unix__ - logstream = fopen(logfilename, "w"); -#ifdef DEFAULTDIR - if (logdir) - link = va("%s/"DEFAULTDIR"/latest-log.txt", logdir); - else -#endif/*DEFAULTDIR*/ - link = "latest-log.txt"; - unlink(link); - if (symlink(logfilename, link) == -1) - { - I_OutputMsg("Error symlinking latest-log.txt: %s\n", strerror(errno)); - } -#else/*__unix__*/ - (void)link; - logstream = fopen("latest-log.txt", "wt+"); -#endif/*__unix__*/ - } -======= #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) const char *link; #endif ->>>>>>> srb2/next logdir = D_Home(); @@ -342,4 +260,5 @@ int main(int argc, char **argv) // return to OS return 0; } + #endif diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index b71eb5ae1..6350bbe35 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -137,11 +137,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); #include #endif -<<<<<<< HEAD // Locations for searching for main.kart -======= -// Locations for searching the srb2.pk3 ->>>>>>> srb2/next #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) #define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2Kart" #define DEFAULTWADLOCATION2 "/usr/local/games/SRB2Kart" @@ -159,11 +155,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); /** \brief WAD file to look for */ -<<<<<<< HEAD #define WADKEYWORD "main.kart" -======= -#define WADKEYWORD1 "srb2.pk3" ->>>>>>> srb2/next /** \brief holds wad path */ static char returnWadPath[256]; @@ -297,7 +289,6 @@ static void I_ReportSignal(int num, int coredumped) sigmsg = 0; else sigmsg = msg; -<<<<<<< HEAD } if (coredumped) @@ -310,20 +301,6 @@ static void I_ReportSignal(int num, int coredumped) sigmsg = msg; } -======= - } - - if (coredumped) - { - if (sigmsg) - sprintf(msg, "%s (core dumped)", sigmsg); - else - strcat(msg, " (core dumped)"); - - sigmsg = msg; - } - ->>>>>>> srb2/next I_OutputMsg("\nProcess killed by signal: %s\n\n", sigmsg); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, @@ -2268,22 +2245,9 @@ void I_InitJoystick2(void) if (M_CheckParm("-nojoy")) return; -<<<<<<< HEAD if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0) { CONS_Printf("I_InitJoystick2()...\n"); -======= - if (M_CheckParm("-noxinput")) - SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); - - if (M_CheckParm("-nohidapi")) - SDL_SetHintWithPriority("SDL_JOYSTICK_HIDAPI", "0", SDL_HINT_OVERRIDE); - - if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0) - { - CONS_Printf("I_InitJoystick2()...\n"); - ->>>>>>> srb2/next if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1) { CONS_Printf(M_GetText("Couldn't initialize joystick: %s\n"), SDL_GetError()); @@ -2401,6 +2365,7 @@ void I_InitJoystick4(void) SDL_JoystickClose(newjoy); } + static void I_ShutdownInput(void) { // Yes, the name is misleading: these send neutral events to @@ -3335,12 +3300,7 @@ void I_Error(const char *error, ...) if (demo.recording) G_CheckDemoStatus(); if (metalrecording) -<<<<<<< HEAD - G_StopMetalRecording(); -#endif -======= G_StopMetalRecording(false); ->>>>>>> srb2/next D_QuitNetGame(); M_FreePlayerSetupColors(); @@ -3419,11 +3379,7 @@ void I_RemoveExitFunc(void (*func)()) } } -<<<<<<< HEAD -#ifndef __unix__ -======= #if !(defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)) ->>>>>>> srb2/next static void Shittycopyerror(const char *name) { I_OutputMsg( @@ -3437,26 +3393,16 @@ static void Shittylogcopy(void) { char buf[8192]; FILE *fp; -<<<<<<< HEAD - size_t n; -======= size_t r; ->>>>>>> srb2/next if (fseek(logstream, 0, SEEK_SET) == -1) { Shittycopyerror("fseek"); } else if (( fp = fopen(logfilename, "wt") )) { -<<<<<<< HEAD - while (( n = fread(buf, 1, sizeof buf, logstream) )) - { - if (fwrite(buf, 1, n, fp) < n) -======= while (( r = fread(buf, 1, sizeof buf, logstream) )) { if (fwrite(buf, 1, r, fp) < r) ->>>>>>> srb2/next { Shittycopyerror("fwrite"); break; @@ -3473,11 +3419,7 @@ static void Shittylogcopy(void) Shittycopyerror(logfilename); } } -<<<<<<< HEAD -#endif/*__unix__*/ -======= #endif/*!(defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON))*/ ->>>>>>> srb2/next // // Closes down everything. This includes restoring the initial @@ -3501,11 +3443,7 @@ void I_ShutdownSystem(void) if (logstream) { I_OutputMsg("I_ShutdownSystem(): end of logstream.\n"); -<<<<<<< HEAD -#ifndef __unix__ -======= #if !(defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)) ->>>>>>> srb2/next Shittylogcopy(); #endif fclose(logstream); @@ -3684,11 +3622,7 @@ static boolean isWadPathOk(const char *path) if (!wad3path) return false; -<<<<<<< HEAD sprintf(wad3path, pandf, path, WADKEYWORD); -======= - sprintf(wad3path, pandf, path, WADKEYWORD1); ->>>>>>> srb2/next if (FIL_ReadFileOK(wad3path)) { @@ -3713,11 +3647,7 @@ static void pathonly(char *s) } } -<<<<<<< HEAD /** \brief search for main.kart in the given path -======= -/** \brief search for srb2.pk3 in the given path ->>>>>>> srb2/next \param searchDir starting path @@ -3741,15 +3671,10 @@ static const char *searchWad(const char *searchDir) return NULL; } -<<<<<<< HEAD /** \brief go through all possible paths and look for main.kart \return path to main.kart if any -======= -/** \brief go through all possible paths and look for srb2.pk3 - \return path to srb2.pk3 if any ->>>>>>> srb2/next */ static const char *locateWad(void) { @@ -3878,11 +3803,7 @@ const char *I_LocateWad(void) if (waddir) { -<<<<<<< HEAD // change to the directory where we found main.kart -======= - // change to the directory where we found srb2.pk3 ->>>>>>> srb2/next #if defined (_WIN32) SetCurrentDirectoryA(waddir); #else diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index af18b1cb0..be22b4c2b 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -65,10 +65,7 @@ #include "../m_menu.h" #include "../d_main.h" #include "../s_sound.h" -<<<<<<< HEAD #include "../i_sound.h" // midi pause/unpause -======= ->>>>>>> srb2/next #include "../i_joy.h" #include "../st_stuff.h" #include "../hu_stuff.h" @@ -365,8 +362,6 @@ static INT32 Impl_SDL_Scancode_To_Keycode(SDL_Scancode code) return 0; } -<<<<<<< HEAD -======= static boolean IgnoreMouse(void) { if (cv_alwaysgrabmouse.value) @@ -380,7 +375,6 @@ static boolean IgnoreMouse(void) return false; } ->>>>>>> srb2/next static void SDLdoGrabMouse(void) { SDL_ShowCursor(SDL_DISABLE); @@ -668,17 +662,10 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt) { // Tell game we lost focus, pause music window_notinfocus = true; -<<<<<<< HEAD if (!cv_playmusicifunfocused.value) I_PauseSong(); if (!cv_playsoundifunfocused.value) S_DisableSound(); -======= - if (! cv_playmusicifunfocused.value) - S_PauseAudio(); - if (! cv_playsoundsifunfocused.value) - S_StopSounds(); ->>>>>>> srb2/next if (!disable_mouse) { @@ -1322,11 +1309,7 @@ void I_StartupMouse(void) } else firsttimeonmouse = SDL_FALSE; -<<<<<<< HEAD - if (cv_usemouse.value) -======= if (cv_usemouse.value && !IgnoreMouse()) ->>>>>>> srb2/next SDLdoGrabMouse(); else SDLdoUngrabMouse(); @@ -1412,10 +1395,6 @@ static inline boolean I_SkipFrame(void) if (!paused) return false; /* FALLTHRU */ -<<<<<<< HEAD -======= - //case GS_TIMEATTACK: -- sorry optimisation but now we have a cool level platter and that being laggardly looks terrible ->>>>>>> srb2/next case GS_WAITINGPLAYERS: return skip; // Skip odd frames default: @@ -1436,7 +1415,6 @@ void I_FinishUpdate(void) if (I_SkipFrame()) return; -<<<<<<< HEAD if (st_overlay) { if (cv_ticrate.value) @@ -1448,18 +1426,11 @@ void I_FinishUpdate(void) SCR_DisplayLocalPing(); } } -======= + // draw captions if enabled if (cv_closedcaptioning.value) SCR_ClosedCaptions(); - if (cv_ticrate.value) - SCR_DisplayTicRate(); ->>>>>>> srb2/next - - if (cv_showping.value && netgame && consoleplayer != serverplayer) - SCR_DisplayLocalPing(); - if (rendermode == render_soft && screens[0]) { SDL_Rect rect; @@ -1736,11 +1707,6 @@ void VID_CheckGLLoaded(rendermode_t oldrender) setrenderneeded = 0; } } -<<<<<<< HEAD - //Impl_SetWindowName("SRB2Kart "VERSIONSTRING); - - SDLSetMode(vid.width, vid.height, USE_FULLSCREEN); -======= #endif } @@ -1804,7 +1770,6 @@ void VID_CheckRenderer(void) } SDLSetMode(vid.width, vid.height, USE_FULLSCREEN, (rendererchanged ? SDL_FALSE : SDL_TRUE)); ->>>>>>> srb2/next Impl_VideoSetupBuffer(); if (rendermode == render_soft) @@ -1814,8 +1779,6 @@ void VID_CheckRenderer(void) SDL_FreeSurface(bufSurface); bufSurface = NULL; } -<<<<<<< HEAD -======= if (rendererchanged) { @@ -1834,7 +1797,6 @@ void VID_CheckRenderer(void) R_InitHardwareMode(); V_SetPalette(0); } ->>>>>>> srb2/next } #else (void)oldrenderer; @@ -1857,7 +1819,7 @@ INT32 VID_SetMode(INT32 modeNum) vid.height = windowedModes[modeNum][1]; vid.modenum = modeNum; - //Impl_SetWindowName("SRB2 "VERSIONSTRING); + //Impl_SetWindowName("SRB2Kart "VERSIONSTRING); VID_CheckRenderer(); return SDL_TRUE; } @@ -1913,7 +1875,7 @@ static void Impl_SetWindowName(const char *title) static void Impl_SetWindowIcon(void) { if (window && icoSurface) - SDL_SetWindowIcon(window, icoSurface); + SDL_SetWindowIcon(window, icoSurface); } static void Impl_VideoSetupSDLBuffer(void) @@ -1947,16 +1909,12 @@ static void Impl_VideoSetupSDLBuffer(void) static void Impl_VideoSetupBuffer(void) { // Set up game's software render buffer -<<<<<<< HEAD - //if (rendermode == render_soft) -======= vid.rowbytes = vid.width * vid.bpp; vid.direct = NULL; if (vid.buffer) free(vid.buffer); vid.buffer = calloc(vid.rowbytes*vid.height, NUMSCREENS); if (!vid.buffer) ->>>>>>> srb2/next { I_Error("%s", M_GetText("Not enough memory for video buffer\n")); } @@ -2003,14 +1961,6 @@ void I_StartupGraphics(void) )) framebuffer = SDL_TRUE; } -<<<<<<< HEAD - if (M_CheckParm("-software")) - rendermode = render_soft; -#ifdef HWRENDER - else if (M_CheckParm("-opengl")) - rendermode = render_opengl; -#endif -======= #ifdef HWRENDER if (M_CheckParm("-opengl")) @@ -2018,7 +1968,6 @@ void I_StartupGraphics(void) else if (M_CheckParm("-software")) #endif chosenrendermode = rendermode = render_soft; ->>>>>>> srb2/next usesdl2soft = M_CheckParm("-softblit"); borderlesswindow = M_CheckParm("-borderless"); @@ -2027,63 +1976,16 @@ void I_StartupGraphics(void) VID_Command_ModeList_f(); #ifdef HWRENDER -<<<<<<< HEAD - if (rendermode == render_opengl) - { - HWD.pfnInit = hwSym("Init",NULL); - HWD.pfnFinishUpdate = NULL; - HWD.pfnDraw2DLine = hwSym("Draw2DLine",NULL); - HWD.pfnDrawPolygon = hwSym("DrawPolygon",NULL); - HWD.pfnSetBlend = hwSym("SetBlend",NULL); - HWD.pfnClearBuffer = hwSym("ClearBuffer",NULL); - HWD.pfnSetTexture = hwSym("SetTexture",NULL); - HWD.pfnReadRect = hwSym("ReadRect",NULL); - HWD.pfnGClipRect = hwSym("GClipRect",NULL); - HWD.pfnClearMipMapCache = hwSym("ClearMipMapCache",NULL); - HWD.pfnSetSpecialState = hwSym("SetSpecialState",NULL); - HWD.pfnSetPalette = hwSym("SetPalette",NULL); - HWD.pfnGetTextureUsed = hwSym("GetTextureUsed",NULL); - HWD.pfnDrawModel = hwSym("DrawModel",NULL); - HWD.pfnCreateModelVBOs = hwSym("CreateModelVBOs",NULL); - HWD.pfnSetTransform = hwSym("SetTransform",NULL); - HWD.pfnPostImgRedraw = hwSym("PostImgRedraw",NULL); - HWD.pfnFlushScreenTextures=hwSym("FlushScreenTextures",NULL); - HWD.pfnStartScreenWipe = hwSym("StartScreenWipe",NULL); - HWD.pfnEndScreenWipe = hwSym("EndScreenWipe",NULL); - HWD.pfnDoScreenWipe = hwSym("DoScreenWipe",NULL); - HWD.pfnDrawIntermissionBG=hwSym("DrawIntermissionBG",NULL); - HWD.pfnMakeScreenTexture= hwSym("MakeScreenTexture",NULL); - HWD.pfnMakeScreenFinalTexture=hwSym("MakeScreenFinalTexture",NULL); - HWD.pfnDrawScreenFinalTexture=hwSym("DrawScreenFinalTexture",NULL); - - HWD.pfnRenderSkyDome = hwSym("RenderSkyDome",NULL); - - HWD.pfnLoadShaders = hwSym("LoadShaders",NULL); - HWD.pfnKillShaders = hwSym("KillShaders",NULL); - HWD.pfnSetShader = hwSym("SetShader",NULL); - HWD.pfnUnSetShader = hwSym("UnSetShader",NULL); - - HWD.pfnLoadCustomShader = hwSym("LoadCustomShader",NULL); - HWD.pfnInitCustomShaders = hwSym("InitCustomShaders",NULL); - - HWD.pfnStartBatching = hwSym("StartBatching",NULL); - HWD.pfnRenderBatches = hwSym("RenderBatches",NULL); - - if (!HWD.pfnInit()) // load the OpenGL library - rendermode = render_soft; - } -======= if (M_CheckParm("-nogl")) vid_opengl_state = -1; // Don't startup OpenGL else if (chosenrendermode == render_opengl) VID_StartupOpenGL(); ->>>>>>> srb2/next #endif // Window icon #ifdef HAVE_IMAGE icoSurface = IMG_ReadXPMFromArray(SDL_icon_xpm); -#endif +#endif // Fury: we do window initialization after GL setup to allow // SDL_GL_LoadLibrary to work well on Windows diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 42797863a..9b41171db 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -816,8 +816,6 @@ static void mix_gme(void *udata, Uint8 *stream, int len) } #endif -<<<<<<< HEAD -======= #ifdef HAVE_OPENMPT static void mix_openmpt(void *udata, Uint8 *stream, int len) { @@ -842,7 +840,6 @@ static void mix_openmpt(void *udata, Uint8 *stream, int len) } #endif ->>>>>>> srb2/next /// ------------------------ /// Music System /// ------------------------ diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index ef27cc26c..9600f66fa 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -98,13 +98,8 @@ boolean LoadGL(void) { CONS_Alert(CONS_ERROR, "Could not load OpenGL Library: %s\n" "Falling back to Software mode.\n", SDL_GetError()); -<<<<<<< HEAD if (!M_CheckParm("-OGLlib")) CONS_Printf("If you know what is the OpenGL library's name, use -OGLlib\n"); -======= - if (!M_CheckParm ("-OGLlib")) - CONS_Alert(CONS_ERROR, "If you know what is the OpenGL library's name, use -OGLlib\n"); ->>>>>>> srb2/next return 0; } @@ -135,23 +130,14 @@ boolean LoadGL(void) else { CONS_Alert(CONS_ERROR, "Could not load GLU Library: %s\n", GLULibname); -<<<<<<< HEAD if (!M_CheckParm("-GLUlib")) CONS_Printf("If you know what is the GLU library's name, use -GLUlib\n"); -======= - if (!M_CheckParm ("-GLUlib")) - CONS_Alert(CONS_ERROR, "If you know what is the GLU library's name, use -GLUlib\n"); ->>>>>>> srb2/next } } else { CONS_Alert(CONS_ERROR, "Could not load GLU Library\n"); -<<<<<<< HEAD - CONS_Printf("If you know what is the GLU library's name, use -GLUlib\n"); -======= - CONS_Alert(CONS_ERROR, "If you know what is the GLU library's name, use -GLUlib\n"); ->>>>>>> srb2/next + CONS_Printf("If you know what is the GLU library's name, use -GLUlib\n");; } #endif return SetupGLfunc(); @@ -235,11 +221,7 @@ void OglSdlFinishUpdate(boolean waitvbl) HWR_DrawScreenFinalTexture(realwidth, realheight); } -<<<<<<< HEAD -EXPORT void HWRAPI(OglSdlSetPalette) (RGBA_t *palette, RGBA_t *pgamma) -======= EXPORT void HWRAPI( OglSdlSetPalette) (RGBA_t *palette) ->>>>>>> srb2/next { size_t palsize = (sizeof(RGBA_t) * 256); // on a palette change, you have to reload all of the textures