Re: LZ: Usgard programming help needed


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

Re: LZ: Usgard programming help needed



The first bug that caught my eye is

call	&GET_KEY

should be

call	GET_KEY

Plus, Usgard .95 now requires a zero-terminated list of libraries, so
just add a .db 0 after the description.

Oh!  And end your strings with zeros.

Oh!  And a lot of your jp statements can be changed to jr statements (be
sure to remove the "&" sign, though)

If that doesn't work, I can look into it a little more.

Jim Reardon
jim.reardon@juno.com
Viva La Mexico
http://pages.prodigy.net/eviljim/
We all come into the world the same way - naked, screaming, covered in
blood.  But if you live your life right, that kind of thing doesn't have
to end there.

On Mon, 23 Jun 1997 18:03:32 -0400 (EDT) Chief28933@aol.com writes:
>Usgard programmers...why does this program need lib 62?
>This is the code that I have... I run reloc and then tasm and then the 
>new
>string85 then it goes to my calc and doesn't work
>
>Fix any bugs that us see that might be causing this please... Thanks 
>                      -Chief28933@aol.com
>
>P.S. Your name will appear in the credits at the end of the game if 
>your fix
>works
>
>;Orion Masters source code
>#include "usgard.h"
>.org 0
>.db "Orion Masters by NCA",0
>
>	call CLEARLCD
>	ld a,4
>	out (5),a
>
>;Prints in menu text My Credits
>	ld hl,$3B01
>	ld ($8333),hl
>	ld hl,&CreditText
>	call D_ZM_STR
>
>;Prints the menu
>	ld c,1
>MenuOne:
>	set 3,(IY+05)
>	ld hl,$2C05
>	ld ($8333),hl
>	ld hl,&Menu1
>	call D_ZM_STR
>	res 3,(IY+05)
>	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
>	jp &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
>	jp &MenuKeyLoop
>
>MenuThree:
>	res 3,(IY+05)
>	ld hl,$2C05
>	ld ($8333),hl
>	ld hl,&Menu1
>	call D_ZM_STR
>	res 3,(IY+05)
>	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
>	jp Z,&Right
>	cp $2
>	jp Z,&Left
>	cp $36
>	jp Z,&Enter
>	cp $09
>	jp Z,&Enter
>	cp $37
>	jp Z,&Ending
>	jp &MenuKeyLoop
>
>Right:
>	ld a,c
>	cp 1
>	inc c
>	jp &MenuTwo
>	cp 2
>	inc c
>	jp &MenuThree
>	cp 3
>	ld c,1
>	jp &MenuOne
>
>Left:
>	ld a,c
>	cp 1
>	ld c,3
>	jp &MenuThree
>	cp 2
>	dec c
>	jp &MenuOne
>	cp 3
>	dec c
>	jp &MenuTwo
>
>Enter:
>	ld a,c
>	cp 1
>	jp &NewGame
>	cp 2
>	jp &ContinueGame
>	cp 3
>	jp &Ending
>
>
>NewGame:
>ContinueGame:
>Ending:
>	ret
>
>;Text Data
>CreditText:
>	.db "Orion Masters by "
>	.db "Nicholas Anderson"
>Menu1:
>	.db "New Game"
>Menu2:
>	.db "Continue Game"
>Menu3:
>	.db "Exit"
>.end
>


References: