Hi John, (and anyone else who may wish to chime in)...
Sorry about that. Yes, I should have included the #include files. You assumed that they were all bitmap images. In fact, most of them are graphics made with the commands from the Adafruit GFX library (lines, rectangles, etc...- and a few bitmaps within those graphics).
HOWEVER, thanks to your reply as I was able to understand what was missing and I was able to modify your proposed solution to one I'm pretty sure will work (it's no longer throwing up an error at any rate). Hurray!
I'm left with only the "invalid conversion from 'int' to 'pages' [-f permissive]" error.
GFX_SEEN-Almost-There1:148:43: error: invalid conversion from 'int' to 'pages' [-fpermissive]
page = PageLinks[page][upButtonIndex];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
This error is repeated four times, on each line related to each of the four buttons.
The code for the "upButton", for example, is as follows:
if (upButtonState != upButtonPreviousState)
{
upButtonPreviousState = upButtonState;
if (upButtonState == LOW)
{ // button just pressed // Follow the link for the current page and button
page = PageLinks[page][upButtonIndex];
displayImage(page);
}
fairly straightforward: if the upButton is pressed, then the PageLinks array gets looked up and the page related to the listed (pressed) button becomes the page called by displayImage(page).
I think the problem is that room2doors is identified as a "page" in the enum pages function
but then, in the const int PageLinks function is it being identified as a constant integer... hence the error of an "invalid conversion".
Having identified what seems like the most likely culprit of the error, I am unsure how to correct it. Googling this type of error (invalid conversion from 'int') has led me down a rabbithole of stackoverflow.com discussions which do not seem to apply to my situation.
Below is the code which relates to the description. Please don't hesitate to let know
enum buttons {upButtonIndex, downButtonIndex, leftButtonIndex, rightButtonIndex};
enum pages {room2doors, twodoors, sofawall, library, fourthwall, Book, lounger, dagger, HALL, ARROWWALL, BLANKWall, mirror, lipstick, eye1, eye2, eye3, book1, book2, book3, sofadetail, NUMBER_OF_IMAGES} page;
const int PageLinks[NUMBER_OF_IMAGES][4] =
{
{twodoors, sofawall, library, fourthwall}, // room2doors
[remainder of array not shown because unnecessary]
I'm so close, I can almost taste it... but, sadly, another weekend has come to an end without final victory. Once this last hurdle is overcome, the core mechanics will be in place and I can start building in the content ![]()
Good night!