This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
james


Member


Joined: 25 May 2003
Posts: 114

Posted: 25 Jun 2003 06:15:37 pm    Post subject:

i have successfully got a tilemap routine to work,thx to dave,and a tilemap routine with a character Very Happy Very Happy Very Happy
i was working on some graphics for my rpg and came across something that has me puzzeled
how would i go about making water move(by move i mean animated so that it looks like its moving)
justin i know u can help me with this one but..
if anyone else know,explain to me how i would go about doing this


james Very Happy
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 25 Jun 2003 11:49:33 pm    Post subject:

In order to animate a tile you simply modify the tile so it displays a different sprite

You would create a routine to go through your array and switch the tiles.

So if 1=water sprite 1 and 2=water sprite 2

make a routine to convert

.db 3,3,1,1,1,1,1,4,4
.db 3,5,1,1,1,1,1,3,4

To

.db 3,3,2,2,2,2,2,4,4
.db 3,5,2,2,2,2,2,3,4


You need to also create a routine that points the specific array byte you desire to change and simply load the new byte in.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 26 Jun 2003 02:00:05 pm    Post subject:

and, ud need some kind of boolean var and when u switch the images, u switch the var... or, u could just check all the data for a 2 or a 3, and if it finds one, switch all of that one...

like so :
.db 3,1,3,1,3,3,3,3,3,1,1,1
it would search through that till it found a 3 or a 2, and when it found a 3, it would switch all of the 3's to 2's, and vice versa!
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 26 Jun 2003 03:30:26 pm    Post subject:

Which wouldn't work properly because you don't want that first 3 to be changed into a 2 (juding from Justin's code)
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 26 Jun 2003 07:01:13 pm    Post subject:

Well I use a counter, and if it equals a certain number it would switch to the first animation and if another switch it back so as to achieve a continuous loop.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement