diff options
Diffstat (limited to 'apps/plugins/doom/m_menu.h')
-rw-r--r-- | apps/plugins/doom/m_menu.h | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/apps/plugins/doom/m_menu.h b/apps/plugins/doom/m_menu.h new file mode 100644 index 0000000000..8444b72a5f --- /dev/null +++ b/apps/plugins/doom/m_menu.h | |||
@@ -0,0 +1,121 @@ | |||
1 | // Emacs style mode select -*- C++ -*- | ||
2 | //----------------------------------------------------------------------------- | ||
3 | // | ||
4 | // $Id$ | ||
5 | // | ||
6 | // Copyright (C) 1993-1996 by id Software, Inc. | ||
7 | // | ||
8 | // This program is free software; you can redistribute it and/or | ||
9 | // modify it under the terms of the GNU General Public License | ||
10 | // as published by the Free Software Foundation; either version 2 | ||
11 | // of the License, or (at your option) any later version. | ||
12 | // | ||
13 | // This program is distributed in the hope that it will be useful, | ||
14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | // GNU General Public License for more details. | ||
17 | // | ||
18 | // DESCRIPTION: | ||
19 | // Menu widget stuff, episode selection and such. | ||
20 | // | ||
21 | //----------------------------------------------------------------------------- | ||
22 | |||
23 | |||
24 | #ifndef __M_MENU__ | ||
25 | #define __M_MENU__ | ||
26 | |||
27 | |||
28 | |||
29 | #include "d_event.h" | ||
30 | |||
31 | // | ||
32 | // MENUS | ||
33 | // | ||
34 | // Called by main loop, | ||
35 | // saves config file and calls I_Quit when user exits. | ||
36 | // Even when the menu is not displayed, | ||
37 | // this can resize the view and change game parameters. | ||
38 | // Does all the real work of the menu interaction. | ||
39 | boolean M_Responder (event_t *ev); | ||
40 | |||
41 | |||
42 | // Called by main loop, | ||
43 | // only used for menu (skull cursor) animation. | ||
44 | void M_Ticker (void); | ||
45 | |||
46 | // Called by main loop, | ||
47 | // draws the menus directly into the screen buffer. | ||
48 | void M_Drawer (void); | ||
49 | |||
50 | // Called by D_DoomMain, | ||
51 | // loads the config file. | ||
52 | void M_Init (void); | ||
53 | |||
54 | // Called by intro code to force menu up upon a keypress, | ||
55 | // does nothing if menu is already up. | ||
56 | void M_StartControlPanel (void); | ||
57 | |||
58 | /**************************** | ||
59 | * | ||
60 | * The setup_group enum is used to show which 'groups' keys fall into so | ||
61 | * that you can bind a key differently in each 'group'. | ||
62 | */ | ||
63 | |||
64 | typedef enum { | ||
65 | m_null, // Has no meaning; not applicable | ||
66 | m_scrn, // A key can not be assigned to more than one action | ||
67 | m_map, // in the same group. A key can be assigned to one | ||
68 | m_menu, // action in one group, and another action in another. | ||
69 | } setup_group; | ||
70 | |||
71 | /**************************** | ||
72 | * | ||
73 | * phares 4/17/98: | ||
74 | * State definition for each item. | ||
75 | * This is the definition of the structure for each setup item. Not all | ||
76 | * fields are used by all items. | ||
77 | * | ||
78 | * A setup screen is defined by an array of these items specific to | ||
79 | * that screen. | ||
80 | * | ||
81 | * killough 11/98: | ||
82 | * | ||
83 | * Restructured to allow simpler table entries, | ||
84 | * and to Xref with defaults[] array in m_misc.c. | ||
85 | * Moved from m_menu.c to m_menu.h so that m_misc.c can use it. | ||
86 | */ | ||
87 | |||
88 | typedef struct setup_menu_s | ||
89 | { | ||
90 | const char *m_text; /* text to display */ | ||
91 | int m_flags; /* phares 4/17/98: flag bits S_* (defined above) */ | ||
92 | setup_group m_group; /* Group */ | ||
93 | short m_x; /* screen x position (left is 0) */ | ||
94 | short m_y; /* screen y position (top is 0) */ | ||
95 | |||
96 | union /* killough 11/98: The first field is a union of several types */ | ||
97 | { | ||
98 | const void *var; /* generic variable */ | ||
99 | int *m_key; /* key value, or 0 if not shown */ | ||
100 | const char *name; /* name */ | ||
101 | struct default_s *def; /* default[] table entry */ | ||
102 | struct setup_menu_s *menu; /* next or prev menu */ | ||
103 | } var; | ||
104 | |||
105 | int *m_mouse; /* mouse button value, or 0 if not shown */ | ||
106 | int *m_joy; /* joystick button value, or 0 if not shown */ | ||
107 | void (*action)(void); /* killough 10/98: function to call after changing */ | ||
108 | } setup_menu_t; | ||
109 | |||
110 | |||
111 | |||
112 | |||
113 | #endif | ||
114 | //----------------------------------------------------------------------------- | ||
115 | // | ||
116 | // $Log$ | ||
117 | // Revision 1.1 2006/03/28 15:44:01 dave | ||
118 | // Patch #2969 - Doom! Currently only working on the H300. | ||
119 | // | ||
120 | // | ||
121 | //----------------------------------------------------------------------------- | ||