source: golgotha/src/golg/g1_tint.cc @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 12 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.9 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#include "g1_tint.hh"
10#include "lisp/lisp.hh"
11#include "lisp/li_init.hh"
12
13r1_color_tint_handle g1_player_tint_handles[G1_MAX_PLAYERS];
14
15g1_tint_struct g1_player_tint_data[G1_MAX_PLAYERS] =
16
17  { 1.0, 1.0, 1.0 },   // no tint (this entry is not actually used)
18  { 0.2, 1.0, 0.2 },   // green
19  { 1.0, 0.2, 0.2 },   // red
20  { 0.2, 0.2, 1.0 },   // blue
21  { 1.0, 1.0, 0.2 }    // yellow 
22};
23
24g1_tint_struct g1_hurt_tint_data[G1_NUM_HURT_TINTS] =
25
26  { 1.0, 1.0, 1.0 },
27  { 1.0, 0.7, 0.7 },
28  { 1.0, 0.5, 0.5 },
29  { 1.0, 0.2, 0.2 },
30  { 1.0, 0.0, 0.0 }
31};
32r1_color_tint_handle g1_hurt_tint_handles[G1_NUM_HURT_TINTS];
33
34void g1_init_color_tints(r1_render_api_class *api)
35{
36  int i;
37
38  g1_player_tint_handles[0] = 0;
39  for (i=1; i<G1_MAX_PLAYERS; i++)
40    g1_player_tint_handles[i] = api->register_color_tint(g1_player_tint_data[i].r,
41                                                         g1_player_tint_data[i].g,
42                                                         g1_player_tint_data[i].b);
43
44  g1_hurt_tint_handles[0] = 0;
45  for (i=1; i<G1_NUM_HURT_TINTS; i++)
46    g1_hurt_tint_handles[i] = api->register_color_tint(g1_hurt_tint_data[i].r,
47                                                       g1_hurt_tint_data[i].g,
48                                                       g1_hurt_tint_data[i].b);
49}                                 
50
51int g1_hurt_tint=0;
52g1_tint_type g1_tint=G1_TINT_POLYS;
Note: See TracBrowser for help on using the repository browser.