diff --git a/fcore/level/player/player-attack.sml b/fcore/level/player/player-attack.sml index 3f2fd79..d31213c 100644 --- a/fcore/level/player/player-attack.sml +++ b/fcore/level/player/player-attack.sml @@ -112,9 +112,7 @@ struct val boxes = case facing of FACING_RIGHT => Vector.sub (Whip.rightFrames, frame) - | FACING_LEFT => - (* todo: replace rightFrames with leftFrames *) - Vector.sub (Whip.rightFrames, frame) + | FACING_LEFT => Vector.sub (Whip.leftFrames, frame) in helpAttackEnemies ( player diff --git a/fcore/level/player/player.sml b/fcore/level/player/player.sml index 1e4df48..65c755d 100644 --- a/fcore/level/player/player.sml +++ b/fcore/level/player/player.sml @@ -502,9 +502,7 @@ struct val boxes = case facing of FACING_RIGHT => Vector.sub (Whip.rightFrames, frame) - | FACING_LEFT => - (* todo: change to leftFrames once that is implemented *) - Vector.sub (Whip.rightFrames, frame) + | FACING_LEFT => Vector.sub (Whip.leftFrames, frame) in helpGetWhipVec (x, y, wratio, 0.0, yOffset, 0, boxes, width, height, []) @@ -520,9 +518,7 @@ struct val boxes = case facing of FACING_RIGHT => Vector.sub (Whip.rightFrames, frame) - | FACING_LEFT => - (* todo: change to leftFrames once that is implemented *) - Vector.sub (Whip.rightFrames, frame) + | FACING_LEFT => Vector.sub (Whip.leftFrames, frame) in helpGetWhipVec (x, y, hratio, xOffset, 0.0, 0, boxes, width, height, []) diff --git a/fcore/level/player/whip.sml b/fcore/level/player/whip.sml index b5f99ec..7298151 100644 --- a/fcore/level/player/whip.sml +++ b/fcore/level/player/whip.sml @@ -87,4 +87,88 @@ struct val rightFrames = #[ rf1, rf2, rf3, rf4, rf5, rf6, rf7, rf8, rf9, rf10, rf11, rf12 ] + + (* left frames *) + val lf1 = + #[ {x = ~15, y = ~15} + , {x = ~15, y = 2} + , {x = ~15, y = 18} + , {x = 0, y = 25} + ] + + val lf2 = + #[ {x = ~18, y = ~15} + , {x = ~17, y = 2} + , {x = ~15, y = 18} + , {x = 0, y = 25} + ] + + val lf3 = + #[ {x = ~42, y = ~15} + , {x = ~21, y = 2} + , {x = ~15, y = 18} + , {x = 0, y = 25} + ] + + val lf4 = + #[ {x = ~34, y = ~15} + , {x = ~26, y = 2} + , {x = ~15, y = 18} + , {x = 0, y = 25} + ] + + val lf5 = + #[ {x = ~38, y = ~5} + , {x = ~30, y = 6} + , {x = ~15, y = 18} + , {x = 0, y = 25} + ] + + val lf6 = + #[ {x = ~47, y = 10} + , {x = ~31, y = 15} + , {x = ~15, y = 20} + , {x = 0, y = 25} + ] + + val lf7 = + #[ {x = ~63, y = 25} + , {x = ~47, y = 28} + , {x = ~31, y = 25} + , {x = ~15, y = 22} + , {x = 0, y = 25} + ] + + val lf8 = + #[ {x = ~63, y = 25} + , {x = ~47, y = 28} + , {x = ~31, y = 25} + , {x = ~15, y = 25} + , {x = 0, y = 25} + ] + + val lf9 = + #[ {x = ~47, y = 31} + , {x = ~31, y = 29} + , {x = ~15, y = 27} + , {x = 0, y = 25} + ] + + val lf10 = + #[ {x = ~31, y = 33} + , {x = ~15, y = 29} + , {x = 0, y = 25} + ] + + val lf11 = + #[ {x = ~15, y = 31} + , {x = 0, y = 25} + ] + + val lf12 = + #[ {x = 0, y = 25} ] + + val leftFrames = #[ + lf1, lf2, lf3, lf4, lf5, lf6, lf7, lf8, lf9, lf10, lf11, lf12 + ] end