00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef TILEDATA_H
00030 #define TILEDATA_H
00031
00032 #define TILEDATA_DEBUG 0 // 1 activates debug printing statments
00033
00034 #include <stdio.h>
00035 #include <iostream>
00036 #include <stdlib.h>
00037 #include <string>
00038 #include "SDL.h"
00039 #include "SDL_image.h"
00040
00041 #include "misc.h"
00042 using std::string;
00043 using namespace std;
00044
00045 class Tiledata{
00046 private:
00047 string name;
00048 int frames;
00049 tile_info *info;
00050 public:
00051 SDL_Surface **tile;
00052
00053 public:
00054 Tiledata();
00055 ~Tiledata();
00056 string get_name ();
00057 void set_name (char* tilename);
00058 int get_frames ();
00059 void set_frames (int num_frames);
00060 void set_num_images (int number);
00061 int load_image (int img_index, char *filename, int transparent);
00062 SDL_Surface* get_image (int index);
00063 void set_tile_info (tile_info* ti);
00064 tile_info* get_tile_info ();
00065 int get_width ();
00066 int get_height ();
00067 };
00068
00069 #endif
00070
00071
00072