OSDN Git Service

README-jp.txtのBOMを削除した
[starfighter-jp/starfighter-jp.git] / src / intermission.cpp
1 /*
2 Copyright (C) 2003 Parallel Realities
3 Copyright (C) 2011, 2012, 2013 Guus Sliepen
4 Copyright (C) 2012, 2015, 2016 onpon4 <onpon4@riseup.net>
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 3
9 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "Starfighter.h"
21
22 /*
23 Drives the cursor. Is used by some other screens too
24 */
25 static void intermission_doCursor()
26 {
27         getPlayerInput();
28
29         LIMIT(engine.cursor_x, 10, screen->w - 10 - gfx_sprites[SP_CURSOR]->w);
30         LIMIT(engine.cursor_y, 10, screen->h - 10 - gfx_sprites[SP_CURSOR]->h);
31         screen_blit(gfx_sprites[SP_CURSOR], engine.cursor_x, engine.cursor_y);
32 }
33
34 /*
35 Sets the player's current status information lines. These are the lines
36 that are scrolled up the screen when the player clicks on Current Status
37 These are set only once.
38 */
39 static void intermission_setStatusLines()
40 {
41         char string[50];
42         int timeTaken = game.timeTaken;
43         int y;
44
45         sprintf(string, "·â¤Ã¤¿ÃƤοô : %d", game.shots);
46         gfx_createTextObject(TS_SHOTS_FIRED, string, 0, 0, FONT_WHITE);
47
48         sprintf(string, "Ì¿Ã椷¤¿ÃƤοô : %d", game.hits);
49         gfx_createTextObject(TS_HITS_SCORED, string, 0, 0, FONT_WHITE);
50
51         sprintf(string, "Ì¿ÃæΨ : %d%%", game.accuracy);
52         gfx_createTextObject(TS_ACCURACY, string, 0, 0, FONT_WHITE);
53
54         sprintf(string, "¥×¥ì¥¤¥ä¡¼°Ê³°¤Ë·âÄƤµ¤ì¤¿Å¨¤Î¿ô : %d", game.totalOtherKills);
55         gfx_createTextObject(TS_OTHER_KILLS, string, 0, 0, FONT_WHITE);
56
57         sprintf(string, "²Ô¤¤¤ÀÁí¶â³Û : %d", game.cashEarned);
58         gfx_createTextObject(TS_CASH_EARNED, string, 0, 0, FONT_WHITE);
59
60         gfx_createTextObject(TS_CHRIS_HEADER, "*** ¥¯¥ê¥¹ ***", 0, 0, FONT_WHITE);
61
62         sprintf(string, "·âÄÆ¿ô : %d", game.totalKills);
63         gfx_createTextObject(TS_CHRIS_KILLS, string, 0, 0, FONT_WHITE);
64
65         sprintf(string, "³ÍÆÀ¤·¤¿¥·¡¼¥ë¥É²óÉü¤Î¿ô : %d", game.shieldPickups);
66         gfx_createTextObject(TS_CHRIS_SHIELD_PICKUPS, string, 0, 0, FONT_WHITE);
67
68         sprintf(string, "³ÍÆÀ¤·¤¿¥×¥é¥º¥Þ¥»¥ë¤Î¿ô : %d", game.cellPickups);
69         gfx_createTextObject(TS_CHRIS_PLASMA_PICKUPS, string, 0, 0, FONT_WHITE);
70
71         sprintf(string, "³ÍÆÀ¤·¤¿¥í¥±¥Ã¥ÈÃƤοô : %d", game.rocketPickups);
72         gfx_createTextObject(TS_CHRIS_ROCKET_PICKUPS, string, 0, 0, FONT_WHITE);
73
74         sprintf(string, "³ÍÆÀ¤·¤¿¥Ñ¥ï¡¼¥¢¥Ã¥×¤Î¿ô : %d", game.powerups);
75         gfx_createTextObject(TS_CHRIS_POWERUP_PICKUPS, string, 0, 0, FONT_WHITE);
76
77         sprintf(string, "Ç˲õ¤·¤¿µ¡Íë¤Î¿ô : %d", game.minesKilled);
78         gfx_createTextObject(TS_CHRIS_MINES_KILLED, string, 0, 0, FONT_WHITE);
79
80         sprintf(string, "µß½Ð¤·¤¿ÅÛÎì¤Î¿Í¿ô : %d", game.slavesRescued);
81         gfx_createTextObject(TS_CHRIS_SLAVES_RESCUED, string, 0, 0, FONT_WHITE);
82
83         if (game.hasWingMate1)
84         {
85                 gfx_createTextObject(TS_PHOEBE_HEADER, "*** ¥Õ¥§¡¼¥Ù ***", 0, 0, FONT_WHITE);
86
87                 sprintf(string, "·âÄÆ¿ô : %d", game.wingMate1Kills);
88                 gfx_createTextObject(TS_PHOEBE_KILLS, string, 0, 0, FONT_WHITE);
89
90                 sprintf(string, "æ½Ð¤·¤¿²ó¿ô : %d", game.wingMate1Ejects);
91                 gfx_createTextObject(TS_PHOEBE_DEATHS, string, 0, 0, FONT_WHITE);
92         }
93         else
94         {
95                 gfx_createTextObject(TS_PHOEBE_HEADER, "", 0, 0, FONT_WHITE);
96                 gfx_createTextObject(TS_PHOEBE_KILLS, "", 0, 0, FONT_WHITE);
97                 gfx_createTextObject(TS_PHOEBE_DEATHS, "", 0, 0, FONT_WHITE);
98         }
99
100         if (game.hasWingMate2)
101         {
102                 gfx_createTextObject(TS_URSULA_HEADER, "*** ¥¦¡¼¥·¥å¥é ***", 0, 0, FONT_WHITE);
103
104                 sprintf(string, "·âÄÆ¿ô : %d", game.wingMate2Kills);
105                 gfx_createTextObject(TS_URSULA_KILLS, string, 0, 0, FONT_WHITE);
106
107                 sprintf(string, "æ½Ð¤·¤¿²ó¿ô : %d", game.wingMate2Ejects);
108                 gfx_createTextObject(TS_URSULA_DEATHS, string, 0, 0, FONT_WHITE);
109         }
110         else
111         {
112                 gfx_createTextObject(TS_URSULA_HEADER, "", 0, 0, FONT_WHITE);
113                 gfx_createTextObject(TS_URSULA_KILLS, "", 0, 0, FONT_WHITE);
114                 gfx_createTextObject(TS_URSULA_DEATHS, "", 0, 0, FONT_WHITE);
115         }
116
117         gfx_createTextObject(TS_STATUS_HEADER, "¸½ºß¤Î¾õÂÖ", -1, 83, FONT_WHITE);
118
119         snprintf(string, sizeof string, "Áí»þ´Ö : %2d:%02d:%02d", timeTaken / 3600, (timeTaken / 60) % 60, timeTaken % 60);
120         gfx_createTextObject(TS_STATUS_FOOTER, string, -1, 404, FONT_WHITE);
121
122         y = 400;
123         for (int i = TS_STATUS_HEADER + 1 ; i < TS_STATUS_FOOTER ; i++)
124         {
125                 y += 20;
126                 if ((i == TS_CHRIS_HEADER) || (i == TS_PHOEBE_HEADER) ||
127                                 (i == TS_URSULA_HEADER))
128                         y += 25;
129
130                 gfx_textSprites[i].x = 150;
131                 gfx_textSprites[i].y = y;
132         }
133 }
134
135 /*
136 Sets the names and stats of the planets within the current system.
137 */
138 static void intermission_setSystemPlanets()
139 {
140         for (int i = 0 ; i < 10 ; i++)
141         {
142                 systemPlanet[i].y = -1;
143                 strcpy(systemPlanet[i].name, "");
144                 systemPlanet[i].image = NULL;
145                 systemPlanet[i].messageMission = -1;
146                 systemPlanet[i].messageSlot = -1;
147                 systemPlanet[i].faceImage = -1;
148                 strcpy(systemPlanet[i].subject, "ERROR");
149         }
150
151         switch (game.system)
152         {
153                 case SYSTEM_SPIRIT:
154                         systemPlanet[PLANET_HAIL].y = 15;
155                         strcpy(systemPlanet[PLANET_HAIL].name, "¥Ï¥¤¥ë");
156                         systemPlanet[PLANET_HAIL].image = gfx_sprites[SP_PLANET_GREEN];
157
158                         systemPlanet[PLANET_CERADSE].y = 30;
159                         strcpy(systemPlanet[PLANET_CERADSE].name, "¥»¥é¥É¥»");
160                         systemPlanet[PLANET_CERADSE].image = gfx_sprites[SP_PLANET_BLUE];
161
162                         systemPlanet[PLANET_HINSTAG].y = 30;
163                         strcpy(systemPlanet[PLANET_HINSTAG].name, "¥Ò¥ó¥¹¥¿¥°");
164                         systemPlanet[PLANET_HINSTAG].image = gfx_sprites[SP_PLANET_RED];
165
166                         systemPlanet[PLANET_JOLDAR].y = 20;
167                         strcpy(systemPlanet[PLANET_JOLDAR].name, "¥¸¥ç¥ë¥À¡¼");
168                         systemPlanet[PLANET_JOLDAR].image = gfx_sprites[SP_PLANET_GREEN];
169
170                         systemPlanet[PLANET_MOEBO].y = 40;
171                         strcpy(systemPlanet[PLANET_MOEBO].name, "¥â¥¨¥Ü");
172                         systemPlanet[PLANET_MOEBO].image = gfx_sprites[SP_PLANET_ORANGE];
173
174                         systemPlanet[PLANET_HAIL].messageMission = MISN_HAIL;
175                         systemPlanet[PLANET_HAIL].messageSlot = 0;
176                         systemPlanet[PLANET_HAIL].faceImage = FS_KRASS;
177                         strcpy(systemPlanet[PLANET_HAIL].subject, "WEAPCO¤Î·±Îý½ê¤ÎÇ˲õ");
178
179                         systemPlanet[PLANET_CERADSE].messageMission = MISN_CERADSE;
180                         systemPlanet[PLANET_CERADSE].messageSlot = 1;
181                         systemPlanet[PLANET_CERADSE].faceImage = FS_SID;
182                         strcpy(systemPlanet[PLANET_CERADSE].subject, "6¤Ä¤ÎÀѲ٤βó¼ý");
183
184                         systemPlanet[PLANET_HINSTAG].messageMission = MISN_HINSTAG;
185                         systemPlanet[PLANET_HINSTAG].messageSlot = 2;
186                         systemPlanet[PLANET_HINSTAG].faceImage = FS_SID;
187                         strcpy(systemPlanet[PLANET_HINSTAG].subject, "5ÀɤÎWEAPCO¥ß¥µ¥¤¥ëÄú¤ÎÇ˲õ");
188
189                         systemPlanet[PLANET_JOLDAR].messageMission = MISN_JOLDAR;
190                         systemPlanet[PLANET_JOLDAR].messageSlot = 3;
191                         systemPlanet[PLANET_JOLDAR].faceImage = FS_SID;
192                         strcpy(systemPlanet[PLANET_JOLDAR].subject, "¥¸¥ç¥ë¥À¡¼¼þÊդε¡Íë¤Î½üµî");
193
194                         systemPlanet[PLANET_MOEBO].messageMission = MISN_MOEBO;
195                         systemPlanet[PLANET_MOEBO].messageSlot = 0;
196                         systemPlanet[PLANET_MOEBO].faceImage = FS_SID;
197                         strcpy(systemPlanet[PLANET_MOEBO].subject, "WEAPCO¥Õ¥ê¥²¡¼¥È¤ÎÇ˲õ");
198
199                         break;
200
201                 case SYSTEM_EYANANTH:
202                         strcpy(systemPlanet[PLANET_RESCUESLAVES].name, "WEAPCO¤Î·Þ·âÉôÂâ");
203
204                         systemPlanet[PLANET_NEROD].y = 15;
205                         strcpy(systemPlanet[PLANET_NEROD].name, "¥Í¥í¥É");
206                         systemPlanet[PLANET_NEROD].image = gfx_sprites[SP_PLANET_GREEN];
207
208                         systemPlanet[PLANET_ALLEZ].y = 30;
209                         strcpy(systemPlanet[PLANET_ALLEZ].name, "¥¢¥ì¥º");
210                         systemPlanet[PLANET_ALLEZ].image = gfx_sprites[SP_PLANET_BLUE];
211
212                         systemPlanet[PLANET_URUSOR].y = 30;
213                         strcpy(systemPlanet[PLANET_URUSOR].name, "¥¦¥ë¥½¥ë");
214                         systemPlanet[PLANET_URUSOR].image = gfx_sprites[SP_PLANET_RED];
215
216                         systemPlanet[PLANET_DORIM].y = 20;
217                         strcpy(systemPlanet[PLANET_DORIM].name, "¥É¥ê¥à");
218                         systemPlanet[PLANET_DORIM].image = gfx_sprites[SP_PLANET_GREEN];
219
220                         systemPlanet[PLANET_ELAMALE].y = 40;
221                         strcpy(systemPlanet[PLANET_ELAMALE].name, "¥¨¥é¥á¡¼¥ë");
222                         systemPlanet[PLANET_ELAMALE].image = gfx_sprites[SP_PLANET_ORANGE];
223
224                         systemPlanet[PLANET_RESCUESLAVES].messageMission = MISN_RESCUESLAVES;
225                         systemPlanet[PLANET_RESCUESLAVES].messageSlot = 0;
226                         systemPlanet[PLANET_RESCUESLAVES].faceImage = FS_SID;
227                         strcpy(systemPlanet[PLANET_RESCUESLAVES].subject, "ÅÛÎì¤Îµß½Ð");
228
229                         systemPlanet[PLANET_NEROD].messageMission = MISN_NEROD;
230                         systemPlanet[PLANET_NEROD].messageSlot = 1;
231                         systemPlanet[PLANET_NEROD].faceImage = FS_PHOEBE;
232                         strcpy(systemPlanet[PLANET_NEROD].subject, "SOS");
233
234                         systemPlanet[PLANET_ALLEZ].messageMission = MISN_ALLEZ;
235                         systemPlanet[PLANET_ALLEZ].messageSlot = 2;
236                         systemPlanet[PLANET_ALLEZ].faceImage = FS_SID;
237                         strcpy(systemPlanet[PLANET_ALLEZ].subject, "°åÌôÉʤÎÍ¢Á÷Á¥¤Îµß½õ");
238
239                         systemPlanet[PLANET_URUSOR].messageMission = MISN_URUSOR;
240                         systemPlanet[PLANET_URUSOR].messageSlot = 0;
241                         systemPlanet[PLANET_URUSOR].faceImage = FS_SID;
242                         strcpy(systemPlanet[PLANET_URUSOR].subject, "5ÀɤÎWEAPCOÊäµë´Ï¤ÎÙ½Êá");
243
244                         systemPlanet[PLANET_DORIM].messageMission = MISN_DORIM;
245                         systemPlanet[PLANET_DORIM].messageSlot = 1;
246                         systemPlanet[PLANET_DORIM].faceImage = FS_SID;
247                         strcpy(systemPlanet[PLANET_DORIM].subject, "WEAPCO¤Î²Ê³Ø¼Ô¤ÎÁܺ÷");
248
249                         systemPlanet[PLANET_ELAMALE].messageMission = MISN_ELAMALE;
250                         systemPlanet[PLANET_ELAMALE].messageSlot = 0;
251                         systemPlanet[PLANET_ELAMALE].faceImage = FS_PHOEBE;
252                         strcpy(systemPlanet[PLANET_ELAMALE].subject, "WEAPCO¤ÎºÎ·¡Á¥¤ÎÇ˲õ");
253
254                         break;
255
256                 case SYSTEM_MORDOR:
257                         strcpy(systemPlanet[PLANET_CLOAKFIGHTER].name, "WEAPCO¤Î·Þ·âÉôÂâ");
258
259                         systemPlanet[PLANET_ODEON].y = 15;
260                         strcpy(systemPlanet[PLANET_ODEON].name, "¥ª¥Ç¥ª¥ó");
261                         systemPlanet[PLANET_ODEON].image = gfx_sprites[SP_PLANET_GREEN];
262
263                         systemPlanet[PLANET_FELLON].y = 30;
264                         strcpy(systemPlanet[PLANET_FELLON].name, "¥Õ¥§¥í¥ó");
265                         systemPlanet[PLANET_FELLON].image = gfx_sprites[SP_PLANET_BLUE];
266
267                         systemPlanet[PLANET_SIVEDI].y = 30;
268                         strcpy(systemPlanet[PLANET_SIVEDI].name, "¥µ¥¤¥Ù¥¸");
269                         systemPlanet[PLANET_SIVEDI].image = gfx_sprites[SP_PLANET_RED];
270
271                         systemPlanet[PLANET_ALMARTHA].y = 20;
272                         strcpy(systemPlanet[PLANET_ALMARTHA].name, "¥¢¥ë¥Þ¥µ");
273                         systemPlanet[PLANET_ALMARTHA].image = gfx_sprites[SP_PLANET_GREEN];
274
275                         systemPlanet[PLANET_POSWIC].y = 20;
276                         strcpy(systemPlanet[PLANET_POSWIC].name, "¥Ý¥¹¥¤¥Ã¥¯");
277                         systemPlanet[PLANET_POSWIC].image = gfx_sprites[SP_PLANET_ORANGE];
278
279                         systemPlanet[PLANET_ELLESH].y = 40;
280                         strcpy(systemPlanet[PLANET_ELLESH].name, "¥¨¥ê¥Ã¥·¥å");
281                         systemPlanet[PLANET_ELLESH].image = gfx_sprites[SP_PLANET_GREEN];
282
283                         systemPlanet[PLANET_CLOAKFIGHTER].messageMission = MISN_CLOAKFIGHTER;
284                         systemPlanet[PLANET_CLOAKFIGHTER].messageSlot = 0;
285                         systemPlanet[PLANET_CLOAKFIGHTER].faceImage = FS_SID;
286                         strcpy(systemPlanet[PLANET_CLOAKFIGHTER].subject, "»îºîÀïÆ®µ¡¤ÎÇ˲õ");
287
288                         systemPlanet[PLANET_ODEON].messageMission = MISN_ODEON;
289                         systemPlanet[PLANET_ODEON].messageSlot = 1;
290                         systemPlanet[PLANET_ODEON].faceImage = FS_PHOEBE;
291                         strcpy(systemPlanet[PLANET_ODEON].subject, "¥¦¡¼¥·¥å¥é¤Îµß½Ð");
292
293                         systemPlanet[PLANET_FELLON].messageMission = MISN_FELLON;
294                         systemPlanet[PLANET_FELLON].messageSlot = 2;
295                         systemPlanet[PLANET_FELLON].faceImage = FS_SID;
296                         strcpy(systemPlanet[PLANET_FELLON].subject, "È¿Í𷳤λٱç");
297
298                         systemPlanet[PLANET_SIVEDI].messageMission = MISN_SIVEDI;
299                         systemPlanet[PLANET_SIVEDI].messageSlot = 0;
300                         systemPlanet[PLANET_SIVEDI].faceImage = FS_SID;
301                         strcpy(systemPlanet[PLANET_SIVEDI].subject, "¥¢¥¹¥Æ¥í¥¤¥É¥Ù¥ë¥È¤Ç¤ÎºÎ·¡");
302
303                         systemPlanet[PLANET_ALMARTHA].messageMission = MISN_ALMARTHA;
304                         systemPlanet[PLANET_ALMARTHA].messageSlot = 1;
305                         systemPlanet[PLANET_ALMARTHA].faceImage = FS_KRASS;
306                         strcpy(systemPlanet[PLANET_ALMARTHA].subject, "Âå¶â¤ÎÍÑ°Õ");
307
308                         systemPlanet[PLANET_POSWIC].messageMission = MISN_POSWIC;
309                         systemPlanet[PLANET_POSWIC].messageSlot = 0;
310                         systemPlanet[PLANET_POSWIC].faceImage = FS_URSULA;
311                         strcpy(systemPlanet[PLANET_POSWIC].subject, "WEAPCO¤Î½ÅÌò¤ÎÈÂÁ÷¤ÎÁË»ß");
312
313                         systemPlanet[PLANET_ELLESH].messageMission = MISN_ELLESH;
314                         systemPlanet[PLANET_ELLESH].messageSlot = 0;
315                         systemPlanet[PLANET_ELLESH].faceImage = FS_PHOEBE;
316                         strcpy(systemPlanet[PLANET_ELLESH].subject, "WEAPCO¤Î½ÅÌò¤ÎÄÉÀ×");
317
318                         break;
319
320                 case SYSTEM_SOL:
321                         systemPlanet[PLANET_MERCURY].y = 15;
322                         strcpy(systemPlanet[PLANET_MERCURY].name, "¿åÀ±");
323                         systemPlanet[PLANET_MERCURY].image = gfx_sprites[SP_PLANET_RED];
324
325                         systemPlanet[PLANET_VENUS].y = 20;
326                         strcpy(systemPlanet[PLANET_VENUS].name, "¶âÀ±");
327                         systemPlanet[PLANET_VENUS].image = gfx_sprites[SP_PLANET_ORANGE];
328
329                         systemPlanet[PLANET_EARTH].y = 20;
330                         strcpy(systemPlanet[PLANET_EARTH].name, "Ãϵå");
331                         systemPlanet[PLANET_EARTH].image = gfx_sprites[SP_PLANET_BLUE];
332
333                         systemPlanet[PLANET_MARS].y = 20;
334                         strcpy(systemPlanet[PLANET_MARS].name, "²ÐÀ±");
335                         systemPlanet[PLANET_MARS].image = gfx_sprites[SP_PLANET_RED];
336
337                         systemPlanet[PLANET_JUPITER].y = 30;
338                         strcpy(systemPlanet[PLANET_JUPITER].name, "ÌÚÀ±");
339                         systemPlanet[PLANET_JUPITER].image = gfx_sprites[SP_PLANET_ORANGE];
340
341                         systemPlanet[PLANET_SATURN].y = 20;
342                         strcpy(systemPlanet[PLANET_SATURN].name, "ÅÚÀ±");
343                         systemPlanet[PLANET_SATURN].image = gfx_sprites[SP_PLANET_GREEN];
344
345                         systemPlanet[PLANET_URANUS].y = 20;
346                         strcpy(systemPlanet[PLANET_URANUS].name, "Å·²¦À±");
347                         systemPlanet[PLANET_URANUS].image = gfx_sprites[SP_PLANET_BLUE];
348
349                         systemPlanet[PLANET_NEPTUNE].y = 20;
350                         strcpy(systemPlanet[PLANET_NEPTUNE].name, "³¤²¦À±");
351                         systemPlanet[PLANET_NEPTUNE].image = gfx_sprites[SP_PLANET_BLUE];
352
353                         systemPlanet[PLANET_PLUTO].y = 20;
354                         strcpy(systemPlanet[PLANET_PLUTO].name, "̽²¦À±");
355                         systemPlanet[PLANET_PLUTO].image = gfx_sprites[SP_PLANET_BLUE];
356
357                         systemPlanet[PLANET_PLUTO].messageMission = MISN_PLUTO;
358                         systemPlanet[PLANET_PLUTO].messageSlot = 0;
359                         systemPlanet[PLANET_PLUTO].faceImage = FS_SID;
360                         strcpy(systemPlanet[PLANET_PLUTO].subject, "̽²¦À±¤ÎÀ©°µ");
361
362                         systemPlanet[PLANET_NEPTUNE].messageMission = MISN_NEPTUNE;
363                         systemPlanet[PLANET_NEPTUNE].messageSlot = 1;
364                         systemPlanet[PLANET_NEPTUNE].faceImage = FS_SID;
365                         strcpy(systemPlanet[PLANET_NEPTUNE].subject, "³¤²¦À±¤ÎÀ©°µ");
366
367                         systemPlanet[PLANET_URANUS].messageMission = MISN_URANUS;
368                         systemPlanet[PLANET_URANUS].messageSlot = 2;
369                         systemPlanet[PLANET_URANUS].faceImage = FS_SID;
370                         strcpy(systemPlanet[PLANET_URANUS].subject, "Å·²¦À±¤ÎÀ©°µ");
371
372                         systemPlanet[PLANET_SATURN].messageMission = MISN_SATURN;
373                         systemPlanet[PLANET_SATURN].messageSlot = 0;
374                         systemPlanet[PLANET_SATURN].faceImage = FS_SID;
375                         strcpy(systemPlanet[PLANET_SATURN].subject, "³°ÏÇÀ±Ëɱҥ·¥¹¥Æ¥à¤ÎÇ˲õ");
376
377                         systemPlanet[PLANET_JUPITER].messageMission = MISN_JUPITER;
378                         systemPlanet[PLANET_JUPITER].messageSlot = 0;
379                         systemPlanet[PLANET_JUPITER].faceImage = FS_SID;
380                         strcpy(systemPlanet[PLANET_JUPITER].subject, "µßÆñ¿®¹æ¤ÎÄ´ºº");
381
382                         systemPlanet[PLANET_MARS].messageMission = MISN_MARS;
383                         systemPlanet[PLANET_MARS].messageSlot = 0;
384                         systemPlanet[PLANET_MARS].faceImage = FS_SID;
385                         strcpy(systemPlanet[PLANET_MARS].subject, "¥¢¥¹¥Æ¥í¥¤¥É¥Ù¥ë¥È¤Î¹Ò¹Ô");
386
387                         systemPlanet[PLANET_EARTH].messageMission = MISN_EARTH;
388                         systemPlanet[PLANET_EARTH].messageSlot = 0;
389                         systemPlanet[PLANET_EARTH].faceImage = FS_CHRIS;
390                         strcpy(systemPlanet[PLANET_EARTH].subject, "Ãϵå¤ÎÃ¥´Ô");
391
392                         systemPlanet[PLANET_VENUS].messageMission = MISN_VENUS;
393                         systemPlanet[PLANET_VENUS].messageSlot = 0;
394                         systemPlanet[PLANET_VENUS].faceImage = FS_SID;
395                         strcpy(systemPlanet[PLANET_VENUS].subject, "Á´¤Æ¤ò½ª¤ï¤é¤»¤ë");
396
397                         break;
398         }
399 }
400
401 /*
402 Spins the planets around the sun, spaced according to their Y value
403 as defined in intermission_setSystemPlanets(). Moving the cursor over the planet
404 will show their name and their current status
405 */
406 static bool intermission_showSystem(float x, float y, bool selectable)
407 {
408         SDL_Rect r;
409         int planet = 0;
410         int planetSpace = systemPlanet[planet].y;
411         bool rtn = false;
412
413         // Blit the sun
414         screen_blit(gfx_sprites[SP_SUN], 370, 220);
415
416         for (int i = 50 ; i < 300 ; i+= planetSpace)
417         {
418                 x *= 0.75;
419                 y *= 0.75;
420
421                 gfx_drawCircle(400, 250, i, screen, darkGrey);
422
423                 r.x = int(400 + (sinf(x) * i));
424                 r.y = int(250 + (cosf(y) * i));
425                 r.w = 10;
426                 r.h = 10;
427
428                 r.x -= (systemPlanet[planet].image->w / 2);
429                 r.y -= (systemPlanet[planet].image->h / 2);
430                 screen_blit(systemPlanet[planet].image, r.x, r.y);
431
432                 if (selectable &&
433                         game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6,
434                                 r.x, r.y, systemPlanet[planet].image->w,
435                                 systemPlanet[planet].image->h))
436                 {
437                         screen_renderString(systemPlanet[planet].name, -1, 545, FONT_WHITE);
438                         if ((engine.keyState[KEY_FIRE]))
439                         {
440                                 game.destinationPlanet = planet;
441                                 strcpy(game.destinationName, systemPlanet[game.destinationPlanet].name);
442                                 rtn = true;
443                                 engine.keyState[KEY_FIRE] = 0;
444                         }
445                 }
446
447                 planet++;
448                 if (systemPlanet[planet].y == -1)
449                         break;
450                 planetSpace = systemPlanet[planet].y;
451         }
452
453         return rtn;
454 }
455
456 /*
457 Scrolls the player's current information up the screen. When
458 the specified status line reaches a certain Y value, the entire
459 list is reset and the information lines begin again from the bottom
460 (in other words, they loop around).
461 */
462 static void intermission_showStatus(SDL_Surface *infoSurface)
463 {
464         int y;
465         float speed = 0.25;
466
467         if(engine.keyState[KEY_DOWN])
468                 speed = 1;
469         else if(engine.keyState[KEY_UP])
470                 speed = -1;
471
472         screen_blit(infoSurface, 100, 80);
473
474         for (int i = TS_STATUS_HEADER + 1 ; i < TS_STATUS_FOOTER ; i++)
475         {
476                 gfx_textSprites[i].y -= speed;
477                 if ((gfx_textSprites[i].y > 80) && (gfx_textSprites[i].y < 400))
478                         screen_blitText(i);
479         }
480
481         if (gfx_textSprites[TS_STATUS_FOOTER - 1].y < 65)
482         {
483                 y = 400;
484                 for (int i = TS_STATUS_HEADER + 1 ; i < TS_STATUS_FOOTER ; i++)
485                 {
486                         y += 20;
487                         if ((i == TS_CHRIS_HEADER) || (i == TS_PHOEBE_HEADER) ||
488                                         (i == TS_URSULA_HEADER))
489                                 y += 25;
490
491                         gfx_textSprites[i].y = y;
492                 }
493         }
494
495         screen_drawRect(100, 80, 600, 20, 0x00, 0x00, 0x99);
496
497         screen_drawRect(100, 400, 600, 20, 0x00, 0x00, 0x99);
498
499         screen_blitText(TS_STATUS_HEADER);
500         screen_blitText(TS_STATUS_FOOTER);
501 }
502
503 static void intermission_updateCommsSurface(SDL_Surface *comms)
504 {
505         char string[255];
506
507         if (engine.commsSection == 1)
508                 return;
509
510         gfx_drawRect(comms, 0, 10, comms->w - 1, 55, 0x00, 0x22, 0x00);
511         gfx_blit(gfx_faceSprites[FS_CHRIS], 20, 15, comms);
512         gfx_renderString("¥¯¥ê¥¹¡¦¥Ð¥ó¥Õ¥£¡¼¥ë¥É", 80, 15, FONT_WHITE, 0, comms);
513         sprintf(string, "¸½ºß°ÌÃÖ: %s", systemPlanet[game.stationedPlanet].name);
514         gfx_renderString(string, 80, 35, FONT_WHITE, 0, comms);
515 }
516
517 static void intermission_createCommsSurface(SDL_Surface *comms)
518 {
519         engine.commsSection = 0;
520
521         gfx_drawRect(comms, 0, 0, comms->w - 1, comms->h - 1, 0x00, 0x00, 0x25);
522
523         gfx_renderString("+++ ¸½ºß¤ÎºîÀï (¥¯¥ê¥Ã¥¯¤Ç¾ÜºÙ¤òɽ¼¨) +++", -1, 80, FONT_GREEN, 0, comms);
524
525         int yOffset;
526
527         // XXX: Magic number
528         for (int i = 0 ; i < 10 ; i++)
529         {
530                 if ((systemPlanet[i].messageSlot != -1) && (systemPlanet[i].missionCompleted == 0))
531                 {
532                         yOffset = systemPlanet[i].messageSlot * 60;
533                         gfx_drawRect(comms, 0, 105 + yOffset, comms->w - 1, 55, 0x00, 0x00, 0x77);
534                         gfx_blit(gfx_faceSprites[systemPlanet[i].faceImage], 20, 110 + yOffset, comms);
535                         gfx_renderString(systemPlanet[i].name, 80, 110 + yOffset, FONT_WHITE, 0, comms);
536                         gfx_renderString(systemPlanet[i].subject, 80, 130 + yOffset, FONT_CYAN, 0, comms);
537                 }
538         }
539
540         intermission_updateCommsSurface(comms);
541 }
542
543 static int intermission_renderDialog(SDL_Surface *comms, int y, int face, const char *string)
544 {
545         int newY;
546         gfx_blit(gfx_faceSprites[face], 10, y, comms);
547         newY = gfx_renderString(string, 80, y, FONT_WHITE, 1, comms) + 25;
548         if (newY < y + 60)
549                 newY += (60 - (newY - y));
550         return newY;
551 }
552
553 static void intermission_createMissionDetailSurface(SDL_Surface *comms, int missionSlot)
554 {
555         char name[50];
556         char string[2000];
557         int y = 50;
558         int mission = -1;
559
560         // XXX: Magic number
561         for (int i = 0 ; i < 10 ; i++)
562         {
563                 if ((systemPlanet[i].messageSlot == missionSlot) && (systemPlanet[i].missionCompleted == 0))
564                 {
565                         mission = systemPlanet[i].messageMission;
566                 }
567         }
568
569         if (mission == -1)
570                 return;
571
572         gfx_drawRect(comms, 0, 0, comms->w - 1, comms->h - 1, 0x00, 0x00, 0x25);
573
574         // XXX: The "name" should correspond with whatever name was presented in
575         // the screen listing all of the comms. For some reason, this has always
576         // been defined twice, which is redundant and has led to inconsistencies in
577         // the past.
578         switch (mission)
579         {
580                 case MISN_HAIL:
581                         strcpy(name, "¥¯¥é¥¹¡¦¥¿¥¤¥é¡¼");
582
583                         strcpy(string, "¤ª¤¤¡¢¾®ÁÎ! ¤ªÁ°¤Î¤¿¤á¤ËÅð¤ó¤Ç¤ä¤Ã¤¿¥Õ¥¡¥¤¥¢¥Õ¥é¥¤¤ÎÂå¶â¤¬¤Þ¤À¤À¤¾! ¤À¤¬¡¢¤½¤ÎÂå¤ï¤ê¤ËWEAPCO¤Î·±Îý¾ì¤Ø¹Ô¤Ã¤Æ¡¢¤½¤³¤ÇÁ´¤Æ¤Î´Ï¤òÇ˲õ¤·¤Æ¤¯¤ì¡£");
584                         y = intermission_renderDialog(comms, y, FS_KRASS, string);
585
586                         strcpy(string, "²¿? ¤½¤ì¤Ï²¶¤¬¤ªÁ°¤ËÍê¤ó¤À»Å»ö¤À¤í¤¦?");
587                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
588
589                         strcpy(string, "ʬ¤«¤Ã¤Æ¤¤¤ë¡£¤À¤¬¡¢¤³¤ÎÊýË¡¤Ê¤é¤ªÁ°¤Ï¤¹¤°¤Ë¼Ú¤ê¤òÊÖ¤»¤ë¤¾¡£¤³¤Î»Å»ö¤ò¤·¤Æ¡¢¤µ¤é¤Ë$500²Ô¤¤¤Ç¤³¤¤¡£¤³¤ì¤ÇÄ¢¾Ã¤·¤À¡£¤â¤·¤ªÁ°¤¬»à¤ó¤À¤é¡Ä¤½¤¦¤À¤Ê¡¢¤½¤Î´Ï¤Ë¤ÏÅð¤à¤À¤±¤Î²ÁÃͤ¬¤Ê¤«¤Ã¤¿¤Ã¤Æ¤³¤È¤À! ¥Ï¥Ã¥Ï¥Ã¥Ï¥Ã!");
590                         y = intermission_renderDialog(comms, y, FS_KRASS, string);
591
592                         strcpy(string, "ÁêÊѤï¤é¤º¿Í»È¤¤¤¬¹Ó¤¤¤Ê¡¢¥¯¥é¥¹¡£");
593                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
594
595                         break;
596
597                 case MISN_CERADSE:
598                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
599
600                         strcpy(string, "¤è¤ª¡¢¥·¥É¡£¤É¤¦¤«¤·¤¿¤«?");
601                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
602
603                         strcpy(string, "¥¯¥ê¥¹¡¢Í¢Á÷´Ï¤¬WEAPCO¤Ë½±¤ï¤ì¤¿¡£¤É¤¦¤ä¤é¥»¥é¥É¥»¤Ë°åÎÅÉʤò±¿¤ó¤Ç¤¤¤¿¤è¤¦¤À¡£Â¿¤¯¤ÎÌ¿¤òµß¤¦¤¿¤á¤ËÀѲ٤ò¼è¤êÌᤵ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤!");
604                         y = intermission_renderDialog(comms, y, FS_SID, string);
605
606                         strcpy(string, "¤¤¤¯¤Ä¤¢¤ë¤ó¤À?");
607                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
608
609                         strcpy(string, "Á´Éô¤Ç6¤Ä¤À! ¤â¤·1¤Ä¤Ç¤â¼º¤¨¤Ð¡¢¿ô¥ö·î¤ÎÆâ¤Ë¤³¤Î¥¹¥Ô¥ê¥Ã¥È·Ï¤Î¿Í¡¹¤¬²¿Àé¿Í¤â»à¤ó¤Ç¤·¤Þ¤¦¤À¤í¤¦¡£");
610                         y = intermission_renderDialog(comms, y, FS_SID, string);
611
612                         break;
613
614                 case MISN_HINSTAG:
615                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
616
617                         strcpy(string, "¤ª¤Ã¤È! ¥ß¥µ¥¤¥ëÄú¤«?");
618                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
619
620                         strcpy(string, "¤½¤¦¤À¡£¤É¤¦¤ä¤éWEAPCO¤Ï·¯¤Î¹ÔÆ°¤ËÃíÌܤ·»Ï¤á¤¿¤è¤¦¤À¤Ê¡£");
621                         y = intermission_renderDialog(comms, y, FS_SID, string);
622
623                         strcpy(string, "¤ª¤â¤·¤í¤¤! ¥Õ¥¡¥¤¥¢¥Õ¥é¥¤¤ÎÀïƮǽÎϤΥƥ¹¥È¤Ë¤Ô¤Ã¤¿¤ê¤À!");
624                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
625
626                         strcpy(string, "µ¤¤ò¤Ä¤±¤í¡¢¥¯¥ê¥¹¡£1ÀɤΥߥµ¥¤¥ëÄú¤Ç¤â¼çÍ×ÅÔ»Ô¤òÇ˲õ¤Ç¤­¤ë¤Û¤É¤Î¥í¥±¥Ã¥È¤òÅëºÜ¤·¤Æ¤¤¤ë¡£ÅÛ¤é¤Ë¤ÏÀµÌ̤«¤é¸þ¤«¤ï¤º¡¢½½Ê¬¤Êµ÷Î¥¤òÊݤơ£");
627                         y = intermission_renderDialog(comms, y, FS_SID, string);
628
629                         break;
630
631                 case MISN_JOLDAR:
632                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
633
634                         strcpy(string, "¥¸¥ç¥ë¥À¡¼¼þÊդε¡Íë¤ò½üµî¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£µ¡ÍëÃÏÂӤΤ»¤¤¤ÇÏÇÀ±´Ö¸òÄ̤¬Á˳²¤µ¤ì¤Æ¤¤¤ë¡£");
635                         y = intermission_renderDialog(comms, y, FS_SID, string);
636
637                         strcpy(string, "Âà¶þ¤·¤Î¤®¤Ë¤Ê¤ê¤½¤¦¤ÊÀïÆ®µ¡¤Ï¶á¤¯¤Ë¤¤¤Ê¤¤¤Î¤«?");
638                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
639
640                         strcpy(string, "º£¤Î½ê¤Ï¤Ê¡£¤À¤¬Åۤ餬°ú¤­´¹¤¨¤·¤Æ¤³¤Ê¤¤¤È¤Ï¸À¤¤ÀÚ¤ì¤Ê¤¤¡£µ¡Íë¤Ë¤Ïµ¤¤ò¤Ä¤±¤í! WEAPCO¤Î¿®¹æ¤òȯ¤·¤Æ¤¤¤Ê¤¤´Ï¤Ï¶á¤Å¤¤¤¿¤À¤±¤ÇÇúȯ¤¹¤ë¡£¼ÙËâ¤Ê¤é¤ÐÂǤÁÍî¤È¤»¡£");
641                         y = intermission_renderDialog(comms, y, FS_SID, string);
642
643                         break;
644
645                 case MISN_MOEBO:
646                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
647
648                         strcpy(string, "¶ÛµÞ»öÂÖ¤À! WEAPCO¤Ï²æ¡¹¤Î³èÆ°¤ò»ß¤á¤ë¤¿¤á¤Ë¥¹¥Ô¥ê¥Ã¥È¤òÇ˲õ¤·¤è¤¦¤È¤·¤Æ¤¤¤ë! ¤½¤ÎÇúȯ¤ÏÀ±·Ï¤ÎÁ´¤Æ¤ÎÏÇÀ±¤ò´¬¤­¹þ¤à¤À¤í¤¦! ¥Õ¥ê¥²¡¼¥È¤¬¼ÍÄøÆâ¤ËÆþ¤ëÁ°¤ËÇ˲õ¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤!");
649                         y = intermission_renderDialog(comms, y, FS_SID, string);
650
651                         strcpy(string, "ÃÜÀ¸¤á! º£¤¹¤°È¯¿Ê¤¹¤ë!");
652                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
653
654                         strcpy(string, "¥¯¥ê¥¹¡¢³§¤¬·¯¤Ë´üÂÔ¤·¤Æ¤¤¤ë! ¤À¤¬Ëº¤ì¤ë¤Ê - ÅÛ¤é¤Ï·è¤·¤Æ¡Ø¥¹¥¿¡¼¥­¥é¡¼¡Ù¤È¤Ï¸Æ¤Ð¤Ê¤¤¡£¤Ê¤¼¤Ê¤é¤½¤ì¤Ç¤Ï¤­¤ì¤¤²á¤®¤ë¤«¤é¤À!");
655                         y = intermission_renderDialog(comms, y, FS_SID, string);
656
657                         break;
658
659                 case MISN_RESCUESLAVES:
660                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
661
662                         strcpy(string, "ÃΤäƤÎÄ̤ꡢ¤³¤ÎÀ±·Ï¤Ë¤Ï¤¿¤¯¤µ¤ó¤ÎWEAPCO¤ÎÅÛÎ줬¤¤¤ë¡£Èà¤é¤ò²òÊü¤Ç¤­¤ì¤ÐÈ¿·â¤Î¤­¤Ã¤«¤±¤Ë¤Ê¤ë¤Ï¤º¤À¡£ÊѲ½¤¬¸½¤ì¤ë¤¿¤á¤Ë¤Ï¡¢250¿Í¤Ïµß½Ð¤¹¤ëɬÍפ¬¤¢¤ë¤À¤í¤¦¡£");
663                         y = intermission_renderDialog(comms, y, FS_SID, string);
664
665                         strcpy(string, "¤Û¤È¤ó¤É¤ÎÅÛÎì¤ÏºÎ·¡¤ò¤·¤Æ¤¤¤ë¤½¤¦¤À¤Ê¡£");
666                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
667
668                         strcpy(string, "¤½¤¦¤À¡£¤À¤¬¡¢ºÎ·¡½ê¤òľÀܹ¶·â¤¹¤ë¤Î¤Ï´í¸±¤À¡£ÅÛÎì¤ÎÈÂÆþ¤òÁ˻ߤ¹¤ë¤Î¤¬¤¤¤¤¤À¤í¤¦¡£¤¢¤¿¤ê¤òÈô¹Ô¤·¡¢WEAPCO¤Î¥Ñ¥È¥í¡¼¥ë¤ò·Þ·â¤·¤í¡£¤â¤Á¤í¤óÅÛÎìÁ¥¤ò¸î±Ò¤·¤Æ¤¤¤ë¤È¤Ï¸Â¤é¤Ê¤¤¡£½½Ê¬¤Ëµ¤¤ò¤Ä¤±¤í!!");
669                         y = intermission_renderDialog(comms, y, FS_SID, string);
670
671                         break;
672
673                 case MISN_NEROD:
674                         strcpy(name, "¥Õ¥§¡¼¥Ù¡¦¥ì¥Ã¥¯¥¹");
675
676                         strcpy(string, "½õ¤±¤Æ! SOS! Ã¯¤«Ê¹¤³¤¨¤Æ¤ë?!");
677                         y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
678
679                         strcpy(string, "¤è¤¯Ê¹¤³¤¨¤ë¤¾! ¤É¤¦¤·¤¿?");
680                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
681
682                         strcpy(string, "¤¢¤¢¡¢½õ¤«¤Ã¤¿¤ï! ¥Í¥í¥É¼þÊÕ¤ÇWEAPCO¤ÎÂç·³¤Ë°Ï¤Þ¤ì¤Æ¤¤¤ë¤Î! »Ù±ç¤ò!");
683                         y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
684
685                         strcpy(string, "¤¹¤°¸þ¤«¤¦!");
686                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
687
688                         break;
689
690                 case MISN_ALLEZ:
691                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
692
693                         strcpy(string, "º£¡¢Ê̤ÎSOS¤ò¼õ¿®¤·¤¿¡£½ÅÍפʰåÌôÉʤò±¿¤ÖÍ¢Á÷´Ï¤«¤é¤À¡£");
694                         y = intermission_renderDialog(comms, y, FS_SID, string);
695
696                         strcpy(string, "ʬ¤«¤Ã¤¿¡£¤¹¤°¸þ¤«¤¦¤ÈÅÁ¤¨¤Æ¤¯¤ì¡£");
697                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
698
699                         break;
700
701                 case MISN_URUSOR:
702                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
703
704                         strcpy(string, "¤³¤ÎÀ±·Ï¤òÎ¥¤ì¤ëÁ°¤Ë¤¤¤¯¤é¤«»ñ¸»¤ò³ÎÊݤ¹¤ëɬÍפ¬¤¢¤ë¡£¤½¤ì¤¬¤¢¤ì¤Ð¥â¥ë¥É¡¼¥ë·Ï¤Ç¤Î³èÆ°¤¬¤è¤ê´Êñ¤Ë¤Ê¤ë¤À¤í¤¦¡£ÌäÂê¤Ï¡¢¤³¤Î¤¢¤¿¤ê¤Ç¤ÏWEAPCO¤·¤«»ý¤Ã¤Æ¤Ê¤¤¤³¤È¤À¡£");
705                         y = intermission_renderDialog(comms, y, FS_SID, string);
706
707                         strcpy(string, "¤½¤ì¤Ç¤É¤³¤Ø¹Ô¤±¤Ð¼ê¤ËÆþ¤ë¤ó¤À?");
708                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
709
710                         strcpy(string, "¶á¤¯¤Ë¤½¤ÎÂç·¿Êäµë´Ï¤¬¤¤¤ë¡£»ä¤¬¹Ò¹ÔÉÔǽ¤Ë¤¹¤ë¡£·¯¤Ë¤Ï¤½¤Î´Ö¤Î±ç¸î¤ò¤¿¤Î¤à¡£");
711                         y = intermission_renderDialog(comms, y, FS_SID, string);
712
713                         strcpy(string, "ʬ¤«¤Ã¤¿!");
714                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
715
716                         break;
717
718                 case MISN_DORIM:
719                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
720
721                         strcpy(string, "WEAPCO¤Î²Ê³Ø¼Ô¤¬¥Ý¥Ã¥É¤ÇæÁö¤·¡¢¥¢¥¹¥Æ¥í¥¤¥É¥Ù¥ë¥È¤Ë±£¤ì¤Æ¤¤¤ë¤é¤·¤¤¡£µß½Ð¤Ç¤­¤ì¤Ð¥â¥ë¥É¡¼¥ë·Ï¤Î¾ðÊó¤òʹ¤±¤ë¤«¤â¤·¤ì¤Ê¤¤¡£");
722                         y = intermission_renderDialog(comms, y, FS_SID, string);
723
724                         strcpy(string, "¤¹¤°¹Ô¤³¤¦¡£");
725                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
726
727                         break;
728
729                 case MISN_ELAMALE:
730                         strcpy(name, "¥Õ¥§¡¼¥Ù¡¦¥ì¥Ã¥¯¥¹");
731
732                         strcpy(string, "²æ¡¹¤¬µß½Ð¤·¤¿ÅÛÎ줿¤Á¤¬È¿Íð¤òµ¯¤³¤·¤¿¤È¤Î¾ðÊó¤¬Æþ¤Ã¤¿¡£·×²è¤Ï¤¦¤Þ¤¯¿Ê¤ó¤Ç¤¤¤ë¤è¤¦¤À¡£");
733                         y = intermission_renderDialog(comms, y, FS_SID, string);
734
735                         strcpy(string, "WEAPCO¤Î̵¿ÍºÎ·¡Á¥¤¬¥¨¥é¥á¡¼¥ë¤Îµ°Æ»¾å¤Ë¤¢¤ë¤ï¡£¤³¤ì¤òÇ˲õ¤·¤Æ³ÉÍ𤹤ë¤Î¤Ï¤É¤¦?");
736                         y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
737
738                         strcpy(string, "¤¤¤¤¥¢¥¤¥Ç¥¢¤À!");
739                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
740
741                         strcpy(string, "¤½¤ì¤Ï¤¦¤Þ¤¯¹Ô¤¯¤À¤í¤¦¡£¤À¤¬ÌýÃǤ¹¤ë¤Ê¡£");
742                         y = intermission_renderDialog(comms, y, FS_SID, string);
743
744                         break;
745
746                 case MISN_CLOAKFIGHTER:
747                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
748
749                         strcpy(string, "»îºîÀïÆ®µ¡¤Î¤³¤È¤Ï²¿¤«Ê¬¤«¤Ã¤¿¤«?");
750                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
751
752                         strcpy(string, "¥ì¡¼¥À¡¼¤Ë±Ç¤é¤Ê¤¤¼×ÊÃÁõÃ֤ΰì¼ï¤òÅëºÜ¤·¤Æ¤¤¤ë¡£ÄÉÀפϺ¤Æñ¤À¡£");
753                         y = intermission_renderDialog(comms, y, FS_SID, string);
754
755                         strcpy(string, "¶öÁ³½Ð²ñ¤¦¤Þ¤ÇÈô¤Ó²ó¤ë¤·¤«¤Ê¤¤¤Ê¡£");
756                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
757
758                         strcpy(string, "¤¿¤È¤¨Áø¶ø¤·¤Æ¤âÁê¼ê¤Ïƨ¤²¤ë¤À¤í¤¦¡£¸«¤Ä¤±¤¿¤é²Äǽ¤Ê¸Â¤ê¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¤³¤È¤À¡£");
759                         y = intermission_renderDialog(comms, y, FS_SID, string);
760
761                         break;
762
763                 case MISN_ODEON:
764                         strcpy(name, "¥Õ¥§¡¼¥Ù¡¦¥ì¥Ã¥¯¥¹");
765
766                         strcpy(string, "»Ð¤µ¤ó¤Î´Ï¤ò¥ª¥Ç¥ª¥ó¤Îµ°Æ»¾å¤Ç¸«¤Ä¤±¤¿¡£¤Ç¤â¡¢¤³¤Á¤é¤ÎÄÌ¿®¤ò̵»ë¤·¤Æ¤¤¤ë¤Î¡£");
767                         y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
768
769                         strcpy(string, "·ù¤Êͽ´¶¤¬¤¹¤ë¤Ê¡£Èà½÷¤ÏWEAPCO¤Î½¸ÃĤÎÃæ¤ò¼«Í³¤Ë°ÜÆ°¤·¤Æ¤¤¤ë¡£");
770                         y = intermission_renderDialog(comms, y, FS_SID, string);
771
772                         strcpy(string, "¿²Ê֤俤Τ«?");
773                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
774
775                         strcpy(string, "¤¢¤ê¤¨¤Ê¤¤¡£WEAPCO¤ò¤È¤Æ¤âÁþ¤ó¤Ç¤¤¤¿¤â¤Î¡£");
776                         y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
777
778                         strcpy(string, "¥Þ¥¤¥ó¥É¥³¥ó¥È¥í¡¼¥ë¤Î°ì¼ï¤«¤â¤·¤ì¤Ê¤¤¡£WEAPCO¤¬ºÇ¶á¿·¤·¤¤¡ÖAI¥È¥ì¡¼¥Ë¥ó¥°¥×¥í¥°¥é¥à¡×¤ò³«È¯Ãæ¤À¤Èʹ¤¤¤¿¡£Á᤯½õ¤±¤¿¤Û¤¦¤¬Îɤ¤¤Ê!");
779                         y = intermission_renderDialog(comms, y, FS_SID, string);
780
781                         break;
782
783                 case MISN_FELLON:
784                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
785
786                         strcpy(string, "È¿Í𷳤ˤè¤ë¹¶·â¤Î·×²è¤¬¤¢¤ë¡£Èà¤é¤ò»Ù±ç¤·¾¡Íø¤Ç¤­¤ì¤Ð¡¢»Îµ¤¤ÏÂ礤¤Ë¹â¤Þ¤ë¤À¤í¤¦¡£");
787                         y = intermission_renderDialog(comms, y, FS_SID, string);
788
789                         strcpy(string, "¤¹¤²¤¨! ¤¹¤°½Ð·â¤À!");
790                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
791
792                         strcpy(string, "È¿Í𷳤δϤ¬Á´¤ÆÇ˲õ¤µ¤ì¤ë¤³¤È¤À¤±¤ÏÈò¤±¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£");
793                         y = intermission_renderDialog(comms, y, FS_SID, string);
794
795                         break;
796
797                 case MISN_SIVEDI:
798                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
799
800                         strcpy(string, "WEAPCO¤ÎºÎ·¡Á¥¤«¤éÃ¥¤¦¤Î¤Ï¡¢¤¢¤Þ¤ê¤è¤¤ÊýË¡¤Ç¤Ï¤Ê¤«¤Ã¤¿¡£¤À¤¬¡¢¤¢¤Î¥¢¥¹¥Æ¥í¥¤¥É¤Î¹ÛÀФÏÉð´ï¤ÎÀ¸»º¤ËɬÍפÀ¡£");
801                         y = intermission_renderDialog(comms, y, FS_SID, string);
802
803                         strcpy(string, "¤ª¤¤¤ª¤¤! ¤Ä¤Þ¤ê¡¢²¶¤Ë¼è¤ê¤Ë¹Ô¤±¤È¸À¤Ã¤Æ¤¤¤ë¤Î¤«?");
804                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
805
806                         strcpy(string, "¤½¤ÎÄ̤ê¤À¡£Ãí°Õ¤·¤í¡¢¥¯¥ê¥¹¡£·¯¤ÎÉð´ï¤Ï¤½¤Î¤è¤¦¤Êºî¶È¤Î¤¿¤á¤ËÀ߷פµ¤ì¤Æ¤¤¤Ê¤¤¡£");
807                         y = intermission_renderDialog(comms, y, FS_SID, string);
808
809                         break;
810
811                 case MISN_ALMARTHA:
812                         strcpy(name, "¥¯¥é¥¹¡¦¥¿¥¤¥é¡¼");
813
814                         strcpy(string, "¤ª¤¤¥¯¥é¥¹! ¼êÅÁ¤Ã¤Æ¤¯¤ì¡£¥Õ¥§¡¼¥Ù¤È¥¦¡¼¥·¥å¥é¤¬WEAPCO¤Î½ÅÍפʥץé¥ó¥È¤òÇ˲õ¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¡£¤Á¤ç¤Ã¤ÈÁû¤®¤òµ¯¤³¤·¤Æ¡¢¤³¤Á¤é¤ËÃí°Õ¤ò°ú¤­ÉÕ¤±¤é¤ì¤Ê¤¤¤«?");
815                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
816
817                         strcpy(string, "¤¤¤¤¤¾¡¢¾®ÁΡ£½õ¤±¤Æ¤ä¤í¤¦¡£¤À¤¬¡¢¶â¤À¡Ä");
818                         y = intermission_renderDialog(comms, y, FS_KRASS, string);
819
820                         break;
821
822                 case MISN_POSWIC:
823                         strcpy(name, "¥¦¡¼¥·¥å¥é¡¦¥ì¥Ã¥¯¥¹");
824
825                         strcpy(string, "µ­²±¤¬´°Á´¤ËÌá¤Ã¤¿¡£¤½¤³¤Ç¤ÏÌÌÇò¤¤¤³¤È¤¬¹Ô¤ï¤ì¤Æ¤¤¤¿¤¾¡£»ä¤¬Êá¤é¤¨¤é¤ì¤ëľÁ°¡¢WEAPCO¤¬²¿¿Í¤â¤Î½ÅÌò¤ò¥Ý¥¹¥¤¥Ã¥¯¤Ë°ÜÁ÷¤¹¤ë¤Î¤ò¸«¤¿¡£");
826                         y = intermission_renderDialog(comms, y, FS_URSULA, string);
827
828                         strcpy(string, "¤½¤Î¤è¤¦¤Ê¥Á¥ã¥ó¥¹¤ò¸«Æ¨¤¹¤ï¤±¤Ë¤Ï¤¤¤«¤Ê¤¤! »ä¤â¤½¤Î´Ï¤ò¹Ò¹ÔÉÔǽ¤Ë¤¹¤ë¤¿¤á¤Ë»²²Ã¤¹¤ë¡£");
829                         y = intermission_renderDialog(comms, y, FS_SID, string);
830
831                         strcpy(string, "Íê¤à¤¾!");
832                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
833
834                         break;
835
836                 case MISN_ELLESH:
837                         strcpy(name, "¥Õ¥§¡¼¥Ù¡¦¥ì¥Ã¥¯¥¹");
838
839                         strcpy(string, "¥Õ¥§¡¼¥Ù¡¢¤ªÁ°¤Ï¤³¤³¤ò¸«Ä¥¤Ã¤Æ¤Æ¤¯¤ì¡£²¶¤Ï¤¢¤Î´Ï¤òÄɤ¦!");
840                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
841
842                         strcpy(string, "Äɤ¤¤Ä¤±¤ë¤È»×¤Ã¤Æ¤ë¤Î?");
843                         y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
844
845                         strcpy(string, "¤â¤Á¤í¤ó¤À¡£¤³¤Î¥Õ¥¡¥¤¥¢¥Õ¥é¥¤¤Î¥¹¥Ô¡¼¥É¤¬¤¢¤ì¤Ð¤Ê¡£¤¹¤°¤Ë¸«¤»¤Æ¤ä¤ë¤è!");
846                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
847
848                         break;
849
850                 case MISN_PLUTO:
851                 case MISN_NEPTUNE:
852                 case MISN_URANUS:
853                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
854
855                         strcpy(string, "¤Þ¤º³°ÏÇÀ±¤òÀ©°µ¤·¡¢¤½¤³¤«¤éÀÚ¤ê¹þ¤à¡£¤½¤¦¤¹¤ì¤ÐºÇ¸å¤ÎºîÀï¤Î¤È¤­Î¾Â¦¤«¤é¶´¤Þ¤ì¤ë´í¸±À­¤¬¾®¤µ¤¯¤Ê¤ë¡£");
856                         y = intermission_renderDialog(comms, y, FS_SID, string);
857
858                         strcpy(string, "ʬ¤«¤Ã¤¿¡£");
859                         y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
860
861                         strcpy(string, "OK");
862                         y = intermission_renderDialog(comms, y, FS_URSULA, string);
863
864                         strcpy(string, "λ²ò¡£");
865                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
866
867                         break;
868
869                 case MISN_SATURN:
870                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
871
872                         strcpy(string, "WEAPCO¤ÏÅÚÀ±¤ÈÅ·²¦À±¤Î´Ö¤Ë¹âÅÙ¤ÊËɱҥ饤¥ó¤ò°ú¤¤¤Æ¤¤¤ë¡£¤³¤ì¤ò¼è¤ê½ü¤¯É¬Íפ¬¤¢¤ë¡£");
873                         y = intermission_renderDialog(comms, y, FS_SID, string);
874
875                         strcpy(string, "¤É¤Î¤è¤¦¤ÊËɱҥ·¥¹¥Æ¥à¤Ê¤Î¤À?");
876                         y = intermission_renderDialog(comms, y, FS_URSULA, string);
877
878                         strcpy(string, "¾®·¿¤ÎÊ£¿ô¤Î°ÜÆ°¤Ç¤­¤ë¥ì¡¼¥¶¡¼Ë¤¤Ç¹½À®¤µ¤ì¤Æ¤¤¤ë¡£¤«¤Ä¤Æ¥¹¥Ô¥ê¥Ã¥È·Ï¤ÇÀï¤Ã¤¿¥¹¥¿¡¼¥­¥é¡¼¤È¤ÏÁ´¤¯°Û¤Ê¤ë¼ïÎà¤Îʼ´ï¤À¡£");
879                         y = intermission_renderDialog(comms, y, FS_SID, string);
880
881                         strcpy(string, "¤Ê¤é¤Ð¡¢»ä¤Î¥ß¥µ¥¤¥ë¥é¥ó¥Á¥ã¡¼¤ò¤è¤¯ÅÀ¸¡¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Í!");
882                         y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
883
884                         break;
885
886                 case MISN_JUPITER:
887                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
888
889                         strcpy(string, "³§¤¬¤¤¤Ê¤¤´Ö¤Ë¡¢ÌÚÀ±¼þÊÕ¤«¤éµßÆñ¿®¹æ¤ò¼õ¿®¤·¤¿¡£");
890                         y = intermission_renderDialog(comms, y, FS_SID, string);
891
892                         strcpy(string, "ÂÀÍÛ·ÏÆâ¤Î郎¿®¹æ¤òÁ÷¤ëɬÍפ¬¤¢¤ë¤Î¤À?");
893                         y = intermission_renderDialog(comms, y, FS_URSULA, string);
894
895                         strcpy(string, "Ä´¤Ù¤Æ¤ß¤è¤¦¡£æ«¤«¤â¤·¤ì¤ó¤¬¡¢²¿¤È¤«¤Ê¤ë¤µ¡£");
896                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
897
898                         break;
899
900                 case MISN_MARS:
901                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
902
903                         strcpy(string, "¥¯¥ê¥¹¡¢¾¯¤·ÌäÂ꤬¤¢¤ë¡£WEAPCO¤Ï¥¢¥¹¥Æ¥í¥¤¥É¥Ù¥ë¥È¤Ëµ¡Í븶¤òÉߤ¤¤Æ¤¤¤ë¡£¤³¤ì¤ò¼è¤ê½ü¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£");
904                         y = intermission_renderDialog(comms, y, FS_SID, string);
905
906                         strcpy(string, "ʬ¤«¤Ã¤¿¡£°ÂÁ´¤ÊÆ»¤òºî¤ì¤¿¤éÏ¢Íí¤¹¤ë¡£");
907                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
908
909                         break;
910
911                 case MISN_EARTH:
912                         strcpy(name, "Á´°÷");
913
914                         strcpy(string, "¤è¤·¤ß¤ó¤Ê¡¢¤¤¤è¤¤¤è¤À¡£²¶¤¿¤Á¤Ï¶ì¤·¤¤Ãæ¤ò¤º¤Ã¤È¿Ê¤ó¤Ç¤­¤¿¡£Âफ¤ºÁ´¤Æ¤ÎÎϤÇÅÛ¤é¤ò᤯¤·¤«¤Ê¤¤!");
915                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
916
917                         strcpy(string, "°ú¤­ÊÖ¤¹¤Ë¤Ï±ó¤¹¤®¤ë½ê¤Þ¤ÇÍè¤Æ¤·¤Þ¤Ã¤¿¡£Á´°÷À¸¤­¤Æµ¢¤ë¤ó¤À!");
918                         y = intermission_renderDialog(comms, y, FS_SID, string);
919
920                         strcpy(string, "¹Ô¤­¤Þ¤·¤ç¤¦¡¢¥¯¥ê¥¹¡£");
921                         y = intermission_renderDialog(comms, y, FS_PHOEBE, string);
922
923                         strcpy(string, "WEAPCO¤Ë»ä¤ÎƬ¤òÁà¤Ã¤¿¤³¤È¤ò¸å²ù¤µ¤»¤Æ¤ä¤ë!");
924                         y = intermission_renderDialog(comms, y, FS_URSULA, string);
925
926                         break;
927
928                 case MISN_VENUS:
929                         strcpy(name, "¥·¥É¡¦¥¦¥£¥ë¥½¥ó");
930
931                         strcpy(string, "¥±¥¹¥é¥ó¤Ï¶âÀ±¤Øƨ¤²¤¿¡£²¶¤ÏÅÛ¤òÄɤ¦¡£");
932                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
933
934                         strcpy(string, "µ¤¤ò¤Ä¤±¤Æ¤¯¤ì¡¢¥¯¥ê¥¹¡£²æ¡¹¤ÏÀïÁè¤Ë¾¡Íø¤·¤¿¡£¤Ê¤Î¤Ë·¯¤Ë»à¤Ê¤ì¤¿¤È¤¢¤Ã¤Æ¤ÏÂѤ¨Æñ¤¤ÃÑ¿«¤À!");
935                         y = intermission_renderDialog(comms, y, FS_SID, string);
936
937                         break;
938
939                 default:
940                         strcpy(name, "ï¤â¤¤¤Ê¤¤");
941                         strcpy(string, "¤ª¤¤¡¢²¿¤Ç²¶¤Ï¼«Ê¬¤ËÏ䷤Ƥë¤ó¤À? ¤¢¤ê¤¨¤Ê¤¤! ¤³¤ì¤Ï¥Ð¥°¤À¡£");
942                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
943
944                         sprintf(string, "starfighter.nongnu.org¤Ø¹Ô¤Ã¤Æ¡¢¤³¤Î¥Ð¥°¤òÊó¹ð¤¹¤ëɬÍפ¬¤¢¤ë¤Ê¡£ºîÀïÈÖ¹æ%d¤ÇÌäÂêȯÀ¸¤À¡£", mission);
945                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
946
947                         strcpy(string, "ÂԤơ¢²¿¤òÏ䷤Ƥ¤¤ë¤ó¤À? Ã¯¤âʹ¤¤¤Æ¤¤¤Ê¤¤¤Ï¤º¤À¤¬¡Ä");
948                         y = intermission_renderDialog(comms, y, FS_CHRIS, string);
949         }
950
951         sprintf(string, "+++ %s¤È¤Î¸ò¿® +++", name);
952         gfx_renderString(string, -1, 20, FONT_GREEN, 0, comms);
953
954         gfx_drawRect(comms, 5, comms->h - 28, 180, 20, 0x25, 0x00, 0x00);
955         gfx_renderString("RETURN TO MISSIONS", 15, comms->h - 25, FONT_WHITE, 1, comms);
956
957         engine.commsSection = 1;
958 }
959
960 static void intermission_doComms(SDL_Surface *comms)
961 {
962         if ((engine.keyState[KEY_FIRE]))
963         {
964                 if (engine.commsSection == 0)
965                 {
966                         for (int i = 0 ; i < 4 ; i++)
967                         {
968                                 if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 170, 180 + (i * 60), 430, 50))
969                                 {
970                                         intermission_createMissionDetailSurface(comms, i);
971                                         engine.keyState[KEY_FIRE] = 0;
972                                 }
973                         }
974                 }
975                 else
976                 {
977                         if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 170, 440, 160, 20))
978                         {
979                                 intermission_createCommsSurface(comms);
980                                 engine.keyState[KEY_FIRE] = 0;
981                         }
982                 }
983         }
984 }
985
986 static void intermission_createOptions(SDL_Surface *optionsSurface)
987 {
988         SDL_FillRect(optionsSurface, NULL, black);
989
990         gfx_drawRect(optionsSurface, 0, 0, optionsSurface->w - 2, optionsSurface->h - 2, 0x00, 0x00, 0x44);
991
992         gfx_renderString("++ ¥ª¥×¥·¥ç¥ó ++", 105, 8, FONT_WHITE, 0, optionsSurface);
993
994         gfx_drawRect(optionsSurface, 190, 45, 50, 22, 0x00, 0x00, 0x00);
995         gfx_drawRect(optionsSurface, 250, 45, 50, 22, 0x00, 0x00, 0x00);
996         gfx_drawRect(optionsSurface, 20, 45, 150, 22, 0x00, 0x00, 0x00);
997         if (engine.useSound)
998                 gfx_drawRect(optionsSurface, 190, 45, 50, 22, 0xff, 0x00, 0x00);
999         else
1000                 gfx_drawRect(optionsSurface, 250, 45, 50, 22, 0xff, 0x00, 0x00);
1001         gfx_renderString("ON", 207, 50, FONT_WHITE, 0, optionsSurface);
1002         gfx_renderString("OFF", 263, 50, FONT_WHITE, 0, optionsSurface);
1003         gfx_renderString("¸ú²Ì²»", 30, 50, FONT_WHITE, 0, optionsSurface);
1004
1005         gfx_drawRect(optionsSurface, 190, 95, 50, 22, 0x00, 0x00, 0x00);
1006         gfx_drawRect(optionsSurface, 250, 95, 50, 22, 0x00, 0x00, 0x00);
1007         gfx_drawRect(optionsSurface, 20, 95, 150, 22, 0x00, 0x00, 0x00);
1008         if (engine.useMusic)
1009                 gfx_drawRect(optionsSurface, 190, 95, 50, 22, 0xff, 0x00, 0x00);
1010         else
1011                 gfx_drawRect(optionsSurface, 250, 95, 50, 22, 0xff, 0x00, 0x00);
1012         gfx_renderString("ON", 207, 100, FONT_WHITE, 0, optionsSurface);
1013         gfx_renderString("OFF", 263, 100, FONT_WHITE, 0, optionsSurface);
1014         gfx_renderString("²»³Ú", 30, 100, FONT_WHITE, 0, optionsSurface);
1015
1016         gfx_drawRect(optionsSurface, 190, 145, 50, 22, 0x00, 0x00, 0x00);
1017         gfx_drawRect(optionsSurface, 250, 145, 50, 22, 0x00, 0x00, 0x00);
1018         gfx_drawRect(optionsSurface, 20, 145, 150, 22, 0x00, 0x00, 0x00);
1019         if (engine.fullScreen)
1020                 gfx_drawRect(optionsSurface, 190, 145, 50, 22, 0xff, 0x00, 0x00);
1021         else
1022                 gfx_drawRect(optionsSurface, 250, 145, 50, 22, 0xff, 0x00, 0x00);
1023         gfx_renderString("ON", 207, 150, FONT_WHITE, 0, optionsSurface);
1024         gfx_renderString("OFF", 263, 150, FONT_WHITE, 0, optionsSurface);
1025         gfx_renderString("¥Õ¥ë¥¹¥¯¥ê¡¼¥ó", 30, 150, FONT_WHITE, 0, optionsSurface);
1026 }
1027
1028 static void intermission_doOptions(SDL_Surface *optionsSurface)
1029 {
1030         if ((engine.keyState[KEY_FIRE]))
1031         {
1032                 if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 417, 172, 45, 22))
1033                         engine.useSound = true;
1034
1035                 if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 478, 172, 45, 22))
1036                         engine.useSound = false;
1037
1038
1039                 if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 417, 222, 45, 22))
1040                 {
1041                         engine.useMusic = true;
1042                         audio_playMusic("music/through_space.ogg", -1);
1043                 }
1044
1045                 if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 478, 222, 45, 22))
1046                 {
1047                         engine.useMusic = false;
1048                         audio_haltMusic();
1049                 }
1050
1051                 if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 417, 272, 45, 22))
1052                 {
1053                         if (!engine.fullScreen)
1054                         {
1055                                 SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
1056                                 engine.fullScreen = true;
1057                         }
1058                 }
1059
1060                 if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 478, 272, 45, 22))
1061                 {
1062                         if (engine.fullScreen)
1063                         {
1064                                 SDL_SetWindowFullscreen(window, 0);
1065                                 engine.fullScreen = false;
1066                         }
1067                 }
1068
1069                 intermission_createOptions(optionsSurface);
1070         }
1071 }
1072
1073 /*
1074 Controls the entire intermission screen. This simply draws a background,
1075 stars, gridlines and the icons at the bottom of the screen. Will call
1076 (and continue to call) the specified functions when the player has
1077 selected an icon.
1078 */
1079 int intermission()
1080 {
1081         int iconInfoY;
1082
1083         char string[25];
1084
1085         SDL_Rect r;
1086         SDL_Rect destRect;
1087         int distance = 0;
1088         double interceptionChance;
1089
1090         int section = 1;
1091
1092         float sinX = 300;
1093         float cosY = 300;
1094         bool movePlanets = true;
1095         int saveSlot = -1;
1096
1097         int rtn = 0;
1098
1099         bool redrawBackground = true;
1100
1101         gfx_free();
1102
1103         checkForBossMission(); // double check just to make sure!
1104
1105         // Tell the game we are not in a mission so
1106         // do not perform certain keyboard actions
1107         engine.gameSection = SECTION_INTERMISSION;
1108
1109         screen_clear(black);
1110         renderer_update();
1111         screen_clear(black);
1112
1113         initSaveSlots();
1114
1115         loadBackground(systemBackground[game.system]);
1116
1117         engine.cursor_x = screen->w / 2;
1118         engine.cursor_y = screen->h / 2;
1119         gfx_sprites[SP_CURSOR] = gfx_loadImage("gfx/cursor.png");
1120
1121         // Icons
1122         gfx_sprites[SP_START_MISSION] = gfx_loadImage("gfx/icon1.png");
1123         gfx_sprites[SP_MAP] = gfx_loadImage("gfx/icon2.png");
1124         gfx_sprites[SP_STATUS] = gfx_loadImage("gfx/icon3.png");
1125         gfx_sprites[SP_SAVE] = gfx_loadImage("gfx/icon4.png");
1126         gfx_sprites[SP_SHOP] = gfx_loadImage("gfx/icon5.png");
1127         gfx_sprites[SP_COMM] = gfx_loadImage("gfx/icon6.png");
1128         gfx_sprites[SP_OPTIONS] = gfx_loadImage("gfx/icon7.png");
1129         gfx_sprites[SP_EXIT] = gfx_loadImage("gfx/icon8.png");
1130         gfx_sprites[SP_PLASMA_MAX_OUTPUT] = gfx_loadImage("gfx/icon9.png");
1131         gfx_sprites[SP_PLASMA_MAX_POWER] = gfx_loadImage("gfx/icon10.png");
1132         gfx_sprites[SP_PLASMA_MAX_RATE] = gfx_loadImage("gfx/icon11.png");
1133         gfx_sprites[SP_PLASMA_AMMO] = gfx_loadImage("gfx/icon12.png");
1134         gfx_sprites[SP_ROCKET_AMMO] = gfx_loadImage("gfx/icon13.png");
1135         gfx_sprites[SP_PLASMA_MIN_OUTPUT] = gfx_loadImage("gfx/icon14.png");
1136         gfx_sprites[SP_PLASMA_MIN_POWER] = gfx_loadImage("gfx/icon15.png");
1137         gfx_sprites[SP_PLASMA_MIN_RATE] = gfx_loadImage("gfx/icon16.png");
1138         gfx_sprites[SP_PLASMA_MAX_AMMO] = gfx_loadImage("gfx/icon17.png");
1139         gfx_sprites[SP_ROCKET_MAX_AMMO] = gfx_loadImage("gfx/icon18.png");
1140         gfx_sprites[SP_DOUBLE_ROCKETS] = gfx_loadImage("gfx/icon19.png");
1141         gfx_sprites[SP_MICRO_ROCKETS] = gfx_loadImage("gfx/icon20.png");
1142         gfx_sprites[SP_LASER] = gfx_loadImage("gfx/icon21.png");
1143         gfx_sprites[SP_HOMING_MISSILE] = gfx_loadImage("gfx/icon22.png");
1144         gfx_sprites[SP_CHARGER] = gfx_loadImage("gfx/icon23.png");
1145         gfx_sprites[SP_DOUBLE_HOMING_MISSILES] = gfx_loadImage("gfx/icon24.png");
1146         gfx_sprites[SP_MICRO_HOMING_MISSILES] = gfx_loadImage("gfx/icon25.png");
1147         gfx_sprites[SP_GOTO] = gfx_loadImage("gfx/icon26.png");
1148         gfx_sprites[SP_BUY] = gfx_loadImage("gfx/buyIcon.png");
1149         gfx_sprites[SP_SELL] = gfx_loadImage("gfx/sellIcon.png");
1150         gfx_sprites[SP_FIREFLY] = gfx_loadImage("gfx/firefly1.png");
1151
1152         // Planets 30 - 39
1153         gfx_sprites[SP_SUN] = gfx_loadImage("gfx/planet_sun.png");
1154         gfx_sprites[SP_PLANET_GREEN] = gfx_loadImage("gfx/planet_green.png");
1155         gfx_sprites[SP_PLANET_BLUE] = gfx_loadImage("gfx/planet_blue.png");
1156         gfx_sprites[SP_PLANET_RED] = gfx_loadImage("gfx/planet_red.png");
1157         gfx_sprites[SP_PLANET_ORANGE] = gfx_loadImage("gfx/planet_orange.png");
1158
1159         // Faces
1160         gfx_faceSprites[FS_CHRIS] = gfx_loadImage("gfx/face_chris.png");
1161         gfx_faceSprites[FS_SID] = gfx_loadImage("gfx/face_sid.png");
1162         gfx_faceSprites[FS_KRASS] = gfx_loadImage("gfx/face_krass.png");
1163         gfx_faceSprites[FS_PHOEBE] = gfx_loadImage("gfx/face_phoebe.png");
1164         gfx_faceSprites[FS_URSULA] = gfx_loadImage("gfx/face_ursula.png");
1165         gfx_faceSprites[FS_KLINE] = gfx_loadImage("gfx/face_kline.png");
1166         gfx_faceSprites[FS_CREW] = gfx_loadImage("gfx/face_crew.png");
1167
1168         engine.done = 0;
1169         engine.keyState[KEY_FIRE] = 0;
1170         engine.ssx = 0;
1171         engine.ssy = 0;
1172
1173         intermission_setStatusLines();
1174         initShop();
1175         intermission_setSystemPlanets();
1176
1177         SDL_Surface *statsSurface = gfx_createAlphaRect(600, 330, 0x00, 0x00, 0x99);
1178         SDL_Surface *savesSurface = gfx_createSurface(350, 300);
1179         SDL_Surface *optionsSurface = gfx_createSurface(320, 240);
1180         SDL_Surface *commsSurface = gfx_createSurface(450, 400);
1181
1182         createSavesSurface(savesSurface, -1);
1183         intermission_createOptions(optionsSurface);
1184         intermission_createCommsSurface(commsSurface);
1185
1186         // Remove the Supercharge, if it is there
1187         if ((game.difficulty != DIFFICULTY_EASY) &&
1188                 (game.difficulty != DIFFICULTY_ORIGINAL))
1189         {
1190                 weapon[W_PLAYER_WEAPON].reload[0] = MAX(
1191                         weapon[W_PLAYER_WEAPON].reload[0],
1192                         rate2reload[game.maxPlasmaRate]);
1193                 weapon[W_PLAYER_WEAPON].ammo[0] = MIN(weapon[W_PLAYER_WEAPON].ammo[0],
1194                         game.maxPlasmaOutput);
1195                 weapon[W_PLAYER_WEAPON].damage = MIN(weapon[W_PLAYER_WEAPON].damage,
1196                         game.maxPlasmaDamage);
1197         }
1198
1199         switch (game.system)
1200         {
1201                 case SYSTEM_SPIRIT:
1202                         if (game.difficulty == DIFFICULTY_ORIGINAL)
1203                                 interceptionChance = 0;
1204                         else
1205                                 interceptionChance = 1. / 600.;
1206                         break;
1207                 case SYSTEM_EYANANTH:
1208                         interceptionChance = 1. / 300.;
1209                         break;
1210                 case SYSTEM_MORDOR:
1211                         interceptionChance = 1. / 150.;
1212                         break;
1213                 case SYSTEM_SOL:
1214                         // There is no chance of being interceptted after the final attack on Earth
1215                         if ((game.system == SYSTEM_SOL) && (systemPlanet[2].missionCompleted))
1216                                 interceptionChance = 0;
1217                         else
1218                                 interceptionChance = 1. / 100.;
1219                         break;
1220                 default:
1221                         interceptionChance = 0;
1222         }
1223
1224         if ((engine.useAudio) && (engine.useMusic))
1225                 audio_playMusic("music/through_space.ogg", -1);
1226
1227         sprintf(string, "À±·Ï : %s·Ï", systemNames[game.system]);
1228         gfx_createTextObject(TS_CURRENT_SYSTEM, string, -1, 15, FONT_WHITE);
1229
1230         iconInfoY = 545;
1231
1232         gfx_createTextObject(TS_INFO_START_MISSION, "¼¡¤ÎºîÀï¤ò³«»Ï", -1, iconInfoY, FONT_WHITE);
1233         gfx_createTextObject(TS_INFO_GOTO, "ÌÜŪ¤ÎÏÇÀ±¤Ø¸þ¤«¤¦", -1, iconInfoY, FONT_WHITE);
1234         gfx_createTextObject(TS_INFO_MAP, "À±·Ï¥Þ¥Ã¥×", -1, iconInfoY, FONT_WHITE);
1235         gfx_createTextObject(TS_INFO_STATUS, "Åý·×", -1, iconInfoY, FONT_WHITE);
1236         gfx_createTextObject(TS_INFO_SAVE_GAME, "¥²¡¼¥à¤òÊݸ", -1, iconInfoY, FONT_WHITE);
1237         gfx_createTextObject(TS_INFO_SHOP, "¥Õ¥¡¥¤¥¢¥Õ¥é¥¤¤ò¶¯²½", -1, iconInfoY, FONT_WHITE);
1238         gfx_createTextObject(TS_INFO_COMMS, "ºîÀï", -1, iconInfoY, FONT_WHITE);
1239         gfx_createTextObject(TS_INFO_OPTIONS, "¥ª¥×¥·¥ç¥ó", -1, iconInfoY, FONT_WHITE);
1240         gfx_createTextObject(TS_INFO_EXIT, "¥¿¥¤¥È¥ë¤ËÌá¤ë", -1, iconInfoY, FONT_WHITE);
1241
1242         sprintf(string, "¸½ºß°ÌÃÖ: %s ¥¹¥Æ¡¼¥·¥ç¥ó", systemPlanet[game.stationedPlanet].name);
1243         gfx_createTextObject(TS_CURRENT_PLANET, string, 90, 450, FONT_WHITE);
1244
1245         if (game.destinationPlanet > -1)
1246                 sprintf(string, "ÌÜŪÃÏ: %s", systemPlanet[game.destinationPlanet].name);
1247         else
1248                 strcpy(string, "ÌÜŪÃÏ: ¤Ê¤·");
1249         gfx_createTextObject(TS_DEST_PLANET, string, 550, 450, FONT_WHITE);
1250
1251         if (game.distanceCovered > 0)
1252                 section = 0;
1253         else
1254                 player.shield = player.maxShield;
1255
1256         flushInput();
1257         engine.keyState[KEY_FIRE] = engine.keyState[KEY_ALTFIRE] = 0;
1258         engine.done = 0;
1259
1260         while (!engine.done)
1261         {
1262                 renderer_update();
1263
1264                 if (redrawBackground)
1265                 {
1266                         screen_drawBackground();
1267                         redrawBackground = false;
1268                 }
1269                 else
1270                 {
1271                         screen_unBuffer();
1272                 }
1273
1274                 game_doStars();
1275
1276                 r.x = 0;
1277                 r.y = 0;
1278                 r.h = screen->h;
1279                 r.w = 1;
1280                 for (int i = 40 ; i < screen->w ; i+= 40)
1281                 {
1282                         r.x = i;
1283                         SDL_FillRect(screen, &r, darkerBlue);
1284                 }
1285
1286                 r.x = 0;
1287                 r.y = 0;
1288                 r.h = 1;
1289                 r.w = screen->w;
1290                 for (int i = 40 ; i < screen->h ; i+= 40)
1291                 {
1292                         r.y = i;
1293                         SDL_FillRect(screen, &r, darkerBlue);
1294                 }
1295
1296
1297                 if (rand() % 1000 < 2)
1298                 {
1299                         engine.ssx = RANDRANGE(-100, 100);
1300                         engine.ssy = RANDRANGE(-100, 100);
1301                         engine.ssx /= 100;
1302                         engine.ssy /= 100;
1303                 }
1304
1305                 screen_blitText(TS_CURRENT_SYSTEM);
1306
1307                 switch(section)
1308                 {
1309                         case 0:
1310                                 if (game.stationedPlanet == game.destinationPlanet)
1311                                 {
1312                                         game.area = systemPlanet[game.stationedPlanet].missionNumber;
1313                                         rtn = 2;
1314                                         engine.done = 1;
1315                                 }
1316                                 else
1317                                 {
1318                                         distance = abs(game.stationedPlanet - game.destinationPlanet);
1319                                         if (interceptionChance <= 0)
1320                                                 distance = 1;
1321
1322                                         distance = (5 / distance);
1323                                         if (distance < 1)
1324                                                 distance = 1;
1325
1326                                         gfx_createTextObject(TS_CURRENT_PLANET, systemPlanet[game.stationedPlanet].name,
1327                                                 135, 480, FONT_WHITE);
1328                                         gfx_createTextObject(TS_DEST_PLANET, systemPlanet[game.destinationPlanet].name,
1329                                                 635, 480, FONT_WHITE);
1330
1331                                         section = 8;
1332
1333                                         destRect.x = 180;
1334                                         destRect.y = 450;
1335                                         destRect.w = 1;
1336                                         if (game.distanceCovered > 0)
1337                                                 destRect.w = game.distanceCovered;
1338                                         destRect.h = 20;
1339                                 }
1340                                 break;
1341
1342                         case 1:
1343                                 if (engine.keyState[KEY_ALTFIRE])
1344                                 {
1345                                         movePlanets = !movePlanets;
1346                                         engine.keyState[KEY_ALTFIRE] = 0;
1347                                 }
1348
1349                                 if (movePlanets)
1350                                 {
1351                                         sinX += 0.01;
1352                                         cosY += 0.01;
1353                                 }
1354
1355                                 if (intermission_showSystem(sinX, cosY, true))
1356                                 {
1357                                         sprintf(string, "ÌÜŪÃÏ: %s", systemPlanet[game.destinationPlanet].name);
1358                                         gfx_createTextObject(TS_DEST_PLANET, string, 550, 450, FONT_WHITE);
1359                                 }
1360
1361                                 screen_blitText(TS_CURRENT_PLANET);
1362                                 if (game.stationedPlanet != game.destinationPlanet)
1363                                         screen_blitText(TS_DEST_PLANET);
1364                                 break;
1365
1366                         case 2:
1367                                 intermission_showStatus(statsSurface);
1368                                 break;
1369
1370                         case 3:
1371                                 screen_blit(savesSurface, 200, 100);
1372                                 saveSlot = showSaveSlots(savesSurface, saveSlot);
1373                                 break;
1374
1375                         case 4:
1376                                 showShop();
1377                                 break;
1378
1379                         case 5:
1380                                 screen_blit(commsSurface, 170, 70);
1381                                 intermission_doComms(commsSurface);
1382                                 break;
1383
1384                         case 6:
1385                                 screen_blit(optionsSurface, 230, 130);
1386                                 intermission_doOptions(optionsSurface);
1387                                 break;
1388
1389                         case 7:
1390                                 rtn = 0;
1391                                 engine.done = 1;
1392                                 break;
1393
1394                         case 8:
1395                                 intermission_showSystem(sinX, cosY, false);
1396
1397                                 screen_blit(systemPlanet[game.stationedPlanet].image, 150, 450);
1398                                 screen_blitText(TS_CURRENT_PLANET);
1399                                 screen_blit(systemPlanet[game.destinationPlanet].image, 650, 450);
1400                                 screen_blitText(TS_DEST_PLANET);
1401
1402                                 destRect.w += distance;
1403                                 SDL_FillRect(screen, &destRect, red);
1404
1405                                 if (destRect.w >= 450)
1406                                 {
1407                                         game.stationedPlanet = game.destinationPlanet;
1408                                         game.distanceCovered = 0;
1409                                         player.shield = player.maxShield;
1410                                         sprintf(string, "¸½ºß°ÌÃÖ: %s ¥¹¥Æ¡¼¥·¥ç¥ó",
1411                                                 systemPlanet[game.stationedPlanet].name);
1412                                         strcpy(game.stationedName,
1413                                                 systemPlanet[game.stationedPlanet].name);
1414                                         gfx_createTextObject(TS_CURRENT_PLANET, string, 90, 450, FONT_WHITE);
1415                                         intermission_updateCommsSurface(commsSurface);
1416                                         section = 1;
1417                                         redrawBackground = true;
1418                                         saveGame(0);
1419                                 }
1420                                 else if (interceptionChance > 0)
1421                                 {
1422                                         if (CHANCE(interceptionChance))
1423                                         {
1424                                                 game.area = MISN_INTERCEPTION;
1425                                                 rtn = 2;
1426                                                 engine.done = 1;
1427                                                 game.distanceCovered = destRect.w;
1428                                         }
1429                                 }
1430
1431                                 break;
1432                 }
1433
1434                 screen_addBuffer(300, 545, 200, 15);
1435
1436                 if (section != 8)
1437                 {
1438                         if ((game.stationedPlanet == game.destinationPlanet) &&
1439                                         (!systemPlanet[game.stationedPlanet].missionCompleted))
1440                                 screen_blit(gfx_sprites[SP_START_MISSION], 80, 500);
1441                         else if (game.stationedPlanet != game.destinationPlanet)
1442                                 screen_blit(gfx_sprites[SP_GOTO], 80, 500);
1443
1444                         screen_blit(gfx_sprites[SP_MAP], 170, 500);
1445                         screen_blit(gfx_sprites[SP_STATUS], 260, 500);
1446                         screen_blit(gfx_sprites[SP_SAVE], 350, 500);
1447                         screen_blit(gfx_sprites[SP_SHOP], 440, 500);
1448                         screen_blit(gfx_sprites[SP_COMM], 530, 500);
1449                         screen_blit(gfx_sprites[SP_OPTIONS], 620, 500);
1450                         screen_blit(gfx_sprites[SP_EXIT], 710, 500);
1451
1452                         if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 80, 500, 32, 32) &&
1453                                         ((game.stationedPlanet != game.destinationPlanet) ||
1454                                                 (!systemPlanet[game.stationedPlanet].missionCompleted)))
1455                         {
1456                                 if (game.stationedPlanet == game.destinationPlanet)
1457                                         screen_blitText(TS_INFO_START_MISSION);
1458                                 else
1459                                         screen_blitText(TS_INFO_GOTO);
1460
1461                                 if ((engine.keyState[KEY_FIRE]))
1462                                 {
1463                                         redrawBackground = true;
1464                                         section = 0;
1465                                         engine.keyState[KEY_FIRE] = 0;
1466                                 }
1467                         }
1468                         else if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 170, 500, 32, 32))
1469                         {
1470                                 screen_blitText(TS_INFO_MAP);
1471
1472                                 if ((engine.keyState[KEY_FIRE]))
1473                                 {
1474                                         redrawBackground = true;
1475                                         section = 1;
1476                                         engine.keyState[KEY_FIRE] = 0;
1477                                 }
1478                         }
1479                         else if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 260, 500, 32, 32))
1480                         {
1481                                 screen_blitText(TS_INFO_STATUS);
1482
1483                                 if ((engine.keyState[KEY_FIRE]))
1484                                 {
1485                                         redrawBackground = true;
1486                                         section = 2;
1487                                         engine.keyState[KEY_FIRE] = 0;
1488                                 }
1489                         }
1490                         else if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 350, 500, 32, 32))
1491                         {
1492                                 screen_blitText(TS_INFO_SAVE_GAME);
1493
1494                                 if ((engine.keyState[KEY_FIRE]))
1495                                 {
1496                                         redrawBackground = true;
1497                                         section = 3;
1498                                         engine.keyState[KEY_FIRE] = 0;
1499                                 }
1500                         }
1501                         else if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 440, 500, 32, 32))
1502                         {
1503                                 screen_blitText(TS_INFO_SHOP);
1504
1505                                 if ((engine.keyState[KEY_FIRE]))
1506                                 {
1507                                         redrawBackground = true;
1508                                         section = 4;
1509                                         engine.keyState[KEY_FIRE] = 0;
1510                                 }
1511                         }
1512                         else if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 530, 500, 32, 32))
1513                         {
1514                                 screen_blitText(TS_INFO_COMMS);
1515
1516                                 if ((engine.keyState[KEY_FIRE]))
1517                                 {
1518                                         redrawBackground = true;
1519                                         section = 5;
1520                                         engine.keyState[KEY_FIRE] = 0;
1521                                 }
1522                         }
1523                         else if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 620, 500, 32, 32))
1524                         {
1525                                 screen_blitText(TS_INFO_OPTIONS);
1526
1527                                 if ((engine.keyState[KEY_FIRE]))
1528                                 {
1529                                         redrawBackground = true;
1530                                         section = 6;
1531                                         engine.keyState[KEY_FIRE] = 0;
1532                                 }
1533                         }
1534                         else if (game_collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 710, 500, 32, 32))
1535                         {
1536                                 screen_blitText(TS_INFO_EXIT);
1537
1538                                 if ((engine.keyState[KEY_FIRE]))
1539                                 {
1540                                         redrawBackground = true;
1541                                         section = 7;
1542                                         engine.keyState[KEY_FIRE] = 0;
1543                                 }
1544                         }
1545                 }
1546
1547                 engine.keyState[KEY_FIRE] = 0;
1548                 engine.keyState[KEY_ALTFIRE] = 0;
1549                 intermission_doCursor();
1550
1551                 game_delayFrame();
1552         }
1553
1554         audio_haltMusic();
1555         SDL_FreeSurface(statsSurface);
1556         SDL_FreeSurface(savesSurface);
1557         SDL_FreeSurface(optionsSurface);
1558         SDL_FreeSurface(commsSurface);
1559
1560         if (game.distanceCovered == 0)
1561                 player.shield = player.maxShield;
1562
1563         return rtn;
1564 }
1565