Talk:Village/@comment-24393165-20140321232213/@comment-9531161-20140322194726

First, you should know that 16X16 sprites (the default) are made up of 4 8X8 sprites arranged in a square. Next, you should also know that if a sprite is designated as character #12 using 16X16 sprites, the first 8X8 tile within it will be designated as #48 due to 8X8 tiles being 4 times smaller. Finally, if you were to build up a 16X16 sprite from 8X8 tiles, you'd have to arange them like this:

Tile #'s are shown +---+---+ | 0 | 1 | +---+---+ | 2 | 3 | +---+---+

Tile 0 would be at the same position as the 16X16 sprite you're trying to build (we'll call that position (X,Y). Tile 1 would be at (X+8,Y), since it's one tile to the right of tile 0 and tiles are 8 pixels wide. Tile 2 would be at (X,Y+8) since it's just below tile 0. Finally, tile 3 is at (X+8,Y+8).

With all this in mind, you can use a special function called GPUTCHR which places a single 8X8 tile from any page onto the GRP. It also copies the palette over, so be careful. Let's say you had a 16X16 sprite at location (SX,SY) with a character number of 11 and a palette number of 3. If we wanted to draw this sprite on the GRP, it would just be:

GPUTCHR SX,SY,"SPU0",11*4,3,1 GPUTCHR SX+8,SY,"SPU0",11*4+1,3,1 GPUTCHR SX,SY+8,"SPU0",11*4+2,3,1 GPUTCHR SX+8,SY+8,"SPU0",11*4+3,3,1

Look in the manual if you want to know how GPUTCHR works. There's a nice online manual here.