2011-05-21 18:20:04 +02:00
|
|
|
/*
|
|
|
|
* This software is licensed under the terms of the MIT-License
|
|
|
|
* See COPYING for further information.
|
|
|
|
* ---
|
|
|
|
* Copyright (C) 2011, Lukas Weber <laochailan@web.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
|
|
|
|
|
|
|
#include <SDL/SDL_keysym.h>
|
|
|
|
#include "parser.h"
|
|
|
|
|
|
|
|
typedef struct Config {
|
2012-07-29 22:39:52 +02:00
|
|
|
int intval[64];
|
|
|
|
char* strval[64];
|
2011-05-21 18:20:04 +02:00
|
|
|
} Config;
|
|
|
|
|
|
|
|
extern Config tconfig;
|
|
|
|
|
2012-07-30 16:26:04 +02:00
|
|
|
/*
|
|
|
|
* <Akari> IMPORTANT: When adding new controls, ALWAYS add them RIGHT AFTER the last KEY_* constant.
|
|
|
|
* Not doing so will likely break replays! And don't forget to update CONFIG_KEY_LAST below.
|
|
|
|
*/
|
|
|
|
|
2011-05-21 18:20:04 +02:00
|
|
|
enum {
|
|
|
|
KEY_UP = 0,
|
|
|
|
KEY_DOWN,
|
|
|
|
KEY_LEFT,
|
|
|
|
KEY_RIGHT,
|
|
|
|
KEY_FOCUS,
|
|
|
|
KEY_SHOT,
|
2011-06-27 13:36:35 +02:00
|
|
|
KEY_BOMB,
|
|
|
|
|
2011-07-02 16:06:10 +02:00
|
|
|
KEY_FULLSCREEN,
|
2011-07-02 18:36:08 +02:00
|
|
|
KEY_SCREENSHOT,
|
2012-07-30 16:26:04 +02:00
|
|
|
KEY_SKIP,
|
2011-07-02 16:06:10 +02:00
|
|
|
|
2011-06-29 17:01:03 +02:00
|
|
|
FULLSCREEN,
|
|
|
|
|
2011-06-27 13:36:35 +02:00
|
|
|
NO_SHADER,
|
2012-07-13 20:32:47 +02:00
|
|
|
NO_AUDIO,
|
|
|
|
|
2012-07-13 22:42:35 +02:00
|
|
|
NO_STAGEBG,
|
2012-07-16 17:47:06 +02:00
|
|
|
NO_STAGEBG_FPSLIMIT,
|
|
|
|
|
2012-07-28 22:53:53 +02:00
|
|
|
SAVE_RPY,
|
|
|
|
|
|
|
|
VID_WIDTH,
|
|
|
|
VID_HEIGHT,
|
2012-07-29 22:39:52 +02:00
|
|
|
|
|
|
|
PLAYERNAME
|
2011-05-21 18:20:04 +02:00
|
|
|
};
|
|
|
|
|
2011-12-29 09:37:17 +01:00
|
|
|
void parse_config(char *filename);
|
2011-05-21 18:20:04 +02:00
|
|
|
void config_preset();
|
|
|
|
|
2012-07-14 16:37:52 +02:00
|
|
|
#define CONFIG_KEY_FIRST KEY_UP
|
2012-07-30 16:26:04 +02:00
|
|
|
#define CONFIG_KEY_LAST KEY_SKIP
|
|
|
|
|
2012-07-14 16:37:52 +02:00
|
|
|
int config_sym2key(int sym);
|
|
|
|
|
2011-07-02 16:06:10 +02:00
|
|
|
#endif
|