File: menu.h

package info (click to toggle)
openssn 1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,340 kB
  • sloc: cpp: 10,973; makefile: 80
file content (56 lines) | stat: -rw-r--r-- 1,248 bytes parent folder | download | duplicates (3)
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
#ifndef MENU_HEADER_FILE__
#define MENU_HEADER_FILE__

#define ACTION_QUIT 1
#define ACTION_MISSION 2

#define BUTTON_PLAY 1
#define BUTTON_QUIT 2
#define BUTTON_PREV_MISSION 3
#define BUTTON_NEXT_MISSION 4
#define BUTTON_MOVE_UP 5
#define BUTTON_MOVE_DOWN 6
#define BUTTON_ACTIVATE 7

#define MISSION_PREVIOUS 1
#define MISSION_NEXT 2

#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif


// Returns one of the above actions
int Main_Menu(int *mission_number, SDL_Surface *screen);



// This function selects the next/previous mission
// It checks to make sure the mission files exist.
// The new mission number is returned on success and 
// the original mission number on failure.
int New_Mission(int next_prev, int old_mission);


// This function displays the description of a mission on the
// menu screen
int Display_Mission(int mission_number);


// This function draws the important buttons and keyboard
// cursor on the screen
// The "selected" parameter tells us which button is currently
// highlighted
int Draw_Main_Menu(int selected, Uint32 menu_colour);

// This function checks to see if we have any keyboard or
// mouse input. We return one of the "button" values
// defined above
int Menu_Input();


#endif