Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corrected types of static arrays #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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