mirror of
https://github.com/irmen/prog8.git
synced 2024-11-23 07:32:10 +00:00
25 lines
616 B
Lua
25 lines
616 B
Lua
%import textio
|
|
%import bmx
|
|
%zeropage basicsafe
|
|
%option no_sysinit
|
|
|
|
main {
|
|
sub start() {
|
|
bmx.palette_buffer_ptr = memory("palette", 512, 0)
|
|
if bmx.open(8, "desertfish.bmx") {
|
|
if bmx.continue_load(0,0) {
|
|
uword offset = 10*320 + 100
|
|
bmx.width = 100
|
|
bmx.height = 150
|
|
if bmx.save(8, "@:stamp.bmx", 0, offset, 320) {
|
|
txt.print("save stamp ok\n")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
txt.print("error: ")
|
|
txt.print(bmx.error_message)
|
|
txt.nl()
|
|
}
|
|
}
|