lol forgot about this,

here's how it works

Str1 stores the map, length(Str1) must be a multiple of 60.
R is the number rows of screens you have, C is the number of columns of screens you have, in other words, R*C*60 must equal length(Str1)

prgmADVSPRTE draws the sprite number stored in Ans, if Ans is not a valid sprite number nothing happens. It should be replaced with your own sprite drawing routine which takes the X and Y coordinates in X and Y and Ans as the sprite number to draw, however I recommened modeling this routine after the way it is setup in the current prgmADVSPRTE.

prgmADVRDW selects the tile to draw at sub(Str1,X,1) based on the index of the token at sub(Str1,X,1) in Str2.

This means Str1 mus consist entirely of characters in Str2.

http://rancidmoose.unitedti.org/members/software/ticalc/map.zip

oh yeah, and prgmADVMAP itself is where the key detection goes, so thats where you should insert anyother sorts of key detection you want
here are some better explained instructions, some people complained that I rambled too much:

here's how it works, the maps are stored as giant strings of tokens in Str1. Each screen is displayed 10 length by 6 high group of tiles along with the bordering tiles around it. This means the map must have a length that is a multiple of 60. R and C determine how the string is wrapped. for example if you have Str1 that is of length 4200, and R is 10 and C is 7, then Str1 will be wrapped into a map that is 60 tiles long and 70 tiles high. Next, when displaying the map, The index of the current tile in Str2 determines which tile prgmADVRDRW will ask prgmADVSPRTE to display

also, this isn't really an editor, but if you want a sample map run the following code:


prgmMAPGEN wrote:

:Prompt R,C
:" ->Str1
:"123456->Str2
:For(I,1,RC60
:Str1+sub(Str2,randint(1,6),1->Str1
:Disp int(IE2/(RC60 delete this if you want it to run faster, but you won't know what percentage done you are
:End
:sub(Str1,2,RC60->Str1


and then run prgmADVMAP

I wouldn't make the map real big though, or it'll take forever
  
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
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement