Increase portability as per SDL standards, add a window title
This commit is contained in:
parent
718941eacd
commit
6560b1c28b
4
Makefile
4
Makefile
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
PROJECT=graphgame
|
PROJECT=graphgame
|
||||||
CXX=g++
|
CXX=g++
|
||||||
CXXFLAGS=-DDEBUG -g
|
CXXFLAGS=-DDEBUG -g `sdl-config --cflags`
|
||||||
LDFLAGS=-lSDL
|
LDFLAGS=`sdl-config --libs`
|
||||||
OBJECTS=drawutils.o gamecore.o graph.o main.o mainevent.o mathutils.o gamedata.o sdlrenderer.o
|
OBJECTS=drawutils.o gamecore.o graph.o main.o mainevent.o mathutils.o gamedata.o sdlrenderer.o
|
||||||
|
|
||||||
all: $(PROJECT)
|
all: $(PROJECT)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef _DRAWUTILS_H_
|
#ifndef _DRAWUTILS_H_
|
||||||
#define _DRAWUTILS_H_
|
#define _DRAWUTILS_H_
|
||||||
|
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "gamecore.h"
|
#include "gamecore.h"
|
||||||
#include "mathutils.h"
|
#include "mathutils.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
int GameCore::MAX_MOVE_DISTANCE = 100;
|
int GameCore::MAX_MOVE_DISTANCE = 100;
|
||||||
int GameCore::NODE_RADIUS = 12;
|
int GameCore::NODE_RADIUS = 12;
|
||||||
|
@ -34,7 +34,7 @@ int GameCore::execute()
|
||||||
bool GameCore::init()
|
bool GameCore::init()
|
||||||
{
|
{
|
||||||
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return false;
|
if (SDL_Init(SDL_INIT_EVERYTHING) < 0) return false;
|
||||||
|
SDL_WM_SetCaption("TreeWars","TreeWars");
|
||||||
return renderer.init();
|
return renderer.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#ifndef _MAINEVENT_H_
|
#ifndef _MAINEVENT_H_
|
||||||
#define _MAINEVENT_H_
|
#define _MAINEVENT_H_
|
||||||
|
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
class MainEvent
|
class MainEvent
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user