change standing sprite

This commit is contained in:
2025-08-28 22:46:13 +01:00
parent 9120460392
commit a2b14b90e3
4 changed files with 10771 additions and 628 deletions

View File

@@ -10,7 +10,7 @@ struct
(* constants for player *) (* constants for player *)
val playerWidth = 96 val playerWidth = 96
val playerHeight = 96 val playerHeight = 84
val playerWidthReal: Real32.real = 48.0 val playerWidthReal: Real32.real = 48.0
val playerHeightReal: Real32.real = 60.0 val playerHeightReal: Real32.real = 60.0

View File

@@ -44,9 +44,9 @@ struct
fun getIdle (player, rx, ry, dw, dh, ww, wh) = fun getIdle (player, rx, ry, dw, dh, ww, wh) =
case #facing player of case #facing player of
FACING_RIGHT => FACING_RIGHT =>
PlayerStandingRight.lerp (rx, ry, dw, dh, ww, wh, 1.0, 1.0, 1.0) PlayerStandingRight.lerp (rx, ry, 3.0, ww, wh)
| FACING_LEFT => | FACING_LEFT =>
PlayerStandLeft.lerp (rx, ry, 4.0, ww, wh) PlayerStandingLeft.lerp (rx, ry, 3.0, ww, wh)
fun getWalk (rx, ry, dw, dh, ww, wh, walkFrames, animTimer) = fun getWalk (rx, ry, dw, dh, ww, wh, walkFrames, animTimer) =
let let
@@ -130,15 +130,11 @@ struct
fun getWhenAttacked (player, amt, rx, ry, dw, dh, ww, wh) = fun getWhenAttacked (player, amt, rx, ry, dw, dh, ww, wh) =
case #facing player of case #facing player of
FACING_RIGHT => FACING_RIGHT =>
if amt mod 5 = 0 then (* todo: hurt sprite/animation if amt mod 5 = 0 then *)
PlayerStandingRight.lerp (rx, ry, dw, dh, ww, wh, 1.0, 1.0, 1.0) PlayerStandingRight.lerp (rx, ry, 3.0, ww, wh)
else
PlayerStandingRight.lerp (rx, ry, dw, dh, ww, wh, 1.0, 0.75, 0.75)
| FACING_LEFT => | FACING_LEFT =>
if amt mod 5 = 0 then (* todo: hurt sprite/animation if amt mod 5 = 0 then *)
PlayerStandingLeft.lerp (rx, ry, dw, dh, ww, wh, 1.0, 1.0, 1.0) PlayerStandingLeft.lerp (rx, ry, 3.0, ww, wh)
else
PlayerStandingLeft.lerp (rx, ry, dw, dh, ww, wh, 1.0, 0.75, 0.75)
fun helpGet fun helpGet
(player: player, rx, ry, drawWidth, drawHeight, windowWidth, windowHeight) = (player: player, rx, ry, drawWidth, drawHeight, windowWidth, windowHeight) =

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff