mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-29 07:32:02 +00:00
Merge remote-tracking branch 'stjr/next' into patch-refactor
This commit is contained in:
commit
649669c217
40 changed files with 848 additions and 587 deletions
|
@ -4367,7 +4367,6 @@ thingtypes
|
|||
{
|
||||
color = 14; // Yellow
|
||||
title = "Rings and Weapon Panels";
|
||||
width = 24;
|
||||
height = 24;
|
||||
flags8height = 24;
|
||||
flags8text = "[8] Float";
|
||||
|
@ -4377,7 +4376,6 @@ thingtypes
|
|||
{
|
||||
title = "Ring";
|
||||
sprite = "RINGA0";
|
||||
width = 16;
|
||||
}
|
||||
301
|
||||
{
|
||||
|
@ -4393,6 +4391,7 @@ thingtypes
|
|||
{
|
||||
title = "Infinity Ring";
|
||||
sprite = "RNGIA0";
|
||||
width = 24;
|
||||
}
|
||||
304
|
||||
{
|
||||
|
@ -4418,43 +4417,53 @@ thingtypes
|
|||
{
|
||||
title = "CTF Team Ring (Red)";
|
||||
sprite = "internal:TRNGA0R";
|
||||
width = 16;
|
||||
}
|
||||
309
|
||||
{
|
||||
title = "CTF Team Ring (Blue)";
|
||||
sprite = "internal:TRNGA0B";
|
||||
width = 16;
|
||||
}
|
||||
330
|
||||
{
|
||||
title = "Bounce Ring Panel";
|
||||
sprite = "PIKBA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
}
|
||||
331
|
||||
{
|
||||
title = "Rail Ring Panel";
|
||||
sprite = "PIKRA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
}
|
||||
332
|
||||
{
|
||||
title = "Automatic Ring Panel";
|
||||
sprite = "PIKAA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
}
|
||||
333
|
||||
{
|
||||
title = "Explosion Ring Panel";
|
||||
sprite = "PIKEA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
}
|
||||
334
|
||||
{
|
||||
title = "Scatter Ring Panel";
|
||||
sprite = "PIKSA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
}
|
||||
335
|
||||
{
|
||||
title = "Grenade Ring Panel";
|
||||
sprite = "PIKGA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4463,7 +4472,7 @@ thingtypes
|
|||
color = 10; // Light Green
|
||||
title = "Other Collectibles";
|
||||
width = 16;
|
||||
height = 32;
|
||||
height = 24;
|
||||
sort = 1;
|
||||
sprite = "CEMGA0";
|
||||
|
||||
|
@ -4529,6 +4538,7 @@ thingtypes
|
|||
{
|
||||
title = "Emerald Hunt Location";
|
||||
sprite = "SHRDA0";
|
||||
height = 32;
|
||||
flags8height = 24;
|
||||
flags8text = "[8] Float";
|
||||
}
|
||||
|
|
|
@ -1185,7 +1185,7 @@ udmf
|
|||
{
|
||||
color = 14; // Yellow
|
||||
title = "Rings and Weapon Panels";
|
||||
width = 24;
|
||||
width = 16;
|
||||
height = 24;
|
||||
sprite = "RINGA0";
|
||||
|
||||
|
@ -1193,7 +1193,6 @@ udmf
|
|||
{
|
||||
title = "Ring";
|
||||
sprite = "RINGA0";
|
||||
width = 16;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
@ -1227,6 +1226,7 @@ udmf
|
|||
{
|
||||
title = "Infinity Ring";
|
||||
sprite = "RNGIA0";
|
||||
width = 24;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
@ -1282,7 +1282,6 @@ udmf
|
|||
{
|
||||
title = "CTF Team Ring (Red)";
|
||||
sprite = "internal:TRNGA0R";
|
||||
width = 16;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
@ -1294,7 +1293,6 @@ udmf
|
|||
{
|
||||
title = "CTF Team Ring (Blue)";
|
||||
sprite = "internal:TRNGA0B";
|
||||
width = 16;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
@ -1306,6 +1304,8 @@ udmf
|
|||
{
|
||||
title = "Bounce Ring Panel";
|
||||
sprite = "PIKBA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
@ -1317,6 +1317,8 @@ udmf
|
|||
{
|
||||
title = "Rail Ring Panel";
|
||||
sprite = "PIKRA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
@ -1328,6 +1330,8 @@ udmf
|
|||
{
|
||||
title = "Automatic Ring Panel";
|
||||
sprite = "PIKAA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
@ -1339,6 +1343,8 @@ udmf
|
|||
{
|
||||
title = "Explosion Ring Panel";
|
||||
sprite = "PIKEA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
@ -1350,6 +1356,8 @@ udmf
|
|||
{
|
||||
title = "Scatter Ring Panel";
|
||||
sprite = "PIKSA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
@ -1361,6 +1369,8 @@ udmf
|
|||
{
|
||||
title = "Grenade Ring Panel";
|
||||
sprite = "PIKGA0";
|
||||
width = 24;
|
||||
height = 40;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
@ -1375,7 +1385,7 @@ udmf
|
|||
color = 10; // Light_Green
|
||||
title = "Other Collectibles";
|
||||
width = 16;
|
||||
height = 32;
|
||||
height = 24;
|
||||
sort = 1;
|
||||
sprite = "CEMGA0";
|
||||
|
||||
|
@ -1445,6 +1455,7 @@ udmf
|
|||
{
|
||||
title = "Emerald Hunt Location";
|
||||
sprite = "SHRDA0";
|
||||
height = 32;
|
||||
arg0
|
||||
{
|
||||
title = "Float?";
|
||||
|
|
|
@ -392,4 +392,4 @@ else
|
|||
@:
|
||||
endif
|
||||
|
||||
$(warning The handwritten GNU Makefile for SRB2 is deprecated, and may be removed in the future. Please consider switching to CMake.)
|
||||
#$(warning The handwritten GNU Makefile for SRB2 is deprecated, and may be removed in the future. Please consider switching to CMake.)
|
||||
|
|
|
@ -25,7 +25,7 @@ endif
|
|||
# Tested by Steel, as of release 2.2.8.
|
||||
ifdef FREEBSD
|
||||
opts+=-I/usr/X11R6/include -DLINUX -DFREEBSD
|
||||
libs+=-L/usr/X11R6/lib -lipx -lkvm
|
||||
libs+=-L/usr/X11R6/lib -lkvm -lexecinfo
|
||||
endif
|
||||
|
||||
# FIXME: UNTESTED
|
||||
|
|
|
@ -1925,6 +1925,7 @@ static void Command_Map_f(void)
|
|||
newresetplayers = ! COM_CheckParm("-noresetplayers");
|
||||
|
||||
prevent_cheat = !( usedCheats ) && !( option_force || cv_debug );
|
||||
set_cheated = false;
|
||||
|
||||
if (!( netgame || multiplayer ))
|
||||
{
|
||||
|
|
|
@ -277,8 +277,8 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
|
|||
}
|
||||
else if (fastncmp("MTF_", word, 4)) {
|
||||
p = word+4;
|
||||
for (i = 0; i < 4; i++)
|
||||
if (MAPTHINGFLAG_LIST[i] && fastcmp(p, MAPTHINGFLAG_LIST[i])) {
|
||||
for (i = 0; MAPTHINGFLAG_LIST[i]; i++)
|
||||
if (fastcmp(p, MAPTHINGFLAG_LIST[i])) {
|
||||
CacheAndPushConstant(L, word, ((lua_Integer)1<<i));
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -4410,11 +4410,12 @@ const char *const MOBJEFLAG_LIST[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
const char *const MAPTHINGFLAG_LIST[4] = {
|
||||
const char *const MAPTHINGFLAG_LIST[] = {
|
||||
"EXTRA", // Extra flag for objects.
|
||||
"OBJECTFLIP", // Reverse gravity flag for objects.
|
||||
"OBJECTSPECIAL", // Special flag used with certain objects.
|
||||
"AMBUSH" // Deaf monsters/do not react to sound.
|
||||
"AMBUSH", // Deaf monsters/do not react to sound.
|
||||
"ABSOLUTEZ" // Absolute spawn height flag for objects.
|
||||
};
|
||||
|
||||
const char *const PLAYERFLAG_LIST[] = {
|
||||
|
@ -4613,8 +4614,7 @@ const char *COLOR_ENUMS[] = {
|
|||
// Desaturated
|
||||
"AETHER", // SKINCOLOR_AETHER,
|
||||
"SLATE", // SKINCOLOR_SLATE,
|
||||
"METEORITE", // SKINCOLOR_METEORITE,
|
||||
"MERCURY", // SKINCOLOR_MERCURY,
|
||||
"MOONSTONE", // SKINCOLOR_MOONSTONE,
|
||||
"BLUEBELL", // SKINCOLOR_BLUEBELL,
|
||||
"PINK", // SKINCOLOR_PINK,
|
||||
"ROSEWOOD", // SKINCOLOR_ROSEWOOD,
|
||||
|
@ -4651,10 +4651,10 @@ const char *COLOR_ENUMS[] = {
|
|||
"COPPER", // SKINCOLOR_COPPER,
|
||||
"APRICOT", // SKINCOLOR_APRICOT,
|
||||
"ORANGE", // SKINCOLOR_ORANGE,
|
||||
"PUMPKIN", // SKINCOLOR_PUMPKIN,
|
||||
"RUST", // SKINCOLOR_RUST,
|
||||
"GOLD", // SKINCOLOR_GOLD,
|
||||
"TANGERINE", // SKINCOLOR_TANGERINE,
|
||||
"TOPAZ", // SKINCOLOR_TOPAZ,
|
||||
"GOLD", // SKINCOLOR_GOLD,
|
||||
"SANDY", // SKINCOLOR_SANDY,
|
||||
"GOLDENROD", // SKINCOLOR_GOLDENROD,
|
||||
"YELLOW", // SKINCOLOR_YELLOW,
|
||||
|
@ -4664,20 +4664,21 @@ const char *COLOR_ENUMS[] = {
|
|||
"LIME", // SKINCOLOR_LIME,
|
||||
"PERIDOT", // SKINCOLOR_PERIDOT,
|
||||
"APPLE", // SKINCOLOR_APPLE,
|
||||
"HEADLIGHT", // SKINCOLOR_HEADLIGHT,
|
||||
"CHARTREUSE", // SKINCOLOR_CHARTREUSE,
|
||||
"GREEN", // SKINCOLOR_GREEN,
|
||||
"FOREST", // SKINCOLOR_FOREST,
|
||||
"SHAMROCK", // SKINCOLOR_SHAMROCK,
|
||||
"JADE", // SKINCOLOR_JADE,
|
||||
"HEADLIGHT", // SKINCOLOR_HEADLIGHT,
|
||||
"MINT", // SKINCOLOR_MINT,
|
||||
"MASTER", // SKINCOLOR_MASTER,
|
||||
"EMERALD", // SKINCOLOR_EMERALD,
|
||||
"BOTTLE", // SKINCOLOR_BOTTLE,
|
||||
"SEAFOAM", // SKINCOLOR_SEAFOAM,
|
||||
"ISLAND", // SKINCOLOR_ISLAND,
|
||||
"BOTTLE", // SKINCOLOR_BOTTLE,
|
||||
"AQUA", // SKINCOLOR_AQUA,
|
||||
"TEAL", // SKINCOLOR_TEAL,
|
||||
"OCEAN", // SKINCOLOR_OCEAN,
|
||||
"WAVE", // SKINCOLOR_WAVE,
|
||||
"CYAN", // SKINCOLOR_CYAN,
|
||||
"TURQUOISE", // SKINCOLOR_TURQUOISE,
|
||||
|
@ -4703,7 +4704,7 @@ const char *COLOR_ENUMS[] = {
|
|||
"NOBLE", // SKINCOLOR_NOBLE,
|
||||
"FUCHSIA", // SKINCOLOR_FUCHSIA,
|
||||
"BUBBLEGUM", // SKINCOLOR_BUBBLEGUM,
|
||||
"CRYSTAL", // SKINCOLOR_CRYSTAL,
|
||||
"SIBERITE", // SKINCOLOR_SIBERITE,
|
||||
"MAGENTA", // SKINCOLOR_MAGENTA,
|
||||
"NEON", // SKINCOLOR_NEON,
|
||||
"VIOLET", // SKINCOLOR_VIOLET,
|
||||
|
|
|
@ -62,7 +62,7 @@ extern const char *const MOBJTYPE_LIST[];
|
|||
extern const char *const MOBJFLAG_LIST[];
|
||||
extern const char *const MOBJFLAG2_LIST[]; // \tMF2_(\S+).*// (.+) --> \t"\1", // \2
|
||||
extern const char *const MOBJEFLAG_LIST[];
|
||||
extern const char *const MAPTHINGFLAG_LIST[4];
|
||||
extern const char *const MAPTHINGFLAG_LIST[];
|
||||
extern const char *const PLAYERFLAG_LIST[];
|
||||
extern const char *const GAMETYPERULE_LIST[];
|
||||
extern const char *const ML_LIST[]; // Linedef flags
|
||||
|
|
|
@ -62,6 +62,10 @@ enum
|
|||
#define MTF_AMBUSH 8
|
||||
|
||||
// Do not use bit five or after, as they are used for object z-offsets.
|
||||
// Unless it's exclusive to UDMF.
|
||||
|
||||
// Flag to use Z as absolute spawn height, ignoring the floor and ceiling.
|
||||
#define MTF_ABSOLUTEZ 16
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack(1)
|
||||
|
|
|
@ -269,8 +269,7 @@ typedef enum
|
|||
// Desaturated
|
||||
SKINCOLOR_AETHER,
|
||||
SKINCOLOR_SLATE,
|
||||
SKINCOLOR_METEORITE,
|
||||
SKINCOLOR_MERCURY,
|
||||
SKINCOLOR_MOONSTONE,
|
||||
SKINCOLOR_BLUEBELL,
|
||||
SKINCOLOR_PINK,
|
||||
SKINCOLOR_ROSEWOOD,
|
||||
|
@ -307,10 +306,10 @@ typedef enum
|
|||
SKINCOLOR_COPPER,
|
||||
SKINCOLOR_APRICOT,
|
||||
SKINCOLOR_ORANGE,
|
||||
SKINCOLOR_PUMPKIN,
|
||||
SKINCOLOR_RUST,
|
||||
SKINCOLOR_GOLD,
|
||||
SKINCOLOR_TANGERINE,
|
||||
SKINCOLOR_TOPAZ,
|
||||
SKINCOLOR_GOLD,
|
||||
SKINCOLOR_SANDY,
|
||||
SKINCOLOR_GOLDENROD,
|
||||
SKINCOLOR_YELLOW,
|
||||
|
@ -320,20 +319,21 @@ typedef enum
|
|||
SKINCOLOR_LIME,
|
||||
SKINCOLOR_PERIDOT,
|
||||
SKINCOLOR_APPLE,
|
||||
SKINCOLOR_HEADLIGHT,
|
||||
SKINCOLOR_CHARTREUSE,
|
||||
SKINCOLOR_GREEN,
|
||||
SKINCOLOR_FOREST,
|
||||
SKINCOLOR_SHAMROCK,
|
||||
SKINCOLOR_JADE,
|
||||
SKINCOLOR_HEADLIGHT,
|
||||
SKINCOLOR_MINT,
|
||||
SKINCOLOR_MASTER,
|
||||
SKINCOLOR_EMERALD,
|
||||
SKINCOLOR_BOTTLE,
|
||||
SKINCOLOR_SEAFOAM,
|
||||
SKINCOLOR_ISLAND,
|
||||
SKINCOLOR_BOTTLE,
|
||||
SKINCOLOR_AQUA,
|
||||
SKINCOLOR_TEAL,
|
||||
SKINCOLOR_OCEAN,
|
||||
SKINCOLOR_WAVE,
|
||||
SKINCOLOR_CYAN,
|
||||
SKINCOLOR_TURQUOISE,
|
||||
|
@ -359,7 +359,7 @@ typedef enum
|
|||
SKINCOLOR_NOBLE,
|
||||
SKINCOLOR_FUCHSIA,
|
||||
SKINCOLOR_BUBBLEGUM,
|
||||
SKINCOLOR_CRYSTAL,
|
||||
SKINCOLOR_SIBERITE,
|
||||
SKINCOLOR_MAGENTA,
|
||||
SKINCOLOR_NEON,
|
||||
SKINCOLOR_VIOLET,
|
||||
|
|
|
@ -113,6 +113,15 @@ int endswith (const char *base, const char *tag);
|
|||
#define HAVE_DOSSTR_FUNCS
|
||||
#endif
|
||||
|
||||
#if defined (__APPLE__)
|
||||
#define SRB2_HAVE_STRLCPY
|
||||
#elif defined (__GLIBC_PREREQ)
|
||||
// glibc 2.38: added strlcpy and strlcat to _DEFAULT_SOURCE
|
||||
#if __GLIBC_PREREQ(2, 38)
|
||||
#define SRB2_HAVE_STRLCPY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DOSSTR_FUNCS
|
||||
int strupr(char *n); // from dosstr.c
|
||||
int strlwr(char *n); // from dosstr.c
|
||||
|
@ -120,7 +129,7 @@ int strlwr(char *n); // from dosstr.c
|
|||
|
||||
#include <stddef.h> // for size_t
|
||||
|
||||
#ifndef __APPLE__
|
||||
#ifndef SRB2_HAVE_STRLCPY
|
||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
|
|
@ -1062,12 +1062,14 @@ static const char *credits[] = {
|
|||
"\"Golden\"",
|
||||
"Vivian \"toaster\" Grannell",
|
||||
"Julio \"Chaos Zero 64\" Guir",
|
||||
"\"Hanicef\"",
|
||||
"\"Hannu_Hanhi\"", // For many OpenGL performance improvements!
|
||||
"Kepa \"Nev3r\" Iceta",
|
||||
"Thomas \"Shadow Hog\" Igoe",
|
||||
"Iestyn \"Monster Iestyn\" Jealous",
|
||||
"\"Kaito Sinclaire\"",
|
||||
"\"Kalaron\"", // Coded some of Sryder13's collection of OpenGL fixes, especially fog
|
||||
"\"katsy\"",
|
||||
"Ronald \"Furyhunter\" Kinard", // The SDL2 port
|
||||
"\"Lat'\"", // SRB2-CHAT, the chat window from Kart
|
||||
"\"LZA\"",
|
||||
|
@ -1090,6 +1092,7 @@ static const char *credits[] = {
|
|||
"Ben \"Cue\" Woodford",
|
||||
"Lachlan \"Lach\" Wright",
|
||||
"Marco \"mazmazz\" Zafra",
|
||||
"\"Zwip-Zwap Zapony\"",
|
||||
"",
|
||||
"\1Art",
|
||||
"Victor \"VAdaPEGA\" Ara\x1Fjo", // Araújo -- sorry for our limited font! D:
|
||||
|
@ -1197,6 +1200,7 @@ static const char *credits[] = {
|
|||
"FreeDoom Project", // Used some of the mancubus and rocket launcher sprites for Brak
|
||||
"Kart Krew",
|
||||
"Alex \"MistaED\" Fuller",
|
||||
"Howard Drossin", // Virtual Sonic - Sonic & Knuckles Theme
|
||||
"Pascal \"CodeImp\" vd Heiden", // Doom Builder developer
|
||||
"Randi Heit (<!>)", // For their MSPaint <!> sprite that we nicked
|
||||
"Simon \"sirjuddington\" Judd", // SLADE developer
|
||||
|
|
|
@ -4123,7 +4123,7 @@ static void G_DoCompleted(void)
|
|||
{
|
||||
token--;
|
||||
|
||||
if (!nextmapoverride)
|
||||
// if (!nextmapoverride) // Having a token should pull the player into the special stage before going to the overridden map (Issue #933)
|
||||
for (i = 0; i < 7; i++)
|
||||
if (!(emeralds & (1<<i)))
|
||||
{
|
||||
|
|
|
@ -1662,7 +1662,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
if ((rover->fofflags & FOF_TRANSLUCENT && !(rover->fofflags & FOF_SPLAT)) || rover->blend)
|
||||
{
|
||||
blendmode = rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent;
|
||||
Surf.PolyColor.s.alpha = (UINT8)rover->alpha-1 > 255 ? 255 : rover->alpha-1;
|
||||
Surf.PolyColor.s.alpha = max(0, min(rover->alpha, 255));
|
||||
}
|
||||
|
||||
if (gl_frontsector->numlights)
|
||||
|
@ -1785,7 +1785,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
if ((rover->fofflags & FOF_TRANSLUCENT && !(rover->fofflags & FOF_SPLAT)) || rover->blend)
|
||||
{
|
||||
blendmode = rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent;
|
||||
Surf.PolyColor.s.alpha = (UINT8)rover->alpha-1 > 255 ? 255 : rover->alpha-1;
|
||||
Surf.PolyColor.s.alpha = max(0, min(rover->alpha, 255));
|
||||
}
|
||||
|
||||
if (gl_backsector->numlights)
|
||||
|
@ -3018,7 +3018,7 @@ static void HWR_Subsector(size_t num)
|
|||
false,
|
||||
*rover->bottomheight,
|
||||
*gl_frontsector->lightlist[light].lightlevel,
|
||||
rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector,
|
||||
max(0, min(rover->alpha, 255)), rover->master->frontsector,
|
||||
HWR_RippleBlend(gl_frontsector, rover, false) | (rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent),
|
||||
false, *gl_frontsector->lightlist[light].extra_colormap);
|
||||
}
|
||||
|
@ -3064,7 +3064,7 @@ static void HWR_Subsector(size_t num)
|
|||
true,
|
||||
*rover->topheight,
|
||||
*gl_frontsector->lightlist[light].lightlevel,
|
||||
rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector,
|
||||
max(0, min(rover->alpha, 255)), rover->master->frontsector,
|
||||
HWR_RippleBlend(gl_frontsector, rover, false) | (rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent),
|
||||
false, *gl_frontsector->lightlist[light].extra_colormap);
|
||||
}
|
||||
|
@ -5301,7 +5301,10 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
|
||||
if (vflip)
|
||||
{
|
||||
gz = FIXED_TO_FLOAT(interp.z + thing->height) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale);
|
||||
if (thing->scale != thing->old_scale) // Interpolate heights in reverse gravity when scaling mobjs
|
||||
gz = FIXED_TO_FLOAT(interp.z + FixedMul(thing->height, FixedDiv(interp.scale, thing->scale))) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale);
|
||||
else
|
||||
gz = FIXED_TO_FLOAT(interp.z + thing->height) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale);
|
||||
gzt = gz + (FIXED_TO_FLOAT(spr_height) * this_yscale);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1585,7 +1585,12 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
p.y = FIXED_TO_FLOAT(interp.y)+md2->offset;
|
||||
|
||||
if (flip)
|
||||
p.z = FIXED_TO_FLOAT(interp.z + spr->mobj->height);
|
||||
{
|
||||
if (spr->mobj->scale != spr->mobj->old_scale) // Interpolate heights in reverse gravity when scaling mobjs
|
||||
p.z = FIXED_TO_FLOAT(interp.z + FixedMul(spr->mobj->height, FixedDiv(interp.scale, spr->mobj->scale)));
|
||||
else
|
||||
p.z = FIXED_TO_FLOAT(interp.z + spr->mobj->height);
|
||||
}
|
||||
else
|
||||
p.z = FIXED_TO_FLOAT(interp.z);
|
||||
|
||||
|
|
92
src/info.c
92
src/info.c
|
@ -7194,7 +7194,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_cgot, // deathsound
|
||||
EMERALD1, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
|
@ -7220,7 +7220,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_cgot, // deathsound
|
||||
EMERALD2, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
|
@ -7246,7 +7246,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_cgot, // deathsound
|
||||
EMERALD3, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
|
@ -7272,7 +7272,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_cgot, // deathsound
|
||||
EMERALD4, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
|
@ -7298,7 +7298,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_cgot, // deathsound
|
||||
EMERALD5, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
|
@ -7324,7 +7324,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_cgot, // deathsound
|
||||
EMERALD6, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
|
@ -7350,7 +7350,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_cgot, // deathsound
|
||||
EMERALD7, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
|
@ -18344,7 +18344,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_itemup, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
16*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_bouncering, // mass
|
||||
|
@ -18371,7 +18371,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_itemup, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
16*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_railring, // mass
|
||||
|
@ -18425,7 +18425,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_itemup, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
16*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_automaticring, // mass
|
||||
|
@ -18452,7 +18452,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_itemup, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
16*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_explosionring, // mass
|
||||
|
@ -18479,7 +18479,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_itemup, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
16*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_scatterring, // mass
|
||||
|
@ -18506,7 +18506,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_itemup, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
16*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_grenadering, // mass
|
||||
|
@ -18535,7 +18535,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_ncitem, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
40*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_bouncering, // mass
|
||||
2*TICRATE, // damage
|
||||
|
@ -18562,7 +18562,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_ncitem, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
40*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_railring, // mass
|
||||
2*TICRATE, // damage
|
||||
|
@ -18589,7 +18589,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_ncitem, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
40*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_automaticring, // mass
|
||||
2*TICRATE, // damage
|
||||
|
@ -18616,7 +18616,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_ncitem, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
40*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_explosionring, // mass
|
||||
2*TICRATE, // damage
|
||||
|
@ -18643,7 +18643,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_ncitem, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
40*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_scatterring, // mass
|
||||
2*TICRATE, // damage
|
||||
|
@ -18670,7 +18670,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_ncitem, // deathsound
|
||||
60*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
40*FRACUNIT, // height
|
||||
0, // display offset
|
||||
pw_grenadering, // mass
|
||||
2*TICRATE, // damage
|
||||
|
@ -21584,10 +21584,9 @@ skincolor_t skincolors[MAXSKINCOLORS] = {
|
|||
{"Black", {0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1b, 0x1b, 0x1c, 0x1d, 0x1d, 0x1e, 0x1e, 0x1f, 0x1f}, SKINCOLOR_WHITE, 7, V_GRAYMAP, true}, // SKINCOLOR_BLACK
|
||||
|
||||
// Desaturated
|
||||
{"Aether", {0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x91, 0x91, 0x91, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xaf}, SKINCOLOR_GREY, 15, 0, true}, // SKINCOLOR_AETHER
|
||||
{"Aether", {0x00, 0x00, 0x01, 0x01, 0x90, 0x90, 0x91, 0x91, 0x92, 0xaa, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xae}, SKINCOLOR_GREY, 15, 0, true}, // SKINCOLOR_AETHER
|
||||
{"Slate", {0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0xaa, 0xaa, 0xaa, 0xab, 0xac, 0xac, 0xad, 0xad, 0xae, 0xaf}, SKINCOLOR_SILVER, 12, 0, true}, // SKINCOLOR_SLATE
|
||||
{"Meteorite", { 0, 4, 8, 9, 11, 12, 14, 15, 171, 172, 173, 174, 175, 27, 29, 31}, SKINCOLOR_TOPAZ, 15, V_GRAYMAP, true}, // SKINCOLOR_METEORITE
|
||||
{"Mercury", { 0, 3, 4, 7, 11, 12, 14, 15, 171, 172, 173, 155, 157, 159, 253, 254}, SKINCOLOR_ECRU, 15, V_AZUREMAP, true}, // SKINCOLOR_MERCURY
|
||||
{"Moonstone", { 0, 4, 8, 9, 11, 12, 14, 15, 171, 172, 173, 174, 175, 27, 29, 31}, SKINCOLOR_TOPAZ, 15, V_GRAYMAP, true}, // SKINCOLOR_MOONSTONE
|
||||
{"Bluebell", {0x90, 0x91, 0x92, 0x93, 0x94, 0x94, 0x95, 0xac, 0xac, 0xad, 0xad, 0xa8, 0xa8, 0xa9, 0xfd, 0xfe}, SKINCOLOR_COPPER, 4, V_BLUEMAP, true}, // SKINCOLOR_BLUEBELL
|
||||
{"Pink", {0xd0, 0xd0, 0xd1, 0xd1, 0xd2, 0xd2, 0xd3, 0xd3, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0x2b, 0x2c, 0x2e}, SKINCOLOR_AZURE, 9, V_REDMAP, true}, // SKINCOLOR_PINK
|
||||
{"Rosewood", { 209, 210, 211, 212, 213, 214, 228, 230, 232, 234, 235, 237, 26, 27, 28, 29}, SKINCOLOR_SEPIA, 5, V_BROWNMAP, true}, // SKINCOLOR_ROSEWOOD
|
||||
|
@ -21597,37 +21596,37 @@ skincolor_t skincolors[MAXSKINCOLORS] = {
|
|||
{"Boulder", {0xde, 0xe0, 0xe1, 0xe4, 0xe7, 0xe9, 0xeb, 0xec, 0xed, 0xed, 0xed, 0x19, 0x19, 0x1b, 0x1d, 0x1e}, SKINCOLOR_KETCHUP, 0, V_BROWNMAP, true}, // SKINCOLOR_BOULDER
|
||||
{"Bronze", { 82, 84, 50, 51, 223, 228, 230, 232, 234, 236, 237, 238, 239, 239, 30, 31}, SKINCOLOR_VOLCANIC, 9, V_BROWNMAP, true}, // SKINCOLOR_BRONZE
|
||||
{"Sepia", { 88, 84, 85, 86, 224, 226, 228, 230, 232, 235, 236, 237, 238, 239, 28, 28}, SKINCOLOR_ROSEWOOD, 5, V_BROWNMAP, true}, // SKINCOLOR_SEPIA
|
||||
{"Ecru", { 80, 83, 84, 85, 86, 242, 243, 245, 230, 232, 234, 236, 238, 239, 47, 47}, SKINCOLOR_MERCURY, 15, V_BROWNMAP, true}, // SKINCOLOR_ECRU
|
||||
{"Ecru", { 80, 83, 84, 85, 86, 242, 243, 245, 230, 232, 234, 236, 238, 239, 47, 47}, SKINCOLOR_ARCTIC, 12, V_BROWNMAP, true}, // SKINCOLOR_ECRU
|
||||
{"Tan", {0x51, 0x51, 0x54, 0x54, 0x55, 0x55, 0x56, 0x56, 0x56, 0x57, 0xf5, 0xf5, 0xf9, 0xf9, 0xed, 0xed}, SKINCOLOR_BROWN, 12, V_BROWNMAP, true}, // SKINCOLOR_TAN
|
||||
{"Beige", {0x54, 0x55, 0x56, 0x56, 0xf2, 0xf3, 0xf3, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfb, 0xed, 0xed}, SKINCOLOR_MOSS, 5, V_BROWNMAP, true}, // SKINCOLOR_BEIGE
|
||||
{"Rosebush", { 208, 216, 209, 85, 90, 91, 91, 92, 191, 93, 94, 107, 109, 110, 111, 111}, SKINCOLOR_EGGPLANT, 5, V_GREENMAP, true}, // SKINCOLOR_ROSEBUSH
|
||||
{"Moss", {0x58, 0x58, 0x59, 0x59, 0x5a, 0x5a, 0x5b, 0x5b, 0x5b, 0x5c, 0x5d, 0x5d, 0x5e, 0x5e, 0x5f, 0x5f}, SKINCOLOR_BEIGE, 13, V_GREENMAP, true}, // SKINCOLOR_MOSS
|
||||
{"Azure", {0x90, 0x90, 0x91, 0x91, 0xaa, 0xaa, 0xab, 0xab, 0xab, 0xac, 0xad, 0xad, 0xae, 0xae, 0xaf, 0xaf}, SKINCOLOR_PINK, 5, V_AZUREMAP, true}, // SKINCOLOR_AZURE
|
||||
{"Eggplant", { 4, 8, 11, 11, 16, 195, 195, 195, 196, 186, 187, 187, 254, 254, 30, 31}, SKINCOLOR_ROSEBUSH, 5, V_PURPLEMAP, true}, // SKINCOLOR_EGGPLANT
|
||||
{"Lavender", {0xc0, 0xc0, 0xc1, 0xc1, 0xc2, 0xc2, 0xc3, 0xc3, 0xc3, 0xc4, 0xc5, 0xc5, 0xc6, 0xc6, 0xc7, 0xc7}, SKINCOLOR_HEADLIGHT, 8, V_PURPLEMAP, true}, // SKINCOLOR_LAVENDER
|
||||
{"Lavender", {0xc0, 0xc0, 0xc1, 0xc1, 0xc2, 0xc2, 0xc3, 0xc3, 0xc3, 0xc4, 0xc5, 0xc5, 0xc6, 0xc6, 0xc7, 0xc7}, SKINCOLOR_GOLD, 4, V_PURPLEMAP, true}, // SKINCOLOR_LAVENDER
|
||||
|
||||
// Viv's vivid colours (toast 21/07/17)
|
||||
// Tweaks & additions (Lach, sphere, Alice, MotorRoach 26/10/22)
|
||||
// Tweaks & additions (Lach, Chrispy, sphere, Alice, MotorRoach & Saneko 26/10/22)
|
||||
{"Ruby", {0xb0, 0xb0, 0xc9, 0xca, 0xcc, 0x26, 0x27, 0x28, 0x29, 0x2a, 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xfd}, SKINCOLOR_EMERALD, 10, V_REDMAP, true}, // SKINCOLOR_RUBY
|
||||
{"Cherry", { 202, 203, 204, 205, 206, 40, 41, 42, 43, 44, 186, 187, 28, 29, 30, 31}, SKINCOLOR_MIDNIGHT, 10, V_REDMAP, true}, // SKINCOLOR_CHERRY
|
||||
{"Salmon", {0xd0, 0xd0, 0xd1, 0xd2, 0x20, 0x21, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e}, SKINCOLOR_FOREST, 6, V_REDMAP, true}, // SKINCOLOR_SALMON
|
||||
{"Pepper", { 210, 32, 33, 34, 35, 35, 36, 37, 38, 39, 41, 43, 45, 45, 46, 47}, SKINCOLOR_GREEN, 10, V_REDMAP, true}, // SKINCOLOR_PEPPER
|
||||
{"Red", {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x47, 0x2e, 0x2f}, SKINCOLOR_MASTER, 8, V_REDMAP, true}, // SKINCOLOR_RED
|
||||
{"Pepper", { 210, 32, 33, 34, 35, 35, 36, 37, 38, 39, 41, 43, 45, 45, 46, 47}, SKINCOLOR_MASTER, 8, V_REDMAP, true}, // SKINCOLOR_PEPPER
|
||||
{"Red", {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x47, 0x2e, 0x2f}, SKINCOLOR_GREEN, 10, V_REDMAP, true}, // SKINCOLOR_RED
|
||||
{"Crimson", {0x27, 0x27, 0x28, 0x28, 0x29, 0x2a, 0x2b, 0x2b, 0x2c, 0x2d, 0x2e, 0x2e, 0x2e, 0x2f, 0x2f, 0x1f}, SKINCOLOR_ICY, 10, V_REDMAP, true}, // SKINCOLOR_CRIMSON
|
||||
{"Flame", {0x31, 0x32, 0x33, 0x36, 0x22, 0x22, 0x25, 0x25, 0x25, 0xcd, 0xcf, 0xcf, 0xc5, 0xc5, 0xc7, 0xc7}, SKINCOLOR_PURPLE, 8, V_REDMAP, true}, // SKINCOLOR_FLAME
|
||||
{"Garnet", { 0, 83, 50, 53, 34, 35, 37, 38, 39, 40, 42, 44, 45, 46, 47, 47}, SKINCOLOR_AQUAMARINE, 6, V_REDMAP, true}, // SKINCOLOR_GARNET
|
||||
{"Ketchup", {0x48, 0x49, 0x40, 0x33, 0x34, 0x36, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2b, 0x2c, 0x47, 0x2e, 0x2f}, SKINCOLOR_BOULDER, 8, V_REDMAP, true}, // SKINCOLOR_KETCHUP
|
||||
{"Peachy", {0xd0, 0x30, 0x31, 0x31, 0x32, 0x32, 0xdc, 0xdc, 0xdc, 0xd3, 0xd4, 0xd4, 0xcc, 0xcd, 0xce, 0xcf}, SKINCOLOR_TEAL, 7, V_ROSYMAP, true}, // SKINCOLOR_PEACHY
|
||||
{"Quail", {0xd8, 0xd9, 0xdb, 0xdc, 0xde, 0xdf, 0xd5, 0xd5, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0x1d, 0x1f}, SKINCOLOR_WAVE, 5, V_BROWNMAP, true}, // SKINCOLOR_QUAIL
|
||||
{"Foundation", { 80, 81, 82, 84, 219, 221, 221, 212, 213, 214, 215, 195, 196, 186, 187, 30}, SKINCOLOR_DREAM, 6, V_ORANGEMAP, true}, // SKINCOLOR_FOUNDATION
|
||||
{"Foundation", { 80, 81, 82, 84, 219, 221, 221, 212, 213, 214, 215, 197, 186, 187, 187, 30}, SKINCOLOR_DREAM, 6, V_ORANGEMAP, true}, // SKINCOLOR_FOUNDATION
|
||||
{"Sunset", {0x51, 0x52, 0x40, 0x40, 0x34, 0x36, 0xd5, 0xd5, 0xd6, 0xd7, 0xcf, 0xcf, 0xc6, 0xc6, 0xc7, 0xfe}, SKINCOLOR_SAPPHIRE, 5, V_ORANGEMAP, true}, // SKINCOLOR_SUNSET
|
||||
{"Copper", {0x58, 0x54, 0x40, 0x34, 0x35, 0x38, 0x3a, 0x3c, 0x3d, 0x2a, 0x2b, 0x2c, 0x2c, 0xba, 0xba, 0xbb}, SKINCOLOR_BLUEBELL, 5, V_ORANGEMAP, true}, // SKINCOLOR_COPPER
|
||||
{"Apricot", {0x00, 0xd8, 0xd9, 0xda, 0xdb, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e}, SKINCOLOR_CYAN, 4, V_ORANGEMAP, true}, // SKINCOLOR_APRICOT
|
||||
{"Orange", { 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 42, 44, 45, 46, 46}, SKINCOLOR_BLUE, 4, V_ORANGEMAP, true}, // SKINCOLOR_ORANGE
|
||||
{"Pumpkin", { 51, 52, 53, 54, 56, 58, 59, 59, 61, 61, 63, 45, 46, 47, 47, 31}, SKINCOLOR_ARCTIC, 12, V_ORANGEMAP, true}, // SKINCOLOR_PUMPKIN
|
||||
{"Rust", {0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3c, 0x3d, 0x3d, 0x3d, 0x3f, 0x2c, 0x2d, 0x47, 0x2e, 0x2f, 0x2f}, SKINCOLOR_YOGURT, 8, V_ORANGEMAP, true}, // SKINCOLOR_RUST
|
||||
{"Gold", {0x51, 0x51, 0x54, 0x54, 0x41, 0x42, 0x43, 0x43, 0x44, 0x45, 0x46, 0x3f, 0x2d, 0x2e, 0x2f, 0x2f}, SKINCOLOR_MAUVE, 8, V_YELLOWMAP, true}, // SKINCOLOR_GOLD
|
||||
{"Topaz", { 0, 81, 83, 73, 74, 74, 65, 52, 53, 54, 56, 58, 60, 42, 43, 45}, SKINCOLOR_METEORITE, 10, V_YELLOWMAP, true}, // SKINCOLOR_TOPAZ
|
||||
{"Tangerine", { 81, 83, 64, 64, 51, 52, 53, 54, 56, 58, 60, 61, 63, 45, 46, 47}, SKINCOLOR_OCEAN, 12, V_ORANGEMAP, true}, // SKINCOLOR_TANGERINE
|
||||
{"Topaz", { 0, 81, 83, 73, 74, 74, 65, 52, 53, 54, 56, 58, 60, 42, 43, 45}, SKINCOLOR_MOONSTONE, 10, V_YELLOWMAP, true}, // SKINCOLOR_TOPAZ
|
||||
{"Gold", {0x51, 0x51, 0x54, 0x54, 0x41, 0x42, 0x43, 0x43, 0x44, 0x45, 0x46, 0x3f, 0x2d, 0x2e, 0x2f, 0x2f}, SKINCOLOR_LAVENDER, 10, V_YELLOWMAP, true}, // SKINCOLOR_GOLD
|
||||
{"Sandy", {0x53, 0x40, 0x41, 0x42, 0x43, 0xe6, 0xe9, 0xe9, 0xea, 0xec, 0xec, 0xc6, 0xc6, 0xc7, 0xc7, 0xfe}, SKINCOLOR_SKY, 8, V_YELLOWMAP, true}, // SKINCOLOR_SANDY
|
||||
{"Goldenrod", { 0, 80, 81, 81, 83, 73, 73, 64, 65, 66, 67, 68, 69, 62, 44, 45}, SKINCOLOR_MAJESTY, 8, V_YELLOWMAP, true}, // SKINCOLOR_GOLDENROD
|
||||
{"Yellow", {0x52, 0x53, 0x49, 0x49, 0x4a, 0x4a, 0x4b, 0x4b, 0x4b, 0x4c, 0x4d, 0x4d, 0x4e, 0x4e, 0x4f, 0xed}, SKINCOLOR_CORNFLOWER, 8, V_YELLOWMAP, true}, // SKINCOLOR_YELLOW
|
||||
|
@ -21637,20 +21636,21 @@ skincolor_t skincolors[MAXSKINCOLORS] = {
|
|||
{"Lime", {0x50, 0x51, 0x52, 0x53, 0x48, 0xbc, 0xbd, 0xbe, 0xbe, 0xbf, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f}, SKINCOLOR_MAGENTA, 9, V_PERIDOTMAP, true}, // SKINCOLOR_LIME
|
||||
{"Peridot", {0x58, 0x58, 0xbc, 0xbc, 0xbd, 0xbd, 0xbe, 0xbe, 0xbe, 0xbf, 0x5e, 0x5e, 0x5f, 0x5f, 0x77, 0x77}, SKINCOLOR_COBALT, 2, V_PERIDOTMAP, true}, // SKINCOLOR_PERIDOT
|
||||
{"Apple", {0x49, 0x49, 0xbc, 0xbd, 0xbe, 0xbe, 0xbe, 0x67, 0x69, 0x6a, 0x6b, 0x6b, 0x6c, 0x6d, 0x6d, 0x6d}, SKINCOLOR_RASPBERRY, 13, V_PERIDOTMAP, true}, // SKINCOLOR_APPLE
|
||||
{"Headlight", { 0, 80, 81, 82, 73, 84, 64, 65, 91, 91, 124, 125, 126, 137, 138, 139}, SKINCOLOR_MAUVE, 8, V_YELLOWMAP, true}, // SKINCOLOR_HEADLIGHT
|
||||
{"Chartreuse", { 80, 82, 72, 73, 188, 188, 113, 114, 114, 125, 126, 137, 138, 139, 253, 254}, SKINCOLOR_NOBLE, 9, V_PERIDOTMAP, true}, // SKINCOLOR_CHARTREUSE
|
||||
{"Green", {0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f}, SKINCOLOR_PEPPER, 8, V_GREENMAP, true}, // SKINCOLOR_GREEN
|
||||
{"Green", {0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f}, SKINCOLOR_RED, 6, V_GREENMAP, true}, // SKINCOLOR_GREEN
|
||||
{"Forest", {0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x6a, 0x6b, 0x6b, 0x6c, 0x6d, 0x6d, 0x6e, 0x6e, 0x6e, 0x6f}, SKINCOLOR_SALMON, 9, V_GREENMAP, true}, // SKINCOLOR_FOREST
|
||||
{"Shamrock", {0x70, 0x70, 0x71, 0x71, 0x72, 0x72, 0x73, 0x73, 0x73, 0x74, 0x75, 0x75, 0x76, 0x76, 0x77, 0x77}, SKINCOLOR_CRYSTAL, 10, V_GREENMAP, true}, // SKINCOLOR_SHAMROCK
|
||||
{"Jade", { 128, 120, 121, 122, 122, 113, 114, 114, 115, 116, 117, 118, 119, 110, 111, 30}, SKINCOLOR_ROSY, 7, V_GREENMAP, true}, // SKINCOLOR_JADE
|
||||
{"Headlight", { 0, 80, 81, 82, 73, 84, 64, 65, 91, 91, 124, 125, 126, 137, 138, 139}, SKINCOLOR_LAVENDER, 10, V_YELLOWMAP, true}, // SKINCOLOR_HEADLIGHT
|
||||
{"Shamrock", {0x70, 0x70, 0x71, 0x71, 0x72, 0x72, 0x73, 0x73, 0x73, 0x74, 0x75, 0x75, 0x76, 0x76, 0x77, 0x77}, SKINCOLOR_SIBERITE, 10, V_GREENMAP, true}, // SKINCOLOR_SHAMROCK
|
||||
{"Jade", { 128, 120, 121, 122, 122, 113, 114, 114, 115, 116, 117, 118, 119, 110, 111, 30}, SKINCOLOR_TAFFY, 10, V_GREENMAP, true}, // SKINCOLOR_JADE
|
||||
{"Mint", {0x00, 0x00, 0x58, 0x58, 0x59, 0x62, 0x62, 0x62, 0x64, 0x67, 0x7e, 0x7e, 0x8f, 0x8f, 0x8a, 0x8a}, SKINCOLOR_VIOLET, 5, V_GREENMAP, true}, // SKINCOLOR_MINT
|
||||
{"Master", { 0, 80, 88, 96, 112, 113, 99, 100, 124, 125, 126, 117, 107, 118, 119, 111}, SKINCOLOR_RED, 6, V_GREENMAP, true}, // SKINCOLOR_MASTER
|
||||
{"Master", { 0, 80, 88, 96, 112, 113, 99, 100, 124, 125, 126, 117, 107, 118, 119, 111}, SKINCOLOR_PEPPER, 8, V_GREENMAP, true}, // SKINCOLOR_MASTER
|
||||
{"Emerald", { 80, 96, 112, 113, 114, 114, 125, 125, 126, 126, 137, 137, 138, 138, 139, 139}, SKINCOLOR_RUBY, 9, V_GREENMAP, true}, // SKINCOLOR_EMERALD
|
||||
{"Bottle", { 0, 1, 3, 4, 5, 140, 141, 141, 124, 125, 126, 127, 118, 119, 111, 111}, SKINCOLOR_LATTE, 14, V_AQUAMAP, true}, // SKINCOLOR_BOTTLE
|
||||
{"Seafoam", {0x01, 0x58, 0x59, 0x5a, 0x7c, 0x7d, 0x7d, 0x7e, 0x7e, 0x8f, 0x8f, 0x8a, 0x8a, 0x8b, 0xfd, 0xfd}, SKINCOLOR_PLUM, 6, V_AQUAMAP, true}, // SKINCOLOR_SEAFOAM
|
||||
{"Island", { 96, 97, 113, 113, 114, 124, 142, 136, 136, 150, 151, 153, 168, 168, 169, 169}, SKINCOLOR_GALAXY, 7, V_AQUAMAP, true}, // SKINCOLOR_ISLAND
|
||||
{"Aqua", {0x78, 0x79, 0x7a, 0x7a, 0x7b, 0x7b, 0x7c, 0x7c, 0x7c, 0x7d, 0x7e, 0x7e, 0x7f, 0x7f, 0x76, 0x77}, SKINCOLOR_TAFFY, 10, V_AQUAMAP, true}, // SKINCOLOR_AQUA
|
||||
{"Bottle", { 0, 1, 3, 4, 5, 140, 141, 141, 124, 125, 126, 127, 118, 119, 111, 111}, SKINCOLOR_LATTE, 14, V_AQUAMAP, true}, // SKINCOLOR_BOTTLE
|
||||
{"Aqua", {0x78, 0x79, 0x7a, 0x7a, 0x7b, 0x7b, 0x7c, 0x7c, 0x7c, 0x7d, 0x7e, 0x7e, 0x7f, 0x7f, 0x76, 0x77}, SKINCOLOR_ROSY, 7, V_AQUAMAP, true}, // SKINCOLOR_AQUA
|
||||
{"Teal", {0x78, 0x78, 0x8c, 0x8c, 0x8d, 0x8d, 0x8d, 0x8e, 0x8e, 0x8f, 0x8f, 0x8f, 0x8a, 0x8a, 0x8a, 0x8a}, SKINCOLOR_PEACHY, 7, V_SKYMAP, true}, // SKINCOLOR_TEAL
|
||||
{"Ocean", { 120, 121, 122, 122, 123, 141, 142, 142, 136, 137, 138, 138, 139, 139, 253, 253}, SKINCOLOR_TANGERINE, 4, V_AQUAMAP, true}, // SKINCOLOR_OCEAN
|
||||
{"Wave", {0x00, 0x78, 0x78, 0x79, 0x8d, 0x87, 0x88, 0x89, 0x89, 0xae, 0xa8, 0xa8, 0xa9, 0xa9, 0xfd, 0xfd}, SKINCOLOR_QUAIL, 5, V_SKYMAP, true}, // SKINCOLOR_WAVE
|
||||
{"Cyan", {0x80, 0x81, 0xff, 0xff, 0x83, 0x83, 0x8d, 0x8d, 0x8d, 0x8e, 0x7e, 0x7f, 0x76, 0x76, 0x77, 0x6e}, SKINCOLOR_APRICOT, 6, V_SKYMAP, true}, // SKINCOLOR_CYAN
|
||||
{"Turquoise", { 0, 120, 121, 122, 123, 141, 141, 135, 136, 136, 150, 153, 155, 157, 159, 253}, SKINCOLOR_SANGRIA, 12, V_SKYMAP, true}, // SKINCOLOR_TURQUOISE
|
||||
|
@ -21661,12 +21661,12 @@ skincolor_t skincolors[MAXSKINCOLORS] = {
|
|||
{"Dream", { 80, 208, 200, 200, 146, 146, 133, 134, 135, 136, 137, 138, 139, 139, 254, 254}, SKINCOLOR_FOUNDATION, 9, V_SKYMAP, true}, // SKINCOLOR_DREAM
|
||||
{"Icy", {0x00, 0x00, 0x00, 0x00, 0x80, 0x81, 0x83, 0x83, 0x86, 0x87, 0x95, 0x95, 0xad, 0xad, 0xae, 0xaf}, SKINCOLOR_CRIMSON, 0, V_SKYMAP, true}, // SKINCOLOR_ICY
|
||||
{"Daybreak", { 80, 81, 82, 72, 64, 9, 11, 171, 149, 150, 151, 153, 156, 157, 159, 253}, SKINCOLOR_EVENTIDE, 12, V_BLUEMAP, true}, // SKINCOLOR_DAYBREAK
|
||||
{"Sapphire", {0x80, 0x82, 0x86, 0x87, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xfd, 0xfe}, SKINCOLOR_SUNSET, 5, V_SKYMAP, true}, // SKINCOLOR_SAPPHIRE
|
||||
{"Arctic", { 0, 1, 3, 4, 146, 146, 147, 148, 148, 149, 150, 153, 156, 159, 253, 254}, SKINCOLOR_PUMPKIN, 6, V_BLUEMAP, true}, // SKINCOLOR_ARCTIC
|
||||
{"Sapphire", {0x80, 0x82, 0x86, 0x87, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xfd, 0xfe}, SKINCOLOR_SUNSET, 5, V_BLUEMAP, true}, // SKINCOLOR_SAPPHIRE
|
||||
{"Arctic", { 0, 1, 3, 4, 145, 146, 147, 148, 148, 149, 150, 153, 156, 159, 253, 254}, SKINCOLOR_ECRU, 15, V_BLUEMAP, true}, // SKINCOLOR_ARCTIC
|
||||
{"Cornflower", {0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x9a, 0x9c, 0x9d, 0x9d, 0x9e, 0x9e, 0x9e}, SKINCOLOR_YELLOW, 4, V_BLUEMAP, true}, // SKINCOLOR_CORNFLOWER
|
||||
{"Blue", {0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xfd, 0xfe}, SKINCOLOR_ORANGE, 5, V_BLUEMAP, true}, // SKINCOLOR_BLUE
|
||||
{"Cobalt", { 145, 147, 149, 150, 151, 153, 154, 155, 156, 157, 158, 159, 253, 253, 254, 254}, SKINCOLOR_PERIDOT, 5, V_BLUEMAP, true}, // SKINCOLOR_COBALT
|
||||
{"Midnight", { 171, 171, 172, 173, 173, 174, 155, 156, 157, 159, 253, 253, 254, 254, 31, 31}, SKINCOLOR_CHERRY, 10, V_GRAYMAP, true}, // SKINCOLOR_MIDNIGHT
|
||||
{"Midnight", { 171, 171, 172, 173, 173, 174, 175, 157, 158, 159, 253, 253, 254, 254, 31, 31}, SKINCOLOR_CHERRY, 10, V_GRAYMAP, true}, // SKINCOLOR_MIDNIGHT
|
||||
{"Galaxy", { 160, 161, 162, 163, 164, 165, 166, 166, 154, 155, 156, 157, 159, 253, 254, 31}, SKINCOLOR_ISLAND, 7, V_PURPLEMAP, true}, // SKINCOLOR_GALAXY
|
||||
{"Vapor", {0x80, 0x81, 0x83, 0x86, 0x94, 0x94, 0xa3, 0xa3, 0xa4, 0xa6, 0xa6, 0xa6, 0xa8, 0xa8, 0xa9, 0xa9}, SKINCOLOR_LILAC, 4, V_SKYMAP, true}, // SKINCOLOR_VAPOR
|
||||
{"Dusk", {0x92, 0x93, 0x94, 0x94, 0xac, 0xad, 0xad, 0xad, 0xae, 0xae, 0xaf, 0xaf, 0xa9, 0xa9, 0xfd, 0xfd}, SKINCOLOR_OLIVE, 0, V_BLUEMAP, true}, // SKINCOLOR_DUSK
|
||||
|
@ -21676,21 +21676,21 @@ skincolor_t skincolors[MAXSKINCOLORS] = {
|
|||
{"Noble", { 144, 146, 147, 148, 149, 164, 164, 165, 166, 185, 186, 186, 187, 187, 28, 29}, SKINCOLOR_CHARTREUSE, 12, V_PURPLEMAP, true}, // SKINCOLOR_NOBLE
|
||||
{"Fuchsia", { 200, 201, 203, 204, 204, 183, 184, 184, 165, 166, 167, 168, 169, 159, 253, 254}, SKINCOLOR_LEMON, 10, V_PURPLEMAP, true}, // SKINCOLOR_FUCHSIA
|
||||
{"Bubblegum", { 0, 208, 208, 176, 177, 178, 179, 180, 181, 182, 164, 166, 167, 168, 169, 253}, SKINCOLOR_PASTEL, 8, V_MAGENTAMAP, true}, // SKINCOLOR_BUBBLEGUM
|
||||
{"Crystal", { 252, 177, 179, 180, 181, 181, 182, 182, 183, 164, 166, 167, 167, 168, 169, 159}, SKINCOLOR_EMERALD, 8, V_MAGENTAMAP, true}, // SKINCOLOR_CRYSTAL
|
||||
{"Siberite", { 252, 177, 179, 180, 181, 181, 182, 182, 183, 164, 166, 167, 167, 168, 169, 159}, SKINCOLOR_EMERALD, 8, V_MAGENTAMAP, true}, // SKINCOLOR_SIBERITE
|
||||
{"Magenta", {0xb3, 0xb3, 0xb4, 0xb5, 0xb6, 0xb6, 0xb7, 0xb7, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xbb}, SKINCOLOR_LIME, 6, V_MAGENTAMAP, true}, // SKINCOLOR_MAGENTA
|
||||
{"Neon", {0xb3, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xbb, 0xc7, 0xc7, 0x1d, 0x1d, 0x1e}, SKINCOLOR_CERULEAN, 2, V_MAGENTAMAP, true}, // SKINCOLOR_NEON
|
||||
{"Violet", {0xd0, 0xd1, 0xd2, 0xca, 0xcc, 0xb8, 0xb9, 0xb9, 0xba, 0xa8, 0xa8, 0xa9, 0xa9, 0xfd, 0xfe, 0xfe}, SKINCOLOR_MINT, 6, V_MAGENTAMAP, true}, // SKINCOLOR_VIOLET
|
||||
{"Royal", { 208, 209, 192, 192, 192, 193, 193, 194, 194, 172, 173, 174, 175, 175, 139, 139}, SKINCOLOR_FANCY, 9, V_PURPLEMAP, true}, // SKINCOLOR_ROYAL
|
||||
{"Lilac", {0x00, 0xd0, 0xd1, 0xd2, 0xd3, 0xc1, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc5, 0xc6, 0xc6, 0xfe, 0x1f}, SKINCOLOR_VAPOR, 4, V_ROSYMAP, true}, // SKINCOLOR_LILAC
|
||||
{"Mauve", { 176, 177, 178, 192, 193, 194, 195, 195, 196, 185, 185, 186, 186, 187, 187, 253}, SKINCOLOR_GOLD, 4, V_PURPLEMAP, true}, // SKINCOLOR_MAUVE
|
||||
{"Mauve", { 176, 177, 178, 192, 193, 194, 195, 195, 196, 185, 185, 186, 186, 187, 187, 253}, SKINCOLOR_HEADLIGHT, 8, V_PURPLEMAP, true}, // SKINCOLOR_MAUVE
|
||||
{"Eventide", { 51, 52, 53, 33, 34, 204, 183, 183, 184, 184, 166, 167, 168, 169, 253, 254}, SKINCOLOR_DAYBREAK, 13, V_MAGENTAMAP, true}, // SKINCOLOR_EVENTIDE
|
||||
{"Plum", {0xc8, 0xd3, 0xd5, 0xd6, 0xd7, 0xce, 0xcf, 0xb9, 0xb9, 0xba, 0xba, 0xa9, 0xa9, 0xa9, 0xfd, 0xfe}, SKINCOLOR_MINT, 7, V_ROSYMAP, true}, // SKINCOLOR_PLUM
|
||||
{"Raspberry", {0xc8, 0xc9, 0xca, 0xcb, 0xcb, 0xcc, 0xcd, 0xcd, 0xce, 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xfe, 0xfe}, SKINCOLOR_APPLE, 13, V_ROSYMAP, true}, // SKINCOLOR_RASPBERRY
|
||||
{"Taffy", { 1, 176, 176, 177, 178, 179, 202, 203, 204, 204, 205, 206, 207, 44, 45, 46}, SKINCOLOR_AQUA, 1, V_ROSYMAP, true}, // SKINCOLOR_TAFFY
|
||||
{"Rosy", {0xfc, 0xc8, 0xc8, 0xc9, 0xc9, 0xca, 0xca, 0xcb, 0xcb, 0xcc, 0xcc, 0xcd, 0xcd, 0xce, 0xce, 0xcf}, SKINCOLOR_JADE, 8, V_ROSYMAP, true}, // SKINCOLOR_ROSY
|
||||
{"Taffy", { 1, 176, 176, 177, 178, 179, 202, 203, 204, 204, 205, 206, 207, 44, 45, 46}, SKINCOLOR_JADE, 8, V_ROSYMAP, true}, // SKINCOLOR_TAFFY
|
||||
{"Rosy", {0xfc, 0xc8, 0xc8, 0xc9, 0xc9, 0xca, 0xca, 0xcb, 0xcb, 0xcc, 0xcc, 0xcd, 0xcd, 0xce, 0xce, 0xcf}, SKINCOLOR_AQUA, 1, V_ROSYMAP, true}, // SKINCOLOR_ROSY
|
||||
{"Fancy", { 0, 208, 49, 210, 210, 202, 202, 203, 204, 204, 205, 206, 207, 207, 186, 186}, SKINCOLOR_ROYAL, 9, V_ROSYMAP, true}, // SKINCOLOR_FANCY
|
||||
{"Sangria", { 210, 32, 33, 34, 34, 215, 215, 207, 207, 185, 186, 186, 186, 169, 169, 253}, SKINCOLOR_TURQUOISE, 12, V_ROSYMAP, true}, // SKINCOLOR_SANGRIA
|
||||
{"Volcanic", { 35, 38, 41, 42, 44, 46, 46, 169, 169, 159, 253, 254, 30, 30, 31, 31}, SKINCOLOR_BRONZE, 9, V_REDMAP, true}, // SKINCOLOR_VOLCANIC
|
||||
{"Volcanic", { 54, 36, 42, 44, 45, 46, 46, 47, 28, 253, 253, 254, 254, 30, 31, 31}, SKINCOLOR_BRONZE, 9, V_REDMAP, true}, // SKINCOLOR_VOLCANIC
|
||||
|
||||
// super
|
||||
{"Super Silver 1", {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x03}, SKINCOLOR_BLACK, 15, 0, false}, // SKINCOLOR_SUPERSILVER1
|
||||
|
|
|
@ -1102,6 +1102,8 @@ static mapthing_t *OP_CreateNewMapThing(player_t *player, UINT16 type, boolean c
|
|||
|
||||
mt->options = (mt->z << ZSHIFT) | (UINT16)cv_opflags.value;
|
||||
mt->scale = player->mo->scale;
|
||||
mt->spritexscale = player->mo->spritexscale;
|
||||
mt->spriteyscale = player->mo->spriteyscale;
|
||||
memset(mt->args, 0, NUMMAPTHINGARGS*sizeof(*mt->args));
|
||||
memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs));
|
||||
mt->pitch = mt->roll = 0;
|
||||
|
|
|
@ -528,7 +528,7 @@ UINT8 M_CampaignWarpIsCheat(INT32 gt, INT32 mapnum, gamedata_t *data)
|
|||
}
|
||||
|
||||
// It's only a cheat if you've never been there.
|
||||
return (!(data->mapvisited[mapnum]));
|
||||
return (!(data->mapvisited[mapnum-1]));
|
||||
}
|
||||
|
||||
INT32 M_CountEmblems(gamedata_t *data)
|
||||
|
|
223
src/m_menu.c
223
src/m_menu.c
|
@ -12054,6 +12054,136 @@ static INT32 setupm_fakeskin;
|
|||
static menucolor_t *setupm_fakecolor;
|
||||
static boolean colorgrid;
|
||||
|
||||
#define COLOR_GRID_ROW_SIZE (16)
|
||||
|
||||
static UINT16 M_GetColorGridIndex(UINT16 color)
|
||||
{
|
||||
menucolor_t *look;
|
||||
UINT16 i = 0;
|
||||
|
||||
if (!skincolors[color].accessible)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (look = menucolorhead; ; i++, look = look->next)
|
||||
{
|
||||
while (!skincolors[look->color].accessible) // skip inaccessible colors
|
||||
{
|
||||
if (look == menucolortail)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
look = look->next;
|
||||
}
|
||||
|
||||
if (look->color == color)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
if (look == menucolortail)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static INT32 M_GridIndexToX(UINT16 index)
|
||||
{
|
||||
return (index % COLOR_GRID_ROW_SIZE);
|
||||
}
|
||||
|
||||
static INT32 M_GridIndexToY(UINT16 index)
|
||||
{
|
||||
return (index / COLOR_GRID_ROW_SIZE);
|
||||
}
|
||||
|
||||
static UINT16 M_ColorGridLen(void)
|
||||
{
|
||||
menucolor_t *look;
|
||||
UINT16 i = 0;
|
||||
|
||||
for (look = menucolorhead; ; i++)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (look == menucolortail)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
look = look->next;
|
||||
}
|
||||
while (!skincolors[look->color].accessible); // skip inaccessible colors
|
||||
}
|
||||
}
|
||||
|
||||
static UINT16 M_GridPosToGridIndex(INT32 x, INT32 y)
|
||||
{
|
||||
const UINT16 grid_len = M_ColorGridLen();
|
||||
const UINT16 grid_height = ((grid_len - 1) / COLOR_GRID_ROW_SIZE) + 1;
|
||||
const UINT16 last_row_len = COLOR_GRID_ROW_SIZE - ((grid_height * COLOR_GRID_ROW_SIZE) - grid_len);
|
||||
|
||||
UINT16 row_len = COLOR_GRID_ROW_SIZE;
|
||||
UINT16 new_index = 0;
|
||||
|
||||
while (y < 0)
|
||||
{
|
||||
y += grid_height;
|
||||
}
|
||||
y = (y % grid_height);
|
||||
|
||||
if (y >= grid_height-1 && last_row_len > 0)
|
||||
{
|
||||
row_len = last_row_len;
|
||||
}
|
||||
|
||||
while (x < 0)
|
||||
{
|
||||
x += row_len;
|
||||
}
|
||||
x = (x % row_len);
|
||||
|
||||
new_index = (y * COLOR_GRID_ROW_SIZE) + x;
|
||||
if (new_index >= grid_len)
|
||||
{
|
||||
new_index = grid_len - 1;
|
||||
}
|
||||
|
||||
return new_index;
|
||||
}
|
||||
|
||||
static menucolor_t *M_GridIndexToMenuColor(UINT16 index)
|
||||
{
|
||||
menucolor_t *look = menucolorhead;
|
||||
UINT16 i = 0;
|
||||
|
||||
for (look = menucolorhead; ; i++, look = look->next)
|
||||
{
|
||||
while (!skincolors[look->color].accessible) // skip inaccessible colors
|
||||
{
|
||||
if (look == menucolortail)
|
||||
{
|
||||
return menucolorhead;
|
||||
}
|
||||
|
||||
look = look->next;
|
||||
}
|
||||
|
||||
if (i == index)
|
||||
{
|
||||
return look;
|
||||
}
|
||||
|
||||
if (look == menucolortail)
|
||||
{
|
||||
return menucolorhead;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void M_DrawSetupMultiPlayerMenu(void)
|
||||
{
|
||||
INT32 x, y, cursory = 0, flags = 0;
|
||||
|
@ -12172,32 +12302,54 @@ colordraw:
|
|||
boolean stoprow = false;
|
||||
menucolor_t *mc; // Last accessed color
|
||||
|
||||
const UINT16 grid_len = M_ColorGridLen();
|
||||
const UINT16 grid_end_y = M_GridIndexToY(grid_len - 1);
|
||||
|
||||
INT32 grid_select = M_GetColorGridIndex(setupm_fakecolor->color);
|
||||
INT32 grid_select_y = M_GridIndexToY(grid_select);
|
||||
|
||||
x = 132;
|
||||
y = 66;
|
||||
pos = min(max(0, 16*((M_GetColorIndex(setupm_fakecolor->color)-1)/16) - 64), 16*(M_GetColorIndex(menucolortail->color)/16-1) - 128);
|
||||
mc = M_GetColorFromIndex(pos);
|
||||
|
||||
pos = M_GridPosToGridIndex(0, max(0, min(grid_select_y - 3, grid_end_y - 7)));
|
||||
mc = M_GridIndexToMenuColor(pos);
|
||||
|
||||
// Draw grid
|
||||
V_DrawFill(x-2, y-2, 132, 132, 159);
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
for (i = 0; i < 16; i++)
|
||||
for (i = 0; i < COLOR_GRID_ROW_SIZE; i++)
|
||||
{
|
||||
if (skincolors[mc->color].accessible && !stoprow)
|
||||
if (skincolors[mc->color].accessible)
|
||||
{
|
||||
M_DrawColorRamp(x + i*w, y + j*16, w, 1, skincolors[mc->color]);
|
||||
if (mc->color == setupm_fakecolor->color) // store current color position
|
||||
{
|
||||
cx = x + i*w;
|
||||
cy = y + j*16;
|
||||
}
|
||||
|
||||
if (mc == setupm_fakecolor) // store current color position
|
||||
{
|
||||
cx = x + i*w;
|
||||
cy = y + j*16;
|
||||
}
|
||||
}
|
||||
mc = mc->next;
|
||||
while (!skincolors[mc->color].accessible && !stoprow) // Find accessible color after this one
|
||||
|
||||
if (stoprow)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// Find accessible color after this one
|
||||
do
|
||||
{
|
||||
mc = mc->next;
|
||||
if (mc == menucolortail) stoprow = true;
|
||||
}
|
||||
if (mc == menucolortail)
|
||||
{
|
||||
stoprow = true;
|
||||
}
|
||||
} while (!skincolors[mc->color].accessible && !stoprow);
|
||||
}
|
||||
|
||||
if (stoprow)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12318,15 +12470,16 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
case KEY_DOWNARROW:
|
||||
case KEY_UPARROW:
|
||||
{
|
||||
UINT8 i;
|
||||
if (itemOn == 2 && colorgrid)
|
||||
{
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
setupm_fakecolor = (choice == KEY_UPARROW) ? setupm_fakecolor->prev : setupm_fakecolor->next;
|
||||
while (!skincolors[setupm_fakecolor->color].accessible) // skip inaccessible colors
|
||||
setupm_fakecolor = (choice == KEY_UPARROW) ? setupm_fakecolor->prev : setupm_fakecolor->next;
|
||||
}
|
||||
UINT16 index = M_GetColorGridIndex(setupm_fakecolor->color);
|
||||
INT32 x = M_GridIndexToX(index);
|
||||
INT32 y = M_GridIndexToY(index);
|
||||
|
||||
y += (choice == KEY_UPARROW) ? -1 : 1;
|
||||
|
||||
index = M_GridPosToGridIndex(x, y);
|
||||
setupm_fakecolor = M_GridIndexToMenuColor(index);
|
||||
}
|
||||
else if (choice == KEY_UPARROW)
|
||||
M_PrevOpt();
|
||||
|
@ -12353,8 +12506,8 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
}
|
||||
else if (itemOn == 2) // player color
|
||||
{
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
setupm_fakecolor = setupm_fakecolor->prev;
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -12393,8 +12546,8 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
}
|
||||
else if (itemOn == 2) // player color
|
||||
{
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
setupm_fakecolor = setupm_fakecolor->next;
|
||||
S_StartSound(NULL,sfx_menu1); // Tails
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -12404,13 +12557,28 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
UINT8 i;
|
||||
if (itemOn == 2) // player color
|
||||
{
|
||||
S_StartSound(NULL,sfx_menu1);
|
||||
for (i = 0; i < (colorgrid ? 64 : 13); i++) // or (282-charw)/(2*indexwidth)
|
||||
if (colorgrid)
|
||||
{
|
||||
setupm_fakecolor = (choice == KEY_PGUP) ? setupm_fakecolor->prev : setupm_fakecolor->next;
|
||||
while (!skincolors[setupm_fakecolor->color].accessible) // skip inaccessible colors
|
||||
setupm_fakecolor = (choice == KEY_PGUP) ? setupm_fakecolor->prev : setupm_fakecolor->next;
|
||||
UINT16 index = M_GetColorGridIndex(setupm_fakecolor->color);
|
||||
INT32 x = M_GridIndexToX(index);
|
||||
INT32 y = M_GridIndexToY(index);
|
||||
|
||||
y += (choice == KEY_UPARROW) ? -4 : 4;
|
||||
|
||||
index = M_GridPosToGridIndex(x, y);
|
||||
setupm_fakecolor = M_GridIndexToMenuColor(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 13; i++) // or (282-charw)/(2*indexwidth)
|
||||
{
|
||||
setupm_fakecolor = (choice == KEY_PGUP) ? setupm_fakecolor->prev : setupm_fakecolor->next;
|
||||
while (!skincolors[setupm_fakecolor->color].accessible) // skip inaccessible colors
|
||||
setupm_fakecolor = (choice == KEY_PGUP) ? setupm_fakecolor->prev : setupm_fakecolor->next;
|
||||
}
|
||||
}
|
||||
|
||||
S_StartSound(NULL, sfx_menu1); // Tails
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -12440,7 +12608,6 @@ static void M_HandleSetupMultiPlayer(INT32 choice)
|
|||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
case KEY_DEL:
|
||||
if (itemOn == 0 && (l = strlen(setupm_name))!=0)
|
||||
|
|
|
@ -1144,7 +1144,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
if (!(mo2->type == MT_RING || mo2->type == MT_COIN
|
||||
|| mo2->type == MT_BLUESPHERE || mo2->type == MT_BOMBSPHERE
|
||||
|| mo2->type == MT_NIGHTSCHIP || mo2->type == MT_NIGHTSSTAR
|
||||
|| ((mo2->type == MT_EMBLEM) && (mo2->reactiontime & GE_NIGHTSPULL))))
|
||||
|| ((mo2->type == MT_EMBLEM) && (mo2->reactiontime & GE_NIGHTSPULL) && P_CanPickupEmblem(player, mo2->health - 1) && !P_EmblemWasCollected(mo2->health - 1))))
|
||||
continue;
|
||||
|
||||
// Yay! The thing's in reach! Pull it in!
|
||||
|
|
42
src/p_mobj.c
42
src/p_mobj.c
|
@ -10564,6 +10564,29 @@ static fixed_t P_DefaultMobjShadowScale (mobj_t *thing)
|
|||
case MT_REDFLAG:
|
||||
case MT_BLUEFLAG:
|
||||
|
||||
case MT_BOUNCERING:
|
||||
case MT_AUTOMATICRING:
|
||||
case MT_INFINITYRING:
|
||||
case MT_RAILRING:
|
||||
case MT_EXPLOSIONRING:
|
||||
case MT_SCATTERRING:
|
||||
case MT_GRENADERING:
|
||||
|
||||
case MT_BOUNCEPICKUP:
|
||||
case MT_RAILPICKUP:
|
||||
case MT_AUTOPICKUP:
|
||||
case MT_EXPLODEPICKUP:
|
||||
case MT_SCATTERPICKUP:
|
||||
case MT_GRENADEPICKUP:
|
||||
|
||||
case MT_REDRING:
|
||||
case MT_THROWNBOUNCE:
|
||||
case MT_THROWNINFINITY:
|
||||
case MT_THROWNAUTOMATIC:
|
||||
case MT_THROWNSCATTER:
|
||||
case MT_THROWNEXPLOSION:
|
||||
case MT_THROWNGRENADE:
|
||||
|
||||
case MT_EMBLEM:
|
||||
|
||||
case MT_TOKEN:
|
||||
|
@ -11841,7 +11864,7 @@ void P_MovePlayerToStarpost(INT32 playernum)
|
|||
mapthing_t *huntemeralds[MAXHUNTEMERALDS];
|
||||
INT32 numhuntemeralds;
|
||||
|
||||
fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const fixed_t y, const fixed_t dz, const fixed_t offset, const boolean flip, const fixed_t scale)
|
||||
fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const fixed_t y, const fixed_t dz, const fixed_t offset, const boolean flip, const fixed_t scale, const boolean absolutez)
|
||||
{
|
||||
const subsector_t *ss = R_PointInSubsector(x, y);
|
||||
|
||||
|
@ -11851,9 +11874,9 @@ fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const f
|
|||
|
||||
// Establish height.
|
||||
if (flip)
|
||||
return P_GetSectorCeilingZAt(ss->sector, x, y) - dz - FixedMul(scale, offset + mobjinfo[mobjtype].height);
|
||||
return (absolutez ? dz : P_GetSectorCeilingZAt(ss->sector, x, y) - dz) - FixedMul(scale, offset + mobjinfo[mobjtype].height);
|
||||
else
|
||||
return P_GetSectorFloorZAt(ss->sector, x, y) + dz + FixedMul(scale, offset);
|
||||
return (absolutez ? dz : P_GetSectorFloorZAt(ss->sector, x, y) + dz) + FixedMul(scale, offset);
|
||||
}
|
||||
|
||||
fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mthing, const fixed_t x, const fixed_t y)
|
||||
|
@ -11861,6 +11884,7 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt
|
|||
fixed_t dz = mthing->z << FRACBITS; // Base offset from the floor.
|
||||
fixed_t offset = 0; // Specific scaling object offset.
|
||||
boolean flip = (!!(mobjinfo[mobjtype].flags & MF_SPAWNCEILING) ^ !!(mthing->options & MTF_OBJECTFLIP));
|
||||
boolean absolutez = !!(mthing->options & MTF_ABSOLUTEZ);
|
||||
|
||||
switch (mobjtype)
|
||||
{
|
||||
|
@ -11916,7 +11940,7 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt
|
|||
offset += mthing->args[0] ? 0 : 24*FRACUNIT;
|
||||
}
|
||||
|
||||
if (!(dz + offset)) // Snap to the surfaces when there's no offset set.
|
||||
if (!(dz + offset) && !absolutez) // Snap to the surfaces when there's no offset set.
|
||||
{
|
||||
if (flip)
|
||||
return ONCEILINGZ;
|
||||
|
@ -11924,7 +11948,7 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt
|
|||
return ONFLOORZ;
|
||||
}
|
||||
|
||||
return P_GetMobjSpawnHeight(mobjtype, x, y, dz, offset, flip, mthing->scale);
|
||||
return P_GetMobjSpawnHeight(mobjtype, x, y, dz, offset, flip, mthing->scale, absolutez);
|
||||
}
|
||||
|
||||
static boolean P_SpawnNonMobjMapThing(mapthing_t *mthing)
|
||||
|
@ -12593,7 +12617,7 @@ static boolean P_SetupNiGHTSDrone(mapthing_t *mthing, mobj_t *mobj)
|
|||
dronemangoaldiff = max(mobjinfo[MT_NIGHTSDRONE_MAN].height - mobjinfo[MT_NIGHTSDRONE_GOAL].height, 0);
|
||||
|
||||
if (flip && mobj->height != oldheight)
|
||||
P_MoveOrigin(mobj, mobj->x, mobj->y, mobj->z - (mobj->height - oldheight));
|
||||
P_SetOrigin(mobj, mobj->x, mobj->y, mobj->z - (mobj->height - oldheight));
|
||||
|
||||
if (!flip)
|
||||
{
|
||||
|
@ -13421,7 +13445,7 @@ void P_SpawnHoop(mapthing_t *mthing)
|
|||
vector4_t v, res;
|
||||
fixed_t x = mthing->x << FRACBITS;
|
||||
fixed_t y = mthing->y << FRACBITS;
|
||||
fixed_t z = P_GetMobjSpawnHeight(MT_HOOP, x, y, mthing->z << FRACBITS, 0, false, mthing->scale);
|
||||
fixed_t z = P_GetMobjSpawnHeight(MT_HOOP, x, y, mthing->z << FRACBITS, 0, false, mthing->scale, mthing->options & MTF_ABSOLUTEZ);
|
||||
|
||||
hoopcenter = P_SpawnMobj(x, y, z, MT_HOOPCENTER);
|
||||
hoopcenter->spawnpoint = mthing;
|
||||
|
@ -13548,7 +13572,7 @@ static void P_SpawnItemRow(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 numi
|
|||
itemtypes[r] = P_GetMobjtypeSubstitute(&dummything, itemtypes[r]);
|
||||
}
|
||||
}
|
||||
z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, mthing->options & MTF_OBJECTFLIP, mthing->scale);
|
||||
z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, mthing->options & MTF_OBJECTFLIP, mthing->scale, mthing->options & MTF_ABSOLUTEZ);
|
||||
|
||||
for (r = 0; r < numitems; r++)
|
||||
{
|
||||
|
@ -13607,7 +13631,7 @@ static void P_SpawnItemCircle(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 n
|
|||
itemtypes[i] = P_GetMobjtypeSubstitute(&dummything, itemtypes[i]);
|
||||
}
|
||||
}
|
||||
z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, false, mthing->scale);
|
||||
z = P_GetMobjSpawnHeight(itemtypes[0], x, y, z, 0, false, mthing->scale, mthing->options & MTF_ABSOLUTEZ);
|
||||
|
||||
for (i = 0; i < numitems; i++)
|
||||
{
|
||||
|
|
|
@ -491,7 +491,7 @@ void P_MovePlayerToSpawn(INT32 playernum, mapthing_t *mthing);
|
|||
void P_MovePlayerToStarpost(INT32 playernum);
|
||||
void P_AfterPlayerSpawn(INT32 playernum);
|
||||
|
||||
fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const fixed_t y, const fixed_t dz, const fixed_t offset, const boolean flip, const fixed_t scale);
|
||||
fixed_t P_GetMobjSpawnHeight(const mobjtype_t mobjtype, const fixed_t x, const fixed_t y, const fixed_t dz, const fixed_t offset, const boolean flip, const fixed_t scale, const boolean absolutez);
|
||||
fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mthing, const fixed_t x, const fixed_t y);
|
||||
|
||||
mobj_t *P_SpawnMapThing(mapthing_t *mthing);
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include "m_random.h"
|
||||
|
||||
#include "dehacked.h" // for map headers
|
||||
#include "deh_tables.h" // FREE_SKINCOLORS
|
||||
#include "r_main.h"
|
||||
#include "m_cond.h" // for emblems
|
||||
|
||||
|
@ -1220,12 +1221,19 @@ static void P_WriteDuplicateText(const char *text, char **target)
|
|||
|
||||
static void P_WriteSkincolor(INT32 constant, char **target)
|
||||
{
|
||||
const char *color_name;
|
||||
|
||||
if (constant <= SKINCOLOR_NONE
|
||||
|| constant >= (INT32)numskincolors)
|
||||
return;
|
||||
|
||||
if (constant >= SKINCOLOR_FIRSTFREESLOT)
|
||||
color_name = FREE_SKINCOLORS[constant - SKINCOLOR_FIRSTFREESLOT];
|
||||
else
|
||||
color_name = COLOR_ENUMS[constant];
|
||||
|
||||
P_WriteDuplicateText(
|
||||
va("SKINCOLOR_%s", skincolors[constant].name),
|
||||
va("SKINCOLOR_%s", color_name),
|
||||
target
|
||||
);
|
||||
}
|
||||
|
@ -1979,6 +1987,8 @@ static void ParseTextmapThingParameter(UINT32 i, const char *param, const char *
|
|||
// Flags
|
||||
else if (fastcmp(param, "flip") && fastcmp("true", val))
|
||||
mapthings[i].options |= MTF_OBJECTFLIP;
|
||||
else if (fastcmp(param, "absolutez") && fastcmp("true", val))
|
||||
mapthings[i].options |= MTF_ABSOLUTEZ;
|
||||
|
||||
else if (fastncmp(param, "stringarg", 9) && strlen(param) > 9)
|
||||
{
|
||||
|
@ -6761,6 +6771,9 @@ static void P_ConvertBinaryThingTypes(void)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Clear binary thing height hacks, to prevent interfering with UDMF-only flags
|
||||
mapthings[i].options &= 0xF;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -566,6 +566,7 @@ static void line_SpawnViaMapthingVertexes(const int linenum, const boolean spawn
|
|||
case TMSP_BACKCEILING:
|
||||
slopetoset = &line->backsector->c_slope;
|
||||
side = &sides[line->sidenum[1]];
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
|
63
src/p_spec.c
63
src/p_spec.c
|
@ -3216,19 +3216,18 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
foundrover = true;
|
||||
|
||||
// If fading an invisible FOF whose render flags we did not yet set,
|
||||
// initialize its alpha to 1
|
||||
// for relative alpha calc
|
||||
// initialize its alpha to 0 for relative alpha calculation
|
||||
if (!(line->args[3] & TMST_DONTDOTRANSLUCENT) && // do translucent
|
||||
(rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE
|
||||
!(rover->spawnflags & FOF_RENDERSIDES) &&
|
||||
!(rover->spawnflags & FOF_RENDERPLANES) &&
|
||||
!(rover->fofflags & FOF_RENDERALL))
|
||||
rover->alpha = 1;
|
||||
rover->alpha = 0;
|
||||
|
||||
P_RemoveFakeFloorFader(rover);
|
||||
P_FadeFakeFloor(rover,
|
||||
rover->alpha,
|
||||
max(1, min(256, (line->args[3] & TMST_RELATIVE) ? rover->alpha + destvalue : destvalue)),
|
||||
max(0, min(255, (line->args[3] & TMST_RELATIVE) ? rover->alpha + destvalue : destvalue)),
|
||||
0, // set alpha immediately
|
||||
false, NULL, // tic-based logic
|
||||
false, // do not handle FOF_EXISTS
|
||||
|
@ -3302,19 +3301,18 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
else
|
||||
{
|
||||
// If fading an invisible FOF whose render flags we did not yet set,
|
||||
// initialize its alpha to 1
|
||||
// for relative alpha calc
|
||||
// initialize its alpha to 1 for relative alpha calculation
|
||||
if (!(line->args[4] & TMFT_DONTDOTRANSLUCENT) && // do translucent
|
||||
(rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE
|
||||
!(rover->spawnflags & FOF_RENDERSIDES) &&
|
||||
!(rover->spawnflags & FOF_RENDERPLANES) &&
|
||||
!(rover->fofflags & FOF_RENDERALL))
|
||||
rover->alpha = 1;
|
||||
rover->alpha = 0;
|
||||
|
||||
P_RemoveFakeFloorFader(rover);
|
||||
P_FadeFakeFloor(rover,
|
||||
rover->alpha,
|
||||
max(1, min(256, (line->args[4] & TMFT_RELATIVE) ? rover->alpha + destvalue : destvalue)),
|
||||
max(0, min(255, (line->args[4] & TMFT_RELATIVE) ? rover->alpha + destvalue : destvalue)),
|
||||
0, // set alpha immediately
|
||||
false, NULL, // tic-based logic
|
||||
!(line->args[4] & TMFT_DONTDOEXISTS), // do not handle FOF_EXISTS
|
||||
|
@ -6470,10 +6468,10 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
//Cutting options
|
||||
if (ffloorflags & FOF_RENDERALL)
|
||||
{
|
||||
//If inside is visible, cut inner walls
|
||||
if ((lines[i].args[1] < 255) || (lines[i].args[3] & TMFA_SPLAT) || (lines[i].args[4] & TMFT_VISIBLEFROMINSIDE))
|
||||
//If inside is visible from the outside, cut inner walls
|
||||
if (lines[i].args[1] < 255 || (lines[i].args[3] & TMFA_SPLAT))
|
||||
ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA;
|
||||
else
|
||||
else if (!(lines[i].args[4] & TMFT_VISIBLEFROMINSIDE))
|
||||
ffloorflags |= FOF_CUTLEVEL;
|
||||
}
|
||||
|
||||
|
@ -6529,20 +6527,19 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
if (lines[i].args[4] & TMFC_SPLAT)
|
||||
ffloorflags |= FOF_SPLAT;
|
||||
|
||||
//If inside is visible, cut inner walls
|
||||
if (lines[i].args[1] < 0xff || (lines[i].args[3] & TMFT_VISIBLEFROMINSIDE) || (lines[i].args[4] & TMFC_SPLAT))
|
||||
//If inside is visible from the outside, cut inner walls
|
||||
if (lines[i].args[1] < 255 || (lines[i].args[4] & TMFC_SPLAT))
|
||||
ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA;
|
||||
else
|
||||
ffloorflags |= FOF_CUTLEVEL;
|
||||
|
||||
//If player can enter it, render insides
|
||||
if (lines[i].args[3] & TMFT_VISIBLEFROMINSIDE)
|
||||
//If player can view it from the inside, render insides
|
||||
else if (lines[i].args[3] & TMFT_VISIBLEFROMINSIDE)
|
||||
{
|
||||
if (ffloorflags & FOF_RENDERPLANES)
|
||||
ffloorflags |= FOF_BOTHPLANES;
|
||||
if (ffloorflags & FOF_RENDERSIDES)
|
||||
ffloorflags |= FOF_ALLSIDES;
|
||||
}
|
||||
else
|
||||
ffloorflags |= FOF_CUTLEVEL;
|
||||
|
||||
P_AddFakeFloorsByLine(i, lines[i].args[1], lines[i].args[2], ffloorflags, secthinkers);
|
||||
if (lines[i].args[4] & TMFC_AIRBOB)
|
||||
|
@ -6593,10 +6590,10 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
//Cutting options
|
||||
if (ffloorflags & FOF_RENDERALL)
|
||||
{
|
||||
//If inside is visible, cut inner walls
|
||||
if ((lines[i].args[1] < 255) || (lines[i].args[3] & TMFA_SPLAT) || (lines[i].args[4] & TMFT_VISIBLEFROMINSIDE))
|
||||
//If inside is visible from the outside, cut inner walls
|
||||
if (lines[i].args[1] < 255 || (lines[i].args[3] & TMFA_SPLAT))
|
||||
ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA;
|
||||
else
|
||||
else if (!(lines[i].args[4] & TMFT_VISIBLEFROMINSIDE))
|
||||
ffloorflags |= FOF_CUTLEVEL;
|
||||
}
|
||||
|
||||
|
@ -7661,15 +7658,14 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval
|
|||
if (rover->master->special == 258) // Laser block
|
||||
return false;
|
||||
|
||||
// If fading an invisible FOF whose render flags we did not yet set,
|
||||
// initialize its alpha to 1
|
||||
// If fading an invisible FOF whose render flags we did not yet set, initialize its alpha to 1
|
||||
if (dotranslucent &&
|
||||
(rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE
|
||||
!(rover->fofflags & FOF_FOG) && // do not include fog
|
||||
!(rover->spawnflags & FOF_RENDERSIDES) &&
|
||||
!(rover->spawnflags & FOF_RENDERPLANES) &&
|
||||
!(rover->fofflags & FOF_RENDERALL))
|
||||
rover->alpha = 1;
|
||||
rover->alpha = 0;
|
||||
|
||||
if (fadingdata)
|
||||
alpha = fadingdata->alpha;
|
||||
|
@ -7755,7 +7751,7 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval
|
|||
{
|
||||
if (doexists && !(rover->spawnflags & FOF_BUSTUP))
|
||||
{
|
||||
if (alpha <= 1)
|
||||
if (alpha <= 0)
|
||||
rover->fofflags &= ~FOF_EXISTS;
|
||||
else
|
||||
rover->fofflags |= FOF_EXISTS;
|
||||
|
@ -7767,7 +7763,7 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval
|
|||
|
||||
if (dotranslucent && !(rover->fofflags & FOF_FOG))
|
||||
{
|
||||
if (alpha >= 256)
|
||||
if (alpha >= 255)
|
||||
{
|
||||
if (!(rover->fofflags & FOF_CUTSOLIDS) &&
|
||||
(rover->spawnflags & FOF_CUTSOLIDS))
|
||||
|
@ -7867,11 +7863,11 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval
|
|||
else // clamp fadingdata->alpha to software's alpha levels
|
||||
{
|
||||
if (alpha < 12)
|
||||
rover->alpha = destvalue < 12 ? destvalue : 1; // Don't even draw it
|
||||
rover->alpha = destvalue < 12 ? destvalue : 0; // Don't even draw it
|
||||
else if (alpha < 38)
|
||||
rover->alpha = destvalue >= 12 && destvalue < 38 ? destvalue : 25;
|
||||
else if (alpha < 64)
|
||||
rover->alpha = destvalue >=38 && destvalue < 64 ? destvalue : 51;
|
||||
rover->alpha = destvalue >= 38 && destvalue < 64 ? destvalue : 51;
|
||||
else if (alpha < 89)
|
||||
rover->alpha = destvalue >= 64 && destvalue < 89 ? destvalue : 76;
|
||||
else if (alpha < 115)
|
||||
|
@ -7887,7 +7883,7 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval
|
|||
else if (alpha < 243)
|
||||
rover->alpha = destvalue >= 217 && destvalue < 243 ? destvalue : 230;
|
||||
else // Opaque
|
||||
rover->alpha = destvalue >= 243 ? destvalue : 256;
|
||||
rover->alpha = destvalue >= 243 ? destvalue : 255;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7917,17 +7913,16 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor
|
|||
{
|
||||
fade_t *d;
|
||||
|
||||
// If fading an invisible FOF whose render flags we did not yet set,
|
||||
// initialize its alpha to 1
|
||||
// If fading an invisible FOF whose render flags we did not yet set, initialize its alpha to 1
|
||||
if (dotranslucent &&
|
||||
(rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE
|
||||
!(rover->spawnflags & FOF_RENDERSIDES) &&
|
||||
!(rover->spawnflags & FOF_RENDERPLANES) &&
|
||||
!(rover->fofflags & FOF_RENDERALL))
|
||||
rover->alpha = 1;
|
||||
rover->alpha = 0;
|
||||
|
||||
// already equal, nothing to do
|
||||
if (rover->alpha == max(1, min(256, relative ? rover->alpha + destvalue : destvalue)))
|
||||
if (rover->alpha == max(0, min(255, relative ? rover->alpha + destvalue : destvalue)))
|
||||
return;
|
||||
|
||||
d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
|
||||
|
@ -7938,7 +7933,7 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor
|
|||
d->ffloornum = (UINT32)ffloornum;
|
||||
|
||||
d->alpha = d->sourcevalue = rover->alpha;
|
||||
d->destvalue = max(1, min(256, relative ? rover->alpha + destvalue : destvalue)); // rover->alpha is 1-256
|
||||
d->destvalue = max(0, min(255, relative ? rover->alpha + destvalue : destvalue)); // rover->alpha is 0-255
|
||||
|
||||
if (ticbased)
|
||||
{
|
||||
|
|
|
@ -8717,7 +8717,10 @@ void P_MovePlayer(player_t *player)
|
|||
player->mo->height = P_GetPlayerHeight(player);
|
||||
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP && player->mo->height != oldheight) // adjust z height for reverse gravity, similar to how it's done for scaling
|
||||
player->mo->z -= player->mo->height - oldheight;
|
||||
{
|
||||
player->mo->z -= player->mo->height - oldheight;
|
||||
player->mo->old_z -= player->mo->height - oldheight; // Snap the Z adjustment, while keeping the Z interpolation
|
||||
}
|
||||
|
||||
// Crush test...
|
||||
if ((player->mo->ceilingz - player->mo->floorz < player->mo->height)
|
||||
|
|
|
@ -769,12 +769,12 @@ typedef struct drawseg_s
|
|||
// Pointers to lists for sprite clipping, all three adjusted so [x1] is first value.
|
||||
INT16 *sprtopclip;
|
||||
INT16 *sprbottomclip;
|
||||
INT16 *maskedtexturecol;
|
||||
fixed_t *maskedtexturecol;
|
||||
|
||||
struct visplane_s *ffloorplanes[MAXFFLOORS];
|
||||
INT32 numffloorplanes;
|
||||
struct ffloor_s *thicksides[MAXFFLOORS];
|
||||
INT16 *thicksidecol;
|
||||
fixed_t *thicksidecol;
|
||||
INT32 numthicksides;
|
||||
fixed_t frontscale[MAXVIDWIDTH];
|
||||
|
||||
|
|
|
@ -1479,6 +1479,7 @@ void R_RenderPlayerView(player_t *player)
|
|||
R_ClearClipSegs();
|
||||
}
|
||||
R_ClearDrawSegs();
|
||||
R_ClearSegTables();
|
||||
R_ClearSprites();
|
||||
Portal_InitList();
|
||||
|
||||
|
|
|
@ -53,10 +53,6 @@ INT32 numffloors;
|
|||
#define visplane_hash(picnum,lightlevel,height) \
|
||||
((unsigned)((picnum)*3+(lightlevel)+(height)*7) & VISPLANEHASHMASK)
|
||||
|
||||
//SoM: 3/23/2000: Use boom opening limit removal
|
||||
size_t maxopenings;
|
||||
INT16 *openings, *lastopening; /// \todo free leak
|
||||
|
||||
//
|
||||
// Clip values are the solid pixel bounding the range.
|
||||
// floorclip starts out SCREENHEIGHT
|
||||
|
@ -366,8 +362,6 @@ void R_ClearPlanes(void)
|
|||
freehead = &(*freehead)->next;
|
||||
}
|
||||
|
||||
lastopening = openings;
|
||||
|
||||
// texture calculation
|
||||
memset(cachedheight, 0, sizeof (cachedheight));
|
||||
}
|
||||
|
|
|
@ -60,9 +60,6 @@ extern visplane_t *floorplane;
|
|||
extern visplane_t *ceilingplane;
|
||||
|
||||
// Visplane related.
|
||||
extern INT16 *lastopening, *openings;
|
||||
extern size_t maxopenings;
|
||||
|
||||
extern INT16 floorclip[MAXVIDWIDTH], ceilingclip[MAXVIDWIDTH];
|
||||
extern fixed_t frontscale[MAXVIDWIDTH], yslopetab[MAXVIDHEIGHT*16];
|
||||
extern fixed_t cachedheight[MAXVIDHEIGHT];
|
||||
|
|
734
src/r_segs.c
734
src/r_segs.c
|
@ -71,9 +71,22 @@ static fixed_t topfrac, topstep;
|
|||
static fixed_t bottomfrac, bottomstep;
|
||||
|
||||
static lighttable_t **walllights;
|
||||
static INT16 *maskedtexturecol;
|
||||
static fixed_t *maskedtexturecol;
|
||||
static fixed_t *maskedtextureheight = NULL;
|
||||
|
||||
//SoM: 3/23/2000: Use boom opening limit removal
|
||||
static size_t numopenings;
|
||||
static INT16 *openings, *lastopening;
|
||||
|
||||
static size_t texturecolumntablesize;
|
||||
static fixed_t *texturecolumntable, *curtexturecolumntable;
|
||||
|
||||
void R_ClearSegTables(void)
|
||||
{
|
||||
lastopening = openings;
|
||||
curtexturecolumntable = texturecolumntable;
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
// R_RenderMaskedSegRange
|
||||
// ==========================================================================
|
||||
|
@ -347,170 +360,115 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
dc_texturemid += (textureheight[texnum])*times + textureheight[texnum];
|
||||
else
|
||||
dc_texturemid -= (textureheight[texnum])*times;
|
||||
// calculate lighting
|
||||
if (maskedtexturecol[dc_x] != INT16_MAX)
|
||||
|
||||
// Check for overflows first
|
||||
overflow_test = (INT64)centeryfrac - (((INT64)dc_texturemid*spryscale)>>FRACBITS);
|
||||
if (overflow_test < 0) overflow_test = -overflow_test;
|
||||
if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL)
|
||||
{
|
||||
// Check for overflows first
|
||||
overflow_test = (INT64)centeryfrac - (((INT64)dc_texturemid*spryscale)>>FRACBITS);
|
||||
if (overflow_test < 0) overflow_test = -overflow_test;
|
||||
if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL)
|
||||
// Eh, no, go away, don't waste our time
|
||||
if (dc_numlights)
|
||||
{
|
||||
// Eh, no, go away, don't waste our time
|
||||
if (dc_numlights)
|
||||
for (i = 0; i < dc_numlights; i++)
|
||||
{
|
||||
for (i = 0; i < dc_numlights; i++)
|
||||
rlight = &dc_lightlist[i];
|
||||
rlight->height += rlight->heightstep;
|
||||
}
|
||||
}
|
||||
spryscale += rw_scalestep;
|
||||
continue;
|
||||
}
|
||||
|
||||
// calculate lighting
|
||||
if (dc_numlights)
|
||||
{
|
||||
lighttable_t **xwalllights;
|
||||
|
||||
sprbotscreen = INT32_MAX;
|
||||
sprtopscreen = windowtop = (centeryfrac - FixedMul(dc_texturemid, spryscale));
|
||||
|
||||
realbot = windowbottom = FixedMul(textureheight[texnum], spryscale) + sprtopscreen;
|
||||
dc_iscale = 0xffffffffu / (unsigned)spryscale;
|
||||
|
||||
// draw the texture
|
||||
col = R_GetColumn(texnum, maskedtexturecol[dc_x] >> FRACBITS);
|
||||
|
||||
for (i = 0; i < dc_numlights; i++)
|
||||
{
|
||||
rlight = &dc_lightlist[i];
|
||||
|
||||
if ((rlight->flags & FOF_NOSHADE))
|
||||
continue;
|
||||
|
||||
if (rlight->lightnum < 0)
|
||||
xwalllights = scalelight[0];
|
||||
else if (rlight->lightnum >= LIGHTLEVELS)
|
||||
xwalllights = scalelight[LIGHTLEVELS-1];
|
||||
else
|
||||
xwalllights = scalelight[rlight->lightnum];
|
||||
|
||||
pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT;
|
||||
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE - 1;
|
||||
|
||||
if (rlight->extra_colormap)
|
||||
rlight->rcolormap = rlight->extra_colormap->colormap + (xwalllights[pindex] - colormaps);
|
||||
else
|
||||
rlight->rcolormap = xwalllights[pindex];
|
||||
|
||||
height = rlight->height;
|
||||
rlight->height += rlight->heightstep;
|
||||
|
||||
if (height <= windowtop)
|
||||
{
|
||||
dc_colormap = rlight->rcolormap;
|
||||
continue;
|
||||
}
|
||||
|
||||
windowbottom = height;
|
||||
if (windowbottom >= realbot)
|
||||
{
|
||||
windowbottom = realbot;
|
||||
colfunc_2s(col);
|
||||
for (i++; i < dc_numlights; i++)
|
||||
{
|
||||
rlight = &dc_lightlist[i];
|
||||
rlight->height += rlight->heightstep;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
spryscale += rw_scalestep;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (dc_numlights)
|
||||
{
|
||||
lighttable_t **xwalllights;
|
||||
|
||||
sprbotscreen = INT32_MAX;
|
||||
sprtopscreen = windowtop = (centeryfrac - FixedMul(dc_texturemid, spryscale));
|
||||
|
||||
realbot = windowbottom = FixedMul(textureheight[texnum], spryscale) + sprtopscreen;
|
||||
dc_iscale = 0xffffffffu / (unsigned)spryscale;
|
||||
|
||||
// draw the texture
|
||||
col = R_GetColumn(texnum, maskedtexturecol[dc_x]);
|
||||
|
||||
for (i = 0; i < dc_numlights; i++)
|
||||
{
|
||||
rlight = &dc_lightlist[i];
|
||||
|
||||
if ((rlight->flags & FOF_NOSHADE))
|
||||
continue;
|
||||
|
||||
if (rlight->lightnum < 0)
|
||||
xwalllights = scalelight[0];
|
||||
else if (rlight->lightnum >= LIGHTLEVELS)
|
||||
xwalllights = scalelight[LIGHTLEVELS-1];
|
||||
else
|
||||
xwalllights = scalelight[rlight->lightnum];
|
||||
|
||||
pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT;
|
||||
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE - 1;
|
||||
|
||||
if (rlight->extra_colormap)
|
||||
rlight->rcolormap = rlight->extra_colormap->colormap + (xwalllights[pindex] - colormaps);
|
||||
else
|
||||
rlight->rcolormap = xwalllights[pindex];
|
||||
|
||||
height = rlight->height;
|
||||
rlight->height += rlight->heightstep;
|
||||
|
||||
if (height <= windowtop)
|
||||
{
|
||||
dc_colormap = rlight->rcolormap;
|
||||
continue;
|
||||
}
|
||||
|
||||
windowbottom = height;
|
||||
if (windowbottom >= realbot)
|
||||
{
|
||||
windowbottom = realbot;
|
||||
colfunc_2s(col);
|
||||
for (i++; i < dc_numlights; i++)
|
||||
{
|
||||
rlight = &dc_lightlist[i];
|
||||
rlight->height += rlight->heightstep;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
colfunc_2s(col);
|
||||
windowtop = windowbottom + 1;
|
||||
dc_colormap = rlight->rcolormap;
|
||||
}
|
||||
windowbottom = realbot;
|
||||
if (windowtop < windowbottom)
|
||||
colfunc_2s(col);
|
||||
|
||||
spryscale += rw_scalestep;
|
||||
continue;
|
||||
}
|
||||
|
||||
// calculate lighting
|
||||
pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT;
|
||||
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE - 1;
|
||||
|
||||
dc_colormap = walllights[pindex];
|
||||
|
||||
if (frontsector->extra_colormap)
|
||||
dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
|
||||
sprtopscreen = centeryfrac - FixedMul(dc_texturemid, spryscale);
|
||||
dc_iscale = 0xffffffffu / (unsigned)spryscale;
|
||||
|
||||
// draw the texture
|
||||
col = R_GetColumn(texnum, maskedtexturecol[dc_x]);
|
||||
|
||||
#if 0 // Disabling this allows inside edges to render below the planes, for until the clipping is fixed to work right when POs are near the camera. -Red
|
||||
if (curline->dontrenderme && curline->polyseg && (curline->polyseg->flags & POF_RENDERPLANES))
|
||||
{
|
||||
fixed_t my_topscreen;
|
||||
fixed_t my_bottomscreen;
|
||||
fixed_t my_yl, my_yh;
|
||||
|
||||
my_topscreen = sprtopscreen + spryscale*col->topdelta;
|
||||
my_bottomscreen = sprbotscreen == INT32_MAX ? my_topscreen + spryscale*col->length
|
||||
: sprbotscreen + spryscale*col->length;
|
||||
|
||||
my_yl = (my_topscreen+FRACUNIT-1)>>FRACBITS;
|
||||
my_yh = (my_bottomscreen-1)>>FRACBITS;
|
||||
// CONS_Debug(DBG_RENDER, "my_topscreen: %d\nmy_bottomscreen: %d\nmy_yl: %d\nmy_yh: %d\n", my_topscreen, my_bottomscreen, my_yl, my_yh);
|
||||
|
||||
if (numffloors)
|
||||
{
|
||||
INT32 top = my_yl;
|
||||
INT32 bottom = my_yh;
|
||||
|
||||
for (i = 0; i < numffloors; i++)
|
||||
{
|
||||
if (!ffloor[i].polyobj || ffloor[i].polyobj != curline->polyseg)
|
||||
continue;
|
||||
|
||||
if (ffloor[i].height < viewz)
|
||||
{
|
||||
INT32 top_w = ffloor[i].plane->top[dc_x];
|
||||
|
||||
// CONS_Debug(DBG_RENDER, "Leveltime : %d\n", leveltime);
|
||||
// CONS_Debug(DBG_RENDER, "Top is %d, top_w is %d\n", top, top_w);
|
||||
if (top_w < top)
|
||||
{
|
||||
ffloor[i].plane->top[dc_x] = (INT16)top;
|
||||
ffloor[i].plane->picnum = 0;
|
||||
}
|
||||
// CONS_Debug(DBG_RENDER, "top_w is now %d\n", ffloor[i].plane->top[dc_x]);
|
||||
}
|
||||
else if (ffloor[i].height > viewz)
|
||||
{
|
||||
INT32 bottom_w = ffloor[i].plane->bottom[dc_x];
|
||||
|
||||
if (bottom_w > bottom)
|
||||
{
|
||||
ffloor[i].plane->bottom[dc_x] = (INT16)bottom;
|
||||
ffloor[i].plane->picnum = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
colfunc_2s(col);
|
||||
windowtop = windowbottom + 1;
|
||||
dc_colormap = rlight->rcolormap;
|
||||
}
|
||||
windowbottom = realbot;
|
||||
if (windowtop < windowbottom)
|
||||
colfunc_2s(col);
|
||||
|
||||
spryscale += rw_scalestep;
|
||||
continue;
|
||||
}
|
||||
|
||||
// calculate lighting
|
||||
pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT;
|
||||
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE - 1;
|
||||
|
||||
dc_colormap = walllights[pindex];
|
||||
|
||||
if (frontsector->extra_colormap)
|
||||
dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
|
||||
sprtopscreen = centeryfrac - FixedMul(dc_texturemid, spryscale);
|
||||
dc_iscale = 0xffffffffu / (unsigned)spryscale;
|
||||
|
||||
// draw the texture
|
||||
col = R_GetColumn(texnum, maskedtexturecol[dc_x] >> FRACBITS);
|
||||
colfunc_2s(col);
|
||||
|
||||
spryscale += rw_scalestep;
|
||||
}
|
||||
}
|
||||
|
@ -854,183 +812,182 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
// draw the columns
|
||||
for (dc_x = x1; dc_x <= x2; dc_x++)
|
||||
{
|
||||
if (maskedtexturecol[dc_x] != INT16_MAX)
|
||||
// skew FOF walls
|
||||
if (ffloortextureslide)
|
||||
{
|
||||
if (ffloortextureslide) { // skew FOF walls
|
||||
if (oldx != -1)
|
||||
dc_texturemid += FixedMul(ffloortextureslide, (maskedtexturecol[oldx]-maskedtexturecol[dc_x])<<FRACBITS);
|
||||
oldx = dc_x;
|
||||
}
|
||||
// Calculate bounds
|
||||
// clamp the values if necessary to avoid overflows and rendering glitches caused by them
|
||||
if (oldx != -1)
|
||||
dc_texturemid += FixedMul(ffloortextureslide, maskedtexturecol[oldx]-maskedtexturecol[dc_x]);
|
||||
oldx = dc_x;
|
||||
}
|
||||
|
||||
if (top_frac > (INT64)CLAMPMAX) sprtopscreen = windowtop = CLAMPMAX;
|
||||
else if (top_frac > (INT64)CLAMPMIN) sprtopscreen = windowtop = (fixed_t)top_frac;
|
||||
else sprtopscreen = windowtop = CLAMPMIN;
|
||||
if (bottom_frac > (INT64)CLAMPMAX) sprbotscreen = windowbottom = CLAMPMAX;
|
||||
else if (bottom_frac > (INT64)CLAMPMIN) sprbotscreen = windowbottom = (fixed_t)bottom_frac;
|
||||
else sprbotscreen = windowbottom = CLAMPMIN;
|
||||
// Calculate bounds
|
||||
// clamp the values if necessary to avoid overflows and rendering glitches caused by them
|
||||
if (top_frac > (INT64)CLAMPMAX) sprtopscreen = windowtop = CLAMPMAX;
|
||||
else if (top_frac > (INT64)CLAMPMIN) sprtopscreen = windowtop = (fixed_t)top_frac;
|
||||
else sprtopscreen = windowtop = CLAMPMIN;
|
||||
if (bottom_frac > (INT64)CLAMPMAX) sprbotscreen = windowbottom = CLAMPMAX;
|
||||
else if (bottom_frac > (INT64)CLAMPMIN) sprbotscreen = windowbottom = (fixed_t)bottom_frac;
|
||||
else sprbotscreen = windowbottom = CLAMPMIN;
|
||||
|
||||
top_frac += top_step;
|
||||
bottom_frac += bottom_step;
|
||||
top_frac += top_step;
|
||||
bottom_frac += bottom_step;
|
||||
|
||||
// SoM: If column is out of range, why bother with it??
|
||||
if (windowbottom < topbounds || windowtop > bottombounds)
|
||||
// SoM: If column is out of range, why bother with it??
|
||||
if (windowbottom < topbounds || windowtop > bottombounds)
|
||||
{
|
||||
if (dc_numlights)
|
||||
{
|
||||
if (dc_numlights)
|
||||
for (i = 0; i < dc_numlights; i++)
|
||||
{
|
||||
for (i = 0; i < dc_numlights; i++)
|
||||
rlight = &dc_lightlist[i];
|
||||
rlight->height += rlight->heightstep;
|
||||
if (rlight->flags & FOF_CUTLEVEL)
|
||||
rlight->botheight += rlight->botheightstep;
|
||||
}
|
||||
}
|
||||
spryscale += rw_scalestep;
|
||||
continue;
|
||||
}
|
||||
|
||||
dc_iscale = 0xffffffffu / (unsigned)spryscale;
|
||||
|
||||
// Get data for the column
|
||||
col = R_GetColumn(texnum, maskedtexturecol[dc_x] >> FRACBITS);
|
||||
|
||||
// SoM: New code does not rely on R_DrawColumnShadowed_8 which
|
||||
// will (hopefully) put less strain on the stack.
|
||||
if (dc_numlights)
|
||||
{
|
||||
lighttable_t **xwalllights;
|
||||
fixed_t height;
|
||||
fixed_t bheight = 0;
|
||||
INT32 solid = 0;
|
||||
INT32 lighteffect = 0;
|
||||
|
||||
for (i = 0; i < dc_numlights; i++)
|
||||
{
|
||||
// Check if the current light effects the colormap/lightlevel
|
||||
rlight = &dc_lightlist[i];
|
||||
lighteffect = !(dc_lightlist[i].flags & FOF_NOSHADE);
|
||||
if (lighteffect)
|
||||
{
|
||||
lightnum = rlight->lightnum;
|
||||
|
||||
if (lightnum < 0)
|
||||
xwalllights = scalelight[0];
|
||||
else if (lightnum >= LIGHTLEVELS)
|
||||
xwalllights = scalelight[LIGHTLEVELS-1];
|
||||
else
|
||||
xwalllights = scalelight[lightnum];
|
||||
|
||||
pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT;
|
||||
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE-1;
|
||||
|
||||
if (pfloor->fofflags & FOF_FOG)
|
||||
{
|
||||
if (pfloor->master->frontsector->extra_colormap)
|
||||
rlight->rcolormap = pfloor->master->frontsector->extra_colormap->colormap + (xwalllights[pindex] - colormaps);
|
||||
else
|
||||
rlight->rcolormap = xwalllights[pindex];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rlight->extra_colormap)
|
||||
rlight->rcolormap = rlight->extra_colormap->colormap + (xwalllights[pindex] - colormaps);
|
||||
else
|
||||
rlight->rcolormap = xwalllights[pindex];
|
||||
}
|
||||
}
|
||||
|
||||
solid = 0; // don't carry over solid-cutting flag from the previous light
|
||||
|
||||
// Check if the current light can cut the current 3D floor.
|
||||
if (rlight->flags & FOF_CUTSOLIDS && !(pfloor->fofflags & FOF_EXTRA))
|
||||
solid = 1;
|
||||
else if (rlight->flags & FOF_CUTEXTRA && pfloor->fofflags & FOF_EXTRA)
|
||||
{
|
||||
if (rlight->flags & FOF_EXTRA)
|
||||
{
|
||||
// The light is from an extra 3D floor... Check the flags so
|
||||
// there are no undesired cuts.
|
||||
if ((rlight->flags & (FOF_FOG|FOF_SWIMMABLE)) == (pfloor->fofflags & (FOF_FOG|FOF_SWIMMABLE)))
|
||||
solid = 1;
|
||||
}
|
||||
else
|
||||
solid = 1;
|
||||
}
|
||||
else
|
||||
solid = 0;
|
||||
|
||||
height = rlight->height;
|
||||
rlight->height += rlight->heightstep;
|
||||
|
||||
if (solid)
|
||||
{
|
||||
bheight = rlight->botheight - (FRACUNIT >> 1);
|
||||
rlight->botheight += rlight->botheightstep;
|
||||
}
|
||||
|
||||
if (height <= windowtop)
|
||||
{
|
||||
if (lighteffect)
|
||||
dc_colormap = rlight->rcolormap;
|
||||
if (solid && windowtop < bheight)
|
||||
windowtop = bheight;
|
||||
continue;
|
||||
}
|
||||
|
||||
windowbottom = height;
|
||||
if (windowbottom >= sprbotscreen)
|
||||
{
|
||||
windowbottom = sprbotscreen;
|
||||
// draw the texture
|
||||
colfunc_2s (col);
|
||||
for (i++; i < dc_numlights; i++)
|
||||
{
|
||||
rlight = &dc_lightlist[i];
|
||||
rlight->height += rlight->heightstep;
|
||||
if (rlight->flags & FOF_CUTLEVEL)
|
||||
rlight->botheight += rlight->botheightstep;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
spryscale += rw_scalestep;
|
||||
continue;
|
||||
// draw the texture
|
||||
colfunc_2s (col);
|
||||
if (solid)
|
||||
windowtop = bheight;
|
||||
else
|
||||
windowtop = windowbottom + 1;
|
||||
if (lighteffect)
|
||||
dc_colormap = rlight->rcolormap;
|
||||
}
|
||||
windowbottom = sprbotscreen;
|
||||
// draw the texture, if there is any space left
|
||||
if (windowtop < windowbottom)
|
||||
colfunc_2s (col);
|
||||
|
||||
dc_iscale = 0xffffffffu / (unsigned)spryscale;
|
||||
|
||||
// Get data for the column
|
||||
col = R_GetColumn(texnum,maskedtexturecol[dc_x]);
|
||||
|
||||
// SoM: New code does not rely on R_DrawColumnShadowed_8 which
|
||||
// will (hopefully) put less strain on the stack.
|
||||
if (dc_numlights)
|
||||
{
|
||||
lighttable_t **xwalllights;
|
||||
fixed_t height;
|
||||
fixed_t bheight = 0;
|
||||
INT32 solid = 0;
|
||||
INT32 lighteffect = 0;
|
||||
|
||||
for (i = 0; i < dc_numlights; i++)
|
||||
{
|
||||
// Check if the current light effects the colormap/lightlevel
|
||||
rlight = &dc_lightlist[i];
|
||||
lighteffect = !(dc_lightlist[i].flags & FOF_NOSHADE);
|
||||
if (lighteffect)
|
||||
{
|
||||
lightnum = rlight->lightnum;
|
||||
|
||||
if (lightnum < 0)
|
||||
xwalllights = scalelight[0];
|
||||
else if (lightnum >= LIGHTLEVELS)
|
||||
xwalllights = scalelight[LIGHTLEVELS-1];
|
||||
else
|
||||
xwalllights = scalelight[lightnum];
|
||||
|
||||
pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT;
|
||||
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE-1;
|
||||
|
||||
if (pfloor->fofflags & FOF_FOG)
|
||||
{
|
||||
if (pfloor->master->frontsector->extra_colormap)
|
||||
rlight->rcolormap = pfloor->master->frontsector->extra_colormap->colormap + (xwalllights[pindex] - colormaps);
|
||||
else
|
||||
rlight->rcolormap = xwalllights[pindex];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rlight->extra_colormap)
|
||||
rlight->rcolormap = rlight->extra_colormap->colormap + (xwalllights[pindex] - colormaps);
|
||||
else
|
||||
rlight->rcolormap = xwalllights[pindex];
|
||||
}
|
||||
}
|
||||
|
||||
solid = 0; // don't carry over solid-cutting flag from the previous light
|
||||
|
||||
// Check if the current light can cut the current 3D floor.
|
||||
if (rlight->flags & FOF_CUTSOLIDS && !(pfloor->fofflags & FOF_EXTRA))
|
||||
solid = 1;
|
||||
else if (rlight->flags & FOF_CUTEXTRA && pfloor->fofflags & FOF_EXTRA)
|
||||
{
|
||||
if (rlight->flags & FOF_EXTRA)
|
||||
{
|
||||
// The light is from an extra 3D floor... Check the flags so
|
||||
// there are no undesired cuts.
|
||||
if ((rlight->flags & (FOF_FOG|FOF_SWIMMABLE)) == (pfloor->fofflags & (FOF_FOG|FOF_SWIMMABLE)))
|
||||
solid = 1;
|
||||
}
|
||||
else
|
||||
solid = 1;
|
||||
}
|
||||
else
|
||||
solid = 0;
|
||||
|
||||
height = rlight->height;
|
||||
rlight->height += rlight->heightstep;
|
||||
|
||||
if (solid)
|
||||
{
|
||||
bheight = rlight->botheight - (FRACUNIT >> 1);
|
||||
rlight->botheight += rlight->botheightstep;
|
||||
}
|
||||
|
||||
if (height <= windowtop)
|
||||
{
|
||||
if (lighteffect)
|
||||
dc_colormap = rlight->rcolormap;
|
||||
if (solid && windowtop < bheight)
|
||||
windowtop = bheight;
|
||||
continue;
|
||||
}
|
||||
|
||||
windowbottom = height;
|
||||
if (windowbottom >= sprbotscreen)
|
||||
{
|
||||
windowbottom = sprbotscreen;
|
||||
// draw the texture
|
||||
colfunc_2s (col);
|
||||
for (i++; i < dc_numlights; i++)
|
||||
{
|
||||
rlight = &dc_lightlist[i];
|
||||
rlight->height += rlight->heightstep;
|
||||
if (rlight->flags & FOF_CUTLEVEL)
|
||||
rlight->botheight += rlight->botheightstep;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// draw the texture
|
||||
colfunc_2s (col);
|
||||
if (solid)
|
||||
windowtop = bheight;
|
||||
else
|
||||
windowtop = windowbottom + 1;
|
||||
if (lighteffect)
|
||||
dc_colormap = rlight->rcolormap;
|
||||
}
|
||||
windowbottom = sprbotscreen;
|
||||
// draw the texture, if there is any space left
|
||||
if (windowtop < windowbottom)
|
||||
colfunc_2s (col);
|
||||
|
||||
spryscale += rw_scalestep;
|
||||
continue;
|
||||
}
|
||||
|
||||
// calculate lighting
|
||||
pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT;
|
||||
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE - 1;
|
||||
|
||||
dc_colormap = walllights[pindex];
|
||||
|
||||
if (pfloor->fofflags & FOF_FOG && pfloor->master->frontsector->extra_colormap)
|
||||
dc_colormap = pfloor->master->frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
else if (frontsector->extra_colormap)
|
||||
dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
|
||||
// draw the texture
|
||||
colfunc_2s (col);
|
||||
spryscale += rw_scalestep;
|
||||
continue;
|
||||
}
|
||||
|
||||
// calculate lighting
|
||||
pindex = FixedMul(spryscale, LIGHTRESOLUTIONFIX)>>LIGHTSCALESHIFT;
|
||||
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE - 1;
|
||||
|
||||
dc_colormap = walllights[pindex];
|
||||
|
||||
if (pfloor->fofflags & FOF_FOG && pfloor->master->frontsector->extra_colormap)
|
||||
dc_colormap = pfloor->master->frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
else if (frontsector->extra_colormap)
|
||||
dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps);
|
||||
|
||||
// draw the texture
|
||||
colfunc_2s (col);
|
||||
spryscale += rw_scalestep;
|
||||
}
|
||||
colfunc = colfuncs[BASEDRAWFUNC];
|
||||
|
||||
|
@ -1274,7 +1231,7 @@ static void R_RenderSegLoop (void)
|
|||
}
|
||||
oldtexturecolumn = texturecolumn;
|
||||
|
||||
texturecolumn >>= FRACBITS;
|
||||
INT32 itexturecolumn = texturecolumn >> FRACBITS;
|
||||
|
||||
// texturecolumn and lighting are independent of wall tiers
|
||||
if (segtextured)
|
||||
|
@ -1340,7 +1297,7 @@ static void R_RenderSegLoop (void)
|
|||
dc_yl = yl;
|
||||
dc_yh = yh;
|
||||
dc_texturemid = rw_midtexturemid;
|
||||
dc_source = R_GetColumn(midtexture, texturecolumn + (rw_offset_mid>>FRACBITS))->pixels;
|
||||
dc_source = R_GetColumn(midtexture, itexturecolumn + (rw_offset_mid>>FRACBITS))->pixels;
|
||||
dc_texheight = textureheight[midtexture]>>FRACBITS;
|
||||
|
||||
//profile stuff ---------------------------------------------------------
|
||||
|
@ -1401,7 +1358,7 @@ static void R_RenderSegLoop (void)
|
|||
dc_yl = yl;
|
||||
dc_yh = mid;
|
||||
dc_texturemid = rw_toptexturemid;
|
||||
dc_source = R_GetColumn(toptexture, texturecolumn + (rw_offset_top>>FRACBITS))->pixels;
|
||||
dc_source = R_GetColumn(toptexture, itexturecolumn + (rw_offset_top>>FRACBITS))->pixels;
|
||||
dc_texheight = textureheight[toptexture]>>FRACBITS;
|
||||
colfunc();
|
||||
ceilingclip[rw_x] = (INT16)mid;
|
||||
|
@ -1437,7 +1394,7 @@ static void R_RenderSegLoop (void)
|
|||
dc_yl = mid;
|
||||
dc_yh = yh;
|
||||
dc_texturemid = rw_bottomtexturemid;
|
||||
dc_source = R_GetColumn(bottomtexture, texturecolumn + (rw_offset_bot>>FRACBITS))->pixels;
|
||||
dc_source = R_GetColumn(bottomtexture, itexturecolumn + (rw_offset_bot>>FRACBITS))->pixels;
|
||||
dc_texheight = textureheight[bottomtexture]>>FRACBITS;
|
||||
colfunc();
|
||||
floorclip[rw_x] = (INT16)mid;
|
||||
|
@ -1456,7 +1413,7 @@ static void R_RenderSegLoop (void)
|
|||
{
|
||||
// save texturecol
|
||||
// for backdrawing of masked mid texture
|
||||
maskedtexturecol[rw_x] = (INT16)(texturecolumn + (rw_offset_mid>>FRACBITS));
|
||||
maskedtexturecol[rw_x] = texturecolumn + rw_offset_mid;
|
||||
|
||||
if (maskedtextureheight != NULL) {
|
||||
maskedtextureheight[rw_x] = (curline->linedef->flags & ML_MIDPEG) ?
|
||||
|
@ -1515,6 +1472,73 @@ static INT64 R_CalcSegDist(seg_t* seg, INT64 x2, INT64 y2)
|
|||
}
|
||||
}
|
||||
|
||||
//SoM: Code to remove limits on openings.
|
||||
static void R_AllocClippingTables(size_t range)
|
||||
{
|
||||
size_t pos = lastopening - openings;
|
||||
size_t need = range * 2; // for both sprtopclip and sprbottomclip
|
||||
|
||||
if (pos + need < numopenings)
|
||||
return;
|
||||
|
||||
INT16 *oldopenings = openings;
|
||||
INT16 *oldlast = lastopening;
|
||||
|
||||
if (numopenings == 0)
|
||||
numopenings = 16384;
|
||||
|
||||
numopenings += need;
|
||||
openings = Z_Realloc(openings, numopenings * sizeof (*openings), PU_STATIC, NULL);
|
||||
lastopening = openings + pos;
|
||||
|
||||
if (oldopenings == NULL)
|
||||
return;
|
||||
|
||||
// borrowed fix from *cough* zdoom *cough*
|
||||
// [RH] We also need to adjust the openings pointers that
|
||||
// were already stored in drawsegs.
|
||||
for (drawseg_t *ds = drawsegs; ds < ds_p; ds++)
|
||||
{
|
||||
// Check if it's in range of the openings
|
||||
if (ds->sprtopclip + ds->x1 >= oldopenings && ds->sprtopclip + ds->x1 <= oldlast)
|
||||
ds->sprtopclip = (ds->sprtopclip - oldopenings) + openings;
|
||||
if (ds->sprbottomclip + ds->x1 >= oldopenings && ds->sprbottomclip + ds->x1 <= oldlast)
|
||||
ds->sprbottomclip = (ds->sprbottomclip - oldopenings) + openings;
|
||||
}
|
||||
}
|
||||
|
||||
static void R_AllocTextureColumnTables(size_t range)
|
||||
{
|
||||
size_t pos = curtexturecolumntable - texturecolumntable;
|
||||
|
||||
// For both tables, we reserve exactly an amount of memory that's equivalent to
|
||||
// how many columns the seg will take on the entire screen (think about it)
|
||||
if (pos + range < texturecolumntablesize)
|
||||
return;
|
||||
|
||||
fixed_t *oldtable = texturecolumntable;
|
||||
fixed_t *oldlast = curtexturecolumntable;
|
||||
|
||||
if (texturecolumntablesize == 0)
|
||||
texturecolumntablesize = 16384;
|
||||
|
||||
texturecolumntablesize += range;
|
||||
texturecolumntable = Z_Realloc(texturecolumntable, texturecolumntablesize * sizeof (*texturecolumntable), PU_STATIC, NULL);
|
||||
curtexturecolumntable = texturecolumntable + pos;
|
||||
|
||||
if (oldtable == NULL)
|
||||
return;
|
||||
|
||||
for (drawseg_t *ds = drawsegs; ds < ds_p; ds++)
|
||||
{
|
||||
// Check if it's in range of the tables
|
||||
if (ds->maskedtexturecol + ds->x1 >= oldtable && ds->maskedtexturecol + ds->x1 <= oldlast)
|
||||
ds->maskedtexturecol = (ds->maskedtexturecol - oldtable) + texturecolumntable;
|
||||
if (ds->thicksidecol + ds->x1 >= oldtable && ds->thicksidecol + ds->x1 <= oldlast)
|
||||
ds->thicksidecol = (ds->thicksidecol - oldtable) + texturecolumntable;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// R_StoreWallRange
|
||||
// A wall segment will be drawn
|
||||
|
@ -1583,37 +1607,6 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
ds_p->curline = curline;
|
||||
rw_stopx = stop+1;
|
||||
|
||||
//SoM: Code to remove limits on openings.
|
||||
{
|
||||
size_t pos = lastopening - openings;
|
||||
size_t need = (rw_stopx - start)*4 + pos;
|
||||
if (need > maxopenings)
|
||||
{
|
||||
drawseg_t *ds; //needed for fix from *cough* zdoom *cough*
|
||||
INT16 *oldopenings = openings;
|
||||
INT16 *oldlast = lastopening;
|
||||
|
||||
do
|
||||
maxopenings = maxopenings ? maxopenings*2 : 16384;
|
||||
while (need > maxopenings);
|
||||
openings = Z_Realloc(openings, maxopenings * sizeof (*openings), PU_STATIC, NULL);
|
||||
lastopening = openings + pos;
|
||||
|
||||
// borrowed fix from *cough* zdoom *cough*
|
||||
// [RH] We also need to adjust the openings pointers that
|
||||
// were already stored in drawsegs.
|
||||
for (ds = drawsegs; ds < ds_p; ds++)
|
||||
{
|
||||
#define ADJUST(p) if (ds->p + ds->x1 >= oldopenings && ds->p + ds->x1 <= oldlast) ds->p = ds->p - oldopenings + openings;
|
||||
ADJUST(maskedtexturecol);
|
||||
ADJUST(sprtopclip);
|
||||
ADJUST(sprbottomclip);
|
||||
ADJUST(thicksidecol);
|
||||
#undef ADJUST
|
||||
}
|
||||
}
|
||||
} // end of code to remove limits on openings
|
||||
|
||||
// calculate scale at both ends and step
|
||||
ds_p->scale1 = rw_scale = R_ScaleFromGlobalAngle(viewangle + xtoviewangle[start]);
|
||||
|
||||
|
@ -2029,6 +2022,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
rw_toptexturemid += sidedef->rowoffset + sidedef->offsety_top;
|
||||
rw_bottomtexturemid += sidedef->rowoffset + sidedef->offsety_bot;
|
||||
|
||||
R_AllocTextureColumnTables(rw_stopx - start);
|
||||
|
||||
// allocate space for masked texture tables
|
||||
if (frontsector && backsector && !Tag_Compare(&frontsector->tags, &backsector->tags) && (backsector->ffloors || frontsector->ffloors))
|
||||
{
|
||||
|
@ -2043,8 +2038,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
//markceiling = markfloor = true;
|
||||
maskedtexture = true;
|
||||
|
||||
ds_p->thicksidecol = maskedtexturecol = lastopening - rw_x;
|
||||
lastopening += rw_stopx - rw_x;
|
||||
ds_p->thicksidecol = maskedtexturecol = curtexturecolumntable - rw_x;
|
||||
curtexturecolumntable += rw_stopx - rw_x;
|
||||
|
||||
lowcut = max(worldbottom, worldlow) + viewz;
|
||||
highcut = min(worldtop, worldhigh) + viewz;
|
||||
|
@ -2227,8 +2222,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
// masked midtexture
|
||||
if (!ds_p->thicksidecol)
|
||||
{
|
||||
ds_p->maskedtexturecol = maskedtexturecol = lastopening - rw_x;
|
||||
lastopening += rw_stopx - rw_x;
|
||||
ds_p->maskedtexturecol = maskedtexturecol = curtexturecolumntable - rw_x;
|
||||
curtexturecolumntable += rw_stopx - rw_x;
|
||||
}
|
||||
else
|
||||
ds_p->maskedtexturecol = ds_p->thicksidecol;
|
||||
|
@ -2740,29 +2735,34 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
ds_p->portalpass = 0;
|
||||
|
||||
// save sprite clipping info
|
||||
if (((ds_p->silhouette & SIL_TOP) || maskedtexture) && !ds_p->sprtopclip)
|
||||
if (maskedtexture || (ds_p->silhouette & (SIL_TOP | SIL_BOTTOM)))
|
||||
{
|
||||
M_Memcpy(lastopening, ceilingclip+start, 2*(rw_stopx - start));
|
||||
ds_p->sprtopclip = lastopening - start;
|
||||
lastopening += rw_stopx - start;
|
||||
}
|
||||
R_AllocClippingTables(rw_stopx - start);
|
||||
|
||||
if (((ds_p->silhouette & SIL_BOTTOM) || maskedtexture) && !ds_p->sprbottomclip)
|
||||
{
|
||||
M_Memcpy(lastopening, floorclip + start, 2*(rw_stopx-start));
|
||||
ds_p->sprbottomclip = lastopening - start;
|
||||
lastopening += rw_stopx - start;
|
||||
if (((ds_p->silhouette & SIL_TOP) || maskedtexture) && !ds_p->sprtopclip)
|
||||
{
|
||||
M_Memcpy(lastopening, ceilingclip + start, 2*(rw_stopx - start));
|
||||
ds_p->sprtopclip = lastopening - start;
|
||||
lastopening += rw_stopx - start;
|
||||
}
|
||||
|
||||
if (((ds_p->silhouette & SIL_BOTTOM) || maskedtexture) && !ds_p->sprbottomclip)
|
||||
{
|
||||
M_Memcpy(lastopening, floorclip + start, 2*(rw_stopx - start));
|
||||
ds_p->sprbottomclip = lastopening - start;
|
||||
lastopening += rw_stopx - start;
|
||||
}
|
||||
}
|
||||
|
||||
if (maskedtexture && !(ds_p->silhouette & SIL_TOP))
|
||||
{
|
||||
ds_p->silhouette |= SIL_TOP;
|
||||
ds_p->tsilheight = (sidedef->midtexture > 0 && sidedef->midtexture < numtextures) ? INT32_MIN: INT32_MAX;
|
||||
ds_p->tsilheight = (sidedef->midtexture > 0 && sidedef->midtexture < numtextures) ? INT32_MIN : INT32_MAX;
|
||||
}
|
||||
if (maskedtexture && !(ds_p->silhouette & SIL_BOTTOM))
|
||||
{
|
||||
ds_p->silhouette |= SIL_BOTTOM;
|
||||
ds_p->bsilheight = (sidedef->midtexture > 0 && sidedef->midtexture < numtextures) ? INT32_MAX: INT32_MIN;
|
||||
ds_p->bsilheight = (sidedef->midtexture > 0 && sidedef->midtexture < numtextures) ? INT32_MAX : INT32_MIN;
|
||||
}
|
||||
ds_p++;
|
||||
}
|
||||
|
|
|
@ -22,5 +22,6 @@ transnum_t R_GetLinedefTransTable(fixed_t alpha);
|
|||
void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2);
|
||||
void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pffloor);
|
||||
void R_StoreWallRange(INT32 start, INT32 stop);
|
||||
void R_ClearSegTables(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -113,6 +113,7 @@ static void Sk_SetDefaultValue(skin_t *skin)
|
|||
|
||||
strcpy(skin->realname, "Someone");
|
||||
strcpy(skin->hudname, "???");
|
||||
strcpy(skin->supername, "Someone super");
|
||||
|
||||
skin->starttranscolor = 96;
|
||||
skin->prefcolor = SKINCOLOR_GREEN;
|
||||
|
@ -682,7 +683,7 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile)
|
|||
char *value;
|
||||
size_t size;
|
||||
skin_t *skin;
|
||||
boolean hudname, realname;
|
||||
boolean hudname, realname, supername;
|
||||
|
||||
//
|
||||
// search for all skin markers in pwad
|
||||
|
@ -712,7 +713,7 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile)
|
|||
skin = &skins[numskins];
|
||||
Sk_SetDefaultValue(skin);
|
||||
skin->wadnum = wadnum;
|
||||
hudname = realname = false;
|
||||
hudname = realname = supername = false;
|
||||
// parse
|
||||
stoken = strtok (buf2, "\r\n= ");
|
||||
while (stoken)
|
||||
|
@ -755,7 +756,7 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile)
|
|||
Z_Free(value2);
|
||||
}
|
||||
|
||||
// copy to hudname and fullname as a default.
|
||||
// copy to hudname, realname, and supername as a default.
|
||||
if (!realname)
|
||||
{
|
||||
STRBUFCPY(skin->realname, skin->name);
|
||||
|
@ -771,6 +772,19 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile)
|
|||
strupr(skin->hudname);
|
||||
SYMBOLCONVERT(skin->hudname)
|
||||
}
|
||||
if (!supername)
|
||||
{
|
||||
char superstring[SKINNAMESIZE+7];
|
||||
strcpy(superstring, "Super ");
|
||||
strlcat(superstring, skin->name, sizeof(superstring));
|
||||
STRBUFCPY(skin->supername, superstring);
|
||||
}
|
||||
}
|
||||
else if (!stricmp(stoken, "supername"))
|
||||
{ // Super name (eg. "Super Knuckles")
|
||||
supername = true;
|
||||
STRBUFCPY(skin->supername, value);
|
||||
SYMBOLCONVERT(skin->supername)
|
||||
}
|
||||
else if (!stricmp(stoken, "realname"))
|
||||
{ // Display name (eg. "Knuckles")
|
||||
|
@ -779,6 +793,13 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile)
|
|||
SYMBOLCONVERT(skin->realname)
|
||||
if (!hudname)
|
||||
HUDNAMEWRITE(skin->realname);
|
||||
if (!supername) //copy over default to capitalise the name
|
||||
{
|
||||
char superstring[SKINNAMESIZE+7];
|
||||
strcpy(superstring, "Super ");
|
||||
strlcat(superstring, skin->realname, sizeof(superstring));
|
||||
STRBUFCPY(skin->supername, superstring);
|
||||
}
|
||||
}
|
||||
else if (!stricmp(stoken, "hudname"))
|
||||
{ // Life icon name (eg. "K.T.E")
|
||||
|
@ -831,7 +852,7 @@ void R_PatchSkins(UINT16 wadnum, boolean mainfile)
|
|||
char *value;
|
||||
size_t size;
|
||||
skin_t *skin;
|
||||
boolean noskincomplain, realname, hudname;
|
||||
boolean noskincomplain, realname, hudname, supername;
|
||||
|
||||
//
|
||||
// search for all skin patch markers in pwad
|
||||
|
@ -855,7 +876,7 @@ void R_PatchSkins(UINT16 wadnum, boolean mainfile)
|
|||
buf2[size] = '\0';
|
||||
|
||||
skin = NULL;
|
||||
noskincomplain = realname = hudname = false;
|
||||
noskincomplain = realname = hudname = supername = false;
|
||||
|
||||
/*
|
||||
Parse. Has more phases than the parser in R_AddSkins because it needs to have the patching name first (no default skin name is acceptible for patching, unlike skin creation)
|
||||
|
@ -894,13 +915,26 @@ void R_PatchSkins(UINT16 wadnum, boolean mainfile)
|
|||
else // Get the properties!
|
||||
{
|
||||
// Some of these can't go in R_ProcessPatchableFields because they have side effects for future lines.
|
||||
if (!stricmp(stoken, "realname"))
|
||||
if (!stricmp(stoken, "supername"))
|
||||
{ // Super name (eg. "Super Knuckles")
|
||||
supername = true;
|
||||
STRBUFCPY(skin->supername, value);
|
||||
SYMBOLCONVERT(skin->supername)
|
||||
}
|
||||
else if (!stricmp(stoken, "realname"))
|
||||
{ // Display name (eg. "Knuckles")
|
||||
realname = true;
|
||||
STRBUFCPY(skin->realname, value);
|
||||
SYMBOLCONVERT(skin->realname)
|
||||
if (!hudname)
|
||||
HUDNAMEWRITE(skin->realname);
|
||||
if (!supername) //copy over default to capitalise the name
|
||||
{
|
||||
char superstring[SKINNAMESIZE+7];
|
||||
strcpy(superstring, "Super ");
|
||||
strlcat(superstring, skin->realname, sizeof(superstring));
|
||||
STRBUFCPY(skin->supername, superstring);
|
||||
}
|
||||
}
|
||||
else if (!stricmp(stoken, "hudname"))
|
||||
{ // Life icon name (eg. "K.T.E")
|
||||
|
|
|
@ -35,8 +35,9 @@ typedef struct
|
|||
UINT16 wadnum;
|
||||
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 supername[SKINNAMESIZE+7]; // Super name to display when collecting all emeralds
|
||||
|
||||
UINT8 ability; // ability definition
|
||||
UINT8 ability2; // secondary ability definition
|
||||
|
|
|
@ -2097,7 +2097,11 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
// When vertical flipped, draw sprites from the top down, at least as far as offsets are concerned.
|
||||
// sprite height - sprite topoffset is the proper inverse of the vertical offset, of course.
|
||||
// remember gz and gzt should be seperated by sprite height, not thing height - thing height can be shorter than the sprite itself sometimes!
|
||||
gz = interp.z + oldthing->height - FixedMul(spr_topoffset, FixedMul(spriteyscale, this_scale));
|
||||
|
||||
if (oldthing->scale != oldthing->old_scale) // Interpolate heights in reverse gravity when scaling mobjs
|
||||
gz = interp.z + FixedMul(oldthing->height, FixedDiv(interp.scale, oldthing->scale)) - FixedMul(spr_topoffset, FixedMul(spriteyscale, this_scale));
|
||||
else
|
||||
gz = interp.z + oldthing->height - FixedMul(spr_topoffset, FixedMul(spriteyscale, this_scale));
|
||||
gzt = gz + FixedMul(spr_height, FixedMul(spriteyscale, this_scale));
|
||||
}
|
||||
else
|
||||
|
|
|
@ -90,7 +90,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
|||
#include <kvm.h>
|
||||
#endif
|
||||
#include <nlist.h>
|
||||
#include <sys/vmmeter.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -3033,40 +3033,17 @@ static long get_entry(const char* name, const char* buf)
|
|||
size_t I_GetFreeMem(size_t *total)
|
||||
{
|
||||
#ifdef FREEBSD
|
||||
struct vmmeter sum;
|
||||
kvm_t *kd;
|
||||
struct nlist namelist[] =
|
||||
{
|
||||
#define X_SUM 0
|
||||
{"_cnt"},
|
||||
{NULL}
|
||||
};
|
||||
if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open")) == NULL)
|
||||
{
|
||||
if (total)
|
||||
*total = 0L;
|
||||
return 0;
|
||||
}
|
||||
if (kvm_nlist(kd, namelist) != 0)
|
||||
{
|
||||
kvm_close (kd);
|
||||
if (total)
|
||||
*total = 0L;
|
||||
return 0;
|
||||
}
|
||||
if (kvm_read(kd, namelist[X_SUM].n_value, &sum,
|
||||
sizeof (sum)) != sizeof (sum))
|
||||
{
|
||||
kvm_close(kd);
|
||||
if (total)
|
||||
*total = 0L;
|
||||
return 0;
|
||||
}
|
||||
kvm_close(kd);
|
||||
u_int v_free_count, v_page_size, v_page_count;
|
||||
size_t size = sizeof(v_free_count);
|
||||
sysctlbyname("vm.stat.vm.v_free_count", &v_free_count, &size, NULL, 0);
|
||||
size_t size = sizeof(v_page_size);
|
||||
sysctlbyname("vm.stat.vm.v_page_size", &v_page_size, &size, NULL, 0);
|
||||
size_t size = sizeof(v_page_count);
|
||||
sysctlbyname("vm.stat.vm.v_page_count", &v_page_count, &size, NULL, 0);
|
||||
|
||||
if (total)
|
||||
*total = sum.v_page_count * sum.v_page_size;
|
||||
return sum.v_free_count * sum.v_page_size;
|
||||
*total = v_page_count * v_page_size;
|
||||
return v_free_count * v_page_size;
|
||||
#elif defined (SOLARIS)
|
||||
/* Just guess */
|
||||
if (total)
|
||||
|
|
|
@ -1593,7 +1593,6 @@ boolean VID_CheckRenderer(void)
|
|||
else if (vid.glstate == VID_GL_LIBRARY_ERROR)
|
||||
rendererchanged = false;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
if (!contextcreated)
|
||||
|
|
|
@ -174,7 +174,7 @@ static huddrawlist_h luahuddrawlist_titlecard;
|
|||
skincolornum_t linkColor[3][NUMLINKCOLORS] = {
|
||||
{SKINCOLOR_SHAMROCK, SKINCOLOR_AQUA, SKINCOLOR_SKY, SKINCOLOR_BLUE, SKINCOLOR_PURPLE, SKINCOLOR_MAGENTA,
|
||||
SKINCOLOR_ROSY, SKINCOLOR_RED, SKINCOLOR_ORANGE, SKINCOLOR_GOLD, SKINCOLOR_YELLOW, SKINCOLOR_PERIDOT},
|
||||
{SKINCOLOR_EMERALD, SKINCOLOR_AQUAMARINE, SKINCOLOR_WAVE, SKINCOLOR_SAPPHIRE, SKINCOLOR_GALAXY, SKINCOLOR_CRYSTAL,
|
||||
{SKINCOLOR_EMERALD, SKINCOLOR_OCEAN, SKINCOLOR_AQUAMARINE, SKINCOLOR_SAPPHIRE, SKINCOLOR_GALAXY, SKINCOLOR_SIBERITE,
|
||||
SKINCOLOR_TAFFY, SKINCOLOR_RUBY, SKINCOLOR_GARNET, SKINCOLOR_TOPAZ, SKINCOLOR_LEMON, SKINCOLOR_LIME},
|
||||
{SKINCOLOR_ISLAND, SKINCOLOR_TURQUOISE, SKINCOLOR_DREAM, SKINCOLOR_DAYBREAK, SKINCOLOR_VAPOR, SKINCOLOR_FUCHSIA,
|
||||
SKINCOLOR_VIOLET, SKINCOLOR_EVENTIDE, SKINCOLOR_KETCHUP, SKINCOLOR_FOUNDATION, SKINCOLOR_HEADLIGHT, SKINCOLOR_CHARTREUSE}};
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <string.h>
|
||||
#include "doomdef.h"
|
||||
|
||||
#if !defined (__APPLE__)
|
||||
#ifndef SRB2_HAVE_STRLCPY
|
||||
|
||||
// Like the OpenBSD version, but it doesn't check for src not being a valid
|
||||
// C string.
|
||||
|
|
|
@ -1476,10 +1476,10 @@ void Y_StartIntermission(void)
|
|||
if (players[consoleplayer].charflags & SF_SUPER)
|
||||
{
|
||||
strcpy(data.spec.passed3, "can now become");
|
||||
snprintf(data.spec.passed4,
|
||||
sizeof data.spec.passed4, "Super %s",
|
||||
skins[players[consoleplayer].skin].realname);
|
||||
data.spec.passed4[sizeof data.spec.passed4 - 1] = '\0';
|
||||
if (strlen(skins[players[consoleplayer].skin].supername) > 20) //too long, use generic
|
||||
strcpy(data.spec.passed4, "their super form");
|
||||
else
|
||||
strcpy(data.spec.passed4, skins[players[consoleplayer].skin].supername);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue