
gah you ass! I done said before that EchoOS libs include not only the DCS ones but an extended set for objects like Custom Sized windows and Combo boxes Heres an exact copy past to show you that my code in comparison to Kerms...
Here's my window rendering routines for Null, LargeWin, SmallWin, and CustomWin...
Code: GUIRNull:
xor a
ld (winType),a
ld (winTop),a
ld (winLeft),a
ld a,95
ld (winRight),a
ld a,63
ld (winBottom),a
ret
GUIRLargeWin:
ld a,1
ld (winType),a
ld hl,0
ld d,95
ld e,63
jr DrawWindow
GUIRSmallWin:
ld a,2
ld (winType),a
ld a,(bc)
ld h,a
inc bc
ld a,(bc)
ld l,a
inc bc
ld a,79
add a,h
dec a
cp 96
ret c
ld d,a
ld a,47
add a,l
dec a
cp 64
ret c
ld e,a
jr DrawWindow
GUIRCustomWin:
ld a,3
ld (winType),a
ld a,(bc)
ld h,a
inc bc
ld a,(bc)
ld l,a
inc bc
ld a,(bc)
add a,h
dec a
ld d,a
inc bc
ld a,(bc)
add a,l
dec a
ld e,a
inc bc
DrawWindow:
ld a,l
sub -9
ld (winTop),a
ld a,h
inc a
ld (winLeft),a
ld a,d
dec a
ld (winRight),a
ld a,e
dec a
ld (winBottom),a
push bc
push hl
inc l
push de
ld a,0
call DrawCustomRectangle
pop de
pop hl
push hl
push de
inc l
ld a,1
call mos_fastrectangle
pop de
pop hl
push hl
inc h
ld a,9
add a,l
ld e,a
ld a,$FF
call DrawCustomRectangle
pop hl
pop ix
inc l
inc h
inc h
push hl
inc l
ld a,h
ld b,5
call iPutSprite
pop de
ld a,6
add a,d
ld (pencol),a
ld a,e
ld (penrow),a
push ix
pop hl
set textinverse,(iy+textflags)
call _vPutsApp
res textinverse,(iy+textflags)
ret
and here's Kerms which has only Null, LargeWin, and SmallWin...
Code: GUIRNull:
call RenderGUISetWinType
xor a
call RenderGUISetWinX
xor a
call RenderGUISetWinY
ret
GUIRLargeWin:
push bc
call RenderGUISetWinType
ld a,1
call RenderGUISetWinX
ld a,9
call RenderGUISetWinY
ld hl,gbuf
ld (hl),0
push hl
push hl
pop de
inc de
ld bc,768-1
ldir
ld b,8*12
pop hl
ld b,64-8
push hl
ld de,8*12
add hl,de
ld de,11
GUIRLargeWinLoop1:
ld (hl),$80
add hl,de
ld (hl),$01
inc hl
djnz GUIRLargeWinLoop1
pop hl
ld b,10
ld (hl),$7f
inc hl
GUIRLargeWinLoop2:
ld (hl),$FF
inc hl
djnz GUIRLargeWinLoop2
ld (hl),$fe
ld b,12
ld hl,PlotsScreen+(8*12)
GUIRLargeWinLoop3:
ld (hl),$FF
inc hl
djnz GUIRLargeWinLoop3
ld b,10
ld hl,PlotsScreen+(63*12)
ld (hl),$7f
inc hl
GUIRLargeWinLoop4:
ld (hl),$FF
inc hl
djnz GUIRLargeWinLoop4
ld (hl),$fe
pop ix
push ix
ld a,2
ld b,5
ld c,1
ld l,a
call imPutSprite
pop hl
ld de,5
add hl,de
ld a,8
ld (pencol),a
ld a,1
ld (penrow),a
bcall(_vPutsApp)
ld hl,gbuf+12
ld b,12*7
GUIRLargeWinInvLoop:
ld a,(hl)
cpl
ld (hl),a
inc hl
djnz GUIRLargeWinInvLoop
ret
GUIRSmallWin:
push bc
call RenderGUISetWinType
pop bc
;inc bc
ld a,(bc)
push af
push bc
inc a
call RenderGUISetWinX
pop bc
inc bc
ld a,(bc)
pop hl
ld l,a
push bc
push hl
add a,9
call RenderGUISetWinY
pop hl
;now erase the window area
push hl
ld a,80d
add a,h
ld d,a
ld a,48
add a,l
ld e,a
ld a,0
call DrawCustomRectangle
pop hl
push hl
ld b,48
call VertLine
pop hl
ld b,48
push hl
ld a,80
add a,h
ld h,a
call VertLine
pop hl
push hl
ld a,l
add a,9
ld e,a
ld a,h
add a,80
ld d,a
ld a,255
call DrawCustomRectangle
pop hl
push hl
ld a,l
add a,48
ld l,a
ld e,a
ld a,h
add a,80
ld d,a
ld a,255
call api_drawline_set
pop de
pop hl
inc hl
push hl
push de
push hl
pop ix
ld a,d
inc a
inc a
ld l,e
inc l
inc l
ld b,5
call imPutSprite
pop hl
ld a,h
add a,8
ld (pencol),a
ld a,l
inc a
ld (penrow),a
pop bc
ld hl,5
add hl,bc
bcall(_vPutsApp)
ret
the only difference is that he uses routines to set the window properties instead of just saving them like i do. I cant help it that I have ADD and have a hard time sticking to a long project.Just because I have a hard time finishing projects doesnt mean I'm a complete idiot at assembly.Some of my accompilishments.
Quote:
Checking for Multiple Keypresses without Direct Input (no ones ever done before)
DCS7 stack routines PushGuiStacks and GUIFindThis
Rotating 8x8 sprites with bitshifting
You learn z80 first then tell me how much of a tard im am