mirror of
https://github.com/irmen/prog8.git
synced 2024-09-10 09:54:32 +00:00
31 lines
660 B
Lua
31 lines
660 B
Lua
%import textio
|
|
%zeropage basicsafe
|
|
|
|
main {
|
|
sub start() {
|
|
const ubyte world_width=100
|
|
|
|
struct Color {
|
|
ubyte red
|
|
ubyte green
|
|
ubyte blue
|
|
}
|
|
|
|
Color rgb = [255,world_width,0] ; note that struct initializer value is same as an array
|
|
;rgb = [255,world_width,0] ; note that struct initializer value is same as an array
|
|
;rgb = [255,world_width/2,0] ; note that struct initializer value is same as an array
|
|
|
|
|
|
; struct Entity {
|
|
; ubyte active
|
|
; ubyte x
|
|
; ubyte y
|
|
; byte direction
|
|
; }
|
|
;
|
|
; Entity pede
|
|
; pede = [1, 1, 0, -1]
|
|
}
|
|
}
|
|
|