2022-12-26 07:00:17 +01:00
|
|
|
; background image utility
|
|
|
|
|
|
|
|
; open the background file and draw it
|
|
|
|
; if the file can't be opened, then just exit
|
|
|
|
mov r0, bg_file_name
|
|
|
|
mov r1, 0
|
|
|
|
mov r2, bg_file_struct
|
|
|
|
call open
|
|
|
|
cmp r0, 0
|
|
|
|
ifz call end_current_task
|
|
|
|
|
|
|
|
; read the background file directly into the background framebuffer
|
|
|
|
mov r0, 1228800 ; 640x480x4
|
|
|
|
mov r1, bg_file_struct
|
|
|
|
mov r2, 0x02000000
|
|
|
|
call read
|
|
|
|
|
|
|
|
call end_current_task
|
|
|
|
|
|
|
|
bg_file_name: data.str "bg raw"
|
|
|
|
bg_file_struct: data.fill 0, 8
|
|
|
|
|
2022-12-27 04:05:27 +01:00
|
|
|
#include "../../../fox32rom/fox32rom.def"
|
|
|
|
#include "../../fox32os.def"
|