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.
21 #include "solid_draw.h"
23 /*---------------------------------------------------------------------------*/
25 static struct s_full item_coin_file;
26 static struct s_full item_grow_file;
27 static struct s_full item_shrink_file;
29 void item_color(const struct v_item *hp, float *c)
84 sol_load_full(&item_coin_file, "item/coin/coin.sol", 0);
85 sol_load_full(&item_grow_file, "item/grow/grow.sol", 0);
86 sol_load_full(&item_shrink_file, "item/shrink/shrink.sol", 0);
91 sol_free_full(&item_coin_file);
92 sol_free_full(&item_grow_file);
93 sol_free_full(&item_shrink_file);
96 void item_push(int type)
98 glEnable(GL_COLOR_MATERIAL);
101 void item_draw(const struct v_item *hp, float r)
103 struct s_draw *draw = NULL;
108 case ITEM_COIN: draw = &item_coin_file.draw; break;
109 case ITEM_GROW: draw = &item_grow_file.draw; break;
110 case ITEM_SHRINK: draw = &item_shrink_file.draw; break;
116 sol_draw(draw, 0, 1);
121 glColor3f(1.0f, 1.0f, 1.0f);
122 glDisable(GL_COLOR_MATERIAL);
125 /*---------------------------------------------------------------------------*/