mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
New S_SKIN attribute - "camerascale", another float. Acts as a scale modifier to t_cam_dist and t_cam_height.
This commit is contained in:
parent
029fd156a8
commit
c678220857
4 changed files with 12 additions and 4 deletions
|
|
@ -48,6 +48,7 @@ enum skin {
|
||||||
skin_height,
|
skin_height,
|
||||||
skin_spinheight,
|
skin_spinheight,
|
||||||
skin_shieldscale,
|
skin_shieldscale,
|
||||||
|
skin_camerascale,
|
||||||
skin_starttranscolor,
|
skin_starttranscolor,
|
||||||
skin_prefcolor,
|
skin_prefcolor,
|
||||||
skin_prefoppositecolor,
|
skin_prefoppositecolor,
|
||||||
|
|
@ -84,6 +85,7 @@ static const char *const skin_opt[] = {
|
||||||
"height",
|
"height",
|
||||||
"spinheight",
|
"spinheight",
|
||||||
"shieldscale",
|
"shieldscale",
|
||||||
|
"camerascale",
|
||||||
"starttranscolor",
|
"starttranscolor",
|
||||||
"prefcolor",
|
"prefcolor",
|
||||||
"prefoppositecolor",
|
"prefoppositecolor",
|
||||||
|
|
@ -197,6 +199,9 @@ static int skin_get(lua_State *L)
|
||||||
case skin_shieldscale:
|
case skin_shieldscale:
|
||||||
lua_pushfixed(L, skin->shieldscale);
|
lua_pushfixed(L, skin->shieldscale);
|
||||||
break;
|
break;
|
||||||
|
case skin_camerascale:
|
||||||
|
lua_pushfixed(L, skin->camerascale);
|
||||||
|
break;
|
||||||
case skin_starttranscolor:
|
case skin_starttranscolor:
|
||||||
lua_pushinteger(L, skin->starttranscolor);
|
lua_pushinteger(L, skin->starttranscolor);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -8002,16 +8002,16 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
camspeed = cv_cam_speed.value;
|
camspeed = cv_cam_speed.value;
|
||||||
camstill = cv_cam_still.value;
|
camstill = cv_cam_still.value;
|
||||||
camrotate = cv_cam_rotate.value;
|
camrotate = cv_cam_rotate.value;
|
||||||
camdist = FixedMul(cv_cam_dist.value, mo->scale);
|
camdist = FixedMul(cv_cam_dist.value, FixedMul(skins[player->skin].camerascale, mo->scale));
|
||||||
camheight = FixedMul(cv_cam_height.value, mo->scale);
|
camheight = FixedMul(cv_cam_height.value, FixedMul(skins[player->skin].camerascale, mo->scale));
|
||||||
}
|
}
|
||||||
else // Camera 2
|
else // Camera 2
|
||||||
{
|
{
|
||||||
camspeed = cv_cam2_speed.value;
|
camspeed = cv_cam2_speed.value;
|
||||||
camstill = cv_cam2_still.value;
|
camstill = cv_cam2_still.value;
|
||||||
camrotate = cv_cam2_rotate.value;
|
camrotate = cv_cam2_rotate.value;
|
||||||
camdist = FixedMul(cv_cam2_dist.value, mo->scale);
|
camdist = FixedMul(cv_cam2_dist.value, FixedMul(skins[player->skin].camerascale, mo->scale));
|
||||||
camheight = FixedMul(cv_cam2_height.value, mo->scale);
|
camheight = FixedMul(cv_cam2_height.value, FixedMul(skins[player->skin].camerascale, mo->scale));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REDSANALOG
|
#ifdef REDSANALOG
|
||||||
|
|
|
||||||
|
|
@ -2308,6 +2308,7 @@ static void Sk_SetDefaultValue(skin_t *skin)
|
||||||
skin->spinheight = FixedMul(skin->height, 2*FRACUNIT/3);
|
skin->spinheight = FixedMul(skin->height, 2*FRACUNIT/3);
|
||||||
|
|
||||||
skin->shieldscale = FRACUNIT;
|
skin->shieldscale = FRACUNIT;
|
||||||
|
skin->camerascale = FRACUNIT;
|
||||||
|
|
||||||
skin->thokitem = -1;
|
skin->thokitem = -1;
|
||||||
skin->spinitem = -1;
|
skin->spinitem = -1;
|
||||||
|
|
@ -2662,6 +2663,7 @@ void R_AddSkins(UINT16 wadnum)
|
||||||
GETFLOAT(jumpfactor)
|
GETFLOAT(jumpfactor)
|
||||||
GETFLOAT(highresscale)
|
GETFLOAT(highresscale)
|
||||||
GETFLOAT(shieldscale)
|
GETFLOAT(shieldscale)
|
||||||
|
GETFLOAT(camerascale)
|
||||||
#undef GETFLOAT
|
#undef GETFLOAT
|
||||||
|
|
||||||
else // let's check if it's a sound, otherwise error out
|
else // let's check if it's a sound, otherwise error out
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ typedef struct
|
||||||
fixed_t spinheight;
|
fixed_t spinheight;
|
||||||
|
|
||||||
fixed_t shieldscale; // no change to bounding box, but helps set the shield's sprite size
|
fixed_t shieldscale; // no change to bounding box, but helps set the shield's sprite size
|
||||||
|
fixed_t camerascale;
|
||||||
|
|
||||||
// Definable color translation table
|
// Definable color translation table
|
||||||
UINT8 starttranscolor;
|
UINT8 starttranscolor;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue