FS2_Open
Open source remastering of the Freespace 2 engine
gameplayhelp.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 
13 #include "freespace2/freespace.h"
15 #include "gamesnd/gamesnd.h"
16 #include "globalincs/alphacolors.h"
17 #include "io/key.h"
19 #include "sound/audiostr.h"
20 #include "ui/ui.h"
21 #include "weapon/weapon.h"
22 
23 
24 
25 // text positioning constats
26 #define TITLE_Y 35
27 #define Y_START 70
28 #define X_OFFSET_1 70
29 
30 // pixel offset for description of key from where key binding starts
31 #define KEY_DESCRIPTION_OFFSET 193
32 
33 // different gameplay help pages
34 #define GP_FIRST_SCREEN 0 // keep up to date
35 
36 #define GP_HELP_BASIC_KEYS 0
37 #define GP_HELP_MOVEMENT_KEYS 1
38 #define GP_HELP_COMMON_TARGET_KEYS 2
39 #define GP_HELP_ADVANCED_TARGET_KEYS 3
40 #define GP_HELP_MESSAGING 4
41 #define GP_HELP_WEAPON_KEYS 5
42 #define GP_HELP_THROTTLE_AND_ETS_KEYS 6
43 #define GP_HELP_VIEW_KEYS 7
44 #define GP_HELP_MISC_KEYS 8
45 #define GP_HELP_MULTI_KEYS 9
46 
47 #define GP_LAST_SCREEN_SINGLE 8 // keep up to date
48 #define GP_LAST_SCREEN_MULTI 9 // keep up to date
49 
50 // set this to GP_LAST_SCREEN_SINGLE or GP_LAST_SCREEN_MULTI based upon what game mode we're in
52 
53 #define NUM_BUTTONS 3
54 #define PREVIOUS_PAGE_BUTTON 0
55 #define NEXT_PAGE_BUTTON 1
56 #define CONTINUE_BUTTON 2
57 
59  char *filename;
60  int x, y;
61  int hotspot;
62  int tab;
63  int flags;
64  UI_BUTTON button; // because we have a class inside this struct, we need the constructor below..
65 
66  gameplay_help_buttons(char *name, int x1, int y1, int h) : filename(name), x(x1), y(y1), hotspot(h) {}
67 };
68 
70 //XSTR:OFF
71  {
72  gameplay_help_buttons("F1B_00", 15, 389, 0),
73  gameplay_help_buttons("F1B_01", 60, 389, 1),
74  gameplay_help_buttons("F1B_02", 574, 431, 2)
75  },
76  {
77  gameplay_help_buttons("2_F1B_00", 24, 622, 0),
78  gameplay_help_buttons("2_F1B_01", 96, 622, 1),
79  gameplay_help_buttons("2_F1B_02", 919, 689, 2)
80  },
81 //XSTR:ON
82 };
83 
84 #define GAME_HELP_NUM_TEXT 2
85 static UI_XSTR Game_help_text[GR_NUM_RESOLUTIONS][GAME_HELP_NUM_TEXT] = {
86  { // GR_640
87  { "Press ESC to return to the game", 1441, 263, 389, UI_XSTR_COLOR_GREEN, -1, NULL },
88  { "Continue", 1069, 571, 413, UI_XSTR_COLOR_GREEN, -1, &Buttons[gr_screen.res][CONTINUE_BUTTON].button }
89  },
90  { // GR_1024
91  { "Press ESC to return to the game", 1441, 421, 622, UI_XSTR_COLOR_GREEN, -1, NULL },
92  { "Continue", 1069, 928, 663, UI_XSTR_COLOR_GREEN, -1, &Buttons[gr_screen.res][CONTINUE_BUTTON].button }
93  }
94 };
95 
96 static char *Game_help_filename[GR_NUM_RESOLUTIONS] = {
97  "F1",
98  "2_F1"
99 };
100 
101 static char *Game_help_mask_filename[GR_NUM_RESOLUTIONS] = {
102  "F1-m",
103  "2_F1-m"
104 };
105 
106 static UI_WINDOW Ui_window;
107 static int Background_bitmap;
108 static int Gameplay_help_inited = 0;
109 
110 static int Current_help_page;
111 
112 // generate a line for the on-line help for a control item with specified id
113 // input: id => index for control item within Control_config[]
114 // buf => buffer with enough space to hold ouput string
115 char *gameplay_help_control_text(int id, char *buf)
116 {
117  int has_key=0, has_joy=0;
118  config_item *ci;
119 
120  ci = &Control_config[id];
121 
122  if ( ci->key_id >= 0 ) {
123  strcpy(buf, textify_scancode(ci->key_id));
124  has_key=1;
125  }
126 
127  if ( ci->joy_id >= 0 ) {
128  if ( has_key ) {
129  strcat(buf, XSTR( ", ", 129));
130  }
131  strcat(buf, Joy_button_text[ci->joy_id]);
132  has_joy=1;
133  }
134 
135  if ( !has_key && !has_joy ) {
136  strcpy(buf, XSTR( "no binding", 130));
137  }
138 
139  strcat(buf, XSTR( " - ", 131));
140  strcat(buf, ci->text);
141 
142  return buf;
143 }
144 
145 void gameplay_help_blit_control_line(int x, int y, int id)
146 {
147  int has_key=0, has_joy=0;
148  char buf[256];
149  config_item *ci;
150 
151  ci = &Control_config[id];
152 
153  buf[0] = 0;
154 
155  if ( ci->key_id >= 0 ) {
156  strcpy_s(buf, textify_scancode(ci->key_id));
157  has_key=1;
158  }
159 
160  if ( ci->joy_id >= 0 ) {
161  if ( has_key ) {
162  strcat_s(buf, XSTR( ", ", 129));
163  }
164  strcat_s(buf, Joy_button_text[ci->joy_id]);
165  has_joy=1;
166  }
167 
168  if ( !has_key && !has_joy ) {
169  strcpy_s(buf, XSTR( "no binding", 130));
170  }
171 
172  gr_string(x,y,buf,GR_RESIZE_MENU);
173 
174 // gr_string(x+KEY_DESCRIPTION_OFFSET,y,ci->text,GR_RESIZE_MENU);
176 }
177 
178 void gameplay_help_blit_control_line_raw(int x, int y, const char *control_text, const char *control_description)
179 {
180  gr_string(x,y,control_text,GR_RESIZE_MENU);
181  gr_string(x+KEY_DESCRIPTION_OFFSET,y,control_description,GR_RESIZE_MENU);
182 }
183 
184 // game_play_help_set_title() will display the title for the help screen and
185 // set the font for the rest of the screen
186 void gameplay_help_set_title(const char *title)
187 {
188  int sy=TITLE_Y;
189  char buf[128];
190 
192  gr_printf_menu(0x8000,sy,title);
193  sprintf(buf, XSTR( "Page %d of %d", 132), Current_help_page+1, Gp_last_screen+1);
194  gr_printf_menu(0x8000,sy+gr_get_font_height()+2,buf);
196 }
197 
198 // called once when the gameplay help state is entered
200 {
201  int i;
203 
204  if ( Gameplay_help_inited ) {
205  return;
206  }
207 
208  common_set_interface_palette("InterfacePalette"); // set the interface palette
210  Ui_window.set_mask_bmap(Game_help_mask_filename[gr_screen.res]);
211 
212  for (i=0; i<NUM_BUTTONS; i++) {
213  b = &Buttons[gr_screen.res][i];
214 
215  b->button.create(&Ui_window, "", b->x, b->y, 60, 30, 0, 1);
216  // set up callback for when a mouse first goes over a button
218  b->button.set_bmaps(b->filename);
219  b->button.link_hotspot(b->hotspot);
220  }
221 
222  // add all xstrs
223  for (i=0; i<GAME_HELP_NUM_TEXT; i++)
224  {
225  Ui_window.add_XSTR(&Game_help_text[gr_screen.res][i]);
226  }
227 
228  // set the proper last screen # based upon game mode
231  } else {
233  }
234 
235  // setup hotkeys so lights flash when keys are pressed
239 
240  Background_bitmap = bm_load(Game_help_filename[gr_screen.res]);
241 
242  Current_help_page = GP_HELP_BASIC_KEYS;
243  Gameplay_help_inited = 1;
244 }
245 
246 // called when moving to the previous help page
248 {
249  Current_help_page--;
250  if (Current_help_page < GP_FIRST_SCREEN) {
251  Current_help_page = Gp_last_screen;
252  }
254 
255 }
256 
257 // called when proceeding to the next help page
259 {
260  Current_help_page++;
261  if (Current_help_page > Gp_last_screen) {
262  Current_help_page = GP_FIRST_SCREEN;
263  }
265 }
266 
267 // called when the screen is exited
269 {
270  // unpause all game sounds
273 
275  game_flush();
276 }
277 
278 // deal with a keypress on the gameplay help screen
280 {
281  switch ( k ) {
282  case KEY_ESC:
284  break;
285 
286  case KEY_ENTER:
287  case KEY_SPACEBAR:
288  case KEY_TAB:
289  //gameplay_help_goto_next_screen();
291  break;
292 
293  case KEY_SHIFTED | KEY_TAB:
295 // gameplay_help_goto_prev_screen();
296  break;
297 
298  default:
299  break;
300 
301  } // end switch
302 }
303 
304 // deal with buttons being pressed on the gameplay help screen
306 {
307  switch (n) {
308 
311  break;
312 
313  case NEXT_PAGE_BUTTON:
315  break;
316 
317  case CONTINUE_BUTTON:
320  break;
321 
322  default:
323  Int3();
324  break;
325  }
326 }
327 
328 // Draw the help text onto the screen
330 {
331  int x_offset, y_offset, separation;
332 
333  separation = gr_get_font_height() + 3;
334 
335  switch ( Current_help_page ) {
336 
337  case GP_HELP_BASIC_KEYS:
338  gameplay_help_set_title(XSTR( "Basic Keys", 133));
339  x_offset=X_OFFSET_1;
340  y_offset=Y_START;
341 
342  y_offset += separation;
343  gameplay_help_blit_control_line(x_offset, y_offset,END_MISSION);
344 
345  y_offset += separation;
346  gameplay_help_blit_control_line(x_offset, y_offset,FIRE_PRIMARY);
347 
348  y_offset += separation;
349  gameplay_help_blit_control_line(x_offset, y_offset,MAX_THROTTLE);
350 
351  y_offset += separation;
353 
354  y_offset += separation;
355  gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT);
356 
357  y_offset += separation;
358  gameplay_help_blit_control_line(x_offset, y_offset,TARGET_PREV);
359 
360  y_offset += separation;
362 
363  y_offset += separation;
364  y_offset += separation;
365 
367  gr_printf_menu(0x8000,y_offset,XSTR( "Function Keys", 134));
369 
370  y_offset += separation;
371  y_offset += separation;
372 
373  gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "F1", 135), XSTR( "context-sensitive help", 136));
374 
375  y_offset += separation;
376  gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "F2", 137), XSTR( "options screen (available anywhere in game)", 138));
377 
378  y_offset += separation;
379  gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "F3", 139), XSTR( "hotkey assignment", 140));
380 
381  y_offset += separation;
382  gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "F4", 141), XSTR( "HUD message scroll-back", 142));
383 
384  y_offset += separation;
385  gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "F5...F12", 143), XSTR( "hotkeys", 144));
386 
387  y_offset += separation;
388  gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "Shift-Esc", 145), XSTR( "quit FreeSpace 2 immediately", 146));
389 
390  break;
391 
393  gameplay_help_set_title(XSTR( "Movement Keys", 147));
394  x_offset=X_OFFSET_1;
395  y_offset=Y_START;
396 
398 
399  y_offset += separation;
400  gameplay_help_blit_control_line(x_offset, y_offset,MAX_THROTTLE);
401 
402  y_offset += separation;
404 
405  y_offset += separation;
407 
408  y_offset += separation;
410 
411  y_offset += separation;
413 
414  y_offset += separation;
416 
417  y_offset += separation;
418  gameplay_help_blit_control_line(x_offset, y_offset,AFTERBURNER);
419 
420  y_offset += separation;
422 
423  y_offset += separation;
425 
426  y_offset += separation;
427  gameplay_help_blit_control_line(x_offset, y_offset,PITCH_BACK);
428 
429  y_offset += separation;
430  gameplay_help_blit_control_line(x_offset, y_offset,YAW_LEFT);
431 
432  y_offset += separation;
433  gameplay_help_blit_control_line(x_offset, y_offset,YAW_RIGHT);
434 
435  y_offset += separation;
436  gameplay_help_blit_control_line(x_offset, y_offset,BANK_LEFT);
437 
438  y_offset += separation;
439  gameplay_help_blit_control_line(x_offset, y_offset,BANK_RIGHT);
440 
441  y_offset += separation;
443  break;
444 
446  gameplay_help_set_title(XSTR( "Basic Targeting Keys", 148));
447  x_offset=X_OFFSET_1;
448  y_offset=Y_START;
449 
450  gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT);
451 
452  y_offset += separation;
453  gameplay_help_blit_control_line(x_offset, y_offset,TARGET_PREV);
454 
455  y_offset += separation;
457 
458  y_offset += separation;
460 
461  y_offset += separation;
463 
464  y_offset += separation;
466 
467  y_offset += separation;
469 
470  y_offset += separation;
472 
473  y_offset += separation;
475 
476  y_offset += separation;
478 
479  y_offset += separation;
481 
482  y_offset += separation;
484 
485  y_offset += separation;
487  break;
488 
490  gameplay_help_set_title(XSTR( "Advanced Targeting Keys", 149));
491  x_offset=X_OFFSET_1;
492  y_offset=Y_START;
493 
495 
496  y_offset += separation;
498 
499  y_offset += separation;
501 
502  y_offset += separation;
504 
505  y_offset += separation;
507 
508  y_offset += separation;
510 
511  y_offset += separation;
513 
514  y_offset += separation;
516 
517  y_offset += separation;
519 
520  y_offset += separation;
522 
523  y_offset += separation;
525 
526  y_offset += separation;
528 
529  y_offset += separation;
531 
532  y_offset += separation;
534 
535  y_offset += separation;
537 
538  y_offset += separation;
539  gameplay_help_blit_control_line_raw(x_offset, y_offset, XSTR( "F5...F12", 143), XSTR( "Select target assigned to that hotkey", 150));
540 
541  y_offset += separation;
542  gameplay_help_blit_control_line_raw(x_offset, y_offset, XSTR( "Shift-F5...F12", 151), XSTR( "Add/remove target from that hotkey", 152));
543 
544  y_offset += separation;
545  gameplay_help_blit_control_line_raw(x_offset, y_offset, XSTR( "Alt-Shift-F5...F12", 153), XSTR( "Clear that hotkey", 154));
546 
547  break;
548 
549  case GP_HELP_MESSAGING:
550  gameplay_help_set_title(XSTR( "Messaging Keys", 155));
551  x_offset=X_OFFSET_1;
552  y_offset=Y_START;
553 
555 
556  y_offset += separation;
558 
559  y_offset += separation;
561 
562  y_offset += separation;
564 
565  y_offset += separation;
567 
568  y_offset += separation;
570 
571  y_offset += separation;
573 
574  y_offset += separation;
575  gameplay_help_blit_control_line(x_offset, y_offset,FORM_MESSAGE);
576 
577  y_offset += separation;
579 
580  y_offset += separation;
582 
583  y_offset += separation;
585 
586  y_offset += separation;
587  gameplay_help_blit_control_line(x_offset, y_offset,WARP_MESSAGE);
588 
589  y_offset += separation;
590  gameplay_help_blit_control_line_raw(x_offset, y_offset, XSTR( "F5...F12", 143), XSTR( "send specified order to these target(s)", 156));
591  break;
592 
593  case GP_HELP_WEAPON_KEYS:
594  gameplay_help_set_title(XSTR( "Weapon Keys", 157));
595  x_offset=X_OFFSET_1;
596  y_offset=Y_START;
597 
598  gameplay_help_blit_control_line(x_offset, y_offset,FIRE_PRIMARY);
599 
600  y_offset += separation;
602 
603  y_offset += separation;
605 
606  y_offset += separation;
608 
609  y_offset += separation;
611 
612  y_offset += separation;
614 
615  y_offset += separation;
617  break;
618 
620  gameplay_help_set_title(XSTR( "Energy Management Keys", 158));
621  x_offset=X_OFFSET_1;
622  y_offset=Y_START;
623 
625 
626  y_offset += separation;
628 
629  y_offset += separation;
631 
632  y_offset += separation;
634 
635  y_offset += separation;
637 
638  y_offset += separation;
640 
641  y_offset += separation;
643 
644  y_offset += separation;
646 
647  y_offset += separation;
649 
650  y_offset += separation;
652 
653  y_offset += separation;
655 
656  y_offset += separation;
657  gameplay_help_blit_control_line(x_offset, y_offset,ETS_EQUALIZE);
658 /*
659  y_offset += separation;
660  gameplay_help_blit_control_line(x_offset, y_offset,XFER_LASER);
661 
662  y_offset += separation;
663  gameplay_help_blit_control_line(x_offset, y_offset,XFER_SHIELD);
664 */
665  break;
666 
667  case GP_HELP_MISC_KEYS:
668  gameplay_help_set_title(XSTR( "Miscellaneous Keys", 159));
669  x_offset=X_OFFSET_1;
670  y_offset=Y_START;
671 
672  // ending mission
673  //
674  y_offset += separation;
675  gameplay_help_blit_control_line(x_offset, y_offset,END_MISSION);
676 
677  y_offset += separation;
678  gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "ESC", 160), XSTR( "invoke abort mission popup", 161));
679 
680  // time compression
681  //
682  y_offset += separation;
684 
685  y_offset += separation;
687 
688  // radar keys
689  //
690  y_offset += separation;
692 
693  // escort view keys
694  //
695  y_offset += separation;
697 
698  y_offset += separation;
699  gameplay_help_blit_control_line(x_offset, y_offset,ESCORT_CLEAR);
700 
701  // Pause, Print Screenshot
702  y_offset += separation;
703  gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "Pause", 162), XSTR( "pause game", 163));
704 
705  y_offset += separation;
706  gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "Print Scrn", 164), XSTR( "take screen shot", 165));
707 
708  break;
709 
710  case GP_HELP_VIEW_KEYS:
711  gameplay_help_set_title(XSTR( "View Keys", 166));
712  x_offset=X_OFFSET_1;
713  y_offset=Y_START;
714 
715  gameplay_help_blit_control_line(x_offset, y_offset,PADLOCK_UP);
716 
717  y_offset += separation;
718  gameplay_help_blit_control_line(x_offset, y_offset,PADLOCK_DOWN);
719 
720  y_offset += separation;
721  gameplay_help_blit_control_line(x_offset, y_offset,PADLOCK_LEFT);
722 
723  y_offset += separation;
725 
726  y_offset += separation;
727  gameplay_help_blit_control_line(x_offset, y_offset,VIEW_CHASE);
728 
729  y_offset += separation;
731 
732  y_offset += separation;
734 
735  y_offset += separation;
736  gameplay_help_blit_control_line(x_offset, y_offset,VIEW_SLEW);
737 
738  y_offset += separation;
740 
741  y_offset += separation;
743 
744  y_offset += separation;
745  gameplay_help_blit_control_line(x_offset, y_offset,VIEW_CENTER);
746 
747  y_offset += separation;
749  break;
750 
751  case GP_HELP_MULTI_KEYS:
752  gameplay_help_set_title(XSTR( "Multiplayer Keys", 167));
753  x_offset=X_OFFSET_1;
754  y_offset=Y_START;
755 
756  // ingame messaging
758  gr_printf_menu(0x8000,y_offset,XSTR( "Ingame messaging keys (tap for text, hold for voice)", 168));
760 
761  y_offset += separation;
762 
763  y_offset += separation;
765 
766  y_offset += separation;
768 
769  y_offset += separation;
771 
772  y_offset += separation;
774 
775  break;
776 
777  } // end switch
778 }
779 
780 // gameplay_help_do_frame() is the function that displays help when acutally playing the game
781 void gameplay_help_do_frame(float frametime)
782 {
783  int i, k;
784 
785  // ensure the gameplay help interface has been initialized
786  if (!Gameplay_help_inited) {
787  Int3();
788  return;
789  }
790 
791  // make sure game sounds are paused
794 
795  k = Ui_window.process() & ~KEY_DEBUGGED;
797 
798  for (i=0; i<NUM_BUTTONS; i++){
799  if (Buttons[gr_screen.res][i].button.pressed()){
801  }
802  }
803 
804  GR_MAYBE_CLEAR_RES(Background_bitmap);
805  if (Background_bitmap >= 0) {
806  gr_set_bitmap(Background_bitmap);
807  gr_bitmap(0, 0, GR_RESIZE_MENU);
808  }
809 
810  Ui_window.draw();
811 
813  gr_flip();
814 }
815 
816 
817 // called once when leaving the gameplay help state
819 {
820  if ( Gameplay_help_inited ) {
821  if (Background_bitmap >= 0) {
822  bm_release(Background_bitmap);
823  }
824 
825  Ui_window.destroy();
826  common_free_interface_palette(); // restore game palette
827  game_flush();
828  }
829 
830  Gameplay_help_inited = 0;
831 }
void game_flush()
Definition: fredstubs.cpp:83
#define TITLE_Y
target your target's target
PITCH_FORWARD.
void set_highlight_action(void(*_user_function)(void))
Definition: button.cpp:375
#define PREVIOUS_PAGE_BUTTON
int i
Definition: multi_pxo.cpp:466
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
toggle the squadmate messaging menu
increase energy to engines
TARGET_NEXT_ESCORT_SHIP.
int Game_mode
Definition: systemvars.cpp:24
GLfloat GLfloat GLfloat GLfloat h
Definition: Glext.h:7280
#define KEY_LEFT
Definition: key.h:181
message all friendlies
void gr_flip()
Definition: 2d.cpp:2113
commit pressed
Definition: gamesnd.h:294
VIEW_CENTER.
short key_id
actual key bound to action
TARGET_LAST_TRANMISSION_SENDER.
#define GR_RESIZE_MENU
Definition: 2d.h:684
VIEW_EXTERNAL_TOGGLE_CAMERA_LOCK.
char ** Joy_button_text
decrease shield recharge rate
ZERO_THROTTLE.
#define KEY_DESCRIPTION_OFFSET
VIEW_DIST_DECREASE.
#define KEY_RIGHT
Definition: key.h:182
#define GP_HELP_WEAPON_KEYS
int Gp_last_screen
wingman message: attack current target
#define GR_NUM_RESOLUTIONS
Definition: 2d.h:651
IGNORE_MESSAGE.
__inline void gr_string(int x, int y, const char *string, int resize_mode=GR_RESIZE_FULL)
Definition: 2d.h:769
target the closest ship attacking current target
YAW_RIGHT.
char * gameplay_help_control_text(int id, char *buf)
REARM_MESSAGE.
int res
Definition: 2d.h:370
int max_h_unscaled
Definition: 2d.h:361
toggle auto-match target speed
#define CONTINUE_BUTTON
void gameplay_help_blit_control_line(int x, int y, int id)
#define CONTROL_CONFIG_XSTR
YAW_LEFT.
BANK_RIGHT.
PADLOCK_UP.
#define GR_MAYBE_CLEAR_RES(bmap)
Definition: 2d.h:639
VIEW_OTHER_SHIP.
void gr_set_color_fast(color *dst)
Definition: 2d.cpp:1197
Definition: ui.h:195
target next
target closest ship that is attacking player
void gr_set_bitmap(int bitmap_num, int alphablend_mode, int bitblt_mode, float alpha)
Definition: 2d.cpp:2105
int max_w_unscaled
Definition: 2d.h:361
#define Int3()
Definition: pstypes.h:292
char * textify_scancode(int code)
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
VIEW_EXTERNAL.
short joy_id
joystick button bound to action
#define GP_HELP_MULTI_KEYS
config_item Control_config[]
Stores the keyboard configuration.
gameplay_help_buttons(char *name, int x1, int y1, int h)
target previous
match target speed
transfer shield energy to right
stop targeting subsystems on ship
void common_set_interface_palette(char *filename)
#define X_OFFSET_1
message all hostiles
#define GP_HELP_VIEW_KEYS
void destroy()
Definition: window.cpp:189
void press_button()
Definition: button.cpp:399
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 common_free_interface_palette()
void weapon_pause_sounds()
Definition: weapons.cpp:7248
#define GP_HELP_THROTTLE_AND_ETS_KEYS
REVERSE_THRUST.
#define GAME_HELP_NUM_TEXT
color Color_bright
Definition: alphacolors.cpp:28
message targeted ship (if player)
#define GM_MULTIPLAYER
Definition: systemvars.h:18
wingman message: cover me
increase shield recharge rate
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
void gameplay_help_set_title(const char *title)
sprintf(buf,"(%f,%f,%f)", v3->xyz.x, v3->xyz.y, v3->xyz.z)
VIEW_DIST_INCREASE.
decrease energy to engines
#define KEY_ENTER
Definition: key.h:125
#define GP_HELP_MISC_KEYS
equalize recharge rates
wingman message: disarm current target
TARGET_PREV_LIVE_TURRET.
AFTERBURNER.
void gameplay_help_button_pressed(int n)
TARGET_PREV_SUBOBJECT.
void gameplay_help_goto_prev_screen()
wingman message: form on my wing
stop targeting ship
target next subsystem on current target
cycle number of missiles fired from secondary bank
GLenum GLuint id
Definition: Glext.h:5156
VIEW_SLEW.
PADLOCK_RIGHT.
ADD_REMOVE_ESCORT.
ONE_THIRD_THROTTLE.
cycle to previous primary weapon
#define NUM_BUTTONS
target ship closest to center of reticle
target the closest friendly ship
void gameplay_help_process_key(int k)
GLint GLint GLint GLint GLint x
Definition: Glext.h:5182
TIME_SLOW_DOWN.
PITCH_BACK.
GLclampd n
Definition: Glext.h:7286
cycle to next secondary weapon
const char * XSTR(const char *str, int index)
Definition: localize.cpp:851
PADLOCK_LEFT.
target the closest repair ship
TARGET_NEXT_LIVE_TURRET.
wingman message: engage enemy
void gameplay_help_leave()
#define GP_HELP_COMMON_TARGET_KEYS
void set_hotkey(int keycode)
Definition: gadget.cpp:280
GLuint const GLchar * name
Definition: Glext.h:5608
FIRE_SECONDARY.
FORWARD_THRUST.
void weapon_unpause_sounds()
Definition: weapons.cpp:7257
int bm_load(const char *real_filename)
Loads a bitmap so we can draw with it later.
Definition: bmpman.cpp:1119
GLboolean GLboolean GLboolean b
Definition: Glext.h:5781
#define GP_FIRST_SCREEN
wingman message: protect current target
equalize shield energy to all quadrants
TARGET_NEWEST_SHIP.
void link_hotspot(int num)
Definition: gadget.cpp:50
#define strcat_s(...)
Definition: safe_strings.h:68
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
TARGET_PREV_BOMB.
void gameplay_help_init()
target ships subsystem in reticle
#define GP_HELP_MESSAGING
void create(int _x, int _y, int _w, int _h, int _flags, int _f_id=-1)
Definition: window.cpp:140
ESCORT_CLEAR.
void audiostream_unpause_all(bool via_sexp_or_script=false)
Definition: audiostr.cpp:1990
end the mission
PADLOCK_DOWN.
TARGET_NEXT_BOMB.
Definition: ui.h:584
TWO_THIRDS_THROTTLE.
screen gr_screen
Definition: 2d.cpp:46
FIRE_PRIMARY.
Definition: ui.h:162
TIME_SPEED_UP.
#define GP_LAST_SCREEN_MULTI
int gr_get_font_height()
Definition: font.cpp:187
cycle to next primary weapon
char * text
describes the action in the config screen
#define KEY_DEBUGGED
Definition: key.h:65
void common_play_highlight_sound()
Definition: gamesnd.cpp:1151
decrease weapon recharge rate
void gameplay_help_blit_control_line_raw(int x, int y, const char *control_text, const char *control_description)
toggle auto-targeting
message all netplayers
MINUS_5_PERCENT_THROTTLE.
void gameplay_help_do_frame(float frametime)
transfer shield energy to left
target the next friendly ship
#define KEY_CTRLED
Definition: key.h:64
wingman message: capture current target
#define KEY_SPACEBAR
Definition: key.h:128
color Color_normal
Definition: alphacolors.cpp:28
VIEW_CHASE.
#define KEY_TAB
Definition: key.h:127
target the previous closest hostile
#define GP_HELP_BASIC_KEYS
TARGET_PREV_UNINSPECTED_CARGO.
wingman message: disable current target
LAUNCH_COUNTERMEASURE.
BANK_LEFT.
void gr_bitmap(int _x, int _y, int resize_mode)
Definition: 2d.cpp:1303
#define UI_XSTR_COLOR_GREEN
Definition: ui.h:160
BANK_WHEN_PRESSED.
wingman message: warp out
void gameplay_help_goto_next_screen()
cycle to next radar range
#define GP_LAST_SCREEN_SINGLE
void gameplay_help_close()
MAX_THROTTLE.
void gamesnd_play_iface(int n)
Definition: gamesnd.cpp:260
void audiostream_pause_all(bool via_sexp_or_script=false)
Definition: audiostr.cpp:1978
void draw()
Definition: window.cpp:220
#define NEXT_PAGE_BUTTON
int process(int key_in=-1, int process_mouse=1)
Definition: window.cpp:401
increase weapon recharge rate
#define GP_HELP_ADVANCED_TARGET_KEYS
void _cdecl gr_printf_menu(int x, int y, const char *format,...)
Definition: font.cpp:314
void gameseq_post_event(int event)
TARGET_NEXT_UNINSPECTED_CARGO.
transfer shield energy to rear
void gameplay_help_draw_text()
#define Y_START
target the next hostile target
#define GP_HELP_MOVEMENT_KEYS
transfer shield energy to front
GLint y
Definition: Gl.h:1505
PLUS_5_PERCENT_THROTTLE.
#define strcpy_s(...)
Definition: safe_strings.h:67