Merge branch 'the-scary-22-merge' of https://git.magicalgirl.moe/KartKrew/Kart into the-scary-22-merge

This commit is contained in:
Sally Coolatta 2020-08-11 10:57:56 -04:00
commit b7078fa8b6
2 changed files with 9 additions and 25 deletions

View file

@ -36,11 +36,7 @@ enum skin {
skin_followitem,
skin_starttranscolor,
skin_prefcolor,
skin_supercolor,
skin_prefoppositecolor,
skin_highresscale,
skin_contspeed,
skin_contangle,
skin_highresscale,
skin_soundsid,
skin_availability
};
@ -62,11 +58,7 @@ static const char *const skin_opt[] = {
"followitem",
"starttranscolor",
"prefcolor",
"supercolor",
"prefoppositecolor",
"highresscale",
"contspeed",
"contangle",
"soundsid",
"availability",
NULL};
@ -77,6 +69,7 @@ static int skin_get(lua_State *L)
{
skin_t *skin = *((skin_t **)luaL_checkudata(L, 1, META_SKIN));
enum skin field = luaL_checkoption(L, 2, NULL, skin_opt);
INT32 i;
// skins are always valid, only added, never removed
I_Assert(skin != NULL);
@ -128,7 +121,7 @@ static int skin_get(lua_State *L)
case skin_kartweight:
lua_pushinteger(L, skin->kartweight);
break;
//
//
case skin_followitem:
lua_pushinteger(L, skin->followitem);
break;
@ -138,21 +131,9 @@ static int skin_get(lua_State *L)
case skin_prefcolor:
lua_pushinteger(L, skin->prefcolor);
break;
case skin_supercolor:
lua_pushinteger(L, skin->supercolor);
break;
case skin_prefoppositecolor:
lua_pushinteger(L, skin->prefoppositecolor);
break;
case skin_highresscale:
lua_pushinteger(L, skin->highresscale);
break;
case skin_contspeed:
lua_pushinteger(L, skin->contspeed);
break;
case skin_contangle:
lua_pushinteger(L, skin->contangle);
break;
case skin_soundsid:
LUA_PushUserdata(L, skin->soundsid, META_SOUNDSID);
break;

View file

@ -37,18 +37,19 @@ typedef struct
skinflags_t flags;
char realname[SKINNAMESIZE+1]; // Display name for level completion.
char hudname[SKINNAMESIZE+1]; // HUD name to display (officially exactly 5 characters long)
char facerank[9], facewant[9], facemmap[9]; // Arbitrarily named patch lumps
// SRB2kart
UINT8 kartspeed;
UINT8 kartweight;
//
INT32 followitem;
// Definable color translation table
UINT8 starttranscolor;
UINT16 prefcolor;
UINT16 supercolor;
UINT16 prefoppositecolor; // if 0 use tables instead
fixed_t highresscale; // scale of highres, default is 0.5
// specific sounds per skin
@ -59,6 +60,8 @@ typedef struct
spriteinfo_t sprinfo[NUMPLAYERSPRITES*2];
char rivals[SKINRIVALS][SKINNAMESIZE+1]; // Your top 3 rivals for GP mode. Uses names so that you can reference skins that aren't added
UINT8 availability; // lock?
} skin_t;
/// Externs