Really low graphics patch thanks to Stephan Beyer
[crack-attack.git] / src / ScoreRecordManager.h
blob34a3cb1f5fc00eafa92c004e6a6f93d15bff5424
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 #ifndef _WIN32
32 #else
33 # include <glext.h>
34 #endif
36 using namespace std;
38 #include "WinRecord.h"
39 #include "Displayer.h"
40 #include "Score.h"
42 /* static */ class ScoreRecordManager {
43 public:
44 static void initialize ( );
45 static void gameFinish_inline_split_ ( );
46 static void timeStep_inline_split_ ( );
48 static inline void gameStart ( )
50 if (!(MetaState::mode & CM_SOLO)) return;
52 glDeleteTextures(1, &Displayer::score_to_beat_texture);
55 static inline void gameFinish ( )
57 if (!(MetaState::mode & CM_SOLO)) return;
58 if (!WinRecord::won) return;
60 gameFinish_inline_split_();
63 static inline void ScoreRecordManager::timeStep ( )
65 if (!(MetaState::mode & CM_SOLO)) return;
66 if (!WinRecord::won) return;
67 if (Game::time_step < DC_WIN_FADE_TIME) return;
69 timeStep_inline_split_();
72 static inline GLubyte *ScoreRecordManager::chooseTexture ( int rank )
74 if (rank > Score::player_rank)
75 return Displayer::record_texture_data[rank - 1];
76 if (rank < Score::player_rank)
77 return Displayer::record_texture_data[rank];
78 return Displayer::player_rank_texture_data;
81 static int top_rank;
82 static int top_texture;
83 static GLfloat offset;
84 static GLfloat velocity;
86 static bool spring_active;
87 static bool control_active;
88 static bool ignore_up;
89 static bool ignore_down;
92 #endif