A83: Highlighting...


[Prev][Next][Index][Thread]

A83: Highlighting...




Hi,
I am trying to get a highlighting routine and I am having a little trouble.  
I want it to do like what happens in all highlighting routines like in ION 
or Protect.  It also erases the text after one movement so it would be nice 
if that were eliminated.  I think you guy's know what I am talking about.  
Is there anyway you could look at the code I have so far and tell me what 
needs to be done to create the hightlighting routine that I want. Also, text 
can be moved and the spacing of the ber movements can be changed. (ie, the 
bars can overlap a little as in ION and Protect) Thanks:

(Please note that this is in the very early stages and all text is not in 
the right position for looks but there only for development purposes)

Da' Code:

.NOLIST

#define equ .equ
#define EQU .equ
#define end .end
#define END .end

.include "ti83asm.inc"
.include "tokens.inc"

.LIST

kDown           .equ    04h
kUp             .equ    03h
kClear          .equ    09h

.org 9327h

	call	_runIndicOff
	call    _clrLCDFull
	call	_grbufclr
	ld	a,09h
	ld	(barmin),a
	ld	a,15h
	ld	(barmax),a
	ld	a,09h
	ld	(barposition),a

mainloop:
	call	highlight
	call	drawmain
	call 	drawmenu

keyloop:
	call	_getkey
	cp	kClear
	jr	z,exit
	cp	kUp
	jr	z,up
	cp	kDown
	jr	z,down
	jp	keyloop

exit:
	call	_dispdone
	call	_homeup
	call	_clrlcdfull
	ret

down:
	ld 	a,(barmax)
	ld 	c,a
	ld 	a,(barposition)
	cp 	c
	jr 	z,keyloop
	call 	highlight
	ld 	a,(barposition)
	add 	a,06h
	ld 	(barposition),a
	call 	highlight
	jr	keyloop

up:
	ld 	a,(barmin)
	ld 	c,a
	ld 	a,(barposition)
	cp 	c
	jr 	z,keyloop
        call 	highlight
	ld 	a,(barposition)
	add 	a,-06h
	ld 	(barposition),a
	call 	highlight
	jr	keyloop

drawmain:
  	ld 	hl,0001h
  	ld 	(PENCOL),hl
	ld 	hl,title
	call 	_vputs
	ld	hl,0033h
  	ld 	(PENCOL),hl
	ld 	hl,name
	call 	_vputs
	ld	hl,390Bh
  	ld 	(PENCOL),hl
	ld 	hl,email
	call 	_vputs
	ret

drawmenu:
  	ld 	hl,0D19h
  	ld 	(PENCOL),hl
	ld 	hl,o1
	call	 _vputs
  	ld 	hl,1519h
  	ld 	(PENCOL),hl
	ld 	hl,o2
	call 	_vputs
  	ld 	hl,1D19h
  	ld 	(PENCOL),hl
	ld 	hl,o3
	jp 	_vputs

highlight:
	ld	hl,(barposition)
	ld 	h,00h
	add	hl,hl
	add	hl,hl
	add	hl,hl
	add	hl,hl
	ld	de,PLOTSSCREEN+12
	add	hl,de
	ld	b,12*7

lightloop:
	ld	a,(hl)
	cpl
	ld	(hl),a
	inc	hl
	djnz	lightloop
	call	_grbufcpy_v
	ret

title:		.db	"Title",0
name:		.db	"Doug Williams",0
email:		.db	"dougw101@hotmail.com",0
o1:		.db	"Option 1",0
o2:		.db	"Option 2",0
o3:		.db	"Option 3",0

workspace	equ	$
buffer1		equ	workspace
prgmpos		equ	workspace+14
sp		equ	workspace+15
barposition	equ	workspace+17
barmax		equ	workspace+18
barmin		equ	workspace+19

.end
END

Thanks again!


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com