Merge lua_mathlib.c

This commit is contained in:
Sally Coolatta 2020-08-05 14:04:34 -04:00
parent 3ad209a366
commit bb2fe60e0e

View file

@ -176,19 +176,11 @@ static int lib_all7emeralds(lua_State *L)
// Returns both color and signpost shade numbers!
static int lib_coloropposite(lua_State *L)
{
<<<<<<< HEAD
UINT8 colornum = (UINT8)luaL_checkinteger(L, 1);
if (colornum >= MAXSKINCOLORS)
return luaL_error(L, "skincolor %d out of range (0 - %d).", colornum, MAXSKINCOLORS-1);
lua_pushinteger(L, KartColor_Opposite[colornum*2]); // push color
lua_pushinteger(L, KartColor_Opposite[colornum*2+1]); // push frame
=======
UINT16 colornum = (UINT16)luaL_checkinteger(L, 1);
if (!colornum || colornum >= numskincolors)
return luaL_error(L, "skincolor %d out of range (1 - %d).", colornum, numskincolors-1);
lua_pushinteger(L, skincolors[colornum].invcolor); // push color
lua_pushinteger(L, skincolors[colornum].invshade); // push sign shade index, 0-15
>>>>>>> srb2/next
return 2;
}