dev/pbs (#8)
Co-authored-by: Nilton Constantino <nilton.constantino@visma.com> Reviewed-on: #8
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"magic": "PMTU",
|
||||
"cartridge_version": 1,
|
||||
"app_id": 1,
|
||||
"title": "Test 1",
|
||||
"app_version": "0.1.0",
|
||||
"app_mode": "Game",
|
||||
"entrypoint": "frame",
|
||||
"asset_table": [
|
||||
{
|
||||
"asset_id": 0,
|
||||
"asset_name": "bgm_music",
|
||||
"bank_type": "SOUNDS",
|
||||
"offset": 0,
|
||||
"size": 88200,
|
||||
"decoded_size": 88200,
|
||||
"codec": "RAW",
|
||||
"metadata": {
|
||||
"sample_rate": 44100
|
||||
}
|
||||
},
|
||||
{
|
||||
"asset_id": 1,
|
||||
"asset_name": "mouse_cursor",
|
||||
"bank_type": "TILES",
|
||||
"offset": 88200,
|
||||
"size": 2304,
|
||||
"decoded_size": 2304,
|
||||
"codec": "RAW",
|
||||
"metadata": {
|
||||
"tile_size": 16,
|
||||
"width": 16,
|
||||
"height": 16
|
||||
}
|
||||
}
|
||||
],
|
||||
"preload": [
|
||||
{ "asset_name": "bgm_music", "slot": 0 },
|
||||
{ "asset_name": "mouse_cursor", "slot": 1 }
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "test01",
|
||||
"version": "0.1.0",
|
||||
"script_fe": "pbs",
|
||||
"kind": "app",
|
||||
"entry": "src/main/modules/main.pbs",
|
||||
"out": "build/program.pbc",
|
||||
"dependencies": {
|
||||
"sdk": "../sdk"
|
||||
}
|
||||
}
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../dist-staging/stable/prometeu-aarch64-apple-darwin
|
||||
@@ -0,0 +1,27 @@
|
||||
import { Color, Gfx } from "@sdk:gfx";
|
||||
import { Input } from "@sdk:input";
|
||||
|
||||
fn add(a: int, b: int): int {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
fn frame(): void {
|
||||
// 1. Locals & Arithmetic
|
||||
let x = 10;
|
||||
let y = 20;
|
||||
let z = add(x, y);
|
||||
|
||||
// 2. Control Flow (if)
|
||||
if z == 30 {
|
||||
// 3. Syscall Clear
|
||||
Gfx.clear(Color.GREEN);
|
||||
} else {
|
||||
Gfx.clear(Color.RED);
|
||||
}
|
||||
|
||||
// 4. Input Snapshot & Nested Member Access
|
||||
let p = Input.pad();
|
||||
if p.a.down {
|
||||
Gfx.clear(Color.BLUE);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user