Skip to content

Commit

Permalink
remove Nat
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewilliamboswell committed Jan 27, 2024
1 parent 17a7a63 commit 692f975
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/rocci-bird.roc
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ Animation : {
updateAnimation : U64, Animation -> Animation
updateAnimation = \frameCount, anim ->
framesPerUpdate =
when List.get anim.cells (Num.toNat anim.index) is
when List.get anim.cells (Num.toU64 anim.index) is
Ok { frames } ->
frames

Expand All @@ -659,7 +659,7 @@ updateAnimation = \frameCount, anim ->

drawAnimation : Animation, { x : I32, y : I32, flags ? List [FlipX, FlipY, Rotate] } -> Task {} []
drawAnimation = \anim, { x, y, flags ? [] } ->
when List.get anim.cells (Num.toNat anim.index) is
when List.get anim.cells (Num.toU64 anim.index) is
Ok { sprite } ->
{} <- setSpriteColors |> Task.await
Sprite.blit sprite { x, y, flags }
Expand Down
2 changes: 1 addition & 1 deletion examples/sound.roc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Program : {

Model : {
arrowSprite : Sprite,
arrowIdx : Nat,
arrowIdx : U64,
lastGamepadState : Gamepad,
values : List (Str, U32, U32),
}
Expand Down

0 comments on commit 692f975

Please sign in to comment.