Browse Source

TileSet is now a child of Asset.

legacy
Sam Hocevar sam 14 years ago
parent
commit
cf1f5d500f
2 changed files with 3 additions and 16 deletions
  1. +0
    -12
      src/tileset.cpp
  2. +3
    -4
      src/tileset.h

+ 0
- 12
src/tileset.cpp View File

@@ -27,7 +27,6 @@ class TileSetData


private: private:
char *name; char *name;
int ref;
int *tiles; int *tiles;
int ntiles; int ntiles;


@@ -43,7 +42,6 @@ TileSet::TileSet(char const *path)
{ {
data = new TileSetData(); data = new TileSetData();
data->name = strdup(path); data->name = strdup(path);
data->ref = 0;
data->tiles = NULL; data->tiles = NULL;
data->ntiles = 0; data->ntiles = 0;
data->img = NULL; data->img = NULL;
@@ -77,16 +75,6 @@ TileSet::~TileSet()
delete data; delete data;
} }


void TileSet::Ref()
{
data->ref++;
}

int TileSet::Unref()
{
return --data->ref;
}

char const *TileSet::GetName() char const *TileSet::GetName()
{ {
return data->name; return data->name;


+ 3
- 4
src/tileset.h View File

@@ -8,17 +8,16 @@


#include <stdint.h> #include <stdint.h>


#include "asset.h"

class TileSetData; class TileSetData;


class TileSet
class TileSet : public Asset
{ {
public: public:
TileSet(char const *path); TileSet(char const *path);
~TileSet(); ~TileSet();


void Ref();
int Unref();

char const *GetName(); char const *GetName();


void BlitTile(uint32_t id, int x, int y); void BlitTile(uint32_t id, int x, int y);


Loading…
Cancel
Save