Compare commits

..

No commits in common. "a7d9909275e1ca78fedf13da5b2fb08bfcb4c8d7" and "78f4c30c2c88f5066e1bb84fd19ee5687551a866" have entirely different histories.

16 changed files with 32 additions and 441 deletions

View File

@ -1,21 +0,0 @@
brightmap sprite jmppa0
{
map "sprites/jmpr_brightmap_1.png"
disablefullbright
}
brightmap sprite jmppb0
{
map "sprites/jmpr_brightmap_2.png"
disablefullbright
}
brightmap sprite jmppc0
{
map "sprites/jmpr_brightmap_3.png"
disablefullbright
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,245 +0,0 @@
all : \
../sprites/jmpka0.png \
../sprites/jmpra0.png \
../sprites/jmppa0.png \
../sprites/jmppb0.png \
../sprites/jmppc0.png \
../graphics/jmpr_reticle1.png \
../graphics/jmpr_reticle2.png \
../graphics/jmpr_reticle3.png \
../sprites/jmpia0.png \
../sprites/jmpib0.png \
../sprites/jmpic0.png \
../sprites/jmpid0.png \
../sprites/jmpie0.png \
../sprites/jmpif0.png \
../sprites/jmpig0.png \
../sprites/jmpja0.png \
../sprites/jmpjb0.png \
../sprites/jmpjc0.png \
../sprites/jmpjd0.png \
../sprites/jmpje0.png \
../sprites/jmpjf0.png \
../sprites/jmpjg0.png \
letter_sprites_l \
letter_sprites_r \
brightmaps
../sprites/jmpka0.png : kit.aseprite
aseprite -b $^ --save-as $@
../sprites/jmpra0.png : jmpra0.aseprite
aseprite -b $^ --save-as $@
# Base sprite with no numerical indicator, but anim frames (0,1,2) for
# status light.
../sprites/jmppa0.png ../sprites/jmppb0.png ../sprites/jmppc0.png : povsprite.aseprite
aseprite -b $^ \
--ignore-layer "brightmap_display" \
--ignore-layer "brightmap_leds" \
--ignore-layer "numberindicatorl" \
--ignore-layer "numberindicatorr" \
--frame-range 0,2 --save-as $@
# Correct Aseprite's automatic naming to Doom's. (Number at the
# end is for rotations, letters are for frame numbers.)
mv ../sprites/jmppa1.png ../sprites/jmppb0.png
mv ../sprites/jmppa2.png ../sprites/jmppc0.png
../graphics/jmpr_reticle1.png \
../graphics/jmpr_reticle2.png \
../graphics/jmpr_reticle3.png : jmpr_reticle.aseprite
aseprite -b $^ \
--frame-range 0,2 --save-as $@
../sprites/jmpia0.png \
../sprites/jmpib0.png \
../sprites/jmpic0.png \
../sprites/jmpid0.png \
../sprites/jmpie0.png \
../sprites/jmpif0.png \
../sprites/jmpig0.png \
../sprites/jmpja0.png \
../sprites/jmpjb0.png \
../sprites/jmpjc0.png \
../sprites/jmpjd0.png \
../sprites/jmpje0.png \
../sprites/jmpjf0.png \
../sprites/jmpjg0.png : povsprite.aseprite
aseprite -b $^ \
--layer "numberindicatorl" \
--frame-range 0,6 --save-as ../sprites/jmpia.png
aseprite -b $^ \
--layer "numberindicatorr" \
--frame-range 0,6 --save-as ../sprites/jmpja.png
mv ../sprites/jmpia1.png ../sprites/jmpia0.png
mv ../sprites/jmpia2.png ../sprites/jmpib0.png
mv ../sprites/jmpia3.png ../sprites/jmpic0.png
mv ../sprites/jmpia4.png ../sprites/jmpid0.png
mv ../sprites/jmpia5.png ../sprites/jmpie0.png
mv ../sprites/jmpia6.png ../sprites/jmpif0.png
mv ../sprites/jmpia7.png ../sprites/jmpig0.png
mv ../sprites/jmpja1.png ../sprites/jmpja0.png
mv ../sprites/jmpja2.png ../sprites/jmpjb0.png
mv ../sprites/jmpja3.png ../sprites/jmpjc0.png
mv ../sprites/jmpja4.png ../sprites/jmpjd0.png
mv ../sprites/jmpja5.png ../sprites/jmpje0.png
mv ../sprites/jmpja6.png ../sprites/jmpjf0.png
mv ../sprites/jmpja7.png ../sprites/jmpjg0.png
letter_sprites_% :
aseprite -b povsprite.aseprite \
--layer "numberindicator$*" \
--frame-range 0,6 --save-as tmp.png
convert tmp6.png \
tmp3.png -composite \
tmp5.png -composite \
tmp4.png -composite \
tmp2.png -composite \
tmp1.png -composite \
indic_$*_0.png
convert tmp4.png \
tmp5.png -composite \
indic_$*_1.png
convert tmp6.png \
tmp7.png -composite \
tmp3.png -composite \
tmp5.png -composite \
tmp2.png -composite \
indic_$*_2.png
convert tmp3.png \
tmp4.png -composite \
tmp5.png -composite \
tmp6.png -composite \
tmp7.png -composite \
indic_$*_3.png
convert tmp1.png \
tmp4.png -composite \
tmp5.png -composite \
tmp7.png -composite \
indic_$*_4.png
convert tmp6.png \
tmp7.png -composite \
tmp3.png -composite \
tmp4.png -composite \
tmp1.png -composite \
indic_$*_5.png
convert tmp6.png \
tmp7.png -composite \
tmp3.png -composite \
tmp4.png -composite \
tmp1.png -composite \
tmp2.png -composite \
indic_$*_6.png
convert tmp6.png \
tmp5.png -composite \
tmp4.png -composite \
indic_$*_7.png
convert tmp6.png \
tmp7.png -composite \
tmp3.png -composite \
tmp5.png -composite \
tmp4.png -composite \
tmp2.png -composite \
tmp1.png -composite \
indic_$*_8.png
convert tmp6.png \
tmp7.png -composite \
tmp3.png -composite \
tmp5.png -composite \
tmp4.png -composite \
tmp1.png -composite \
indic_$*_9.png
convert tmp6.png \
tmp7.png -composite \
tmp5.png -composite \
tmp4.png -composite \
tmp2.png -composite \
tmp1.png -composite \
indic_$*_a.png
convert tmp7.png \
tmp3.png -composite \
tmp4.png -composite \
tmp2.png -composite \
tmp1.png -composite \
indic_$*_b.png
convert tmp3.png \
tmp1.png -composite \
tmp2.png -composite \
tmp6.png -composite \
indic_$*_c.png
convert tmp7.png \
tmp3.png -composite \
tmp4.png -composite \
tmp2.png -composite \
tmp5.png -composite \
indic_$*_d.png
convert tmp6.png \
tmp7.png -composite \
tmp3.png -composite \
tmp2.png -composite \
tmp1.png -composite \
indic_$*_e.png
convert tmp6.png \
tmp7.png -composite \
tmp2.png -composite \
tmp1.png -composite \
indic_$*_f.png
mv indic_$*_0.png ../sprites/jmi$*a0.png
mv indic_$*_1.png ../sprites/jmi$*b0.png
mv indic_$*_2.png ../sprites/jmi$*c0.png
mv indic_$*_3.png ../sprites/jmi$*d0.png
mv indic_$*_4.png ../sprites/jmi$*e0.png
mv indic_$*_5.png ../sprites/jmi$*f0.png
mv indic_$*_6.png ../sprites/jmi$*g0.png
mv indic_$*_7.png ../sprites/jmi$*h0.png
mv indic_$*_8.png ../sprites/jmi$*i0.png
mv indic_$*_9.png ../sprites/jmi$*j0.png
mv indic_$*_a.png ../sprites/jmi$*k0.png
mv indic_$*_b.png ../sprites/jmi$*l0.png
mv indic_$*_c.png ../sprites/jmi$*m0.png
mv indic_$*_d.png ../sprites/jmi$*n0.png
mv indic_$*_e.png ../sprites/jmi$*o0.png
mv indic_$*_f.png ../sprites/jmi$*p0.png
brightmaps : povsprite.aseprite
aseprite -b $^ \
--layer "brightmap_display" \
--frame-range 0,0 --save-as brightmap_display.png
aseprite -b $^ \
--layer "brightmap_leds" \
--frame-range 0,2 --save-as brightmap_leds.png
aseprite -b $^ \
--layer "brightmap_digits" \
--frame-range 0,0 --save-as brightmap_digits.png
composite brightmap_display.png brightmap_leds1.png -compose screen ../sprites/jmpr_brightmap_1.png
composite brightmap_display.png brightmap_leds2.png -compose screen ../sprites/jmpr_brightmap_2.png
composite brightmap_display.png brightmap_leds3.png -compose screen ../sprites/jmpr_brightmap_3.png

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -2,17 +2,14 @@ sprite JMPRA0, 49, 43 {
offset 24, 21
patch JMPRA0,0,0 { }
}
sprite JMPRB0, 49, 43 {
offset 24, 21
patch JMPRA0,0,0 { translation "112:120=160:167" }
}
sprite JMPRC0, 49, 43 {
offset 24, 21
patch JMPRA0,0,0 { translation "112:120=32:47" }
}
sprite JMPRD0, 49, 43 {
offset 24, 21
patch JMPRA0,0,0 { translation "112:120=96:111" }
@ -23,25 +20,3 @@ sprite JMPKA0, 48, 32 {
patch JMPKA0,0,0 { }
}
// Weapon sprites.
//
// Note that there's a corresponding offset in the ledd_left_indicator
// and ledd_right_indicator states in object itself, which offset the
// text into position.
sprite JMPPA0, 320, 200 {
offset 0, 32
patch JMPPA0,0,0 { }
}
sprite JMPPB0, 320, 200 {
offset 0, 32
patch JMPPB0,0,0 { }
}
sprite JMPPC0, 320, 200 {
offset 0, 32
patch JMPPC0,0,0 { }
}

View File

@ -243,8 +243,6 @@ class JumperCablesDeployed : HDUPK
class JumperCablesUsable : HDWeapon
{
int lastIndicatorStatus;
default
{
+weapon.wimpy_weapon;
@ -279,51 +277,20 @@ class JumperCablesUsable : HDWeapon
return GetSpareWeaponRegular(newowner,reverse,doselect);
}
override void DrawSightPicture(
HDStatusBar statusBar,
HDWeapon weapon,
HDPlayerPawn playerPawn,
bool sightbob,
Vector2 bob,
double fov,
bool scopeview,
Actor hpc,
String whichdot)
{
// int cx,cy,cw,ch;
// [cx,cy,cw,ch]=screen.GetClipRect();
// statusBar.SetClipRect(cx,cy,cw,ch);
String filename = String.Format("graphics/jmpr_reticle%d.png", lastIndicatorStatus + 1);
// console.printf("blep, %s %d\n", filename, frame);
statusBar.drawImage(
filename,
(0, 0) + bob,
statusBar.DI_SCREEN_CENTER | statusBar.DI_ITEM_TOP,
scale : (0.5, 0.5));
}
states
{
spawn:
JMPP # 0 offset(0, -32);
JMPK A -1;
stop;
select:
JMPP A 0;
TNT1 A 0;
goto super::select;
ledd_left_indicator:
JMIL A 1 offset(0, -32); wait;
ledd_right_indicator:
JMIR A 1 offset(0, -32); wait;
ready:
JMPP # 1 {
TNT1 A 1 {
if(PressingFire()) {
SetWeaponState("deploy");
}
@ -332,67 +299,33 @@ class JumperCablesUsable : HDWeapon
FLineTraceData linetraceData;
DoLineTrace(HDPlayerPawn(invoker.owner), linetraceData);
Vector3 hitPos;
if(linetraceData.hitType != TRACE_HitNone) {
hitPos = linetraceData.hitLocation - Vec3Offset(0, 0, 0);
}
A_Overlay(355, "ledd_left_indicator");
A_Overlay(356, "ledd_right_indicator");
Vector3 hitPos = linetraceData.hitLocation - Vec3Offset(0, 0, 0);
SpawnParticleForLineTrace(
HDPlayerPawn(invoker.owner),
linetraceData);
// console.printf("blep, %d\n", frame);
//player.getpsprite(PSP_WEAPON).frame = randompick(0, 1, 2);
// invoker.lastIndicatorStatus += 1;
// invoker.lastIndicatorStatus %= 3;
}
}
goto readyend;
readyend:
#### # 0 A_ReadyEnd();
#### # 0 A_Jump(256,"ready");
deploy:
JMPP A 1 offset(0, 16);
JMPP A 1 offset(0, 32);
JMPP A 1 offset(0, 48);
JMPP A 1 offset(0, 64);
JMPP A 1 offset(0, 72);
JMPP A 1 offset(0, 96);
JMPP A 1 offset(0, 128);
TNT1 AA 1;
TNT1 AAAA 1;
TNT1 AAAA 1;
JMPP A 0 A_JumpIf(!pressingfire(),"ready");
JMPP A 4 A_StartSound("weapons/pismagclick",CHAN_WEAPON);
JMPP A 2 A_StartSound("derp/crawl",CHAN_WEAPON,CHANF_OVERLAP);
TNT1 A 0 A_JumpIf(!pressingfire(),"ready");
TNT1 A 4 A_StartSound("weapons/pismagclick",CHAN_WEAPON);
TNT1 A 2 A_StartSound("derp/crawl",CHAN_WEAPON,CHANF_OVERLAP);
JMPP A 1 {
TNT1 A 1 {
// invoker.owner.A_Log("Blep");
A_WeaponReady(WRF_NOFIRE | WRF_ALLOWRELOAD | WRF_ALLOWUSER4);
AttachCables(HDPlayerPawn(invoker.owner));
}
JMPP A 1 offset(0, 128);
JMPP A 1 offset(0, 96);
JMPP A 1 offset(0, 72);
JMPP A 1 offset(0, 64);
JMPP A 1 offset(0, 48);
JMPP A 1 offset(0, 32);
JMPP A 1 offset(0, 16);
JMPP A 1 offset(0, 0);
JMPP A 1 {
A_WeaponReady(WRF_NOFIRE | WRF_ALLOWRELOAD | WRF_ALLOWUSER4);
}
goto ready;
user3:
#### # 0 A_MagManager("HDBattery");
#### A 0 A_MagManager("HDBattery");
goto ready;
}
@ -413,51 +346,10 @@ class JumperCablesUsable : HDWeapon
// }
// }
Line brokenLine = LineTraceFindbrokenLine(linetraceData);
if(brokenLine) {
if(LineTraceFindbrokenLine(linetraceData)) {
particleColor = "green";
// Found somethine we can fix!
player.getpsprite(PSP_WEAPON).frame = 1;
} else {
if(linetraceData.hitType == TRACE_HitNone) {
// Didn't hit anything (yellow light).
player.getpsprite(PSP_WEAPON).frame = 0;
} else{
// Hit something, but it's not broken (green light).
player.getpsprite(PSP_WEAPON).frame = 2;
}
}
int frame_left = random(0, 15);
int frame_right = random(0, 15);
Line lineForDisplay = brokenLine;
if(!lineForDisplay) {
lineForDisplay = hitLine;
}
if(lineForDisplay) {
JumperCablesMapLoader loader = JumperCablesMapLoader.Get();
int originalSpecial = loader.originalLinedefSpecials2.Get(lineForDisplay.index());
console.printf("Original special: %d", originalSpecial);
frame_right = originalSpecial % 16;
frame_left = originalSpecial / 16;
}
player.getpsprite(355).frame = frame_left;
player.getpsprite(356).frame = frame_right;
invoker.lastIndicatorStatus = player.getpsprite(PSP_WEAPON).frame;
if(linetraceData.hitType != TRACE_HitNone) {
Vector3 hitPos = linetraceData.hitLocation - Vec3Offset(0, 0, 0);
// console.printf("hit pos: %f %f %f\n", hitPos.x, hitPos.y, hitPos.z);
A_SpawnParticle(
@ -467,7 +359,6 @@ class JumperCablesUsable : HDWeapon
hitPos.y,
hitPos.z);
}
}
action float Vec2Mag(Vector2 v)
{
@ -516,10 +407,8 @@ class JumperCablesUsable : HDWeapon
pawn.angle,
48,
pawn.pitch,
flags : TRF_THRUACTORS | TRF_ABSOFFSET,
offsetz : pawn.gunPos.z - 1, // * 0.8,
offsetforward : pawn.gunPos.x,
offsetside : pawn.gunPos.y,
flags : TRF_THRUACTORS,
offsetz : pawn.height * 0.8,
data : linetraceData);
}
@ -563,19 +452,13 @@ class JumperCablesUsable : HDWeapon
Line secLine = sec.lines[secLineIndex];
// If this is currently special, we don't care about
// it (it's working fine, presumably).
// If this is currently special, we don't care about it.
if(secLine.special == 0) {
// If this *used* to be special, we DO care about it!
if(loader.originalLinedefSpecials2.CheckKey(secLine.index())) {
// Make sure it's actually changed.
int originalSpecial = loader.originalLinedefSpecials2.Get(secLine.index());
int currentSpecial = secLine.special;
if(originalSpecial != currentSpecial) {
// See if this is the closest one we've found so far.
// See if thise is the closest one we've found so far.
float distanceToLine = GetDistanceToLine(
secLine, linetraceData.hitLocation);
if(distanceToLine <= closestLineDistance) {
@ -585,7 +468,6 @@ class JumperCablesUsable : HDWeapon
}
}
}
}
// If we found something broken, then return the closest
// thing we found.