begin portin attack
This commit is contained in:
@@ -24,7 +24,7 @@ struct
|
||||
val recoilLimit = 15
|
||||
val attackedLimit = 55
|
||||
val maxCharge = 60
|
||||
val mainAttackLimit = 23
|
||||
val mainAttackLimit = 25
|
||||
|
||||
(* constants for projectiles *)
|
||||
val projectilePi: Real32.real = Real32.Math.pi / 180.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,167 +0,0 @@
|
||||
structure StraightWhip =
|
||||
struct
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 0.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 0.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 0.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
0.937254901960784,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 24.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 23.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 24.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 24.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
@@ -94,24 +94,10 @@ struct
|
||||
case #mainAttack player of
|
||||
MAIN_ATTACKING amt =>
|
||||
let
|
||||
val data = (rx, ry, 4.0, windowWidth, windowHeight)
|
||||
val playerVec = PlayerAttackStandLeft.lerp (rx, ry, 3.0, windowWidth, windowHeight)
|
||||
val projectileVec = Vector.fromList []
|
||||
in
|
||||
if amt <= 3 then
|
||||
PlayerAttackLeft1.lerp data
|
||||
else if amt <= 7 then
|
||||
PlayerAttackLeft2.lerp data
|
||||
else if amt <= 9 then
|
||||
PlayerAttackLeft3.lerp data
|
||||
else
|
||||
let
|
||||
val playerVec = PlayerAttackLeft4.lerp data
|
||||
val rx = rx - Real32.fromInt Constants.playerWidth + 25.0
|
||||
val ry = ry + (Real32.fromInt Constants.playerHeight / 2.0) + 7.0
|
||||
val whipVec = StraightWhip.lerp
|
||||
(rx, ry, 4.0, windowWidth, windowHeight)
|
||||
in
|
||||
Vector.concat [playerVec, whipVec]
|
||||
end
|
||||
playerVec
|
||||
end
|
||||
| _ =>
|
||||
case #attacked player of
|
||||
|
||||
5597
fcore/level/player/sprites/attack/player-attack-stand-left.sml
Normal file
5597
fcore/level/player/sprites/attack/player-attack-stand-left.sml
Normal file
File diff suppressed because it is too large
Load Diff
5597
fcore/level/player/sprites/attack/player-attack-stand-right.sml
Normal file
5597
fcore/level/player/sprites/attack/player-attack-stand-right.sml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -92,7 +92,7 @@ struct
|
||||
|
||||
val rightFrames = #[
|
||||
rf1, rf2, rf3, rf4, rf5, rf6, rf7, rf8, rf9, rf10, rf11, rf12, rf13, rf14,
|
||||
rf15, rf16, rf17, rf18, rf19, rf20, rf21, rf22, rf23, rf24
|
||||
rf15, rf16, rf17, rf18, rf19, rf20, rf21, rf22, rf23, rf24, #[], #[]
|
||||
]
|
||||
|
||||
(* left frames *)
|
||||
@@ -192,6 +192,6 @@ struct
|
||||
|
||||
val leftFrames = #[
|
||||
lf1, lf2, lf3, lf4, lf5, lf6, lf7, lf8, lf9, lf10, lf11, lf12, lf13, lf14,
|
||||
lf15, lf16, lf17, lf18, lf19, lf20, lf21, lf22, lf23, lf24
|
||||
lf15, lf16, lf17, lf18, lf19, lf20, lf21, lf22, lf23, lf24, #[], #[]
|
||||
]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user