diff options
| author | 2019-04-13 17:12:12 -0400 | |
|---|---|---|
| committer | 2019-04-13 17:12:12 -0400 | |
| commit | 2d3a51877ba45ed5a64d2c9acee3d3300f55c5fa (patch) | |
| tree | b2997a5c5377f402a5e43f299b6b6949e16ba8fd /frontends/gl | |
| parent | 98cb2cda6e9baa7836c76e78bc4c021b6bea39cc (diff) | |
| download | cetris-2d3a51877ba45ed5a64d2c9acee3d3300f55c5fa.tar.gz cetris-2d3a51877ba45ed5a64d2c9acee3d3300f55c5fa.tar.bz2 cetris-2d3a51877ba45ed5a64d2c9acee3d3300f55c5fa.zip | |
general cleanup and add ghost piece for preview
Diffstat (limited to 'frontends/gl')
| -rw-r--r-- | frontends/gl/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/gl/main.c b/frontends/gl/main.c index 06ddab6..a105290 100644 --- a/frontends/gl/main.c +++ b/frontends/gl/main.c @@ -143,7 +143,7 @@ void update_block(struct block_drawable *b, int x, int y, int color) { memcpy(block, default_rect, sizeof(GLfloat) * 32);
block[0] = block[8] = (x + 1.0f) / 10.0f;
- block[1] = block[25] = (((y - CETRIS_BOARD_VISABLE) * -1.0f) + 1.0f) / 20.0f;
+ block[1] = block[25] = (((y) * -1.0f) + 1.0f) / 20.0f;
block[9] = block[17] = block[1] - .05f;
block[16] = block[24] = block[0] - .1f;
@@ -203,7 +203,7 @@ int main(void) { glUseProgram(shader_program);
glBindVertexArray(block.vao);
for (int x = 0; x < CETRIS_BOARD_X; x++) {
- for (int y = CETRIS_BOARD_VISABLE; y < CETRIS_BOARD_Y; y++) {
+ for (int y = 0; y < CETRIS_BOARD_Y; y++) {
if (cetris.board[x][y].occupied) {
update_block(&block, x, y, cetris.board[x][y].c);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0);
|