mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'the-scary-22-merge' of git@git.magicalgirl.moe:KartKrew/Kart.git into the-scary-22-merge
This commit is contained in:
commit
3c538de360
13 changed files with 82 additions and 1918 deletions
236
src/command.c
236
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 <command or variable>\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;
|
||||
|
|
|
|||
112
src/console.c
112
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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
1115
src/p_map.c
1115
src/p_map.c
File diff suppressed because it is too large
Load diff
|
|
@ -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)))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
" "};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,11 +27,7 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
<<<<<<< HEAD
|
||||
#ifdef __unix__
|
||||
=======
|
||||
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||
>>>>>>> srb2/next
|
||||
#include <errno.h>
|
||||
#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
|
||||
|
|
|
|||
|
|
@ -137,11 +137,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
|||
#include <errno.h>
|
||||
#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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
/// ------------------------
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue