0 Members and 3 Guests are viewing this topic.
* noahbaby94 pokes metagross111 for progress.
-----------------------------------------------------------------------------|04 | identity(4,"BINSTR",xPos,yPos,Width,Height,StartX,EndX,| | SStartY,SEndY,Pic#,Logic,TileSize,Update_LCD,2ByteMode)| STRINGTILE | | | See xLIB command "DrawTileMap" for information regarding| | the inputs. The only difference is that "Matrix_name" is| | replaced with "BINARYSTRING". For this, you supply a hex| | string converted to binary with the HEXTOBIN command.| | The Height and Width property of the command is used to| | provide a two-dimensional matrix feel to an inherently one-| | dimensional structure that is a string.| | | | If 2ByteMode is set to something other than 0, then the| | input string is considered words instead of bytes. This| | allows the user to use 4 hex ditgits (two bytes) per tile| | so up to 65536 different tiles can be accessed using this| | command.| | | | All other arguments function as they do with the xLIB| | command.| | | | As a developer, you should develop your tilemaps in hex| | and then use the HEXTOBIN command to convert it to the| | format required by this command. To edit this tilemap, you| | should use the EDIT1BYTE command while this tilemap is in| | its binary format.| | | | Note that any missing arguments will default to the value| | of zero (0) instead of 32 as in xLIB.-----------------------------------------------------------------------------|02 | real(2,Matrix_name,x_offset,y_offset,Width,Height,SStartX,| | SEndX,SStartY,SEndY,Pic#,Logic,TileSize,Update_LCD)| DrawTileMap | | | Probably the most complicated function. I don't understand| | it fully, so I'm just gonna copy out of the manual, with a| | bit of paraphrasing to fit the line limits. Later, I'll| | revise this section with my findings.| | | | Matrix_name: Name of matrix with map data. 0=[A], 9=[J]| | x_offset: x-offset for the part of map you want to draw.| | y_offset: y-offset for the part of map you want to draw.| | Width: width of the tilemap| | Height: height of the tilemap| | SStartX: column to start drawing. 0-12 (8x8) or 0-6 (16x16)| | SEndX: column to end drawing. 0-12 (8x8) or 0-6 (16x16)| | SStartY: row to start drawing. 0-12 (8x8) or 0-6 (16x16)| | SEndY: row to end drawing. 0-12 (8x8) or 0-6 (16x16)| | Pic#: Pic file to start looking for tiles from.| | Logic: 0=Overwrite; 1=And ; 2=Or ; 3=Xor| | tile_size:set to 16 for 16x16 tiles. Otherwise, it's 8x8.| | Update_LCD: If this is !=0, the screen updates.| | | | The SStartX, SEndX, SStartY, and SEndY allow you to draw a| | "windowed" map so you can fit things on the side, like an| | HUD or something. Drawing will also be accelerated for| | smaller maps. For example, if you wanted to draw an 8x8| | tilesized map with a 1 tile blank border on all sides...| | SStartX : 1| | SEndX : 11| | SStartY : 1| | SEndY : 7| | | | This routine supports up to 65535 tiles, each starting from | | the Pic number you specified and following to each| | numerically adjacent Pic # for each overflow. lolwut?| | | | Let's say your starting Pic# is 5 and you want to access| | tile 4324. There are 96 tiles per pic on 8x8 mode, so...| | (4324 / 96 ) = 45.04...| | | | In order to access that tile, Pic50 must exist on the calc,| | else all will be drawn is a BLANK tile.| | | | Just like any of the useful functions, Pic data will be| | read from archive if need be. It'll be slower, though.| | | | An additional feature added into the sprite routine is the| | ability to invert the sprite prior to displaying. To do| | this, add 4 to whatever you use for LOGIC. For example, to| | invert a sprite and use XOR display logic, use 7 since 3+4| | is 7.| | -----------------------------------------------------------------------------
LLLLLLLLLLLLTTTTT PTTTT Y LLL LLLLLLLH HLLLLLLLLH HLLLL
PIC1 PIC2 XXXXXXXXXXL XXXXXXXXXXXXXXXXXXXXXXXX XXHXXXXXXXXXXXXXTXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX XXXXXPXXXXXXXXXXXXXXXXXX YXXXXXXXXXXX
00 01 02 03 04 05 06 07 08 09 10 1112 13 14 15 16 17 18 19 20 21 22 23....
[[ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11] [ 28, 28, 28, 28, 28, 00, 00, 125, 28, 28, 28, 28] [ 00, 00, 00, 00, 132, 00, 00, 00, 00, 00, 00, 00] [ 11, 11, 11, 00, 00, 00, 00, 00, 00, 11, 11, 11] [ 11, 11, 11, 11, 86, 00, 00, 86, 11, 11, 11, 11] [ 11, 11, 11, 11, 86, 00, 00, 86, 11, 11, 11, 11]]
00 01 02 03 04 05 06 07 08 09 0A 0B0C 0D 0E 0F 10 11 12 13 14 15 16 17....
[[ 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B] [ 1C, 1C, 1C, 1C, 1C, 00, 00, 7D, 1C, 1C, 1C, 1C] [ 00, 00, 00, 00, 84, 00, 00, 00, 00, 00, 00, 00] [ 0B, 0B, 0B, 00, 00, 00, 00, 00, 00, 0B, 0B, 0B] [ 0B, 0B, 0B, 0B, 56, 00, 00, 56, 0B, 0B, 0B, 0B] [ 0B, 0B, 0B, 0B, 56, 00, 00, 56, 0B, 0B, 0B, 0B]]
"0B0B0B0B0B0B0B0B0B0B0B0B1C1C1C1C1C00007D1C1C1C1C0000000084000000000000000B0B0B0000000000000B0B0B0B0B0B0B560000560B0B0B0B0B0B0B0B560000560B0B0B0B"
"°°°°°°°°°°°°R►PΘ(R►PΘ(R►PΘ(R►PΘ(R►PΘ(??DependAskR►PΘ(R►PΘ(R►PΘ(R►PΘ(????Trace???????°°°??????°°°°°°°V??V°°°°°°°°V??V°°°°"
identity(4,Str1,0,0,12,6,0,12,1,7,1
0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B000C 000D 000E 000F 0010 0011 0012 0013 0014 0015 0016 0017....
[[ 000B, 000B, 000B, 000B, 000B, 000B, 000B, 000B, 000B, 000B, 000B, 000B] [ 001C, 001C, 001C, 001C, 001C, 0000, 0000, 007D, 001C, 001C, 001C, 001C] [ 0000, 0000, 0000, 0000, 0084, 0000, 0000, 0000, 0000, 0000, 0000, 0000] [ 000B, 000B, 000B, 0000, 0000, 0000, 0000, 0000, 0000, 000B, 000B, 000B] [ 000B, 000B, 000B, 000B, 0056, 0000, 0000, 0056, 000B, 000B, 000B, 000B] [ 000B, 000B, 000B, 000B, 0056, 0000, 0000, 0056, 000B, 000B, 000B, 000B]]
"000B000B000B000B000B000B000B000B000B000B000B000B001C001C001C001C001C00000000007D001C001C001C001C00000000000000000840000000000000000000000000000000B000B000B000000000000000000000000000B000B000B000B000B000B000B0056000000000056000B000B000B000B000B000B000B000B0056000000000056000B000B000B000B"
"?°?°?°?°?°?°?°?°?°?°?°?°?R►PΘ(?R►PΘ(?R►PΘ(?R►PΘ(?R►PΘ(?????DependAsk?R►PΘ(?R►PΘ(?R►PΘ(?R►PΘ(?????????Trace???????????????°?°?°?????????????°?°?°?°?°?°?°?V?????V?°?°?°?°?°?°?°?°?V?????V?°?°?°?°"
identity(4,Str1,0,0,12,6,0,12,1,7,1,0,0,0,1
IMO, it would be much slower to DEVELOP and program. however, as a program, i think it could be about as fast or faster than the traditional matrix method. in any case, this supports a much larger map than matrices ever could. also, in conjunction with other celtic commands, i think it will run just fine.