Skip to content
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
9 changes: 7 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ version: 3

vars:
MOON_MODULES:
sh: echo ./src && find ./example -maxdepth 1 -mindepth 1 -type d
sh: >
echo ./src &&
find ./example -maxdepth 1 -mindepth 1 -type d
| grep -vE '(_build|.mooncakes)'
EXAMPLES:
sh: find ./example -maxdepth 1 -mindepth 1 -type d
sh: >
find ./example -maxdepth 1 -mindepth 1 -type d
| grep -vE '(_build|.mooncakes)'

tasks:
release:
Expand Down
3 changes: 2 additions & 1 deletion example/audio/firefly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ author_id = "demo"
app_id = "moonbit-audio"
author_name = "Demo"
app_name = "Audio demo (MoonBit)"
lang = "moon"

[files]
pickupCoin = { path = "assets/pickupCoin.wav"}
pickupCoin = { path = "assets/pickupCoin.wav" }
7 changes: 7 additions & 0 deletions example/audio/moon.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "example-audio"

preferred_target = "wasm"

import {
"firefly/firefly@0.7.0",
}
9 changes: 0 additions & 9 deletions example/audio/moon.mod.json

This file was deleted.

1 change: 1 addition & 0 deletions example/font/firefly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ author_id = "demo"
app_id = "moonbit-font"
author_name = "Demo"
app_name = "Font demo (MoonBit)"
lang = "moon"

[files]
font = { path = "assets/eg_6x12.fff" }
7 changes: 7 additions & 0 deletions example/font/moon.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "example-font"

preferred_target = "wasm"

import {
"firefly/firefly@0.7.0",
}
9 changes: 0 additions & 9 deletions example/font/moon.mod.json

This file was deleted.

1 change: 1 addition & 0 deletions example/image/firefly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ author_id = "demo"
app_id = "moonbit-image"
author_name = "Demo"
app_name = "Image demo (MoonBit)"
lang = "moon"

[files]
smile1 = { path = "assets/smile-1.png" }
Expand Down
7 changes: 7 additions & 0 deletions example/image/moon.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "example-image"

preferred_target = "wasm"

import {
"firefly/firefly@0.7.0",
}
9 changes: 0 additions & 9 deletions example/image/moon.mod.json

This file was deleted.

1 change: 1 addition & 0 deletions example/input/firefly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ author_id = "demo"
app_id = "moonbit-input"
author_name = "Demo"
app_name = "Input demo (MoonBit)"
lang = "moon"

[files]
font = { path = "assets/eg_6x12.fff" }
7 changes: 7 additions & 0 deletions example/input/moon.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "example-input"

preferred_target = "wasm"

import {
"firefly/firefly@0.7.0",
}
9 changes: 0 additions & 9 deletions example/input/moon.mod.json

This file was deleted.

3 changes: 3 additions & 0 deletions example/moon.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
members = [
"..",
]
1 change: 1 addition & 0 deletions example/random/firefly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ author_id = "demo"
app_id = "moonbit-random"
author_name = "Demo"
app_name = "Random demo (MoonBit)"
lang = "moon"
7 changes: 7 additions & 0 deletions example/random/moon.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "example-random"

preferred_target = "wasm"

import {
"firefly/firefly@0.7.0",
}
9 changes: 0 additions & 9 deletions example/random/moon.mod.json

This file was deleted.

1 change: 1 addition & 0 deletions example/scores/firefly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ author_id = "demo"
app_id = "moonbit-scores"
author_name = "Demo"
app_name = "Scores demo (MoonBit)"
lang = "moon"

[files]
font = { path = "assets/eg_6x10.fff" }
Expand Down
7 changes: 7 additions & 0 deletions example/scores/moon.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "example-scores"

preferred_target = "wasm"

import {
"firefly/firefly@0.7.0",
}
9 changes: 0 additions & 9 deletions example/scores/moon.mod.json

This file was deleted.

1 change: 1 addition & 0 deletions example/shapes/firefly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ author_id = "demo"
app_id = "moonbit-shapes"
author_name = "Demo"
app_name = "Shapes demo (MoonBit)"
lang = "moon"
7 changes: 7 additions & 0 deletions example/shapes/moon.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "example-shapes"

preferred_target = "wasm"

import {
"firefly/firefly@0.7.0",
}
9 changes: 0 additions & 9 deletions example/shapes/moon.mod.json

This file was deleted.

23 changes: 23 additions & 0 deletions moon.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "firefly/firefly"

version = "0.8.0"

import {
"applejag/micromath@0.3.0",
}

readme = "README.md"

repository = "https://github.com/firefly-zero/firefly-moon"

license = "MIT"

keywords = [ "game", "firefly-zero" ]

description = "MoonBit SDK for making Firefly Zero games"

preferred_target = "wasm"

options(
source: "src",
)
14 changes: 0 additions & 14 deletions moon.mod.json

This file was deleted.

8 changes: 4 additions & 4 deletions src/audio/modulators.mbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///|
pub trait Modulator {
modulate(Self, node_id : UInt, param : UInt) -> Unit
fn modulate(Self, node_id : UInt, param : UInt) -> Unit
}

///|
Expand All @@ -20,7 +20,7 @@ pub(all) struct LinearModulator {

///|
#inline
pub impl Modulator for LinearModulator with modulate(
pub impl Modulator for LinearModulator with fn modulate(
self : LinearModulator,
node_id : UInt,
param : UInt,
Expand Down Expand Up @@ -51,7 +51,7 @@ pub(all) struct HoldModulator {

///|
#inline
pub impl Modulator for HoldModulator with modulate(
pub impl Modulator for HoldModulator with fn modulate(
self : HoldModulator,
node_id : UInt,
param : UInt,
Expand All @@ -74,7 +74,7 @@ pub(all) struct SineModulator {

///|
#inline
pub impl Modulator for SineModulator with modulate(
pub impl Modulator for SineModulator with fn modulate(
self : SineModulator,
node_id : UInt,
param : UInt,
Expand Down
Loading
Loading