bg: Initial commit

This commit is contained in:
Ry 2022-12-25 22:00:17 -08:00
parent 455a909255
commit f0c7d0be79
4 changed files with 32 additions and 5 deletions

4
.gitignore vendored
View File

@ -2,6 +2,6 @@
**/.vscode/ **/.vscode/
**/*.fxf **/*.fxf
**/wallpaper.inc **/bg.inc
**/wallpapr.raw **/bg.raw
**/fox32os.img **/fox32os.img

BIN
bg/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 KiB

24
bg/main.asm Normal file
View File

@ -0,0 +1,24 @@
; 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
#include "../../fox32rom/fox32rom.def"
#include "../fox32os.def"

View File

@ -28,9 +28,12 @@ echo "assembling barclock"
echo "assembling terminal" echo "assembling terminal"
../fox32asm/target/release/fox32asm terminal/main.asm base_image/terminal.fxf ../fox32asm/target/release/fox32asm terminal/main.asm base_image/terminal.fxf
echo "creating wallpapr.raw" echo "assembling bg"
../tools/gfx2inc/target/release/gfx2inc 640 480 launcher/wallpaper.png launcher/wallpaper.inc ../fox32asm/target/release/fox32asm bg/main.asm base_image/bg.fxf
../fox32asm/target/release/fox32asm launcher/wallpaper.inc base_image/wallpapr.raw
echo "creating bg.raw"
../tools/gfx2inc/target/release/gfx2inc 640 480 bg/bg.png bg/bg.inc
../fox32asm/target/release/fox32asm bg/bg.inc base_image/bg.raw
echo "adding files to fox32os.img" echo "adding files to fox32os.img"
cd base_image cd base_image