3 * Daniel Nelson - 10/27/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
25 * Draws the game start count down.
38 #include "Displayer.h"
39 #include "CountDownManager.h"
40 #include "MessageManager.h"
42 void Displayer::drawCountDown_inline_split_ ( )
44 glBindTexture(GL_TEXTURE_2D
, message_texture
);
48 GLfloat lambda
= CountDownManager::message_switch_alarm
49 * (1.0f
/ (GLfloat
) (GC_START_PAUSE_DELAY
/ 3));
51 if (CountDownManager::state
!= 0) {
52 glColor4f(1.0f
, 1.0f
, 1.0f
, lambda
);
54 glTranslatef(0.0f
, lambda
* lambda
* (DC_GRID_ELEMENT_LENGTH
55 * GC_SAFE_HEIGHT
* (1.0f
- DC_COUNT_DOWN_HEIGHT_RATIO
))
56 + (DC_PLAY_OFFSET_Y
+ DC_GRID_ELEMENT_LENGTH
* GC_SAFE_HEIGHT
57 * DC_COUNT_DOWN_HEIGHT_RATIO
), DC_PLAY_OFFSET_Z
);
59 glScalef((1.0f
- lambda
) * (1.0f
- lambda
)
60 * (DC_COUNT_DOWN_MAX_SCALE
- 1.0f
) + 1.0f
,
61 (1.0f
- lambda
) * (1.0f
- lambda
)
62 * (DC_COUNT_DOWN_MAX_SCALE
- 1.0f
) + 1.0f
, 1.0f
);
65 if (lambda
> DC_COUNT_DOWN_GO_INFLECTION
)
68 lambda
= Game::sqrt(lambda
* (1.0f
/ DC_COUNT_DOWN_GO_INFLECTION
));
70 glColor4f(1.0f
, 1.0f
, 1.0f
, lambda
);
72 glTranslatef(0.0f
, DC_PLAY_OFFSET_Y
+ DC_GRID_ELEMENT_LENGTH
73 * GC_SAFE_HEIGHT
* 0.5f
, DC_PLAY_OFFSET_Z
);
75 glScalef(DC_COUNT_DOWN_MAX_SCALE
, DC_COUNT_DOWN_MAX_SCALE
, 1.0f
);
78 if (MessageManager::message_shape
& MS_1x1
)
79 glCallList(message_1x1_list
);
80 else if (MessageManager::message_shape
& MS_2x1
)
81 glCallList(message_2x1_list
);
83 glCallList(message_4x1_list
);