view lamertetris/sources/shape.h @ 3:84e66ea83026

DPF-Prymula-audioplugins-0.231015-2
author prymula <prymula76@outlook.com>
date Mon, 16 Oct 2023 21:53:34 +0200
parents 2787f5e749ae
children
line wrap: on
line source

#include <SDL2/SDL.h>
#include <stdio.h>

#ifndef SZLAM_H
#define SZLAM_H

class Shape {
    public:
        Shape();
        SDL_Surface * createField(int w,int h, int r, int g, int b);
        void setColor(int color, int *r, int *g, int*b);
        char elements [7][16][4] = {
    {
	{1,0,0,0},
    {1,0,0,0},
    {1,0,0,0},
    {1,0,0,0},

    {0,0,0,0},
    {0,0,0,0},
    {1,1,1,1},
    {0,0,0,0},

    {1,0,0,0},
    {1,0,0,0},
    {1,0,0,0},
    {1,0,0,0},

    {0,0,0,0},
    {0,0,0,0},
    {1,1,1,1},
    {0,0,0,0}
    },
{
	{1,1,0,0},
    {1,0,0,0},
    {1,0,0,0},
    {1,0,0,0},

    {0,0,0,0},
    {1,1,1,1},
    {0,0,0,1},
    {0,0,0,0},

    {0,1,0,0},
    {0,1,0,0},
    {0,1,0,0},
    {1,1,0,0},

    {0,0,0,0},
    {1,0,0,0},
    {1,1,1,1},
    {0,0,0,0}
    },
    
    {
	{1,1,0,0},
    {0,1,0,0},
    {0,1,0,0},
    {0,1,0,0},

    {0,0,0,0},
    {0,0,0,1},
    {1,1,1,1},
    {0,0,0,0},

    {1,0,0,0},
    {1,0,0,0},
    {1,0,0,0},
    {1,1,0,0},

    {0,0,0,0},
    {1,1,1,1},
    {1,0,0,0},
    {0,0,0,0}
    },
    
{
	{0,0,0,0},
    {1,0,0,0},
    {1,1,0,0},
    {1,0,0,0},

    {0,0,0,0},
    {1,1,1,0},
    {0,1,0,0},
    {0,0,0,0},

    {0,0,0,0},
    {0,1,0,0},
    {1,1,0,0},
    {0,1,0,0},

    {0,0,0,0},
    {0,1,0,0},
    {1,1,1,0},
    {0,0,0,0}
    },
    {
	{0,0,0,0},
    {0,0,0,0},
    {1,1,0,0},
    {1,1,0,0},

    {0,0,0,0},
    {0,0,0,0},
    {1,1,0,0},
    {1,1,0,0},

    {0,0,0,0},
    {0,0,0,0},
    {1,1,0,0},
    {1,1,0,0},

    {0,0,0,0},
    {0,0,0,0},
    {1,1,0,0},
    {1,1,0,0}
    },
{
	{0,0,0,0},
    {0,1,1,1},
    {1,1,1,0},
    {0,0,0,0},

    {1,0,0,0},
    {1,1,0,0},
    {1,1,0,0},
    {0,1,0,0},

    {0,0,0,0},
    {0,1,1,1},
    {1,1,1,0},
    {0,0,0,0},

    {1,0,0,0},
    {1,1,0,0},
    {1,1,0,0},
    {0,1,0,0}

    },
{
	{0,0,0,0},
    {1,1,1,0},
    {0,1,1,1},
    {0,0,0,0},

    {0,1,0,0},
    {1,1,0,0},
    {1,1,0,0},
    {1,0,0,0},

    {0,0,0,0},
    {1,1,1,0},
    {0,1,1,1},
    {0,0,0,0},

    {0,1,0,0},
    {1,1,0,0},
    {1,1,0,0},
    {1,0,0,0}

    }

};
    private:
        SDL_Surface * createBoxMask(int width, int height);

};

#endif // szlam