Pokemon Purple

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post 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]
Image Image Image
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post 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...
http://tifreakware.net - Connecting TI communities
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

I suspect the TI-OS bcall AnsName, but I don't see how that could be the problem...
Image Image Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

I though that to get the value of ans, you used _rclans.
Image
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post 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...
http://tifreakware.net - Connecting TI communities
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post 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?)
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post 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. :)
http://tifreakware.net - Connecting TI communities
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post 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
Last edited by tifreak8x on Sat 16 Dec, 2006 9:31 pm, edited 1 time in total.
http://tifreakware.net - Connecting TI communities
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post 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?
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post 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...
http://tifreakware.net - Connecting TI communities
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post 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
Last edited by tifreak8x on Sat 16 Dec, 2006 9:33 pm, edited 1 time in total.
http://tifreakware.net - Connecting TI communities
User avatar
elfprince13
Sir Posts-A-Lot
Posts: 234
Joined: Sun 11 Dec, 2005 2:21 am
Contact:

Post by elfprince13 »

*mouth opens....jaw drops....jaw hits floor...ouch*
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post by tifreak8x »

Thanks. :D
http://tifreakware.net - Connecting TI communities
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post 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 >.<).
tifreak8x
Sir Posts-A-Lot
Posts: 297
Joined: Mon 11 Jul, 2005 4:42 pm
Location: Indiana
Contact:

Post 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... :)
http://tifreakware.net - Connecting TI communities
Post Reply