@@ -35,9 +35,8 @@ private: | |||||
*/ | */ | ||||
DebugFps::DebugFps(int x, int y) | DebugFps::DebugFps(int x, int y) | ||||
: data(new DebugFpsData()) | |||||
{ | { | ||||
data = new DebugFpsData(); | |||||
data->fontid = Forge::Register("gfx/font/ascii.png"); | data->fontid = Forge::Register("gfx/font/ascii.png"); | ||||
data->x = x; | data->x = x; | ||||
data->y = y; | data->y = y; | ||||
@@ -43,8 +43,8 @@ private: | |||||
*/ | */ | ||||
DebugRecord::DebugRecord(char const *path) | DebugRecord::DebugRecord(char const *path) | ||||
: data(new DebugRecordData()) | |||||
{ | { | ||||
data = new DebugRecordData(); | |||||
data->path = strdup(path); | data->path = strdup(path); | ||||
data->width = 0; | data->width = 0; | ||||
data->height = 0; | data->height = 0; | ||||
@@ -111,8 +111,8 @@ GLuint const DebugSphereData::tindices[20][3] = | |||||
*/ | */ | ||||
DebugSphere::DebugSphere() | DebugSphere::DebugSphere() | ||||
: data(new DebugSphereData()) | |||||
{ | { | ||||
data = new DebugSphereData(); | |||||
data->time = 0.0f; | data->time = 0.0f; | ||||
} | } | ||||
@@ -34,8 +34,8 @@ private: | |||||
*/ | */ | ||||
DebugStats::DebugStats(char const *path) | DebugStats::DebugStats(char const *path) | ||||
: data(new DebugStatsData()) | |||||
{ | { | ||||
data = new DebugStatsData(); | |||||
data->fp = fopen(path, "w+"); | data->fp = fopen(path, "w+"); | ||||
gamegroup = GAMEGROUP_AFTER; | gamegroup = GAMEGROUP_AFTER; | ||||
@@ -57,8 +57,8 @@ private: | |||||
*/ | */ | ||||
Dict::Dict() | Dict::Dict() | ||||
: data(new DictData()) | |||||
{ | { | ||||
data = new DictData(); | |||||
} | } | ||||
Dict::~Dict() | Dict::~Dict() | ||||
@@ -49,8 +49,8 @@ private: | |||||
*/ | */ | ||||
Font::Font(char const *path) | Font::Font(char const *path) | ||||
: data(new FontData()) | |||||
{ | { | ||||
data = new FontData(); | |||||
data->name = strdup(path); | data->name = strdup(path); | ||||
data->img = NULL; | data->img = NULL; | ||||
@@ -45,8 +45,8 @@ private: | |||||
*/ | */ | ||||
Map::Map(char const *path) | Map::Map(char const *path) | ||||
: data(new MapData()) | |||||
{ | { | ||||
data = new MapData(); | |||||
data->ntilers = 0; | data->ntilers = 0; | ||||
data->layers = NULL; | data->layers = NULL; | ||||
data->nlayers = 0; | data->nlayers = 0; | ||||
@@ -37,8 +37,8 @@ private: | |||||
*/ | */ | ||||
Sample::Sample(char const *path) | Sample::Sample(char const *path) | ||||
: data(new SampleData()) | |||||
{ | { | ||||
data = new SampleData(); | |||||
data->name = strdup(path); | data->name = strdup(path); | ||||
data->chunk = Mix_LoadWAV(path); | data->chunk = Mix_LoadWAV(path); | ||||
} | } | ||||
@@ -61,8 +61,8 @@ private: | |||||
*/ | */ | ||||
Scene::Scene(float angle) | Scene::Scene(float angle) | ||||
: data(new SceneData()) | |||||
{ | { | ||||
data = new SceneData(); | |||||
data->tiles = 0; | data->tiles = 0; | ||||
data->ntiles = 0; | data->ntiles = 0; | ||||
data->angle = angle; | data->angle = angle; | ||||
@@ -34,10 +34,10 @@ private: | |||||
*/ | */ | ||||
SdlInput::SdlInput() | SdlInput::SdlInput() | ||||
: data(new SdlInputData()) | |||||
{ | { | ||||
SDL_Init(SDL_INIT_TIMER); | SDL_Init(SDL_INIT_TIMER); | ||||
data = new SdlInputData(); | |||||
SDL_GetMouseState(&data->mx, &data->my); | SDL_GetMouseState(&data->mx, &data->my); | ||||
gamegroup = GAMEGROUP_BEFORE; | gamegroup = GAMEGROUP_BEFORE; | ||||
@@ -54,8 +54,8 @@ private: | |||||
*/ | */ | ||||
TileSet::TileSet(char const *path, int w, int h, float dilate) | TileSet::TileSet(char const *path, int w, int h, float dilate) | ||||
: data(new TileSetData()) | |||||
{ | { | ||||
data = new TileSetData(); | |||||
data->name = strdup(path); | data->name = strdup(path); | ||||
data->tiles = NULL; | data->tiles = NULL; | ||||
data->img = NULL; | data->img = NULL; | ||||
@@ -102,8 +102,8 @@ private: | |||||
*/ | */ | ||||
Timer::Timer() | Timer::Timer() | ||||
: data(new TimerData()) | |||||
{ | { | ||||
data = new TimerData(); | |||||
} | } | ||||
Timer::~Timer() | Timer::~Timer() | ||||
@@ -36,8 +36,8 @@ private: | |||||
*/ | */ | ||||
World::World() | World::World() | ||||
: data(new WorldData()) | |||||
{ | { | ||||
data = new WorldData(); | |||||
data->width = 0; | data->width = 0; | ||||
data->height = 0; | data->height = 0; | ||||