Changeset 790 for trunk/deushax


Ignore:
Timestamp:
Jul 23, 2011, 11:14:40 PM (10 years ago)
Author:
sam
Message:

tileset: replace the Tiler ID system with real TileSet objects. The only
thing that is still broken is the Layer <--> Map interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/deushax/debugsprite.cpp

    r785 r790  
    2626private:
    2727    Game *game;
    28     int tiler;
     28    TileSet *tileset;
    2929    vec3 pos;
    3030};
     
    3939    data->game = game;
    4040    Ticker::Ref(game);
    41     data->tiler = Tiler::Register("deushax/art/test/character-dress.png",
    42                                   32, 0, sqrtf(2));
     41    data->tileset = Tiler::Register("deushax/art/test/character-dress.png",
     42                                    32, 0, sqrtf(2));
    4343    data->pos = vec3(320, 206, 0);
    4444}
     
    5858    vec3i pos = (vec3i)data->pos;
    5959
    60     Scene::GetDefault()->AddTile((data->tiler << 16) | 31,
     60    Scene::GetDefault()->AddTile(data->tileset, 31,
    6161                                 pos.x - 16, pos.y, pos.z, 1);
    62     Scene::GetDefault()->AddTile((data->tiler << 16) | 15,
     62    Scene::GetDefault()->AddTile(data->tileset, 15,
    6363                                 pos.x - 16, pos.y, pos.z + 32, 1);
    6464}
     
    6767{
    6868    Ticker::Unref(data->game);
    69     Tiler::Deregister(data->tiler);
     69    Tiler::Deregister(data->tileset);
    7070    delete data;
    7171}
Note: See TracChangeset for help on using the changeset viewer.