gui: added OBJ_GetChildBySelector
This commit is contained in:
@@ -356,6 +356,38 @@ OBJ_GetChildAt_ret:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_GetChildBySelector @global
|
||||
;
|
||||
; @param Y address of object
|
||||
; @param R16 selector to look for
|
||||
; @return CFLAG set, if found, cleared otherwise
|
||||
; @return r19:r18 resulting object
|
||||
; @clobbers r17
|
||||
|
||||
OBJ_GetChildBySelector:
|
||||
push yl
|
||||
push yh
|
||||
rcall OBJ_GetFirstChild ; R19:R18=obj (none)
|
||||
OBJ_GetChildBySelector_loop:
|
||||
brcc OBJ_GetChildBySelector_ret
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
ldd r17, Y+OBJECT_OFFS_SELECTOR
|
||||
cp r17, r16
|
||||
breq OBJ_GetChildBySelector_secRet
|
||||
rcall OBJ_GetNext ; R19:R18=obj (none)
|
||||
rjmp OBJ_GetChildBySelector_loop
|
||||
OBJ_GetChildBySelector_secRet:
|
||||
sec
|
||||
OBJ_GetChildBySelector_ret:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine OBJ_SkipObjects @global
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user