Simple fish eat program

Dependencies:   mbed mbed-rtos N5110 ShiftReg Tone

classes/Graphics.cpp

Committer:
el18a2k
Date:
2021-03-19
Revision:
1:7dfa61225fcf
Parent:
0:cf9660998431
Child:
2:532b0225519f

File content as of revision 1:7dfa61225fcf:

#include "Graphics.h"

void Graphics::titleScreen(N5110 &lcd){
            //  x   y
    const int F[20][12] =   {
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    };

        //  x   y
    const int I[20][4] =   {
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    { 1,1,1,1, },
    };

        //  x   y
    const int S[20][12] =   {
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 0,0,0,0,0,0,0,0,1,1,1,1, },
    { 0,0,0,0,0,0,0,0,1,1,1,1, },
    { 0,0,0,0,0,0,0,0,1,1,1,1, },
    { 0,0,0,0,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    };

        //  x   y
    const int H[20][12] =   {
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    };

        //  x   y
    const int E[20][12] =   {
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,0,0,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    };

        //  x   y
    const int A[20][12] =   {
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    { 1,1,1,1,0,0,0,0,1,1,1,1, },
    };

        //  x   y
    const int T[20][12] =   {
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,0,0,0,0, },
    };
    
    lcd.drawRect(0,0,84,48,FILL_TRANSPARENT); //draws screen border
        
                     //X Y  x  y
    lcd.drawSprite(3,2,20,12,(int *)F);
    lcd.drawSprite(19,2,20,4,(int *)I);
    lcd.drawSprite(27,2,20,12,(int *)S);
    lcd.drawSprite(43,2,20,12,(int *)H);
        
    lcd.drawSprite(3,26,20,12,(int *)E);
    lcd.drawSprite(19,26,20,12,(int *)A);
    lcd.drawSprite(35,26,20,12,(int *)T);   
}

void Graphics::confirmationScreen(N5110 &lcd){
                  //  x   y
    const int Title_fish[44][21] =   {
    { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0, },
    { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, },
    { 0,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0, },
    { 0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, },
    { 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, },
    { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, },
    { 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, },
    { 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, },
    { 0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, },
    { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, },
    { 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, },
    { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    };

                        //  x   y
    const int Title_fish_eaten[44][21] =   {
    { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0, },
    { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, },
    { 0,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0, },
    { 0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, },
    { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, },
    { 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, },
    { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, },
    { 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, },
    { 0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, },
    { 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, },
    { 0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, },
    { 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, },
    { 0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, },
    { 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0, },
    { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    };
    
    lcd.clear();
    lcd.drawRect(0,0,84,48,FILL_TRANSPARENT); //draws screen border
    lcd.printString("Hold",12,2);
    lcd.printString("A",24,3);
    lcd.drawSprite(59,2,44,21,(int*)Title_fish);
    lcd.refresh(); // refresh the LCD so the pixels appear
    wait_ms(1000);
    lcd.drawSprite(59,2,44,21,(int*)Title_fish_eaten);
    lcd.refresh();
    wait_ms(1000);
}

void Graphics::screenFlash(N5110 &lcd){
    int i = 0;

    while(i<4){
        lcd.inverseMode();
        lcd.refresh();
        wait_ms(100);
        lcd.normalMode();
        lcd.refresh();
        wait_ms(100);
        i++;
    }
}

void Graphics::Fish_1(N5110 &lcd){
    //             x  y
    const int Fish_1[4][9]= {
    { 1,0,0,1,1,1,1,1,0, },
    { 1,1,1,1,1,1,1,0,1, },
    { 1,1,1,1,1,1,1,1,1, },
    { 1,0,0,1,1,1,1,1,0, },
    };
    
    //pos / sprite x y / x  y
    lcd.drawSprite(2,2,4,9,(int*)Fish_1);
}

void Graphics::Fish_2(N5110 &lcd){
     //             x  y
    const int Fish_2[6][14] =   {
    { 1,0,0,0,0,1,1,1,1,1,1,1,0,0, },
    { 1,1,0,0,1,1,1,1,1,1,0,1,1,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,0,0,1,1,1,1,1,1,1,1,1,0, },
    { 1,0,0,0,0,1,1,1,1,1,1,1,0,0, },
    };
    
    //pos / sprite x y / x  y
    lcd.drawSprite(2,8,6,14,(int*)Fish_2);
}

void Graphics::Fish_3(N5110 &lcd){
    //             x  y
    const int Fish_3[8][17] =   {
    { 1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0 },
    { 1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0 },
    { 1,1,1,0,0,1,1,1,1,1,1,1,1,0,1,1,0 },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 },
    { 1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0 },
    { 1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0 },
    { 1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0 },
    };
    
    //pos / sprite x y / x  y
    lcd.drawSprite(2,16,8,17,(int*)Fish_3);
}


void Graphics::Fish_4(N5110 &lcd){
    //             x  y
    const int Fish_4[12][23] =   {
    { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0, },
    { 0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0, },
    { 1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0, },
    { 1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0, },
    { 1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0, },
    { 1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, },
    { 1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,0, },
    { 1,1,1,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,0,0,0,0, },
    { 1,1,0,0,0,0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0, },
    { 1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0, },
    };
    
    //pos / sprite x y / x  y
    lcd.drawSprite(2,26,12,23,(int*)Fish_4);
}


void Graphics::upArrow(N5110 &lcd){
    //             x  y
    const int upArrow[3][6] =   {
    { 0,0,1,1,0,0, },
    { 0,1,1,1,1,0, },
    { 1,1,1,1,1,1, },
    };
    
    //pos / sprite x y / x  y
    lcd.drawSprite(30,2,3,6,(int*)upArrow);
}
    
    
void Graphics::downArrow(N5110 &lcd){
     //             x  y
    const int downArrow[3][6] =   {
    { 1,1,1,1,1,1, },
    { 0,1,1,1,1,0, },
    { 0,0,1,1,0,0, },
    };
    
    //pos / sprite x y / x  y
    lcd.drawSprite(30,7,3,6,(int*)downArrow);
}


void Graphics::leftArrow(N5110 &lcd){
    //             x  y
    const int leftArrow[6][3] =   {
    { 0,0,1, },
    { 0,1,1, },
    { 1,1,1, },
    { 1,1,1, },
    { 0,1,1, },
    { 0,0,1, },
    };
    
    //pos / sprite x y / x  y
    lcd.drawSprite(30,12,6,3,(int*)leftArrow);
}


void Graphics::rightArrow(N5110 &lcd){
     //             x  y
    const int rightArrow[6][3] =   {
    { 1,0,0, },
    { 1,1,0, },
    { 1,1,1, },
    { 1,1,1, },
    { 1,1,0, },
    { 1,0,0, },
    };
    
    //pos / sprite x y / x  y
    lcd.drawSprite(30,20,6,3,(int*)rightArrow);
}


void Graphics::Waves(N5110 &lcd){
     //             x  y
    const int waves[4][14] =   {
    { 0,0,1,0,0,0,0,0,0,1,0,0,0,0, },
    { 0,1,1,1,0,0,0,0,1,1,1,0,0,0, },
    { 1,0,0,0,1,0,0,1,0,0,0,1,0,0, },
    { 0,0,0,0,0,1,1,0,0,0,0,0,1,1, },
    };
    
    int x = 0;  
    int y = 44;
    int i = 0;
    
    while(y>0){   
        lcd.clear();
        lcd.drawRect(0,0,84,48,FILL_TRANSPARENT); //draws screen border
        while(x < 83){
            lcd.drawSprite(x,y,4,14,(int *)waves);
            x=x+14;
        }
        y=y-5;
        lcd.refresh();
    }
}