Skip to content

Commit 3ef6877

Browse files
committed
Additional snippets
1 parent cd0d7bd commit 3ef6877

File tree

4 files changed

+102
-6
lines changed

4 files changed

+102
-6
lines changed

snippets/audio.json

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
11
{
2-
2+
"audio.musicsimple": {
3+
"prefix": "music",
4+
"scope": "pico8p8",
5+
"body": [
6+
"music(${1:pattern})",
7+
"$0"
8+
],
9+
"description": "Simple Play music (-1 = stop)"
10+
},
11+
"audio.music": {
12+
"prefix": "musicf",
13+
"scope": "pico8p8",
14+
"body": [
15+
"music(${1:pattern},${2:fade_ms},${3:channel_mask})",
16+
"$0"
17+
],
18+
"description": "Full Play music (-1 = stop)"
19+
},
20+
"audio.sfxsimple": {
21+
"prefix": "sfx",
22+
"scope": "pico8p8",
23+
"body": [
24+
"sfx(${1:sfx_number})",
25+
"$0"
26+
],
27+
"description": "Simple play sfx"
28+
},
29+
"audio.sfx": {
30+
"prefix": "sfxf",
31+
"scope": "pico8p8",
32+
"body": [
33+
"sfx(${1:sfx_number},${2:channel},${3:offset})",
34+
"$0"
35+
],
36+
"description": "Full play sfx"
37+
}
338
}

snippets/cart_data.json

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
11
{
2-
2+
"cartdata.cartdata": {
3+
"prefix": "cartdata",
4+
"scope": "pico8p8",
5+
"body": [
6+
"cartdata(${1:cart_name})",
7+
"$0"
8+
],
9+
"description": "Open cart data (once per exection)"
10+
},
11+
"cartdata.dget": {
12+
"prefix": "dget",
13+
"scope": "pico8p8",
14+
"body": [
15+
"dget(${1:index})",
16+
"$0"
17+
],
18+
"description": "Get number stored at index (call cartdata first)"
19+
},
20+
"cartdata.dset": {
21+
"prefix": "dset",
22+
"scope": "pico8p8",
23+
"body": [
24+
"dset(${1:index}, ${2:value})",
25+
"$0"
26+
],
27+
"description": "Store value at index (call cartdata first)"
28+
}
329
}

snippets/coroutines.json

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
11
{
2-
2+
"coroutines.cocreate": {
3+
"prefix": "cocreate",
4+
"scope": "pico8p8",
5+
"body": [
6+
"cocreate(${1:function})",
7+
"$0"
8+
],
9+
"description": "Create a coroutine that executes the function"
10+
},
11+
"coroutines.coresume": {
12+
"prefix": "coresume",
13+
"scope": "pico8p8",
14+
"body": [
15+
"coresume(${1:coroutine}${2:,additional_initial_parameters})",
16+
"$0"
17+
],
18+
"description": "Resume a created coroutine, passing optional additional parameters in first time."
19+
},
20+
"coroutines.costatus": {
21+
"prefix": "costatus",
22+
"scope": "pico8p8",
23+
"body": [
24+
"costatus(${1:coroutine})",
25+
"$0"
26+
],
27+
"description": "Get the status of a coroutine, either 'running', 'suspended', or 'dead'."
28+
},
29+
"coroutines.yield": {
30+
"prefix": "yield",
31+
"scope": "pico8p8",
32+
"body": [
33+
"yield()",
34+
"$0"
35+
],
36+
"description": "Pause execution from within a coroutine."
37+
}
338
}

snippets/graphics.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"camera": {
2+
"graphics.camera": {
33
"prefix": "cam",
44
"scope": "pico8p8",
55
"body": [
66
"camera(${1:x},${2:y})"
77
],
88
"description": "Set camera position"
99
},
10-
"circ": {
10+
"graphics.circ": {
1111
"prefix": "circ",
1212
"scope": "pico8p8",
1313
"body": [
1414
"circ(${1:x},${2:y},${3:radius},${4|black,dark_blue,dark_purple,dark_green,brown,dark_gray,light_gray,white,red,orange,yellow,green,blue,indigo,pink,peach|})"
1515
],
1616
"description": "Draw a circle"
1717
},
18-
"circfill": {
18+
"graphics.circfill": {
1919
"prefix": "circf",
2020
"scope": "pico8p8",
2121
"body": [

0 commit comments

Comments
 (0)