A sky roads like game with interesting shaders
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

190 lines
2.6 KiB

//
// statics.h
// SkyRoads
//
// Created by Joshua Moerman on 5/4/12.
// Copyright (c) 2012 Vadovas. All rights reserved.
//
#ifndef SkyRoads_statics_h
#define SkyRoads_statics_h
static const unsigned int colors = 7;
static const GLfloat color_transformations[colors][16] = {
{
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
},
{
-0.1, -2.0, -0.9, 1.0,
-0.4, -0.5, -0.9, 1.0,
-2.0, -0.1, -0.9, 1.0,
0.0, 0.0, 0.0, 1.0
},
{
0.1, 0.0, -0.9, 0.4,
0.4, 1.0, 0.0, 0.0,
0.0, 0.1, 0.3, 0.0,
0.0, 0.0, 0.0, 1.0
},
{
0.5, -0.3, -0.5, 0.5,
0.5, 0.0, -0.5, 0.5,
0.5, 1.0, -0.5, 0.5,
0.0, 0.0, 0.0, 1.0
},
{
0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.5,
0.0, 0.0, 0.0, 0.1,
0.0, 0.0, 0.0, 1.0
},
{
5.0, -1.0, -5.0, -0.5,
-5.0, 5.0, -1.0, -0.5,
-1.0, -5.0, 5.0, -0.5,
0.0, 0.0, 0.0, 1.0
},
{
1.0, 1.0, 1.0, 0.1,
0.0, 1.0, 0.0, 0.0,
0.0, 1.0, 0.8, 0.2,
0.0, 0.0, 0.0, 1.0
}
};
static const GLfloat quad[] = {
1.0, 1.0,
1.0, -1.0,
-1.0, 1.0,
-1.0, -1.0
};
static const GLfloat tex_quad[] = {
1.0, 1.0,
1.0, 0.0,
0.0, 1.0,
0.0, 0.0
};
static const int level[] = {
1,1,1,1,1,
0,1,1,1,1,
0,0,1,1,1,
0,0,0,1,1,
0,0,0,1,1,
0,0,1,1,0,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2,2,0,1,1,
2,2,0,1,1,
2,2,0,1,1,
2,2,0,1,1,
2,2,2,2,2,
2,2,2,2,2,
2,2,2,2,2,
2,2,2,2,2,
2,2,1,2,2,
2,1,1,1,2,
};
static const size_t level_width = 5;
static const size_t level_length = sizeof(level) / sizeof(level[0]) / level_width;
static const size_t number_of_quads = std::count(level, level+level_length*level_width, 1);
#endif