mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Clean up the skin_t struct
This commit is contained in:
parent
3873635629
commit
75661f44d7
4 changed files with 66 additions and 66 deletions
|
@ -5113,17 +5113,17 @@ void G_GhostTicker(void)
|
|||
INT32 type = -1;
|
||||
if (g->mo->skin)
|
||||
{
|
||||
skin_t *skin = (skin_t *)g->mo->skin;
|
||||
//skin_t *skin = (skin_t *)g->mo->skin;
|
||||
switch (ziptic & EZT_THOKMASK)
|
||||
{
|
||||
case EZT_THOK:
|
||||
type = skin->thokitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].painchance : (UINT32)skin->thokitem;
|
||||
type = (UINT32)mobjinfo[MT_PLAYER].painchance; // skin->thokitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].painchance : (UINT32)skin->thokitem;
|
||||
break;
|
||||
case EZT_SPIN:
|
||||
type = skin->spinitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].damage : (UINT32)skin->spinitem;
|
||||
type = (UINT32)mobjinfo[MT_PLAYER].damage; // skin->spinitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].damage : (UINT32)skin->spinitem;
|
||||
break;
|
||||
case EZT_REV:
|
||||
type = skin->revitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].raisestate : (UINT32)skin->revitem;
|
||||
type = (UINT32)mobjinfo[MT_PLAYER].raisestate; // skin->revitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].raisestate : (UINT32)skin->revitem;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,24 +30,24 @@ enum skin {
|
|||
skin_facerank,
|
||||
skin_facewant,
|
||||
skin_facemmap,
|
||||
skin_ability,
|
||||
/*skin_ability,
|
||||
skin_ability2,
|
||||
skin_thokitem,
|
||||
skin_spinitem,
|
||||
skin_revitem,
|
||||
skin_actionspd,
|
||||
skin_mindash,
|
||||
skin_maxdash,
|
||||
skin_maxdash,*/
|
||||
// SRB2kart
|
||||
skin_kartspeed,
|
||||
skin_kartweight,
|
||||
//
|
||||
skin_normalspeed,
|
||||
/*skin_normalspeed,
|
||||
skin_runspeed,
|
||||
skin_thrustfactor,
|
||||
skin_accelstart,
|
||||
skin_acceleration,
|
||||
skin_jumpfactor,
|
||||
skin_jumpfactor,*/
|
||||
skin_starttranscolor,
|
||||
skin_prefcolor,
|
||||
skin_highresscale,
|
||||
|
@ -64,24 +64,24 @@ static const char *const skin_opt[] = {
|
|||
"facerank",
|
||||
"facewant",
|
||||
"facemmap",
|
||||
"ability",
|
||||
/*"ability",
|
||||
"ability2",
|
||||
"thokitem",
|
||||
"spinitem",
|
||||
"revitem",
|
||||
"actionspd",
|
||||
"mindash",
|
||||
"maxdash",
|
||||
"maxdash",*/
|
||||
// SRB2kart
|
||||
"kartspeed",
|
||||
"kartweight",
|
||||
//
|
||||
"normalspeed",
|
||||
/*"normalspeed",
|
||||
"runspeed",
|
||||
"thrustfactor",
|
||||
"accelstart",
|
||||
"acceleration",
|
||||
"jumpfactor",
|
||||
"jumpfactor",*/
|
||||
"starttranscolor",
|
||||
"prefcolor",
|
||||
"highresscale",
|
||||
|
@ -139,7 +139,7 @@ static int skin_get(lua_State *L)
|
|||
break;
|
||||
lua_pushlstring(L, skin->facemmap, i);
|
||||
break;
|
||||
case skin_ability:
|
||||
/*case skin_ability:
|
||||
lua_pushinteger(L, skin->ability);
|
||||
break;
|
||||
case skin_ability2:
|
||||
|
@ -162,7 +162,7 @@ static int skin_get(lua_State *L)
|
|||
break;
|
||||
case skin_maxdash:
|
||||
lua_pushfixed(L, skin->maxdash);
|
||||
break;
|
||||
break;*/
|
||||
// SRB2kart
|
||||
case skin_kartspeed:
|
||||
lua_pushinteger(L, skin->kartspeed);
|
||||
|
@ -171,7 +171,7 @@ static int skin_get(lua_State *L)
|
|||
lua_pushinteger(L, skin->kartweight);
|
||||
break;
|
||||
//
|
||||
case skin_normalspeed:
|
||||
/*case skin_normalspeed:
|
||||
lua_pushfixed(L, skin->normalspeed);
|
||||
break;
|
||||
case skin_runspeed:
|
||||
|
@ -188,7 +188,7 @@ static int skin_get(lua_State *L)
|
|||
break;
|
||||
case skin_jumpfactor:
|
||||
lua_pushfixed(L, skin->jumpfactor);
|
||||
break;
|
||||
break;*/
|
||||
case skin_starttranscolor:
|
||||
lua_pushinteger(L, skin->starttranscolor);
|
||||
break;
|
||||
|
|
|
@ -2537,22 +2537,22 @@ static void Sk_SetDefaultValue(skin_t *skin)
|
|||
skin->kartweight = 5;
|
||||
//
|
||||
|
||||
skin->normalspeed = 36<<FRACBITS;
|
||||
skin->runspeed = 28<<FRACBITS;
|
||||
skin->thrustfactor = 5;
|
||||
skin->accelstart = 96;
|
||||
skin->acceleration = 40;
|
||||
//skin->normalspeed = 36<<FRACBITS;
|
||||
//skin->runspeed = 28<<FRACBITS;
|
||||
//skin->thrustfactor = 5;
|
||||
//skin->accelstart = 96;
|
||||
//skin->acceleration = 40;
|
||||
|
||||
skin->ability = CA_NONE;
|
||||
skin->ability2 = CA2_SPINDASH;
|
||||
skin->jumpfactor = FRACUNIT;
|
||||
skin->actionspd = 30<<FRACBITS;
|
||||
skin->mindash = 15<<FRACBITS;
|
||||
skin->maxdash = 90<<FRACBITS;
|
||||
//skin->ability = CA_NONE;
|
||||
//skin->ability2 = CA2_SPINDASH;
|
||||
//skin->jumpfactor = FRACUNIT;
|
||||
//skin->actionspd = 30<<FRACBITS;
|
||||
//skin->mindash = 15<<FRACBITS;
|
||||
//skin->maxdash = 90<<FRACBITS;
|
||||
|
||||
skin->thokitem = -1;
|
||||
skin->spinitem = -1;
|
||||
skin->revitem = -1;
|
||||
//skin->thokitem = -1;
|
||||
//skin->spinitem = -1;
|
||||
//skin->revitem = -1;
|
||||
|
||||
skin->highresscale = FRACUNIT>>1;
|
||||
|
||||
|
@ -2596,19 +2596,19 @@ void R_InitSkins(void)
|
|||
strncpy(skin->facemmap, "PLAYMMAP", 9);
|
||||
skin->prefcolor = SKINCOLOR_BLUE;
|
||||
|
||||
skin->ability = CA_THOK;
|
||||
skin->actionspd = 60<<FRACBITS;
|
||||
//skin->ability = CA_THOK;
|
||||
//skin->actionspd = 60<<FRACBITS;
|
||||
|
||||
// SRB2kart
|
||||
skin->kartspeed = 8;
|
||||
skin->kartweight = 2;
|
||||
//
|
||||
|
||||
skin->normalspeed = 36<<FRACBITS;
|
||||
skin->runspeed = 28<<FRACBITS;
|
||||
skin->thrustfactor = 5;
|
||||
skin->accelstart = 96;
|
||||
skin->acceleration = 40;
|
||||
//skin->normalspeed = 36<<FRACBITS;
|
||||
//skin->runspeed = 28<<FRACBITS;
|
||||
//skin->thrustfactor = 5;
|
||||
//skin->accelstart = 96;
|
||||
//skin->acceleration = 40;
|
||||
|
||||
skin->spritedef.numframes = sprites[SPR_PLAY].numframes;
|
||||
skin->spritedef.spriteframes = sprites[SPR_PLAY].spriteframes;
|
||||
|
@ -2673,30 +2673,30 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
|
|||
if (player->mo)
|
||||
player->mo->skin = skin;
|
||||
|
||||
player->charability = (UINT8)skin->ability;
|
||||
player->charability2 = (UINT8)skin->ability2;
|
||||
//player->charability = (UINT8)skin->ability;
|
||||
//player->charability2 = (UINT8)skin->ability2;
|
||||
|
||||
player->charflags = (UINT32)skin->flags;
|
||||
|
||||
player->thokitem = skin->thokitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].painchance : (UINT32)skin->thokitem;
|
||||
player->spinitem = skin->spinitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].damage : (UINT32)skin->spinitem;
|
||||
player->revitem = skin->revitem < 0 ? (mobjtype_t)mobjinfo[MT_PLAYER].raisestate : (UINT32)skin->revitem;
|
||||
//player->thokitem = skin->thokitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].painchance : (UINT32)skin->thokitem;
|
||||
//player->spinitem = skin->spinitem < 0 ? (UINT32)mobjinfo[MT_PLAYER].damage : (UINT32)skin->spinitem;
|
||||
//player->revitem = skin->revitem < 0 ? (mobjtype_t)mobjinfo[MT_PLAYER].raisestate : (UINT32)skin->revitem;
|
||||
|
||||
player->actionspd = skin->actionspd;
|
||||
player->mindash = skin->mindash;
|
||||
player->maxdash = skin->maxdash;
|
||||
//player->actionspd = skin->actionspd;
|
||||
//player->mindash = skin->mindash;
|
||||
//player->maxdash = skin->maxdash;
|
||||
|
||||
// SRB2kart
|
||||
player->kartspeed = skin->kartspeed;
|
||||
player->kartweight = skin->kartweight;
|
||||
|
||||
player->normalspeed = skin->normalspeed;
|
||||
player->runspeed = skin->runspeed;
|
||||
player->thrustfactor = skin->thrustfactor;
|
||||
player->accelstart = skin->accelstart;
|
||||
player->acceleration = skin->acceleration;
|
||||
//player->normalspeed = skin->normalspeed;
|
||||
//player->runspeed = skin->runspeed;
|
||||
//player->thrustfactor = skin->thrustfactor;
|
||||
//player->accelstart = skin->accelstart;
|
||||
//player->acceleration = skin->acceleration;
|
||||
|
||||
player->jumpfactor = skin->jumpfactor;
|
||||
//player->jumpfactor = skin->jumpfactor;
|
||||
|
||||
/*if (!(cv_debug || devparm) && !(netgame || multiplayer || demoplayback || modeattacking))
|
||||
{
|
||||
|
@ -2906,7 +2906,7 @@ void R_AddSkins(UINT16 wadnum)
|
|||
|
||||
#define GETSPEED(field) else if (!stricmp(stoken, #field)) skin->field = atoi(value)<<FRACBITS;
|
||||
//GETSPEED(normalspeed)
|
||||
GETSPEED(runspeed)
|
||||
//GETSPEED(runspeed)
|
||||
//GETSPEED(mindash)
|
||||
//GETSPEED(maxdash)
|
||||
//GETSPEED(actionspd)
|
||||
|
|
|
@ -83,28 +83,28 @@ typedef struct
|
|||
char hudname[SKINNAMESIZE+1]; // HUD name to display (officially exactly 5 characters long)
|
||||
char facerank[9], facewant[9], facemmap[9]; // Arbitrarily named patch lumps
|
||||
|
||||
UINT8 ability; // ability definition
|
||||
UINT8 ability2; // secondary ability definition
|
||||
INT32 thokitem;
|
||||
INT32 spinitem;
|
||||
INT32 revitem;
|
||||
fixed_t actionspd;
|
||||
fixed_t mindash;
|
||||
fixed_t maxdash;
|
||||
//UINT8 ability; // ability definition
|
||||
//UINT8 ability2; // secondary ability definition
|
||||
//INT32 thokitem;
|
||||
//INT32 spinitem;
|
||||
//INT32 revitem;
|
||||
//fixed_t actionspd;
|
||||
//fixed_t mindash;
|
||||
//fixed_t maxdash;
|
||||
|
||||
// SRB2kart
|
||||
UINT8 kartspeed;
|
||||
UINT8 kartweight;
|
||||
//
|
||||
|
||||
fixed_t normalspeed; // Normal ground
|
||||
fixed_t runspeed; // Speed that you break into your run animation
|
||||
//fixed_t normalspeed; // Normal ground
|
||||
//fixed_t runspeed; // Speed that you break into your run animation
|
||||
|
||||
UINT8 thrustfactor; // Thrust = thrustfactor * acceleration
|
||||
UINT8 accelstart; // Acceleration if speed = 0
|
||||
UINT8 acceleration; // Acceleration
|
||||
//UINT8 thrustfactor; // Thrust = thrustfactor * acceleration
|
||||
//UINT8 accelstart; // Acceleration if speed = 0
|
||||
//UINT8 acceleration; // Acceleration
|
||||
|
||||
fixed_t jumpfactor; // multiple of standard jump height
|
||||
//fixed_t jumpfactor; // multiple of standard jump height
|
||||
|
||||
// Definable color translation table
|
||||
UINT8 starttranscolor;
|
||||
|
|
Loading…
Reference in a new issue