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 *)
val playerWidth = 96
val playerHeight = 96
val playerHeight = 84
val playerWidthReal: Real32.real = 48.0
val playerHeightReal: Real32.real = 60.0

View File

@@ -44,9 +44,9 @@ struct
fun getIdle (player, rx, ry, dw, dh, ww, wh) =
case #facing player of
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 =>
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) =
let
@@ -130,15 +130,11 @@ struct
fun getWhenAttacked (player, amt, rx, ry, dw, dh, ww, wh) =
case #facing player of
FACING_RIGHT =>
if amt mod 5 = 0 then
PlayerStandingRight.lerp (rx, ry, dw, dh, ww, wh, 1.0, 1.0, 1.0)
else
PlayerStandingRight.lerp (rx, ry, dw, dh, ww, wh, 1.0, 0.75, 0.75)
(* todo: hurt sprite/animation if amt mod 5 = 0 then *)
PlayerStandingRight.lerp (rx, ry, 3.0, ww, wh)
| FACING_LEFT =>
if amt mod 5 = 0 then
PlayerStandingLeft.lerp (rx, ry, dw, dh, ww, wh, 1.0, 1.0, 1.0)
else
PlayerStandingLeft.lerp (rx, ry, dw, dh, ww, wh, 1.0, 0.75, 0.75)
(* todo: hurt sprite/animation if amt mod 5 = 0 then *)
PlayerStandingLeft.lerp (rx, ry, 3.0, ww, wh)
fun helpGet
(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