Merge pull request #68 from Yukitty/revert-Lua-angles

Revert "Change angle_t handling in Lua."
This commit is contained in:
Alam Arias 2016-03-09 11:58:51 -05:00
commit 771c1ecb8a
2 changed files with 33 additions and 33 deletions

View File

@ -7266,36 +7266,36 @@ struct {
{"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop. {"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
// Angles // Angles
{"ANG1",ANG1>>16}, {"ANG1",ANG1},
{"ANG2",ANG2>>16}, {"ANG2",ANG2},
{"ANG10",ANG10>>16}, {"ANG10",ANG10},
{"ANG15",ANG15>>16}, {"ANG15",ANG15},
{"ANG20",ANG20>>16}, {"ANG20",ANG20},
{"ANG30",ANG30>>16}, {"ANG30",ANG30},
{"ANG60",ANG60>>16}, {"ANG60",ANG60},
{"ANG64h",ANG64h>>16}, {"ANG64h",ANG64h},
{"ANG105",ANG105>>16}, {"ANG105",ANG105},
{"ANG210",ANG210>>16}, {"ANG210",ANG210},
{"ANG255",ANG255>>16}, {"ANG255",ANG255},
{"ANG340",ANG340>>16}, {"ANG340",ANG340},
{"ANG350",ANG350>>16}, {"ANG350",ANG350},
{"ANGLE_11hh",ANGLE_11hh>>16}, {"ANGLE_11hh",ANGLE_11hh},
{"ANGLE_22h",ANGLE_22h>>16}, {"ANGLE_22h",ANGLE_22h},
{"ANGLE_45",ANGLE_45>>16}, {"ANGLE_45",ANGLE_45},
{"ANGLE_67h",ANGLE_67h>>16}, {"ANGLE_67h",ANGLE_67h},
{"ANGLE_90",ANGLE_90>>16}, {"ANGLE_90",ANGLE_90},
{"ANGLE_112h",ANGLE_112h>>16}, {"ANGLE_112h",ANGLE_112h},
{"ANGLE_135",ANGLE_135>>16}, {"ANGLE_135",ANGLE_135},
{"ANGLE_157h",ANGLE_157h>>16}, {"ANGLE_157h",ANGLE_157h},
{"ANGLE_180",ANGLE_180>>16}, {"ANGLE_180",ANGLE_180},
{"ANGLE_202h",ANGLE_202h>>16}, {"ANGLE_202h",ANGLE_202h},
{"ANGLE_225",ANGLE_225>>16}, {"ANGLE_225",ANGLE_225},
{"ANGLE_247h",ANGLE_247h>>16}, {"ANGLE_247h",ANGLE_247h},
{"ANGLE_270",ANGLE_270>>16}, {"ANGLE_270",ANGLE_270},
{"ANGLE_292h",ANGLE_292h>>16}, {"ANGLE_292h",ANGLE_292h},
{"ANGLE_315",ANGLE_315>>16}, {"ANGLE_315",ANGLE_315},
{"ANGLE_337h",ANGLE_337h>>16}, {"ANGLE_337h",ANGLE_337h},
{"ANGLE_MAX",ANGLE_MAX>>16}, {"ANGLE_MAX",ANGLE_MAX},
// P_Chase directions (dirtype_t) // P_Chase directions (dirtype_t)
{"DI_NODIR",DI_NODIR}, {"DI_NODIR",DI_NODIR},

View File

@ -30,9 +30,9 @@
#define lua_pushfixed(L, f) lua_pushinteger(L, f) #define lua_pushfixed(L, f) lua_pushinteger(L, f)
// angle_t casting // angle_t casting
// we reduce the angle to a fixed point between 0.0 and 1.0 // TODO deal with signedness
#define luaL_checkangle(L, i) (((angle_t)(luaL_checkfixed(L, i)&0xFFFF))<<16) #define luaL_checkangle(L, i) ((angle_t)luaL_checkinteger(L, i))
#define lua_pushangle(L, a) lua_pushfixed(L, a>>16) #define lua_pushangle(L, a) lua_pushinteger(L, a)
#ifdef _DEBUG #ifdef _DEBUG
void LUA_ClearExtVars(void); void LUA_ClearExtVars(void);