mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-25 03:41:02 +00:00
Merge branch Kart-Public:master into speccenter
This commit is contained in:
commit
9ecc4682a1
8 changed files with 65 additions and 14 deletions
|
@ -1464,7 +1464,7 @@ void Command_Ping_f(void)
|
|||
|
||||
if (!server && playeringame[consoleplayer])
|
||||
{
|
||||
CONS_Printf("\nYour ping is %d frames (%d ms)\n", playerpingtable[consoleplayer], (INT32)(playerpingtable[i] * (1000.00f / TICRATE)));
|
||||
CONS_Printf("\nYour ping is %d frames (%d ms)\n", playerpingtable[consoleplayer], (INT32)(playerpingtable[consoleplayer] * (1000.00f / TICRATE)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -479,14 +479,43 @@ void HWR_InitTextureCache(void)
|
|||
// Callback function for HWR_FreeTextureCache.
|
||||
static void FreeMipmapColormap(INT32 patchnum, void *patch)
|
||||
{
|
||||
GLPatch_t* const grpatch = patch;
|
||||
GLPatch_t* const pat = patch;
|
||||
(void)patchnum; //unused
|
||||
while (grpatch->mipmap->nextcolormap)
|
||||
|
||||
// The patch must be valid, obviously
|
||||
if (!pat)
|
||||
return;
|
||||
|
||||
// The mipmap must be valid, obviously
|
||||
while (pat->mipmap)
|
||||
{
|
||||
GLMipmap_t *grmip = grpatch->mipmap->nextcolormap;
|
||||
grpatch->mipmap->nextcolormap = grmip->nextcolormap;
|
||||
if (grmip->grInfo.data) Z_Free(grmip->grInfo.data);
|
||||
free(grmip);
|
||||
// Confusing at first, but pat->mipmap->nextcolormap
|
||||
// at the beginning of the loop is the first colormap
|
||||
// from the linked list of colormaps.
|
||||
GLMipmap_t *next = NULL;
|
||||
|
||||
// No mipmap in this patch, break out of the loop.
|
||||
if (!pat->mipmap)
|
||||
break;
|
||||
|
||||
// No colormap mipmaps either.
|
||||
if (!pat->mipmap->nextcolormap)
|
||||
break;
|
||||
|
||||
// Set the first colormap to the one that comes after it.
|
||||
next = pat->mipmap->nextcolormap;
|
||||
if (!next)
|
||||
break;
|
||||
|
||||
pat->mipmap->nextcolormap = next->nextcolormap;
|
||||
|
||||
// Free image data from memory.
|
||||
if (next->grInfo.data)
|
||||
Z_Free(next->grInfo.data);
|
||||
next->grInfo.data = NULL;
|
||||
|
||||
// Free the old colormap mipmap from memory.
|
||||
free(next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -503,7 +532,7 @@ void HWR_FreeTextureCache(void)
|
|||
|
||||
// Alam: free the Z_Blocks before freeing it's users
|
||||
|
||||
// free all skin after each level: must be done after pfnClearMipMapCache!
|
||||
// free all patch colormaps after each level: must be done after ClearMipMapCache!
|
||||
for (i = 0; i < numwadfiles; i++)
|
||||
M_AATreeIterate(wadfiles[i]->hwrcache, FreeMipmapColormap);
|
||||
|
||||
|
|
|
@ -4538,7 +4538,7 @@ void HWR_ProjectPrecipitationSprite(precipmobj_t *thing)
|
|||
#endif
|
||||
|
||||
// set top/bottom coords
|
||||
vis->ty = FIXED_TO_FLOAT(thing->z + spritecachedinfo[lumpoff].topoffset);
|
||||
vis->ty = FIXED_TO_FLOAT(interp.z + spritecachedinfo[lumpoff].topoffset);
|
||||
|
||||
vis->precip = true;
|
||||
}
|
||||
|
|
|
@ -1116,6 +1116,10 @@ void HU_Ticker(void)
|
|||
}
|
||||
|
||||
if (cechotimer > 0) --cechotimer;
|
||||
|
||||
// Animate the desynch dots
|
||||
if (hu_resynching)
|
||||
resynch_ticker++; //tic tic tic tic tic
|
||||
|
||||
HU_TickSongCredits();
|
||||
}
|
||||
|
|
|
@ -895,6 +895,8 @@ void P_PreTicker(INT32 frames)
|
|||
// Run shield positioning
|
||||
//P_RunShields();
|
||||
P_RunOverlays();
|
||||
|
||||
P_RunShadows();
|
||||
|
||||
P_UpdateSpecials();
|
||||
P_RespawnSpecials();
|
||||
|
|
10
src/r_fps.c
10
src/r_fps.c
|
@ -23,6 +23,10 @@
|
|||
#include "z_zone.h"
|
||||
#include "console.h" // con_startup_loadprogress
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_main.h" // for cv_grshearing
|
||||
#endif
|
||||
|
||||
static CV_PossibleValue_t fpscap_cons_t[] = {
|
||||
#ifdef DEVELOP
|
||||
// Lower values are actually pretty useful for debugging interp problems!
|
||||
|
@ -119,7 +123,11 @@ static void R_SetupFreelook(player_t *player, boolean skybox)
|
|||
|
||||
// clip it in the case we are looking a hardware 90 degrees full aiming
|
||||
// (lmps, network and use F12...)
|
||||
if (rendermode == render_soft)
|
||||
if (rendermode == render_soft
|
||||
#ifdef HWRENDER
|
||||
|| (rendermode == render_opengl && cv_grshearing.value)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
G_SoftwareClipAimingPitch((INT32 *)&aimingangle);
|
||||
}
|
||||
|
|
|
@ -681,7 +681,7 @@ static void R_DrawRepeatMaskedColumn(column_t *col)
|
|||
{
|
||||
while (sprtopscreen < sprbotscreen) {
|
||||
R_DrawMaskedColumn(col);
|
||||
if ((INT64)sprtopscreen + dc_texheight*spryscale > (INT64)INT32_MAX) // prevent overflow
|
||||
if (sprtopscreen + (INT64)dc_texheight*spryscale > (INT64)INT32_MAX) // prevent overflow
|
||||
sprtopscreen = INT32_MAX;
|
||||
else
|
||||
sprtopscreen += dc_texheight*spryscale;
|
||||
|
|
|
@ -90,6 +90,7 @@ static UINT32 fading_timer;
|
|||
static UINT32 fading_duration;
|
||||
static INT32 fading_id;
|
||||
static void (*fading_callback)(void);
|
||||
static boolean fading_do_callback;
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
static Music_Emu *gme;
|
||||
|
@ -106,6 +107,7 @@ static void var_cleanup(void)
|
|||
is_fading = false;
|
||||
|
||||
fading_callback = NULL;
|
||||
fading_do_callback = false;
|
||||
|
||||
internal_volume = 100;
|
||||
}
|
||||
|
@ -202,6 +204,13 @@ void I_ShutdownSound(void)
|
|||
|
||||
void I_UpdateSound(void)
|
||||
{
|
||||
if (fading_do_callback)
|
||||
{
|
||||
if (fading_callback)
|
||||
(*fading_callback)();
|
||||
fading_callback = NULL;
|
||||
fading_do_callback = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// ------------------------
|
||||
|
@ -526,9 +535,8 @@ static UINT32 get_adjusted_position(UINT32 position)
|
|||
|
||||
static void do_fading_callback(void)
|
||||
{
|
||||
if (fading_callback)
|
||||
(*fading_callback)();
|
||||
fading_callback = NULL;
|
||||
// TODO: Should I use a mutex here or something?
|
||||
fading_do_callback = true;
|
||||
}
|
||||
|
||||
/// ------------------------
|
||||
|
|
Loading…
Reference in a new issue