summaryrefslogtreecommitdiff
path: root/source/ui_credits.c
blob: 24f754a26bbc0b51523e80a0a10d16a558d27ac2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
/*
Copyright (C) 1997-2001 Id Software, Inc.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/

#include "ui_local.h"

/*
=============================================================================

END GAME MENU

=============================================================================
*/

static int credits_start_time;
static const char **credits;
static const char *idcredits[] = {
	"+Q2PRO",
	"http://q2pro.sf.net/",
	"",
	"+PROGRAMMING",
	"Andrey '[SkulleR]' Nazarov",
	"",
	"+ADDITIONAL PROGRAMMING",
	"Al_Uz",
	"",
	"+THANKS TO",
	"Vic",
	"R1CH",
	"",
	"",
	"",
	"",
	"",
	"",
	"+QUAKE II BY ID SOFTWARE",
	"",
	"+PROGRAMMING",
	"John Carmack",
	"John Cash",
	"Brian Hook",
	"",
	"+ART",
	"Adrian Carmack",
	"Kevin Cloud",
	"Paul Steed",
	"",
	"+LEVEL DESIGN",
	"Tim Willits",
	"American McGee",
	"Christian Antkow",
	"Paul Jaquays",
	"Brandon James",
	"",
	"+BIZ",
	"Todd Hollenshead",
	"Barrett (Bear) Alexander",
	"Donna Jackson",
	"",
	"",
	"+SPECIAL THANKS",
	"Ben Donges for beta testing",
	"",
	"",
	"",
	"",
	"",
	"",
	"+ADDITIONAL SUPPORT",
	"",
	"+LINUX PORT AND CTF",
	"Dave \"Zoid\" Kirsch",
	"",
	"+CINEMATIC SEQUENCES",
	"Ending Cinematic by Blur Studio - ",
	"Venice, CA",
	"",
	"Environment models for Introduction",
	"Cinematic by Karl Dolgener",
	"",
	"Assistance with environment design",
	"by Cliff Iwai",
	"",
	"+SOUND EFFECTS AND MUSIC",
	"Sound Design by Soundelux Media Labs.",
	"Music Composed and Produced by",
	"Soundelux Media Labs.  Special thanks",
	"to Bill Brown, Tom Ozanich, Brian",
	"Celano, Jeff Eisner, and The Soundelux",
	"Players.",
	"",
	"\"Level Music\" by Sonic Mayhem",
	"www.sonicmayhem.com",
	"",
	"\"Quake II Theme Song\"",
	"(C) 1997 Rob Zombie. All Rights",
	"Reserved.",
	"",
	"Track 10 (\"Climb\") by Jer Sypult",
	"",
	"Voice of computers by",
	"Carly Staehlin-Taylor",
	"",
	"+THANKS TO ACTIVISION",
	"+IN PARTICULAR:",
	"",
	"John Tam",
	"Steve Rosenthal",
	"Marty Stratton",
	"Henk Hartong",
	"",
	"Quake II(tm) (C)1997 Id Software, Inc.",
	"All Rights Reserved.  Distributed by",
	"Activision, Inc. under license.",
	"Quake II(tm), the Id Software name,",
	"the \"Q II\"(tm) logo and id(tm)",
	"logo are trademarks of Id Software,",
	"Inc. Activision(R) is a registered",
	"trademark of Activision, Inc. All",
	"other trademarks and trade names are",
	"properties of their respective owners.",
	0
};

static menuFrameWork_t	m_creditsMenu;

#define BORDER_HEIGHT	60
#define FADE_HIGHT		20

void M_Credits_MenuDraw( menuFrameWork_t *self ) {
	int i;
	float y, yMax;
	const char *string;
	int flags;
	float alpha;

	yMax = uis.height - BORDER_HEIGHT - 8;

	/*
	** draw the credits
	*/
	y = yMax - ( uis.realtime - credits_start_time ) / 20.0f;
	for( i = 0 ; credits[i] && y < yMax ; i++, y += 8 ) {
		if( y < BORDER_HEIGHT ) {
			continue;
		}

		string = credits[i];
		flags = UI_CENTER;
		if( *string == '+' ) {
			string++;
			flags |= UI_ALTCOLOR;
		}

		alpha = 1;
		if( y < BORDER_HEIGHT + FADE_HIGHT ) {
			alpha = ( y - BORDER_HEIGHT ) / ( float )FADE_HIGHT;
		} else if( y > yMax - FADE_HIGHT ) {
			alpha = 1 - ( ( y - ( yMax - FADE_HIGHT ) ) / ( float )FADE_HIGHT );
		}

		ref.SetColor( DRAW_COLOR_ALPHA, ( byte * )&alpha );
		UI_DrawString( uis.width / 2, y, NULL, flags, string );
		ref.SetColor( DRAW_COLOR_CLEAR, NULL );

	}

	if( y < BORDER_HEIGHT - FADE_HIGHT ) {
		credits_start_time = uis.realtime;
	}

	Menu_Draw( &m_creditsMenu );

}


static int M_Credits_Callback( int id, int msg, int param ) {
	if( msg != QM_KEY ) {
		return QMS_NOTHANDLED;
	}

	UI_PopMenu();
	return QMS_OUT;
}


static void Credits_MenuInit( void ) {
	memset( &m_creditsMenu, 0, sizeof( m_creditsMenu ) );

	credits = idcredits;	
	credits_start_time = uis.realtime;

	m_creditsMenu.draw = M_Credits_MenuDraw;
	m_creditsMenu.callback = M_Credits_Callback;
}


void M_Menu_Credits_f( void ) {
	Credits_MenuInit();
	UI_PushMenu( &m_creditsMenu );
}