mirror of
https://github.com/irmen/prog8.git
synced 2025-02-26 11:29:24 +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:
|
||||
|
||||

|
||||
|
||||
|
||||
One of the included examples (wizzine.p8) animates a bunch of sprite balloons and looks like this:
|
||||
|
||||

|
||||
@ -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:
|
||||
|
||||

|
||||
|
||||
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:
|
||||
|
||||

|
||||
|
@ -96,43 +96,6 @@ when compiled an ran on a C-64 you get this:
|
||||
: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
|
||||
------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user