Ignore:
Timestamp:
Jul 6, 2010, 11:37:47 PM (11 years ago)
Author:
sam
Message:

Support CSV .tmx files to get rid of that pathetic system() call.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/tileset.cpp

    • Property svn:keywords set to Id
    r73 r74  
    1717#include <malloc.h>
    1818
    19 #include "tiler.h"
     19#include "tileset.h"
    2020
    2121/*
    22  * Tiler implementation class
     22 * Tileset implementation class
    2323 */
    2424
    25 class TilerData
     25class TilesetData
    2626{
    27     friend class Tiler;
     27    friend class Tileset;
    2828
    2929private:
     
    4444
    4545/*
    46  * Public Tiler class
     46 * Public Tileset class
    4747 */
    4848
    49 Tiler::Tiler()
     49Tileset::Tileset()
    5050{
    51     data = new TilerData();
     51    data = new TilesetData();
    5252    data->tiles = NULL;
    5353    data->ntiles = 0;
     
    7575}
    7676
    77 Tiler::~Tiler()
     77Tileset::~Tileset()
    7878{
    7979    free(data->tiles);
     
    8181}
    8282
    83 void Tiler::AddTile(int n, int x, int y, int z)
     83void Tileset::AddTile(int n, int x, int y, int z)
    8484{
    8585    if ((data->ntiles % 1024) == 0)
     
    9797}
    9898
    99 void Tiler::Render()
     99void Tileset::Render()
    100100{
    101101    /* Sort tiles */
    102     qsort(data->tiles, data->ntiles, 4 * sizeof(int), TilerData::Compare);
     102    qsort(data->tiles, data->ntiles, 4 * sizeof(int), TilesetData::Compare);
    103103
    104104    /* Texture coord buffer */
Note: See TracChangeset for help on using the changeset viewer.