I really don't know what to do here. I finally started putting the pieces together on my RPG. But, when I compile, I get one error:
c:\users\matthew\documents\visual studio 2008\projects\rpg\rpg\Game.h(9) : error C2059: syntax error : 'constant'
I checked, and I don't use the word constant once in all of my code. That line is creation of an object of the type cTileMap. Here is the cTileMap class definition:
#pragma once
#include <vector>
struct sTile
{
int type;
bool solid;
};
class cTileMap
{
protected:
int screen_tile_w, screen_tile_h;
int tile_width, tile_height;
int map_x_position, map_y_position;
std::vector<std::vector<sTile>> vTileMap;
public:
cTileMap ( ) { };
cTileMap ( int tile_width, int tile_height );
int get_type ( int x, int y ) { return vTileMap[x][y].type; }
int get_solid ( int x, int y ) { return vTileMap[x][y].solid; }
void set_type ( int x, int y, int value ) { vTileMap[x][y].type = value; }
void set_solid ( int x, int y, bool value ) { vTileMap[x][y].solid = value; }
int get_tile_width ( ) { return tile_width; }
int get_tile_height ( ) { return tile_height; }
int get_map_x_position ( ) { return map_x_position; }
int get_map_y_position ( ) { return map_y_position; }
void size_map ( int size );
int get_size ( ) { return ( int ) vTileMap.size ( ); }
void draw_map ( int x_start, int y_start );
bool scroll_map ( int direction );
//void scroll_map ( int x_end, int y_end, int speed );
//void scroll_map ( int x_start, int y_start, int x_end, int y_end, int speed );
void save_map ( char* file_name );
void load_map ( char* file_name );
};
I have no idea where the error is coming from.