Page 3 of 22

Posted: Fri 17 Feb, 2006 6:36 pm
by KermMartian
Fair enough, I'll post up my code. I checked stack and interrupt though.

Code: Select all

.nolist				;defines, includes, and equates

#DEFINE equ .equ
#DEFINE EQU .equ
#DEFINE end .end
#include "ti83plus.inc"		;ROM call definitions
.list
	.org $9d93
	.db $BB,$6D
	b_call(_AnsName)
	b_call(_chkfindsym)
	ex de,hl
	inc hl
	inc hl
	inc hl
	ld b,8
	ld de,Buffer
	push de
; the following routine borrowed from Doors CS 4.8+
dcsSquish:				;optimized - should still work
	push bc
	ld c,2
dcsSquishLoop:
	ld a,(hl)			;A=ascii 65d
	push hl				;0=ascii 48d
	push de
	ld e,48d
	sub e
	cp 10h
	jr c,dcsSquish_DONE
	sub 7				;save 5 bytes
dcsSquish_DONE:
	pop de
	pop hl
	inc hl
	dec c
	jr z,dcsSquishNext
	sla a
	sla a
	sla a
	sla a
	ld (ScratchVar),a
	jr dcsSquishLoop
dcsSquishNext:
	ld b,a
	ld a,(ScratchVar)
	or b
	ld (de),a
	inc de
	pop bc
	dec bc
	ld a,b
	or c
	jr nz,dcsSquish
GET_X:
	b_call(_zeroop1)
	ld hl,op1+1
	ld (hl),'X'			 ;or any other var
	b_call(_rclvarsym)			 ;op1 / op2 -> value
	b_call(_convop1)
	ld a,e				;previously ld a,hl
	push af
	b_call(_zeroop1)
	ld hl,op1+1
	ld (hl),'Y'			 ;or any other var
	b_call(_rclvarsym)			 ;op1 / op2 -> value
	b_call(_convop1)
	ld l,e				;previously ld a,hl
	pop af
	pop ix
	ld b,8
;-----> Draw a sprite - iPutSprite courtesy of Joe W., from Ion libs
; b=size of sprite
; l=yc
; a=xc
; ix holds pointer
iPutSprite:
	ld	e,l
	ld	h,$00
	ld	d,h
	add	hl,de
	add	hl,de
	add	hl,hl
	add	hl,hl
	ld	e,a
	and	$07
	ld	c,a
	srl	e
	srl	e
	srl	e
	add	hl,de
	ld	de,plotsscreen
	add	hl,de
iPutSpriteLoop1:
sl1:	ld	d,(ix)
	ld	e,$00
	ld	a,c
	or	a
	jr	z,iPutSpriteSkip1
iPutSpriteLoop2:
	srl	d
	rr	e
	dec	a
	jr	nz,iPutSpriteLoop2
iPutSpriteSkip1:
	ld	a,(hl)
	xor	d
	ld	(hl),a
	inc	hl
	ld	a,(hl)
	xor	e
	ld	(hl),a
	ld	de,$0B
	add	hl,de
	inc	ix
	djnz	iPutSpriteLoop1
	b_call(_grbufcpy_v)
	ret
Buffer:
	.db 0,0,0,0,0,0,0,0
Scratchvar:
	.db 0,0
.end
END
[/code]

Posted: Fri 17 Feb, 2006 6:36 pm
by tifreak8x
Aight, I will look into that, thanks! :)

On a side note, the in-game menu has been integrated into the game, and the Options menu, Back option, and Quit option all work. I am currently working on the screen that displays ASH's info...

Posted: Fri 17 Feb, 2006 7:31 pm
by KermMartian
I suspect the TI-OS bcall AnsName, but I don't see how that could be the problem...

Posted: Fri 17 Feb, 2006 11:47 pm
by threefingeredguy
I though that to get the value of ans, you used _rclans.

Posted: Mon 20 Feb, 2006 8:33 pm
by tifreak8x
Update:

I have part of the screen for ASH's info complete, but I have to make all the badges yet...

I also plan on doing some optimizing to the engine and routines, to maybe make it a little bit smaller, though there probably won'd be a whole lot since I have been trying to optimize as I program it in...

Once I get all the badges put up, I will try to post a screen shot of it. I haven't decided yet, but I might just make it a pic variable, with it filling in all the info... It depends on the amount of mem it will take up...

Posted: Tue 21 Feb, 2006 6:59 pm
by thegamefreak0134
I have the original badges if you wants them. Also, are you considering having the gym leaders faces there instead of the badge untill you actually have the badge? (Like in the game?)

Posted: Tue 21 Feb, 2006 9:40 pm
by tifreak8x
That is undecided, since I am incorporating both red and blue, I plan on having it distinguish between the two, and show that you won all of Red, then blue, or vice versa... I think I will just have the images of the badges, which I have now. :)

Posted: Wed 01 Mar, 2006 4:38 am
by tifreak8x
Ok, I made a basic version of a hex to sprite displayer, which currently only works with 16x16 sprites. It is fairly fast for BASIC, and will probably only be in the game until Kerm can figure out what is up with his routine. It may end up there permanently if Kerm can't figure it out... ;)

Oh yes, for those that wish to take a look at it: http://tifreakware.net/downloads/bspritedemo.zip

Posted: Wed 01 Mar, 2006 8:59 am
by thegamefreak0134
That is undecided, since I am incorporating both red and blue, I plan on having it distinguish between the two, and show that you won all of Red, then blue, or vice versa... I think I will just have the images of the badges, which I have now.
Don't mean to bust your bubble, but the gym leaders are exactly the same in both versions, as are their faces in the name window. That's what I was talking about... Or do you mean you will have to face each leader twice?

Posted: Wed 01 Mar, 2006 4:36 pm
by tifreak8x
Yes, you will have to play through the game twice, and defeat them twice. Thing is, the Pokemon you catch in the first version, will be inaccessible in the second. :) That way, you will basically be starting over, but still register owning the other Pokemon. Kind of adds a particular challenge to it...

Posted: Fri 03 Mar, 2006 4:39 am
by tifreak8x
Hey, I thought you guys would like a screenshot of the 6 characters that I have programmed in. The second one down on the left has a bit of a hair problem, but will be fixed this weekend. I figured this would give a fairly good idea on what images would be used for battles and dialogues...

Image

Posted: Fri 03 Mar, 2006 4:44 am
by elfprince13
*mouth opens....jaw drops....jaw hits floor...ouch*

Posted: Fri 03 Mar, 2006 1:08 pm
by tifreak8x
Thanks. :D

Posted: Fri 03 Mar, 2006 8:06 pm
by kalan_vod
Yeah it does look nice, and your routine is good. If Kerm does make one it would be even faster (I would think >.<).

Posted: Fri 03 Mar, 2006 8:22 pm
by tifreak8x
Weregoose of uti made one that is making Kerm's look slow... And it is all in BASIC. :) I am going to modify it to work with 8x8 as well, to make it more versatile... :)