Quadravol can be picked up and selected, more later.

Removed subpixel shader (causes rendering issues).
This commit is contained in:
Mari the Deer 2022-08-13 20:27:51 +02:00
commit b9cfcaee04
25 changed files with 171 additions and 20 deletions

View file

@ -1,2 +1,3 @@
canvastexture LOGOFADE 4 4
canvastexture SHEENLED 128 128
canvastexture QUADRLED 64 64

View file

@ -175,6 +175,26 @@ Object GoldShell
Frame "XZW1" { light "GOLDSHELLLIGHT" }
}
PointLight QUADAMMOLIGHT
{
Color 0.4 0.25 0.0
Size 20
Offset 0 16 0
Attenuate 1
}
Object QuadravolAmmo
{
Frame "XZW1" { light "QUADAMMOLIGHT" }
}
Object QuadravolAmmo2
{
Frame "XZW1" { light "QUADAMMOLIGHT" }
}
Object QuadravolAmmo3
{
Frame "XZW1" { light "QUADAMMOLIGHT" }
}
PointLight SPARKUNITLIGHT
{
Color 0.25 0.15 0.3
@ -186,6 +206,10 @@ Object SparkUnit
{
Frame "XZW1" { light "SPARKUNITLIGHT" }
}
Object SparkUnit2
{
Frame "XZW1" { light "SPARKUNITLIGHT" }
}
PointLight FABTIER1LIGHT
{

5
gldefs.quadravol Normal file
View file

@ -0,0 +1,5 @@
HardwareShader Texture "models/QuadLED.png"
{
Shader "shaders/glsl/BrightCanvas.fp"
Texture "scrtex" "QUADRLED"
}

View file

@ -1,8 +1,7 @@
HardwareShader Texture "models/SheenLED.png"
{
Shader "shaders/glsl/Subpixel.fp"
Shader "shaders/glsl/BrightCanvas.fp"
Texture "scrtex" "SHEENLED"
Texture "pixtex" "textures/subpixel.png"
}
PointLight SHEENTLIGHT
{

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r318 \cu(Sat 13 Aug 16:09:26 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r318 \cu(2022-08-13 16:09:26)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r319 \cu(Sat 13 Aug 20:27:51 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r319 \cu(2022-08-13 20:27:51)\c-";

View file

@ -12,3 +12,60 @@ Model "Quadravol"
FrameIndex XZW1 A 0 0
}
Model "Quadravol"
{
Path "models"
Model 1 "Quadravol1st_d.3d"
SurfaceSkin 1 0 "DemoTags.png"
SurfaceSkin 1 1 "DemoArms.png"
SurfaceSkin 1 2 "DemoSoft.png"
SurfaceSkin 1 3 "Quadravol.png"
SurfaceSkin 1 4 "QuadLED.png"
AngleOffset -90
Scale -0.01 0.005 0.01
// Still
FrameIndex XZW2 A 1 0
// Deselect
FrameIndex XZW2 B 1 1
FrameIndex XZW2 C 1 2
FrameIndex XZW2 D 1 3
FrameIndex XZW2 E 1 4
FrameIndex XZW2 F 1 5
FrameIndex XZW2 G 1 6
FrameIndex XZW2 H 1 7
FrameIndex XZW2 I 1 8
FrameIndex XZW2 J 1 9
FrameIndex XZW2 K 1 10
FrameIndex XZW2 L 1 11
FrameIndex XZW2 M 1 12
FrameIndex XZW2 N 1 13
FrameIndex XZW2 O 1 14
FrameIndex XZW2 P 1 15
FrameIndex XZW2 Q 1 16
FrameIndex XZW2 R 1 17 // Select
FrameIndex XZW2 S 1 18
FrameIndex XZW2 T 1 19
FrameIndex XZW2 U 1 20
FrameIndex XZW2 V 1 21
FrameIndex XZW2 W 1 22
FrameIndex XZW2 X 1 23
FrameIndex XZW2 Y 1 24
FrameIndex XZW2 Z 1 25
FrameIndex XZW3 A 1 26
FrameIndex XZW3 B 1 27
FrameIndex XZW3 C 1 28
FrameIndex XZW3 D 1 29
FrameIndex XZW3 E 1 30
FrameIndex XZW3 F 1 31
FrameIndex XZW3 G 1 32
FrameIndex XZW3 H 1 33
FrameIndex XZW3 I 1 34
FrameIndex XZW3 J 1 35
FrameIndex XZW3 K 1 36
FrameIndex XZW3 L 1 37
FrameIndex XZW3 M 1 38
FrameIndex XZW3 N 1 39
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 86 B

Before After
Before After

Binary file not shown.

BIN
models/QuadLEDBase.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

BIN
models/QuadLEDCharge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

BIN
models/QuadLEDRound.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Before After
Before After

BIN
models/Quadravol1st.blend Normal file

Binary file not shown.

BIN
models/Quadravol1st_a.3d Normal file

Binary file not shown.

BIN
models/Quadravol1st_d.3d Normal file

Binary file not shown.

View file

@ -0,0 +1,8 @@
// Make canvas textures fullbright, basically
void SetupMaterial( inout Material mat )
{
mat.Base = texture(scrtex,vec2(vTexCoord.s,1.-vTexCoord.t)); // canvas textures are upside-down when used by models
mat.Normal = ApplyNormalMap(vTexCoord.st);
mat.Bright = vec4(1.);
}

View file

@ -1,15 +0,0 @@
// RGB subpixel filter for Ammo LEDs
// GRIDSZ = how many subpixels are in the texture (for layouts where subpixel patterns alternate)
#ifndef GRIDSZ
#define GRIDSZ vec2(1.,1.)
#endif
void SetupMaterial( inout Material mat )
{
mat.Base = texture(scrtex,vec2(vTexCoord.s,1.-vTexCoord.t)); // canvas textures are upside-down when used by models
vec2 uv = (vTexCoord.st*vec2(textureSize(scrtex,0)))/GRIDSZ;
mat.Base *= 1.5*texture(pixtex,uv);
mat.Normal = ApplyNormalMap(vTexCoord.st);
mat.Bright = vec4(1.);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -14,7 +14,7 @@ Class HeavyMahSheenGun : SWWMWeapon
transient SpreadSlugTracer st;
transient ui Canvas AmmoLed;
ui TextureID AmmoLedBase, AmmoLedBar, AmmoLedSpeed, AmmoLedNums, AmmoLedCam;
ui TextureID AmmoLedBase, AmmoLedBar, AmmoLedSpeed, AmmoLedNums;
override void RenderTexture( RenderEvent e )
{

View file

@ -6,9 +6,50 @@ Class Quadravol : SWWMWeapon
int clipcount;
int chargelevel;
bool chambered, charged;
bool onehand;
Property ClipCount : clipcount;
transient ui Canvas AmmoLed;
ui TextureID AmmoLedBase, AmmoLedRound, AmmoLedCharge;
override void RenderTexture( RenderEvent e )
{
if ( !AmmoLed ) AmmoLed = TexMan.GetCanvas("QUADRLED");
if ( !AmmoLedBase ) AmmoLedBase = TexMan.CheckForTexture("models/QuadLEDBase.png",TexMan.Type_Any);
if ( !AmmoLedRound ) AmmoLedRound = TexMan.CheckForTexture("models/QuadLEDRound.png",TexMan.Type_Any);
if ( !AmmoLedCharge ) AmmoLedCharge = TexMan.CheckForTexture("models/QuadLEDCharge.png",TexMan.Type_Any);
AmmoLed.Clear(0,0,64,64,0xFF101033);
AmmoLed.DrawTexture(AmmoLedBase,false,0,0,DTA_LegacyRenderStyle,STYLE_Add,DTA_Color,0xFF00FFFF);
Vector3 lainbow = SWWMUtility.HSVToRGB(((5-chargelevel)/7.5,1.,1.));
Color col = Color(255,int(lainbow.x*255),int(lainbow.y*255),int(lainbow.z*255));
AmmoLed.DrawTexture(AmmoLedCharge,false,12,4,DTA_SrcX,(chargelevel%4)*64,DTA_SrcY,(chargelevel/4)*64,DTA_SrcWidth,40,DTA_SrcHeight,40,DTA_DestWidth,40,DTA_DestHeight,40,DTA_LegacyRenderStyle,STYLE_Add,DTA_Color,(chargelevel>0)?col:0xFF00FF00);
for ( int i=0; i<clipcount; i++ ) AmmoLed.DrawTexture(AmmoLedRound,false,36-8*i,52,DTA_LegacyRenderStyle,STYLE_Add,DTA_Color,0xFF0000FF);
if ( chambered ) AmmoLed.DrawTexture(AmmoLedRound,false,52,52,DTA_LegacyRenderStyle,STYLE_Add,DTA_Color,charged?0xFF0000FF:0xFF00FF00);
}
override bool ReportHUDAmmo()
{
return (chargelevel>0)||(chambered&&!charged)||(clipcount>0)||(Ammo1.Amount > 0);
}
override bool CheckAmmo( int firemode, bool autoswitch, bool requireammo, int ammocount )
{
if ( (firemode == PrimaryFire) || (firemode == EitherFire) )
{
if ( (chargelevel > 0) || (chambered && !charged) || (clipcount > 0) || (Ammo1.Amount > 0) ) return true;
if ( autoswitch ) PlayerPawn(Owner).PickNewWeapon(null);
return false;
}
return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount);
}
override void PlayUpSound( Actor origin )
{
if ( onehand ) origin.A_StartSound("quadshot/selectfast",CHAN_WEAPON,CHANF_OVERLAP);
else origin.A_StartSound(UpSound,CHAN_WEAPON,CHANF_OVERLAP);
}
Default
{
Tag "$T_QUADRAVOL";
@ -19,12 +60,14 @@ Class Quadravol : SWWMWeapon
Weapon.SlotNumber 6;
Weapon.SlotPriority 2.;
Weapon.SelectionOrder 650;
Weapon.UpSound "quadshot/select";
Weapon.AmmoType1 "QuadravolAmmo";
Weapon.AmmoGive1 1;
SWWMWeapon.DropAmmoType "SWWMRocketAmmoSmall";
Quadravol.ClipCount 5;
Stamina 80000;
+SWWMWEAPON.NOFIRSTGIVE;
+SWWMWEAPON.HASSCRTEX;
+WEAPON.EXPLOSIVE;
Radius 28;
Height 32;
@ -34,5 +77,34 @@ Class Quadravol : SWWMWeapon
Spawn:
XZW1 A -1;
Stop;
Select:
XZW2 R 1 A_FullRaise();
XZW2 STUVWXYZ 1;
XZW3 ABCDEFGHI 1;
XZW3 JKLMN 2;
Goto Ready;
Ready:
XZW2 A 1 A_WeaponReady();
Wait;
Fire:
XZW2 A 1;
Goto Ready;
AltFire:
XZW2 A 1;
Goto Ready;
Reload:
XZW2 A 1;
Goto Ready;
Zoom:
XZW2 A 1;
Goto Ready;
User1:
XZW2 A 1;
Goto Ready;
Deselect:
XZW2 A 1 A_StartSound("quadshot/deselect",CHAN_WEAPON,CHANF_OVERLAP);
XZW2 BCDEFGHIJKLMNOPQR 1;
XZW2 R -1 A_FullLower();
Stop;
}
}