2 * Copyright (C) 2003 Robert Kooima
4 * NEVERBALL is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
22 /*---------------------------------------------------------------------------*/
24 static struct s_file item_coin_file;
25 static struct s_file item_grow_file;
26 static struct s_file item_shrink_file;
28 void item_color(const struct s_item *hp, float *c)
83 sol_load_gl(&item_coin_file, "item/coin/coin.sol", 0);
84 sol_load_gl(&item_grow_file, "item/grow/grow.sol", 0);
85 sol_load_gl(&item_shrink_file, "item/shrink/shrink.sol", 0);
90 sol_free_gl(&item_coin_file);
91 sol_free_gl(&item_grow_file);
92 sol_free_gl(&item_shrink_file);
95 void item_push(int type)
97 glEnable(GL_COLOR_MATERIAL);
100 void item_draw(const struct s_item *hp, float r)
103 struct s_file *fp = NULL;
107 case ITEM_COIN: fp = &item_coin_file; break;
108 case ITEM_GROW: fp = &item_grow_file; break;
109 case ITEM_SHRINK: fp = &item_shrink_file; break;
120 glColor3f(1.0f, 1.0f, 1.0f);
121 glDisable(GL_COLOR_MATERIAL);
124 /*---------------------------------------------------------------------------*/