Updated map system (read more)

Project compiles and runs, multiplayer works, but the map is not visible

There are a number of major changes to the map system, beth directly from the
jam branch and from the splicing process. The changes that are listed here have
been noted as they were added to the index for committing.

* tile_sheet.*pp moved from 'common/graphics/' to 'common/map/'
* Minor method and member name changes to TileSheet
* TileSheet has a lua API, but it isn't used anywhere
    NOTE: Nothing uses both lua and graphics, but a theoretical editor might
* Region API's glue functions have been changed from triggers to simple dummy
    methods. These should simply be over written.
* RegionPagerBase::GetRegion(int x, int y) now snaps it's parameters
    Presicely why is unknown, but I do remember there was a bug without it
* RegionPagerLua has been rewritten to use the Region API's methods, rather
    than the triggers.
* RegionPagerLua no longer stores the map's save directory, or passes it to the
    the Region API's methods.
* RegionPagerLua::luaState renamed to RegionPagerLua::lua
    conforms to changes elsewhere
* Removed the directory glue functions from the RegionPager API
* region_pager_api.hpp preprocessor guard changed
* Adjusted makefiles to account for TileSheet's movement
This commit is contained in:
Kayne Ruse
2014-07-31 18:01:50 +10:00
parent 66815016ba
commit 2b3ea5eb80
12 changed files with 179 additions and 97 deletions
+12 -13
View File
@@ -78,28 +78,27 @@ static int getDepth(lua_State* L) {
return 1;
}
static int onLoad(lua_State* L) {
//TODO: onLoad()
static int load(lua_State* L) {
//EMPTY
lua_pushboolean(L, false);
return 1;
}
static int onSave(lua_State* L) {
//TODO: onSave()
static int save(lua_State* L) {
//EMPTY
return 0;
}
static int onCreate(lua_State* L) {
//TODO: onCreate()
static int create(lua_State* L) {
//EMPTY
return 0;
}
static int onUnload(lua_State* L) {
//TODO: onUnload()
static int unload(lua_State* L) {
//EMPTY
return 0;
}
//TODO: wrappers for the collision map
static const luaL_Reg regionLib[] = {
{"SetTile",setTile},
{"GetTile",getTile},
@@ -110,10 +109,10 @@ static const luaL_Reg regionLib[] = {
{"GetWidth",getWidth},
{"GetHeight",getHeight},
{"GetDepth",getDepth},
{"OnLoad",onLoad},
{"OnSave",onSave},
{"OnCreate",onCreate},
{"OnUnload",onUnload},
{"Load",load},
{"Save",save},
{"Create",create},
{"Unload",unload},
{nullptr, nullptr}
};