2
* OpenTyrian: A modern cross-platform port of Tyrian
3
* Copyright (C) 2007-2009 The OpenTyrian Development Team
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32
char episode_name[6][31], difficulty_name[7][21], gameplay_name[GAMEPLAY_NAME_COUNT][26];
34
bool select_gameplay( void )
36
JE_loadPic(VGAScreen, 2, false);
37
JE_dString(VGAScreen, JE_fontCenter(gameplay_name[0], FONT_SHAPES), 20, gameplay_name[0], FONT_SHAPES);
40
gameplay_max = GAMEPLAY_NAME_COUNT - 1;
45
for (int i = 1; i <= gameplay_max; i++)
47
JE_outTextAdjust(VGAScreen, JE_fontCenter(gameplay_name[i], SMALL_FONT_SHAPES), i * 24 + 30, gameplay_name[i], 15, -4 + (i == gameplay ? 2 : 0) - (i == (GAMEPLAY_NAME_COUNT - 1) ? 4 : 0), SMALL_FONT_SHAPES, true);
53
fade_palette(colors, 10, 0, 255);
58
JE_textMenuWait(&temp, false);
66
gameplay = gameplay_max;
67
JE_playSampleNum(S_CURSOR);
70
if (++gameplay > gameplay_max)
72
JE_playSampleNum(S_CURSOR);
76
if (gameplay == GAMEPLAY_NAME_COUNT - 1)
78
JE_playSampleNum(S_SPRING);
80
fprintf(stderr, "error: networking via menu not implemented\n");
83
JE_playSampleNum(S_SELECT);
86
onePlayerAction = (gameplay == 2);
87
twoPlayerMode = (gameplay == GAMEPLAY_NAME_COUNT - 2);
91
JE_playSampleNum(S_SPRING);
92
/* fading handled elsewhere
104
bool select_episode( void )
106
JE_loadPic(VGAScreen, 2, false);
107
JE_dString(VGAScreen, JE_fontCenter(episode_name[0], FONT_SHAPES), 20, episode_name[0], FONT_SHAPES);
109
int episode = 1, episode_max = EPISODE_AVAILABLE;
114
for (int i = 1; i <= episode_max; i++)
116
JE_outTextAdjust(VGAScreen, 20, i * 30 + 20, episode_name[i], 15, -4 + (i == episode ? 2 : 0) - (!episodeAvail[i - 1] ? 4 : 0), SMALL_FONT_SHAPES, true);
122
fade_palette(colors, 10, 0, 255);
127
JE_textMenuWait(&temp, false);
137
episode = episode_max;
139
JE_playSampleNum(S_CURSOR);
143
if (episode > episode_max)
147
JE_playSampleNum(S_CURSOR);
151
if (!episodeAvail[episode - 1])
153
JE_playSampleNum(S_SPRING);
156
JE_playSampleNum(S_SELECT);
159
JE_initEpisode(episode);
160
initial_episode_num = episodeNum;
164
JE_playSampleNum(S_SPRING);
165
/* fading handled elsewhere
177
bool select_difficulty( void )
179
JE_loadPic(VGAScreen, 2, false);
180
JE_dString(VGAScreen, JE_fontCenter(difficulty_name[0], FONT_SHAPES), 20, difficulty_name[0], FONT_SHAPES);
183
int difficulty_max = 3;
188
for (int i = 1; i <= difficulty_max; i++)
190
JE_outTextAdjust(VGAScreen, JE_fontCenter(difficulty_name[i], SMALL_FONT_SHAPES), i * 24 + 30, difficulty_name[i], 15, -4 + (i == difficultyLevel ? 2 : 0), SMALL_FONT_SHAPES, true);
196
fade_palette(colors, 10, 0, 255);
201
JE_textMenuWait(&temp, false);
203
if (SDL_GetModState() & KMOD_SHIFT)
205
if ((difficulty_max < 4 && keysactive[SDLK_g]) ||
206
(difficulty_max == 4 && keysactive[SDLK_RIGHTBRACKET]))
210
} else if (difficulty_max == 5 && keysactive[SDLK_l] && keysactive[SDLK_o] && keysactive[SDLK_r] && keysactive[SDLK_d]) {
220
if (difficultyLevel < 1)
222
difficultyLevel = difficulty_max;
224
JE_playSampleNum(S_CURSOR);
228
if (difficultyLevel > difficulty_max)
232
JE_playSampleNum(S_CURSOR);
236
JE_playSampleNum(S_SELECT);
237
/* fading handled elsewhere
240
if (difficultyLevel == 6)
243
} else if (difficultyLevel == 5) {
249
JE_playSampleNum(S_SPRING);
250
/* fading handled elsewhere