2022-12-26 07:00:17 +01:00
|
|
|
; background image utility
|
|
|
|
|
2023-07-25 06:17:56 +02:00
|
|
|
opton
|
|
|
|
|
2022-12-26 07:00:17 +01:00
|
|
|
; open the background file and draw it
|
|
|
|
; if the file can't be opened, then just exit
|
2023-03-06 02:30:51 +01:00
|
|
|
call get_current_disk_id
|
|
|
|
mov r1, r0
|
2022-12-26 07:00:17 +01:00
|
|
|
mov r0, bg_file_name
|
|
|
|
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
|
|
|
|
|
2023-03-23 00:36:25 +01:00
|
|
|
bg_file_name: data.strz "bg.raw"
|
2023-03-31 06:44:29 +02:00
|
|
|
bg_file_struct: data.fill 0, 32
|
2022-12-26 07:00:17 +01:00
|
|
|
|
2022-12-27 04:05:27 +01:00
|
|
|
#include "../../../fox32rom/fox32rom.def"
|
|
|
|
#include "../../fox32os.def"
|