mirror of
https://github.com/irmen/prog8.git
synced 2024-12-03 13:49:23 +00:00
doc
This commit is contained in:
parent
c376e42092
commit
4fe408f1fd
@ -124,7 +124,6 @@ when compiled an ran on a C-64 you'll get:
|
|||||||
|
|
||||||
![c64 screen](docs/source/_static/primes_example.png)
|
![c64 screen](docs/source/_static/primes_example.png)
|
||||||
|
|
||||||
|
|
||||||
One of the included examples (wizzine.p8) animates a bunch of sprite balloons and looks like this:
|
One of the included examples (wizzine.p8) animates a bunch of sprite balloons and looks like this:
|
||||||
|
|
||||||
![wizzine screen](docs/source/_static/wizzine.png)
|
![wizzine screen](docs/source/_static/wizzine.png)
|
||||||
@ -136,3 +135,8 @@ Another example (cube3d-sprites.p8) draws the vertices of a rotating 3d cube:
|
|||||||
If you want to play a video game, a fully working Tetris clone is included in the examples:
|
If you want to play a video game, a fully working Tetris clone is included in the examples:
|
||||||
|
|
||||||
![tehtriz_screen](docs/source/_static/tehtriz.png)
|
![tehtriz_screen](docs/source/_static/tehtriz.png)
|
||||||
|
|
||||||
|
The CommanderX16 compiler target is quite capable already too, here's a well known space ship
|
||||||
|
animated in 3D with hidden line removal, in the CommanderX16 emulator:
|
||||||
|
|
||||||
|
![cobra3d](docs/source/_static/cobra3d.png)
|
||||||
|
@ -96,43 +96,6 @@ when compiled an ran on a C-64 you get this:
|
|||||||
:alt: result when run on C-64
|
:alt: result when run on C-64
|
||||||
|
|
||||||
|
|
||||||
The following programs shows a use of the high level ``struct`` type::
|
|
||||||
|
|
||||||
|
|
||||||
%import c64textio
|
|
||||||
%zeropage basicsafe
|
|
||||||
|
|
||||||
main {
|
|
||||||
|
|
||||||
struct Color {
|
|
||||||
ubyte red
|
|
||||||
ubyte green
|
|
||||||
ubyte blue
|
|
||||||
}
|
|
||||||
|
|
||||||
sub start() {
|
|
||||||
|
|
||||||
Color purple = [255, 0, 255]
|
|
||||||
|
|
||||||
Color other
|
|
||||||
|
|
||||||
other = purple
|
|
||||||
other.red /= 2
|
|
||||||
other.green = 10 + other.green / 2
|
|
||||||
other.blue = 99
|
|
||||||
|
|
||||||
txt.print_ub(other.red)
|
|
||||||
c64.CHROUT(',')
|
|
||||||
txt.print_ub(other.green)
|
|
||||||
c64.CHROUT(',')
|
|
||||||
txt.print_ub(other.blue)
|
|
||||||
c64.CHROUT('\n')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
when compiled and ran, it prints ``127,10,99`` on the screen.
|
|
||||||
|
|
||||||
|
|
||||||
Design principles and features
|
Design principles and features
|
||||||
------------------------------
|
------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user