Merge branch 'scriptex' into devel
This commit is contained in:
commit
bb367e75c5
13 changed files with 46 additions and 5 deletions
|
|
@ -1 +1,2 @@
|
|||
cameratexture LOGOFADE 64 64
|
||||
canvastexture SHEENLED 128 128
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
HardwareShader Texture "models/SheenLED.png"
|
||||
{
|
||||
Shader "shaders/glsl/Subpixel.fp"
|
||||
Texture "scrtex" "SHEENLED"
|
||||
Texture "pixtex" "textures/subpixel.png"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r215 \cu(Mon 25 Jul 09:29:13 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r215 \cu(2022-07-25 09:29:13)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r216 \cu(Tue 26 Jul 17:13:42 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r216 \cu(2022-07-26 17:13:42)\c-";
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 96 B |
Binary file not shown.
BIN
models/SheenLEDBar.png
Normal file
BIN
models/SheenLEDBar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 B |
BIN
models/SheenLEDBase.png
Normal file
BIN
models/SheenLEDBase.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
models/SheenLEDNums.png
Normal file
BIN
models/SheenLEDNums.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
BIN
models/SheenLEDSpeed.png
Normal file
BIN
models/SheenLEDSpeed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1 KiB |
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
void SetupMaterial( inout Material mat )
|
||||
{
|
||||
mat.Base = getTexel(vTexCoord.st);
|
||||
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(tex,0)))/GRIDSZ;
|
||||
mat.Base *= 1.5*texture(pixtex,uv);
|
||||
mat.Normal = ApplyNormalMap(vTexCoord.st);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,35 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
transient ui SmoothDynamicValueInterpolator HeatInter;
|
||||
transient SpreadSlugTracer st;
|
||||
|
||||
transient ui Canvas AmmoLed;
|
||||
ui TextureID AmmoLedBase, AmmoLedBar, AmmoLedSpeed, AmmoLedNums, AmmoLedCam;
|
||||
|
||||
override void RenderTexture( RenderEvent e )
|
||||
{
|
||||
if ( !AmmoLed ) AmmoLed = TexMan.GetCanvas("SHEENLED");
|
||||
if ( !AmmoLedBase ) AmmoLedBase = TexMan.CheckForTexture("models/SheenLEDBase.png",TexMan.Type_Any);
|
||||
if ( !AmmoLedBar ) AmmoLedBar = TexMan.CheckForTexture("models/SheenLEDBar.png",TexMan.Type_Any);
|
||||
if ( !AmmoLedSpeed ) AmmoLedSpeed = TexMan.CheckForTexture("models/SheenLEDSpeed.png",TexMan.Type_Any);
|
||||
if ( !AmmoLedNums ) AmmoLedNums = TexMan.CheckForTexture("models/SheenLEDNums.png",TexMan.Type_Any);
|
||||
int d1 = Ammo1.Amount%10;
|
||||
int d2 = (Ammo1.Amount/10)%10;
|
||||
int d3 = (Ammo1.Amount/100)%10;
|
||||
AmmoLed.DrawTexture(AmmoLedBase,false,0,0);
|
||||
AmmoLed.DrawTexture(AmmoLedSpeed,false,16,16,DTA_SrcHeight,16,DTA_DestHeight,16,DTA_Color,(firespeed==0)?0xFFFFFFFF:0xFF808080,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
AmmoLed.DrawTexture(AmmoLedSpeed,false,48,16,DTA_SrcY,16,DTA_SrcHeight,16,DTA_DestHeight,16,DTA_Color,(firespeed==1)?0xFFFFFFFF:0xFF808080,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
AmmoLed.DrawTexture(AmmoLedSpeed,false,80,16,DTA_SrcY,32,DTA_SrcHeight,16,DTA_DestHeight,16,DTA_Color,(firespeed==2)?0xFFFFFFFF:0xFF808080,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
if ( incooldown )
|
||||
AmmoLed.DrawTexture(AmmoLedNums,false,16,32,DTA_SrcX,64,DTA_SrcY,64,DTA_SrcWidth,96,DTA_SrcHeight,64,DTA_DestWidth,96,DTA_DestHeight,64,DTA_Color,((gametic%8)>=4)?0xFFFF0000:0xFF800000,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
else
|
||||
{
|
||||
AmmoLed.DrawTexture(AmmoLedNums,false,16,32,DTA_SrcX,(d3%8)*32,DTA_SrcY,(d3/8)*64,DTA_SrcWidth,32,DTA_SrcHeight,64,DTA_DestWidth,32,DTA_DestHeight,64,DTA_Color,(!d3)?0xFF808080:0xFFFFFFFF,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
AmmoLed.DrawTexture(AmmoLedNums,false,48,32,DTA_SrcX,(d2%8)*32,DTA_SrcY,(d2/8)*64,DTA_SrcWidth,32,DTA_SrcHeight,64,DTA_DestWidth,32,DTA_DestHeight,64,DTA_Color,(!d3&&!d2)?0xFF808080:0xFFFFFFFF,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
AmmoLed.DrawTexture(AmmoLedNums,false,80,32,DTA_SrcX,(d1%8)*32,DTA_SrcY,(d1/8)*64,DTA_SrcWidth,32,DTA_SrcHeight,64,DTA_DestWidth,32,DTA_DestHeight,64,DTA_Color,(!d3&&!d2&&!d1)?0xFF808080:0xFFFFFFFF,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
}
|
||||
double ht = barrelheat*.96;
|
||||
AmmoLed.DrawTexture(AmmoLedBar,false,16,100,DTA_SrcWidth,ht,DTA_DestWidthF,ht,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
}
|
||||
|
||||
override void HudTick()
|
||||
{
|
||||
Super.HudTick();
|
||||
|
|
@ -266,6 +295,7 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
Weapon.AmmoType1 "SheenAmmo";
|
||||
Weapon.AmmoGive1 30;
|
||||
SWWMWeapon.DropAmmoType "SheenAmmo";
|
||||
+SWWMWEAPON.HASSCRTEX;
|
||||
Stamina 100000;
|
||||
Radius 30;
|
||||
Height 28;
|
||||
|
|
|
|||
|
|
@ -245,8 +245,12 @@ Class SWWMHandler : EventHandler
|
|||
sswl.Destroy();
|
||||
}
|
||||
// weapon underlays
|
||||
if ( players[consoleplayer].ReadyWeapon is 'SWWMWeapon' )
|
||||
SWWMWeapon(players[consoleplayer].ReadyWeapon).RenderUnderlay(e);
|
||||
let sw = SWWMWeapon(players[consoleplayer].ReadyWeapon);
|
||||
if ( sw )
|
||||
{
|
||||
sw.RenderUnderlay(e);
|
||||
if ( sw.bHASSCRTEX ) sw.RenderTexture(e);
|
||||
}
|
||||
if ( !statusbar || !(statusbar is 'SWWMStatusBar') ) return;
|
||||
SWWMStatusBar(statusbar).viewpos = e.viewpos;
|
||||
SWWMStatusBar(statusbar).viewrot = (e.viewangle,e.viewpitch,e.viewroll);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ Class SWWMWeapon : Weapon abstract
|
|||
FlagDef NoFirstGive : SWeaponFlags, 0; // don't give ammo on first pickup (for weapons with a clip count)
|
||||
FlagDef HideInMenu : SWeaponFlags, 1; // don't show in inventory menu (usually for sister weapons)
|
||||
FlagDef NoSwapWeapon : SWeaponFlags, 2; // weapon is not affected by slot swapping
|
||||
FlagDef HasScrTex : SWeaponFlags, 3; // weapon model has a scripted texture (calls RenderTexture() from Event Handler)
|
||||
|
||||
bool IsSwapWeapon( Inventory i ) const
|
||||
{
|
||||
|
|
@ -355,6 +356,10 @@ Class SWWMWeapon : Weapon abstract
|
|||
virtual ui void HudTick()
|
||||
{
|
||||
}
|
||||
// updating a scripted texture in the model
|
||||
virtual ui void RenderTexture( RenderEvent e )
|
||||
{
|
||||
}
|
||||
// animations
|
||||
action void A_PlayerFire()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue