more work on images on ili9341
- reading images from predefined ressources (stored at 0x8000+) works - drawing IDX2 images within widgets works - added some image ressources in IDX2 format
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_Init @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
|
||||
Widget_Init:
|
||||
rcall Widget_GetSdramPtr ; (none)
|
||||
@@ -93,7 +93,7 @@ Widget_Init:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_OnCreate @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @return CFLAG set if signal handled
|
||||
; @clobbers any, !Z
|
||||
|
||||
@@ -108,7 +108,7 @@ Widget_OnCreate:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_OnTouch @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param xl param1
|
||||
; @param xh param2
|
||||
; @return CFLAG set if signal handled
|
||||
@@ -186,7 +186,7 @@ Widget_OnTouch_ret:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_OnDraw @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param xl param1
|
||||
; @param xh param2
|
||||
; @return CFLAG set if signal handled
|
||||
@@ -264,7 +264,7 @@ Widget_IsPointInRect_ret:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_LoadDisplayRegs @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @return R1:R0 background color
|
||||
; @return R3:R2 foreground color
|
||||
; @return R5:R4 X
|
||||
@@ -299,7 +299,7 @@ Widget_LoadDisplayRegs:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_GetSdramPtr @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @return Y pointer to SDRAM data for widget
|
||||
; @clobbers none
|
||||
|
||||
@@ -316,7 +316,7 @@ Widget_GetSdramPtr:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_AddFlagsDown @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param R16 flags to add
|
||||
; @clobbers R17, R18, R19, Y
|
||||
|
||||
@@ -354,7 +354,7 @@ Widget_AddFlagsDown_ret:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_SubFlagsDown @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param R16 flags to add
|
||||
; @clobbers R17, R18, R19, Y
|
||||
|
||||
@@ -394,7 +394,7 @@ Widget_SubFlagsDown_ret:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_Clear @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
|
||||
Widget_Clear:
|
||||
rcall Widget_LoadDisplayRegs
|
||||
@@ -414,7 +414,7 @@ Widget_Clear:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_SelectColors @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param Y pointer to Widget data in SDRAM
|
||||
; @return r1:r0 background color
|
||||
; @return r3:r2 foreground color
|
||||
@@ -457,7 +457,7 @@ Widget_SelectColors_ret:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_MakeAbsPos @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param r5:r4 X0
|
||||
; @param r7:r6 Y0
|
||||
; @clobbers r16, r17
|
||||
@@ -484,7 +484,7 @@ Widget_MakeAbsPos:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_FillRect @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param r3:r2 color
|
||||
; @param r5:r4 X0
|
||||
; @param r7:r6 Y0
|
||||
@@ -503,7 +503,7 @@ Widget_FillRect:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_DrawBorder @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param r3:r2 color
|
||||
; @clobbers any, !Z
|
||||
|
||||
@@ -519,10 +519,33 @@ Widget_DrawBorder:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_DrawImage @global
|
||||
;
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param R1:R0 background color
|
||||
; @param R5:R4 X relative to widget
|
||||
; @param R7:R6 Y relative to widget
|
||||
; @param R13:R12 byte address pointer to image in FLASH (for LPM!)
|
||||
|
||||
Widget_DrawImage:
|
||||
rcall widgetCalcAbsPosAndBorders
|
||||
push zl
|
||||
push zh
|
||||
mov zl, r12
|
||||
mov zh, r13
|
||||
bigcall ili9341ImageDraw
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_DrawTextFlash @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param R5:R4 X relative to widget
|
||||
; @param R7:R6 Y relative to widget
|
||||
; @param R13:R12 byte address pointer to text in flash (for LPM!)
|
||||
@@ -539,7 +562,7 @@ Widget_DrawTextFlash:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_DrawColoredTextFlash @global
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param R5:R4 X relative to widget
|
||||
@@ -575,7 +598,7 @@ Widget_DrawColoredTextFlash_loopEnd:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetCalcAbsPosAndBorders
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param R5:R4 X relative to widget
|
||||
; @param R7:R6 Y relative to widget
|
||||
; @return R9:R8 first X pos right of widget
|
||||
@@ -615,7 +638,7 @@ widgetCalcAbsPosAndBorders:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetDrawChar
|
||||
;
|
||||
; @param Z byte address of object (for LPM!)
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param R16 char to write
|
||||
; @param R5:R4 absolute X on screen
|
||||
; @param R7:R6 absolute Y on screen
|
||||
@@ -675,7 +698,7 @@ widgetDrawChar_done:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_Tree_Init @global
|
||||
;
|
||||
; @param Z byte address of root object (for LPM!)
|
||||
; @param Z byte address of root widget object (for LPM!)
|
||||
|
||||
Widget_Tree_Init:
|
||||
push zl
|
||||
@@ -700,7 +723,7 @@ Widget_Tree_Init_loopEnd:
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_Tree_Draw @global
|
||||
;
|
||||
; @param Z byte address of root object (for LPM!)
|
||||
; @param Z byte address of root widget object (for LPM!)
|
||||
|
||||
Widget_Tree_Draw:
|
||||
ldi r16, WIDGET_SIGNAL_DRAW
|
||||
|
||||
Reference in New Issue
Block a user