Remove old branding.

This commit is contained in:
Mari the Deer 2022-07-05 20:37:09 +02:00
commit 460ee725e2
28 changed files with 33 additions and 231 deletions

View file

@ -114,7 +114,6 @@ nosave noarchive bool swwm_tooltipnote = false; // set if the note on how to dis
nosave bool swwm_nointertips = false; // hides intermission tips, in case you don't want to see them
server bool swwm_demoslayer = false; // if you're below 100hp, enemies drop healing orbs when you kill them
nosave bool swwm_beepboop = false; // prompts the Demolitionist to go "beep", "boop" and "bop" when pressing any switch (may get annoying)
nosave bool swwm_oldlogo = false; // restores the old SWWM GZ logo and intro
nosave string swwm_menuposehistory = ""; // stores currently seen poses for the main menu, for shuffling
nosave string swwm_titlesubhistory = ""; // stores currently seen subtitles for the title screen, for shuffling
nosave noarchive int swwm_profstart = 0; // starts profiling as soon as handler is registered for specified >0 tics

View file

@ -58,29 +58,6 @@ HardwareShader Texture "graphics/tempbg.png"
Define "BASE_RES" = "vec2(640.,400.)"
Texture "noisetex" "textures/graynoise.png"
}
HardwareShader Texture "graphics/SWWMGZLogo.png"
{
Shader "shaders/glsl/LogoAnimated.fp"
// what no 2d arrays does to a mf
Texture "Layer1" "graphics/SWWMGZLogo_Layer1.png"
Texture "Layer2" "graphics/SWWMGZLogo_Layer2.png"
Texture "Layer3" "graphics/SWWMGZLogo_Layer3.png"
Texture "Layer4" "graphics/SWWMGZLogo_Layer4.png"
Texture "Layer5" "graphics/SWWMGZLogo_Layer5.png"
Texture "Layer6" "graphics/SWWMGZLogo_Layer6.png"
}
HardwareShader Texture "graphics/M_SWWM.png"
{
Shader "shaders/glsl/LogoAnimated.fp"
// what no 2d arrays does to a mf
Texture "Layer1" "graphics/M_SWWM_Layer1.png"
Texture "Layer2" "graphics/M_SWWM_Layer2.png"
Texture "Layer3" "graphics/M_SWWM_Layer3.png"
Texture "Layer4" "graphics/M_SWWM_Layer4.png"
Texture "Layer5" "graphics/M_SWWM_Layer5.png"
Texture "Layer6" "graphics/M_SWWM_Layer6.png"
Define "NO_BILINEAR"
}
HardwareShader Texture "graphics/NewLogo.png"
{
Shader "shaders/glsl/NewLogoAnimated.fp"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

View file

@ -663,8 +663,7 @@ SWWM_TITLEINTROA = "On that day, humankind saw itself in dire danger, facing an
SWWM_TITLEINTROB = "But one machine stood up, who fought back, who could end this whole invasion.";
SWWM_TITLEINTROC = "The demons would learn to fear that machine, who they know only by one name...";
SWWM_NTITLESCROLL = "9";
SWWM_TITLESCROLL1 = "SWWM GZ ~ Cute Robutt Whomst Love To Explode Demons";
SWWM_TITLESCROLL1_NEW = "Codename: Demolitionist ~ Cute Robutt Whomst Love To Explode Demons";
SWWM_TITLESCROLL1 = "Codename: Demolitionist ~ Cute Robutt Whomst Love To Explode Demons";
SWWM_TITLESCROLL2 = "A wondrous GZDoom gameplay mod by Marisa the Magician of UnSX Team";
SWWM_TITLESCROLL3 = "Lovingly designed 3D models with hand-painted 256-color dithered textures";
SWWM_TITLESCROLL4 = "Over 60k lines of ZScript, and still counting (god help me)";

View file

@ -203,7 +203,6 @@ SWWM_DEMOSLAYER = "Demoslayer Mode";
SWWM_BEEPBOOP = "Switch Emoting";
SWWM_VOICEAMP = "Voice Amplification";
SWWM_CLEARFX = "Clear All Effects";
SWWM_OLDLOGO = "Old Branding";
SWWM_NODEATHEXIT = "Disable Death Exits";
SWWM_EXTENDEDPICKUP = "Extend Item Size";
SWWM_VOICELOG = "Log Player Comments";
@ -375,7 +374,6 @@ TOOLTIP_SWWM_DEMOSLAYER = "Killed enemies may drop health and armor orbs.";
TOOLTIP_SWWM_BEEPBOOP = "The Demolitionist will make cute noises whenever pressing any usable line. This might get annoying, so it's optional.";
TOOLTIP_SWWM_VOICEAMP = "At their default volume, the Demolitionist's voice lines might be drowned out by in-game audio. This sets an additional amplification level so they're louder than other sounds.";
TOOLTIP_NETEVENT_SWWMCLEAREFFECTS = "Fades out any active blood, gore, debris and casings.";
TOOLTIP_SWWM_OLDLOGO = "For those who miss the days of SWWM GZ, you can restore the old title screen and main menu with this.";
TOOLTIP_SWWM_NODEATHEXIT = "This option completely negates the effects of death exits, if you don't like losing all your stuff.";
TOOLTIP_SWWM_EXTENDEDPICKUP = "Gives all items a vanilla-sized \"virtual hitbox\" that allows picking them up from farther away. Requires a map restart if changed.";
TOOLTIP_SWWM_VOICELOG = "Subtitled player comments will be saved to the Messages tab of the Demolitionist Menu.";

View file

@ -202,7 +202,6 @@ SWWM_DEMOSLAYER = "Modo Demoslayer";
SWWM_BEEPBOOP = "Ruiditos de Activación";
SWWM_VOICEAMP = "Amplificación de Voz";
SWWM_CLEARFX = "Limpiar todos los Efectos";
SWWM_OLDLOGO = "Marca Antigua";
SWWM_NODEATHEXIT = "Desactivar Salidas de Muerte";
SWWM_EXTENDEDPICKUP = "Extender Tamaño de Ítem";
SWWM_VOICELOG = "Registrar Comentarios de Jugador";
@ -379,7 +378,6 @@ TOOLTIP_SWWM_DEMOSLAYER = "Los enemigos que mates soltarán orbes de salud y arm
TOOLTIP_SWWM_BEEPBOOP = "La Demolicionista hará ruiditos adorables cuando pulse cualquier línea utilizable. Esto puede que resulte cansino, así que es opcional.";
TOOLTIP_SWWM_VOICEAMP = "A su volumen normal, las voces de la Demolicionista pueden ser ahogadas por el audio del juego. Con esto se le dá un nivel de amplificación extra para que sean más estridentes que otros sonidos.";
TOOLTIP_NETEVENT_SWWMCLEAREFFECTS = "Desvanece cualquier sangre, vísceras, escombros y casquillos activos.";
TOOLTIP_SWWM_OLDLOGO = "Para quienes echan de menos los viejos tiempos de SWWM GZ, podeis restaurar la antigua pantalla de inicio y menú principal con esto.";
TOOLTIP_SWWM_NODEATHEXIT = "Esta opción invalida completamente los efectos de las salidas de muerte, si no te gusta perder todas tus cosas.";
TOOLTIP_SWWM_EXTENDEDPICKUP = "Da a todos los ítems una \"hitbox virtual\" de tamaño vanilla que permite recogerlos a mayor distancia. Requiere reinicio de mapa si se cambia.";
TOOLTIP_SWWM_VOICELOG = "Los comentarios de jugador subtitulados se guardarán en la pestaña de Mensajes del Menú de Demolicionista.";

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r155 \cu(Tue 5 Jul 19:37:48 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r155 \cu(2022-07-05 19:37:48)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r156 \cu(Tue 5 Jul 20:37:09 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r156 \cu(2022-07-05 20:37:09)\c-";

View file

@ -164,7 +164,6 @@ OptionMenu "SWWMOptionMenu"
Option "$SWWM_INTERMUSIC", "swwm_intermusic", "YesNo"
}
Option "$SWWM_FUZZ", "swwm_fuzz", "YesNo"
Option "$SWWM_OLDLOGO", "swwm_oldlogo", "YesNo"
IfGame(Doom, Heretic)
{
Option "$SWWM_SILENCEMAP", "swwm_silencemap", "YesNo"

View file

@ -1,94 +0,0 @@
// animated SWWM GZ logo
#define overlay(a,b) (a<0.5)?(2.0*a*b):(1.0-(2.0*(1.0-a)*(1.0-b)))
const float pi = 3.14159265358979323846;
vec2 warpcoord( in vec2 uv )
{
vec2 offset;
offset.y = sin(pi*2.*(uv.x*8.+timer*.25))*.005;
offset.x = cos(pi*2.*(uv.y*4.+timer*.25))*.005;
return uv+offset;
}
// based on gimp color to alpha, but simplified
vec4 blacktoalpha( in vec4 src )
{
vec4 dst = src;
float alpha = 0.;
float a;
a = clamp(dst.r,0.,1.);
if ( a > alpha ) alpha = a;
a = clamp(dst.g,0.,1.);
if ( a > alpha ) alpha = a;
a = clamp(dst.b,0.,1.);
if ( a > alpha ) alpha = a;
if ( alpha > 0. )
{
float ainv = 1./alpha;
dst.rgb *= ainv;
}
dst.a *= alpha;
return dst;
}
#ifdef NO_BILINEAR
#define BilinearSample(x,y,z,w) texture(x,y)
#else
vec4 BilinearSample( in sampler2D tex, in vec2 pos, in vec2 size, in vec2 pxsize )
{
vec2 f = fract(pos*size);
pos += (.5-f)*pxsize;
vec4 p0q0 = texture(tex,pos);
vec4 p1q0 = texture(tex,pos+vec2(pxsize.x,0));
vec4 p0q1 = texture(tex,pos+vec2(0,pxsize.y));
vec4 p1q1 = texture(tex,pos+vec2(pxsize.x,pxsize.y));
vec4 pInterp_q0 = mix(p0q0,p1q0,f.x);
vec4 pInterp_q1 = mix(p0q1,p1q1,f.x);
return mix(pInterp_q0,pInterp_q1,f.y);
}
#endif
void SetupMaterial( inout Material mat )
{
// store these to save some time
vec2 size = vec2(textureSize(Layer1,0));
vec2 pxsize = 1./size;
// y'all ready for this multilayered madness?
vec2 uv = vTexCoord.st;
// base blank layer
vec4 base = vec4(0.,0.,0.,1.);
// first layer, blend
vec4 tmp = BilinearSample(Layer1,uv,size,pxsize);
base.rgb = mix(base.rgb,tmp.rgb,tmp.a);
// second layer, warp then add
tmp = BilinearSample(Layer2,warpcoord(uv),size,pxsize);
base.rgb += tmp.rgb;
// third layer, multiply
tmp = BilinearSample(Layer3,uv,size,pxsize);
base.rgb *= tmp.rgb;
// fourth layer, add
tmp = BilinearSample(Layer4,uv,size,pxsize);
base.rgb += tmp.rgb;
// fifth layer, add
tmp = BilinearSample(Layer5,uv,size,pxsize);
base.rgb += tmp.rgb;
// first layer again, overlay (w/ alpha blend)
tmp = BilinearSample(Layer1,uv,size,pxsize);
vec4 tmp2;
tmp2.r = overlay(base.r,tmp.r);
tmp2.g = overlay(base.g,tmp.g);
tmp2.b = overlay(base.b,tmp.b);
base.rgb = mix(base.rgb,tmp2.rgb,tmp.a);
// black to alpha
base = blacktoalpha(base);
// add alpha of first layer
base.a += BilinearSample(Layer1,uv,size,pxsize).a;
// sixth layer, alpha blend
tmp = BilinearSample(Layer6,uv,size,pxsize);
tmp2.a = tmp.a+base.a*(1-tmp.a);
tmp2.rgb = (tmp.rgb*tmp.a+base.rgb*base.a*(1-tmp.a))/tmp2.a;
// clamp
tmp2 = clamp(tmp2,vec4(0.),vec4(1.));
// ding, logo's done
mat.Base = tmp2;
}

View file

@ -93,21 +93,7 @@ GameInfo
"KirinMangaGesture",
"KirinPlushGesture"
// preload intro and menu textures
PrecacheTextures = "graphics/SWWMGZLogo.png",
"graphics/SWWMGZLogo_Layer1.png",
"graphics/SWWMGZLogo_Layer2.png",
"graphics/SWWMGZLogo_Layer3.png",
"graphics/SWWMGZLogo_Layer4.png",
"graphics/SWWMGZLogo_Layer5.png",
"graphics/SWWMGZLogo_Layer6.png",
"graphics/M_SWWM.png",
"graphics/M_SWWM_Layer1.png",
"graphics/M_SWWM_Layer2.png",
"graphics/M_SWWM_Layer3.png",
"graphics/M_SWWM_Layer4.png",
"graphics/M_SWWM_Layer5.png",
"graphics/M_SWWM_Layer6.png",
"graphics/M_DEMOCHAN.png",
PrecacheTextures = "graphics/M_DEMOLITIONIST.png",
"graphics/NewLogo.png",
"graphics/NewLogo_Grad.png",
"graphics/NewLogo_Layer1.png",
@ -127,7 +113,6 @@ GameInfo
"graphics/NewLogo_Letter11.png",
"graphics/NewLogo_Letter12.png",
"graphics/NewLogo_Letter13.png",
"graphics/M_DEMOLITIONIST.png",
"graphics/M_DEMOCHAN_BIOSPARK.png",
"graphics/M_DEMOCHAN_CANDYGUN.png",
"graphics/M_DEMOCHAN_DEEPIMPACT.png",

View file

@ -134,13 +134,10 @@ Class SWWMCreditsMenu : GenericMenu
mBigFont = Font.GetFont('TewiFontOutline');
bgtex = TexMan.CheckForTexture("graphics/tempbg.png",TexMan.Type_Any);
UpdateSize();
logo = TexMan.CheckForTexture(swwm_oldlogo?"graphics/M_SWWM.png":"graphics/M_DEMOLITIONIST.png",TexMan.Type_Any);
logo = TexMan.CheckForTexture("graphics/M_DEMOLITIONIST.png",TexMan.Type_Any);
logosz = TexMan.GetScaledSize(logo);
if ( !swwm_oldlogo )
{
logosz *= (2./3.);
logosz.y += 36.;
}
logosz *= (2./3.);
logosz.y += 36.;
stitle = StringTable.Localize("$SWWM_CSTITLE");
stitle2 = StringTable.Localize("$SWWM_CSTITLE2");
sdev = StringTable.Localize("$SWWM_CLEAD");
@ -267,8 +264,7 @@ Class SWWMCreditsMenu : GenericMenu
{
// don't draw if we're offscreen, saves time
if ( (y+logosz.y < 0) || (y > ss.y) ) return logosz.y;
if ( swwm_oldlogo ) Screen.DrawTexture(logo,true,x-logosz.x/2,y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
else Screen.DrawTexture(logo,true,x-logosz.x/2,y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ScaleX,(2./3.),DTA_ScaleY,(2./3.));
Screen.DrawTexture(logo,true,x-logosz.x/2,y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ScaleX,(2./3.),DTA_ScaleY,(2./3.));
Screen.DrawText(mSmallFont,Font.CR_SAPPHIRE,x-mSmallFont.StringWidth(stitle)/2,y+(logosz.y-28),stitle,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
// underline
int w = max(mSmallFont.StringWidth(stitle),mSmallFont.StringWidth(stitle2));

View file

@ -293,7 +293,6 @@ Class SWWMMainMenu : SWWMCleanMenu
private TextureID GetDemoTex()
{
if ( swwm_oldlogo ) return TexMan.CheckForTexture("graphics/M_DEMOCHAN.png",TexMan.Type_Any);
Array<String> done;
Array<int> candidates;
let c = CVar.FindCVar('swwm_menuposehistory');
@ -348,26 +347,21 @@ Class SWWMMainMenu : SWWMCleanMenu
double frametime = (MSTimeF()-prevms)/1000.;
double theta;
// naive, but whatever
if ( swwm_oldlogo ) theta = clamp(2.*frametime,0.,1.);
else theta = clamp(4.*frametime,0.,1.);
theta = clamp(4.*frametime,0.,1.);
if ( prevms ) demopos = SWWMUtility.Lerp(demopos,-40,theta);
double alph = clamp(1.-(demopos/100),0.,1.);
if ( !swwm_oldlogo )
{
if ( !gradtex ) gradtex = TexMan.CheckForTexture("graphics/M_GRAD.png",TexMan.Type_Any);
double scl = Screen.GetHeight()/960.;
Screen.DrawTexture(gradtex,false,0,Screen.GetHeight(),DTA_DestWidth,Screen.GetWidth(),DTA_DestHeight,256*CleanYFac_1,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,Color(0,0,0),DTA_TopOffset,256,DTA_Alpha,.35);
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,Screen.GetHeight(),DTA_Rotate,90,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,600*scl*alph,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,Color(0,0,0),DTA_TopOffset,256,DTA_Alpha,alph*.5);
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,0,DTA_Rotate,270,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,600*scl*alph,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,Color(0,0,0),DTA_TopOffset,256,DTA_Alpha,alph*.5);
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,Screen.GetHeight(),DTA_Rotate,90,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,500*scl*alph,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,Color(40,80,120),DTA_TopOffset,256,DTA_Alpha,alph);
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,0,DTA_Rotate,270,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,500*scl*alph,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,Color(40,80,120),DTA_TopOffset,256,DTA_Alpha,alph);
Screen.DrawTexture(demotex,false,Screen.GetWidth()/2,0,DTA_ScaleX,scl,DTA_ScaleY,scl,DTA_Alpha,alph,DTA_ColorOverlay,Color(int(255*(1.-(alph**2))),0,0,0));
}
else Screen.DrawTexture(demotex,false,(demopos-160)*CleanXFac_1+(Screen.GetWidth()*.5),(Screen.GetHeight()-400*CleanYFac_1)/2 + sin(gametic*GameTicRate*.1)*CleanYFac_1*8*(alph**2),DTA_CleanNoMove_1,true,DTA_Alpha,alph,DTA_ColorOverlay,Color(64+int(191*(1.-(alph**2))),0,0,0));
if ( !swwm_oldlogo ) for ( int i=0; i<mDesc.mItems.Size(); i++ )
if ( !gradtex ) gradtex = TexMan.CheckForTexture("graphics/M_GRAD.png",TexMan.Type_Any);
double scl = Screen.GetHeight()/960.;
Screen.DrawTexture(gradtex,false,0,Screen.GetHeight(),DTA_DestWidth,Screen.GetWidth(),DTA_DestHeight,256*CleanYFac_1,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,Color(0,0,0),DTA_TopOffset,256,DTA_Alpha,.35);
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,Screen.GetHeight(),DTA_Rotate,90,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,600*scl*alph,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,Color(0,0,0),DTA_TopOffset,256,DTA_Alpha,alph*.5);
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,0,DTA_Rotate,270,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,600*scl*alph,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,Color(0,0,0),DTA_TopOffset,256,DTA_Alpha,alph*.5);
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,Screen.GetHeight(),DTA_Rotate,90,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,500*scl*alph,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,Color(40,80,120),DTA_TopOffset,256,DTA_Alpha,alph);
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,0,DTA_Rotate,270,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,500*scl*alph,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,Color(40,80,120),DTA_TopOffset,256,DTA_Alpha,alph);
Screen.DrawTexture(demotex,false,Screen.GetWidth()/2,0,DTA_ScaleX,scl,DTA_ScaleY,scl,DTA_Alpha,alph,DTA_ColorOverlay,Color(int(255*(1.-(alph**2))),0,0,0));
for ( int i=0; i<mDesc.mItems.Size(); i++ )
mDesc.mItems[i].OffsetPositionY(GetMenuYOffset());
Super.Drawer();
if ( !swwm_oldlogo ) for ( int i=0; i<mDesc.mItems.Size(); i++ )
for ( int i=0; i<mDesc.mItems.Size(); i++ )
mDesc.mItems[i].OffsetPositionY(-GetMenuYOffset());
int xx, yy;
String str = StringTable.Localize("$SWWM_MODVER");
@ -382,10 +376,10 @@ Class SWWMMainMenu : SWWMCleanMenu
override bool MouseEvent( int type, int x, int y )
{
if ( !swwm_oldlogo ) for ( int i=0; i<mDesc.mItems.Size(); i++ )
for ( int i=0; i<mDesc.mItems.Size(); i++ )
mDesc.mItems[i].OffsetPositionY(GetMenuYOffset());
let res = Super.MouseEvent(type,x,y);
if ( !swwm_oldlogo ) for ( int i=0; i<mDesc.mItems.Size(); i++ )
for ( int i=0; i<mDesc.mItems.Size(); i++ )
mDesc.mItems[i].OffsetPositionY(-GetMenuYOffset());
return res;
}
@ -612,13 +606,12 @@ Class ListMenuItemSWWMStaticTextM : ListMenuItem
// scaled mod logo
class ListMenuItemSWWMLogo : ListMenuItem
{
TextureID mTexture, mOldTexture;
TextureID mTexture;
void Init( ListMenuDescriptor desc )
{
Super.Init(desc.mXpos,desc.mYpos);
mTexture = TexMan.CheckForTexture("graphics/M_DEMOLITIONIST.png",TexMan.Type_Any);
mOldTexture = TexMan.CheckForTexture("graphics/M_SWWM.png",TexMan.Type_Any);
}
private int GetMenuYOffset()
@ -629,25 +622,22 @@ class ListMenuItemSWWMLogo : ListMenuItem
override void Draw( bool selected, ListMenuDescriptor desc )
{
let tex = swwm_oldlogo?mOldTexture:mTexture;
if ( !tex.Exists() )
return;
int w = desc?desc.DisplayWidth():ListMenuDescriptor.CleanScale;
int h = desc?desc.DisplayHeight():-1;
Vector2 vs = TexMan.GetScaledSize(tex);
double scl = swwm_oldlogo?(256./vs.x):(2./3.);
Vector2 vs = TexMan.GetScaledSize(mTexture);
double scl = (2./3.);
double x;
if ( w == ListMenuDescriptor.CleanScale )
{
x = (320-vs.x*scl)/2;
double y = swwm_oldlogo?(-48):(-24+GetMenuYOffset());
double y = -24+GetMenuYOffset();
SWWMUtility.AdjustClean_1(x,y);
Screen.DrawTexture(tex,false,x,y,DTA_ScaleX,CleanXFac_1*scl,DTA_ScaleY,CleanYFac_1*scl);
Screen.DrawTexture(mTexture,false,x,y,DTA_ScaleX,CleanXFac_1*scl,DTA_ScaleY,CleanYFac_1*scl);
}
else
{
x = (w-vs.x*scl)/2;
Screen.DrawTexture(tex,false,x,swwm_oldlogo?(-48):(-24+GetMenuYOffset()),DTA_VirtualWidth,w,DTA_VirtualHeight,h,DTA_FullscreenScale,FSMode_ScaleToFit43,DTA_ScaleX,scl,DTA_ScaleY,scl);
Screen.DrawTexture(mTexture,false,x,-24+GetMenuYOffset(),DTA_VirtualWidth,w,DTA_VirtualHeight,h,DTA_FullscreenScale,FSMode_ScaleToFit43,DTA_ScaleX,scl,DTA_ScaleY,scl);
}
}
}

View file

@ -21,7 +21,6 @@ Class SWWMTitleStuff : EventHandler
ui int sline;
ui double sbase;
ui String lastlang, lastlang2;
ui bool lastlogo;
ui TitleExplosion smk[64];
ui TextureID smk_frame[19];
ui int titletimer;
@ -125,12 +124,9 @@ Class SWWMTitleStuff : EventHandler
if ( titletimer == -75 ) S_ChangeMusic("");
if ( (titletimer > -80) && (titletimer < -20) ) TickExplosions();
if ( titletimer == 0 ) S_ChangeMusic("music/TRAUMATI.XM");
if ( !swwm_oldlogo )
{
// title lettering
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);
}
// title lettering
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);
titletimer++;
EventHandler.SendNetworkEvent("swwmtitle.timer",titletimer);
if ( menuactive && (titletimer < -80) && (titletimer >= -300) ) titletimer = -80;
@ -207,24 +203,18 @@ Class SWWMTitleStuff : EventHandler
else Screen.Dim("Black",1.,0,0,Screen.GetWidth(),Screen.GetHeight());
double hs = max(min(floor(Screen.GetWidth()/320.),floor(Screen.GetHeight()/200.)),1.);
Vector2 ss = (Screen.GetWidth(),Screen.GetHeight())/hs;
if ( swwm_oldlogo ) Render_OldTitle(e,ss);
else Render_NewTitle(e);
Render_NewTitle(e);
if ( (titletimer/GameTicRate) < 30 ) return;
// scrolls
if ( (scrolls.Size() <= 0 ) || (lastlang != language) || ((sline == 0) && (lastlogo != swwm_oldlogo)) )
if ( (scrolls.Size() <= 0 ) || (lastlang != language) )
{
scrolls.Clear();
int nstr = StringTable.Localize("$SWWM_NTITLESCROLL").ToInt();
for ( int i=1; i<=nstr; i++ )
{
if ( (i == 1) && !swwm_oldlogo ) scrolls.Push(StringTable.Localize("$SWWM_TITLESCROLL1_NEW"));
else scrolls.Push(StringTable.Localize("$SWWM_TITLESCROLL"..i));
}
for ( int i=1; i<=nstr; i++ ) scrolls.Push(StringTable.Localize("$SWWM_TITLESCROLL"..i));
sbase = (titletimer+e.FracTic)/GameTicRate;
if ( sline >= scrolls.Size() ) sline = 0;
}
lastlang = language;
lastlogo = swwm_oldlogo;
// estimate scroll length
double llen = mSmallFont.StringWidth(scrolls[sline]);
double soffset = 40*((titletimer+e.FracTic)/GameTicRate-sbase);
@ -262,41 +252,6 @@ Class SWWMTitleStuff : EventHandler
}
}
private ui void Render_OldTitle( RenderEvent e, Vector2 ss )
{
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);
double ar = Screen.GetAspectRatio();
Vector2 tsize = TexMan.GetScaledSize(tex[0]);
double sar = tsize.x/tsize.y;
Vector2 vsize;
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(((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(((titletimer+e.FracTic)/GameTicRate)-10,0.,1.);
alf *= 1.-clamp(((titletimer+e.FracTic)/GameTicRate)-16,0.,1.);
Screen.DrawText(mSmallFont,Font.CR_WHITE,(ss.x-mSmallFont.StringWidth(str))/2,(ss.y-mSmallFont.GetHeight())/2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf);
if ( bFadeIn ) Screen.Dim("Black",1.-clamp(((titletimer+e.FracTic)/GameTicRate)-22,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
else
{
str = StringTable.Localize("$SWWM_TITLEMODBY");
alf = clamp(((titletimer+e.FracTic)/GameTicRate)-18,0.,1.);
alf *= 1.-clamp(((titletimer+e.FracTic)/GameTicRate)-24,0.,1.);
Screen.DrawText(mSmallFont,Font.CR_WHITE,(ss.x-mSmallFont.StringWidth(str))/2,(ss.y-mSmallFont.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(((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);
}
private ui void Render_NewTitle( RenderEvent e )
{
if ( !tex[4] ) tex[4] = TexMan.CheckForTexture("graphics/NewLogo.png",TexMan.Type_Any);