File: menu.h

package info (click to toggle)
ketm 0.0.6-17sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 9,356 kB
  • ctags: 875
  • sloc: ansic: 7,303; sh: 410; makefile: 185
file content (53 lines) | stat: -rw-r--r-- 1,009 bytes parent folder | download
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
#ifndef _MENU_H_
#define _MENU_H_
#include <SDL/SDL.h>
#include <stdlib.h>
#include <math.h>

#include "support.h"
#include "font.h"
#include "sprite.h"
#include "particle.h"
#include "fps.h"

/* Menues */
enum _menu_states { MEN_START, MEN_PAUSE, MEN_OPTION, MEN_VOLUME, MEN_DIFF };

typedef struct {
	/** @dia:route 0,2;h,7,7,-3,8,3 */
	SPRITE *opts[20][5];
	SDL_Surface *opts_surface[20];
	SDL_Surface *bg;
	int active_item;
	int select_finish;
	int nopt;
	int alpha;
	int alphadir;
	int fadeout;
	int timeout;
} MENU;

typedef struct {
	int i0;
	int i1;
	int i2;
	int i3;
} MENU_DATA;

void menusystem_init();
void menu_init();
void menu_work();
void startmenu_init();
void startmenu_work();
void pausemenu_init();
void pausemenu_work();
void optionmenu_init();
void optionmenu_work();
void volumemenu_init();
void volumemenu_work();
void difficultymenu_init();
void difficultymenu_work();
void genericmenu_init(char *options[], MENU *m, int fadeout, int timeout);
void genericmenu_work(MENU *m);
#endif