Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Nat from examples #22

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading