kernel: Add get_active_window_struct

This commit is contained in:
Ry 2023-01-24 17:10:48 -08:00
parent 70cecc8667
commit cba8b52677
3 changed files with 12 additions and 0 deletions

View File

@ -29,6 +29,7 @@ fill_window: jmp [0x00000C28]
get_window_overlay_number: jmp [0x00000C2C]
start_dragging_window: jmp [0x00000C30]
new_messagebox: jmp [0x00000C34]
get_active_window_struct: jmp [0x00000C38]
; VFS jump table
open: jmp [0x00000D10]

View File

@ -45,6 +45,7 @@ jump_table:
data.32 get_window_overlay_number
data.32 start_dragging_window
data.32 new_messagebox
data.32 get_active_window_struct
; VFS jump table
org.pad 0x00000510

View File

@ -646,6 +646,16 @@ window_list_offset_to_struct:
mov r0, [r0]
ret
; get a pointer to the active window struct
; inputs:
; none
; outputs:
; r0: pointer to current window struct
get_active_window_struct:
movz.8 r0, [active_window_offset]
call window_list_offset_to_struct
ret
window_title_bar_patterns:
; 1x16 tile
data.32 0x00000000