Re: A83: Background routine...


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

Re: A83: Background routine...




I have a shorter scrolling routine if you want it..
It's actually one I ported from the 82.. and I use it in FallDown.. If 
you want it, tell me, I'll give you one that scrolls up/down/right/left.

Ahmed

>From owner-assembly-83-outgoing@towerguard.unix.edu.sollentuna.se Mon 
Sep  7 06:49:55 1998
>Delivered-To: assembly-83-outgoing@towerguard.unix.edu.sollentuna.se
>Received: by towerguard.unix.edu.sollentuna.se (VMailer, from userid 
507)
>	id 441F446227; Mon, 07 Sep 1998 15:12:57 +0200 (CEST)
>Message-Id: <199809071312.WAA16532@tkb.att.ne.jp>
>From: "James Matthews" <matthews@tkb.att.ne.jp>
>To: "Assembly 83 List" <assembly-83@lists.ticalc.org>
>Subject: A83: Background routine...
>Date: Mon, 7 Sep 1998 22:08:39 +0900
>X-MSMail-Priority: Normal
>X-Priority: 3
>X-Mailer: Microsoft Internet Mail 4.70.1161
>MIME-Version: 1.0
>Content-Type: multipart/alternative; 
boundary="----=_NextPart_000_01BDDAAC.1164F120"
>Content-Transfer-Encoding: 7bit
>Sender: owner-assembly-83@lists.ticalc.org
>Precedence: list
>Reply-To: assembly-83@lists.ticalc.org
>Errors-To: assembly-83-errors@lists.ticalc.org
>
>I know my tutorials are slow coming out, but senior year + college apps 
+
>ThinkQuest + Monopoly (programming) + chicks...um, tutorials are waaaay
>down there :)...anyway, here is my Background tutorial.  Thanks to 
Movax
>(ey?)....
>
>Tutorial 39: Scrolling Background.
>More Game Techniques.
>Introduction.
>Well, after attempt after attempt at finding or writing a decent 
scrolling
>routine.  I'm talking to Movax, and he's like "Hold on", 5 minutes 
later
>I'm running a perfect scrolling routine he'd just written (don't you 
hate
>people like that! =Ž).  Thanks a lot to Hannes "Movax" Edfeldt.
>
>New Commands.
>_getk	- I've covered this briefly before.  Here's the formal cover…like
>BASIC getkey.  Returns value of the key to OP1.  Values are shown the
>Ti-manual.
>
>The Code.
>
>  ld    hl,picture		;Load your pic.
>  ld 	de,PLOTSSCREEN
>  ld 	bc,768
>  ldir
>  call  _grbufcpy_v
>
>loop:
>  call _scrollright
>  call _grbufcpy_v
>
>  call    _getk   	; Key to OP2.
>  call    _op2toop1
>  call    _convop1
>  cp	  45		; If clear…
>  jp      nz,loop	;
>  ret
>
>
>
>_ScrollRight:
>	ld	de,12
>	ld	hl,8e29h-1
>	ld	b,64		; 64*12=768 bytes to rotate
>_loop1:
>	push	hl		; Test if there's a bit to wrap around	
>	add	hl,de
>	ld	a,(hl)
>	and	00000001b
>	sub	00000001b
>	ccf
>	pop	hl
>	
>	inc	hl		; We'll waste space here to gain some speed
>	rr	(hl)
>	inc	hl
>	rr	(hl)
>	inc	hl
>	rr	(hl)
>	inc	hl
>	rr	(hl)
>	inc	hl
>	rr	(hl)
>	inc	hl
>	rr	(hl)
>	inc	hl		; We'll waste space here to gain some speed
>	rr	(hl)
>	inc	hl
>	rr	(hl)
>	inc	hl
>	rr	(hl)
>	inc	hl
>	rr	(hl)
>	inc	hl
>	rr	(hl)
>	inc	hl
>	rr	(hl)
>
>	djnz	_loop1
>
>  ret
>
>picture:
>;Put your picture here.
>
>.end
>END
>
>Conclusion.
>Thanks again to Movax for this routine!  This should help all of you 
game
>freaks out there!  If you come up with a better routine that scrolls
>left/right, up/down, or all directions, please contact me!  Thanks.
>
>{button , Klink(Scrolling;Movax;Graphics)} Related Topics.
>
>Addition:  if you come up w/a routine that is *well documented* contact 
me
>:)...
>
>Later,
>
>James Matthews (matthews@tkb.att.ne.jp)
>
>ICQ: 7413754
>http://home.att.ne.jp/gold/tomcat21/index.html
>http://library.advanced.org/18242/


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com