Ignore:
Timestamp:
Jul 23, 2011, 11:14:40 PM (9 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/src/font.cpp

    r787 r790  
    3333private:
    3434    char *name;
    35     int tiler;
     35    TileSet *tileset;
    3636    vec2i size;
    3737};
     
    4747    sprintf(data->name, "<font> %s", path);
    4848
    49     data->tiler = Tiler::Register(path, 0, 16, 1.0f);
    50     data->size = Tiler::GetSize(data->tiler, 0);
     49    data->tileset = Tiler::Register(path, 0, 16, 1.0f);
     50    data->size = data->tileset->GetSize(0);
    5151
    5252    drawgroup = DRAWGROUP_BEFORE;
     
    5555Font::~Font()
    5656{
    57     Tiler::Deregister(data->tiler);
     57    Tiler::Deregister(data->tileset);
    5858    free(data->name);
    5959    delete data;
     
    7979
    8080        if (ch != ' ')
    81             scene->AddTile((data->tiler << 16) | (ch & 255),
     81            scene->AddTile(data->tileset, ch & 255,
    8282                           pos.x, pos.y, pos.z, 0);
    8383
Note: See TracChangeset for help on using the changeset viewer.