-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b80fe4
commit d6fc46d
Showing
17 changed files
with
341 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
>> m := Media new. | ||
|
||
m link: ( Package new: ['demodata'] ). | ||
|
||
>> mouse := Image new: ['mouse.png']. | ||
|
||
mouse | ||
x: 0 y: 100, | ||
speed: 5, | ||
controllable: True. | ||
|
||
m screen: ['demo.png']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
>> m := Media new. | ||
>> html := Network send: None to: ['https://citrine-lang.org/']. | ||
>> meta := html split: ['<meta name="description" content="']. | ||
meta := meta at: 2, split: ['"'], at: 1. | ||
m show: ['Fetched:'] + meta. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
>> m := Media new. | ||
>> a := Blob new: 8. | ||
a bytes: ( | ||
Sequence <<: | ||
2, ; 0 ; 0 ; 0 ; | ||
1 ; 0 ; 0 ; 0 | ||
). | ||
|
||
>> struct := Blob struct: (Sequence <<: ['int'], ; ['int']). | ||
|
||
m link: ( Sequence <<: ['@structtest'], ; | ||
['@structtest'] ; | ||
(Sequence <<: struct) ; | ||
['int'] ; | ||
['ffitest'] ; | ||
['ffisum:'] | ||
). | ||
|
||
m show: ['FFI:'] + (ffitest ffisum: a). | ||
|
||
struct structfree. | ||
struct free. | ||
a free. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
>> m := Media new. | ||
m link: ( Package new: ['demodata'] ). | ||
|
||
>> fish := Image new: ['fish.png']. | ||
>> quay := Image new: ['quay.png']. | ||
|
||
fish | ||
x: 0 y: 100, | ||
speed: 2, | ||
gravity: 0.2, | ||
friction: 0.01, | ||
acceleration: 0.2, | ||
controllable: True. | ||
|
||
|
||
quay | ||
x: 200 y: 100, | ||
wall: True. | ||
|
||
m screen: ['demo.png']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
>> m := Media new. | ||
m link: ( Package new: ['demodata'] ). | ||
|
||
>> quay := Image new: ['quay.png']. | ||
>> boat := Image new: ['boat.png']. | ||
|
||
boat | ||
x: 100 y: 100, | ||
speed: 2, | ||
friction: 0.01, | ||
acceleration: 0.2, | ||
controllable: 4. | ||
|
||
quay | ||
x: 200 y: 100, | ||
wall: True. | ||
|
||
m screen: ['demo.png']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
>> m := Media new. | ||
m link: ( Package new: ['demodata'] ). | ||
|
||
m width: 350 height: 175. | ||
|
||
>> rock := Image new: ['rock.png']. | ||
>> rock2 := Image new: ['rock.png']. | ||
>> hiker := Image new: ['hiker.png']. | ||
|
||
hiker | ||
x: 100 y: 100, | ||
speed: 2, | ||
reel: 2 speed: 10, | ||
gravity: 1, | ||
friction: 0.5, | ||
controllable: True. | ||
|
||
rock | ||
x: 150 y: 300, | ||
wall: True. | ||
|
||
rock2 | ||
x: 250 y:180, | ||
wall: True. | ||
|
||
m on: ['start'] do: { | ||
rock to-x: 150 y: 200. | ||
rock2 to-x: 380 y: 180. | ||
}. | ||
|
||
rock on: ['destination'] do: { | ||
self y? <=: 200, true: { | ||
self to-x: 150 y: 300. | ||
}, else: { | ||
self to-x: 150 y: 200. | ||
}. | ||
}. | ||
|
||
rock2 on: ['destination'] do: { | ||
self x? >=: 380, true: { | ||
self to-x: 250 y: 180. | ||
}, else: { | ||
self to-x: 380 y: 180. | ||
}. | ||
}. | ||
|
||
m screen: ['demo.png']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
>> m := Media new. | ||
m link: ( Package new: ['demodata'] ). | ||
>> balloon := Image new: ['balloon.png']. | ||
>> bird := Image new: ['bird.png'], reel: 2 speed: 10. | ||
|
||
bird on: ['fly'] do: { | ||
>> right := Number between: 0 and: 500. | ||
>> height := Number between: 0 and: 100. | ||
self to-x: right y: height. | ||
}. | ||
|
||
bird on: ['destination'] do: { self fly. }. | ||
balloon on: ['collision:'] do: { :other | ||
(other = bird) true: { Program end. }. | ||
}. | ||
m on: ['start'] do: { | ||
balloon | ||
fixate: True, | ||
active: True, | ||
controllable: 1, | ||
gravity: 0.2. | ||
bird | ||
x: 300 y: 10, | ||
gravity: 0.01, | ||
speed: 1, | ||
fly. | ||
}. | ||
m screen: ['demo.png']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
>> m := Media new. | ||
m link: ( Package new: ['demodata'] ). | ||
>> ball := Image new: ['ball.png']. | ||
>> bat := Image new: ['bat.png']. | ||
|
||
>> a := Image new: ['wall1.png']. | ||
>> b := Image new: ['wall1.png']. | ||
>> c := Image new: ['wall2.png']. | ||
>> d := Image new: ['wall2.png']. | ||
|
||
a x: 0 y: 0, wall: True. | ||
b x: 0 y: 350, wall: True. | ||
c x: 0 y: 0, wall: True. | ||
d x: 750 y: 0, wall: True. | ||
|
||
ball | ||
x: 400 y: 100, | ||
to-x: (Number between: 200 and: 800) y: 500, | ||
gravity: 1, | ||
bounce: True, | ||
active: True. | ||
|
||
bat | ||
x: 100 y: 300, | ||
speed: 5, | ||
friction: 0.01, | ||
accelerate: 0.4, | ||
controllable: 3, | ||
wall: True. | ||
|
||
ball on: ['collision:'] do: { self speed: 7. }. | ||
|
||
m screen: ['demo.png']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
>> m := Media new. | ||
m link: ( Package new: ['demodata'] ). | ||
>> o := Color new red: 0 green: 0 blue: 0. | ||
>> a := Image new: ['demo.png']. | ||
>> r := 80. | ||
>> c := 200. | ||
|
||
m on: ['start'] do: { | ||
{ :j | ||
>> p := Sequence new. | ||
{ :i | ||
p append: ( | ||
Point new | ||
x: r * i cos + ( r * j cos + c ) | ||
y: r * i sin + ( r * j sin + c ) | ||
). | ||
} * 360. | ||
|
||
a draw: p color: ( | ||
Color new | ||
red: 0 | ||
green: 255 - (j / 36) * 255 | ||
blue: (j / 36) * 255 | ||
). | ||
|
||
} * 36. | ||
}. | ||
|
||
m screen: ['demo.png']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
>> m := Media new. | ||
m link: ( Package new: ['demodata'] ). | ||
>> target := Image new: ['target.png']. | ||
>> sfx := Sound new: ['sfx.ogg']. | ||
|
||
target on: ['click'] do: { | ||
sfx play. | ||
m show: ( | ||
['x,y'] x self x? y self y? | ||
). | ||
}. | ||
|
||
m on: ['timer:'] do: { | ||
target | ||
x: (Number between: 50 and: 750) | ||
y: (Number between: 50 and: 350). | ||
m timer: 1 after: 2000. | ||
}. | ||
|
||
m on: ['start'] do: { | ||
m timer: 1 after: 1. | ||
}. | ||
|
||
m screen: ['demo.png']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
>> m := Media new. | ||
m link: ( Package new: ['demodata'] ). | ||
>> d := Image new: ['demo.png']. | ||
>> f := Font new | ||
source: ['DoubleStrike.ttf'] # public domain font | ||
size: 40. | ||
|
||
d font: f, | ||
align-x: 100 y: 100, | ||
line-height: 40, | ||
editable: True, | ||
ink: (Color new red: 150 green: 150 blue: 0), | ||
highlight: (Color new red: 50 green: 50 blue: 0), | ||
write: ['Lorem Ipsum...']. | ||
|
||
m screen: ['demo.png']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
|
||
setlocal enabledelayedexpansion | ||
|
||
rem Ensure at least one argument is provided | ||
if "%~1"=="" ( | ||
echo No arguments provided. | ||
exit /b 1 | ||
) | ||
|
||
rem Initialize an empty variable to hold the processed filenames | ||
set "args=" | ||
|
||
rem Loop through all command-line arguments | ||
for %%i in (%*) do ( | ||
rem Extract the filename with extension | ||
set "args=!args! %%~nxi" | ||
) | ||
|
||
rem Call the other batch file with the filenames only | ||
ctrnl.exe pak-o-mat.ctr %args% | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Desktop Entry] | ||
Version=1.0 | ||
Type=Application | ||
Name=export | ||
Comment= | ||
Exec=bash export.sh %F | ||
Icon= | ||
Path= | ||
Terminal=true | ||
StartupNotify=false |
Oops, something went wrong.