1
0
mirror of https://github.com/lefticus/6502-cpp.git synced 2024-12-21 10:30:35 +00:00

Move the sprite declarations to the main() function.

This change does not affect the generated code, other than the
assembler labels for the data. The data will still be initialized
at compilation time.
This commit is contained in:
Marko Mäkelä 2016-10-09 21:05:01 +03:00
parent ee36c4c08f
commit 617e11244e

View File

@ -290,58 +290,6 @@ namespace {
}
/// The ball image.
static const VIC_II::HighResSprite sBall
{{
0b000000000000000000000000,
0b000000000000000000000000,
0b000000000111111000000000,
0b000000011111111110000000,
0b000000110111111111000000,
0b000001100011111111100000,
0b000001110111111111100000,
0b000011111111111111110000,
0b000011111111111111110000,
0b000011111111111111110000,
0b000000111111111111000000,
0b000011000000000000110000,
0b000011111111111111110000,
0b000001111111111111100000,
0b000001111111111111100000,
0b000000111111111111000000,
0b000000011111111110000000,
0b000000000111111000000000,
0b000000000000000000000000,
0b000000000000000000000000,
0b000000000000000000000000
}};
/// The bat image.
static const VIC_II::MultiColorSprite sBat
{{
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000003300000,
0x000001100000,
0x000003300000,
0x000001100000,
0x000003300000
}};
int main()
{
const std::array<Color, 16> colors = {{
@ -365,6 +313,57 @@ int main()
VIC_II vic;
/// The ball image.
static const VIC_II::HighResSprite sBall
{{
0b000000000000000000000000,
0b000000000000000000000000,
0b000000000111111000000000,
0b000000011111111110000000,
0b000000110111111111000000,
0b000001100011111111100000,
0b000001110111111111100000,
0b000011111111111111110000,
0b000011111111111111110000,
0b000011111111111111110000,
0b000000111111111111000000,
0b000011000000000000110000,
0b000011111111111111110000,
0b000001111111111111100000,
0b000001111111111111100000,
0b000000111111111111000000,
0b000000011111111110000000,
0b000000000111111000000000,
0b000000000000000000000000,
0b000000000000000000000000,
0b000000000000000000000000
}};
/// The bat image.
static const VIC_II::MultiColorSprite sBat = {{
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000002200000,
0x000003300000,
0x000001100000,
0x000003300000,
0x000001100000,
0x000003300000
}};
vic.enable_sprite(0, sBall, true, false, false);
vic.enable_sprite(1, sBat, false, false, true);
vic.enable_sprite(2, sBat, false, false, true);