Interop late, fix runaway cliprects, cleanup
This commit is contained in:
parent
abc004ddc8
commit
51aeaa7529
2 changed files with 15 additions and 13 deletions
|
|
@ -203,6 +203,7 @@ static size_t CopyString(huddrawlist_h list, const char* str)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
static void CalcStringCoords(drawitem_t *item, const char *string)
|
||||
{
|
||||
if (!(item->flags & V_NOSCALESTART))
|
||||
|
|
@ -309,6 +310,7 @@ static void CalcFillCoords(drawitem_t *item)
|
|||
item->y = y;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#define INTERP_LATCH 1
|
||||
#define INTERP_STRING 2
|
||||
|
|
@ -510,6 +512,8 @@ void LUA_HUD_AddFadeScreen(
|
|||
{
|
||||
size_t i = AllocateDrawItem(list);
|
||||
drawitem_t *item = &list->items[i];
|
||||
// nothing to interpolate here
|
||||
item->id = 0;
|
||||
item->type = DI_FadeScreen;
|
||||
item->color = color;
|
||||
item->strength = strength;
|
||||
|
|
@ -568,6 +572,7 @@ void LUA_HUD_AddSetClipRect(
|
|||
{
|
||||
size_t i = AllocateDrawItem(list);
|
||||
drawitem_t *item = &list->items[i];
|
||||
item->id = GetItemId();
|
||||
item->type = DI_SetClipRect;
|
||||
item->x = x;
|
||||
item->y = y;
|
||||
|
|
@ -582,6 +587,7 @@ void LUA_HUD_AddClearClipRect(
|
|||
{
|
||||
size_t i = AllocateDrawItem(list);
|
||||
drawitem_t *item = &list->items[i];
|
||||
item->id = 0;
|
||||
item->type = DI_ClearClipRect;
|
||||
}
|
||||
|
||||
|
|
@ -723,7 +729,7 @@ void LUA_HUD_DrawList(huddrawlist_h list)
|
|||
V_DrawKartString(LERPS(x), LERPS(y), item->flags, itemstr);
|
||||
break;
|
||||
case DI_SetClipRect:
|
||||
V_SetClipRect(item->x, item->y, item->w, item->h, item->flags);
|
||||
V_SetClipRect(LERPS(x), LERPS(y), LERP(w), LERP(h), item->flags);
|
||||
break;
|
||||
case DI_ClearClipRect:
|
||||
V_ClearClipRect();
|
||||
|
|
@ -733,4 +739,7 @@ void LUA_HUD_DrawList(huddrawlist_h list)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// who are you running from?
|
||||
V_ClearClipRect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -724,7 +724,7 @@ void ST_preLevelTitleCardDrawer(void)
|
|||
// Draw the status bar overlay, customisable: the user chooses which
|
||||
// kind of information to overlay
|
||||
//
|
||||
static void ST_overlayDrawer(UINT8 playernum)
|
||||
static void ST_overlayDrawer(void)
|
||||
{
|
||||
// hu_showscores = auto hide score/time/rings when tab rankings are shown
|
||||
if (!(hu_showscores && (netgame || multiplayer)))
|
||||
|
|
@ -733,9 +733,10 @@ static void ST_overlayDrawer(UINT8 playernum)
|
|||
|
||||
if (renderisnewtic)
|
||||
{
|
||||
LUA_HookHUD(luahuddrawlist_game[playernum], HUD_HOOK(game));
|
||||
LUA_HUD_ClearDrawList(luahuddrawlist_game[stplyrnum]);
|
||||
LUA_HookHUD(luahuddrawlist_game[stplyrnum], HUD_HOOK(game));
|
||||
}
|
||||
LUA_HUD_DrawList(luahuddrawlist_game[playernum]);
|
||||
LUA_HUD_DrawList(luahuddrawlist_game[stplyrnum]);
|
||||
}
|
||||
|
||||
if (!hu_showscores) // hide the following if TAB is held
|
||||
|
|
@ -911,11 +912,6 @@ void ST_Drawer(void)
|
|||
if (st_overlay)
|
||||
{
|
||||
UINT8 i;
|
||||
if (renderisnewtic)
|
||||
{
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
LUA_HUD_ClearDrawList(luahuddrawlist_game[i]);
|
||||
}
|
||||
// No deadview!
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
|
|
@ -923,12 +919,9 @@ void ST_Drawer(void)
|
|||
stplyrnum = i;
|
||||
R_SetViewContext(VIEWCONTEXT_PLAYER1 + i);
|
||||
R_InterpolateView(rendertimefrac); // to assist with object tracking
|
||||
ST_overlayDrawer(i);
|
||||
ST_overlayDrawer();
|
||||
}
|
||||
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
LUA_HUD_DrawList(luahuddrawlist_game[i]);
|
||||
|
||||
// draw Midnight Channel's overlay ontop
|
||||
if (mapheaderinfo[gamemap-1]->typeoflevel & TOL_TV) // Very specific Midnight Channel stuff.
|
||||
ST_MayonakaStatic();
|
||||
|
|
|
|||
Loading…
Reference in a new issue