From d8b306536cacbd1b5f3865637ccc71f8d2ab42c9 Mon Sep 17 00:00:00 2001 From: Ry Date: Sat, 24 Jun 2023 15:53:21 -0700 Subject: [PATCH] Add a few overlay management routines for Okameron --- fox32rom.def.okm | 5 +++++ fox32rom_okm.asm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/fox32rom.def.okm b/fox32rom.def.okm index 36faab1..cd33f19 100644 --- a/fox32rom.def.okm +++ b/fox32rom.def.okm @@ -18,6 +18,11 @@ MODULE Fox32ROM; EXTERN PROCEDURE DrawStrToBackground: INT; EXTERN PROCEDURE DrawFormatStrToBackground: INT; + EXTERN PROCEDURE FillOverlay: INT; + EXTERN PROCEDURE DrawStrToOverlay: INT; + EXTERN PROCEDURE DrawFormatStrToOverlay: INT; + EXTERN PROCEDURE DrawFilledRectangleToOverlay: INT; + EXTERN PROCEDURE RYFSOpen: INT; EXTERN PROCEDURE RYFSSeek: INT; EXTERN PROCEDURE RYFSTell: INT; diff --git a/fox32rom_okm.asm b/fox32rom_okm.asm index 16ca93d..f914a37 100644 --- a/fox32rom_okm.asm +++ b/fox32rom_okm.asm @@ -78,6 +78,50 @@ DrawFormatStrToBackground: pop r10 ret +; PROCEDURE FillOverlay(color, overlay: INT;); +FillOverlay: + jmp fill_overlay + +; PROCEDURE DrawStrToOverlay( +; str: POINTER TO CHAR; +; x, y, fgColor, bgColor, overlay: INT; +; ); +DrawStrToOverlay: + jmp draw_str_to_overlay + +; PROCEDURE DrawFormatStrToBackground( +; str: POINTER TO CHAR; +; x, y, fgColor, bgColor, overlay, +; format0, format1: INT; +; ); +DrawFormatStrToOverlay: + push r10 + push r11 + push r12 + push r13 + push r14 + push r15 + mov r10, r5 + mov r11, r6 + mov r12, r7 + mov r13, 0 + mov r14, 0 + mov r15, 0 + call draw_format_str_to_overlay + pop r15 + pop r14 + pop r13 + pop r12 + pop r11 + pop r10 + ret + +; PROCEDURE DrawFilledRectangleToOverlay( +; x, y, width, height, color, overlay: INT; +; ); +DrawFilledRectangleToOverlay: + jmp draw_filled_rectangle_to_overlay + ; PROCEDURE RYFSOpen( ; name: POINTER TO CHAR; ; id: INT;