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

View file

@ -37,18 +37,19 @@ typedef struct
skinflags_t flags; skinflags_t flags;
char realname[SKINNAMESIZE+1]; // Display name for level completion. 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 kartspeed;
UINT8 kartweight; UINT8 kartweight;
//
INT32 followitem; INT32 followitem;
// Definable color translation table // Definable color translation table
UINT8 starttranscolor; UINT8 starttranscolor;
UINT16 prefcolor; UINT16 prefcolor;
UINT16 supercolor;
UINT16 prefoppositecolor; // if 0 use tables instead
fixed_t highresscale; // scale of highres, default is 0.5 fixed_t highresscale; // scale of highres, default is 0.5
// specific sounds per skin // specific sounds per skin
@ -59,6 +60,8 @@ typedef struct
spriteinfo_t sprinfo[NUMPLAYERSPRITES*2]; 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 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; } skin_t;
/// Externs /// Externs