mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Super skin colors are now available for use with mobj.color (but not player.skincolor, for obvious reasons), complete with the names for them (SKINCOLOR_SUPER1-5, TSUPERx, KSUPERx and MAXTRANSLATIONS to boot)
git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@9042 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd
This commit is contained in:
parent
6cff0bba70
commit
d915a8142d
2 changed files with 27 additions and 7 deletions
|
@ -7306,6 +7306,7 @@ static const char *const ML_LIST[16] = {
|
|||
};
|
||||
|
||||
// This DOES differ from r_draw's Color_Names, unfortunately.
|
||||
// Also includes Super colors
|
||||
static const char *COLOR_ENUMS[] = {
|
||||
"NONE", // SKINCOLOR_NONE
|
||||
"WHITE", // SKINCOLOR_WHITE
|
||||
|
@ -7332,7 +7333,25 @@ static const char *COLOR_ENUMS[] = {
|
|||
"ZIM", // SKINCOLOR_ZIM
|
||||
"OLIVE", // SKINCOLOR_OLIVE
|
||||
"YELLOW", // SKINCOLOR_YELLOW
|
||||
"GOLD" // SKINCOLOR_GOLD
|
||||
"GOLD", // SKINCOLOR_GOLD
|
||||
// Super special awesome Super flashing colors!
|
||||
"SUPER1", // SKINCOLOR_SUPER1
|
||||
"SUPER2", // SKINCOLOR_SUPER2,
|
||||
"SUPER3", // SKINCOLOR_SUPER3,
|
||||
"SUPER4", // SKINCOLOR_SUPER4,
|
||||
"SUPER5", // SKINCOLOR_SUPER5,
|
||||
// Super Tails
|
||||
"TSUPER1", // SKINCOLOR_TSUPER1,
|
||||
"TSUPER2", // SKINCOLOR_TSUPER2,
|
||||
"TSUPER3", // SKINCOLOR_TSUPER3,
|
||||
"TSUPER4", // SKINCOLOR_TSUPER4,
|
||||
"TSUPER5", // SKINCOLOR_TSUPER5,
|
||||
// Super Knuckles
|
||||
"KSUPER1", // SKINCOLOR_KSUPER1,
|
||||
"KSUPER2", // SKINCOLOR_KSUPER2,
|
||||
"KSUPER3", // SKINCOLOR_KSUPER3,
|
||||
"KSUPER4", // SKINCOLOR_KSUPER4,
|
||||
"KSUPER5" // SKINCOLOR_KSUPER5,
|
||||
};
|
||||
|
||||
static const char *const POWERS_LIST[] = {
|
||||
|
@ -7539,8 +7558,9 @@ struct {
|
|||
{"EMERALD6",EMERALD6},
|
||||
{"EMERALD7",EMERALD7},
|
||||
|
||||
// SKINCOLOR_ doesn't include this..!
|
||||
// SKINCOLOR_ doesn't include these..!
|
||||
{"MAXSKINCOLORS",MAXSKINCOLORS},
|
||||
{"MAXTRANSLATIONS",MAXTRANSLATIONS},
|
||||
|
||||
// Precipitation
|
||||
{"PRECIP_NONE",PRECIP_NONE},
|
||||
|
@ -8161,7 +8181,7 @@ static fixed_t find_const(const char **rword)
|
|||
}
|
||||
else if (fastncmp("SKINCOLOR_",word,10)) {
|
||||
char *p = word+10;
|
||||
for (i = 0; i < MAXSKINCOLORS; i++)
|
||||
for (i = 0; i < MAXTRANSLATIONS; i++)
|
||||
if (fastcmp(p, COLOR_ENUMS[i])) {
|
||||
free(word);
|
||||
return i;
|
||||
|
@ -8220,8 +8240,8 @@ void DEH_Check(void)
|
|||
if (dehpowers != NUMPOWERS)
|
||||
I_Error("You forgot to update the Dehacked powers list, you dolt!\n(%d powers defined, versus %s in the Dehacked list)\n", NUMPOWERS, sizeu1(dehpowers));
|
||||
|
||||
if (dehcolors != MAXSKINCOLORS)
|
||||
I_Error("You forgot to update the Dehacked colors list, you dolt!\n(%d colors defined, versus %s in the Dehacked list)\n", MAXSKINCOLORS, sizeu1(dehcolors));
|
||||
if (dehcolors != MAXTRANSLATIONS)
|
||||
I_Error("You forgot to update the Dehacked colors list, you dolt!\n(%d colors defined, versus %s in the Dehacked list)\n", MAXTRANSLATIONS, sizeu1(dehcolors));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -8575,7 +8595,7 @@ static inline int lib_getenum(lua_State *L)
|
|||
}
|
||||
else if (fastncmp("SKINCOLOR_",word,10)) {
|
||||
p = word+10;
|
||||
for (i = 0; i < MAXSKINCOLORS; i++)
|
||||
for (i = 0; i < MAXTRANSLATIONS; i++)
|
||||
if (fastcmp(p, COLOR_ENUMS[i])) {
|
||||
lua_pushinteger(L, i);
|
||||
return 1;
|
||||
|
|
|
@ -500,7 +500,7 @@ static int mobj_set(lua_State *L)
|
|||
return luaL_error(L, "mobj.skin '%s' not found!", skin);
|
||||
}
|
||||
case mobj_color:
|
||||
mo->color = ((UINT8)luaL_checkinteger(L, 3)) % MAXSKINCOLORS;
|
||||
mo->color = ((UINT8)luaL_checkinteger(L, 3)) % MAXTRANSLATIONS;
|
||||
break;
|
||||
case mobj_bnext:
|
||||
return NOSETPOS;
|
||||
|
|
Loading…
Reference in a new issue