Title sequence has more "oomph" added.
This commit is contained in:
parent
505fbd2808
commit
56dca15b52
15 changed files with 162 additions and 34 deletions
|
|
@ -92,6 +92,12 @@ A couple extra weapons, not enough for a full batch, but still worthy additions.
|
||||||
- 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)*
|
||||||
- Froggy Gang *(Summon the Froggy Chair)*
|
- Froggy Gang *(Summon the Froggy Chair)*
|
||||||
- Ribbit *(Kill 10 enemies with the Froggy Chair)*
|
- Ribbit *(Kill 10 enemies with the Froggy Chair)*
|
||||||
|
- Arsenal of Olden Times *(Find all classic UnSX weapons)*
|
||||||
|
*(Quadravol, Biospark Carbine, Sparkster Rifle, Ray-Khom, Mortal Rifle, Ynykron and Rafan-Kos)*
|
||||||
|
- Know Thy Armaments *(Find all weapons)*
|
||||||
|
- Assortment of Thingamajigs *(Find all items)*
|
||||||
|
- Words Words Words *(Read all library entries)*
|
||||||
|
- Oops I Pressed it *(Turn the engine off)*
|
||||||
|
|
||||||
## 1.5 update *(The Final Stage)*:
|
## 1.5 update *(The Final Stage)*:
|
||||||
|
|
||||||
|
|
@ -132,7 +138,7 @@ Add-ons and other related stuff.
|
||||||
|
|
||||||
* **Monster/decoration replacements add-on:**
|
* **Monster/decoration replacements add-on:**
|
||||||
- Potentially standalone, usable with other mods
|
- Potentially standalone, usable with other mods
|
||||||
- Balanced for this mod
|
- Balanced for this mod, as well as the side mods
|
||||||
- Unique bosses
|
- Unique bosses
|
||||||
- Some extra enemy variants
|
- Some extra enemy variants
|
||||||
- Coverage for all supported WADs *(oof)*
|
- Coverage for all supported WADs *(oof)*
|
||||||
|
|
@ -158,4 +164,4 @@ Add-ons and other related stuff.
|
||||||
- Retell the events of UnSX 2 *(but with the Demolitionist's participation)*
|
- Retell the events of UnSX 2 *(but with the Demolitionist's participation)*
|
||||||
- Basically give SWWM GZ its own IWAD as a standalone game
|
- Basically give SWWM GZ its own IWAD as a standalone game
|
||||||
- Some new weapons, some renovations
|
- Some new weapons, some renovations
|
||||||
- Lots of world exploration, more lore
|
- Lots of world exploration, more lore
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,10 @@ HardwareShader Texture "graphics/M_SWWM.png"
|
||||||
Texture "Layer6" "graphics/M_SWWM_Layer6.png"
|
Texture "Layer6" "graphics/M_SWWM_Layer6.png"
|
||||||
Define "NO_BILINEAR"
|
Define "NO_BILINEAR"
|
||||||
}
|
}
|
||||||
|
HardwareShader Texture "graphics/UnSXLogo.png"
|
||||||
|
{
|
||||||
|
Shader "shaders/glsl/Bilinear.fp"
|
||||||
|
}
|
||||||
HardwareShader Sprite "MBRNB0"
|
HardwareShader Sprite "MBRNB0"
|
||||||
{
|
{
|
||||||
Shader "shaders/glsl/Whew.fp"
|
Shader "shaders/glsl/Whew.fp"
|
||||||
|
|
|
||||||
|
|
@ -539,7 +539,7 @@ O_RAYKHOM2 = "%o witnessed %k's UNLIMITED POWER.";
|
||||||
O_GRANDLANCE = "%o was torn asunder by %k's Grand Lance.";
|
O_GRANDLANCE = "%o was torn asunder by %k's Grand Lance.";
|
||||||
O_GRANDLANCE2 = "%k showed %o how efficient nuclear fusion is.";
|
O_GRANDLANCE2 = "%k showed %o how efficient nuclear fusion is.";
|
||||||
O_FISTGUN = "%o ate %k's divine knuckle sandwich.";
|
O_FISTGUN = "%o ate %k's divine knuckle sandwich.";
|
||||||
O_FISTGUN2 = "%k delivered a divine bitchslap upon %o.";
|
O_FISTGUN2 = "%k delivered a divine smackdown upon %o.";
|
||||||
O_NEWSPARKSTER = "%o witnessed the might of %k's plasma artillery.";
|
O_NEWSPARKSTER = "%o witnessed the might of %k's plasma artillery.";
|
||||||
O_MORTALRIFLE = "%k killed %o very dead.";
|
O_MORTALRIFLE = "%k killed %o very dead.";
|
||||||
O_MORTALRIFLEALT = "%o caught a very deadly grenade from %k.";
|
O_MORTALRIFLEALT = "%o caught a very deadly grenade from %k.";
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
[default]
|
[default]
|
||||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r103 \cu(Sat 1 Jan 17:33:39 CET 2022)\c-";
|
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r104 \cu(Wed 5 Jan 20:42:03 CET 2022)\c-";
|
||||||
SWWM_SHORTVER="\cw1.2pre r103 \cu(2022-01-01 17:33:39)\c-";
|
SWWM_SHORTVER="\cw1.2pre r104 \cu(2022-01-05 20:42:03)\c-";
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,12 @@ squeak sounds/SQUEAK.ogg
|
||||||
recordscratch sounds/RECSCRAP.ogg
|
recordscratch sounds/RECSCRAP.ogg
|
||||||
compat/warn sounds/UTWARN.ogg
|
compat/warn sounds/UTWARN.ogg
|
||||||
hahaha/hahaha sounds/HAHAHA.ogg
|
hahaha/hahaha sounds/HAHAHA.ogg
|
||||||
|
title/explo1 sounds/OUCHEX1.ogg
|
||||||
|
title/explo2 sounds/OUCHEX2.ogg
|
||||||
|
title/explo3 sounds/OUCHEX3.ogg
|
||||||
|
title/explo4 sounds/OUCHEX4.ogg
|
||||||
|
$random title/explo { title/explo1 title/explo2 title/explo3 title/explo4 }
|
||||||
|
$limit title/explo 64
|
||||||
|
|
||||||
saya/giggle1 sounds/saya/saya_giggle1.ogg
|
saya/giggle1 sounds/saya/saya_giggle1.ogg
|
||||||
saya/giggle2 sounds/saya/saya_giggle2.ogg
|
saya/giggle2 sounds/saya/saya_giggle2.ogg
|
||||||
|
|
|
||||||
BIN
sounds/OUCHEX1.ogg
Normal file
BIN
sounds/OUCHEX1.ogg
Normal file
Binary file not shown.
BIN
sounds/OUCHEX2.ogg
Normal file
BIN
sounds/OUCHEX2.ogg
Normal file
Binary file not shown.
BIN
sounds/OUCHEX3.ogg
Normal file
BIN
sounds/OUCHEX3.ogg
Normal file
Binary file not shown.
BIN
sounds/OUCHEX4.ogg
Normal file
BIN
sounds/OUCHEX4.ogg
Normal file
Binary file not shown.
|
|
@ -155,9 +155,6 @@ version "4.7.1"
|
||||||
#include "zscript/dlc2/swwm_ultimate.zsc"
|
#include "zscript/dlc2/swwm_ultimate.zsc"
|
||||||
#include "zscript/dlc2/swwm_ultimate_fx.zsc"
|
#include "zscript/dlc2/swwm_ultimate_fx.zsc"
|
||||||
// DLC3 - Game Set
|
// DLC3 - Game Set
|
||||||
#include "zscript/dlc3/swwm_tetris.zsc"
|
|
||||||
#include "zscript/dlc3/swwm_pong.zsc"
|
|
||||||
#include "zscript/dlc3/swwm_snake.zsc"
|
|
||||||
#include "zscript/dlc3/swwm_demoland.zsc"
|
#include "zscript/dlc3/swwm_demoland.zsc"
|
||||||
#include "zscript/dlc3/swwm_demoshmup.zsc"
|
#include "zscript/dlc3/swwm_demoshmup.zsc"
|
||||||
#include "zscript/dlc3/swwm_demoquest.zsc"
|
#include "zscript/dlc3/swwm_demoquest.zsc"
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
// TODO Pong game code
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
// TODO Snake game code
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
// TODO Tetris game code
|
|
||||||
|
|
@ -1,20 +1,103 @@
|
||||||
// Things for the titlemap
|
// Things for the titlemap
|
||||||
|
|
||||||
|
Struct TitleExplosion
|
||||||
|
{
|
||||||
|
bool bInit;
|
||||||
|
int frame;
|
||||||
|
Vector2 pos;
|
||||||
|
double scale;
|
||||||
|
bool flipx, flipy;
|
||||||
|
double angle;
|
||||||
|
}
|
||||||
|
|
||||||
Class SWWMTitleStuff : EventHandler
|
Class SWWMTitleStuff : EventHandler
|
||||||
{
|
{
|
||||||
transient ui TextureID tex[3];
|
ui TextureID tex[4];
|
||||||
transient ui Array<String> scrolls;
|
ui Array<String> scrolls;
|
||||||
transient ui int sline;
|
ui int sline;
|
||||||
transient ui double sbase;
|
ui double sbase;
|
||||||
transient ui String lastlang;
|
ui String lastlang;
|
||||||
|
ui TitleExplosion smk[64];
|
||||||
|
ui TextureID smk_frame[19];
|
||||||
|
int titletimer;
|
||||||
|
ui int rss;
|
||||||
|
ui int stopinit_t;
|
||||||
|
|
||||||
|
private ui int GetUIRandom()
|
||||||
|
{
|
||||||
|
return (rss = (rss<<1)*35447+(rss/87));
|
||||||
|
}
|
||||||
|
|
||||||
|
private ui double RandomShiver()
|
||||||
|
{
|
||||||
|
int sd = GetUIRandom();
|
||||||
|
return ((abs(sd)%11)-5)*.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ui void TickExplosions()
|
||||||
|
{
|
||||||
|
if ( stopinit_t > 0 ) stopinit_t--;
|
||||||
|
bool stopinit = (stopinit_t>0);
|
||||||
|
for ( int i=0; i<64; i++ )
|
||||||
|
{
|
||||||
|
if ( (!smk[i].bInit && !stopinit) || (smk[i].frame > 18) )
|
||||||
|
{
|
||||||
|
smk[i].frame = Random[UIStuff](smk[i].bInit?-20:-4,0);
|
||||||
|
smk[i].pos = (FRandom[UIStuff](0.,1.),FRandom[UIStuff](0.,1.));
|
||||||
|
smk[i].scale = FRandom[UIStuff](3.,6.);
|
||||||
|
smk[i].angle = FRandom[UIStuff](0.,360.);
|
||||||
|
smk[i].flipx = Random[UIStuff](0,1);
|
||||||
|
smk[i].flipy = Random[UIStuff](0,1);
|
||||||
|
if ( !smk[i].bInit )
|
||||||
|
{
|
||||||
|
smk[i].bInit = true;
|
||||||
|
stopinit = true;
|
||||||
|
stopinit_t = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( !smk[i].bInit ) continue;
|
||||||
|
if ( (smk[i].frame == 0) && (titletimer < -20 ) )
|
||||||
|
S_StartSound("title/explo",CHAN_WEAPON,CHANF_UI|CHANF_OVERLAP,1.,ATTN_NONE,FRandom[UIStuff](.95,1.05));
|
||||||
|
smk[i].frame++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override void WorldTick()
|
override void WorldTick()
|
||||||
{
|
{
|
||||||
if ( level.maptime == 1 ) S_ChangeMusic("music/TRAUMATI.XM");
|
if ( titletimer == -250 )
|
||||||
|
{
|
||||||
|
if ( gameinfo.gametype&GAME_Hexen ) S_ChangeMusic("HEXEN");
|
||||||
|
else if ( gameinfo.gametype&GAME_Heretic ) S_ChangeMusic("MUS_TITL");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// check if the doom 1 music exists
|
||||||
|
if ( Wads.FindLump("D_INTRO",ns:wads.ns_music) != -1 )
|
||||||
|
S_ChangeMusic("D_INTRO");
|
||||||
|
else S_ChangeMusic("D_DM2TTL");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( titletimer == -75 ) S_ChangeMusic("");
|
||||||
|
if ( titletimer == 0 ) S_ChangeMusic("music/TRAUMATI.XM");
|
||||||
|
titletimer++;
|
||||||
|
if ( menuactive && (titletimer < -80) ) titletimer = -80;
|
||||||
|
}
|
||||||
|
|
||||||
|
override void WorldLoaded( WorldEvent e )
|
||||||
|
{
|
||||||
|
titletimer = -300;
|
||||||
|
let shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler"));
|
||||||
|
if ( !shnd ) return;
|
||||||
|
if ( shnd.titlefirst )
|
||||||
|
{
|
||||||
|
titletimer = GameTicRate*26; // skip to logo
|
||||||
|
S_ChangeMusic("music/TRAUMATI.XM",2); // skip to order 2
|
||||||
|
}
|
||||||
|
shnd.titlefirst = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
override void UiTick()
|
override void UiTick()
|
||||||
{
|
{
|
||||||
|
if ( (titletimer > -80) && (titletimer < -20) ) TickExplosions();
|
||||||
if ( gamestate != GS_LEVEL ) return;
|
if ( gamestate != GS_LEVEL ) return;
|
||||||
// you're not supposed to be here
|
// you're not supposed to be here
|
||||||
Menu.SetMenu('EndGameMenu');
|
Menu.SetMenu('EndGameMenu');
|
||||||
|
|
@ -23,19 +106,51 @@ Class SWWMTitleStuff : EventHandler
|
||||||
// special thanks to marrub for this absolute crime
|
// special thanks to marrub for this absolute crime
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ui void RenderExplosions()
|
||||||
|
{
|
||||||
|
for ( int i=0; i<64; i++ )
|
||||||
|
{
|
||||||
|
int frm = smk[i].frame;
|
||||||
|
if ( (frm < 0) || (frm > 18) ) continue;
|
||||||
|
if ( !smk_frame[frm] ) smk_frame[frm] = TexMan.CheckForTexture(String.Format("XEX0%c0",0x41+frm),TexMan.Type_Sprite);
|
||||||
|
Vector2 vpos;
|
||||||
|
vpos.x = smk[i].pos.x*Screen.GetWidth();
|
||||||
|
vpos.y = smk[i].pos.y*Screen.GetHeight();
|
||||||
|
Screen.DrawTexture(smk_frame[frm],false,vpos.x,vpos.y,DTA_ScaleX,smk[i].scale*CleanXFac,DTA_ScaleY,smk[i].scale*CleanYFac,DTA_FlipX,smk[i].flipx,DTA_FlipY,smk[i].flipy,DTA_Rotate,smk[i].angle,DTA_LegacyRenderStyle,STYLE_Add);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override void RenderUnderlay( RenderEvent e )
|
override void RenderUnderlay( RenderEvent e )
|
||||||
{
|
{
|
||||||
if ( !tex[0] ) tex[0] = TexMan.CheckForTexture("graphics/UnSXLogo.png",TexMan.Type_Any);
|
if ( !tex[0] ) tex[0] = TexMan.CheckForTexture("graphics/UnSXLogo.png",TexMan.Type_Any);
|
||||||
if ( !tex[1] ) tex[1] = TexMan.CheckForTexture("graphics/SWWMGZLogo.png",TexMan.Type_Any);
|
if ( !tex[1] ) tex[1] = TexMan.CheckForTexture("graphics/SWWMGZLogo.png",TexMan.Type_Any);
|
||||||
if ( !tex[2] ) tex[2] = TexMan.CheckForTexture("graphics/tempbg.png",TexMan.Type_Any);
|
if ( !tex[2] ) tex[2] = TexMan.CheckForTexture("graphics/tempbg.png",TexMan.Type_Any);
|
||||||
|
if ( !tex[3] ) tex[3] = TexMan.CheckForTexture((gameinfo.gametype&GAME_Raven)?"TITLE":"TITLEPIC",TexMan.Type_MiscPatch);
|
||||||
Vector2 tsize, vsize;
|
Vector2 tsize, vsize;
|
||||||
|
if ( titletimer < 0 )
|
||||||
|
{
|
||||||
|
Screen.Dim("Black",1.,0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||||
|
if ( titletimer < -20 )
|
||||||
|
{
|
||||||
|
rss = int(MSTime()*(GameTicRate/1000.));
|
||||||
|
Vector2 ofs = (RandomShiver(),RandomShiver())*clamp((80+titletimer+e.FracTic)/50.,0.,1.);
|
||||||
|
tsize = TexMan.GetScaledSize(tex[3]);
|
||||||
|
ofs *= tsize.y/10.;
|
||||||
|
Screen.DrawTexture(tex[3],true,ofs.x,ofs.y,DTA_VirtualWidthF,tsize.x,DTA_VirtualHeightF,tsize.y,DTA_FullscreenScale,FSMode_ScaleToFit43);
|
||||||
|
RenderExplosions();
|
||||||
|
}
|
||||||
|
if ( titletimer > -20 ) Screen.Dim("White",1.-clamp((20+titletimer+e.FracTic)/20.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||||
|
else if ( titletimer > -80 ) Screen.Dim("White",clamp((80+titletimer+e.FracTic)/50.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||||
|
if ( titletimer <= -250 ) Screen.Dim("Black",1.-clamp((270+titletimer+e.FracTic)/20.,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ( swwm_fuzz )
|
if ( swwm_fuzz )
|
||||||
{
|
{
|
||||||
tsize = TexMan.GetScaledSize(tex[2]);
|
tsize = TexMan.GetScaledSize(tex[2]);
|
||||||
double zoom = max(ceil(Screen.GetWidth()/tsize.x),ceil(Screen.GetHeight()/tsize.y));
|
double zoom = max(ceil(Screen.GetWidth()/tsize.x),ceil(Screen.GetHeight()/tsize.y));
|
||||||
vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom;
|
vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom;
|
||||||
Screen.DrawTexture(tex[2],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0));
|
Screen.DrawTexture(tex[2],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0));
|
||||||
Screen.Dim("Black",clamp(1.-((level.maptime+e.FracTic)/GameTicRate)*.05,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
|
Screen.Dim("Black",clamp(1.-((titletimer+e.FracTic)/GameTicRate)*.05,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||||
}
|
}
|
||||||
else Screen.Dim("Black",1.,0,0,Screen.GetWidth(),Screen.GetHeight());
|
else Screen.Dim("Black",1.,0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||||
double hs = max(min(floor(Screen.GetWidth()/320.),floor(Screen.GetHeight()/200.)),1.);
|
double hs = max(min(floor(Screen.GetWidth()/320.),floor(Screen.GetHeight()/200.)),1.);
|
||||||
|
|
@ -46,43 +161,43 @@ Class SWWMTitleStuff : EventHandler
|
||||||
if ( sar > ar ) vsize = (tsize.x,tsize.x/ar);
|
if ( sar > ar ) vsize = (tsize.x,tsize.x/ar);
|
||||||
else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y);
|
else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y);
|
||||||
else vsize = tsize;
|
else vsize = tsize;
|
||||||
double alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-2,0.,1.);
|
double alf = clamp(((titletimer+e.FracTic)/GameTicRate)-2,0.,1.);
|
||||||
alf *= 1.-clamp(((level.maptime+e.FracTic)/GameTicRate)-8,0.,1.);
|
alf *= 1.-clamp(((titletimer+e.FracTic)/GameTicRate)-8,0.,1.);
|
||||||
Screen.DrawTexture(tex[0],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_Alpha,alf);
|
Screen.DrawTexture(tex[0],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_Alpha,alf);
|
||||||
String str = StringTable.Localize("$SWWM_TITLEPRESENTS");
|
String str = StringTable.Localize("$SWWM_TITLEPRESENTS");
|
||||||
alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-10,0.,1.);
|
alf = clamp(((titletimer+e.FracTic)/GameTicRate)-10,0.,1.);
|
||||||
alf *= 1.-clamp(((level.maptime+e.FracTic)/GameTicRate)-16,0.,1.);
|
alf *= 1.-clamp(((titletimer+e.FracTic)/GameTicRate)-16,0.,1.);
|
||||||
Screen.DrawText(smallfont,Font.CR_WHITE,(ss.x-smallfont.StringWidth(str))/2,(ss.y-smallfont.GetHeight())/2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf);
|
Screen.DrawText(smallfont,Font.CR_WHITE,(ss.x-smallfont.StringWidth(str))/2,(ss.y-smallfont.GetHeight())/2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf);
|
||||||
str = StringTable.Localize("$SWWM_TITLEMODBY");
|
str = StringTable.Localize("$SWWM_TITLEMODBY");
|
||||||
alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-18,0.,1.);
|
alf = clamp(((titletimer+e.FracTic)/GameTicRate)-18,0.,1.);
|
||||||
alf *= 1.-clamp(((level.maptime+e.FracTic)/GameTicRate)-24,0.,1.);
|
alf *= 1.-clamp(((titletimer+e.FracTic)/GameTicRate)-24,0.,1.);
|
||||||
Screen.DrawText(smallfont,Font.CR_WHITE,(ss.x-smallfont.StringWidth(str))/2,(ss.y-smallfont.GetHeight())/2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf);
|
Screen.DrawText(smallfont,Font.CR_WHITE,(ss.x-smallfont.StringWidth(str))/2,(ss.y-smallfont.GetHeight())/2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf);
|
||||||
tsize = TexMan.GetScaledSize(tex[1]);
|
tsize = TexMan.GetScaledSize(tex[1]);
|
||||||
sar = tsize.x/tsize.y;
|
sar = tsize.x/tsize.y;
|
||||||
if ( sar > ar ) vsize = (tsize.x,tsize.x/ar);
|
if ( sar > ar ) vsize = (tsize.x,tsize.x/ar);
|
||||||
else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y);
|
else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y);
|
||||||
else vsize = tsize;
|
else vsize = tsize;
|
||||||
alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-26,0.,2.)*.5;
|
alf = clamp(((titletimer+e.FracTic)/GameTicRate)-26,0.,2.)*.5;
|
||||||
Screen.DrawTexture(tex[1],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_Alpha,alf);
|
Screen.DrawTexture(tex[1],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_Alpha,alf);
|
||||||
if ( (level.maptime/GameTicRate) < 30 ) return;
|
if ( (titletimer/GameTicRate) < 30 ) return;
|
||||||
// scrolls
|
// scrolls
|
||||||
if ( (scrolls.Size() <= 0 ) || (lastlang != language) )
|
if ( (scrolls.Size() <= 0 ) || (lastlang != language) )
|
||||||
{
|
{
|
||||||
scrolls.Clear();
|
scrolls.Clear();
|
||||||
String sstr = StringTable.Localize("$SWWM_TITLESCROLL");
|
String sstr = StringTable.Localize("$SWWM_TITLESCROLL");
|
||||||
sstr.Split(scrolls,"\n");
|
sstr.Split(scrolls,"\n");
|
||||||
sbase = (level.maptime+e.FracTic)/GameTicRate;
|
sbase = (titletimer+e.FracTic)/GameTicRate;
|
||||||
if ( sline >= scrolls.Size() ) sline = 0;
|
if ( sline >= scrolls.Size() ) sline = 0;
|
||||||
}
|
}
|
||||||
lastlang = language;
|
lastlang = language;
|
||||||
// estimate scrool length
|
// estimate scrool length
|
||||||
double llen = smallfont.StringWidth(scrolls[sline]);
|
double llen = smallfont.StringWidth(scrolls[sline]);
|
||||||
double soffset = 40*((level.maptime+e.FracTic)/GameTicRate-sbase);
|
double soffset = 40*((titletimer+e.FracTic)/GameTicRate-sbase);
|
||||||
if ( soffset > llen+ss.x )
|
if ( soffset > llen+ss.x )
|
||||||
{
|
{
|
||||||
sline++;
|
sline++;
|
||||||
if ( sline >= scrolls.Size() ) sline = 0;
|
if ( sline >= scrolls.Size() ) sline = 0;
|
||||||
sbase = (level.maptime+e.FracTic)/GameTicRate;
|
sbase = (titletimer+e.FracTic)/GameTicRate;
|
||||||
soffset = 0;
|
soffset = 0;
|
||||||
}
|
}
|
||||||
double xx = ss.x-soffset;
|
double xx = ss.x-soffset;
|
||||||
|
|
@ -95,16 +210,16 @@ Class SWWMTitleStuff : EventHandler
|
||||||
{
|
{
|
||||||
for ( double trl = .1; trl < 1.; trl += .04 )
|
for ( double trl = .1; trl < 1.; trl += .04 )
|
||||||
{
|
{
|
||||||
double yy = (ss.y-40)+10*sin(15*i+160*(level.maptime+e.FracTic)/GameTicRate-90.*(1.-trl));
|
double yy = (ss.y-40)+10*sin(15*i+160*(titletimer+e.FracTic)/GameTicRate-90.*(1.-trl));
|
||||||
alf = max(0,1.-abs((ss.x/2)-xx)/(ss.x/2))**.5;
|
alf = max(0,1.-abs((ss.x/2)-xx)/(ss.x/2))**.5;
|
||||||
alf *= .2*trl;
|
alf *= .2*trl;
|
||||||
double xxofs = 5*sin(15*i+120*(level.maptime+e.FracTic)/GameTicRate-90.*(1.-trl))-16*(1.-trl);
|
double xxofs = 5*sin(15*i+120*(titletimer+e.FracTic)/GameTicRate-90.*(1.-trl))-16*(1.-trl);
|
||||||
Screen.DrawChar(smallfont,Font.CR_BLUE,xx-xxofs,yy,ch,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf,DTA_LegacyRenderStyle,STYLE_Add);
|
Screen.DrawChar(smallfont,Font.CR_BLUE,xx-xxofs,yy,ch,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf,DTA_LegacyRenderStyle,STYLE_Add);
|
||||||
}
|
}
|
||||||
double yy = (ss.y-40)+10*sin(15*i+160*(level.maptime+e.FracTic)/GameTicRate);
|
double yy = (ss.y-40)+10*sin(15*i+160*(titletimer+e.FracTic)/GameTicRate);
|
||||||
alf = max(0,1.-abs((ss.x/2)-xx)/(ss.x/2))**.5;
|
alf = max(0,1.-abs((ss.x/2)-xx)/(ss.x/2))**.5;
|
||||||
double xxofs = 5*sin(15*i+120*(level.maptime+e.FracTic)/GameTicRate);
|
double xxofs = 5*sin(15*i+120*(titletimer+e.FracTic)/GameTicRate);
|
||||||
Color c = Color(int(127.5+127.5*sin(10*i+80*(level.maptime+e.FracTic)/GameTicRate)),0,0);
|
Color c = Color(int(127.5+127.5*sin(10*i+80*(titletimer+e.FracTic)/GameTicRate)),0,0);
|
||||||
Screen.DrawChar(smallfont,Font.CR_SAPPHIRE,xx-xxofs,yy,ch,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf);
|
Screen.DrawChar(smallfont,Font.CR_SAPPHIRE,xx-xxofs,yy,ch,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf);
|
||||||
}
|
}
|
||||||
xx += smallfont.GetCharWidth(ch)+smallfont.GetDefaultKerning();
|
xx += smallfont.GetCharWidth(ch)+smallfont.GetDefaultKerning();
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ Class SWWMStaticHandler : StaticEventHandler
|
||||||
int maptime;
|
int maptime;
|
||||||
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
|
||||||
|
bool titlefirst;
|
||||||
|
|
||||||
override void NewGame()
|
override void NewGame()
|
||||||
{
|
{
|
||||||
|
|
@ -44,6 +46,7 @@ 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 )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue