move some parameters into GameParams.h

This commit is contained in:
Josh Holtrop 2012-11-04 08:14:59 -05:00
parent 412b84e268
commit bab60ed0bb
5 changed files with 13 additions and 8 deletions

View File

@ -7,6 +7,7 @@
#include "Client.h"
#include "ccfs.h"
#include "HexTile.h"
#include "GameParams.h"
using namespace std;

View File

@ -7,14 +7,10 @@
#include <math.h>
#include "Client.h"
#include "Types.h"
#include "GameParams.h"
using namespace std;
/* TODO: this should be moved to common somewhere */
#define MAX_SHOT_DISTANCE 250.0
#define SHOT_EXPAND_SPEED 75.0
#define DEFAULT_PORT 59243
Client::Client(const string & exe_path)
{
m_client_has_focus = true;

View File

@ -17,8 +17,6 @@
#include "Network.h"
#include <SFGUI/SFGUI.hpp>
#define SHOT_RING_WIDTH 10.0f
enum
{
MAIN_MENU_NONE,

9
src/common/GameParams.h Normal file
View File

@ -0,0 +1,9 @@
#ifndef GAMEPARAMS_H
#define GAMEPARAMS_H
#define DEFAULT_PORT 59243
#define MAX_SHOT_DISTANCE 250.0
#define SHOT_EXPAND_SPEED 75.0
#define SHOT_RING_WIDTH 10.0f
#endif

View File

@ -1,10 +1,11 @@
#include <getopt.h>
#include <stdlib.h>
#include "Server.h"
#include "GameParams.h"
int main(int argc, char *argv[])
{
int port = 59243;
int port = DEFAULT_PORT;
for (;;)
{
static struct option long_options[] = {