update function and pgmspace errors
Posted: Mon Oct 24, 2016 6:12 am
ok so im almost live with the gamebuino andvanced prototype library. I managed to get the drawbitmap and tilemap functions done. I just needed the one drawbitmap command with the dx and all that in it then I had to go through gamebuino .h and commented out all the set color commands and then had to update all the draw commands to the color functions and blah blah blah.
im having a couple problems though. the update function in the display files use the pcd8544 stuff and I cant figure out if I can use it eith my screen.
also im getting a bunch of errors to the sound.cpp file that I cant figure out.
for now can we deal with these errors first?
im having a couple problems though. the update function in the display files use the pcd8544 stuff and I cant figure out if I can use it eith my screen.
also im getting a bunch of errors to the sound.cpp file that I cant figure out.
- Code: Select all
Arduino: 1.6.11 (Windows 7), TD: 1.30-beta3, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz optimize speed (overclock), US English"
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp: In member function 'void Display::drawBitmap(int8_t, int8_t, int8_t, int8_t, const uint8_t*, uint8_t, uint8_t, uint8_t, uint8_t, uint16_t)':
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp:681:9: warning: unused variable 'largest' [-Wunused-variable]
int8_t largest = 0;
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp:682:9: warning: unused variable 'largesty' [-Wunused-variable]
int8_t largesty = 0;
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp: In member function 'void Display::drawBitmap1(int16_t, int16_t, const uint8_t*, int16_t, int16_t, uint16_t)':
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp:594:27: warning: 'byte' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(i & 7) byte <<= 1;
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp: In member function 'void Display::drawBitmap2(int16_t, int16_t, const uint8_t*, int16_t, int16_t, uint16_t, uint16_t)':
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp:614:27: warning: 'byte' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(i & 7) byte <<= 1;
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp: In member function 'void Display::drawBitmap3(int16_t, int16_t, uint8_t*, int16_t, int16_t, uint16_t)':
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp:632:27: warning: 'byte' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(i & 7) byte <<= 1;
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp: In member function 'void Display::drawBitmap4(int16_t, int16_t, uint8_t*, int16_t, int16_t, uint16_t, uint16_t)':
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp:649:27: warning: 'byte' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(i & 7) byte <<= 1;
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp: In member function 'void Display::drawXBitmap(int16_t, int16_t, const uint8_t*, int16_t, int16_t, uint16_t)':
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\DisplayRGB.cpp:669:27: warning: 'byte' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(i & 7) byte >>= 1;
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\Gamebuino.cpp: In member function 'boolean Gamebuino::update()':
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\Gamebuino.cpp:187:12: error: 'class Display' has no member named 'update'
display.update(); //send the buffer to the screen
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:11:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/Arduino.h:1,
from C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\Gamebuino.h:23,
from C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\Gamebuino.cpp:21:
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\Gamebuino.cpp: In member function 'int8_t Gamebuino::menu(const char* const*, uint8_t)':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/avr/pgmspace.h:80:61: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\Gamebuino.cpp:282:49: note: in expansion of macro 'pgm_read_word'
display.println((const __FlashStringHelper*)pgm_read_word(items+i));
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\Gamebuino.cpp: In member function 'void Gamebuino::changeGame()':
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\Gamebuino.cpp:517:10: error: 'class Display' has no member named 'update'
display.update();
^
C:\Users\duhjoker\Documents\Arduino\libraries\gamebuinoduhjokercolorMAIN\Gamebuino.cpp:523:10: error: 'class Display' has no member named 'update'
display.update();
^
Error compiling for board Teensy 3.2 / 3.1.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
for now can we deal with these errors first?