Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
extensions:sx_compiled_tilemap [2011/04/12 07:40]
pixelrevision [Data entry]
extensions:sx_compiled_tilemap [2015/09/14 11:15] (current)
Line 1: Line 1:
 +~~NOTOC~~
  
 +====== SXCompiledTileMap ======
 +
 +---- dataentry extension ----
 +type          : extension #or '​mod'​ if it requires changing the Sparrow source
 +author_mail ​  : pixelrevision@gmail.com Malcolm
 +description ​  : A tilemap setup for sparrow using compiled sprites as the rendering method #enter a short description of the extension
 +lastupdate_dt :  #the date you created the extension
 +compatible ​   : v1.1 #the Sparrow version you tested the extension with
 +depends ​      : ​ #if the ext. depends on others, list them here
 +tags          : tilemap, sparrow, 8bit #enter a few tags, separated by commas
 +homepage_url ​ : https://​gist.github.com/​896866 #if the ext. has an URL (e.g. a Gist-page), add it here
 +download_url ​ : https://​gist.github.com/​gists/​896866/​download #a direct link to the download (e.g. the Gist-archive)
 +----
 +
 +===== Usage =====
 +You create a tilemap with CSV data and an image strip, then use the camera to scroll.
 +
 +<code objc>
 +NSString *mapPath = [[NSBundle mainBundle] pathForResource:​@"​small_map"​ ofType:​@"​csv"​];​
 +NSString *csvData = [[NSString alloc] initWithContentsOfFile:​mapPath ​
 +                                      encoding:​NSUTF8StringEncoding error:nil];
 +SXCompiledTileMap *tm = [[SXCompiledTileMap alloc] ​
 +                          initWithViewportSize:​CGSizeMake(320,​ 480) 
 +                          CSVData:​csvData tileSize:​CGSizeMake(16,​ 16)
 +                          andTileImage:​[UIImage imageNamed:​@"​sample_tiles.png"​]];​
 +[self addChild:​tm];​
 +</​code>​
 +
 +===== Changelog =====
 +
 +  * //​2011/​04/​11 22:35//: First public version
 +
 +===== Source Code =====
 +
 +%gist(896866)%
 +
 +===== Discussion =====
 +
 +//No comments so far. Feel free to edit this part of the page.//
  extensions/sx_compiled_tilemap.txt · Last modified: 2015/09/14 11:15 (external edit)
 
Powered by DokuWiki