Rewrite title stuff without using exploits.
This commit is contained in:
parent
94c6a47163
commit
7fb314745c
5 changed files with 63 additions and 52 deletions
|
|
@ -63,7 +63,7 @@ Re-animation of old FK models. Plus extra score incentives and achievements.
|
||||||
- Pachinko Code *(Find the Secret Menu)*
|
- Pachinko Code *(Find the Secret Menu)*
|
||||||
- Double Succ *(Merge two Ynykron singularities)*
|
- Double Succ *(Merge two Ynykron singularities)*
|
||||||
- The Ultimate Combo *(Hit a Ynykron singularity with a Ynykron beam)*
|
- 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)*
|
- Power of Love *(Recover a total of 500 health by kissing the Kirin Plush)*
|
||||||
- Arsenal of Olden Times *(Find all classic UnSX weapons)*<br/>
|
- Arsenal of Olden Times *(Find all classic UnSX weapons)*<br/>
|
||||||
*(Quadravol, Biospark Carbine, Sparkster Rifle, Ray-Khom, Mortal Rifle, Ynykron, Rafan-Kos and K79-D)*<br/>
|
*(Quadravol, Biospark Carbine, Sparkster Rifle, Ray-Khom, Mortal Rifle, Ynykron, Rafan-Kos and K79-D)*<br/>
|
||||||
|
|
@ -72,7 +72,7 @@ Re-animation of old FK models. Plus extra score incentives and achievements.
|
||||||
- Assortment of Thingamajigs *(Find all items)*
|
- Assortment of Thingamajigs *(Find all items)*
|
||||||
- Words Words Words *(Read 100 library entries)*
|
- Words Words Words *(Read 100 library entries)*
|
||||||
- Oops I Pressed It *(Turn the engine off)*
|
- 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)*
|
- 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)*
|
- Say The Line Vinny *(Spin attack with the Itamex Hammer for 60 seconds)*
|
||||||
- Whateverbuster *(Use the Wallbuster shuffle function 100 times)*
|
- Whateverbuster *(Use the Wallbuster shuffle function 100 times)*
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
[default]
|
[default]
|
||||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r68 \cu(Thu 19 May 19:33:01 CEST 2022)\c-";
|
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r69 \cu(Fri 20 May 13:11:58 CEST 2022)\c-";
|
||||||
SWWM_SHORTVER="\cw1.3pre r68 \cu(2022-05-19 19:33:01)\c-";
|
SWWM_SHORTVER="\cw1.3pre r69 \cu(2022-05-20 13:11:58)\c-";
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -12,6 +12,7 @@ Struct TitleExplosion
|
||||||
|
|
||||||
Class SWWMTitleStuff : EventHandler
|
Class SWWMTitleStuff : EventHandler
|
||||||
{
|
{
|
||||||
|
ui bool bInitialized;
|
||||||
ui TextureID tex[6];
|
ui TextureID tex[6];
|
||||||
ui TextureID letters[13];
|
ui TextureID letters[13];
|
||||||
ui TextureID camtex; // must be drawn for shaders to actually use it
|
ui TextureID camtex; // must be drawn for shaders to actually use it
|
||||||
|
|
@ -23,10 +24,11 @@ Class SWWMTitleStuff : EventHandler
|
||||||
ui bool lastlogo;
|
ui bool lastlogo;
|
||||||
ui TitleExplosion smk[64];
|
ui TitleExplosion smk[64];
|
||||||
ui TextureID smk_frame[19];
|
ui TextureID smk_frame[19];
|
||||||
int titletimer;
|
ui int titletimer;
|
||||||
|
int playtimer; // required for the logo fader
|
||||||
ui int rss;
|
ui int rss;
|
||||||
ui int stopinit_t;
|
ui int stopinit_t;
|
||||||
bool bFadeIn;
|
ui bool bFadeIn;
|
||||||
ui Font mSmallFont, mBigFont;
|
ui Font mSmallFont, mBigFont;
|
||||||
|
|
||||||
private ui int GetUIRandom()
|
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 ( titletimer == -250 )
|
||||||
{
|
{
|
||||||
if ( gameinfo.gametype&GAME_Hexen ) S_ChangeMusic("HEXEN");
|
if ( gameinfo.gametype&GAME_Hexen ) S_ChangeMusic("HEXEN");
|
||||||
|
|
@ -83,54 +123,17 @@ Class SWWMTitleStuff : EventHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( titletimer == -75 ) S_ChangeMusic("");
|
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 > -80) && (titletimer < -20) ) TickExplosions();
|
||||||
|
if ( titletimer == 0 ) S_ChangeMusic("music/TRAUMATI.XM");
|
||||||
if ( !swwm_oldlogo )
|
if ( !swwm_oldlogo )
|
||||||
{
|
{
|
||||||
// title lettering
|
// title lettering
|
||||||
if ( ((double(titletimer)/GameTicRate) >= 23.) && ((double(titletimer)/GameTicRate) <= 25.4) && !(titletimer%5) )
|
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);
|
S_StartSound("title/thump",CHAN_WEAPON,CHANF_UI|CHANF_OVERLAP,1.,ATTN_NONE);
|
||||||
}
|
}
|
||||||
if ( gamestate != GS_LEVEL ) return;
|
titletimer++;
|
||||||
// you're not supposed to be here
|
EventHandler.SendNetworkEvent("swwmtitle.timer",titletimer);
|
||||||
Menu.SetMenu('EndGameMenu');
|
if ( menuactive && (titletimer < -80) && (titletimer >= -300) ) titletimer = -80;
|
||||||
let m = MessageBoxMenu(Menu.GetCurrentMenu());
|
|
||||||
if ( m ) m.HandleResult(true);
|
|
||||||
// special thanks to marrub for this absolute crime
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ui void RenderExplosions()
|
private ui void RenderExplosions()
|
||||||
|
|
@ -431,8 +434,16 @@ Class LogoFader : Actor
|
||||||
}
|
}
|
||||||
override void Tick()
|
override void Tick()
|
||||||
{
|
{
|
||||||
double alf1 = clamp(((double(hnd.titletimer)/GameTicRate)-26.5)*.5,0.,1.);
|
// old gzdoom fallback
|
||||||
double alf2 = (hnd.titletimer>28*GameTicRate)?clamp((double((hnd.titletimer-GameTicRate*3)%(GameTicRate*5))/GameTicRate),0.,1.):0.;
|
// 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));
|
base.SetShade(Color(int(255*alf1),int(255*alf2),0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ Class SWWMStaticHandler : StaticEventHandler
|
||||||
bool unloading;
|
bool unloading;
|
||||||
ui Dictionary menustate; // used by Demolitionist Menu to restore old menu positions
|
ui Dictionary menustate; // used by Demolitionist Menu to restore old menu positions
|
||||||
// title stuff
|
// title stuff
|
||||||
bool titlefirst;
|
ui bool titlefirst;
|
||||||
// warnings
|
// warnings
|
||||||
bool mpwarned;
|
bool mpwarned;
|
||||||
// checks
|
// checks
|
||||||
|
|
@ -69,7 +69,6 @@ Class SWWMStaticHandler : StaticEventHandler
|
||||||
|
|
||||||
override void WorldLoaded( WorldEvent e )
|
override void WorldLoaded( WorldEvent e )
|
||||||
{
|
{
|
||||||
if ( gamestate != GS_TITLELEVEL ) titlefirst = true; // we skip it
|
|
||||||
unloading = false;
|
unloading = false;
|
||||||
maptime = 0;
|
maptime = 0;
|
||||||
if ( e.IsSavegame || e.IsReopen )
|
if ( e.IsSavegame || e.IsReopen )
|
||||||
|
|
@ -311,6 +310,7 @@ Class SWWMStaticHandler : StaticEventHandler
|
||||||
|
|
||||||
override void PostUiTick()
|
override void PostUiTick()
|
||||||
{
|
{
|
||||||
|
if ( gamestate != GS_TITLELEVEL ) titlefirst = true; // we skip it
|
||||||
if ( !aprcheck && (gamestate == GS_LEVEL) )
|
if ( !aprcheck && (gamestate == GS_LEVEL) )
|
||||||
{
|
{
|
||||||
aprfnt = Font.GetFont("TewiFontOutline");
|
aprfnt = Font.GetFont("TewiFontOutline");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue