diff --git a/gldefs.misc b/gldefs.misc index 6d6f47517..7e0d3a0e1 100644 --- a/gldefs.misc +++ b/gldefs.misc @@ -23,6 +23,11 @@ HardwareShader Texture "graphics/SWWMGZLogo.png" Shader "shaders/glsl/LogoAnimated.fp" Texture "LogoTex" "graphics/SWWMGZLogo_Layers.png" } +HardwareShader Texture "graphics/M_SWWM.png" +{ + Shader "shaders/glsl/LogoAnimated.fp" + Texture "LogoTex" "graphics/M_SWWM_Layers.png" +} HardwareShader Sprite "BBRNB0" { Shader "shaders/glsl/Whew.fp" diff --git a/graphics/M_SWWM.png b/graphics/M_SWWM.png new file mode 100644 index 000000000..25dcc958d Binary files /dev/null and b/graphics/M_SWWM.png differ diff --git a/graphics/M_SWWM_Layers.png b/graphics/M_SWWM_Layers.png new file mode 100644 index 000000000..dd4f55e26 Binary files /dev/null and b/graphics/M_SWWM_Layers.png differ diff --git a/language.def_menu b/language.def_menu index a35789dc4..a5c4b4c65 100644 --- a/language.def_menu +++ b/language.def_menu @@ -15,11 +15,11 @@ SWWM_GESTURE3 = "Victory"; SWWM_GESTURE4 = "Blow Kiss"; SWWM_KBASE = "Demolitionist Menu"; // skills -SWWM_SKCHILL = "Just Chillin'"; -SWWM_SKEASY = "Taking It Easy~"; -SWWM_SKNORMAL = "Adequate Adventure"; -SWWM_SKHARD = "I'm A Masochist"; -SWWM_SKLUNATIC = "I WANT DIE"; +SWWM_SKCHILL = "\cdJust Chillin'\c-"; +SWWM_SKEASY = "\ckTaking It Easy~\c-"; +SWWM_SKNORMAL = "\ciAdequate Adventure\c-"; +SWWM_SKHARD = "\cgI'm A Masochist\c-"; +SWWM_SKLUNATIC = "\crI WANT DIE\c-"; SWWM_SKLUNATICCONFIRM = "You will die, you will suffer.\nThat, I can guarantee."; // mod menu SWWM_MTITLE = "SWWM GZ Options"; diff --git a/language.es_menu b/language.es_menu index 69c31de5e..91b617c17 100644 --- a/language.es_menu +++ b/language.es_menu @@ -15,11 +15,11 @@ SWWM_GESTURE3 = "Victoria"; SWWM_GESTURE4 = "Soplar Beso"; SWWM_KBASE = "Menú de Demolicionista"; // skills -SWWM_SKCHILL = "De Relax"; -SWWM_SKEASY = "Con Calmita~"; -SWWM_SKNORMAL = "Aventura Adecuada"; -SWWM_SKHARD = "Soy Masoca"; -SWWM_SKLUNATIC = "INTENTA MUERTE"; +SWWM_SKCHILL = "\cdDe Relax\c-"; +SWWM_SKEASY = "\ckCon Calmita~\c-"; +SWWM_SKNORMAL = "\ciAventura Adecuada\c-"; +SWWM_SKHARD = "\cgSoy Masoca\c-"; +SWWM_SKLUNATIC = "\crINTENTA MUERTE\c-"; SWWM_SKLUNATICCONFIRM = "Vas a morir, vas a sufrir.\nEso te lo puedo garantizar."; // mod menu SWWM_MTITLE = "Opciones de SWWM GZ"; diff --git a/language.fr_menu b/language.fr_menu index 5367296cd..a16c32c98 100644 --- a/language.fr_menu +++ b/language.fr_menu @@ -1,5 +1,6 @@ [fr] // keybinds +// skills // mod menu // knowledge base // mission entries diff --git a/language.it_menu b/language.it_menu index 2236ff50b..b38c2f50a 100644 --- a/language.it_menu +++ b/language.it_menu @@ -1,5 +1,6 @@ [it] // keybinds +// skills // mod menu // knowledge base // mission entries diff --git a/language.jp_menu b/language.jp_menu index 67b4bcd4c..5dc5c3205 100644 --- a/language.jp_menu +++ b/language.jp_menu @@ -1,5 +1,6 @@ [jp] // keybinds +// skills // mod menu // knowledge base // mission entries diff --git a/language.pl_menu b/language.pl_menu index f61726a34..c61f99a91 100644 --- a/language.pl_menu +++ b/language.pl_menu @@ -1,5 +1,6 @@ [pl] // keybinds +// skills // mod menu // knowledge base // mission entries diff --git a/language.version b/language.version index 9796f8f9a..3734d7378 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r574 \cu(Sat 24 Oct 13:01:43 CEST 2020)"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r576 \cu(Sat 24 Oct 15:45:53 CEST 2020)"; diff --git a/menudef.txt b/menudef.txt index 8956d666a..b121fc2d2 100644 --- a/menudef.txt +++ b/menudef.txt @@ -243,9 +243,9 @@ ListMenu "MainMenu" { Class "SWWMMainMenu" Font "SWWMBigFont", "White", "Sapphire" - Selector "graphics/DemoIcon.png", -24, 10 + Selector "graphics/DemoIcon.png", -24, 0 LineSpacing 28 - SWWMLogo "M_SWWM" + SWWMLogo "graphics/M_SWWM.png" Position 0, 56 SWWMTextItemM "$MNU_NEWGAME", "n", "PlayerclassMenu" SWWMTextItemM "$MNU_OPTIONS", "o", "OptionsMenu" @@ -257,9 +257,9 @@ ListMenu "MainMenuTextOnly" { Class "SWWMMainMenu" Font "SWWMBigFont", "White", "Sapphire" - Selector "graphics/DemoIcon.png", -24, 10 + Selector "graphics/DemoIcon.png", -24, 0 LineSpacing 28 - SWWMLogo "M_SWWM" + SWWMLogo "graphics/M_SWWM.png" Position 0, 56 SWWMTextItemM "$MNU_NEWGAME", "n", "PlayerclassMenu" SWWMTextItemM "$MNU_OPTIONS", "o", "OptionsMenu" @@ -269,6 +269,7 @@ ListMenu "MainMenuTextOnly" } ListMenu "EpisodeMenu" { + Class "SWWMBigMenuHack" IfGame(Doom, Heretic, Hexen, Strife) { NetgameMessage "$NEWGAME" @@ -278,20 +279,18 @@ ListMenu "EpisodeMenu" NetgameMessage "$CNEWGAME" } Font "SWWMBigFont", "White", "Sapphire" - Selector "graphics/DemoIcon.png", -32, 10 + Selector "graphics/DemoIcon.png", -24, 0 LineSpacing 28 - StaticText 56, 24, "$MNU_EPISODE" - Position 90, 64 + SWWMStaticTextM 0, 0, "$MNU_EPISODE", "Blue" + Position 0, 48 } ListMenu "SkillMenu" { + Class "SWWMBigMenuHack" Font "SWWMBigFont", "White", "Sapphire" - Selector "graphics/DemoIcon.png", -32, 10 + Selector "graphics/DemoIcon.png", -24, 0 LineSpacing 28 - StaticText 24, 4, "$MNU_CHOOSESKILL" - Position 0, 40 - CenterMenu - // the menu building code for this does not give a single goddamn fuck about positioning so it looks completely off-center - // thanks to whoever decided that, hope you step on a LEGO + SWWMStaticTextM 0, 0, "$MNU_CHOOSESKILL", "Blue" + Position 0, 48 } diff --git a/textures.menu b/textures.menu deleted file mode 100644 index e58a579e0..000000000 --- a/textures.menu +++ /dev/null @@ -1,6 +0,0 @@ -graphic "M_SWWM", 2048, 1024 -{ - XScale 8 - YScale 8 - Graphic "graphics/SWWMGZLogo.png", 0, 0 -} diff --git a/zscript/swwm_handler.zsc b/zscript/swwm_handler.zsc index b73524ef4..381d686c6 100644 --- a/zscript/swwm_handler.zsc +++ b/zscript/swwm_handler.zsc @@ -603,6 +603,34 @@ Class SWWMHandler : EventHandler l.ChangeStatNum(Thinker.STAT_STATIC); l.myplayer = p; } + // horrendous piece of shit bandaid fix because gzdoom gets on my fucking nerves with its inconsistency bullshit when traveling between levels + let ti = ThinkerIterator.Create("SWWMLoreLibrary",Thinker.STAT_STATIC); + SWWMLoreLibrary l2; + bool bmesg = false; + while ( l2 = SWWMLoreLibrary(ti.Next()) ) + { + if ( (l2 == l) || (l2.myplayer != p) ) continue; + if ( !bmesg ) + { + Console.Printf("If this message appears, something broke the mod really badly and should be reported."); + bmesg = true; + } + // merge excess libraries (if it ever happens) + Console.Printf("Merging existing lore library with %d entries.",l2.ent.Size()); + for ( int i=0; i=0)?color:desc.mFontColor; + } + + void InitDirect( double x, double y, String text, Font font, int color = Font.CR_UNTRANSLATED ) + { + Super.Init(x,y); + mText = text; + mFont = font; + mColor = color; + } + + override void Drawer( bool selected ) + { + if ( mText.Length() == 0 ) return; + String text = Stringtable.Localize(mText); + double x = (320-mFont.StringWidth(text))/2; + Screen.DrawText(mFont,mColor,x,mYpos,text,DTA_Clean,true); + } + + // FIXME The 4.5+ way - swap out for this once it's done + /*override void Draw( bool selected, ListMenuDescriptor desc ) + { + if ( mText.Length() == 0 ) return; + String text = Stringtable.Localize(mText); + int w = desc?desc.DisplayWidth():ListMenuDescriptor.CleanScale; + int h = desc?desc.DisplayHeight():-1; + if ( w == ListMenuDescriptor.CleanScale ) + { + double x = (320-mFont.StringWidth(text))/2; + Screen.DrawText(mFont,mColor,x,abs(mYpos),text,(mYpos<0)?DTA_CleanTop:DTA_Clean,true); + } + else + { + double x = (w-mFont.StringWidth(text))/2; + Screen.DrawText(mFont,mColor,x,abs(mYpos),text,DTA_VirtualWidth,w,DTA_VirtualHeight,h,DTA_FullscreenScale,FSMode_ScaleToFit43); + } + }*/ +} + // scaled SWWM GZ logo class ListMenuItemSWWMLogo : ListMenuItem { @@ -323,15 +409,29 @@ class ListMenuItemSWWMTextItemM : ListMenuItemSelectable { String mText; Font mFont; + int mColor; + int mColorSelected; void Init( ListMenuDescriptor desc, String text, String hotkey, Name child, int param = 0 ) { Super.Init(desc.mXpos,desc.mYpos,desc.mLinespacing,child,param); mText = text; mFont = desc.mFont; + mColor = desc.mFontColor; + mColorSelected = desc.mFontcolor2; mHotkey = hotkey.GetNextCodePoint(0); } + void InitDirect( double x, double y, int height, int hotkey, String text, Font font, int color, int color2, Name child, int param = 0 ) + { + Super.Init(x,y,height,child,param); + mText = text; + mFont = font; + mColor = color; + mColorSelected = color2; + mHotkey = hotkey; + } + override int GetWidth() { return max(1,mFont.StringWidth(StringTable.Localize(mText))); @@ -345,6 +445,7 @@ class ListMenuItemSWWMTextItemM : ListMenuItemSelectable double y = mYPos-12; // text needs to be offset up for some reason, otherwise doesn't match mouse selection bounds if ( selected ) { + SWWMUtility.StripColor(text); double xx = x; int tlen = text.CodePointCount(); for ( int i=0, pos=0; i