Fixed a couple of compile errors with avr-gcc 4.6.1

This commit is contained in:
alu 2011-09-04 01:08:13 +00:00
parent 0370ff863b
commit 5265dd318c
10 changed files with 76 additions and 77 deletions

View File

@ -6,15 +6,7 @@
#include "amphibian.h"
static uint8_t amphibian_getChunk(unsigned char const nBitPlane,
unsigned char const nChunkX,
unsigned char const nChunkY,
unsigned int const nFrame)
{
assert(nChunkX < 6);
assert(nChunkY < 38);
static uint8_t aBitmap [2][38][6] PROGMEM =
static const uint8_t aBitmap [2][38][6] PROGMEM =
{{{0x00, 0x00, 0x24, 0x00, 0x00, 0x00}, // bit plane 0
{0x00, 0x20, 0x3C, 0x00, 0x00, 0x00},
{0x07, 0x30, 0x47, 0x00, 0x00, 0x00},
@ -93,7 +85,7 @@ static uint8_t amphibian_getChunk(unsigned char const nBitPlane,
{0x00, 0x00, 0x60, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x80, 0x00, 0x00, 0x00}}};
static uint8_t aEye[2][16][3] PROGMEM =
static const uint8_t aEye[2][16][3] PROGMEM =
{{{0x07, 0xF0, 0x67}, // frame 1 (bit plane 0)
{0x03, 0xC0, 0xC3},
{0x04, 0x19, 0xA7},
@ -128,6 +120,14 @@ static uint8_t amphibian_getChunk(unsigned char const nBitPlane,
{0x06, 0x30, 0xC6},
{0x07, 0xF0, 0xFE}}};
static uint8_t amphibian_getChunk(unsigned char const nBitPlane,
unsigned char const nChunkX,
unsigned char const nChunkY,
unsigned int const nFrame)
{
assert(nChunkX < 6);
assert(nChunkY < 38);
static uint8_t const nOffsetTable[] PROGMEM =
{UINT8_MAX, 0, 4, 8, 12, 8, 4, 0};
uint8_t const nOffset = pgm_read_byte(&nOffsetTable[(nFrame >> 1) % 8]);

View File

@ -5,69 +5,68 @@
#include "bitmapscroller.h"
#include "laborlogo.h"
static const uint8_t aBitmap[48][6] PROGMEM =
{{0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF},
{0xFF, 0xFF, 0x00, 0xF8, 0xFF, 0xFF},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0x10, 0xF7, 0xFF, 0xFD},
{0xC0, 0x00, 0x10, 0xF7, 0xFF, 0xFB},
{0xC0, 0x00, 0x10, 0xF7, 0xFF, 0xFB},
{0xC0, 0x00, 0x10, 0xF7, 0xFF, 0xFB},
{0xE0, 0x00, 0x10, 0xF7, 0xFF, 0xF7},
{0xF0, 0x00, 0x10, 0xF7, 0xFF, 0xEF},
{0xF0, 0x00, 0x10, 0xF7, 0xFF, 0xEF},
{0xF8, 0x00, 0x10, 0xF7, 0xFF, 0xDF},
{0xFC, 0x00, 0x10, 0xF7, 0xFF, 0xBF},
{0xFE, 0x00, 0x1F, 0x07, 0xFF, 0x7F},
{0xFF, 0x00, 0x00, 0xFF, 0xFE, 0xFF},
{0xFF, 0x80, 0x00, 0xFF, 0xFD, 0xFF},
{0xFF, 0xC0, 0x00, 0xFF, 0xF3, 0xFF},
{0xFF, 0xF0, 0x00, 0xFF, 0xEF, 0xFF},
{0xFF, 0xF8, 0x00, 0xFF, 0x1F, 0xFF},
{0xFF, 0xFF, 0x00, 0xF8, 0xFF, 0xFF},
{0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF}};
static uint8_t laborlogo_getChunk(unsigned char const nBitPlane,
unsigned char const nChunkX,
unsigned char const nChunkY,
unsigned int const nFrame)
unsigned char const nChunkX,
unsigned char const nChunkY,
unsigned int const nFrame)
{
assert(nChunkX < 6);
assert(nChunkY < 48);
assert(nChunkX < 6);
assert(nChunkY < 48);
static uint8_t aBitmap[48][6] PROGMEM =
{{0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF},
{0xFF, 0xFF, 0x00, 0xF8, 0xFF, 0xFF},
{0xFF, 0xF8, 0x00, 0xFF, 0x1F, 0xFF},
{0xFF, 0xF0, 0x00, 0xFF, 0xEF, 0xFF},
{0xFF, 0xC0, 0x00, 0xFF, 0xF3, 0xFF},
{0xFF, 0x80, 0x00, 0xFF, 0xFD, 0xFF},
{0xFF, 0x00, 0x00, 0xFF, 0xFE, 0xFF},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, 0xF7, 0xFF, 0xEF},
{0xF0, 0x00, 0x10, 0xF7, 0xFF, 0xEF},
{0xF8, 0x00, 0x10, 0xF7, 0xFF, 0xDF},
{0xFC, 0x00, 0x10, 0xF7, 0xFF, 0xBF},
{0xFE, 0x00, 0x1F, 0x07, 0xFF, 0x7F},
{0xFF, 0x00, 0x00, 0xFF, 0xFE, 0xFF},
{0xFF, 0x80, 0x00, 0xFF, 0xFD, 0xFF},
{0xFF, 0xC0, 0x00, 0xFF, 0xF3, 0xFF},
{0xFF, 0xF0, 0x00, 0xFF, 0xEF, 0xFF},
{0xFF, 0xF8, 0x00, 0xFF, 0x1F, 0xFF},
{0xFF, 0xFF, 0x00, 0xF8, 0xFF, 0xFF},
{0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF}};
return pgm_read_byte(&aBitmap[nChunkY][nChunkX]);
return pgm_read_byte(&aBitmap[nChunkY][nChunkX]);
}
void laborlogo()
{
bitmap_scroll(48, 48, 2, 400, 75, laborlogo_getChunk);
bitmap_scroll(48, 48, 2, 400, 75, laborlogo_getChunk);
}

View File

@ -21,7 +21,7 @@
#ifdef MENU_SUPPORT
//static uint8_t breakout_icon[8] PROGMEM = {0x03, 0x03, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}; /* our Icon */
static uint8_t breakout_icon[8] PROGMEM = {0x00, 0x18, 0x18, 0x00, 0x00, 0xff, 0xff, 0x00}; /* our Icon */
static const uint8_t breakout_icon[8] PROGMEM = {0x00, 0x18, 0x18, 0x00, 0x00, 0xff, 0xff, 0x00}; /* our Icon */
game_descriptor_t breakout_game_descriptor __attribute__((section(".game_descriptors"))) =
{

View File

@ -11,7 +11,7 @@
#if defined MENU_SUPPORT && defined GAME_SNAKE
// snake icon (MSB is leftmost pixel)
static uint8_t icon[8] PROGMEM =
static const uint8_t icon[8] PROGMEM =
{0xff, 0x81, 0xbd, 0xa5, 0xa5, 0xad, 0xa1, 0xbf};
game_descriptor_t snake_game_descriptor __attribute__((section(".game_descriptors"))) =

View File

@ -12,7 +12,7 @@ void borg_invaders();
#ifdef MENU_SUPPORT
// MSB is leftmost pixel
static uint8_t icon[8] PROGMEM =
static const uint8_t icon[8] PROGMEM =
{0x66, 0x18, 0x3c, 0x5a, 0xff, 0xbd, 0xa5, 0x18}; // Invaders icon
game_descriptor_t invaders_game_descriptor __attribute__((section(".game_descriptors"))) ={

View File

@ -257,7 +257,7 @@ static void tetris_bastet_evaluatePieces(tetris_bastet_variant_t *pBastet)
#ifdef MENU_SUPPORT
// Bastet icon, MSB is leftmost pixel
static uint8_t bastet_icon[8] PROGMEM =
static const uint8_t bastet_icon[8] PROGMEM =
{ 0x81, 0xc3, 0xff, 0x99, 0xff, 0xff, 0x66, 0x3c };
game_descriptor_t bastet_game_descriptor
__attribute__((section(".game_descriptors"))) =

View File

@ -21,7 +21,7 @@
#ifdef MENU_SUPPORT
// First Person Tetris icon, MSB is leftmost pixel
static uint8_t tetrisfp_icon[8] PROGMEM =
static const uint8_t tetrisfp_icon[8] PROGMEM =
{ 0xee, 0x89, 0xee, 0x88, 0x88, 0x20, 0x2c, 0x6c };
game_descriptor_t tetrisfp_game_descriptor
__attribute__((section(".game_descriptors"))) =

View File

@ -34,7 +34,7 @@
#ifdef GAME_TETRIS
#ifdef MENU_SUPPORT
// Tetris icon, MSB is leftmost pixel
static uint8_t tetris_icon[8] PROGMEM =
static const uint8_t tetris_icon[8] PROGMEM =
{ 0x0f, 0x0f, 0xc3, 0xdb, 0xdb, 0xc3, 0xf0, 0xf0 };
game_descriptor_t tetris_game_descriptor
__attribute__((section(".game_descriptors"))) =

View File

@ -1,6 +1,6 @@
#include "font.h"
unsigned int PROGMEM fontIndex_arial8[] = {
unsigned const int PROGMEM fontIndex_arial8[] = {
0, /* */
2, /* ! */
4, /* " */
@ -99,7 +99,7 @@ unsigned int PROGMEM fontIndex_arial8[] = {
878
};
unsigned char PROGMEM fontData_arial8[] = {
unsigned const char PROGMEM fontData_arial8[] = {
0x00, 0x00, /* */
0xfc, 0x02, /* # ###### */
0x1c, 0x00, /* ### */

View File

@ -22,12 +22,12 @@
font fonts[MAX_FONTS];
#define MAX_SPECIALCOLORS 3
unsigned char PROGMEM colorTable[MAX_SPECIALCOLORS*NUM_ROWS] = {1, 1, 2, 3, 3, 2, 1, 1,
unsigned const char PROGMEM colorTable[MAX_SPECIALCOLORS*NUM_ROWS] = {1, 1, 2, 3, 3, 2, 1, 1,
3, 3, 2, 1, 1, 2, 3, 3,
3, 3, 2, 2, 3, 3, 2, 2
};
char default_text[] PROGMEM = SCROLLTEXT_TEXT;
const char default_text[] PROGMEM = SCROLLTEXT_TEXT;
char scrolltext_text[SCROLLTEXT_BUFFER_SIZE];
/* Konzept