Changeset 259 for trunk/src


Ignore:
Timestamp:
Jan 22, 2011, 6:02:25 PM (11 years ago)
Author:
sam
Message:

Slightly change the ...Data initialisation in classes.

Location:
trunk/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/debugfps.cpp

    r227 r259  
    3636
    3737DebugFps::DebugFps(int x, int y)
     38  : data(new DebugFpsData())
    3839{
    39     data = new DebugFpsData();
    40 
    4140    data->fontid = Forge::Register("gfx/font/ascii.png");
    4241    data->x = x;
  • trunk/src/debugrecord.cpp

    r221 r259  
    4444
    4545DebugRecord::DebugRecord(char const *path)
     46  : data(new DebugRecordData())
    4647{
    47     data = new DebugRecordData();
    4848    data->path = strdup(path);
    4949    data->width = 0;
  • trunk/src/debugsphere.cpp

    r221 r259  
    112112
    113113DebugSphere::DebugSphere()
     114  : data(new DebugSphereData())
    114115{
    115     data = new DebugSphereData();
    116116    data->time = 0.0f;
    117117}
  • trunk/src/debugstats.cpp

    r221 r259  
    3535
    3636DebugStats::DebugStats(char const *path)
     37  : data(new DebugStatsData())
    3738{
    38     data = new DebugStatsData();
    3939    data->fp = fopen(path, "w+");
    4040
  • trunk/src/dict.cpp

    r225 r259  
    5858
    5959Dict::Dict()
     60  : data(new DictData())
    6061{
    61     data = new DictData();
    6262}
    6363
  • trunk/src/font.cpp

    r221 r259  
    5050
    5151Font::Font(char const *path)
     52  : data(new FontData())
    5253{
    53     data = new FontData();
    5454    data->name = strdup(path);
    5555    data->img = NULL;
  • trunk/src/map.cpp

    r222 r259  
    4646
    4747Map::Map(char const *path)
     48  : data(new MapData())
    4849{
    49     data = new MapData();
    5050    data->ntilers = 0;
    5151    data->layers = NULL;
  • trunk/src/sample.cpp

    r253 r259  
    3838
    3939Sample::Sample(char const *path)
     40  : data(new SampleData())
    4041{
    41     data = new SampleData();
    4242    data->name = strdup(path);
    4343    data->chunk = Mix_LoadWAV(path);
  • trunk/src/scene.cpp

    r222 r259  
    6262
    6363Scene::Scene(float angle)
     64  : data(new SceneData())
    6465{
    65     data = new SceneData();
    6666    data->tiles = 0;
    6767    data->ntiles = 0;
  • trunk/src/sdlinput.cpp

    r238 r259  
    3535
    3636SdlInput::SdlInput()
     37  : data(new SdlInputData())
    3738{
    3839    SDL_Init(SDL_INIT_TIMER);
    3940
    40     data = new SdlInputData();
    4141    SDL_GetMouseState(&data->mx, &data->my);
    4242
  • trunk/src/tileset.cpp

    r222 r259  
    5555
    5656TileSet::TileSet(char const *path, int w, int h, float dilate)
     57  : data(new TileSetData())
    5758{
    58     data = new TileSetData();
    5959    data->name = strdup(path);
    6060    data->tiles = NULL;
  • trunk/src/timer.cpp

    r221 r259  
    103103
    104104Timer::Timer()
     105  : data(new TimerData())
    105106{
    106     data = new TimerData();
    107107}
    108108
  • trunk/src/world.cpp

    r221 r259  
    3737
    3838World::World()
     39  : data(new WorldData())
    3940{
    40     data = new WorldData();
    4141    data->width = 0;
    4242    data->height = 0;
Note: See TracChangeset for help on using the changeset viewer.