void display_all_stones(t_square *sq) { int i; int j; t_uchar *grid; static int tab[] = { FOOD_PER_SQUARE, LINEMATE_PER_SQUARE, DERAUMERE_PER_SQUARE, SIBUR_PER_SQUARE, MENDIANE_PER_SQUARE, PHIRAS_PER_SQUARE, THYSTAME_PER_SQUARE}; grid = sq->grid + tab[0]; i = 0; j = 1; glBindBuffer(GL_ARRAY_BUFFER, g_env->vbos[_mod_stone][_vbo_vrtx]); glVertexPointer(3, GL_FLOAT, 0, 0); glBindBuffer(GL_ARRAY_BUFFER, g_env->vbos[_mod_stone][_vbo_nrms]); glNormalPointer(GL_FLOAT, 0, 0); glBindBuffer(GL_ARRAY_BUFFER, 0); while (j < 7) { glCallList(g_env->lists[j]); while (i < sq->itms[j]) display_stone(grid[i++]); grid += tab[j]; i = 0; j++; } }
void play( void ) { ende=0; display_field(); new_stone(); display_stone(); while (!ende) { move_stone(); display_stone(); fall_stone(); clear_line(); display_score(); check_ende(); delay(zeit); } }