prog8/examples/test.p8

17 lines
293 B
Plaintext
Raw Normal View History

%import textio
main {
2023-08-01 22:49:55 +02:00
const ubyte ATTR_FALLING=$04
const ubyte ATTRF_EATABLE=$80
2023-08-01 22:49:55 +02:00
sub start() {
void test(10,20)
}
2023-08-01 22:49:55 +02:00
ubyte[10] attributes
2023-08-01 22:49:55 +02:00
sub test(ubyte tattr, ubyte tobject) -> bool {
return tattr&ATTR_FALLING==0 and attributes[tobject]&ATTRF_EATABLE
}
}