00001 /***************************************************************************** 00002 * $Id: config.h,v 1.1 2003/07/16 11:42:15 schou Exp $ 00003 * Author: Jakob Schou Jensen <schou@sourceforge.net> 00004 * Licence: GPL 00005 * 00006 * Description: Config 00007 * 00008 ****************************************************************************/ 00009 00010 #ifndef CONFIG_H 00011 #define CONFIG_H 00012 00013 #include <adsolua.h> 00014 00015 #ifdef ADSO_WINDOWS 00016 typedef unsigned short u_int16_t; 00017 #endif 00018 00019 #define DEFAULT_NETLINK_PORT 53340 00020 00021 #define CFG_NET_UNSPECIFIED 0 00022 #define CFG_NET_ENABLED 1 00023 #define CFG_NET_DISABLED 2 00024 00025 class ConfigLuaInterface : public AdsoLuaInterface { 00026 int luaCallback(lua_State *L, AdsoLuaUserData *ud); 00027 void luaSetupInterface(AdsoLua*); 00028 }; 00029 00030 class Config { 00031 public: 00032 int test_mode; 00033 int netbot_mode; 00034 int window_mode; 00035 int deathmatch; 00036 int grab_input; 00037 int enable_audio; 00038 int oggPreload; 00039 int oggNoOverlap; 00040 int session_net; 00041 int enable_netlink; 00042 int enable_opponent; 00043 int enable_ufo; 00044 int enable_distlpf; 00045 int enable_photon_sound; 00046 char *userName; 00047 char *localAddr; 00048 char *netbotRemoteAddr; 00049 u_int16_t netLinkPort; 00050 u_int16_t netLinkRemotePort; 00051 00052 // persistent 00053 unsigned int id; 00054 int appTime; 00055 int static_net; 00056 char default_remote_addr[32]; 00057 00058 int initAppTime; 00059 int newConfig; 00060 00061 void load(); 00062 void store(); 00063 Config(); 00064 }; 00065 00066 extern Config config; 00067 00068 #endif
1.3.2