mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 07:12:36 +00:00
This commit is contained in:
commit
fd0602a163
11 changed files with 31 additions and 38 deletions
|
@ -401,6 +401,7 @@ enum ActorFlag7
|
||||||
enum ActorFlag8
|
enum ActorFlag8
|
||||||
{
|
{
|
||||||
MF8_FRIGHTENING = 0x00000001, // for those moments when halloween just won't do
|
MF8_FRIGHTENING = 0x00000001, // for those moments when halloween just won't do
|
||||||
|
MF8_INSCROLLSEC = 0x00000002, // actor is partially inside a scrolling sector
|
||||||
};
|
};
|
||||||
|
|
||||||
// --- mobj.renderflags ---
|
// --- mobj.renderflags ---
|
||||||
|
|
|
@ -750,6 +750,7 @@ void GLFlat::ProcessSector(sector_t * frontsector)
|
||||||
// is no longer necessary.
|
// is no longer necessary.
|
||||||
|
|
||||||
ceiling = true;
|
ceiling = true;
|
||||||
|
Colormap = frontsector->Colormap;
|
||||||
for (k = 0; k < (int)x.ffloors.Size(); k++)
|
for (k = 0; k < (int)x.ffloors.Size(); k++)
|
||||||
{
|
{
|
||||||
rover = x.ffloors[k];
|
rover = x.ffloors[k];
|
||||||
|
|
|
@ -213,6 +213,16 @@ void gl_LoadExtensions()
|
||||||
gl.glslversion = 0;
|
gl.glslversion = 0;
|
||||||
gl.flags |= RFL_NO_CLIP_PLANES;
|
gl.flags |= RFL_NO_CLIP_PLANES;
|
||||||
}
|
}
|
||||||
|
else if (gl.glslversion < 1.4f && !CheckExtension("GL_ARB_uniform_buffer_object"))
|
||||||
|
{
|
||||||
|
// Some old ATI drivers report OpenGL 3.1 with GLSL version 1.3 and no support for uniform buffers.
|
||||||
|
// We have no choice but to force them down to OpenGL 2.x.
|
||||||
|
gl.legacyMode = true;
|
||||||
|
gl.lightmethod = LM_LEGACY;
|
||||||
|
gl.buffermethod = BM_LEGACY;
|
||||||
|
gl.glslversion = 0;
|
||||||
|
gl.flags |= RFL_NO_CLIP_PLANES;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gl.legacyMode = false;
|
gl.legacyMode = false;
|
||||||
|
|
|
@ -814,7 +814,7 @@ void P_DrawRailTrail(AActor *source, TArray<SPortalHit> &portalhits, int color1,
|
||||||
// Create the inner trail.
|
// Create the inner trail.
|
||||||
if (color2 != -1 && r_rail_trailsparsity > 0 && spawnclass == NULL)
|
if (color2 != -1 && r_rail_trailsparsity > 0 && spawnclass == NULL)
|
||||||
{
|
{
|
||||||
double stepsize = 3 * r_rail_spiralsparsity * sparsity;
|
double stepsize = 3 * r_rail_trailsparsity * sparsity;
|
||||||
int trail_steps = xs_FloorToInt(steps * r_rail_trailsparsity / sparsity);
|
int trail_steps = xs_FloorToInt(steps * r_rail_trailsparsity / sparsity);
|
||||||
|
|
||||||
color2 = color2 == 0 ? -1 : ParticleColor(color2);
|
color2 = color2 == 0 ? -1 : ParticleColor(color2);
|
||||||
|
@ -891,7 +891,7 @@ void P_DrawRailTrail(AActor *source, TArray<SPortalHit> &portalhits, int color1,
|
||||||
if (sparsity < 1)
|
if (sparsity < 1)
|
||||||
sparsity = 32;
|
sparsity = 32;
|
||||||
|
|
||||||
double stepsize = 3 * r_rail_spiralsparsity * sparsity;
|
double stepsize = sparsity;
|
||||||
int trail_steps = (int)((steps * 3) / sparsity);
|
int trail_steps = (int)((steps * 3) / sparsity);
|
||||||
DVector3 diff(0, 0, 0);
|
DVector3 diff(0, 0, 0);
|
||||||
|
|
||||||
|
|
|
@ -4098,6 +4098,7 @@ void AActor::Tick ()
|
||||||
CheckPortalTransition(false);
|
CheckPortalTransition(false);
|
||||||
LinkToWorld(&ctx);
|
LinkToWorld(&ctx);
|
||||||
}
|
}
|
||||||
|
flags8 &= ~MF8_INSCROLLSEC;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -4250,12 +4251,16 @@ void AActor::Tick ()
|
||||||
|
|
||||||
// [RH] Consider carrying sectors here
|
// [RH] Consider carrying sectors here
|
||||||
DVector2 cumm(0, 0);
|
DVector2 cumm(0, 0);
|
||||||
if ((level.Scrolls.Size() != 0 || player != NULL) && !(flags & MF_NOCLIP) && !(flags & MF_NOSECTOR))
|
|
||||||
|
if ((((flags8 & MF8_INSCROLLSEC) && level.Scrolls.Size() > 0) || player != NULL) && !(flags & MF_NOCLIP) && !(flags & MF_NOSECTOR))
|
||||||
{
|
{
|
||||||
double height, waterheight; // killough 4/4/98: add waterheight
|
double height, waterheight; // killough 4/4/98: add waterheight
|
||||||
const msecnode_t *node;
|
const msecnode_t *node;
|
||||||
int countx, county;
|
int countx, county;
|
||||||
|
|
||||||
|
// Clear the flag for the next frame.
|
||||||
|
flags8 &= ~MF8_INSCROLLSEC;
|
||||||
|
|
||||||
// killough 3/7/98: Carry things on floor
|
// killough 3/7/98: Carry things on floor
|
||||||
// killough 3/20/98: use new sector list which reflects true members
|
// killough 3/20/98: use new sector list which reflects true members
|
||||||
// killough 3/27/98: fix carrier bug
|
// killough 3/27/98: fix carrier bug
|
||||||
|
@ -5079,6 +5084,8 @@ AActor *AActor::StaticSpawn (PClassActor *type, const DVector3 &pos, replace_t a
|
||||||
{
|
{
|
||||||
level.total_secrets++;
|
level.total_secrets++;
|
||||||
}
|
}
|
||||||
|
// force scroller check in the first tic.
|
||||||
|
actor->flags8 |= MF8_INSCROLLSEC;
|
||||||
return actor;
|
return actor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -256,6 +256,11 @@ void DScroller::Tick ()
|
||||||
case EScroll::sc_carry:
|
case EScroll::sc_carry:
|
||||||
level.Scrolls[m_Affectee].X += dx;
|
level.Scrolls[m_Affectee].X += dx;
|
||||||
level.Scrolls[m_Affectee].Y += dy;
|
level.Scrolls[m_Affectee].Y += dy;
|
||||||
|
// mark all potentially affected things here so that the very expensive calculation loop in AActor::Tick does not need to run for actors which do not touch a scrolling sector.
|
||||||
|
for (auto n = level.sectors[m_Affectee].touching_thinglist; n; n = n->m_snext)
|
||||||
|
{
|
||||||
|
n->m_thing->flags8 |= MF8_INSCROLLSEC;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EScroll::sc_carry_ceiling: // to be added later
|
case EScroll::sc_carry_ceiling: // to be added later
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "i_common.h"
|
#include "i_common.h"
|
||||||
|
#include "s_sound.h"
|
||||||
|
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -125,6 +126,7 @@ void popterm()
|
||||||
void Mac_I_FatalError(const char* const message)
|
void Mac_I_FatalError(const char* const message)
|
||||||
{
|
{
|
||||||
I_SetMainWindowVisible(false);
|
I_SetMainWindowVisible(false);
|
||||||
|
S_StopMusic(true);
|
||||||
|
|
||||||
FConsoleWindow::GetInstance().ShowFatalError(message);
|
FConsoleWindow::GetInstance().ShowFatalError(message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,14 +104,6 @@ void ThrowVMException(VMException *x);
|
||||||
if (a == NULL) { ThrowAbortException(x, nullptr); } \
|
if (a == NULL) { ThrowAbortException(x, nullptr); } \
|
||||||
ptr = (VM_SBYTE *)a + o
|
ptr = (VM_SBYTE *)a + o
|
||||||
|
|
||||||
static const VM_UWORD ZapTable[16] =
|
|
||||||
{
|
|
||||||
0x00000000, 0x000000FF, 0x0000FF00, 0x0000FFFF,
|
|
||||||
0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00FFFFFF,
|
|
||||||
0xFF000000, 0xFF0000FF, 0xFF00FF00, 0xFF00FFFF,
|
|
||||||
0xFFFF0000, 0xFFFF00FF, 0xFFFFFF00, 0xFFFFFFFF
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#define WAS_NDEBUG 1
|
#define WAS_NDEBUG 1
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1195,28 +1195,6 @@ static int Exec(VMFrameStack *stack, const VMOP *pc, VMReturn *ret, int numret)
|
||||||
reg.d[a] = ~reg.d[B];
|
reg.d[a] = ~reg.d[B];
|
||||||
NEXTOP;
|
NEXTOP;
|
||||||
|
|
||||||
OP(SEXT):
|
|
||||||
ASSERTD(a); ASSERTD(B);
|
|
||||||
reg.d[a] = (VM_SWORD)(reg.d[B] << C) >> C;
|
|
||||||
NEXTOP;
|
|
||||||
|
|
||||||
OP(ZAP_R):
|
|
||||||
ASSERTD(a); ASSERTD(B); ASSERTD(C);
|
|
||||||
reg.d[a] = reg.d[B] & ZapTable[(reg.d[C] & 15) ^ 15];
|
|
||||||
NEXTOP;
|
|
||||||
OP(ZAP_I):
|
|
||||||
ASSERTD(a); ASSERTD(B);
|
|
||||||
reg.d[a] = reg.d[B] & ZapTable[(C & 15) ^ 15];
|
|
||||||
NEXTOP;
|
|
||||||
OP(ZAPNOT_R):
|
|
||||||
ASSERTD(a); ASSERTD(B); ASSERTD(C);
|
|
||||||
reg.d[a] = reg.d[B] & ZapTable[reg.d[C] & 15];
|
|
||||||
NEXTOP;
|
|
||||||
OP(ZAPNOT_I):
|
|
||||||
ASSERTD(a); ASSERTD(B);
|
|
||||||
reg.d[a] = reg.d[B] & ZapTable[C & 15];
|
|
||||||
NEXTOP;
|
|
||||||
|
|
||||||
OP(EQ_R):
|
OP(EQ_R):
|
||||||
ASSERTD(B); ASSERTD(C);
|
ASSERTD(B); ASSERTD(C);
|
||||||
CMPJMP(reg.d[B] == reg.d[C]);
|
CMPJMP(reg.d[B] == reg.d[C]);
|
||||||
|
|
|
@ -174,11 +174,6 @@ xx(MAX_RK, max, RIRIKI, MAX_RR, 4, REGT_INT),
|
||||||
xx(ABS, abs, RIRI, NOP, 0, 0), // dA = abs(dB)
|
xx(ABS, abs, RIRI, NOP, 0, 0), // dA = abs(dB)
|
||||||
xx(NEG, neg, RIRI, NOP, 0, 0), // dA = -dB
|
xx(NEG, neg, RIRI, NOP, 0, 0), // dA = -dB
|
||||||
xx(NOT, not, RIRI, NOP, 0, 0), // dA = ~dB
|
xx(NOT, not, RIRI, NOP, 0, 0), // dA = ~dB
|
||||||
xx(SEXT, sext, RIRII8, NOP, 0, 0), // dA = dB, sign extended by shifting left then right by C
|
|
||||||
xx(ZAP_R, zap, RIRIRI, NOP, 0, 0), // dA = dB, with bytes zeroed where bits in C/dC are one
|
|
||||||
xx(ZAP_I, zap, RIRII8, NOP, 0, 0),
|
|
||||||
xx(ZAPNOT_R, zapnot, RIRIRI, NOP, 0, 0), // dA = dB, with bytes zeroed where bits in C/dC are zero
|
|
||||||
xx(ZAPNOT_I, zapnot, RIRII8, NOP, 0, 0),
|
|
||||||
xx(EQ_R, beq, CIRR, NOP, 0, 0), // if ((dB == dkC) != A) then pc++
|
xx(EQ_R, beq, CIRR, NOP, 0, 0), // if ((dB == dkC) != A) then pc++
|
||||||
xx(EQ_K, beq, CIRK, EQ_R, 4, REGT_INT),
|
xx(EQ_K, beq, CIRK, EQ_R, 4, REGT_INT),
|
||||||
xx(LT_RR, blt, CIRR, NOP, 0, 0), // if ((dkB < dkC) != A) then pc++
|
xx(LT_RR, blt, CIRR, NOP, 0, 0), // if ((dkB < dkC) != A) then pc++
|
||||||
|
|
|
@ -81,6 +81,7 @@
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "r_utility.h"
|
#include "r_utility.h"
|
||||||
#include "g_levellocals.h"
|
#include "g_levellocals.h"
|
||||||
|
#include "s_sound.h"
|
||||||
|
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
#include "st_start.h"
|
#include "st_start.h"
|
||||||
|
@ -1060,6 +1061,7 @@ void DoMain (HINSTANCE hInstance)
|
||||||
{
|
{
|
||||||
I_ShutdownGraphics ();
|
I_ShutdownGraphics ();
|
||||||
RestoreConView ();
|
RestoreConView ();
|
||||||
|
S_StopMusic(true);
|
||||||
I_FlushBufferedConsoleStuff();
|
I_FlushBufferedConsoleStuff();
|
||||||
if (error.GetMessage ())
|
if (error.GetMessage ())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue