Updates for GZDoom 4.12, part 1 (new functions, variables, flags, etc.).

This commit is contained in:
Mari the Deer 2024-04-22 14:34:22 +02:00
commit f38db38751
79 changed files with 349 additions and 183 deletions

View file

@ -9,7 +9,7 @@ extend Class SWWMStatusBar
return String.Format("\cj%d\cc%s",int(meters),StringTable.Localize("$SWWM_UNIT_METER"));
}
private void DrawInterest( Vector3 viewvec, out bool projinit )
private void DrawInterest( Vector3 viewvec, bool &projinit )
{
String tag;
SWWMInterest poi = hnd.intpoints;
@ -84,7 +84,7 @@ extend Class SWWMStatusBar
return col;
}
private void DrawItemSense( Vector3 viewvec, out bool projinit )
private void DrawItemSense( Vector3 viewvec, bool &projinit )
{
let demo = Demolitionist(CPlayer.mo);
if ( !demo ) return;
@ -124,7 +124,7 @@ extend Class SWWMStatusBar
return false;
}
private void DrawTrackers( Vector3 viewvec, out bool projinit )
private void DrawTrackers( Vector3 viewvec, bool &projinit )
{
let cam = players[consoleplayer].camera;
if ( !cti ) cti = ThinkerIterator.Create("SWWMQuickCombatTracker",Thinker.STAT_INVENTORY);
@ -336,7 +336,7 @@ extend Class SWWMStatusBar
}
}
private void DrawNumbers( Vector3 viewvec, out bool projinit )
private void DrawNumbers( Vector3 viewvec, bool &projinit )
{
SWWMDamNum snum = hnd.damnums;
if ( !snum ) return;
@ -366,7 +366,7 @@ extend Class SWWMStatusBar
while ( snum = snum.next );
}
private void DrawScores( Vector3 viewvec, out bool projinit )
private void DrawScores( Vector3 viewvec, bool &projinit )
{
SWWMScoreObj snum = hnd.scorenums;
if ( !snum ) return;
@ -406,7 +406,7 @@ extend Class SWWMStatusBar
private void DrawTarget()
{
// don't draw when dead or with automap open
if ( (CPlayer.health <= 0) || automapactive ) return;
if ( (CPlayer.health <= 0) || (automapactive && !viewactive) ) return;
bool projinit = false;
Vector3 viewvec = SWWMUtility.Vec3FromAngles(viewrot.x,viewrot.y);
// points of interest

View file

@ -510,8 +510,7 @@ extend Class SWWMStatusBar
{
// oh bother, this will be dicks
let ai = level.CreateActorIterator(m.args[0]);
Actor a;
while ( a = ai.Next() )
foreach ( a:ai )
{
Vector2 rv = a.pos.xy-cpos;
bool isportal = false;
@ -829,7 +828,7 @@ extend Class SWWMStatusBar
{
int xx = xmargin, yy = ymargin;
// obviously, don't draw the minimap if the automap is open
if ( !automapactive && swwm_mm_enable )
if ( !(automapactive && !viewactive) && swwm_mm_enable )
{
bool smol = (min(ss.x,ss.y/.5625)<480);
int hsz = smol?HALFMAPSIZE_SMALL:HALFMAPSIZE;
@ -841,11 +840,11 @@ extend Class SWWMStatusBar
// draw stats and timer when automap is open
int fstats = swwm_forcestats;
bool pstats = swwm_percentstats;
if ( automapactive || (fstats > 0) )
if ( (automapactive && !viewactive) || (fstats > 0) )
{
xx = int(ss.x-(xmargin+2));
String str;
if ( automapactive || (fstats > 1) )
if ( (automapactive && !viewactive) || (fstats > 1) )
{
int label = am_showmaplabel;
String ln = level.levelname;

View file

@ -151,7 +151,7 @@ Class GenericFlash : HUDMessageBase
}
override void Draw( int bottom, int visibility )
{
if ( automapactive || (visibility != BaseStatusBar.HUDMSGLayer_UnderHUD) ) return;
if ( (automapactive && !viewactive) || (visibility != BaseStatusBar.HUDMSGLayer_UnderHUD) ) return;
if ( cam && (players[consoleplayer].camera != cam) ) return;
double fractic = System.GetTimeFrac();
double falpha = alpha-fractic*(1./duration);