LZ: White on Black text


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

LZ: White on Black text



OK, I want to have a simple menu system where the highlighted text is white
on black and the others are black on white. I am using the set 3,(IY+05) and 
res 3,(IY+05) to change back and forth but when I run the program the text is
not white on black it is white on white also known as invisible.  Why is this
and could anyone tell me how to do a jump (in Usgard) that is to long for the
jr statement to do.  Is the only way the JUMP_Z($%^&#$%^) system or is there
a better way.
This is the code below:
;Orion Masters source code
#include "usgard.h"
.org 0
.db "Orion Masters by NCA",0
.db 0
	call CLEARLCD
	ld a,4
	out (5),a
;Prints in menu text My Credits
	ld hl,$3A01
	ld ($8333),hl
	ld hl,&CreditText
	call D_ZM_STR
;Prints the menu but first sets the starting point
	ld c,1
MenuOne:
	set 3,(IY+05)  ;<---Set to white on black
	ld hl,$2C05     ; Set up to print
	ld ($8333),hl
	ld hl,&Menu1
	call D_ZM_STR  ;Print
	res 3,(IY+05)    ;<---Reset to black on white
	ld hl,$2C2D
	ld ($8333),hl
	ld hl,&Menu2
	call D_ZM_STR
	ld hl,$2C66
	ld ($8333),hl
	ld hl,&Menu3
	call D_ZM_STR
	jr MenuKeyLoop
MenuTwo:
	res 3,(IY+05)
	ld hl,$2C05
	ld ($8333),hl
	ld hl,&Menu1
	call D_ZM_STR
	set 3,(IY+05)
	ld hl,$2C2D
	ld ($8333),hl
	ld hl,&Menu2
	call D_ZM_STR
	res 3,(IY+05)
	ld hl,$2C66
	ld ($8333),hl
	ld hl,&Menu3
	call D_ZM_STR
	jr MenuKeyLoop
MenuThree:
	res 3,(IY+05)
	ld hl,$2C05
	ld ($8333),hl
	ld hl,&Menu1
	call D_ZM_STR
	ld hl,$2C2D
	ld ($8333),hl
	ld hl,&Menu2
	call D_ZM_STR
	set 3,(IY+05)
	ld hl,$2C66
	ld ($8333),hl
	ld hl,&Menu3
	call D_ZM_STR
MenuKeyLoop:
	call GET_KEY
	cp $3
	jr Z,Right
	cp $2
	jr Z,Left
	cp $36
	jr Z,Enter
	cp $9
	jr Z,Enter
	cp $37
	jr Z,Ending
	jr MenuKeyLoop
Right:
	ld a,c
	inc c
	cp 1
	jr Z,MenuTwo
	cp 2
	jr Z,MenuThree
	ld c,1
     JUMP_(MenuOne)  ;<----Any other way???
Left:
	ld a,c
	dec c
	cp 2
     JUMP_Z(MenuOne)
	cp 3
     JUMP_Z(MenuTwo)
	ld c,3
	jr MenuThree
Enter:
	ld a,c
	cp 1
	jr Z,NewGame
	cp 2
	jr Z,ContinueGame
	cp 3
	jr Z,Ending
NewGame:
ContinueGame:
Ending:
	ret
;Text Data
CreditText:
	.db "Orion Masters by "
	.db "Nicholas Anderson",0
Menu1:
	.db "New Game",0
Menu2:
	.db "Continue Game",0
Menu3:
	.db "Exit",0
.end


Follow-Ups: