#170144 - Azenris - Thu Sep 03, 2009 5:11 pm
Hi I was hoping you could help me with something
how exactly is the sprite data sorted, stored before being used in the memory.
basically this is what I have
I have tested it with an old bin file of a sprite i used to have
and got it to work so im assuming the problem is with how ive stored the
data.
the tile stored as
the palette is stored as
When i run the code I end up with a weird looking scrible. from the colours I can see it
is showing correctly, so I think the palette is ok.
any ideas what im misunderstanding or doing wrong :( TY in advance
_________________
My Homebrew Games
how exactly is the sprite data sorted, stored before being used in the memory.
basically this is what I have
Code: |
dmaCopy(g_StandardGamePalette, SPRITE_PALETTE, g_StandardGamePalette_size); dmaCopy(tile_graphic_272_, &SPRITE_GFX[0], 256); |
I have tested it with an old bin file of a sprite i used to have
and got it to work so im assuming the problem is with how ive stored the
data.
the tile stored as
Code: |
const u8 tile_graphic_272_[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,134,134,134,134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,134, 81, 81, 81, 81,134, 0, 0, 0, 0, 0, 0, 0, 0,134, 81, 81, 81, 81, 81, 81,134, 0, 0, 0, 0, 0, 0, 0, 0,134, 81, 81, 81, 81, 9, 81,134, 0, 0, 0, 0, 0, 0, 0, 0,134, 81, 81, 81, 81, 9, 81,134, 0, 0, 0, 0, 0, 0, 0, 0,134, 81, 81, 81, 9, 81, 81,134, 0, 0, 0, 0, 0, 0, 0, 0, 0,134, 81, 81, 81, 81,134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,134,134,134,134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,134, 0, 0, 0,134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,134,134,134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; // end of tile_graphic_272_ |
the palette is stored as
Code: |
const u16 g_StandardGamePalette[] = { 0x7C7F,0x1B20,0x3260,0x180,0x26C,0x1A73,0x18D3,0x318C,0x18C6,0x7FFF,0x1B,0x27FD,0x1B60,0x0,0x7FFF, 0x4E73,0x3FF,0x5EF7,0x1F,0x3180,0x6666,0x33E6,0x4F26,0x6660,0x7D86,0xDF,0x27F,0x19F,0x193,0x1993, 0x279,0x273,0x1B33,0x3F9,0x33E0,0x3F3,0x33F,0x1B26,0x3E6,0xD3,0x339,0x1A7F,0x1BFF,0x1A60,0x332C,0x1BF9, 0x67E6,0x658C,0x333,0x30DF,0x1B3F,0x6413,0x4E6C,0x7FE0,0xCC,0x1999,0x18C,0x32C,0xD9,0x13,0x1B39,0x199, 0x6,0x30D3,0x199F,0x33F3,0x7F26,0x64D3,0x19,0x3266,0x4D80,0x4CC0,0x327F,0x7CD9,0x7FF9,0x6673,0x13, 0x33F,0x1B2E,0x64C0,0x7D93,0x1F,0x3FF,0x2BF3,0x7F26,0x7CCC,0x3193,0x333F,0x7FF3,0x7E60,0x672C,0x67F3, 0x4F2C,0x7FE6,0x7E6C,0x4F39,0x67E0,0x666C,0x7FEC,0x7F2C,0x3E0,0x260,0x320,0x4E79,0x4E66,0x4FFF,0x4FEC, 0x7F39,0x6720,0x67EC,0x180,0x1A60,0x3000,0x7C00,0x4E73,0x26C,0x7F20,0x19,0x4C19,0x3320,0x3260,0x1A6C, 0x672C,0x4FFF,0x18C6,0x4F26,0x7F2C,0x30DF,0x199F,0x6726,0x4FE6,0x7E66,0x6739,0x4FF9,0x14,0x3EC,0x1BF3, 0x33E6,0x7FE0,0x333F,0x1A7F,0x7F33,0x4FE0,0x318C,0x67E6,0x4E7F,0x181F,0x327F,0x658C,0x1B20,0x4E6C,0x332C, 0x1BEC,0x4F20,0x67F9,0x4FF3,0x6580,0x7FEC,0x7E73,0x33F9,0x6673,0x6733,0x67FF,0x18C0,0x3279,0x180C,0x1B2C, 0x1BEC,0x7D80,0x3326,0x326C,0x3273,0x18C,0x3181,0x5EE2,0x6650,0x4260,0x11A0,0x2A62,0x2B40,0x1260,0x7CDF, 0x7C1F,0x77AB,0x326C,0x1B2C,0x1819,0x1B26,0x18C0,0x7FF9,0x33FF,0x7FF,0x4E60,0x199,0x32C,0xC,0x7D80,0x673F, 0x4D9F,0x6580,0x339,0x667F,0x7D9F,0x19F,0x4F20,0x7F20,0x1B3F,0x3279,0x4CC0,0x27F,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, }; // end of g_StandardGamePalette[] |
When i run the code I end up with a weird looking scrible. from the colours I can see it
is showing correctly, so I think the palette is ok.
any ideas what im misunderstanding or doing wrong :( TY in advance
_________________
My Homebrew Games