more work on dialogs.
This commit is contained in:
@@ -78,6 +78,51 @@ Window_FillRect:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_IsPointInRect @global
|
||||
;
|
||||
; @param Z pointer WINRECT object in FLASH (see @ref WINRECT_OFFS_X_LO)
|
||||
; @param R5:R4 X (dest)
|
||||
; @param R7:R6 Y (dest)
|
||||
; @clobbers r16, r17, r18, r19, r20, r21, Z
|
||||
|
||||
Window_IsPointInRect:
|
||||
; check X
|
||||
lpm r16, Z+ ; X
|
||||
lpm r17, Z+
|
||||
mov r18, r4 ; X
|
||||
mov r19, r5
|
||||
sub r18, r16
|
||||
sbc r19, r17 ; r19:r18=X pos relative to rectangle
|
||||
brcs Window_IsPointInRect_clcRet
|
||||
; check Y
|
||||
lpm r16, Z+ ; Y
|
||||
lpm r17, Z+
|
||||
mov r20, r6 ; Y
|
||||
mov r21, r7
|
||||
sub r20, r16
|
||||
sbc r21, r17 ; r21:r20=Y pos relative to rectangle
|
||||
brcs Window_IsPointInRect_clcRet
|
||||
; check width
|
||||
lpm r16, Z+ ; width
|
||||
lpm r17, Z+
|
||||
cp r18, r16 ; width > rel X?
|
||||
cpc r19, r17
|
||||
brcc Window_IsPointInRect_ret
|
||||
; check height
|
||||
lpm r16, Z+ ; height
|
||||
lpm r17, Z+
|
||||
cp r20, r16 ; height > rel Y?
|
||||
cpc r21, r17
|
||||
rjmp Window_IsPointInRect_ret ; CF set if inside rect
|
||||
Window_IsPointInRect_clcRet:
|
||||
clc
|
||||
Window_IsPointInRect_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_DrawTextFlash @global
|
||||
;
|
||||
@@ -102,7 +147,8 @@ Window_DrawTextFlash:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Window_DrawColorTextFlash @global
|
||||
;
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param Y pointer to screen object in SDRAM
|
||||
; @param Z pointer to null-terminated string
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param R5:R4 X (dest)
|
||||
|
||||
Reference in New Issue
Block a user