3 * Daniel Nelson - 8/24/0
5 * Copyright (C) 2000 Daniel Nelson
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
26 #ifndef SCORERECORDMANAGER_H
27 #define SCORERECORDMANAGER_H
38 #include "WinRecord.h"
39 #include "Displayer.h"
42 /* static */ class ScoreRecordManager
{
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
;
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
;