Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5289f13891 | ||
|
|
073b35690b | ||
|
|
43d3ac102d | ||
|
|
aa96f9ceb3 | ||
|
|
104b8260fb | ||
|
|
edebc728ef | ||
|
|
08e7ce3b5b | ||
|
|
29f187b751 | ||
|
|
ac3a1ad5eb | ||
|
|
1b8d7b1541 | ||
|
|
b812d61da2 | ||
|
|
6fd64383d3 | ||
|
|
e984e7a6c8 | ||
|
|
51aec0e012 | ||
|
|
f38ca9aa28 |
No files matched your search
@@ -66,7 +66,7 @@ endif
|
||||
gcc_versions:=\
|
||||
152 151 150 15\
|
||||
142 141 140 14\
|
||||
132 131 130 13\
|
||||
133 132 131 130 13\
|
||||
123 122 121 120 12\
|
||||
114 113 112 111 110 11\
|
||||
105 104 103 102 101 100 10\
|
||||
|
||||
@@ -946,6 +946,9 @@ void D_ClearState(void)
|
||||
//
|
||||
void D_StartTitle(void)
|
||||
{
|
||||
if (dedicated)
|
||||
I_Error("D_StartTitle is called on dedicated server");
|
||||
|
||||
D_ClearState();
|
||||
multiplayer = netgame = false; // title menu shouldnt be a netgame or multiplayer lmao
|
||||
F_StartTitleScreen();
|
||||
|
||||
+3
-5
@@ -945,6 +945,8 @@ void G_SetPlayerGamepadIndicatorColor(INT32 playernum, UINT8 color)
|
||||
|
||||
static void G_ResetPlayerGamepadIndicatorColor(INT32 playernum)
|
||||
{
|
||||
I_Assert(playernum >= 0 && playernum < MAXSPLITSCREENPLAYERS);
|
||||
|
||||
if (cv_gamepadled[playernum].value == 0)
|
||||
{
|
||||
I_SetGamepadIndicatorColor(playernum, 0, 0, 255);
|
||||
@@ -973,13 +975,8 @@ void G_DeviceLEDTick(void)
|
||||
|
||||
newcolor = G_GetSkinColorForGamepad(i);
|
||||
|
||||
// compiler be absolutely tripping
|
||||
// delet this if this gets fixed within gcc
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
if (curcolor[i] == newcolor) // dont update if same colour
|
||||
continue;
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
G_SetPlayerGamepadIndicatorColor(i, newcolor);
|
||||
curcolor[i] = newcolor;
|
||||
@@ -994,6 +991,7 @@ void G_ResetDeviceLED(void)
|
||||
|
||||
static void G_ResetPlayerDeviceRumble(INT32 playernum)
|
||||
{
|
||||
I_Assert(playernum >= 0 && playernum < MAXSPLITSCREENPLAYERS);
|
||||
I_GamepadRumble(playernum, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
+21
-24
@@ -101,7 +101,8 @@ sector_t *gl_backsector = NULL;
|
||||
static constexpr float clipping_distances[] = {1024.0f, 2048.0f, 4096.0f, 6144.0f, 8192.0f, 12288.0f, 16384.0f};
|
||||
// values for bsp culling
|
||||
// slightly higher than the far clipping plane to compensate for impreciseness
|
||||
static constexpr INT32 bsp_culling_distances[] = {(1024+512)*FRACUNIT, (2048+512)*FRACUNIT, (4096+512)*FRACUNIT,
|
||||
static constexpr INT32 bsp_culling_distances[] = {
|
||||
(1024+512)*FRACUNIT, (2048+512)*FRACUNIT, (4096+512)*FRACUNIT,
|
||||
(6144+512)*FRACUNIT, (8192+512)*FRACUNIT, (12288+512)*FRACUNIT, (16384+512)*FRACUNIT};
|
||||
|
||||
// Performance stats
|
||||
@@ -587,15 +588,11 @@ static void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, bool
|
||||
const sector_t *sec = FOFsector ? FOFsector : gl_frontsector;
|
||||
|
||||
// Get the slope pointer to simplify future code
|
||||
if (sec->f_slope && !isceiling)
|
||||
if (!isceiling && sec->f_slope)
|
||||
slope = sec->f_slope;
|
||||
else if (sec->c_slope && isceiling)
|
||||
else if (isceiling && sec->c_slope)
|
||||
slope = sec->c_slope;
|
||||
|
||||
// Set fixedheight to the slope's height from our viewpoint, if we have a slope
|
||||
if (slope)
|
||||
fixedheight = P_GetSlopeZAt(slope, viewx, viewy);
|
||||
|
||||
height = FixedToFloat(fixedheight);
|
||||
|
||||
// Allocate plane-vertex buffer if we need to
|
||||
@@ -687,18 +684,19 @@ static void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, bool
|
||||
vert->s = (tempxsow * cosangf) - (tempytow * sinangf);\
|
||||
vert->t = (tempxsow * sinangf) + (tempytow * cosangf);\
|
||||
}\
|
||||
\
|
||||
if (slope)\
|
||||
{\
|
||||
fixedheight = P_GetSlopeZAt(slope, FloatToFixed((vx)), FloatToFixed((vy)));\
|
||||
height = FixedToFloat(fixedheight);\
|
||||
}\
|
||||
\
|
||||
vert->x = (vx);\
|
||||
vert->y = height;\
|
||||
vert->z = (vy);\
|
||||
\
|
||||
if (slope)\
|
||||
{\
|
||||
fixedheight = P_GetSlopeZAt(slope, FloatToFixed((vx)), FloatToFixed((vy)));\
|
||||
vert->y = FixedToFloat(fixedheight);\
|
||||
}\
|
||||
}
|
||||
for (i = 0, v3d = planeVerts; i < (INT32)nrPlaneVerts; i++,v3d++,pv++)
|
||||
for (i = 0, v3d = planeVerts; i < (INT32)nrPlaneVerts; i++,v3d++, pv++)
|
||||
SETUP3DVERT(v3d, pv->x, pv->y);
|
||||
|
||||
if (slope)
|
||||
@@ -1785,10 +1783,10 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
// Single sided line... Deal only with the middletexture (if one exists)
|
||||
if (gl_midtexture && gl_linedef->special != HORIZONSPECIAL) // Ignore horizon line for OGL
|
||||
{
|
||||
glTex = HWR_GetTexture(gl_midtexture, noencore);
|
||||
|
||||
fixed_t texturevpeg;
|
||||
|
||||
glTex = HWR_GetTexture(gl_midtexture, noencore);
|
||||
|
||||
// PEGGING
|
||||
if ((gl_linedef->flags & (ML_DONTPEGBOTTOM|ML_EFFECT2)) == (ML_DONTPEGBOTTOM|ML_EFFECT2))
|
||||
texturevpeg = gl_frontsector->floorheight + textureheight[gl_sidedef->midtexture] - gl_frontsector->ceilingheight + gl_sidedef->rowoffset;
|
||||
@@ -1875,8 +1873,8 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||
//Hurdler: 3d-floors test
|
||||
if (!gl_drawing_stencil && gl_backsector && gl_frontsector->tag != gl_backsector->tag && (gl_backsector->ffloors || gl_frontsector->ffloors))
|
||||
{
|
||||
ffloor_t * rover;
|
||||
fixed_t highcut = 0, lowcut = 0;
|
||||
ffloor_t *rover;
|
||||
fixed_t highcut = 0, lowcut = 0;
|
||||
fixed_t lowcutslope = 0, highcutslope = 0;
|
||||
|
||||
// Used for height comparisons and etc across FOFs and slopes
|
||||
@@ -2947,7 +2945,7 @@ static void HWR_Subsector(size_t num)
|
||||
static sector_t tempsec; //SoM: 4/7/2000
|
||||
INT32 floorlightlevel;
|
||||
INT32 ceilinglightlevel;
|
||||
INT32 locFloorHeight, locCeilingHeight;
|
||||
INT32 locFloorHeight = 0, locCeilingHeight = 0;
|
||||
INT32 cullFloorHeight, cullCeilingHeight;
|
||||
INT32 light = 0;
|
||||
extracolormap_t *floorcolormap;
|
||||
@@ -2993,11 +2991,12 @@ static void HWR_Subsector(size_t num)
|
||||
|
||||
cullFloorHeight = P_GetSectorFloorZAt (gl_frontsector, viewx, viewy);
|
||||
cullCeilingHeight = P_GetSectorCeilingZAt(gl_frontsector, viewx, viewy);
|
||||
locFloorHeight = P_GetSectorFloorZAt (gl_frontsector, gl_frontsector->soundorg.x, gl_frontsector->soundorg.y);
|
||||
locCeilingHeight = P_GetSectorCeilingZAt(gl_frontsector, gl_frontsector->soundorg.x, gl_frontsector->soundorg.y);
|
||||
|
||||
if (gl_frontsector->ffloors)
|
||||
{
|
||||
locFloorHeight = P_GetSectorFloorZAt (gl_frontsector, gl_frontsector->soundorg.x, gl_frontsector->soundorg.y);
|
||||
locCeilingHeight = P_GetSectorCeilingZAt(gl_frontsector, gl_frontsector->soundorg.x, gl_frontsector->soundorg.y);
|
||||
|
||||
boolean anyMoved = gl_frontsector->moved;
|
||||
|
||||
if (anyMoved == false)
|
||||
@@ -3052,8 +3051,7 @@ static void HWR_Subsector(size_t num)
|
||||
{
|
||||
HWR_GetFlat(levelflats[gl_frontsector->floorpic].lumpnum, R_NoEncore(gl_frontsector, false));
|
||||
HWR_RenderPlane(sub, &extrasubsectors[num], false,
|
||||
// Hack to make things continue to work around slopes.
|
||||
locFloorHeight == cullFloorHeight ? locFloorHeight : gl_frontsector->floorheight,
|
||||
gl_frontsector->floorheight,
|
||||
// We now return you to your regularly scheduled rendering.
|
||||
PF_Occlude, floorlightlevel, levelflats[gl_frontsector->floorpic].lumpnum, NULL, 255, floorcolormap);
|
||||
}
|
||||
@@ -3068,8 +3066,7 @@ static void HWR_Subsector(size_t num)
|
||||
{
|
||||
HWR_GetFlat(levelflats[gl_frontsector->ceilingpic].lumpnum, R_NoEncore(gl_frontsector, true));
|
||||
HWR_RenderPlane(sub, &extrasubsectors[num], true,
|
||||
// Hack to make things continue to work around slopes.
|
||||
locCeilingHeight == cullCeilingHeight ? locCeilingHeight : gl_frontsector->ceilingheight,
|
||||
gl_frontsector->ceilingheight,
|
||||
// We now return you to your regularly scheduled rendering.
|
||||
PF_Occlude, ceilinglightlevel, levelflats[gl_frontsector->ceilingpic].lumpnum, NULL, 255, ceilingcolormap);
|
||||
}
|
||||
|
||||
@@ -1508,7 +1508,7 @@ void HWR_Draw2DModel(md2_t *md2, INT32 x, INT32 y, INT32 skinnum, skincolors_t c
|
||||
else
|
||||
frame = 0;
|
||||
|
||||
gpatch = static_cast<patch_t *>(md2->glpatch);
|
||||
gpatch = (patch_t *)(md2->glpatch);
|
||||
if (gpatch)
|
||||
hwrPatch = ((GLPatch_t *)gpatch->hardware);
|
||||
|
||||
@@ -1516,11 +1516,11 @@ void HWR_Draw2DModel(md2_t *md2, INT32 x, INT32 y, INT32 skinnum, skincolors_t c
|
||||
((!hwrPatch->mipmap->format || !hwrPatch->mipmap->downloaded) && !md2->notexturefile))
|
||||
md2_loadTexture(md2);
|
||||
|
||||
gpatch = static_cast<patch_t *>(md2->glpatch);
|
||||
gpatch = (patch_t*)(md2->glpatch);
|
||||
if (gpatch)
|
||||
hwrPatch = ((GLPatch_t *)gpatch->hardware);
|
||||
|
||||
blendgpatch = static_cast<patch_t *>(md2->blendglpatch);
|
||||
blendgpatch = (patch_t*)(md2->blendglpatch);
|
||||
if (blendgpatch)
|
||||
hwrBlendPatch = ((GLPatch_t *)blendgpatch->hardware);
|
||||
|
||||
@@ -1529,7 +1529,7 @@ void HWR_Draw2DModel(md2_t *md2, INT32 x, INT32 y, INT32 skinnum, skincolors_t c
|
||||
((!hwrBlendPatch->mipmap->format || !hwrBlendPatch->mipmap->downloaded) && !md2->noblendfile)))
|
||||
md2_loadBlendTexture(md2);
|
||||
|
||||
blendgpatch = static_cast<patch_t *>(md2->blendglpatch);
|
||||
blendgpatch = (patch_t*)(md2->blendglpatch);
|
||||
if (blendgpatch)
|
||||
hwrBlendPatch = ((GLPatch_t *)blendgpatch->hardware);
|
||||
|
||||
|
||||
+57
-57
@@ -7902,7 +7902,7 @@ static void M_HandleConnectIP(INT32 choice)
|
||||
if (exitmenu)
|
||||
{
|
||||
if (currentMenu->prevMenu)
|
||||
M_SetupNextMenu (currentMenu->prevMenu);
|
||||
M_SetupNextMenu(currentMenu->prevMenu);
|
||||
else
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
@@ -8271,10 +8271,9 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
||||
INT32 curx = (((setupm_skinselect % SKINGRIDNEWWIDTH) * 18) + ((BASEVIDWIDTH / 2) - (18 * SKINGRIDNEWWIDTH/2)) + SKINXSHIFT) + 20;
|
||||
INT32 cury = (((setupm_skinselect / SKINGRIDNEWWIDTH) - setupm_skinypos) * 18) + ((BASEVIDHEIGHT / 2) - (18 * (SKINGRIDNEWWIDTH/2))+ gridyoffset);
|
||||
|
||||
UINT8 cursorframe = (I_GetTime() / 4) % 7;
|
||||
|
||||
cursor = (patch_t *)W_CachePatchName(va("K_CHILI%d", cursorframe + 1), PU_PATCH);
|
||||
V_DrawFixedPatch((curx << FRACBITS) - (FRACUNIT), (cury << FRACBITS) - (FRACUNIT), FRACUNIT+(FRACUNIT>>3), 0, cursor, NULL);
|
||||
UINT8 cursorframe = (I_GetTime() / 4) % 7;
|
||||
cursor = (patch_t *)W_CachePatchName(va("K_CHILI%d", cursorframe + 1), PU_PATCH);
|
||||
V_DrawFixedPatch((curx << FRACBITS) - (FRACUNIT), (cury << FRACBITS) - (FRACUNIT), FRACUNIT+(FRACUNIT>>3), 0, cursor, NULL);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -8313,14 +8312,12 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
||||
if (setupm_skinselect < numskins)
|
||||
{
|
||||
UINT8 *cmap = R_GetTranslationColormap(setupm_skinselect, setupm_fakecolor, GTC_MENUCACHE);
|
||||
|
||||
cursor = facewantprefix[skinsorted[setupm_skinselect]];
|
||||
V_DrawFixedPatch(((curx-8) << FRACBITS), ((cury-8) << FRACBITS), FRACUNIT, 0, cursor, cmap);
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 cursorframe = (I_GetTime() / 4) % 7;
|
||||
|
||||
cursor = (patch_t *)W_CachePatchName(va("K_CHILI%d", cursorframe + 1), PU_PATCH);
|
||||
V_DrawFixedPatch((curx << FRACBITS) - (FRACUNIT), (cury << FRACBITS) - (FRACUNIT), FRACUNIT+(FRACUNIT>>3), 0, cursor, NULL);
|
||||
}
|
||||
@@ -8384,7 +8381,6 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
||||
else
|
||||
{
|
||||
UINT8 cursorframe = (I_GetTime() / 4) % 7;
|
||||
|
||||
cursor = (patch_t *)W_CachePatchName(va("K_CHILI%d", cursorframe + 1), PU_PATCH);
|
||||
V_DrawFixedPatch((curx << FRACBITS) - (FRACUNIT), (cury << FRACBITS) - (FRACUNIT), FRACUNIT+(FRACUNIT>>3), 0, cursor, NULL);
|
||||
}
|
||||
@@ -8509,7 +8505,7 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
||||
switch (cv_skinselectmenu.value)
|
||||
{
|
||||
case SKINMENUTYPE_2D:
|
||||
skintodisplay = setupm_fakeskin;
|
||||
skintodisplay = (UINT8)setupm_fakeskin;
|
||||
if (setupm_skinlockedselect) // show the skin we are trying to select
|
||||
skintodisplay = skinstats[setupm_skinxpos][setupm_skinypos][setupm_skinselect];
|
||||
else if (skinstatscount[setupm_skinxpos][setupm_skinypos] && itemOn == 1)
|
||||
@@ -8517,13 +8513,16 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
||||
break;
|
||||
case SKINMENUTYPE_EXTENDED:
|
||||
case SKINMENUTYPE_GRID:
|
||||
skintodisplay = (itemOn == 1 && setupm_skinselect < numskins ? skinsorted[setupm_skinselect] : setupm_fakeskin);
|
||||
skintodisplay = ((itemOn == 1 && (setupm_skinselect < numskins)) ? skinsorted[setupm_skinselect] : (UINT8)setupm_fakeskin);
|
||||
break;
|
||||
default:
|
||||
skintodisplay = setupm_fakeskin;
|
||||
skintodisplay = (UINT8)setupm_fakeskin;
|
||||
break;
|
||||
}
|
||||
|
||||
if (skintodisplay >= MAXSKINS)
|
||||
skintodisplay = 0;
|
||||
|
||||
skinnum = R_SkinAvailable(skins[skintodisplay].name);
|
||||
|
||||
if (skinnum < 0 || skinnum >= MAXSKINS)
|
||||
@@ -8538,18 +8537,6 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
||||
if (frame >= sprdef->numframes) // Walking animation missing
|
||||
frame = 0; // Try to use standing frame
|
||||
|
||||
sprframe = &sprdef->spriteframes[frame];
|
||||
|
||||
// minenice's speen css, it's a piece of shit but hey
|
||||
speenframe = (I_GetTime()*cv_skinselectspin.value/TICRATE + 1)%8;
|
||||
|
||||
// this is a very shitty solution for checking if a sprite needs flipping
|
||||
// but it works
|
||||
if ((speenframe > 4) && (sprframe->lumppat[speenframe] == sprframe->lumppat[8-speenframe]))
|
||||
flags = V_FLIP; // This sprite is left/right flipped!
|
||||
|
||||
patch = (patch_t *)W_CachePatchNum(sprframe->lumppat[speenframe], PU_PATCH);
|
||||
|
||||
// draw box around guy
|
||||
V_DrawFill(mx + 36 - (charw/2), my+65, charw, 84, 239);
|
||||
#undef charw
|
||||
@@ -8560,33 +8547,47 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
||||
UINT8 *colormap = R_GetTranslationColormap(skintodisplay, setupm_fakecolor, GTC_MENUCACHE);
|
||||
#ifdef HWRENDER
|
||||
md2_t *md2 = &md2_playermodels[skinnum];
|
||||
|
||||
#endif
|
||||
mx += 36;
|
||||
my += 131;
|
||||
#ifdef HWRENDER
|
||||
// if we have 3d models enabled and a model exists
|
||||
// try to show it instead of the sprite
|
||||
if (rendermode == render_opengl && cv_glmdls.value
|
||||
&& !md2->error && !md2->notfound)
|
||||
{
|
||||
mx += 36;
|
||||
my += 131;
|
||||
|
||||
const angle_t ROTATE_PER_TIC = (UINT64)ANGLE_45 * cv_skinselectspin.value / TICRATE;
|
||||
|
||||
angle_t angle = I_GetTime()*ROTATE_PER_TIC + FixedMul(cv_uncappedhud.value ? renderdeltatics : FRACUNIT, ROTATE_PER_TIC);
|
||||
|
||||
HWR_Draw2DModel(md2, mx, my, skinnum, (skincolors_t)setupm_fakecolor, colormap, 8*FRACUNIT/3, frame, angle);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
sprframe = &sprdef->spriteframes[frame];
|
||||
|
||||
// minenice's speen css, it's a piece of shit but hey
|
||||
speenframe = (I_GetTime()*cv_skinselectspin.value/TICRATE + 1)%8;
|
||||
|
||||
// this is a very shitty solution for checking if a sprite needs flipping
|
||||
// but it works
|
||||
if ((speenframe > 4) && (sprframe->lumppat[speenframe] == sprframe->lumppat[8-speenframe]))
|
||||
{
|
||||
flags = V_FLIP; // This sprite is left/right flipped!
|
||||
}
|
||||
|
||||
patch = (patch_t *)W_CachePatchNum(sprframe->lumppat[speenframe], PU_PATCH);
|
||||
|
||||
if (skins[skintodisplay].flags & SF_HIRES)
|
||||
{
|
||||
V_DrawFixedPatch((mx+36)<<FRACBITS,
|
||||
(my+131)<<FRACBITS,
|
||||
skins[skintodisplay].highresscale,
|
||||
flags, patch, colormap);
|
||||
V_DrawFixedPatch(mx<<FRACBITS,
|
||||
my<<FRACBITS,
|
||||
skins[skintodisplay].highresscale,
|
||||
flags, patch, colormap);
|
||||
}
|
||||
else
|
||||
V_DrawMappedPatch(mx+36, my+131, flags, patch, colormap);
|
||||
{
|
||||
V_DrawMappedPatch(mx, my, flags, patch, colormap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9889,7 +9890,7 @@ static void M_DrawLocalSkinMenu(void)
|
||||
spriteframe_t *sprframe;
|
||||
patch_t *patch;
|
||||
UINT8 frame;
|
||||
INT16 skintodisplay;
|
||||
INT32 skintodisplay = 0;
|
||||
UINT32 speenframe;
|
||||
skin_t displayskin;
|
||||
|
||||
@@ -9942,25 +9943,10 @@ static void M_DrawLocalSkinMenu(void)
|
||||
if (frame >= sprdef->numframes) // Walking animation missing
|
||||
frame = 0; // Try to use standing frame
|
||||
|
||||
sprframe = &sprdef->spriteframes[frame];
|
||||
|
||||
//minenice's speen css, it's a piece of shit but hey
|
||||
//patch = (patch_t *)W_CachePatchNum(sprframe->lumppat[1], PU_PATCH);
|
||||
speenframe = (I_GetTime()*cv_skinselectspin.value/TICRATE + 1)%8;
|
||||
|
||||
//this is a very shitty solution for checking if a sprite needs flipping
|
||||
//but it works
|
||||
if ((speenframe > 4) && (sprframe->lumppat[speenframe] == sprframe->lumppat[8-speenframe]))
|
||||
{
|
||||
flags = V_FLIP; // This sprite is left/right flipped!
|
||||
}
|
||||
patch = (patch_t *)W_CachePatchNum(sprframe->lumppat[speenframe], PU_PATCH);
|
||||
|
||||
// draw box around guy
|
||||
V_DrawFill(mx + 220 - (charw/2), my+54, charw, 84, 239);
|
||||
#undef charw
|
||||
|
||||
// draw player sprite
|
||||
UINT8 *colormap = R_GetLocalTranslationColormap(&skins[displayskin.localnum], (displayskin.localskin ? &localskins[displayskin.localnum] : NULL), cv_playercolor.value, GTC_MENUCACHE, displayskin.localskin);
|
||||
|
||||
V_DrawMappedPatch(mx, my+50, 0, (patch_t *)W_CachePatchName(displayskin.facewant, PU_PATCH), colormap);
|
||||
@@ -9974,6 +9960,9 @@ static void M_DrawLocalSkinMenu(void)
|
||||
V_DrawString(mx+20, my+118, V_ALLOWLOWERCASE|highlightflags, displayskin.realname);
|
||||
|
||||
// draw player sprite
|
||||
mx += 220;
|
||||
my += 120;
|
||||
|
||||
#ifdef HWRENDER
|
||||
md2_t *md2 = (displayskin.localskin ? &md2_localplayermodels[skintodisplay] : &md2_playermodels[skintodisplay]);
|
||||
|
||||
@@ -9982,24 +9971,35 @@ static void M_DrawLocalSkinMenu(void)
|
||||
if (rendermode == render_opengl && cv_glmdls.value
|
||||
&& !md2->error && !md2->notfound)
|
||||
{
|
||||
mx += 220;
|
||||
my += 120;
|
||||
|
||||
const angle_t ROTATE_PER_TIC = (UINT64)ANGLE_45 * cv_skinselectspin.value / TICRATE;
|
||||
|
||||
angle_t angle = I_GetTime()*ROTATE_PER_TIC + FixedMul(cv_uncappedhud.value ? renderdeltatics : FRACUNIT, ROTATE_PER_TIC);
|
||||
|
||||
HWR_Draw2DModel(md2, mx, my, skintodisplay, (skincolors_t)cv_playercolor.value, colormap, 8*FRACUNIT/3, frame, angle);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
sprframe = &sprdef->spriteframes[frame];
|
||||
|
||||
// minenice's speen css, it's a piece of shit but hey
|
||||
speenframe = (I_GetTime()*cv_skinselectspin.value/TICRATE + 1)%8;
|
||||
|
||||
// this is a very shitty solution for checking if a sprite needs flipping
|
||||
// but it works
|
||||
if ((speenframe > 4) && (sprframe->lumppat[speenframe] == sprframe->lumppat[8-speenframe]))
|
||||
{
|
||||
flags = V_FLIP; // This sprite is left/right flipped!
|
||||
}
|
||||
|
||||
patch = (patch_t *)W_CachePatchNum(sprframe->lumppat[speenframe], PU_PATCH);
|
||||
|
||||
if (displayskin.flags & SF_HIRES)
|
||||
{
|
||||
V_DrawFixedPatch((mx+220)<<FRACBITS, (my+120)<<FRACBITS, displayskin.highresscale, flags, patch, colormap);
|
||||
V_DrawFixedPatch(mx<<FRACBITS, my<<FRACBITS, displayskin.highresscale, flags, patch, colormap);
|
||||
}
|
||||
else
|
||||
V_DrawMappedPatch(mx+220, my+120, flags, patch, colormap);
|
||||
{
|
||||
V_DrawMappedPatch(mx, my, flags, patch, colormap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
-16
@@ -1633,33 +1633,34 @@ static menuitem_t OP_AccessibilityMenu[] =
|
||||
{IT_STRING|IT_CVAR|IT_CV_SLIDER, NULL, "Saturation", &cv_globalsaturation, 25},
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Video Color Settings...", &OP_ColorOptionsDef, 30},
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Midnight Channel Flicker", &cv_lessflicker, 35},
|
||||
{IT_STRING|IT_CVAR, NULL, "Reduce Effects", &cv_reducevfx, 35},
|
||||
{IT_STRING|IT_CVAR, NULL, "Midnight Channel Flicker", &cv_lessflicker, 40}, // obsolete now? or still better be a seperate toggle?
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Minimum Sector Brightness", &cv_secbright, 40},
|
||||
{IT_STRING|IT_CVAR, NULL, "Minimum Sector Brightness", &cv_secbright, 45},
|
||||
|
||||
#ifdef HWRENDER
|
||||
{IT_STRING|IT_CVAR, NULL, "Screen Textures", &cv_glscreentextures, 45},
|
||||
{IT_STRING|IT_CVAR, NULL, "Screen Textures", &cv_glscreentextures, 50},
|
||||
#endif
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Water Surface Ripples", &cv_ripplewater, 50},
|
||||
{IT_STRING|IT_CVAR, NULL, "Water Surface Ripples", &cv_ripplewater, 55},
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Fade Players near Camera", &cv_playerfade, 55},
|
||||
{IT_STRING|IT_CVAR, NULL, "Fade Players near Camera", &cv_playerfade, 60},
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Quake Screenshakes", &cv_screenquake, 60},
|
||||
{IT_STRING|IT_CVAR, NULL, "Quake Screenshakes", &cv_screenquake, 65},
|
||||
|
||||
{IT_CALL|IT_STRING, NULL, "Camera Options...", M_CameraMenu, 65},
|
||||
{IT_CALL|IT_STRING, NULL, "Camera Options...", M_CameraMenu, 70},
|
||||
|
||||
{IT_HEADER, NULL, "Audio", NULL, 75},
|
||||
{IT_HEADER, NULL, "Audio", NULL, 80},
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 85},
|
||||
{IT_STRING|IT_CVAR, NULL, "Same Sound Limit", &cv_samesoundlimit, 90},
|
||||
{IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 90},
|
||||
{IT_STRING|IT_CVAR, NULL, "Same Sound Limit", &cv_samesoundlimit, 95},
|
||||
|
||||
{IT_HEADER, NULL, "Controls", NULL, 100},
|
||||
{IT_HEADER, NULL, "Controls", NULL, 105},
|
||||
|
||||
{IT_STRING|IT_CVAR, NULL, "Automatic Acceleration (P1)", &cv_autoaccel[0], 110},
|
||||
{IT_STRING|IT_CVAR, NULL, "Automatic Acceleration (P2)", &cv_autoaccel[1], 115},
|
||||
{IT_STRING|IT_CVAR, NULL, "Automatic Acceleration (P3)", &cv_autoaccel[2], 120},
|
||||
{IT_STRING|IT_CVAR, NULL, "Automatic Acceleration (P4)", &cv_autoaccel[3], 125},
|
||||
{IT_STRING|IT_CVAR, NULL, "Automatic Acceleration (P1)", &cv_autoaccel[0], 115},
|
||||
{IT_STRING|IT_CVAR, NULL, "Automatic Acceleration (P2)", &cv_autoaccel[1], 120},
|
||||
{IT_STRING|IT_CVAR, NULL, "Automatic Acceleration (P3)", &cv_autoaccel[2], 125},
|
||||
{IT_STRING|IT_CVAR, NULL, "Automatic Acceleration (P4)", &cv_autoaccel[3], 130},
|
||||
};
|
||||
|
||||
static const char* OP_AccessibilityTooltips[] =
|
||||
@@ -1669,10 +1670,11 @@ static const char* OP_AccessibilityTooltips[] =
|
||||
"Gamma (brightness) of the game.",
|
||||
"Saturation of the game.",
|
||||
"Advanced color settings of the game.",
|
||||
"Reduces or disables certain effects players might be sensitive to\nSuch as flashing, flickering, certain screen effects and more.",
|
||||
"Disables the flicker effect on Midnight Channel.",
|
||||
"Sets minimum sector brightness, useful for dark areas",
|
||||
#ifdef HWRENDER
|
||||
"Should the game do Screen Textures? Provides a good boost to frames\nat the cost of some visual effects not working when disabled.",
|
||||
"Disabling Screen Textures will disable the Underwater and Heat screen effects.",
|
||||
#endif
|
||||
"Toggles the ripple effect on water surfaces",
|
||||
"Fades other Players that are close to the camera in and out",
|
||||
|
||||
+106
-64
@@ -727,12 +727,11 @@ static void JoyReset(SDLJoyInfo_t *JoySet)
|
||||
JoySet->dev = NULL;
|
||||
JoySet->oldjoy = -1;
|
||||
JoySet->id = -1;
|
||||
JoySet->axises = JoySet->buttons = JoySet->hats = JoySet->balls = 0;
|
||||
}
|
||||
|
||||
/** \brief SDL info about joystick
|
||||
*/
|
||||
SDLJoyInfo_t JoyInfo[MAXSPLITSCREENPLAYERS];
|
||||
SDLJoyInfo_t JoyInfo[MAXSPLITSCREENPLAYERS] = {};
|
||||
INT32 numcontrollers = 0;
|
||||
|
||||
//
|
||||
@@ -740,26 +739,26 @@ INT32 numcontrollers = 0;
|
||||
//
|
||||
void I_JoyScale(void)
|
||||
{
|
||||
Joystick[0].bGamepadStyle = cv_joyscale[0].value==0;
|
||||
JoyInfo[0].scale = Joystick[0].bGamepadStyle?1:cv_joyscale[0].value;
|
||||
Joystick[0].bGamepadStyle = cv_joyscale[0].value == 0;
|
||||
JoyInfo[0].scale = Joystick[0].bGamepadStyle ? 1 : cv_joyscale[0].value;
|
||||
}
|
||||
|
||||
void I_JoyScale2(void)
|
||||
{
|
||||
Joystick[1].bGamepadStyle = cv_joyscale[1].value==0;
|
||||
JoyInfo[1].scale = Joystick[1].bGamepadStyle?1:cv_joyscale[1].value;
|
||||
Joystick[1].bGamepadStyle = cv_joyscale[1].value == 0;
|
||||
JoyInfo[1].scale = Joystick[1].bGamepadStyle ? 1 : cv_joyscale[1].value;
|
||||
}
|
||||
|
||||
void I_JoyScale3(void)
|
||||
{
|
||||
Joystick[2].bGamepadStyle = cv_joyscale[2].value==0;
|
||||
JoyInfo[2].scale = Joystick[2].bGamepadStyle?1:cv_joyscale[2].value;
|
||||
Joystick[2].bGamepadStyle = cv_joyscale[2].value == 0;
|
||||
JoyInfo[2].scale = Joystick[2].bGamepadStyle ? 1 : cv_joyscale[2].value;
|
||||
}
|
||||
|
||||
void I_JoyScale4(void)
|
||||
{
|
||||
Joystick[3].bGamepadStyle = cv_joyscale[3].value==0;
|
||||
JoyInfo[3].scale = Joystick[3].bGamepadStyle?1:cv_joyscale[3].value;
|
||||
Joystick[3].bGamepadStyle = cv_joyscale[3].value == 0;
|
||||
JoyInfo[3].scale = Joystick[3].bGamepadStyle ? 1 : cv_joyscale[3].value;
|
||||
}
|
||||
|
||||
// Cheat to get the device index for a joystick handle
|
||||
@@ -931,33 +930,18 @@ static int joy_open(int playerIndex, int joyIndex)
|
||||
}
|
||||
|
||||
JoyInfo[playerIndex].dev = newdev;
|
||||
JoyInfo[playerIndex].id = I_GetJoystickDeviceIndex(JoyInfo[playerIndex].dev);
|
||||
|
||||
if (JoyInfo[playerIndex].dev == NULL)
|
||||
{
|
||||
CONS_Debug(DBG_GAMELOGIC, M_GetText("Joystick1: Couldn't open device - %s\n"), SDL_GetError());
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Debug(DBG_GAMELOGIC, M_GetText("Joystick1: %s\n"), SDL_GameControllerName(JoyInfo[playerIndex].dev));
|
||||
JoyInfo[playerIndex].axises = SDL_CONTROLLER_AXIS_MAX;
|
||||
|
||||
if (JoyInfo[playerIndex].axises > JOYAXISSET*2)
|
||||
JoyInfo[playerIndex].axises = JOYAXISSET*2;
|
||||
CONS_Debug(DBG_GAMELOGIC, M_GetText("Joystick1: %s\n"), SDL_GameControllerName(JoyInfo[playerIndex].dev));
|
||||
|
||||
JoyInfo[playerIndex].buttons = SDL_CONTROLLER_BUTTON_MAX ; // dpad is 4 buttons
|
||||
if (JoyInfo[playerIndex].buttons > JOYBUTTONS)
|
||||
JoyInfo[playerIndex].buttons = JOYBUTTONS;
|
||||
JoyInfo[playerIndex].id = I_GetJoystickDeviceIndex(JoyInfo[playerIndex].dev);
|
||||
|
||||
JoyInfo[playerIndex].hats = 4;
|
||||
if (JoyInfo[playerIndex].hats > JOYHATS)
|
||||
JoyInfo[playerIndex].hats = JOYHATS;
|
||||
|
||||
JoyInfo[playerIndex].balls = 0;
|
||||
|
||||
return JoyInfo[playerIndex].axises;
|
||||
}
|
||||
return SDL_CONTROLLER_AXIS_MAX;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1002,7 +986,6 @@ void I_InitJoystick(UINT8 index)
|
||||
JoyInfo[index].dev = NULL;
|
||||
JoyInfo[index].oldjoy = -1;
|
||||
JoyInfo[index].id = -1;
|
||||
JoyInfo[index].axises = JoyInfo[index].buttons = JoyInfo[index].hats = JoyInfo[index].balls = 0;
|
||||
|
||||
if (cv_usejoystick[index].value)
|
||||
newcontroller = SDL_GameControllerOpen(cv_usejoystick[index].value-1);
|
||||
@@ -1386,7 +1369,7 @@ void I_SleepDuration(precise_t duration)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void I_PrintSignal(INT32 signal_num, boolean core_dumped, char *signal_msg);
|
||||
static void I_PrintSignal(INT32 signal_num, boolean core_dumped, char *signal_msg, char *signal_ttl);
|
||||
|
||||
#ifdef HAVE_LIBBACKTRACE
|
||||
#include <backtrace.h>
|
||||
@@ -1482,6 +1465,7 @@ static void bt_error_cb(void *data, const char *msg, int errnum)
|
||||
static void write_backtrace(bt_crash_reason_t reason)
|
||||
{
|
||||
char sig_msg[512];
|
||||
char sig_name[128];
|
||||
const char *filename = va("%s" PATHSEP CRASH_LOGFILE_NAME, srb2home);
|
||||
FILE *out = fopen(filename, "a+");
|
||||
|
||||
@@ -1538,8 +1522,8 @@ static void write_backtrace(bt_crash_reason_t reason)
|
||||
switch (reason.type)
|
||||
{
|
||||
case BTCRASH_SIGNAL:
|
||||
I_PrintSignal(reason.value.signal, false, sig_msg);
|
||||
fprintf(out, "%s", sig_msg);
|
||||
I_PrintSignal(reason.value.signal, false, sig_msg, sig_name);
|
||||
fprintf(out, "%s - %s", sig_name, sig_msg);
|
||||
break;
|
||||
|
||||
case BTCRASH_ERRORMSG:
|
||||
@@ -1575,42 +1559,49 @@ static std::thread::id g_main_thread_id;
|
||||
|
||||
boolean g_in_exiting_signal_handler = false;
|
||||
|
||||
static void I_PrintSignal(INT32 signal_num, boolean core_dumped, char *signal_msg)
|
||||
static void I_PrintSignal(INT32 signal_num, boolean core_dumped, char *signal_msg, char *signal_name)
|
||||
{
|
||||
const char *sigmsg;
|
||||
const char *sigmsg, *signame;
|
||||
|
||||
switch (signal_num)
|
||||
{
|
||||
#ifdef SIGINT
|
||||
case SIGINT:
|
||||
sigmsg = ("SIGINT - SRB2Kart-Saturn was interrupted prematurely by the user.");
|
||||
sigmsg = ("SRB2Kart-Saturn was interrupted prematurely by the user.");
|
||||
signame = "SIGINT";
|
||||
break;
|
||||
#endif
|
||||
case SIGILL: // illegal instruction - invalid function image
|
||||
sigmsg = ("SIGILL - SRB2Kart-Saturn has attempted to execute an illegal instruction and needs to close.");
|
||||
sigmsg = ("SRB2Kart-Saturn has attempted to execute an illegal instruction and needs to close.");
|
||||
signame = "SIGILL";
|
||||
break;
|
||||
case SIGFPE: // mathematical exception
|
||||
sigmsg = ("SIGFPE - SRB2Kart-Saturn has encountered a mathematical exception and needs to close.");
|
||||
sigmsg = ("SRB2Kart-Saturn has encountered a mathematical exception and needs to close.");
|
||||
signame = "SIGFPE";
|
||||
break;
|
||||
case SIGSEGV: // segment violation
|
||||
sigmsg = ("SIGSEGV - SRB2Kart-Saturn has attempted to access a memory location that it shouldn't and needs to close.");
|
||||
sigmsg = ("SRB2Kart-Saturn has attempted to access a memory location that it shouldn't and needs to close.");
|
||||
signame = "SIGSEGV";
|
||||
break;
|
||||
#ifdef SIGTERM
|
||||
case SIGTERM: // Software termination signal from kill
|
||||
sigmsg = ("SIGTERM - SRB2Kart-Saturn was terminated by a kill signal.");
|
||||
sigmsg = ("SRB2Kart-Saturn was terminated by a kill signal.");
|
||||
signame = "SIGTERM";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGBREAK
|
||||
case SIGBREAK: // Ctrl-Break sequence
|
||||
sigmsg =("SIGBREAK - SRB2Kart-Saturn was terminated by a Ctrl-Break sequence.");
|
||||
signame = "SIGBREAK";
|
||||
break;
|
||||
#endif
|
||||
case SIGABRT: // abnormal termination triggered by abort call
|
||||
sigmsg = ("SIGABRT - SRB2Kart-Saturn was terminated by an abort signal.");
|
||||
sigmsg = ("SRB2Kart-Saturn was terminated by an abort signal.");
|
||||
signame = "SIGABRT";
|
||||
break;
|
||||
default:
|
||||
sprintf(signal_msg, "Signal number %d", signal_num);
|
||||
sigmsg = (core_dumped ? "Unknown signal" : signal_msg);
|
||||
sigmsg = "SRB2Kart-Saturn was terminated by an unknown signal.";
|
||||
signame = core_dumped ? "Unknown signal" : va("Signal number %d", signal_num);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1625,18 +1616,80 @@ static void I_PrintSignal(INT32 signal_num, boolean core_dumped, char *signal_ms
|
||||
{
|
||||
sprintf(signal_msg, "%s", sigmsg);
|
||||
}
|
||||
|
||||
sprintf(signal_name, "%s", signame);
|
||||
}
|
||||
|
||||
static int I_OpenURL(const char *url)
|
||||
{
|
||||
#if SDL_VERSION_ATLEAST(2,0,14)
|
||||
return SDL_OpenURL(va("%s", url));
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void I_ShowErrorBox(const char *title, const char *msg)
|
||||
{
|
||||
if (M_CheckParm("-dedicated"))
|
||||
return;
|
||||
|
||||
const char *reportmsg = "\n\n\nTo help us figure out the cause, please report the issue to our github page with " CRASH_LOGFILE_NAME " attached.\n\nSorry for the inconvenience!";
|
||||
|
||||
const SDL_MessageBoxButtonData buttons[] = {
|
||||
{ SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, 0, "OK" },
|
||||
{ 0, 1, "Report Issue" },
|
||||
};
|
||||
|
||||
const SDL_MessageBoxData messageboxdata = {
|
||||
SDL_MESSAGEBOX_ERROR, /* .flags */
|
||||
NULL, /* .window */
|
||||
title, /* .title */
|
||||
va("%s %s", msg, reportmsg), /* .message */
|
||||
SDL_arraysize(buttons), /* .numbuttons */
|
||||
buttons, /* .buttons */
|
||||
NULL /* .colorScheme */
|
||||
};
|
||||
|
||||
int buttonid;
|
||||
|
||||
SDL_ShowMessageBox(&messageboxdata, &buttonid);
|
||||
|
||||
if (buttonid == 1)
|
||||
I_OpenURL("https://github.com/Indev450/SRB2Kart-Saturn/issues");
|
||||
}
|
||||
|
||||
static void I_ShowSimpleErrorBox(const char *title, char *msg)
|
||||
{
|
||||
if (M_CheckParm("-dedicated"))
|
||||
return;
|
||||
|
||||
// Implement message box with SDL_ShowSimpleMessageBox,
|
||||
// which should fail gracefully if it can't put a message box up
|
||||
// on the target system
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, title, msg, NULL);
|
||||
// Note that SDL_ShowSimpleMessageBox does *not* require SDL to be
|
||||
// initialized at the time, so calling it after SDL_Quit() is
|
||||
// perfectly okay! In addition, we do this on purpose so the
|
||||
// fullscreen window is closed before displaying the error message
|
||||
// in case the fullscreen window blocks it for some absurd reason.
|
||||
}
|
||||
|
||||
static void I_ReportSignal(int num, int coredumped)
|
||||
{
|
||||
char sigmsg[512];
|
||||
char signame[128];
|
||||
char sigttl[512] = "Process killed by signal: ";
|
||||
|
||||
I_PrintSignal(num, coredumped, sigmsg);
|
||||
I_PrintSignal(num, coredumped, sigmsg, signame);
|
||||
|
||||
size_t len = strlen(sigmsg);
|
||||
snprintf(sigmsg + len, sizeof(sigmsg) - len, "\n\nCrash report has been saved into %s", CRASH_LOGFILE_NAME);
|
||||
I_OutputMsg("\nProcess killed by signal: %s\n\n", sigmsg);
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Process killed by signal", sigmsg, NULL);
|
||||
|
||||
strcat(sigttl, signame);
|
||||
I_OutputMsg("\n%s\n\n", sigttl);
|
||||
//I_ShowSimpleErrorBox(sigttl, sigmsg);
|
||||
I_ShowErrorBox(sigttl, sigmsg);
|
||||
}
|
||||
|
||||
#ifndef NEWSIGNALHANDLER
|
||||
@@ -1744,10 +1797,7 @@ FUNCNORETURN static ATTRNORETURN void newsignalhandler_Warn(const char *pr)
|
||||
);
|
||||
|
||||
I_OutputMsg("%s\n", text);
|
||||
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||
"Startup error",
|
||||
text, NULL);
|
||||
I_ShowSimpleErrorBox("Startup error", text);
|
||||
|
||||
I_ShutdownConsole();
|
||||
exit(-1);
|
||||
@@ -1909,6 +1959,7 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char buffer[8192];
|
||||
const char *sigttl = "";
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
if (std::this_thread::get_id() != g_main_thread_id)
|
||||
@@ -1945,12 +1996,9 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...)
|
||||
va_start(argptr, error);
|
||||
vsnprintf(buffer, 8192, error, argptr);
|
||||
va_end(argptr);
|
||||
// Implement message box with SDL_ShowSimpleMessageBox,
|
||||
// which should fail gracefully if it can't put a message box up
|
||||
// on the target system
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||
"SRB2Kart " VERSIONSTRING " Recursive Error",
|
||||
buffer, NULL);
|
||||
|
||||
sigttl = "SRB2Kart " VERSIONSTRING " Recursive Error";
|
||||
I_ShowSimpleErrorBox(sigttl, buffer);
|
||||
|
||||
W_Shutdown();
|
||||
exit(-1); // recursive errors detected
|
||||
@@ -1990,15 +2038,9 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...)
|
||||
I_ShutdownSystem();
|
||||
SDL_Quit();
|
||||
|
||||
// Implement message box with SDL_ShowSimpleMessageBox,
|
||||
// which should fail gracefully if it can't put a message box up
|
||||
// on the target system
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "SRB2Kart " VERSIONSTRING " Error", buffer, NULL);
|
||||
// Note that SDL_ShowSimpleMessageBox does *not* require SDL to be
|
||||
// initialized at the time, so calling it after SDL_Quit() is
|
||||
// perfectly okay! In addition, we do this on purpose so the
|
||||
// fullscreen window is closed before displaying the error message
|
||||
// in case the fullscreen window blocks it for some absurd reason.
|
||||
sigttl = "SRB2Kart " VERSIONSTRING " Error";
|
||||
//I_ShowSimpleErrorBox(sigttl, buffer);
|
||||
I_ShowErrorBox(sigttl, buffer);
|
||||
|
||||
W_Shutdown();
|
||||
|
||||
|
||||
+1
-1
@@ -467,7 +467,7 @@ static INT32 SDLJoyAxis(const Sint16 axis, evtype_t which)
|
||||
}
|
||||
else
|
||||
{
|
||||
raxis = JoyInfo[pid].scale!=1?((raxis/JoyInfo[pid].scale)*JoyInfo[pid].scale):raxis;
|
||||
raxis = JoyInfo[pid].scale != 1 ? ((raxis/JoyInfo[pid].scale)*JoyInfo[pid].scale) : raxis;
|
||||
|
||||
#ifdef SDL_JDEADZONE
|
||||
if (-SDL_JDEADZONE <= raxis && raxis <= SDL_JDEADZONE)
|
||||
|
||||
+4
-4
@@ -44,15 +44,15 @@ typedef struct SDLJoyInfo_s
|
||||
/// number of old joystick
|
||||
int oldjoy;
|
||||
/// number of axies
|
||||
int axises;
|
||||
//int axises;
|
||||
/// scale of axises
|
||||
INT32 scale;
|
||||
/// number of buttons
|
||||
int buttons;
|
||||
//int buttons;
|
||||
/// number of hats
|
||||
int hats;
|
||||
//int hats;
|
||||
/// number of balls
|
||||
int balls;
|
||||
//int balls;
|
||||
} SDLJoyInfo_t;
|
||||
|
||||
/** \brief SDL info about controller 1
|
||||
|
||||
+11
-4
@@ -1742,6 +1742,7 @@ void V_DrawHorizontallyScaledFullScreenPatch(patch_t *patch)
|
||||
void V_DrawVhsEffect(boolean rewind)
|
||||
{
|
||||
fixed_t uby, dby;
|
||||
// upbary is the bar going from top to bottom for some reason
|
||||
static fixed_t upbary = 100*FRACUNIT, downbary = 150*FRACUNIT;
|
||||
|
||||
UINT8 barsize, updistort, downdistort;
|
||||
@@ -1759,20 +1760,26 @@ void V_DrawVhsEffect(boolean rewind)
|
||||
if (cv_reducevfx.value)
|
||||
return;
|
||||
|
||||
barsize = vid.dup << 5;
|
||||
updistort = vid.dup << (rewind ? 5 : 3);
|
||||
const INT32 dup = min(vid.width / BASEVIDWIDTH, vid.height / BASEVIDHEIGHT);
|
||||
|
||||
barsize = dup << 5;
|
||||
updistort = dup << (rewind ? 5 : 3);
|
||||
downdistort = updistort >> 1;
|
||||
|
||||
if (rewind)
|
||||
V_DrawVhsEffect(false); // experimentation
|
||||
|
||||
upbary -= renderdeltatics * (vid.dup * (rewind ? 3 : 1.8f));
|
||||
downbary += renderdeltatics * (vid.dup * (rewind ? 2 : 1));
|
||||
upbary -= renderdeltatics * (fixed_t)(dup * (rewind ? 3 : 1.8f));
|
||||
downbary += renderdeltatics * (dup * (rewind ? 2 : 1));
|
||||
|
||||
if (upbary < -barsize*FRACUNIT)
|
||||
upbary = vid.height << FRACBITS;
|
||||
if (upbary > vid.height << FRACBITS)
|
||||
upbary = -barsize*FRACUNIT;
|
||||
if (downbary > vid.height << FRACBITS)
|
||||
downbary = -barsize*FRACUNIT;
|
||||
if (downbary < -barsize*FRACUNIT)
|
||||
downbary = vid.height << FRACBITS;
|
||||
|
||||
uby = upbary >> FRACBITS;
|
||||
dby = downbary >> FRACBITS;
|
||||
|
||||
+6
-6
@@ -187,13 +187,13 @@ static VOID ShowModuleInfo(HANDLE LogFile, HMODULE ModuleHandle)
|
||||
// Open the code module file so that we can get its file date
|
||||
// and size.
|
||||
ModuleFile = CreateFileA(ModName, GENERIC_READ,
|
||||
FILE_SHARE_READ, 0, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL, 0);
|
||||
FILE_SHARE_READ, NULL, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (ModuleFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
FILETIME LastWriteTime;
|
||||
FileSize = GetFileSize(ModuleFile, 0);
|
||||
if (GetFileTime(ModuleFile, 0, 0, &LastWriteTime))
|
||||
FileSize = GetFileSize(ModuleFile, NULL);
|
||||
if (GetFileTime(ModuleFile, NULL, NULL, &LastWriteTime))
|
||||
{
|
||||
wsprintfA(TimeBuffer, " - file date is ");
|
||||
PrintTime(TimeBuffer + strlen(TimeBuffer), LastWriteTime);
|
||||
@@ -227,7 +227,7 @@ static VOID RecordModuleList(HANDLE LogFile)
|
||||
size_t PageSize;
|
||||
size_t NumPages;
|
||||
size_t pageNum = 0;
|
||||
LPVOID LastAllocationBase = 0;
|
||||
LPVOID LastAllocationBase = NULL;
|
||||
|
||||
FPrintf(LogFile, "\r\n"
|
||||
"\tModule list: names, addresses, sizes, time stamps "
|
||||
@@ -385,7 +385,7 @@ LONG WINAPI RecordExceptionInfo(PEXCEPTION_POINTERS data/*, LPCSTR Message, LPST
|
||||
}
|
||||
|
||||
// Append to the error log.
|
||||
SetFilePointer(fileHandle, 0, 0, FILE_END);
|
||||
SetFilePointer(fileHandle, 0, NULL, FILE_END);
|
||||
|
||||
// Print out some blank lines to separate this error log from any previous ones.
|
||||
FPrintf(fileHandle, "Email Sonic Team Junior so we can fix the bugs\r\n"); // Tails
|
||||
|
||||
Reference in new issue
Block a user