fn declaration adjustments
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"magic": "PMTU",
|
||||
"cartridge_version": 1,
|
||||
"app_id": 1,
|
||||
"title": "Test 1",
|
||||
"app_version": "0.1.0",
|
||||
"app_mode": "Game",
|
||||
"entrypoint": "0",
|
||||
"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 }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
00000000 PushConst U32(1)
|
||||
00000006 SetLocal U32(0)
|
||||
0000000C GetLocal U32(0)
|
||||
00000012 PushConst U32(1)
|
||||
00000018 Eq
|
||||
0000001A JmpIfFalse U32(56)
|
||||
00000020 Jmp U32(38)
|
||||
00000026 PushConst U32(2)
|
||||
0000002C Syscall U32(4097)
|
||||
00000032 Jmp U32(62)
|
||||
00000038 Jmp U32(62)
|
||||
0000003E Ret
|
||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"script_fe": "pbs",
|
||||
"entry": "src/main.pbs",
|
||||
"out": "build/program.pbc",
|
||||
"emit_disasm": true,
|
||||
"emit_symbols": true
|
||||
}
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../target/debug
|
||||
@@ -0,0 +1,6 @@
|
||||
declare contract Touch host {
|
||||
fn f();
|
||||
}
|
||||
|
||||
fn frame(): void {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
pub declare contract Gfx host {}
|
||||
pub declare contract Input host {}
|
||||
pub declare contract Touch host {}
|
||||
@@ -0,0 +1,7 @@
|
||||
import Gfx from "./sdk.pbs"
|
||||
|
||||
fn frame(): void {
|
||||
Gfx.clear(0);
|
||||
Gfx.fillRect(110, 110, 20, 20, 2016);
|
||||
Gfx.drawText(10, 10, "Test01 PBS - Minimal", 65535);
|
||||
}
|
||||
Reference in New Issue
Block a user