diff --git a/FuturePlans.md b/FuturePlans.md
index 7d1231369..2d3e913dc 100644
--- a/FuturePlans.md
+++ b/FuturePlans.md
@@ -63,7 +63,7 @@ Re-animation of old FK models. Plus extra score incentives and achievements.
- Pachinko Code *(Find the Secret Menu)*
- Double Succ *(Merge two Ynykron singularities)*
- The Ultimate Combo *(Hit a Ynykron singularity with a Ynykron beam)*
- - Author Appeal *(Smooch a boss brain)*
+ - Yukkuri Love *(Smooch a boss brain)*
- Power of Love *(Recover a total of 500 health by kissing the Kirin Plush)*
- Arsenal of Olden Times *(Find all classic UnSX weapons)*
*(Quadravol, Biospark Carbine, Sparkster Rifle, Ray-Khom, Mortal Rifle, Ynykron, Rafan-Kos and K79-D)*
@@ -72,7 +72,7 @@ Re-animation of old FK models. Plus extra score incentives and achievements.
- Assortment of Thingamajigs *(Find all items)*
- Words Words Words *(Read 100 library entries)*
- Oops I Pressed It *(Turn the engine off)*
- - Dangerous Ball Action *(Knock yourself out with your own lead ball)*
+ - Dangerous Ball Action *(Land a lead ball crit on yourself)*
- Total Ball Destruction *(Kill the Icon of Sin with a lead ball)*
- Say The Line Vinny *(Spin attack with the Itamex Hammer for 60 seconds)*
- Whateverbuster *(Use the Wallbuster shuffle function 100 times)*
diff --git a/language.version b/language.version
index a808482eb..6b2273f90 100644
--- a/language.version
+++ b/language.version
@@ -1,3 +1,3 @@
[default]
-SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r68 \cu(Thu 19 May 19:33:01 CEST 2022)\c-";
-SWWM_SHORTVER="\cw1.3pre r68 \cu(2022-05-19 19:33:01)\c-";
+SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r69 \cu(Fri 20 May 13:11:58 CEST 2022)\c-";
+SWWM_SHORTVER="\cw1.3pre r69 \cu(2022-05-20 13:11:58)\c-";
diff --git a/maps/TITLEMAP.wad b/maps/TITLEMAP.wad
index a808c287e..0add6fe78 100644
Binary files a/maps/TITLEMAP.wad and b/maps/TITLEMAP.wad differ
diff --git a/zscript/menu/swwm_title.zsc b/zscript/menu/swwm_title.zsc
index 7f96ba724..518979b00 100644
--- a/zscript/menu/swwm_title.zsc
+++ b/zscript/menu/swwm_title.zsc
@@ -12,6 +12,7 @@ Struct TitleExplosion
Class SWWMTitleStuff : EventHandler
{
+ ui bool bInitialized;
ui TextureID tex[6];
ui TextureID letters[13];
ui TextureID camtex; // must be drawn for shaders to actually use it
@@ -23,10 +24,11 @@ Class SWWMTitleStuff : EventHandler
ui bool lastlogo;
ui TitleExplosion smk[64];
ui TextureID smk_frame[19];
- int titletimer;
+ ui int titletimer;
+ int playtimer; // required for the logo fader
ui int rss;
ui int stopinit_t;
- bool bFadeIn;
+ ui bool bFadeIn;
ui Font mSmallFont, mBigFont;
private ui int GetUIRandom()
@@ -68,8 +70,46 @@ Class SWWMTitleStuff : EventHandler
}
}
- override void WorldTick()
+ override void WorldLoaded( WorldEvent e )
{
+ let f = LogoFader(Actor.Spawn("LogoFader"));
+ f.hnd = self;
+ TexMan.SetCameraToTexture(f,"LOGOFADE",90);
+ // fallback in case netevents fail (old gzdoom)
+ playtimer = -65536;
+ }
+
+ // synchronize ui->play timer
+ override void NetworkProcess( ConsoleEvent e )
+ {
+ if ( e.Name == "swwmtitle.timer" )
+ playtimer = e.Args[0];
+ }
+
+ override void UiTick()
+ {
+ // you're not supposed to be here
+ if ( gamestate == GS_LEVEL )
+ ThrowAbortException("Attempted to warp into TITLEMAP");
+ if ( !bInitialized )
+ {
+ bInitialized = true;
+ titletimer = -300;
+ // birthday event
+ if ( SystemTime.Format("%d%m",SystemTime.Now()) == "2001" )
+ titletimer = -500;
+ let shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler"));
+ if ( shnd )
+ {
+ if ( shnd.titlefirst )
+ {
+ titletimer = GameTicRate*22; // skip to logo
+ S_ChangeMusic("music/TRAUMATI.XM",1); // skip to order 1
+ bFadeIn = true;
+ }
+ shnd.titlefirst = true;
+ }
+ }
if ( titletimer == -250 )
{
if ( gameinfo.gametype&GAME_Hexen ) S_ChangeMusic("HEXEN");
@@ -83,54 +123,17 @@ Class SWWMTitleStuff : EventHandler
}
}
if ( titletimer == -75 ) S_ChangeMusic("");
- if ( titletimer == 0 ) S_ChangeMusic("music/TRAUMATI.XM");
- titletimer++;
- if ( menuactive && (titletimer < -80) && (titletimer >= -300) ) titletimer = -80;
- }
-
- override void WorldLoaded( WorldEvent e )
- {
- let f = LogoFader(Actor.Spawn("LogoFader"));
- f.hnd = self;
- TexMan.SetCameraToTexture(f,"LOGOFADE",90);
- titletimer = -300;
- let shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler"));
- if ( !shnd ) return;
- if ( shnd.titlefirst )
- {
- titletimer = GameTicRate*22; // skip to logo
- S_ChangeMusic("music/TRAUMATI.XM",1); // skip to order 1
- bFadeIn = true;
- }
- shnd.titlefirst = true;
- }
-
- // GROSS HACK, GROSS HACK
- static ui bool IsBirthday()
- {
- return (SystemTime.Format("%d%m",SystemTime.Now()) == "2001");
- }
- static play void SetBirthday()
- {
- let hnd = SWWMTitleStuff(EventHandler.Find("SWWMTitleStuff"));
- hnd.titletimer = -500;
- }
-
- override void UiTick()
- {
if ( (titletimer > -80) && (titletimer < -20) ) TickExplosions();
+ if ( titletimer == 0 ) S_ChangeMusic("music/TRAUMATI.XM");
if ( !swwm_oldlogo )
{
// title lettering
if ( ((double(titletimer)/GameTicRate) >= 23.) && ((double(titletimer)/GameTicRate) <= 25.4) && !(titletimer%5) )
S_StartSound("title/thump",CHAN_WEAPON,CHANF_UI|CHANF_OVERLAP,1.,ATTN_NONE);
}
- if ( gamestate != GS_LEVEL ) return;
- // you're not supposed to be here
- Menu.SetMenu('EndGameMenu');
- let m = MessageBoxMenu(Menu.GetCurrentMenu());
- if ( m ) m.HandleResult(true);
- // special thanks to marrub for this absolute crime
+ titletimer++;
+ EventHandler.SendNetworkEvent("swwmtitle.timer",titletimer);
+ if ( menuactive && (titletimer < -80) && (titletimer >= -300) ) titletimer = -80;
}
private ui void RenderExplosions()
@@ -431,8 +434,16 @@ Class LogoFader : Actor
}
override void Tick()
{
- double alf1 = clamp(((double(hnd.titletimer)/GameTicRate)-26.5)*.5,0.,1.);
- double alf2 = (hnd.titletimer>28*GameTicRate)?clamp((double((hnd.titletimer-GameTicRate*3)%(GameTicRate*5))/GameTicRate),0.,1.):0.;
+ // old gzdoom fallback
+ // won't look as nice, but it's better than nothing
+ if ( hnd.playtimer == -65536 )
+ {
+ double alf = clamp(double((gametic-GameTicRate*3)%(GameTicRate*5))/GameTicRate,0.,1.);
+ base.SetShade(Color(255,int(255*alf),0));
+ return;
+ }
+ double alf1 = clamp(((double(hnd.playtimer)/GameTicRate)-26.5)*.5,0.,1.);
+ double alf2 = (hnd.playtimer>28*GameTicRate)?clamp((double((hnd.playtimer-GameTicRate*3)%(GameTicRate*5))/GameTicRate),0.,1.):0.;
base.SetShade(Color(int(255*alf1),int(255*alf2),0));
}
}
diff --git a/zscript/swwm_statichandler.zsc b/zscript/swwm_statichandler.zsc
index 001d27557..db5cb4b2a 100644
--- a/zscript/swwm_statichandler.zsc
+++ b/zscript/swwm_statichandler.zsc
@@ -19,7 +19,7 @@ Class SWWMStaticHandler : StaticEventHandler
bool unloading;
ui Dictionary menustate; // used by Demolitionist Menu to restore old menu positions
// title stuff
- bool titlefirst;
+ ui bool titlefirst;
// warnings
bool mpwarned;
// checks
@@ -69,7 +69,6 @@ Class SWWMStaticHandler : StaticEventHandler
override void WorldLoaded( WorldEvent e )
{
- if ( gamestate != GS_TITLELEVEL ) titlefirst = true; // we skip it
unloading = false;
maptime = 0;
if ( e.IsSavegame || e.IsReopen )
@@ -311,6 +310,7 @@ Class SWWMStaticHandler : StaticEventHandler
override void PostUiTick()
{
+ if ( gamestate != GS_TITLELEVEL ) titlefirst = true; // we skip it
if ( !aprcheck && (gamestate == GS_LEVEL) )
{
aprfnt = Font.GetFont("TewiFontOutline");