-
Notifications
You must be signed in to change notification settings - Fork 18
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
Paul Robson
committed
Jan 22, 2024
1 parent
cf97f53
commit 7092095
Showing
15 changed files
with
58 additions
and
21 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
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
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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
# | ||
# Where executables are | ||
# | ||
BINDIR=../../../bin | ||
BINDIR=.. | ||
# | ||
# Convert graphics files and put in storage (which is the SD Card/USB stick in the emulator.) | ||
# This takes the 3 png files and creates graphics.gfx | ||
# | ||
python $BINDIR/makeimg.zip | ||
cp graphics.gfx storage | ||
# | ||
# Convert source.bsc to a tokenised program | ||
# | ||
python3 $BINDIR/makebasic.zip source.bsc -oprogram.bas | ||
# | ||
# Run it in the emulator. Loads program.bas in to 'page' (where program code goes) | ||
# Then warm starts the interpreter. You can use exec to auto run it. | ||
# Then start the interpreter and runs the program (warm just starts it) | ||
# | ||
$BINDIR/neo program.bas@page warm | ||
$BINDIR/neo program.bas@page exec |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -1,9 +1,35 @@ | ||
' | ||
' A demo program | ||
' | ||
cls | ||
for i = 1 to 15 | ||
a = sin(i) | ||
ink i:print "Hello, world" | ||
cls:sprite clear:' clear screen & load sprites | ||
gload "graphics.gfx":' load the graphics file built in | ||
' | ||
' Draw some random lines | ||
' | ||
for i = 1 to 50 | ||
line 160,120 ink rand(16) to rand(320),rand(240) | ||
next | ||
|
||
' | ||
' Use Image to draw things. These are graphics not sprites. | ||
' | ||
image 0 to 10,10 | ||
image 0 dim 3 to 30,10: ' dim makes it bigger. | ||
image $80 dim 1 to 160,10 | ||
image $80,2 dim 2 to 190,10 | ||
image $C0 dim 1 to 240,10 | ||
' | ||
' Draw some text | ||
' | ||
text "Sprite Demo" solid dim 2 ink 3 to 10,100: ' solid here means black background rather than transparent | ||
' | ||
' Animate some sprites | ||
' | ||
n = 0 | ||
repeat | ||
if event(t1,3): ' this returns true once every 3/100 of a second using t1 to track it. | ||
n = n + 1:x = int(sin(n) * 160 + 160) | ||
sprite 0 image $80 to x,100 | ||
sprite 1 image $C0 to x,140 | ||
sprite 2 image $80 flip 2 to x,180 | ||
endif | ||
until false |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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