diff --git a/FuturePlans.md b/FuturePlans.md index cc0012a27..20afb5268 100644 --- a/FuturePlans.md +++ b/FuturePlans.md @@ -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)* - Froggy Gang *(Summon 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)*: @@ -132,7 +138,7 @@ Add-ons and other related stuff. * **Monster/decoration replacements add-on:** - Potentially standalone, usable with other mods - - Balanced for this mod + - Balanced for this mod, as well as the side mods - Unique bosses - Some extra enemy variants - 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)* - Basically give SWWM GZ its own IWAD as a standalone game - Some new weapons, some renovations - - Lots of world exploration, more lore \ No newline at end of file + - Lots of world exploration, more lore diff --git a/gldefs.misc b/gldefs.misc index 9960d0c44..91d6f8cd4 100644 --- a/gldefs.misc +++ b/gldefs.misc @@ -60,6 +60,10 @@ HardwareShader Texture "graphics/M_SWWM.png" Texture "Layer6" "graphics/M_SWWM_Layer6.png" Define "NO_BILINEAR" } +HardwareShader Texture "graphics/UnSXLogo.png" +{ + Shader "shaders/glsl/Bilinear.fp" +} HardwareShader Sprite "MBRNB0" { Shader "shaders/glsl/Whew.fp" diff --git a/language.def_base b/language.def_base index ed48510c8..d876b08db 100644 --- a/language.def_base +++ b/language.def_base @@ -539,7 +539,7 @@ O_RAYKHOM2 = "%o witnessed %k's UNLIMITED POWER."; O_GRANDLANCE = "%o was torn asunder by %k's Grand Lance."; O_GRANDLANCE2 = "%k showed %o how efficient nuclear fusion is."; 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_MORTALRIFLE = "%k killed %o very dead."; O_MORTALRIFLEALT = "%o caught a very deadly grenade from %k."; diff --git a/language.version b/language.version index 9c3f26892..4f48c75db 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r103 \cu(Sat 1 Jan 17:33:39 CET 2022)\c-"; -SWWM_SHORTVER="\cw1.2pre r103 \cu(2022-01-01 17:33:39)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r104 \cu(Wed 5 Jan 20:42:03 CET 2022)\c-"; +SWWM_SHORTVER="\cw1.2pre r104 \cu(2022-01-05 20:42:03)\c-"; diff --git a/sndinfo.txt b/sndinfo.txt index 33cd4d0df..de0fe5523 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -17,6 +17,12 @@ squeak sounds/SQUEAK.ogg recordscratch sounds/RECSCRAP.ogg compat/warn sounds/UTWARN.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/giggle2 sounds/saya/saya_giggle2.ogg diff --git a/sounds/OUCHEX1.ogg b/sounds/OUCHEX1.ogg new file mode 100644 index 000000000..240df30d5 Binary files /dev/null and b/sounds/OUCHEX1.ogg differ diff --git a/sounds/OUCHEX2.ogg b/sounds/OUCHEX2.ogg new file mode 100644 index 000000000..db8aaaf05 Binary files /dev/null and b/sounds/OUCHEX2.ogg differ diff --git a/sounds/OUCHEX3.ogg b/sounds/OUCHEX3.ogg new file mode 100644 index 000000000..8013036c3 Binary files /dev/null and b/sounds/OUCHEX3.ogg differ diff --git a/sounds/OUCHEX4.ogg b/sounds/OUCHEX4.ogg new file mode 100644 index 000000000..122a1ed40 Binary files /dev/null and b/sounds/OUCHEX4.ogg differ diff --git a/zscript.txt b/zscript.txt index 1679d4575..dfa65f6d3 100644 --- a/zscript.txt +++ b/zscript.txt @@ -155,9 +155,6 @@ version "4.7.1" #include "zscript/dlc2/swwm_ultimate.zsc" #include "zscript/dlc2/swwm_ultimate_fx.zsc" // 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_demoshmup.zsc" #include "zscript/dlc3/swwm_demoquest.zsc" diff --git a/zscript/dlc3/swwm_pong.zsc b/zscript/dlc3/swwm_pong.zsc deleted file mode 100644 index c0de57b9b..000000000 --- a/zscript/dlc3/swwm_pong.zsc +++ /dev/null @@ -1 +0,0 @@ -// TODO Pong game code diff --git a/zscript/dlc3/swwm_snake.zsc b/zscript/dlc3/swwm_snake.zsc deleted file mode 100644 index 414ab019e..000000000 --- a/zscript/dlc3/swwm_snake.zsc +++ /dev/null @@ -1 +0,0 @@ -// TODO Snake game code diff --git a/zscript/dlc3/swwm_tetris.zsc b/zscript/dlc3/swwm_tetris.zsc deleted file mode 100644 index 63e03db98..000000000 --- a/zscript/dlc3/swwm_tetris.zsc +++ /dev/null @@ -1 +0,0 @@ -// TODO Tetris game code diff --git a/zscript/menu/swwm_title.zsc b/zscript/menu/swwm_title.zsc index 4194b364a..79fe51db5 100644 --- a/zscript/menu/swwm_title.zsc +++ b/zscript/menu/swwm_title.zsc @@ -1,20 +1,103 @@ // Things for the titlemap +Struct TitleExplosion +{ + bool bInit; + int frame; + Vector2 pos; + double scale; + bool flipx, flipy; + double angle; +} + Class SWWMTitleStuff : EventHandler { - transient ui TextureID tex[3]; - transient ui Array scrolls; - transient ui int sline; - transient ui double sbase; - transient ui String lastlang; + ui TextureID tex[4]; + ui Array scrolls; + ui int sline; + ui double sbase; + 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() { - 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() { + if ( (titletimer > -80) && (titletimer < -20) ) TickExplosions(); if ( gamestate != GS_LEVEL ) return; // you're not supposed to be here Menu.SetMenu('EndGameMenu'); @@ -23,19 +106,51 @@ Class SWWMTitleStuff : EventHandler // 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 ) { 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[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; + 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 ) { tsize = TexMan.GetScaledSize(tex[2]); double zoom = max(ceil(Screen.GetWidth()/tsize.x),ceil(Screen.GetHeight()/tsize.y)); 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.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()); 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); else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y); else vsize = tsize; - double alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-2,0.,1.); - alf *= 1.-clamp(((level.maptime+e.FracTic)/GameTicRate)-8,0.,1.); + double alf = clamp(((titletimer+e.FracTic)/GameTicRate)-2,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); String str = StringTable.Localize("$SWWM_TITLEPRESENTS"); - alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-10,0.,1.); - alf *= 1.-clamp(((level.maptime+e.FracTic)/GameTicRate)-16,0.,1.); + alf = clamp(((titletimer+e.FracTic)/GameTicRate)-10,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); str = StringTable.Localize("$SWWM_TITLEMODBY"); - alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-18,0.,1.); - alf *= 1.-clamp(((level.maptime+e.FracTic)/GameTicRate)-24,0.,1.); + alf = clamp(((titletimer+e.FracTic)/GameTicRate)-18,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); tsize = TexMan.GetScaledSize(tex[1]); sar = tsize.x/tsize.y; if ( sar > ar ) vsize = (tsize.x,tsize.x/ar); else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y); 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); - if ( (level.maptime/GameTicRate) < 30 ) return; + if ( (titletimer/GameTicRate) < 30 ) return; // scrolls if ( (scrolls.Size() <= 0 ) || (lastlang != language) ) { scrolls.Clear(); String sstr = StringTable.Localize("$SWWM_TITLESCROLL"); sstr.Split(scrolls,"\n"); - sbase = (level.maptime+e.FracTic)/GameTicRate; + sbase = (titletimer+e.FracTic)/GameTicRate; if ( sline >= scrolls.Size() ) sline = 0; } lastlang = language; // estimate scrool length 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 ) { sline++; if ( sline >= scrolls.Size() ) sline = 0; - sbase = (level.maptime+e.FracTic)/GameTicRate; + sbase = (titletimer+e.FracTic)/GameTicRate; soffset = 0; } double xx = ss.x-soffset; @@ -95,16 +210,16 @@ Class SWWMTitleStuff : EventHandler { 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 *= .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); } - 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; - double xxofs = 5*sin(15*i+120*(level.maptime+e.FracTic)/GameTicRate); - Color c = Color(int(127.5+127.5*sin(10*i+80*(level.maptime+e.FracTic)/GameTicRate)),0,0); + double xxofs = 5*sin(15*i+120*(titletimer+e.FracTic)/GameTicRate); + 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); } xx += smallfont.GetCharWidth(ch)+smallfont.GetDefaultKerning(); diff --git a/zscript/swwm_statichandler.zsc b/zscript/swwm_statichandler.zsc index 910a611e1..663f0a13f 100644 --- a/zscript/swwm_statichandler.zsc +++ b/zscript/swwm_statichandler.zsc @@ -22,6 +22,8 @@ Class SWWMStaticHandler : StaticEventHandler int maptime; bool unloading; ui Dictionary menustate; // used by Demolitionist Menu to restore old menu positions + // title stuff + bool titlefirst; override void NewGame() { @@ -44,6 +46,7 @@ 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 )