summaryrefslogtreecommitdiff
path: root/src/uqm/menustat.h
blob: 2aa864dd91f87abce254f0413ba411f19ff0b332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
//Copyright Paul Reiche, Fred Ford. 1992-2002

/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef UQM_MENUSTAT_H_
#define UQM_MENUSTAT_H_

#include "libs/gfxlib.h"
#include "libs/sndlib.h"
#include "flash.h"

#if defined(__cplusplus)
extern "C" {
#endif

typedef struct menu_state
{
	// Standard field required by DoInput()
	BOOLEAN (*InputFunc) (struct menu_state *pMS);

	SIZE Initialized;

	BYTE CurState;
	FRAME CurFrame;
	STRING CurString;
	POINT first_item;
	SIZE delta_item;

	FRAME ModuleFrame;
	RECT flash_rect0, flash_rect1;
	FRAME flash_frame0, flash_frame1;
	FlashContext *flashContext;

	MUSIC_REF hMusic;

	// For private use by various menus
	// Usually, a menu associates its internal data struct using this
	void *privData;

} MENU_STATE;

// XXX: Should probably go to menu.h (does not yet exist)
enum
{
	PM_SCAN = 0,
	PM_STARMAP,
	PM_DEVICES,
	PM_CARGO,
	PM_ROSTER,
	PM_GAME_MENU,
	PM_NAVIGATE,
	
	PM_MIN_SCAN,
	PM_ENE_SCAN,
	PM_BIO_SCAN,
	PM_EXIT_SCAN,
	PM_AUTO_SCAN,
	PM_LAUNCH_LANDER,

	PM_SAVE_GAME,
	PM_LOAD_GAME,
	PM_QUIT_GAME,
	PM_CHANGE_SETTINGS,
	PM_EXIT_GAME_MENU,

	PM_CONVERSE,
	PM_ATTACK,
	PM_ENCOUNTER_GAME_MENU,
	
	PM_FUEL,
	PM_MODULE,
	PM_OUTFIT_GAME_MENU,
	PM_EXIT_OUTFIT,
	
	PM_CREW,
	PM_SHIPYARD_GAME_MENU,
	PM_EXIT_SHIPYARD,
	
	PM_SOUND_ON,
	PM_SOUND_OFF,
	PM_MUSIC_ON,
	PM_MUSIC_OFF,
	PM_CYBORG_OFF,
	PM_CYBORG_NORMAL,
	PM_CYBORG_DOUBLE,
	PM_CYBORG_SUPER,
	PM_CHANGE_CAPTAIN,
	PM_CHANGE_SHIP,
	PM_EXIT_SETTINGS,

	PM_ALT_SCAN,
	PM_ALT_STARMAP,
	PM_ALT_MANIFEST,
	PM_ALT_GAME_MENU,
	PM_ALT_NAVIGATE,

	PM_ALT_CARGO,
	PM_ALT_DEVICES,
	PM_ALT_ROSTER,
	PM_ALT_EXIT_MANIFEST,

	PM_ALT_MSCAN,
	PM_ALT_ESCAN,
	PM_ALT_BSCAN,
	PM_ALT_ASCAN,
	PM_ALT_DISPATCH,
	PM_ALT_EXIT_SCAN,
};

extern BOOLEAN DoMenuChooser (MENU_STATE *pMS, BYTE BaseState);
extern void DrawMenuStateStrings (BYTE beg_index, SWORD NewState);

#if defined(__cplusplus)
}
#endif

#endif /* UQM_MENUSTAT_H_ */