Skip to content

Commit

Permalink
corrected types of static arrays: Merge branch 'pakanek'
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshinm committed Apr 6, 2017
2 parents d545011 + 83287d6 commit 7c2b666
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/cube.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ void make_cube_faces(
{0, 0, -1},
{0, 0, +1}
};
static const float uvs[6][4][2] = {
static const int uvs[6][4][2] = {
{{0, 0}, {1, 0}, {0, 1}, {1, 1}},
{{1, 0}, {0, 0}, {1, 1}, {0, 1}},
{{0, 1}, {0, 0}, {1, 1}, {1, 0}},
{{0, 0}, {0, 1}, {1, 0}, {1, 1}},
{{0, 0}, {0, 1}, {1, 0}, {1, 1}},
{{1, 0}, {1, 1}, {0, 0}, {0, 1}}
};
static const float indices[6][6] = {
static const int indices[6][6] = {
{0, 3, 2, 0, 1, 3},
{0, 3, 1, 0, 2, 3},
{0, 3, 2, 0, 1, 3},
{0, 3, 1, 0, 2, 3},
{0, 3, 2, 0, 1, 3},
{0, 3, 1, 0, 2, 3}
};
static const float flipped[6][6] = {
static const int flipped[6][6] = {
{0, 1, 2, 1, 3, 2},
{0, 2, 1, 2, 3, 1},
{0, 1, 2, 1, 3, 2},
Expand Down Expand Up @@ -113,13 +113,13 @@ void make_plant(
{0, 0, -1},
{0, 0, +1}
};
static const float uvs[4][4][2] = {
static const int uvs[4][4][2] = {
{{0, 0}, {1, 0}, {0, 1}, {1, 1}},
{{1, 0}, {0, 0}, {1, 1}, {0, 1}},
{{0, 0}, {0, 1}, {1, 0}, {1, 1}},
{{1, 0}, {1, 1}, {0, 0}, {0, 1}}
};
static const float indices[4][6] = {
static const int indices[4][6] = {
{0, 3, 2, 0, 1, 3},
{0, 3, 1, 0, 2, 3},
{0, 3, 2, 0, 1, 3},
Expand Down Expand Up @@ -259,7 +259,7 @@ void make_character_3d(
{{+2, 0, -1}, {-2, 0, +1}, {+2, 0, +1},
{+2, 0, -1}, {-2, 0, -1}, {-2, 0, +1}}
};
static const float uvs[8][6][2] = {
static const int uvs[8][6][2] = {
{{0, 0}, {1, 1}, {0, 1}, {0, 0}, {1, 0}, {1, 1}},
{{1, 0}, {0, 1}, {0, 0}, {1, 0}, {1, 1}, {0, 1}},
{{1, 0}, {0, 1}, {0, 0}, {1, 0}, {1, 1}, {0, 1}},
Expand Down Expand Up @@ -364,7 +364,7 @@ void make_sphere(float *data, float r, int detail) {
{ 0,-1, 0}, {-1, 0, 0},
{ 0, 1, 0}, { 0, 0, 1}
};
static float uvs[6][3] = {
static float uvs[6][2] = {
{0, 0.5}, {0, 0.5},
{0, 0}, {0, 0.5},
{0, 1}, {0, 0.5}
Expand Down

0 comments on commit 7c2b666

Please sign in to comment.