Updates for a new interface to the networking
[crack-attack.git] / src / ScoreRecordManager.h
blobcda00230624a71196c7cc8fc77a18f003cc58f51
1 /*
2 * ScoreRecordManager.h
3 * Daniel Nelson - 8/24/0
5 * Copyright (C) 2000 Daniel Nelson
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * Daniel Nelson - aluminumangel.org
22 * 174 W. 18th Ave.
23 * Columbus, OH 43210
26 #ifndef SCORERECORDMANAGER_H
27 #define SCORERECORDMANAGER_H
29 #include <GL/glut.h>
31 #include "glext.h"
33 using namespace std;
35 #include "WinRecord.h"
36 #include "Displayer.h"
37 #include "Score.h"
39 /* static */ class ScoreRecordManager {
40 public:
41 static void initialize ( );
42 static void gameFinish_inline_split_ ( );
43 static void timeStep_inline_split_ ( );
45 static inline void gameStart ( )
47 if (!(MetaState::mode & CM_SOLO)) return;
49 glDeleteTextures(1, &Displayer::score_to_beat_texture);
52 static inline void gameFinish ( )
54 if (!(MetaState::mode & CM_SOLO) || (MetaState::mode & CM_AI)) return;
55 if (!WinRecord::won) return;
57 gameFinish_inline_split_();
60 static inline void timeStep ( )
62 if (!(MetaState::mode & CM_SOLO)) return;
63 if (!WinRecord::won) return;
64 if (Game::time_step < DC_WIN_FADE_TIME) return;
66 timeStep_inline_split_();
69 static inline GLubyte *chooseTexture ( int rank )
71 if (rank > Score::player_rank)
72 return Displayer::record_texture_data[rank - 1];
73 if (rank < Score::player_rank)
74 return Displayer::record_texture_data[rank];
75 return Displayer::player_rank_texture_data;
78 static int top_rank;
79 static int top_texture;
80 static GLfloat offset;
81 static GLfloat velocity;
83 static bool spring_active;
84 static bool control_active;
85 static bool ignore_up;
86 static bool ignore_down;
89 #endif