diff --git a/language.version b/language.version index 4b74c860a..ed52a507c 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r534 \cu(Fri 30 Sep 12:21:03 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r534 \cu(2022-09-30 12:21:03)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r535 \cu(Fri 30 Sep 12:53:56 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r535 \cu(2022-09-30 12:53:56)\c-"; diff --git a/zscript/compat/swwm_hdoom.zsc b/zscript/compat/swwm_hdoom.zsc index e833719bb..c78833f15 100644 --- a/zscript/compat/swwm_hdoom.zsc +++ b/zscript/compat/swwm_hdoom.zsc @@ -165,7 +165,7 @@ Class SWWMHDoomHandler : StaticEventHandler override void RenderOverlay( RenderEvent e ) { if ( !detected || (timer < 50) || (timer > 150) ) return; - if ( !scr ) scr = TexMan.CheckForTexture("graphics/hdscreen.png",TexMan.Type_Any); + if ( !scr ) scr = TexMan.CheckForTexture("graphics/hdscreen.png"); double ar = Screen.GetAspectRatio(); Vector2 tsize = TexMan.GetScaledSize(scr); Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight()); diff --git a/zscript/compat/swwm_shame.zsc b/zscript/compat/swwm_shame.zsc index f3d395885..3ed6c8a35 100644 --- a/zscript/compat/swwm_shame.zsc +++ b/zscript/compat/swwm_shame.zsc @@ -84,7 +84,7 @@ Class SWWMBrutalHandler : StaticEventHandler override void RenderOverlay( RenderEvent e ) { if ( !detected ) return; - if ( !scr ) scr = TexMan.CheckForTexture("graphics/bdscreen.png",TexMan.Type_Any); + if ( !scr ) scr = TexMan.CheckForTexture("graphics/bdscreen.png"); Screen.Dim("Red",(timer/350.)-.2,0,0,Screen.GetWidth(),Screen.GetHeight()); double ar = Screen.GetAspectRatio(); Vector2 tsize = TexMan.GetScaledSize(scr); diff --git a/zscript/dlc1/swwm_dlcweapons_canvas.zsc b/zscript/dlc1/swwm_dlcweapons_canvas.zsc index 434dd8ac3..8c578ec26 100644 --- a/zscript/dlc1/swwm_dlcweapons_canvas.zsc +++ b/zscript/dlc1/swwm_dlcweapons_canvas.zsc @@ -30,10 +30,10 @@ extend Class HeavyMahSheenGun override void RenderTexture( RenderEvent e ) { if ( !AmmoLed ) AmmoLed = TexMan.GetCanvas("SHEENLED"); - if ( !AmmoLedBase ) AmmoLedBase = TexMan.CheckForTexture("models/canvas/SheenLEDBase.png",TexMan.Type_Any); - if ( !AmmoLedBar ) AmmoLedBar = TexMan.CheckForTexture("models/canvas/SheenLEDBar.png",TexMan.Type_Any); - if ( !AmmoLedSpeed ) AmmoLedSpeed = TexMan.CheckForTexture("models/canvas/SheenLEDSpeed.png",TexMan.Type_Any); - if ( !AmmoLedNums ) AmmoLedNums = TexMan.CheckForTexture("models/canvas/SheenLEDNums.png",TexMan.Type_Any); + if ( !AmmoLedBase ) AmmoLedBase = TexMan.CheckForTexture("models/canvas/SheenLEDBase.png"); + if ( !AmmoLedBar ) AmmoLedBar = TexMan.CheckForTexture("models/canvas/SheenLEDBar.png"); + if ( !AmmoLedSpeed ) AmmoLedSpeed = TexMan.CheckForTexture("models/canvas/SheenLEDSpeed.png"); + if ( !AmmoLedNums ) AmmoLedNums = TexMan.CheckForTexture("models/canvas/SheenLEDNums.png"); int d1 = Ammo1.Amount%10; int d2 = (Ammo1.Amount/10)%10; int d3 = (Ammo1.Amount/100)%10; @@ -66,9 +66,9 @@ extend Class Quadravol override void RenderTexture( RenderEvent e ) { if ( !AmmoLed ) AmmoLed = TexMan.GetCanvas("QUADRLED"); - if ( !AmmoLedBase ) AmmoLedBase = TexMan.CheckForTexture("models/canvas/QuadLEDBase.png",TexMan.Type_Any); - if ( !AmmoLedRound ) AmmoLedRound = TexMan.CheckForTexture("models/canvas/QuadLEDRound.png",TexMan.Type_Any); - if ( !AmmoLedCharge ) AmmoLedCharge = TexMan.CheckForTexture("models/canvas/QuadLEDCharge.png",TexMan.Type_Any); + if ( !AmmoLedBase ) AmmoLedBase = TexMan.CheckForTexture("models/canvas/QuadLEDBase.png"); + if ( !AmmoLedRound ) AmmoLedRound = TexMan.CheckForTexture("models/canvas/QuadLEDRound.png"); + if ( !AmmoLedCharge ) AmmoLedCharge = TexMan.CheckForTexture("models/canvas/QuadLEDCharge.png"); AmmoLed.Clear(0,0,64,64,0xFF101033); AmmoLed.DrawTexture(AmmoLedBase,false,0,0,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,0xFF00FFFF); Color col; @@ -129,7 +129,7 @@ extend Class MisterRifle private ui void DrawWindowFrame( int x, int y, int w, int h, int padx = 4, int pady = 4 ) { - if ( !FrameTex ) FrameTex = TexMan.CheckForTexture("models/canvas/MortalFrameTex.png",TexMan.Type_Any); + if ( !FrameTex ) FrameTex = TexMan.CheckForTexture("models/canvas/MortalFrameTex.png"); x -= padx/2; y -= pady/2; w += padx; @@ -166,9 +166,9 @@ extend Class MisterRifle if ( !MortalFontSmall ) MortalFontSmall = Font.GetFont("MortalFont20"); if ( !MortalFontMed ) MortalFontMed = Font.GetFont("MortalFont40"); if ( !MortalFontBig ) MortalFontBig = Font.GetFont("MortalFont80"); - if ( !MortalBG ) MortalBG = TexMan.CheckForTexture("models/canvas/MortalBG.png",TexMan.Type_Any); - if ( !MortalIcons[0] ) MortalIcons[0] = TexMan.CheckForTexture("models/canvas/MortalFireIcons.png",TexMan.Type_Any); - if ( !MortalIcons[1] ) MortalIcons[1] = TexMan.CheckForTexture("models/canvas/MortalGrenadeIcons.png",TexMan.Type_Any); + if ( !MortalBG ) MortalBG = TexMan.CheckForTexture("models/canvas/MortalBG.png"); + if ( !MortalIcons[0] ) MortalIcons[0] = TexMan.CheckForTexture("models/canvas/MortalFireIcons.png"); + if ( !MortalIcons[1] ) MortalIcons[1] = TexMan.CheckForTexture("models/canvas/MortalGrenadeIcons.png"); TouchScreen.DrawTexture(MortalBG,false,0,0); TouchScreen.Dim("Black",.8,0,0,256,22); String str = "MR\cu-\c-"..serialnum; @@ -271,7 +271,7 @@ extend Class MisterRifle } // Holo sub-screen if ( !AmmoLed ) AmmoLed = TexMan.GetCanvas("MORTLED2"); - if ( !AmmoLedFont ) AmmoLedFont = TexMan.CheckForTexture("models/canvas/MortalFlatChars.png",TexMan.Type_Any); + if ( !AmmoLedFont ) AmmoLedFont = TexMan.CheckForTexture("models/canvas/MortalFlatChars.png"); AmmoLed.Clear(0,0,64,16,0x00000000); int dg1 = (ingun/10)%10; int dg2 = (ingun%10); diff --git a/zscript/dlc1/swwm_dlcweapons_hud.zsc b/zscript/dlc1/swwm_dlcweapons_hud.zsc index 99ecd94f1..b61fa4b83 100644 --- a/zscript/dlc1/swwm_dlcweapons_hud.zsc +++ b/zscript/dlc1/swwm_dlcweapons_hud.zsc @@ -7,8 +7,8 @@ extend Class ItamexHammer override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { - if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/ItamexDisplay.png",TexMan.Type_Any); - if ( !BarTex ) BarTex = TexMan.CheckForTexture("graphics/HUD/ItamexBar.png",TexMan.Type_Any); + if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/ItamexDisplay.png"); + if ( !BarTex ) BarTex = TexMan.CheckForTexture("graphics/HUD/ItamexBar.png"); double ct = clamp(ChargeInter?ChargeInter.GetValue(TicFrac):charge,0.,100.); if ( ct <= 0 ) return; double ch = ct*.2; @@ -57,11 +57,11 @@ extend Class HeavyMahSheenGun override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { - if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/SheenDisplay.png",TexMan.Type_Any); - if ( !BulletTex[0] ) BulletTex[0] = TexMan.CheckForTexture("graphics/HUD/SheenRound.png",TexMan.Type_Any); - if ( !BulletTex[1] ) BulletTex[1] = TexMan.CheckForTexture("graphics/HUD/SheenCasing.png",TexMan.Type_Any); - if ( !SpeedTex ) SpeedTex = TexMan.CheckForTexture("graphics/HUD/SheenSpeed.png",TexMan.Type_Any); - if ( !BarTex ) BarTex = TexMan.CheckForTexture("graphics/HUD/SheenBar.png",TexMan.Type_Any); + if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/SheenDisplay.png"); + if ( !BulletTex[0] ) BulletTex[0] = TexMan.CheckForTexture("graphics/HUD/SheenRound.png"); + if ( !BulletTex[1] ) BulletTex[1] = TexMan.CheckForTexture("graphics/HUD/SheenCasing.png"); + if ( !SpeedTex ) SpeedTex = TexMan.CheckForTexture("graphics/HUD/SheenSpeed.png"); + if ( !BarTex ) BarTex = TexMan.CheckForTexture("graphics/HUD/SheenBar.png"); Screen.DrawTexture(WeaponBox,false,bx-23,by-24,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); if ( firespeed == 0 ) for ( int i=0; i<2; i++ ) Screen.DrawTexture(SpeedTex,false,bx-21,(by-14)+i*8,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); else if ( firespeed == 1 ) for ( int i=0; i<3; i++ ) Screen.DrawTexture(SpeedTex,false,bx-21,(by-14)+i*4,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); @@ -115,9 +115,9 @@ extend Class Quadravol override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { - if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/QuadravolDisplay.png",TexMan.Type_Any); - if ( !BulletTex[0] ) BulletTex[0] = TexMan.CheckForTexture("graphics/HUD/QuadravolRound.png",TexMan.Type_Any); - if ( !BulletTex[1] ) BulletTex[1] = TexMan.CheckForTexture("graphics/HUD/QuadravolCasing.png",TexMan.Type_Any); + if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/QuadravolDisplay.png"); + if ( !BulletTex[0] ) BulletTex[0] = TexMan.CheckForTexture("graphics/HUD/QuadravolRound.png"); + if ( !BulletTex[1] ) BulletTex[1] = TexMan.CheckForTexture("graphics/HUD/QuadravolCasing.png"); if ( !ChargeFont ) ChargeFont = Font.GetFont('XekkasNum'); Screen.DrawTexture(WeaponBox,false,bx-16,by-44,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); for ( int i=0; i ar ) vsize = (tsize.y*ar,tsize.y); @@ -90,7 +90,7 @@ Class SWWMStatScreen : StatusScreen abstract { String artstr = StringTable.Localize(String.Format("$SWWM_FANART%d",whichart)); int semic = artstr.IndexOf(";"); - if ( !arttex ) arttex = TexMan.CheckForTexture(String.Format("graphics/Fanart/%s",(semic==-1)?artstr:artstr.Left(semic)),TexMan.Type_MiscPatch); + if ( !arttex ) arttex = TexMan.CheckForTexture(String.Format("graphics/Fanart/%s",(semic==-1)?artstr:artstr.Left(semic))); tsize = TexMan.GetScaledSize(arttex); sar = tsize.x/tsize.y; if ( sar > ar ) vsize = (tsize.y*ar,tsize.y); diff --git a/zscript/menu/swwm_menus.zsc b/zscript/menu/swwm_menus.zsc index 82fd0695e..1e58bf0b5 100644 --- a/zscript/menu/swwm_menus.zsc +++ b/zscript/menu/swwm_menus.zsc @@ -298,7 +298,7 @@ Class SWWMMainMenu : SWWMCleanMenu else { c.SetString("2"); - return TexMan.CheckForTexture(StringTable.Localize("$SWWM_MENUPOSE2"),TexMan.Type_Any); + return TexMan.CheckForTexture(StringTable.Localize("$SWWM_MENUPOSE2")); } int npose = StringTable.Localize("$SWWM_NMENUPOSE").ToInt(); for ( int i=1; i<=npose; i++ ) @@ -310,11 +310,11 @@ Class SWWMMainMenu : SWWMCleanMenu if ( candidates.Size() == 0 ) { c.SetString("2"); - return TexMan.CheckForTexture(StringTable.Localize("$SWWM_MENUPOSE2"),TexMan.Type_Any); + return TexMan.CheckForTexture(StringTable.Localize("$SWWM_MENUPOSE2")); } int which = candidates[Random[UIStuff](0,candidates.Size()-1)]; c.SetString(str..";"..which); - return TexMan.CheckForTexture(StringTable.Localize("$SWWM_MENUPOSE"..which),TexMan.Type_Any); + return TexMan.CheckForTexture(StringTable.Localize("$SWWM_MENUPOSE"..which)); } override void Init( Menu parent, ListMenuDescriptor desc ) @@ -347,7 +347,7 @@ Class SWWMMainMenu : SWWMCleanMenu theta = clamp(4.*frametime,0.,1.); if ( prevms ) demopos = SWWMUtility.Lerp(demopos,-40,theta); double alph = clamp(1.-(demopos/100),0.,1.); - if ( !gradtex ) gradtex = TexMan.CheckForTexture("graphics/M_GRAD.png",TexMan.Type_Any); + if ( !gradtex ) gradtex = TexMan.CheckForTexture("graphics/M_GRAD.png"); double scl = Screen.GetHeight()/960.; Screen.DrawTexture(gradtex,false,0,Screen.GetHeight(),DTA_DestWidth,Screen.GetWidth(),DTA_DestHeight,256*CleanYFac_1,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,Color(0,0,0),DTA_TopOffset,256,DTA_Alpha,.35); Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,Screen.GetHeight(),DTA_Rotate,90,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,600*scl*alph,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,Color(0,0,0),DTA_TopOffset,256,DTA_Alpha,alph*.5); @@ -615,7 +615,7 @@ class ListMenuItemSWWMLogo : ListMenuItem void Init( ListMenuDescriptor desc ) { Super.Init(desc.mXpos,desc.mYpos); - mTexture = TexMan.CheckForTexture("graphics/M_DEMOLITIONIST.png",TexMan.Type_Any); + mTexture = TexMan.CheckForTexture("graphics/M_DEMOLITIONIST.png"); } private int GetMenuYOffset() diff --git a/zscript/menu/swwm_title.zsc b/zscript/menu/swwm_title.zsc index f0b21e767..ca790dcd5 100644 --- a/zscript/menu/swwm_title.zsc +++ b/zscript/menu/swwm_title.zsc @@ -135,8 +135,8 @@ Class SWWMTitleStuff : EventHandler if ( !mSmallFont ) mSmallFont = Font.GetFont('TewiFont'); if ( !mBigFont ) mBigFont = Font.GetFont('TewiFontOutline'); if ( !lfade ) lfade = TexMan.GetCanvas("LOGOFADE"); - if ( !tex[2] ) tex[2] = TexMan.CheckForTexture("graphics/tempbg.png",TexMan.Type_Any); - if ( !tex[5] ) tex[5] = TexMan.CheckForTexture("graphics/DemoIcon.png",TexMan.Type_Any); + if ( !tex[2] ) tex[2] = TexMan.CheckForTexture("graphics/tempbg.png"); + if ( !tex[5] ) tex[5] = TexMan.CheckForTexture("graphics/DemoIcon.png"); Vector2 tsize, vsize; if ( titletimer < -300 ) { @@ -238,10 +238,10 @@ Class SWWMTitleStuff : EventHandler private ui void Render_NewTitle( RenderEvent e, double GameSecs ) { - if ( !tex[4] ) tex[4] = TexMan.CheckForTexture("graphics/NewLogo.png",TexMan.Type_Any); + if ( !tex[4] ) tex[4] = TexMan.CheckForTexture("graphics/NewLogo.png"); for ( int i=0; i<13; i++ ) { - if ( !letters[i] ) letters[i] = TexMan.CheckForTexture("graphics/NewLogo_Letter"..i..".png",TexMan.Type_Any); + if ( !letters[i] ) letters[i] = TexMan.CheckForTexture("graphics/NewLogo_Letter"..i..".png"); } double alf = clamp(GameSecs-1,0.,1.); alf *= 1.-clamp(GameSecs-4,0.,1.); diff --git a/zscript/swwm_thinkers_player.zsc b/zscript/swwm_thinkers_player.zsc index e94cc1d7b..35f3b446c 100644 --- a/zscript/swwm_thinkers_player.zsc +++ b/zscript/swwm_thinkers_player.zsc @@ -576,7 +576,7 @@ Class SWWMLoreLibrary : SWWMStaticThinker e.assoc = "$"..assoc; e.read = false; // image for certain entries - e.img = TexMan.CheckForTexture("graphics/KBase/PFP_"..ref..".png",TexMan.Type_Any); + e.img = TexMan.CheckForTexture("graphics/KBase/PFP_"..ref..".png"); // "new lore" message if ( (level.maptime > 0) && (gametic > lastaddtic) && (myplayer == players[consoleplayer]) && (!menuactive || (menuactive == Menu.OnNoPause)) && (myplayer.mo is 'Demolitionist') ) Console.Printf(StringTable.Localize("$SWWM_NEWLORE")); diff --git a/zscript/utility/swwm_utility.zsc b/zscript/utility/swwm_utility.zsc index 104d627da..b1e6385dc 100644 --- a/zscript/utility/swwm_utility.zsc +++ b/zscript/utility/swwm_utility.zsc @@ -1894,27 +1894,27 @@ Class SWWMUtility String tn = TexMan.GetName(checkme); // special case: alt texture names in Doom 2 In Spain Only if ( (tn ~== "MARBFAC2") || (tn ~== "SP_MAR01") ) - return true, TexMan.CheckForTexture("defaced_MARBFAC2",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_MARBFAC2"); if ( (tn ~== "MARBFAC3") || (tn ~== "SP_MAR02")) - return true, TexMan.CheckForTexture("defaced_MARBFAC3",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_MARBFAC3"); if ( (tn ~== "MARBFAC4") || (tn ~== "SP_MAR03") ) - return true, TexMan.CheckForTexture("defaced_MARBFAC4",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_MARBFAC4"); if ( (tn ~== "MARBFACE") || (tn ~== "SP_MAR04") ) - return true, TexMan.CheckForTexture("defaced_MARBFACE",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_MARBFACE"); if ( (tn ~== "ZZWOLF2") ) - return true, TexMan.CheckForTexture("defaced_ZZWOLF2",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_ZZWOLF2"); if ( (tn ~== "ZZWOLF3") ) - return true, TexMan.CheckForTexture("defaced_ZZWOLF3",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_ZZWOLF3"); if ( (tn ~== "ZZWOLF4") ) - return true, TexMan.CheckForTexture("defaced_ZZWOLF4",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_ZZWOLF4"); if ( (tn ~== "ZZWOLF6") ) - return true, TexMan.CheckForTexture("defaced_ZZWOLF6",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_ZZWOLF6"); if ( (tn ~== "ZZWOLF7") ) - return true, TexMan.CheckForTexture("defaced_ZZWOLF7",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_ZZWOLF7"); if ( (tn ~== "ZZWOLF12") ) - return true, TexMan.CheckForTexture("defaced_ZZWOLF12",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_ZZWOLF12"); if ( (tn ~== "ZZWOLF13") ) - return true, TexMan.CheckForTexture("defaced_ZZWOLF13",TexMan.Type_Any); + return true, TexMan.CheckForTexture("defaced_ZZWOLF13"); return false, checkme; } diff --git a/zscript/weapons/swwm_blazeit.zsc b/zscript/weapons/swwm_blazeit.zsc index a997a1be3..486219d07 100644 --- a/zscript/weapons/swwm_blazeit.zsc +++ b/zscript/weapons/swwm_blazeit.zsc @@ -111,10 +111,10 @@ Class Hellblazer : SWWMWeapon static const Class types[] = {"HellblazerMissiles","HellblazerCrackshots","HellblazerRavagers","HellblazerWarheads"}; if ( !LockIcon[0] ) { - LockIcon[0] = TexMan.CheckForTexture("graphics/HUD/HellblazerMissileLock.png",TexMan.Type_Any); - LockIcon[1] = TexMan.CheckForTexture("graphics/HUD/HellblazerCrackshotLock.png",TexMan.Type_Any); - LockIcon[2] = TexMan.CheckForTexture("graphics/HUD/HellblazerRavagerLock.png",TexMan.Type_Any); - LockIcon[3] = TexMan.CheckForTexture("graphics/HUD/HellblazerWarheadLock.png",TexMan.Type_Any); + LockIcon[0] = TexMan.CheckForTexture("graphics/HUD/HellblazerMissileLock.png"); + LockIcon[1] = TexMan.CheckForTexture("graphics/HUD/HellblazerCrackshotLock.png"); + LockIcon[2] = TexMan.CheckForTexture("graphics/HUD/HellblazerRavagerLock.png"); + LockIcon[3] = TexMan.CheckForTexture("graphics/HUD/HellblazerWarheadLock.png"); } int curtype = 0; for ( int i=0; i<4; i++ ) diff --git a/zscript/weapons/swwm_cbt_fx.zsc b/zscript/weapons/swwm_cbt_fx.zsc index f849ad421..bb3061fcd 100644 --- a/zscript/weapons/swwm_cbt_fx.zsc +++ b/zscript/weapons/swwm_cbt_fx.zsc @@ -535,12 +535,12 @@ Class BusterWall : Thinker // shush hs.flags |= Sector.SECF_SILENTMOVE; // filler texture - TextureID rubble = TexMan.CheckForTexture("ASHWALL2",TexMan.Type_Any); + TextureID rubble = TexMan.CheckForTexture("ASHWALL2"); // equivalents for other iwads - if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("ASHWALL",TexMan.Type_Any); - if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("LOOSERCK",TexMan.Type_Any); - if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("WASTE03",TexMan.Type_Any); - if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any); // an unfortunate fallback should none of those exist + if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("ASHWALL"); + if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("LOOSERCK"); + if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("WASTE03"); + if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("-noflat-"); // an unfortunate fallback should none of those exist // activate all shoot/use specials (not locked) associated with this sector's two-sided lines for ( int i=0; i types[] = {"RedShell","GreenShell","BlueShell","PurpleShell","BlackShell","GoldShell"}; - if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/SpreadgunDisplay.png",TexMan.Type_Any); - if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/ShellRed.png",TexMan.Type_Any); - if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/ShellGreen.png",TexMan.Type_Any); - if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/ShellBlue.png",TexMan.Type_Any); - if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/ShellPurple.png",TexMan.Type_Any); - if ( !RoundTex[4] ) RoundTex[4] = TexMan.CheckForTexture("graphics/HUD/ShellBlack.png",TexMan.Type_Any); - if ( !RoundTex[5] ) RoundTex[5] = TexMan.CheckForTexture("graphics/HUD/ShellGold.png",TexMan.Type_Any); + if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/SpreadgunDisplay.png"); + if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/ShellRed.png"); + if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/ShellGreen.png"); + if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/ShellBlue.png"); + if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/ShellPurple.png"); + if ( !RoundTex[4] ) RoundTex[4] = TexMan.CheckForTexture("graphics/HUD/ShellBlack.png"); + if ( !RoundTex[5] ) RoundTex[5] = TexMan.CheckForTexture("graphics/HUD/ShellGold.png"); Screen.DrawTexture(WeaponBox,false,bx-13,by-8,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); if ( !chambered ) return; for ( int i=0; i<6; i++ ) @@ -86,12 +86,12 @@ extend Class Wallbuster override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { static const Class types[] = {"RedShell","GreenShell","BlueShell","PurpleShell"}; - if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/WallbusterDisplay.png",TexMan.Type_Any); - if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/ShellRedSmall.png",TexMan.Type_Any); - if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/ShellGreenSmall.png",TexMan.Type_Any); - if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/ShellBlueSmall.png",TexMan.Type_Any); - if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/ShellPurpleSmall.png",TexMan.Type_Any); - if ( !CursorTex ) CursorTex = TexMan.CheckForTexture("graphics/HUD/WallbusterCursor.png",TexMan.Type_Any); + if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/WallbusterDisplay.png"); + if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/ShellRedSmall.png"); + if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/ShellGreenSmall.png"); + if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/ShellBlueSmall.png"); + if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/ShellPurpleSmall.png"); + if ( !CursorTex ) CursorTex = TexMan.CheckForTexture("graphics/HUD/WallbusterCursor.png"); Screen.DrawTexture(WeaponBox,false,bx-12,by-75,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); int curpos = 73-(rotation[5]*15+rotation[rotation[5]]*2); Screen.DrawTexture(CursorTex,false,bx-10,by-curpos,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); @@ -116,10 +116,10 @@ extend Class Eviscerator override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { - if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/EvisceratorDisplay.png",TexMan.Type_Any); - if ( !RoundTex ) RoundTex = TexMan.CheckForTexture("graphics/HUD/EvisceratorRound.png",TexMan.Type_Any); - if ( !SpreadIcon[0] ) SpreadIcon[0] = TexMan.CheckForTexture("graphics/HUD/EvisceratorWide.png",TexMan.Type_Any); - if ( !SpreadIcon[1] ) SpreadIcon[1] = TexMan.CheckForTexture("graphics/HUD/EvisceratorTight.png",TexMan.Type_Any); + if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/EvisceratorDisplay.png"); + if ( !RoundTex ) RoundTex = TexMan.CheckForTexture("graphics/HUD/EvisceratorRound.png"); + if ( !SpreadIcon[0] ) SpreadIcon[0] = TexMan.CheckForTexture("graphics/HUD/EvisceratorWide.png"); + if ( !SpreadIcon[1] ) SpreadIcon[1] = TexMan.CheckForTexture("graphics/HUD/EvisceratorTight.png"); Screen.DrawTexture(WeaponBox,false,bx-10,by-20,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); Screen.DrawTexture(RoundTex,false,bx-8,by-8,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,chambered?Color(0,0,0,0):Color(128,0,0,0)); Screen.DrawTexture(SpreadIcon[extended],false,bx-8,by-18,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); @@ -134,11 +134,11 @@ extend Class Hellblazer override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { static const Class types[] = {"HellblazerMissiles","HellblazerCrackshots","HellblazerRavagers","HellblazerWarheads"}; - if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/HellblazerDisplay.png",TexMan.Type_Any); - if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/HellblazerMissile.png",TexMan.Type_Any); - if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/HellblazerCrackshot.png",TexMan.Type_Any); - if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/HellblazerRavager.png",TexMan.Type_Any); - if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/HellblazerWarhead.png",TexMan.Type_Any); + if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/HellblazerDisplay.png"); + if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/HellblazerMissile.png"); + if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/HellblazerCrackshot.png"); + if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/HellblazerRavager.png"); + if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/HellblazerWarhead.png"); Screen.DrawTexture(WeaponBox,false,bx-13,by-29,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); int curtype = 0; for ( int i=0; i<4; i++ ) @@ -192,9 +192,9 @@ extend Class Sparkster override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { - if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/BiosparkDisplay.png",TexMan.Type_Any); - if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/BiosparkShot.png",TexMan.Type_Any); - if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/BiosparkRed.png",TexMan.Type_Any); + if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/BiosparkDisplay.png"); + if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/BiosparkShot.png"); + if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/BiosparkRed.png"); bool blinking = (failtime>gametic)&&((failtime-gametic)%16>=8); if ( doublestacc ) { @@ -242,13 +242,13 @@ extend Class SilverBullet override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { - if ( !WeaponBox[0] ) WeaponBox[0] = TexMan.CheckForTexture("graphics/HUD/SilverBulletDisplay.png",TexMan.Type_Any); - if ( !WeaponBox[1] ) WeaponBox[1] = TexMan.CheckForTexture("graphics/HUD/SilverBulletZoomDisplay.png",TexMan.Type_Any); - if ( !ZoomBar ) ZoomBar = TexMan.CheckForTexture("graphics/HUD/SilverBulletZoomBar.png",TexMan.Type_Any); - if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/SilverBulletXSB.png",TexMan.Type_Any); - if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/SilverBulletFCB.png",TexMan.Type_Any); - if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/SilverBulletXSBCasing.png",TexMan.Type_Any); - if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/SilverBulletFCBCasing.png",TexMan.Type_Any); + if ( !WeaponBox[0] ) WeaponBox[0] = TexMan.CheckForTexture("graphics/HUD/SilverBulletDisplay.png"); + if ( !WeaponBox[1] ) WeaponBox[1] = TexMan.CheckForTexture("graphics/HUD/SilverBulletZoomDisplay.png"); + if ( !ZoomBar ) ZoomBar = TexMan.CheckForTexture("graphics/HUD/SilverBulletZoomBar.png"); + if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/SilverBulletXSB.png"); + if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/SilverBulletFCB.png"); + if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/SilverBulletXSBCasing.png"); + if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/SilverBulletFCBCasing.png"); double zl = clamp(ZoomInter?ZoomInter.GetValue(TicFrac):(zoomlevel*10),0.,160.); if ( zl >= 10. ) { @@ -271,8 +271,8 @@ extend Class CandyGun override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { - if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/ExplodiumDisplay.png",TexMan.Type_Any); - if ( !RoundTex ) RoundTex = TexMan.CheckForTexture("graphics/HUD/CandyRound.png",TexMan.Type_Any); + if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/ExplodiumDisplay.png"); + if ( !RoundTex ) RoundTex = TexMan.CheckForTexture("graphics/HUD/CandyRound.png"); Screen.DrawTexture(WeaponBox,false,bx-10,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); if ( chambered ) Screen.DrawTexture(RoundTex,false,bx-8,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); for ( int i=0; i