Bazaar developer reference

CvLuaMap::lGetGridSize(lua_State *)

Defined in
Lua/CvLuaMap.cpp, line 159
Class
CvLuaMap
Hook name
CivHooks::CvLuaMap_lGetGridSize

Hooks

static bool BeforeCvLuaMap_lGetGridSize(lua_State* L, int& result);static void AfterCvLuaMap_lGetGridSize(lua_State* L, int& result);static int ReplaceCvLuaMap_lGetGridSize(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaMap_lGetGridSize>(host, &BeforeCvLuaMap_lGetGridSize);CivRegisterAfter<CivHooks::CvLuaMap_lGetGridSize>(host, &AfterCvLuaMap_lGetGridSize);CivRegisterReplace<CivHooks::CvLuaMap_lGetGridSize>(host, &ReplaceCvLuaMap_lGetGridSize);

Code

159int CvLuaMap::lGetGridSize(lua_State* L)160{161	const int width  = GC.getMap().getGridWidth();162	const int height = GC.getMap().getGridHeight();163164	lua_pushinteger(L, width);165	lua_pushinteger(L, height);166	return 2;167}

Calls

Called by