diff --git a/graphics/Credits/MariSprite0.png b/graphics/Credits/MariSprite0.png new file mode 100644 index 000000000..4d05e28be Binary files /dev/null and b/graphics/Credits/MariSprite0.png differ diff --git a/graphics/Credits/MariSprite1.png b/graphics/Credits/MariSprite1.png new file mode 100644 index 000000000..4bcc97245 Binary files /dev/null and b/graphics/Credits/MariSprite1.png differ diff --git a/graphics/Credits/MariSprite10.png b/graphics/Credits/MariSprite10.png new file mode 100644 index 000000000..7ae1726c9 Binary files /dev/null and b/graphics/Credits/MariSprite10.png differ diff --git a/graphics/Credits/MariSprite11.png b/graphics/Credits/MariSprite11.png new file mode 100644 index 000000000..3d889dd74 Binary files /dev/null and b/graphics/Credits/MariSprite11.png differ diff --git a/graphics/Credits/MariSprite12.png b/graphics/Credits/MariSprite12.png new file mode 100644 index 000000000..f4edf7edf Binary files /dev/null and b/graphics/Credits/MariSprite12.png differ diff --git a/graphics/Credits/MariSprite13.png b/graphics/Credits/MariSprite13.png new file mode 100644 index 000000000..5e98b3d37 Binary files /dev/null and b/graphics/Credits/MariSprite13.png differ diff --git a/graphics/Credits/MariSprite14.png b/graphics/Credits/MariSprite14.png new file mode 100644 index 000000000..a1d6459ec Binary files /dev/null and b/graphics/Credits/MariSprite14.png differ diff --git a/graphics/Credits/MariSprite2.png b/graphics/Credits/MariSprite2.png new file mode 100644 index 000000000..a2619f7d5 Binary files /dev/null and b/graphics/Credits/MariSprite2.png differ diff --git a/graphics/Credits/MariSprite3.png b/graphics/Credits/MariSprite3.png new file mode 100644 index 000000000..cf4dd8358 Binary files /dev/null and b/graphics/Credits/MariSprite3.png differ diff --git a/graphics/Credits/MariSprite4.png b/graphics/Credits/MariSprite4.png new file mode 100644 index 000000000..1380e4fa9 Binary files /dev/null and b/graphics/Credits/MariSprite4.png differ diff --git a/graphics/Credits/MariSprite5.png b/graphics/Credits/MariSprite5.png new file mode 100644 index 000000000..85e60245b Binary files /dev/null and b/graphics/Credits/MariSprite5.png differ diff --git a/graphics/Credits/MariSprite6.png b/graphics/Credits/MariSprite6.png new file mode 100644 index 000000000..3a11c6df2 Binary files /dev/null and b/graphics/Credits/MariSprite6.png differ diff --git a/graphics/Credits/MariSprite7.png b/graphics/Credits/MariSprite7.png new file mode 100644 index 000000000..2d31d8784 Binary files /dev/null and b/graphics/Credits/MariSprite7.png differ diff --git a/graphics/Credits/MariSprite8.png b/graphics/Credits/MariSprite8.png new file mode 100644 index 000000000..e2340f2de Binary files /dev/null and b/graphics/Credits/MariSprite8.png differ diff --git a/graphics/Credits/MariSprite9.png b/graphics/Credits/MariSprite9.png new file mode 100644 index 000000000..bcb908858 Binary files /dev/null and b/graphics/Credits/MariSprite9.png differ diff --git a/language.def_base b/language.def_base index 930e6ef78..ce993a6fc 100644 --- a/language.def_base +++ b/language.def_base @@ -938,7 +938,7 @@ SWWM_INTERTIP25 = "If you do an air dash straight towards the ground, you might SWWM_INTERTIP26 = "You can press switches and open doors by punching them. This can also be done with the Lead Ball ammunition from the Spreadgun, with the exception of exit switches."; SWWM_INTERTIP27 = "The fire from the Spreadgun's Napalm rounds will spread around to nearby enemies (or yourself). Remember, if you're on fire, stop, drop and roll... or just spin around, it works the same."; SWWM_INTERTIP28 = "Incendiary ammunition is ineffective underwater, for obvious reasons."; -SWWM_INTERTIP29 = "My girlfriends are really cute. Sorry, I had to say it."; +SWWM_INTERTIP29 = "Love is the most powerful thing in the world. Don't hate those who are different. We all must stand together, as humans."; SWWM_INTERTIP30 = "The Silver Bullet fires with such a force that its bullets leave shockwaves as they rip through the air (and enemies), dealing additional damage. It can also pierce through some walls."; SWWM_INTERTIP31 = "Going prone with the Silver Bullet will disengage the recoil compensators, allowing you to be free from their damaging heat, at the cost of mobility."; SWWM_INTERTIP32 = "The wondrous effects of the Grilled Cheese Sandwich allow you to survive pretty much everything on auto-activation. Including even the otherwise inevitable destruction from the Ynykron Artifact!"; diff --git a/language.def_menu b/language.def_menu index c3135b74f..6d2d908ff 100644 --- a/language.def_menu +++ b/language.def_menu @@ -50,7 +50,9 @@ SWWM_SVARMORUSE = "Enforce Armor Auto-Use"; SWWM_SVHEALTHUSE = "Enforce Health Auto-Use"; SWWM_SVAMMOUSE = "Enforce Fabricator Auto-Use"; SWWM_MCREDS = "SWWM GZ Credits"; +SWWM_CSTITLE = "Cute Robutt Whomst Love To Explode Demons"; SWWM_CLEAD = "Development Lead:"; +SWWM_CDEV2 = "Self-proclaimed ZScript Magician"; SWWM_CASSETS = "Additional Assets:"; SWWM_ASSBARONS = "XDeath Sprites for Hell Nobles"; SWWM_ASSOTHERS = "XDeath Sprites for Demon, Cacodemon, Revenant, Archvile"; @@ -59,21 +61,22 @@ SWWM_CMUSIC = "Music Tracks Used:"; SWWM_CFANART = "Intermission Fanart:"; SWWM_CPATRON = "Patreon Backers:"; SWWM_CTHANK = "Special Thanks:"; -SWWM_CDRAGON2 = "(For being a good pet dragon)"; -SWWM_CLUCY2 = "(For the Tewi font, which I've used for many many years)"; -SWWM_CKEKS2 = "(For libeye, assistance with exception handling code)"; -SWWM_CZN2 = "(For slope alignment code)"; -SWWM_CVAL2 = "(For the custom Nashgore footprints, and for being kawaii)"; -SWWM_CSLEDGE2 = "(For being a great bud)"; -SWWM_CSLEDGE3 = "(And also for lore reasons that encouraged me to take part in the Doom modiverse)"; -SWWM_CSPY2 = "(For being so enthusiastic about everything in this mod)"; +SWWM_CMAB2 = "For being an amazing friend who believes in me, and for inspiring me to keep working on what I love. I'm really really happy to have met you."; +SWWM_CDRAGON2 = "For being a good pet dragon who cares about me."; +SWWM_CLUCY2 = "For the Tewi font, which I've used for many many years. I hope you're doing well, wherever you are."; +SWWM_CKEKS2 = "For libeye, assistance with exception handling code, and also for being such a cool Touhou nerd."; +SWWM_CZN2 = "For slope alignment code, and to Nash also for being a cool smart cactus dude."; +SWWM_CVAL2 = "For the custom Nashgore footprints, and for being a good friend and cute bun."; +SWWM_CSLEDGE2 = "For being a great bud, not just for me but for all of us, and also for encouraging me to take part in the Doom modiverse."; +SWWM_CSPY2 = "For being so enthusiastic about everything in this mod, and for being the cute little brother I never had."; SWWM_CINSP1 = "Combine Kegan, HyperUltra64, TerminusEst13, Yholl and friends"; -SWWM_CINSP2 = "(For inspiration and also for being really cool people)"; +SWWM_CINSP2 = "For inspiration and also for being really cool people. Bless all of you, keep being amazing."; SWWM_CCOMMUNITY1 = "All my amazing friends from the Doom community"; -SWWM_CCOMMUNITY2 = "(For helping me keep this whole thing rolling, and for all the time we've spent together)"; -SWWM_CCOMMUNITY3 = "(Here's to many more years of Dooming. Stay awesome, everyone!)"; -SWWM_CDEVS1 = "Randi, Graf, Rachael, Mental, dpJudas and the rest of the GZDoom dev team"; -SWWM_CDEVS2 = "(For their work on the source port that brought back my faith in modding. You guys rock!)"; +SWWM_CCOMMUNITY2 = "For helping me keep this whole thing rolling, and for all the time we spend together. Here's to many more years of Dooming, stay awesome, everyone!"; +SWWM_CDEVS1 = "Randi, Graf, Rachael and the rest of the GZDoom dev team"; +SWWM_CDEVS2 = "For your work on the source port that brought back my faith in modding. I don't care what others think, you're great."; +SWWM_CYOU1 = "You"; +SWWM_CYOU2 = "For playing this mod, thank you so much."; SWWM_CLOCAL = "Translation:"; SWWM_LRUS = "Russian"; SWWM_FORCEDISABLE = "Force Disable"; diff --git a/language.es_base b/language.es_base index 61da9ed6c..1c957e39b 100644 --- a/language.es_base +++ b/language.es_base @@ -874,7 +874,7 @@ SWWM_INTERTIP25 = "Si haces un sprint en el aire apuntando directamente al suelo SWWM_INTERTIP26 = "Puedes activar objetos y abrir puertas a puñetazos. Esto también se puede hacer con la munición de Bola de Plomo del Trabuco, a excepción de los botones de salida."; SWWM_INTERTIP27 = "Las llamas de los cartuchos de Napalm del Trabuco se extenderán a otros enemigos cercanos (o a ti). Recuerda, si estás ardiendo, tírate al suelo y rueda... o ponte a dar vueltas, funciona igual."; SWWM_INTERTIP28 = "La munición incendiaria es inefectiva bajo el agua, por razones obvias."; -SWWM_INTERTIP29 = "Mis novias son muy cuquis. Lo siento, es que tenía que decirlo."; +SWWM_INTERTIP29 = "El amor es lo más poderoso que existe en el mundo. No odies a los que son diferentes. Todos debemos permanecer unidos, como humanos."; SWWM_INTERTIP30 = "El Silver Bullet dispara con una fuerza tal que sus balas liberan ondas de choque al atravesar el aire (y los enemigos), causando daño adicional. También puede atravesar algunas paredes."; SWWM_INTERTIP31 = "Al tumbarte con el Silver Bullet se desacoplarán los compensadores de retroceso, librándote de su calor dañino, a costa de movilidad."; SWWM_INTERTIP32 = "Los maravillantes efectos del Sandwich de Queso a la Parrilla te permiten sobrevivir básicamente cualquier cosa al autoactivarse. ¡Incluyendo hasta la de otra forma inevitable destrucción del Artefacto Ynykron!"; diff --git a/language.es_menu b/language.es_menu index 685e8d061..76ac2894f 100644 --- a/language.es_menu +++ b/language.es_menu @@ -51,6 +51,7 @@ SWWM_SVHEALTHUSE = "Forzar Auto-Uso de Salud"; SWWM_SVAMMOUSE = "Forzar Auto-Uso de Fabricadores"; SWWM_MCREDS = "Créditos de SWWM GZ"; SWWM_CLEAD = "Desarrollo Principal:"; +SWWM_CDEV2 = "Autoproclamada Maga de ZScript"; SWWM_CASSETS = "Assets Adicionales:"; SWWM_ASSBARONS = "Sprites de XDeath para Nobles del Infierno"; SWWM_ASSOTHERS = "Sprites de XDeath para Demonio, Cacodemonio, Renacido, Archvile"; @@ -59,21 +60,22 @@ SWWM_CMUSIC = "Música Usada:"; SWWM_CFANART = "Fanart de Intermisión:"; SWWM_CPATRON = "Mecenas de Patreon:"; SWWM_CTHANK = "Agradecimientos Especiales:"; -SWWM_CDRAGON2 = "(Por ser un buen dragón mascota)"; -SWWM_CLUCY2 = "(Por la fuente Tewi, que he seguido usando todos estos años)"; -SWWM_CKEKS2 = "(Por libeye, asistencia con el código de manejo de excepciones)"; -SWWM_CZN2 = "(Por el código para alineación con superficies inclinadas)"; -SWWM_CVAL2 = "(Por las huellas personalizadas para Nashgore, y por ser kawaii)"; -SWWM_CSLEDGE2 = "(Por ser un gran colega)"; -SWWM_CSLEDGE3 = "(Y también por razones de lore que me animaron a tomar parte en el modiverso de Doom)"; -SWWM_CSPY2 = "(Por el nivel de entusiasmo mostrado por todo en este mod)"; +SWWM_CMAB2 = "Por ser una grandísima amiga que cree en mí, y por inspirarme a seguir trabajando en lo que me gusta. Me alegro muchísimo de haberte conocido."; +SWWM_CDRAGON2 = "Por ser un buen dragón mascota que se preocupa por mí."; +SWWM_CLUCY2 = "Por la fuente Tewi, que he seguido usando todos estos años. Espero que estés donde estés, te encuentres bien."; +SWWM_CKEKS2 = "Por libeye, asistencia con el código de manejo de excepciones, y también por ser un friki tan guay de Touhou."; +SWWM_CZN2 = "Por el código para alineación con superficies inclinadas, y a Nash además por ser un molón tío cactus listo."; +SWWM_CVAL2 = "Por las huellas personalizadas para Nashgore, y por ser una buena amiga y conejita mona."; +SWWM_CSLEDGE2 = "Por ser un gran colega, no solo conmigo si no con todos nosotros, y también por animarme a tomar parte en el modiverso de Doom."; +SWWM_CSPY2 = "Por el nivel de entusiasmo mostrado por todo en este mod, y por ser el adorable hermano menor que nunca tuve."; SWWM_CINSP1 = "Combine Kegan, HyperUltra64, TerminusEst13, Yholl y amigos"; -SWWM_CINSP2 = "(Por servir de inspiración y por ser gente muy molona)"; +SWWM_CINSP2 = "Por servir de inspiración y por ser gente muy molona. Benditos seais todos, seguid siendo fenomenales."; SWWM_CCOMMUNITY1 = "Todo mi súper colegueo de la comunidad de Doom"; -SWWM_CCOMMUNITY2 = "(Por ayudarme a seguir trabajando en esto, y por todo el tiempo que hemos compartido)"; -SWWM_CCOMMUNITY3 = "(Por muchos más años de Doom. ¡Os adoro!)"; -SWWM_CDEVS1 = "Randi, Graf, Rachael, Mental, dpJudas y el resto del equipo de desarrollo de GZDoom"; -SWWM_CDEVS2 = "(Por su trabajo en el source port que me ha devuelto la fe en el modding. ¡Sois la caña!)"; +SWWM_CCOMMUNITY2 = "Por ayudarme a seguir trabajando en esto, y por todo el tiempo que compartimos. Por muchos más años de Doom. ¡Os adoro!"; +SWWM_CDEVS1 = "Randi, Graf, Rachael y el resto del equipo de desarrollo de GZDoom"; +SWWM_CDEVS2 = "Por vuestro trabajo en el source port que me ha devuelto la fe en el modding. No me importa lo que piensen los demás, sois la caña."; +SWWM_CYOU1 = "Tú"; +SWWM_CYOU2 = "Por jugar a este mod, muchísimas gracias."; SWWM_CLOCAL = "Traducción:"; SWWM_LRUS = "Ruso"; SWWM_FORCEDISABLE = "Forzar Desactivado"; diff --git a/language.version b/language.version index f5c8297b7..6a97b9b90 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r611 \cu(Tue 10 Nov 15:55:47 CET 2020)"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r613 \cu(Wed 11 Nov 20:15:09 CET 2020)"; diff --git a/menudef.txt b/menudef.txt index 1630bc1a4..bf61400c2 100644 --- a/menudef.txt +++ b/menudef.txt @@ -120,127 +120,6 @@ OptionMenu "SWWMOptionMenu" Option "$SWWM_LDSPOIL", "swwm_ldspoil", "YesNo" } -OptionMenu "SWWMCreditsMenu" -{ - Title "$SWWM_MCREDS" - - StaticText "$SWWM_CLEAD", "Blue" - StaticText " " - StaticText "Marisa Kirisame", "Sapphire" - StaticText " " - StaticText "$SWWM_CASSETS", "Blue" - StaticText " " - StaticText "Bethesda Game Studios", "Sapphire" - StaticText "Fallout: New Vegas", "White" - StaticText "Fallout 4", "White" - StaticText " " - StaticText "Epic Games", "Sapphire" - StaticText "Unreal", "White" - StaticText "Unreal Tournament", "White" - StaticText "Unreal Tournament 2004", "White" - StaticText "Unreal Tournament 3", "White" - StaticText " " - StaticText "Ion Storm", "Sapphire" - StaticText "Deus Ex", "White" - StaticText " " - StaticText "Looking Glass Studios", "Sapphire" - StaticText "Thief", "White" - StaticText "System Shock 2", "White" - StaticText " " - StaticText "People Can Fly", "Sapphire" - StaticText "Painkiller", "White" - StaticText " " - StaticText "Tripwire Interactive", "Sapphire" - StaticText "Killing Floor", "White" - StaticText " " - StaticText "From Software", "Sapphire" - StaticText "Dark Souls", "White" - StaticText "Dark Souls II", "White" - StaticText "Dark Souls III", "White" - StaticText " " - StaticText "Amuscaria", "Sapphire" - StaticText "$SWWM_ASSBARONS", "White" - StaticText " " - StaticText "Ryan Cordell", "Sapphire" - StaticText "$SWWM_ASSOTHERS", "White" - StaticText " " - StaticText "SiFi270", "Sapphire" - StaticText "$SWWM_ASSKEEN", "White" - StaticText " " - StaticText "$SWWM_CMUSIC", "Blue" - StaticText " " - StaticText "Teque", "Sapphire" - StaticText "Traumatic State", "White" - StaticText "Dragony", "White" - StaticText "Hidden Tune #242", "White" - StaticText " " - StaticText "$SWWM_CFANART", "Blue" - StaticText " " - StaticText "Substance20 (@S20TBL)", "Sapphire" - StaticText "Captain J (@Jho7835)", "Sapphire" - StaticText "Redead-ITA", "Sapphire" - StaticText "Sgt. Shivers (@Sgt_Shivers_)", "Sapphire" - StaticText "Moa Dixøn / Endie (@MoaDixon)", "Sapphire" - StaticText " " - StaticText "$SWWM_CLOCAL", "Blue" - StaticText " " - StaticText "$SWWM_LRUS", "Sapphire" - StaticText "Blueberry", "White" - StaticText " " - StaticText "$SWWM_CPATRON", "Blue" - StaticText " " - StaticText "Snacks", "Sapphire" - StaticText "john", "Sapphire" - StaticText "Alexa Jones-Gonzales", "Sapphire" - StaticText "Jonas Höglund", "Sapphire" - StaticText "Lilian Lamp", "Sapphire" - StaticText "Valerie Thiessen", "Sapphire" - StaticText "Corey Hectus", "Sapphire" - StaticText "Dac", "Sapphire" - StaticText "Pietro Gagliardi", "Sapphire" - StaticText "Xada Xephron", "Sapphire" - StaticText "NekoMithos", "Sapphire" - StaticText "LordMisfit", "Sapphire" - StaticText "m8f", "Sapphire" - StaticText "3d0xp0xy", "Sapphire" - StaticText " " - StaticText "$SWWM_CTHANK", "Blue" - StaticText " " - StaticText "Marrub, Ribonucleic Asshat", "Heliotrope" - StaticText "(愛してる ♥)", "BlushPink" - StaticText " " - StaticText "KynikossDragonn", "Sapphire" - StaticText "$SWWM_CDRAGON2", "White" - StaticText " " - StaticText "Lucy", "Sapphire" - StaticText "$SWWM_CLUCY2", "White" - StaticText " " - StaticText "KeksDose", "Sapphire" - StaticText "$SWWM_CKEKS2", "White" - StaticText " " - StaticText "ZZYZX, Nash", "Sapphire" - StaticText "$SWWM_CZN2", "White" - StaticText " " - StaticText "Valerie Lavender", "Sapphire" - StaticText "$SWWM_CVAL2", "White" - StaticText " " - StaticText "CptSledge", "Sapphire" - StaticText "$SWWM_CSLEDGE2", "White" - StaticText "$SWWM_CSLEDGE3", "White" - StaticText " " - StaticText "a1337spy", "Sapphire" - StaticText "$SWWM_CSPY2", "White" - StaticText " " - StaticText "$SWWM_CINSP1", "Sapphire" - StaticText "$SWWM_CINSP2", "White" - StaticText " " - StaticText "$SWWM_CCOMMUNITY1", "Sapphire" - StaticText "$SWWM_CCOMMUNITY2", "White" - StaticText "$SWWM_CCOMMUNITY3", "White" - StaticText " " - StaticText "$SWWM_CDEVS1", "Sapphire" - StaticText "$SWWM_CDEVS2", "White" -} AddOptionMenu "OptionsMenu" { Submenu "$SWWM_MTITLE", "SWWMOptionMenu" diff --git a/zscript.txt b/zscript.txt index ced9b4ce8..71e44519a 100644 --- a/zscript.txt +++ b/zscript.txt @@ -34,6 +34,7 @@ version "4.5" #include "zscript/swwm_vanillaboss.zsc" #include "zscript/swwm_blod.zsc" #include "zscript/swwm_help.zsc" +#include "zscript/swwm_credits.zsc" // items #include "zscript/swwm_health.zsc" #include "zscript/swwm_armor.zsc" diff --git a/zscript/swwm_credits.zsc b/zscript/swwm_credits.zsc new file mode 100644 index 000000000..d7033b2b0 --- /dev/null +++ b/zscript/swwm_credits.zsc @@ -0,0 +1,421 @@ +// credits menu +Class SWWMCreditsEntry ui +{ + String title; + bool MariHack; + TextureID MariSprite[15]; + int tics, cur; + BrokenLines btext; + Font fnt; + int width, height; + int titlecol, btextcol; + + SWWMCreditsEntry Init( Font f, String t, String b = "", int c1 = Font.CR_SAPPHIRE, int c2 = Font.CR_WHITE, bool mari = false ) + { + if ( mari ) + { + MariHack = true; + for ( int i=0; i<15; i++ ) + MariSprite[i] = TexMan.CheckForTexture(String.Format("graphics/Credits/MariSprite%d.png",i),TexMan.Type_Any); + tics = 3; + cur = 0; + } + fnt = f; + titlecol = c1; + btextcol = c2; + title = StringTable.Localize(t); + if ( b == "" ) + { + width = CalcWidth(); + height = CalcHeight(); + return self; + } + String b2 = StringTable.Localize(b); + btext = fnt.BreakLines(b2,320); + width = CalcWidth(); + height = CalcHeight(); + return self; + } + + private int CalcWidth() + { + int len = fnt.StringWidth(title); + if ( !btext ) return len; + for ( int i=0; i len ) len = len2; + } + return len; + } + + private int CalcHeight() + { + int h = 0; + if ( MariHack ) h = 148; + h += fnt.GetHeight(); + if ( !btext ) return h; + h += 6; + h += fnt.GetHeight()*btext.Count(); + return h; + } + + void Ticker() + { + if ( !MariHack ) return; + if ( tics > 0 ) tics--; + if ( !tics ) + { + cur = (cur+1)%15; + tics = 3; + } + } + + double Draw( Vector2 ss, double x, double y ) + { + // don't draw if we're offscreen, saves time + if ( (y+height < 0) || (y > ss.y) ) return height; + double yy = y; + if ( MariHack ) + { + yy += 148; + Screen.DrawTexture(MariSprite[cur],false,x,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + } + int w = fnt.StringWidth(title); + double xx = x-w/2; + Screen.DrawText(fnt,titlecol,xx,yy,title,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( !btext ) return height; + // underline + int cw = int(ceil((w+8)/6.))*6; + xx = x-cw/2; + for ( int i=0; i cdev, cassets, cmusic, cfanart, clocal, cpatrons, cthanks; + transient CVar fuzz, lang; + String oldlang; + transient Font bfnt, sfnt; + Vector2 ss; + double hs; + int logow, logoh; + + String oldmus; + int oldorder; + bool oldloop; + + const ENTRY_PAD = 8; + const SECTION_PAD = 10; + const SECTION_SHIFT = -4; + + double spos, speed; + int theight; + + void UpdateFonts() + { + if ( !bfnt ) bfnt = Font.GetFont('SWWMBigFont'); + if ( !lang ) lang = CVar.GetCVar('language',players[consoleplayer]); + String curlang = lang.GetString(); + if ( !sfnt || (curlang != oldlang) ) sfnt = (curlang ~== "jp")?Font.GetFont('MPlusShaded'):Font.GetFont('TewiShaded'); + oldlang = curlang; + } + void UpdateSize() + { + hs = max(1.,min(floor(Screen.GetWidth()/640),floor(Screen.GetHeight()/266))); + ss = (Screen.GetWidth(),Screen.GetHeight())/hs; + } + + override void Init( Menu parent ) + { + Super.Init(parent); + bgtex = TexMan.CheckForTexture("graphics/tempbg.png",TexMan.Type_Any); + UpdateFonts(); + UpdateSize(); + logo = TexMan.CheckForTexture("graphics/M_SWWM.png",TexMan.Type_Any); + [logow, logoh] = TexMan.GetSize(logo); + stitle = StringTable.Localize("$SWWM_CSTITLE"); + sdev = StringTable.Localize("$SWWM_CLEAD"); + sassets = StringTable.Localize("$SWWM_CASSETS"); + smusic = StringTable.Localize("$SWWM_CMUSIC"); + sfanart = StringTable.Localize("$SWWM_CFANART"); + slocal = StringTable.Localize("$SWWM_CLOCAL"); + spatrons = StringTable.Localize("$SWWM_CPATRON"); + sthanks = StringTable.Localize("$SWWM_CTHANK"); + cdev.Push(new("SWWMCreditsEntry").Init(sfnt,"Marisa Kirisame","$SWWM_CDEV2",mari:true)); + cassets.Push(new("SWWMCreditsEntry").Init(sfnt,"Bethesda Game Studios","Fallout: New Vegas\nFallout 4")); + cassets.Push(new("SWWMCreditsEntry").Init(sfnt,"Epic Games","Unreal\nUnreal Tournament\nUnreal Tournament 2004\nUnreal Tournament 3")); + cassets.Push(new("SWWMCreditsEntry").Init(sfnt,"Ion Storm","Deus Ex")); + cassets.Push(new("SWWMCreditsEntry").Init(sfnt,"Looking Glass Studios","Thief\nSystem Shock 2")); + cassets.Push(new("SWWMCreditsEntry").Init(sfnt,"People Can Fly","Painkiller")); + cassets.Push(new("SWWMCreditsEntry").Init(sfnt,"Tripwire Interactive","Killing Floor")); + cassets.Push(new("SWWMCreditsEntry").Init(sfnt,"From Software","Dark Souls\nDark Souls II\nDark Souls III")); + cassets.Push(new("SWWMCreditsEntry").Init(sfnt,"Amuscaria","$SWWM_ASSBARONS")); + cassets.Push(new("SWWMCreditsEntry").Init(sfnt,"Ryan Cordell","$SWWM_ASSOTHERS")); + cassets.Push(new("SWWMCreditsEntry").Init(sfnt,"SiFi270","$SWWM_ASSKEEN")); + cmusic.Push(new("SWWMCreditsEntry").Init(sfnt,"Teque","Traumatic State\nDragony\nHidden Tune #242")); + cfanart.Push(new("SWWMCreditsEntry").Init(sfnt,"Substance20 (@S20TBL)")); + cfanart.Push(new("SWWMCreditsEntry").Init(sfnt,"Captain J (@Jho7835)")); + cfanart.Push(new("SWWMCreditsEntry").Init(sfnt,"Redead-ITA")); + cfanart.Push(new("SWWMCreditsEntry").Init(sfnt,"Sgt. Shivers (@Sgt_Shivers_)")); + cfanart.Push(new("SWWMCreditsEntry").Init(sfnt,"Moa Dixøn / Endie (@MoaDixon)")); + clocal.Push(new("SWWMCreditsEntry").Init(sfnt,"Blueberry","$SWWM_LRUS")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Snacks")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"john")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Alexa Jones-Gonzales")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Jonas Höglund")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Lilian Lamp")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Valerie Thiessen")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Corey Hectus")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Dac")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Pietro Gagliardi")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"Xada Xephron")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"NekoMithos")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"LordMisfit")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"m8f")); + cpatrons.Push(new("SWWMCreditsEntry").Init(sfnt,"3d0xp0xy")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"Marrub","$SWWM_CMAB2",Font.FindFontColor('Heliotrope'),Font.FindFontColor('BlushPink'))); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"KynikossDragonn","$SWWM_CDRAGON2")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"Lucy","$SWWM_CLUCY2")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"KeksDose","$SWWM_CKEKS2")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"ZZYZX & Nash","$SWWM_CZN2")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"Val Pal","$SWWM_CVAL2")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"CptSledge","$SWWM_CSLEDGE2")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"a1337spy","$SWWM_CSPY2")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"$SWWM_CINSP1","$SWWM_CINSP2")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"$SWWM_CCOMMUNITY1","$SWWM_CCOMMUNITY2")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"$SWWM_CDEVS1","$SWWM_CDEVS2")); + cthanks.Push(new("SWWMCreditsEntry").Init(sfnt,"$SWWM_CYOU1","$SWWM_CYOU2")); + speed = 16.; + spos = (ss.y-logoh)/2; + // calc total height + theight = logoh; + theight += 7*(SECTION_PAD+bfnt.GetHeight()); + for ( int i=0; i ss.y) ) return logoh; + Screen.DrawTexture(logo,true,x-logow/2,y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + Screen.DrawText(sfnt,Font.CR_SAPPHIRE,x-sfnt.StringWidth(stitle)/2,y+(logoh-24),stitle,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + return logoh; + } + double DrawSection( double x, double y, String txt ) + { + // don't draw if we're offscreen, saves time + y += SECTION_SHIFT; + if ( (y+bfnt.GetHeight() < 0) || (y > ss.y) ) return bfnt.GetHeight(); + Screen.DrawText(bfnt,Font.CR_BLUE,x-bfnt.StringWidth(txt)/2,y,txt,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + return bfnt.GetHeight(); + } + override void Drawer() + { + Super.Drawer(); + if ( !fuzz ) fuzz = CVar.GetCvar('swwm_fuzz',players[consoleplayer]); + if ( fuzz.GetBool() ) + { + Vector2 tsize = TexMan.GetScaledSize(bgtex); + double zoom = max(ceil(Screen.GetWidth()/tsize.x),ceil(Screen.GetHeight()/tsize.y)); + Vector2 vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom; + Screen.DrawTexture(bgtex,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),DTA_Alpha,.8); + } + else Screen.Dim("Black",.8,0,0,Screen.GetWidth(),Screen.GetHeight()); + UpdateFonts(); + UpdateSize(); + // logo + double yy = spos; + double xx = ss.x/2.; + yy += DrawLogo(xx,yy); + // developer + yy += SECTION_PAD; + yy += DrawSection(xx,yy,sdev); + for ( int i=0; i ss.y ) spos = -theight; + cdev[0].Ticker(); + } + override bool TranslateKeyboardEvents() + { + return false; + } + override bool OnUIEvent( UIEvent ev ) + { + switch ( ev.type ) + { + case UIEvent.Type_KeyDown: + if ( ev.KeyChar == UIEvent.Key_Escape ) + { + // gotta manually send this one + MenuEvent(MKEY_Back,false); + return true; + } + if ( ev.KeyChar == UIEvent.Key_Backspace ) + { + spos = (ss.y-logoh)/2; + speed = 16.; + return true; + } + if ( ev.KeyChar == UIEvent.Key_Down ) + { + speed = 48.; + return true; + } + if ( ev.KeyChar == UIEvent.Key_PgDn ) + { + speed = 96.; + return true; + } + if ( ev.KeyChar == UIEvent.Key_Up ) + { + speed = -48.; + return true; + } + if ( ev.KeyChar == UIEvent.Key_PgUp ) + { + speed = -96.; + return true; + } + if ( ev.KeyChar == UIEvent.Key_Return ) + { + speed = 0.; + return true; + } + break; + case UIEvent.Type_KeyUp: + if ( (ev.KeyChar == UIEvent.Key_Down) || (ev.KeyChar == UIEvent.Key_Up) + || (ev.KeyChar == UIEvent.Key_PgDn) || (ev.KeyChar == UIEvent.Key_PgUp) + || (ev.KeyChar == UIEvent.Key_Return) ) + { + speed = 16.; + return true; + } + break; + } + return Super.OnUIEvent(ev); + } + override bool MenuEvent( int mkey, bool fromcontroller ) + { + switch ( mkey ) + { + case MKEY_Back: + // reset music + S_ChangeMusic(oldmus,oldorder,oldloop); + Close(); + let m = GetCurrentMenu(); + MenuSound(m?"menu/backup":"menu/clear"); + if ( !m ) menuDelegate.MenuDismissed(); + return true; + } + return false; + } +}