CODE 0x80 0x00 0x00 0x00
CODE 0x24 0x08 0x28 0x08
Map TileChanges with EA
No replies to this topic
Posted 10 June 2010 - 10:39 AM
org 0xC9C9C8+(4*0x59) // - Pointer to tile map changes (change the 0x59)
POIN TileChanges // - puts a pointer to "event" TileChanges
org 0xCB1F00 // - where to place the data for tile changes
TileChanges: // - name of event
Tilemap(Sequential #, Top Left X, Top Left Y, Length (# of tiles to right), Height (# of tiles down), TilePointer)
// - (Insert as many as you need)
CODE $FF // - Needed to end a list of tile changes, do not remove these 3 CODE things
MapTiles: // - name of list of tiles to replace old tiles
CODE 0x80 0x00 0x00 0x00 // - tiles to use (use the CODE to just insert hex, get the tile #s from reference tilesets or some other method)
Tested and working, it makes it so that you can do tile changes with EA so you don't have to do them separately in a hex editor. It's not all that easier than doing it in hex but it can be faster, less of a hassle, and save you some brain power if you're not so good with repointing or editing things in hex. Then again, all of the input values have to be in hex for the code to properly work (so you're forced to convert co-ordinates to hex--yeah, sucks, too bad huh).
BUT WAIT! You need this macro for it to work--you can add it to EAstdlib if you are lazy (just use a text editor to edit it and paste it there) or you can make your own macro file (which is better, because you'll have to re-add the macro to EAstdlib everytime NL makes an update to the program).
#define TileMap(TCN,X1,X2,L1,L2,TilePointer) "CODE TCN X1 X2 L1; CODE L2 0x00 0x00 0x00; POIN TilePointer"
Once you have that everything should work. Enjoy!
If there are any questions, go ahead and ask.
Signature thanks to Shu.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users