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.
33 #include "Displayer.h"
34 #include "CountDownManager.h"
35 #include "MessageManager.h"
37 void Displayer::drawCountDown_inline_split_ ( )
39 glBindTexture(GL_TEXTURE_2D
, message_texture
);
43 GLfloat lambda
= CountDownManager::message_switch_alarm
44 * (1.0f
/ (GLfloat
) (GC_START_PAUSE_DELAY
/ 3));
46 if (CountDownManager::state
!= 0) {
47 glColor4f(1.0f
, 1.0f
, 1.0f
, lambda
);
49 glTranslatef(0.0f
, lambda
* lambda
* (DC_GRID_ELEMENT_LENGTH
50 * GC_SAFE_HEIGHT
* (1.0f
- DC_COUNT_DOWN_HEIGHT_RATIO
))
51 + (DC_PLAY_OFFSET_Y
+ DC_GRID_ELEMENT_LENGTH
* GC_SAFE_HEIGHT
52 * DC_COUNT_DOWN_HEIGHT_RATIO
), DC_PLAY_OFFSET_Z
);
54 glScalef((1.0f
- lambda
) * (1.0f
- lambda
)
55 * (DC_COUNT_DOWN_MAX_SCALE
- 1.0f
) + 1.0f
,
56 (1.0f
- lambda
) * (1.0f
- lambda
)
57 * (DC_COUNT_DOWN_MAX_SCALE
- 1.0f
) + 1.0f
, 1.0f
);
60 if (lambda
> DC_COUNT_DOWN_GO_INFLECTION
)
63 lambda
= Game::sqrt(lambda
* (1.0f
/ DC_COUNT_DOWN_GO_INFLECTION
));
65 glColor4f(1.0f
, 1.0f
, 1.0f
, lambda
);
67 glTranslatef(0.0f
, DC_PLAY_OFFSET_Y
+ DC_GRID_ELEMENT_LENGTH
68 * GC_SAFE_HEIGHT
* 0.5f
, DC_PLAY_OFFSET_Z
);
70 glScalef(DC_COUNT_DOWN_MAX_SCALE
, DC_COUNT_DOWN_MAX_SCALE
, 1.0f
);
73 if (MessageManager::message_shape
& MS_1x1
)
74 glCallList(message_1x1_list
);
75 else if (MessageManager::message_shape
& MS_2x1
)
76 glCallList(message_2x1_list
);
78 glCallList(message_4x1_list
);