FS2_Open
Open source remastering of the Freespace 2 engine
cutscenes.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #include "cutscene/cutscenes.h"
13 #include "freespace2/freespace.h"
15 #include "gamesnd/gamesnd.h"
16 #include "globalincs/alphacolors.h"
17 #include "io/key.h"
18 #include "localization/localize.h"
19 #include "menuui/mainhallmenu.h"
20 #include "movie.h"
21 #include "parse/parselo.h"
22 #include "popup/popup.h"
23 #include "ui/ui.h"
24 
25 
26 extern int Cmdline_nomovies;
27 
28 
30  "ViewFootage",
31  "2_ViewFootage"
32 };
34  "ViewFootage-m",
35  "2_ViewFootage-m"
36 };
37 
40 
42 {
43  for(SCP_vector<cutscene_info>::iterator cut = Cutscenes.begin(); cut != Cutscenes.end(); ++cut)
44  if(cut->description != NULL) {
45  vm_free(cut->description);
46  cut->description = NULL;
47  }
48 }
49 
50 // initialization stuff for cutscenes
52 {
53  atexit(cutscene_close);
54  char buf[MULTITEXT_LENGTH];
55  cutscene_info cutinfo;
56 
57  try
58  {
59  read_file_text("cutscenes.tbl", CF_TYPE_TABLES);
60  reset_parse();
61 
62  // parse in all the cutscenes
63  Cutscenes.clear();
64  skip_to_string("#Cutscenes");
66 
67  bool isFirstCutscene = true;
68 
69  while (required_string_either("#End", "$Filename:"))
70  {
71  required_string("$Filename:");
73 
74  required_string("$Name:");
76 
77  required_string("$Description:");
78  stuff_string(buf, F_MULTITEXT, sizeof(buf));
79  drop_white_space(buf);
81  cutinfo.description = vm_strdup(buf);
82 
83  if (optional_string("$cd:"))
84  stuff_int(&cutinfo.cd);
85  else
86  cutinfo.cd = 0;
87 
88  cutinfo.viewable = false;
89 
90  if (isFirstCutscene) {
91  isFirstCutscene = false;
92  // The original code assumes the first movie is the intro, so always viewable
93  cutinfo.viewable = true;
94  }
95 
96  if (optional_string("$Always Viewable:")) {
97  stuff_boolean(&cutinfo.viewable);
98  }
99 
100  Cutscenes.push_back(cutinfo);
101  }
102 
103  required_string("#End");
104  }
105  catch (const parse::ParseException& e)
106  {
107  mprintf(("TABLES: Unable to parse '%s'! Error message = %s.\n", "cutscenes.tbl", e.what()));
108  return;
109  }
110 }
111 
112 // function to return 0 based index of which CD a particular movie is on
113 // returns -1 on failure.
115 {
116  for (SCP_vector<cutscene_info>::iterator cut = Cutscenes.begin(); cut != Cutscenes.end(); ++cut) {
117  if ( !stricmp(cut->filename, filename) ) {
118  return (cut->cd - 1);
119  }
120  }
121 
122  return -1;
123 }
124 
125 // marks a cutscene as viewable
127 {
128  char cut_file[MAX_FILENAME_LEN];
129  char file[MAX_FILENAME_LEN];
130 
131  Assert(filename!=NULL);
132 
133  // strip off extension
134  strcpy_s( file, filename );
135  char *p = strchr( file, '.' );
136  if ( p ) {
137  *p = 0;
138  }
139 
140  // change to lower case
141  strlwr(file);
142  int i = 0;
143  for (SCP_vector<cutscene_info>::iterator cut = Cutscenes.begin(); cut != Cutscenes.end(); ++cut) {
144  // change the cutscene file name to lower case
145  strcpy_s(cut_file, cut->filename);
146  strlwr(cut_file);
147 
148  // see if the stripped filename matches the cutscene filename
149  if ( strstr(cut_file, file) != NULL ) {
150  cut->viewable = true;
151  return;
152  }
153  i++;
154  }
155 
156  Warning(LOCATION, "Could not find cutscene '%s' in listing; cannot mark it viewable...", filename);
157 }
158 
159 #define NUM_BUTTONS 8
160 
161 #define TECH_DATABASE_BUTTON 0
162 #define SIMULATOR_BUTTON 1
163 #define CUTSCENES_BUTTON 2
164 #define CREDITS_BUTTON 3
165 
166 #define SCROLL_UP_BUTTON 4
167 #define SCROLL_DOWN_BUTTON 5
168 #define PLAY_BUTTON 6
169 #define EXIT_BUTTON 7
170 
171 static SCP_vector<int> Cutscene_list;
172 //static int Stats_scroll_offset; // not used - taylor
173 static int Selected_line = 0; // line that is currently selected for binding
174 static int Scroll_offset;
175 static int Background_bitmap;
176 static UI_BUTTON List_region;
177 static UI_WINDOW Ui_window;
178 
179 static ui_button_info Buttons[GR_NUM_RESOLUTIONS][NUM_BUTTONS] = {
180  { // GR_640
181  ui_button_info("TDB_00", 7, 3, 37, 7, 0), // tech database 1
182  ui_button_info("TDB_01", 7, 18, 37, 23, 1), // tech database 2
183  ui_button_info("TDB_02", 7, 34, 37, 38, 2), // tech database 3
184  ui_button_info("TDB_03", 7, 49, 37, 54, 3), // tech database 4
185 
186  ui_button_info("VFB_04", 6, 318, -1, -1, 4), // scroll up
187  ui_button_info("VFB_05", 36, 318, -1, -1, 5), // scroll down
188  ui_button_info("VFB_06", 578, 319, 587, 366, 6), // play
189  ui_button_info("VFB_07", 574, 431, 587, 413, 7), // exit
190  },
191  { // GR_1024
192  ui_button_info("2_TDB_00", 12, 5, 59, 12, 0), // tech database 1
193  ui_button_info("2_TDB_01", 12, 31, 59, 37, 1), // tech database 2
194  ui_button_info("2_TDB_02", 12, 56, 59, 62, 2), // tech database 3
195  ui_button_info("2_TDB_03", 12, 81, 59, 88, 3), // tech database 4
196 
197  ui_button_info("2_VFB_04", 9, 509, -1, -1, 4), // scroll up
198  ui_button_info("2_VFB_05", 58, 509, -1, -1, 5), // scroll down
199  ui_button_info("2_VFB_06", 925, 511, 940, 586, 6), // play
200  ui_button_info("2_VFB_07", 918, 689, 940, 661, 7), // exit
201  }
202 };
203 
204 // text
205 #define NUM_CUTSCENE_TEXT 6
207  { // GR_640
208  {"Technical Database", 1055, 37, 7, UI_XSTR_COLOR_GREEN, -1, &Buttons[0][TECH_DATABASE_BUTTON].button },
209  {"Mission Simulator", 1056, 37, 23, UI_XSTR_COLOR_GREEN, -1, &Buttons[0][SIMULATOR_BUTTON].button },
210  {"Cutscenes", 1057, 37, 38, UI_XSTR_COLOR_GREEN, -1, &Buttons[0][CUTSCENES_BUTTON].button },
211  {"Credits", 1058, 37, 54, UI_XSTR_COLOR_GREEN, -1, &Buttons[0][CREDITS_BUTTON].button },
212 
213  {"Play", 1335, 587, 366, UI_XSTR_COLOR_GREEN, -1, &Buttons[0][PLAY_BUTTON].button },
214  {"Exit", 1419, 587, 413, UI_XSTR_COLOR_PINK, -1, &Buttons[0][EXIT_BUTTON].button },
215  },
216  { // GR_1024
217  {"Technical Database", 1055, 59, 12, UI_XSTR_COLOR_GREEN, -1, &Buttons[1][TECH_DATABASE_BUTTON].button },
218  {"Mission Simulator", 1056, 59, 37, UI_XSTR_COLOR_GREEN, -1, &Buttons[1][SIMULATOR_BUTTON].button },
219  {"Cutscenes", 1057, 59, 62, UI_XSTR_COLOR_GREEN, -1, &Buttons[1][CUTSCENES_BUTTON].button },
220  {"Credits", 1058, 59, 88, UI_XSTR_COLOR_GREEN, -1, &Buttons[1][CREDITS_BUTTON].button },
221 
222  {"Play", 1335, 940, 586, UI_XSTR_COLOR_GREEN, -1, &Buttons[1][PLAY_BUTTON].button },
223  {"Exit", 1419, 940, 661, UI_XSTR_COLOR_PINK, -1, &Buttons[1][EXIT_BUTTON].button },
224  }
225 };
226 
228  { // GR_640
229  9, 117, 621, 198
230  },
231  { // GR_1024
232  14, 188, 994, 316
233  }
234 };
235 
237  { // GR_640
238  9, 378, 484, 73
239  },
240  { // GR_1024
241  14, 605, 775, 117
242  }
243 };
244 
245 #define MAX_TEXT_LINES 20
247  10,
249 };
250 #define MAX_TEXT_LINE_LEN 256
251 
252 static int Text_size;
253 static int Text_offset = 0;
254 static int Text_line_size[MAX_TEXT_LINES];
255 static const char *Text_lines[MAX_TEXT_LINES];
256 
257 
258 int cutscenes_validate_cd(char *mve_name, int prompt_for_cd)
259 {
260  int cd_present = 0;
261  int cd_drive_num;
262  int cd_mve_is_on;
263  char volume_name[MAX_PATH_LEN];
264 
265  int num_attempts = 0;
266 
267  while(1) {
268  int path_set_ok;
269 
270  cd_mve_is_on = cutscenes_get_cd_num(mve_name);
271  if ((cd_mve_is_on != 0) && (cd_mve_is_on != 1) && (cd_mve_is_on != 2)) {
272  cd_present = 0;
273  break;
274  }
275 
276  sprintf(volume_name, NOX("FREESPACE2_%c"), '1' + cd_mve_is_on);
277 
278  cd_drive_num = find_freespace_cd(volume_name);
279  path_set_ok = set_cdrom_path(cd_drive_num);
280 
281  if ( path_set_ok ) {
282  cd_present = 1;
283  break;
284  }
285 
286  if ( !prompt_for_cd ) {
287  cd_present = 0;
288  break;
289  }
290 
291  // no CD found, so prompt user
292  char popup_msg[256];
293  int popup_rval;
294 
295  sprintf(popup_msg, XSTR( "Movie not found\n\nInsert FreeSpace CD #%d to continue", 203), cd_mve_is_on+1);
296 
297  popup_rval = popup(PF_BODY_BIG, 2, POPUP_CANCEL, POPUP_OK, popup_msg);
298  if ( popup_rval != 1 ) {
299  cd_present = 0;
300  break;
301  }
302 
303  if ( num_attempts++ > 5 ) {
304  cd_present = 0;
305  break;
306  }
307  }
308 
309  return cd_present;
310 }
311 
313 {
314  char name[MAX_FILENAME_LEN]; // *full_name
315  int which_cutscene;
316 
317  Assert( (Selected_line >= 0) && (Selected_line < (int)Cutscene_list.size()) );
318  which_cutscene = Cutscene_list[Selected_line];
319 
320  strcpy_s(name, Cutscenes[which_cutscene].filename );
321 // full_name = cf_add_ext(name, NOX(".mve"));
322 
323  main_hall_stop_music(true);
325  int rval = movie_play(name);
327 
328  if ( !rval ) {
329  char str[256];
330 
331  if (Cmdline_nomovies)
332  strcpy_s(str, XSTR("Movies are currently disabled.", 1574));
333  else
334  sprintf(str, XSTR("Unable to play movie %s.", 204), Cutscenes[which_cutscene].name);
335 
337  }
338 
339 }
340 
342 {
343  if (Selected_line) {
344  Selected_line--;
346 
347  } else
349 
350  if (Selected_line < Scroll_offset)
351  Scroll_offset = Selected_line;
352 }
353 
355 {
356  int h;
357 
358  if (Selected_line < (int)Cutscene_list.size() - 1) {
359  Selected_line++;
361 
362  } else
364 
366  if (Selected_line >= Scroll_offset + h){
367  Scroll_offset++;
368  }
369 }
370 
372 {
373  int h;
374 
375  if (Scroll_offset) {
376  Scroll_offset--;
377  Assert(Selected_line > Scroll_offset);
379  while (Selected_line >= Scroll_offset + h){
380  Selected_line--;
381  }
382 
384 
385  } else {
387  }
388 }
389 
391 {
392  int h;
393 
395  if (Scroll_offset + h < (int)Cutscene_list.size()) {
396  Scroll_offset++;
397  if (Selected_line < Scroll_offset){
398  Selected_line = Scroll_offset;
399  }
400 
402  } else {
404  }
405 }
406 
408 {
409  switch (n) {
413  return 1;
414 
415  case SIMULATOR_BUTTON:
418  return 1;
419 
420  case CREDITS_BUTTON:
423  return 1;
424 
425  case SCROLL_UP_BUTTON:
427  break;
428 
429  case SCROLL_DOWN_BUTTON:
431  break;
432 
433  case PLAY_BUTTON:
435  break;
436 
437  case EXIT_BUTTON:
440  game_flush();
441  break;
442  }
443 
444  return 0;
445 }
446 
448 {
449  int i;
450  ui_button_info *b;
451 
454 
455  for (i=0; i<NUM_BUTTONS; i++) {
456  b = &Buttons[gr_screen.res][i];
457 
458  b->button.create(&Ui_window, "", b->x, b->y, 60, 30, (i < 2), 1);
459  // set up callback for when a mouse first goes over a button
461  b->button.set_bmaps(b->filename);
462  b->button.link_hotspot(b->hotspot);
463  }
464 
465  // add xstrs
466  for(i=0; i<NUM_CUTSCENE_TEXT; i++){
467  Ui_window.add_XSTR(&Cutscene_text[gr_screen.res][i]);
468  }
469 
473 
475  List_region.hide();
476 
477  // set up hotkeys for buttons so we draw the correct animation frame when a key is pressed
480 
481  Background_bitmap = bm_load(Cutscene_bitmap_name[gr_screen.res]);
482  Scroll_offset = Selected_line = 0;
483  Description_index = -1;
484 
485  Cutscene_list.clear();
486 
487  int u = 0;
488  for (SCP_vector<cutscene_info>::iterator cut = Cutscenes.begin(); cut != Cutscenes.end(); ++cut, u++) {
489  if ( (*cut).viewable ) {
490  Cutscene_list.push_back(u);
491  }
492  }
493 }
494 
496 {
497  if (Background_bitmap)
498  bm_release(Background_bitmap);
499 
500  Ui_window.destroy();
501 }
502 
504 {
505  int i, k, y, z;
506  int font_height = gr_get_font_height();
507  int select_tease_line = -1;
508 
509  k = Ui_window.process();
510  switch (k) {
511  case KEY_DOWN: // select next line
513  break;
514 
515  case KEY_UP: // select previous line
517  break;
518 
519  case KEY_TAB:
520  case KEY_CTRLED | KEY_DOWN:
522  break;
523 
524  case KEY_SHIFTED | KEY_TAB:
525  case KEY_CTRLED | KEY_UP:
527  break;
528 
529  case KEY_ENTER:
531  break;
532 
533  case KEY_ESC: // cancel
535  game_flush();
536  break;
537 
538  case KEY_F1: // show help overlay
539  break;
540 
541  case KEY_F2: // goto options screen
543  break;
544 
545  // the "show-all" hotkey
546  case KEY_CTRLED | KEY_SHIFTED | KEY_S:
547  {
548  Cutscene_list.clear();
549  size_t size = Cutscenes.size();
550  for (size_t t = 0; t < size; t++) {
551  Cutscene_list.push_back((int)t);
552  }
553 
554  break;
555  }
556  } // end switch
557 
558  for (i=0; i<NUM_BUTTONS; i++){
559  if (Buttons[gr_screen.res][i].button.pressed()){
561  return;
562  }
563  }
564  }
565 
566  if (List_region.button_down()) {
567  List_region.get_mouse_pos(NULL, &y);
568  z = Scroll_offset + y / font_height;
569  if ((z >= 0) && (z < (int)Cutscene_list.size()))
570  select_tease_line = z;
571  }
572 
573  if (List_region.pressed()) {
574  List_region.get_mouse_pos(NULL, &y);
575  z = Scroll_offset + y / font_height;
576  if ((z >= 0) && (z < (int)Cutscene_list.size()))
577  Selected_line = z;
578  }
579 
580  GR_MAYBE_CLEAR_RES(Background_bitmap);
581  if (Background_bitmap >= 0) {
582  gr_set_bitmap(Background_bitmap);
583  gr_bitmap(0, 0, GR_RESIZE_MENU);
584  }
585 
586  Ui_window.draw();
587 
588  for (i=TECH_DATABASE_BUTTON; i<=CREDITS_BUTTON; i++){
589  if (Buttons[gr_screen.res][i].button.button_down()){
590  break;
591  }
592  }
593 
594  if (i > CREDITS_BUTTON){
596  }
597 
598  y = 0;
599  z = Scroll_offset;
600  while (y + font_height <= Cutscene_list_coords[gr_screen.res][3]) {
601  if (z >= (int)Cutscene_list.size()){
602  break;
603  }
604 
605  if (z == Selected_line){
607  } else if (z == select_tease_line) {
609  } else {
611  }
612 
613  gr_printf_menu(Cutscene_list_coords[gr_screen.res][0], Cutscene_list_coords[gr_screen.res][1] + y, Cutscenes[Cutscene_list[z]].name);
614 
615  y += font_height;
616  z++;
617  }
618 
619  if (Description_index != Selected_line) {
620  char *src = NULL;
621 
622  Description_index = Selected_line;
623  Text_size = 0;
624  if ( Description_index < (int)Cutscene_list.size( ) &&
625  (int)Cutscene_list[ Description_index ] < (int)Cutscenes.size( ) ) {
626  src = Cutscenes[Cutscene_list[Description_index]].description;
627  if (src) {
628  Text_size = split_str(src, Cutscene_desc_coords[gr_screen.res][2], Text_line_size, Text_lines, Cutscene_max_text_lines[gr_screen.res]);
629  Assert(Text_size >= 0 && Text_size < Cutscene_max_text_lines[gr_screen.res]);
630  }
631  }
632  }
633 
634  if (Description_index >= 0) {
635  int len;
636  char line[MAX_TEXT_LINE_LEN + 1];
637 
639 
640  y = 0;
641  z = Text_offset;
642  while (y + font_height <= Cutscene_desc_coords[gr_screen.res][3]) {
643  if (z >= Text_size || z >= MAX_TEXT_LINES-1)
644  break;
645 
646  len = Text_line_size[z];
647  if (len > MAX_TEXT_LINE_LEN)
648  len = MAX_TEXT_LINE_LEN;
649 
650  strncpy(line, Text_lines[z], len);
651  line[len] = 0;
653 
654  y += font_height;
655  z++;
656  }
657  }
658 
659  gr_flip();
660 }
void game_flush()
Definition: fredstubs.cpp:83
#define MAX_FILENAME_LEN
Definition: pstypes.h:324
void set_highlight_action(void(*_user_function)(void))
Definition: button.cpp:375
int i
Definition: multi_pxo.cpp:466
#define vm_free(ptr)
Definition: pstypes.h:548
void add_XSTR(char *string, int _xstr_id, int _x, int _y, UI_GADGET *_assoc, int _color_type, int _font_id=-1)
Definition: window.cpp:476
#define PLAY_BUTTON
Definition: cutscenes.cpp:168
SCP_vector< cutscene_info > Cutscenes
Definition: cutscenes.cpp:39
#define KEY_DOWN
Definition: key.h:180
int find_freespace_cd(char *)
Definition: fredstubs.cpp:193
GLfloat GLfloat GLfloat GLfloat h
Definition: Glext.h:7280
void gr_flip()
Definition: 2d.cpp:2113
commit pressed
Definition: gamesnd.h:294
int x
Definition: ui.h:658
#define KEY_PAGEDOWN
Definition: key.h:178
#define GR_RESIZE_MENU
Definition: 2d.h:684
int y
Definition: ui.h:658
void _cdecl void void _cdecl void _cdecl Warning(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
Assert(pm!=NULL)
#define GR_NUM_RESOLUTIONS
Definition: 2d.h:651
#define mprintf(args)
Definition: pstypes.h:238
__inline void gr_string(int x, int y, const char *string, int resize_mode=GR_RESIZE_FULL)
Definition: 2d.h:769
int Cutscene_list_coords[GR_NUM_RESOLUTIONS][4]
Definition: cutscenes.cpp:227
general failure sound for any event
Definition: gamesnd.h:297
int res
Definition: 2d.h:370
char * drop_white_space(char *str)
Definition: parselo.cpp:159
int max_h_unscaled
Definition: 2d.h:361
void compact_multitext_string(char *str)
Definition: parselo.cpp:1438
int Description_index
Definition: cutscenes.cpp:38
#define NUM_CUTSCENE_TEXT
Definition: cutscenes.cpp:205
enum_h * u
Definition: lua.cpp:12649
#define GR_MAYBE_CLEAR_RES(bmap)
Definition: 2d.h:639
int Cmdline_nomovies
Definition: cmdline.cpp:439
virtual void hide(int n)
Definition: gadget.cpp:207
void gr_set_color_fast(color *dst)
Definition: 2d.cpp:1197
#define KEY_PAGEUP
Definition: key.h:175
Definition: ui.h:195
#define SCROLL_DOWN_BUTTON
Definition: cutscenes.cpp:167
void gr_set_bitmap(int bitmap_num, int alphablend_mode, int bitblt_mode, float alpha)
Definition: 2d.cpp:2105
GLsizeiptr size
Definition: Glext.h:5496
int max_w_unscaled
Definition: 2d.h:361
int required_string_either(char *str1, char *str2)
Checks for one of two required strings.
Definition: parselo.cpp:673
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: Glext.h:7308
int bm_release(int handle, int clear_render_targets)
Frees both a bitmap's data and it's associated slot.
Definition: bmpman.cpp:2603
char * Cutscene_bitmap_name[GR_NUM_RESOLUTIONS]
Definition: cutscenes.cpp:29
void draw_forced(int frame_num)
Definition: button.cpp:104
char * Cutscene_mask_name[GR_NUM_RESOLUTIONS]
Definition: cutscenes.cpp:33
void destroy()
Definition: window.cpp:189
#define MAX_TEXT_LINE_LEN
Definition: cutscenes.cpp:250
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
void set_mask_bmap(char *fname)
Definition: window.cpp:75
int set_bmaps(char *ani_filename, int nframes=3, int start_frame=1)
Definition: gadget.cpp:71
void cutscene_close()
Definition: cutscenes.cpp:41
#define MULTITEXT_LENGTH
Definition: globals.h:21
#define EXIT_BUTTON
Definition: cutscenes.cpp:169
char * filename
int hotspot
Definition: ui.h:659
int pressed()
Definition: button.cpp:325
Switching to a new screen, but not commit.
Definition: gamesnd.h:292
#define KEY_SHIFTED
Definition: key.h:62
int cutscenes_validate_cd(char *mve_name, int prompt_for_cd)
Definition: cutscenes.cpp:258
#define SCROLL_UP_BUTTON
Definition: cutscenes.cpp:166
void stuff_string(char *outstr, int type, int len, char *terminators)
Definition: parselo.cpp:1189
#define CF_TYPE_TABLES
Definition: cfile.h:50
sprintf(buf,"(%f,%f,%f)", v3->xyz.x, v3->xyz.y, v3->xyz.z)
void cutscenes_screen_scroll_screen_down()
Definition: cutscenes.cpp:390
GLdouble GLdouble z
Definition: Glext.h:5451
#define KEY_ENTER
Definition: key.h:125
void cutscenes_screen_close()
Definition: cutscenes.cpp:495
int Cutscene_desc_coords[GR_NUM_RESOLUTIONS][4]
Definition: cutscenes.cpp:236
void main_hall_stop_ambient()
#define vm_strdup(ptr)
Definition: pstypes.h:549
int required_string(const char *pstr)
Definition: parselo.cpp:468
int split_str(const char *src, int max_pixel_w, int *n_chars, const char **p_str, int max_lines, char ignore_char)
Definition: parselo.cpp:3412
int optional_string(const char *pstr)
Definition: parselo.cpp:539
void cutscenes_screen_scroll_line_up()
Definition: cutscenes.cpp:341
void cutscenes_screen_scroll_line_down()
Definition: cutscenes.cpp:354
#define CREDITS_BUTTON
Definition: cutscenes.cpp:164
UI_BUTTON button
Definition: ui.h:660
void read_file_text(const char *filename, int mode, char *processed_text, char *raw_text)
Definition: parselo.cpp:1995
#define TECH_DATABASE_BUTTON
Definition: cutscenes.cpp:161
GLdouble GLdouble t
Definition: Glext.h:5329
void cutscenes_screen_scroll_screen_up()
Definition: cutscenes.cpp:371
GLclampd n
Definition: Glext.h:7286
const char * XSTR(const char *str, int index)
Definition: localize.cpp:851
int cutscenes_get_cd_num(char *filename)
Definition: cutscenes.cpp:114
#define F_PATHNAME
Definition: parselo.h:40
void stuff_boolean(int *i, bool a_to_eol)
Definition: parselo.cpp:2519
#define NOX(s)
Definition: pstypes.h:473
#define KEY_F1
Definition: key.h:143
#define NUM_BUTTONS
Definition: cutscenes.cpp:159
int cutscenes_screen_button_pressed(int n)
Definition: cutscenes.cpp:407
void set_hotkey(int keycode)
Definition: gadget.cpp:280
void reset_parse(char *text)
Definition: parselo.cpp:3305
GLuint const GLchar * name
Definition: Glext.h:5608
#define MAX_PATH_LEN
Definition: pstypes.h:325
int bm_load(const char *real_filename)
Loads a bitmap so we can draw with it later.
Definition: bmpman.cpp:1119
color Color_text_subselected
Definition: alphacolors.cpp:26
GLboolean GLboolean GLboolean b
Definition: Glext.h:5781
void stuff_int(int *i)
Definition: parselo.cpp:2372
color Color_text_selected
Definition: alphacolors.cpp:26
char name[NAME_LENGTH]
Definition: cutscenes.h:18
scroll pressed (and scroll)
Definition: gamesnd.h:296
void link_hotspot(int num)
Definition: gadget.cpp:50
void create(UI_WINDOW *wnd, char *_text, int _x, int _y, int _w, int _h, int do_repeat=0, int ignore_focus=0)
Definition: button.cpp:26
#define KEY_ESC
Definition: key.h:124
#define NAME_LENGTH
Definition: globals.h:15
#define UI_XSTR_COLOR_PINK
Definition: ui.h:161
int button_down()
Definition: button.cpp:363
UI_XSTR Cutscene_text[GR_NUM_RESOLUTIONS][NUM_CUTSCENE_TEXT]
Definition: cutscenes.cpp:206
void create(int _x, int _y, int _w, int _h, int _flags, int _f_id=-1)
Definition: window.cpp:140
Definition: ui.h:584
void cutscenes_screen_do_frame()
Definition: cutscenes.cpp:503
screen gr_screen
Definition: 2d.cpp:46
#define SIMULATOR_BUTTON
Definition: cutscenes.cpp:162
Definition: ui.h:162
#define KEY_F2
Definition: key.h:144
int gr_get_font_height()
Definition: font.cpp:187
GLfloat GLfloat p
Definition: Glext.h:8373
#define F_NAME
Definition: parselo.h:34
GLenum src
Definition: Glext.h:5917
#define LOCATION
Definition: pstypes.h:245
void common_play_highlight_sound()
Definition: gamesnd.cpp:1151
void main_hall_start_music()
void cutscene_init()
Definition: cutscenes.cpp:51
void get_mouse_pos(int *xx, int *yy)
Definition: gadget.cpp:341
void ignore_white_space()
Definition: parselo.cpp:77
bool movie_play(char *name)
Definition: movie.cpp:72
#define KEY_CTRLED
Definition: key.h:64
#define KEY_TAB
Definition: key.h:127
char * filename
Definition: ui.h:657
void cutscenes_screen_init()
Definition: cutscenes.cpp:447
void gr_bitmap(int _x, int _y, int resize_mode)
Definition: 2d.cpp:1303
#define KEY_UP
Definition: key.h:179
void cutscene_mark_viewable(char *filename)
Definition: cutscenes.cpp:126
#define UI_XSTR_COLOR_GREEN
Definition: ui.h:160
int Cutscene_max_text_lines[GR_NUM_RESOLUTIONS]
Definition: cutscenes.cpp:246
GLenum GLsizei len
Definition: Glext.h:6283
color Color_text_normal
Definition: alphacolors.cpp:26
#define MAX_TEXT_LINES
Definition: cutscenes.cpp:245
void gamesnd_play_iface(int n)
Definition: gamesnd.cpp:260
void draw()
Definition: window.cpp:220
struct ui_button_info ui_button_info
char * description
Definition: cutscenes.h:19
#define KEY_S
Definition: key.h:100
void main_hall_stop_music(bool fade)
void strlwr(char *s)
int process(int key_in=-1, int process_mouse=1)
Definition: window.cpp:401
char filename[MAX_FILENAME_LEN]
Definition: cutscenes.h:17
#define CUTSCENES_BUTTON
Definition: cutscenes.cpp:163
void _cdecl gr_printf_menu(int x, int y, const char *format,...)
Definition: font.cpp:314
void gameseq_post_event(int event)
#define F_MULTITEXT
Definition: parselo.h:43
bool viewable
Definition: cutscenes.h:21
#define stricmp(s1, s2)
Definition: config.h:271
int set_cdrom_path(int)
Definition: fredstubs.cpp:192
int skip_to_string(char *pstr, char *end)
Definition: parselo.cpp:375
GLint y
Definition: Gl.h:1505
void cutscenes_screen_play()
Definition: cutscenes.cpp:312
#define strcpy_s(...)
Definition: safe_strings.h:67