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)
70 int T = config_get_d(CONFIG_TEXTURES);
72 sol_load_gl(&item_coin_file, config_data("item/coin/coin.sol"), T, 0);
73 sol_load_gl(&item_grow_file, config_data("item/grow/grow.sol"), T, 0);
74 sol_load_gl(&item_shrink_file, config_data("item/shrink/shrink.sol"), T, 0);
79 sol_free_gl(&item_coin_file);
80 sol_free_gl(&item_grow_file);
81 sol_free_gl(&item_shrink_file);
84 void item_push(int type)
86 glEnable(GL_COLOR_MATERIAL);
89 void item_draw(const struct s_item *hp, float r)
92 struct s_file *fp = NULL;
96 case ITEM_COIN: fp = &item_coin_file; break;
97 case ITEM_GROW: fp = &item_grow_file; break;
98 case ITEM_SHRINK: fp = &item_shrink_file; break;
109 glColor3f(1.0f, 1.0f, 1.0f);
110 glDisable(GL_COLOR_MATERIAL);
113 /*---------------------------------------------------------------------------*/