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,17 +5,8 @@
#include "bitmapscroller.h"
#include "laborlogo.h"
static uint8_t laborlogo_getChunk(unsigned char const nBitPlane,
unsigned char const nChunkX,
unsigned char const nChunkY,
unsigned int const nFrame)
{
assert(nChunkX < 6);
assert(nChunkY < 48);
static uint8_t aBitmap[48][6] PROGMEM =
{{0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF},
static const 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},
@ -64,6 +55,14 @@ static uint8_t laborlogo_getChunk(unsigned char const nBitPlane,
{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)
{
assert(nChunkX < 6);
assert(nChunkY < 48);
return pgm_read_byte(&aBitmap[nChunkY][nChunkX]);
}

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