Debian Codegraph @

code/q3_ui/ui_credits.c

raw symbols SCIP
1 /*
2 ===========================================================================
3 Copyright (C) 1999-2005 Id Software, Inc.
4
5 This file is part of Quake III Arena source code.
6
7 Quake III Arena source code is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the License,
10 or (at your option) any later version.
11
12 Quake III Arena source code is distributed in the hope that it will be
13 useful, 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.
16
17 You should have received a copy of the GNU General Public License
18 along with Quake III Arena source code; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 ===========================================================================
21 */
22 //
23 /*
24 =======================================================================
25
26 CREDITS
27
28 =======================================================================
29 */
30
31
32 #include "ui_local.h"
33
34
35 typedef struct {
36 menuframework_s menu;
37 int frame;
38 } creditsmenu_t;
39
40 static creditsmenu_t s_credits;
41
42
43 /*
44 ===============
45 UI_CreditMenu_Draw_ioq3
46 ===============
47 */
48 static void UI_CreditMenu_Draw_ioq3( void ) {
49 int y;
50 int i;
51
52 // These are all people that have made commits to Subversion, and thus
53 // probably incomplete.
54 // (These are in alphabetical order, for the defense of everyone's egos.)
55 static const char *names[] = {
56 "Tim Angus",
57 "James Canete",
58 "Vincent Cojot",
59 "Ryan C. Gordon",
60 "Aaron Gyes",
61 "Zack Middleton",
62 "Ludwig Nussel",
63 "Julian Priestley",
64 "Scirocco Six",
65 "Thilo Schulz",
66 "Zachary J. Slater",
67 "Tony J. White",
68 "...and many, many others!", // keep this one last.
69 NULL
70 };
71
72 // Center text vertically on the screen
73 y = (SCREEN_HEIGHT - ARRAY_LEN(names) * (1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE)) / 2;
74
75 UI_DrawProportionalString( 320, y, "ioquake3 contributors:", UI_CENTER|UI_SMALLFONT, color_white );
76 y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
77
78 for (i = 0; names[i]; i++) {
79 UI_DrawProportionalString( 320, y, names[i], UI_CENTER|UI_SMALLFONT, color_white );
80 y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
81 }
82
83 UI_DrawString( 320, 459, "https://www.ioquake3.org/", UI_CENTER|UI_SMALLFONT, color_red );
84 }
85
86
87 /*
88 =================
89 UI_CreditMenu_Key
90 =================
91 */
92 static sfxHandle_t UI_CreditMenu_Key( int key ) {
93 if( key & K_CHAR_FLAG ) {
94 return 0;
95 }
96
97 s_credits.frame++;
98 if (s_credits.frame == 1) {
99 s_credits.menu.draw = UI_CreditMenu_Draw_ioq3;
100 } else {
101 trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" );
102 }
103 return 0;
104 }
105
106
107 /*
108 ===============
109 UI_CreditMenu_Draw
110 ===============
111 */
112 static void UI_CreditMenu_Draw( void ) {
113 int y;
114
115 y = 12;
116 UI_DrawProportionalString( 320, y, "id Software is:", UI_CENTER|UI_SMALLFONT, color_white );
117
118 y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
119 UI_DrawProportionalString( 320, y, "Programming", UI_CENTER|UI_SMALLFONT, color_white );
120 y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
121 UI_DrawProportionalString( 320, y, "John Carmack, Robert A. Duffy, Jim Dose'", UI_CENTER|UI_SMALLFONT, color_white );
122
123 y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
124 UI_DrawProportionalString( 320, y, "Art", UI_CENTER|UI_SMALLFONT, color_white );
125 y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
126 UI_DrawProportionalString( 320, y, "Adrian Carmack, Kevin Cloud,", UI_CENTER|UI_SMALLFONT, color_white );
127 y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
128 UI_DrawProportionalString( 320, y, "Kenneth Scott, Seneca Menard, Fred Nilsson", UI_CENTER|UI_SMALLFONT, color_white );
129
130 y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
131 UI_DrawProportionalString( 320, y, "Game Designer", UI_CENTER|UI_SMALLFONT, color_white );
132 y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
133 UI_DrawProportionalString( 320, y, "Graeme Devine", UI_CENTER|UI_SMALLFONT, color_white );
134
135 y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
136 UI_DrawProportionalString( 320, y, "Level Design", UI_CENTER|UI_SMALLFONT, color_white );
137 y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
138 UI_DrawProportionalString( 320, y, "Tim Willits, Christian Antkow, Paul Jaquays", UI_CENTER|UI_SMALLFONT, color_white );
139
140 y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
141 UI_DrawProportionalString( 320, y, "CEO", UI_CENTER|UI_SMALLFONT, color_white );
142 y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
143 UI_DrawProportionalString( 320, y, "Todd Hollenshead", UI_CENTER|UI_SMALLFONT, color_white );
144
145 y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
146 UI_DrawProportionalString( 320, y, "Director of Business Development", UI_CENTER|UI_SMALLFONT, color_white );
147 y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
148 UI_DrawProportionalString( 320, y, "Marty Stratton", UI_CENTER|UI_SMALLFONT, color_white );
149
150 y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
151 UI_DrawProportionalString( 320, y, "Biz Assist and id Mom", UI_CENTER|UI_SMALLFONT, color_white );
152 y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
153 UI_DrawProportionalString( 320, y, "Donna Jackson", UI_CENTER|UI_SMALLFONT, color_white );
154
155 y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
156 UI_DrawProportionalString( 320, y, "Development Assistance", UI_CENTER|UI_SMALLFONT, color_white );
157 y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
158 UI_DrawProportionalString( 320, y, "Eric Webb", UI_CENTER|UI_SMALLFONT, color_white );
159
160 y += 1.35 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
161 UI_DrawString( 320, y, "To order: 1-800-idgames www.quake3arena.com www.idsoftware.com", UI_CENTER|UI_SMALLFONT, color_red );
162 y += SMALLCHAR_HEIGHT;
163 UI_DrawString( 320, y, "Quake III Arena(c) 1999-2000, Id Software, Inc. All Rights Reserved", UI_CENTER|UI_SMALLFONT, color_red );
164 }
165
166
167 /*
168 ===============
169 UI_CreditMenu
170 ===============
171 */
172 void UI_CreditMenu( void ) {
173 memset( &s_credits, 0 ,sizeof(s_credits) );
174
175 s_credits.menu.draw = UI_CreditMenu_Draw;
176 s_credits.menu.key = UI_CreditMenu_Key;
177 s_credits.menu.fullscreen = qtrue;
178 UI_PushMenu ( &s_credits.menu );
179 }