- sync source with latest GZDoom:

Includes:
- Made the move tried from checking missile spawns ignore drop off height. This solves the Voodoo Gun ghostly civilian issue.
- Fixed: the NOTELEPORT flag is removed from Dehacked missiles which lose the MISSILE flag. This caused problems with certain special effects based on dehacked spawn cubes.
- Fixed: all Boom silent teleporters preserve relative height.
- support for palette independent particle colors if the renderer can handle them.


SVN r3329 (trunk)
This commit is contained in:
Christoph Oelckers 2011-12-06 08:36:28 +00:00
parent 8e8331d44c
commit 893455ef61
20 changed files with 556 additions and 407 deletions

View file

@ -69,7 +69,7 @@ DEFINE_SPECIAL(Floor_RaiseInstant, 67, 3, 3, 3)
DEFINE_SPECIAL(Floor_MoveToValueTimes8, 68, 4, 4, 4) DEFINE_SPECIAL(Floor_MoveToValueTimes8, 68, 4, 4, 4)
DEFINE_SPECIAL(Ceiling_MoveToValueTimes8, 69, 4, 4, 4) DEFINE_SPECIAL(Ceiling_MoveToValueTimes8, 69, 4, 4, 4)
DEFINE_SPECIAL(Teleport, 70, 1, 3, 3) DEFINE_SPECIAL(Teleport, 70, 1, 3, 3)
DEFINE_SPECIAL(Teleport_NoFog, 71, 1, 3, 3) DEFINE_SPECIAL(Teleport_NoFog, 71, 1, 4, 4)
DEFINE_SPECIAL(ThrustThing, 72, 2, 4, 4) DEFINE_SPECIAL(ThrustThing, 72, 2, 4, 4)
DEFINE_SPECIAL(DamageThing, 73, 1, 2, 2) DEFINE_SPECIAL(DamageThing, 73, 1, 2, 2)
DEFINE_SPECIAL(Teleport_NewMap, 74, 2, 3, 3) DEFINE_SPECIAL(Teleport_NewMap, 74, 2, 3, 3)

View file

@ -1090,6 +1090,15 @@ static int PatchThing (int thingy)
value[0] &= ~MF_TRANSLUCENT; // clean the slot value[0] &= ~MF_TRANSLUCENT; // clean the slot
vchanged[2] = true; value[2] |= 2; // let the TRANSLUCxx code below handle it vchanged[2] = true; value[2] |= 2; // let the TRANSLUCxx code below handle it
} }
if ((info->flags & MF_MISSILE) && (info->flags2 & MF2_NOTELEPORT)
&& !(value[0] & MF_MISSILE))
{
// ZDoom gives missiles flags that did not exist in Doom: MF2_NOTELEPORT,
// MF2_IMPACT, and MF2_PCROSS. The NOTELEPORT one can be a problem since
// some projectile actors (those new to Doom II) were not excluded from
// triggering line effects and can teleport when the missile flag is removed.
info->flags2 &= ~MF2_NOTELEPORT;
}
info->flags = value[0]; info->flags = value[0];
} }
if (vchanged[1]) if (vchanged[1])

View file

@ -585,7 +585,7 @@ CUSTOM_CVAR(Int, compatmode, 0, CVAR_ARCHIVE|CVAR_NOINITCALL)
COMPATF_MBFMONSTERMOVE|COMPATF_NOBLOCKFRIENDS; COMPATF_MBFMONSTERMOVE|COMPATF_NOBLOCKFRIENDS;
break; break;
case 6: // Boom with some added settings to reenable spme 'broken' behavior case 6: // Boom with some added settings to reenable some 'broken' behavior
v = COMPATF_TRACE|COMPATF_SOUNDTARGET|COMPATF_BOOMSCROLL|COMPATF_MISSILECLIP|COMPATF_NO_PASSMOBJ| v = COMPATF_TRACE|COMPATF_SOUNDTARGET|COMPATF_BOOMSCROLL|COMPATF_MISSILECLIP|COMPATF_NO_PASSMOBJ|
COMPATF_INVISIBILITY|COMPATF_CORPSEGIBS|COMPATF_HITSCAN|COMPATF_WALLRUN|COMPATF_NOTOSSDROPS; COMPATF_INVISIBILITY|COMPATF_CORPSEGIBS|COMPATF_HITSCAN|COMPATF_WALLRUN|COMPATF_NOTOSSDROPS;
break; break;

View file

@ -215,13 +215,15 @@ void P_InitEffects ()
P_InitParticles(); P_InitParticles();
while (color->color) while (color->color)
{ {
*(color->color) = ColorMatcher.Pick (color->r, color->g, color->b); *(color->color) = (MAKERGB(color->r, color->g, color->b)
| (ColorMatcher.Pick (color->r, color->g, color->b) << 24));
color++; color++;
} }
int kind = gameinfo.defaultbloodparticlecolor; int kind = gameinfo.defaultbloodparticlecolor;
blood1 = ColorMatcher.Pick(RPART(kind), GPART(kind), BPART(kind)); int kind3 = MAKERGB(RPART(kind)/3, GPART(kind)/3, BPART(kind)/3);
blood2 = ColorMatcher.Pick(RPART(kind)/3, GPART(kind)/3, BPART(kind)/3); blood1 = kind | (ColorMatcher.Pick(RPART(kind), GPART(kind), BPART(kind)) << 24);
blood2 = kind3 | (ColorMatcher.Pick(RPART(kind3), GPART(kind3), BPART(kind3)) << 24);
} }
@ -520,8 +522,9 @@ void P_DrawSplash2 (int count, fixed_t x, fixed_t y, fixed_t z, angle_t angle, i
color2 = grey1; color2 = grey1;
break; break;
default: // colorized blood default: // colorized blood
color1 = ColorMatcher.Pick(RPART(kind), GPART(kind), BPART(kind)); color1 = kind | (ColorMatcher.Pick(RPART(kind), GPART(kind), BPART(kind)) << 24);
color2 = ColorMatcher.Pick(RPART(kind)>>1, GPART(kind)>>1, BPART(kind)>>1); color2 = MAKERGB((kind)>>1, GPART(kind)>>1, BPART(kind)>>1)
| (ColorMatcher.Pick(RPART(kind)>>1, GPART(kind)>>1, BPART(kind)>>1) << 24);
break; break;
} }
@ -598,7 +601,7 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end
{ {
// Only consider sound in 2D (for now, anyway) // Only consider sound in 2D (for now, anyway)
// [BB] You have to devide by lengthsquared here, not multiply with it. // [BB] You have to divide by lengthsquared here, not multiply with it.
r = ((start.Y - FIXED2FLOAT(mo->y)) * (-dir.Y) - (start.X - FIXED2FLOAT(mo->x)) * (dir.X)) / lengthsquared; r = ((start.Y - FIXED2FLOAT(mo->y)) * (-dir.Y) - (start.X - FIXED2FLOAT(mo->x)) * (dir.X)) / lengthsquared;
r = clamp<double>(r, 0., 1.); r = clamp<double>(r, 0., 1.);
@ -646,7 +649,7 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end
FVector3 spiral_step = step * r_rail_spiralsparsity; FVector3 spiral_step = step * r_rail_spiralsparsity;
int spiral_steps = steps * r_rail_spiralsparsity; int spiral_steps = steps * r_rail_spiralsparsity;
color1 = color1 == 0 ? -1 : ColorMatcher.Pick(RPART(color1), GPART(color1), BPART(color1)); color1 = color1 == 0 ? -1 : color1 | (ColorMatcher.Pick(RPART(color1), GPART(color1), BPART(color1)) <<24);
pos = start; pos = start;
deg = FAngle(270); deg = FAngle(270);
for (i = spiral_steps; i; i--) for (i = spiral_steps; i; i--)
@ -699,7 +702,7 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end
FVector3 trail_step = step * r_rail_trailsparsity; FVector3 trail_step = step * r_rail_trailsparsity;
int trail_steps = steps * r_rail_trailsparsity; int trail_steps = steps * r_rail_trailsparsity;
color2 = color2 == 0 ? -1 : ColorMatcher.Pick(RPART(color2), GPART(color2), BPART(color2)); color2 = color2 == 0 ? -1 : color2 | (ColorMatcher.Pick(RPART(color2), GPART(color2), BPART(color2)) <<24);
FVector3 diff(0, 0, 0); FVector3 diff(0, 0, 0);
pos = start; pos = start;

View file

@ -1078,7 +1078,7 @@ static FString GetCachePath()
FSRef folder; FSRef folder;
if (noErr == FSFindFolder(kLocalDomain, kApplicationSupportFolderType, kCreateFolder, &folder) && if (noErr == FSFindFolder(kLocalDomain, kApplicationSupportFolderType, kCreateFolder, &folder) &&
noErr == FSRefMakePath(&folder, (UInt8*)path.GetChars(), PATH_MAX)) noErr == FSRefMakePath(&folder, (UInt8*)pathstr, PATH_MAX))
{ {
path = pathstr; path = pathstr;
} }

View file

@ -855,9 +855,9 @@ FUNC( LS_Teleport_NoStop )
} }
FUNC(LS_Teleport_NoFog) FUNC(LS_Teleport_NoFog)
// Teleport_NoFog (tid, useang, sectortag) // Teleport_NoFog (tid, useang, sectortag, keepheight)
{ {
return EV_Teleport (arg0, arg2, ln, backSide, it, false, false, !arg1); return EV_Teleport (arg0, arg2, ln, backSide, it, false, false, !arg1, true, !!arg3);
} }
FUNC(LS_Teleport_ZombieChanger) FUNC(LS_Teleport_ZombieChanger)

View file

@ -383,7 +383,7 @@ bool P_CheckPosition (AActor *thing, fixed_t x, fixed_t y, FCheckPosition &tm);
bool P_CheckPosition (AActor *thing, fixed_t x, fixed_t y); bool P_CheckPosition (AActor *thing, fixed_t x, fixed_t y);
AActor *P_CheckOnmobj (AActor *thing); AActor *P_CheckOnmobj (AActor *thing);
void P_FakeZMovement (AActor *mo); void P_FakeZMovement (AActor *mo);
bool P_TryMove (AActor* thing, fixed_t x, fixed_t y, int dropoff, const secplane_t * onfloor, FCheckPosition &tm); bool P_TryMove (AActor* thing, fixed_t x, fixed_t y, int dropoff, const secplane_t * onfloor, FCheckPosition &tm, bool missileCheck = false);
bool P_TryMove (AActor* thing, fixed_t x, fixed_t y, int dropoff, const secplane_t * onfloor = NULL); bool P_TryMove (AActor* thing, fixed_t x, fixed_t y, int dropoff, const secplane_t * onfloor = NULL);
bool P_CheckMove(AActor *thing, fixed_t x, fixed_t y); bool P_CheckMove(AActor *thing, fixed_t x, fixed_t y);
void P_ApplyTorque(AActor *mo); void P_ApplyTorque(AActor *mo);

View file

@ -1646,7 +1646,8 @@ static void CheckForPushSpecial (line_t *line, int side, AActor *mobj)
bool P_TryMove (AActor *thing, fixed_t x, fixed_t y, bool P_TryMove (AActor *thing, fixed_t x, fixed_t y,
int dropoff, // killough 3/15/98: allow dropoff as option int dropoff, // killough 3/15/98: allow dropoff as option
const secplane_t *onfloor, // [RH] Let P_TryMove keep the thing on the floor const secplane_t *onfloor, // [RH] Let P_TryMove keep the thing on the floor
FCheckPosition &tm) FCheckPosition &tm,
bool missileCheck) // [GZ] Fired missiles ignore the drop-off test
{ {
fixed_t oldx; fixed_t oldx;
fixed_t oldy; fixed_t oldy;
@ -1777,7 +1778,7 @@ bool P_TryMove (AActor *thing, fixed_t x, fixed_t y,
if (dropoff==2 && // large jump down (e.g. dogs) if (dropoff==2 && // large jump down (e.g. dogs)
(tm.floorz-tm.dropoffz > 128*FRACUNIT || thing->target == NULL || thing->target->z >tm.dropoffz)) (tm.floorz-tm.dropoffz > 128*FRACUNIT || thing->target == NULL || thing->target->z >tm.dropoffz))
{ {
dropoff = false; dropoff = false;
} }
@ -1795,8 +1796,9 @@ bool P_TryMove (AActor *thing, fixed_t x, fixed_t y,
} }
if (floorz - tm.dropoffz > thing->MaxDropOffHeight && if (floorz - tm.dropoffz > thing->MaxDropOffHeight &&
!(thing->flags2 & MF2_BLASTED)) !(thing->flags2 & MF2_BLASTED) && !missileCheck)
{ // Can't move over a dropoff unless it's been blasted { // Can't move over a dropoff unless it's been blasted
// [GZ] Or missile-spawned
thing->z = oldz; thing->z = oldz;
return false; return false;
} }

View file

@ -5017,7 +5017,7 @@ bool P_CheckMissileSpawn (AActor* th)
bool MBFGrenade = (!(th->flags & MF_MISSILE) || (th->BounceFlags & BOUNCE_MBF)); bool MBFGrenade = (!(th->flags & MF_MISSILE) || (th->BounceFlags & BOUNCE_MBF));
// killough 3/15/98: no dropoff (really = don't care for missiles) // killough 3/15/98: no dropoff (really = don't care for missiles)
if (!(P_TryMove (th, th->x, th->y, false, NULL, tm))) if (!(P_TryMove (th, th->x, th->y, false, NULL, tm, true)))
{ {
// [RH] Don't explode ripping missiles that spawn inside something // [RH] Don't explode ripping missiles that spawn inside something
if (th->BlockingMobj == NULL || !(th->flags2 & MF2_RIP) || (th->BlockingMobj->flags5 & MF5_DONTRIP)) if (th->BlockingMobj == NULL || !(th->flags2 & MF2_RIP) || (th->BlockingMobj->flags5 & MF5_DONTRIP))

View file

@ -876,8 +876,8 @@ bool EV_DoChange (line_t *line, EChange changetype, int tag);
// //
// P_TELEPT // P_TELEPT
// //
bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, bool useFog, bool sourceFog, bool keepOrientation, bool haltVelocity = true); bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, bool useFog, bool sourceFog, bool keepOrientation, bool haltVelocity = true, bool keepHeight = false);
bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool fog, bool sourceFog, bool keepOrientation, bool haltVelocity = true); bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool fog, bool sourceFog, bool keepOrientation, bool haltVelocity = true, bool keepHeight = false);
bool EV_SilentLineTeleport (line_t *line, int side, AActor *thing, int id, INTBOOL reverse); bool EV_SilentLineTeleport (line_t *line, int side, AActor *thing, int id, INTBOOL reverse);
bool EV_TeleportOther (int other_tid, int dest_tid, bool fog); bool EV_TeleportOther (int other_tid, int dest_tid, bool fog);
bool EV_TeleportGroup (int group_tid, AActor *victim, int source_tid, int dest_tid, bool moveSource, bool fog); bool EV_TeleportGroup (int group_tid, AActor *victim, int source_tid, int dest_tid, bool moveSource, bool fog);

View file

@ -99,7 +99,7 @@ void P_SpawnTeleportFog(fixed_t x, fixed_t y, fixed_t z, int spawnid)
// //
bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
bool useFog, bool sourceFog, bool keepOrientation, bool bHaltVelocity) bool useFog, bool sourceFog, bool keepOrientation, bool bHaltVelocity, bool keepHeight)
{ {
fixed_t oldx; fixed_t oldx;
fixed_t oldy; fixed_t oldy;
@ -127,7 +127,11 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
{ // We don't measure z velocity, because it doesn't change. { // We don't measure z velocity, because it doesn't change.
missilespeed = xs_CRoundToInt(TVector2<double>(thing->velx, thing->vely).Length()); missilespeed = xs_CRoundToInt(TVector2<double>(thing->velx, thing->vely).Length());
} }
if (z == ONFLOORZ) if (keepHeight)
{
z = floorheight + aboveFloor;
}
else if (z == ONFLOORZ)
{ {
if (player) if (player)
{ {
@ -320,7 +324,7 @@ static AActor *SelectTeleDest (int tid, int tag)
} }
bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool fog, bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool fog,
bool sourceFog, bool keepOrientation, bool haltVelocity) bool sourceFog, bool keepOrientation, bool haltVelocity, bool keepHeight)
{ {
AActor *searcher; AActor *searcher;
fixed_t z; fixed_t z;
@ -377,7 +381,7 @@ bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool
{ {
badangle = 1 << ANGLETOFINESHIFT; badangle = 1 << ANGLETOFINESHIFT;
} }
if (P_Teleport (thing, searcher->x, searcher->y, z, searcher->angle + badangle, fog, sourceFog, keepOrientation, haltVelocity)) if (P_Teleport (thing, searcher->x, searcher->y, z, searcher->angle + badangle, fog, sourceFog, keepOrientation, haltVelocity, keepHeight))
{ {
// [RH] Lee Killough's changes for silent teleporters from BOOM // [RH] Lee Killough's changes for silent teleporters from BOOM
if (!fog && line && keepOrientation) if (!fog && line && keepOrientation)

View file

@ -1452,6 +1452,8 @@ public:
char *buffer = new char[map->Size(ML_TEXTMAP)]; char *buffer = new char[map->Size(ML_TEXTMAP)];
isTranslated = true; isTranslated = true;
isExtended = false;
floordrop = false;
map->Read(ML_TEXTMAP, buffer); map->Read(ML_TEXTMAP, buffer);
sc.OpenMem(Wads.GetLumpFullName(map->lumpnum), buffer, map->Size(ML_TEXTMAP)); sc.OpenMem(Wads.GetLumpFullName(map->lumpnum), buffer, map->Size(ML_TEXTMAP));
@ -1570,6 +1572,12 @@ public:
} }
} }
// Catch bogus maps here rather than during nodebuilding
if (ParsedVertices.Size() == 0) I_Error("Map has no vertices.\n");
if (ParsedSectors.Size() == 0) I_Error("Map has no sectors. \n");
if (ParsedLines.Size() == 0) I_Error("Map has no linedefs.\n");
if (ParsedSides.Size() == 0) I_Error("Map has no sidedefs.\n");
// Create the real vertices // Create the real vertices
numvertexes = ParsedVertices.Size(); numvertexes = ParsedVertices.Size();
vertexes = new vertex_t[numvertexes]; vertexes = new vertex_t[numvertexes];

View file

@ -2112,7 +2112,7 @@ void R_ProjectParticle (particle_t *particle, const sector_t *sector, int shade,
vis->x1 = x1; vis->x1 = x1;
vis->x2 = x2; vis->x2 = x2;
vis->Translation = 0; vis->Translation = 0;
vis->startfrac = particle->color; vis->startfrac = 255 & (particle->color >>24);
vis->pic = NULL; vis->pic = NULL;
vis->bIsVoxel = false; vis->bIsVoxel = false;
vis->renderflags = particle->trans; vis->renderflags = particle->trans;

View file

@ -14,6 +14,8 @@
#ifndef PR_SET_PTRACER #ifndef PR_SET_PTRACER
#define PR_SET_PTRACER 0x59616d61 #define PR_SET_PTRACER 0x59616d61
#endif #endif
#else if defined (__APPLE__)
#include <signal.h>
#endif #endif

View file

@ -255,10 +255,12 @@ void I_ShutdownJoysticks();
int main (int argc, char **argv) int main (int argc, char **argv)
{ {
#if !defined (__APPLE__)
{ {
int s[4] = { SIGSEGV, SIGILL, SIGFPE, SIGBUS }; int s[4] = { SIGSEGV, SIGILL, SIGFPE, SIGBUS };
cc_install_handlers(argc, argv, 4, s, "zdoom-crash.log", DoomSpecificInfo); cc_install_handlers(argc, argv, 4, s, "zdoom-crash.log", DoomSpecificInfo);
} }
#endif // !__APPLE__
printf(GAMENAME" v%s - SVN revision %s - SDL version\nCompiled on %s\n", printf(GAMENAME" v%s - SVN revision %s - SDL version\nCompiled on %s\n",
DOTVERSIONSTR_NOREV,SVN_REVISION_STRING,__DATE__); DOTVERSIONSTR_NOREV,SVN_REVISION_STRING,__DATE__);
@ -298,6 +300,26 @@ int main (int argc, char **argv)
SDL_WM_SetCaption (GAMESIG " " DOTVERSIONSTR " (" __DATE__ ")", NULL); SDL_WM_SetCaption (GAMESIG " " DOTVERSIONSTR " (" __DATE__ ")", NULL);
#ifdef __APPLE__
const SDL_VideoInfo* videoInfo = SDL_GetVideoInfo();
if ( NULL != videoInfo )
{
EXTERN_CVAR( Int, vid_defwidth )
EXTERN_CVAR( Int, vid_defheight )
EXTERN_CVAR( Int, vid_defbits )
EXTERN_CVAR( Bool, vid_vsync )
EXTERN_CVAR( Bool, fullscreen )
vid_defwidth = videoInfo->current_w;
vid_defheight = videoInfo->current_h;
vid_defbits = videoInfo->vfmt->BitsPerPixel;
vid_vsync = True;
fullscreen = True;
}
#endif // __APPLE__
try try
{ {
Args = new DArgs(argc, argv); Args = new DArgs(argc, argv);

View file

@ -39,6 +39,7 @@
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__
#include <CoreFoundation/CoreFoundation.h>
#include <mach/mach_init.h> #include <mach/mach_init.h>
#include <mach/semaphore.h> #include <mach/semaphore.h>
#include <mach/task.h> #include <mach/task.h>
@ -393,9 +394,25 @@ void STACK_ARGS I_FatalError (const char *error, ...)
int index; int index;
va_list argptr; va_list argptr;
va_start (argptr, error); va_start (argptr, error);
index = vsprintf (errortext, error, argptr); index = vsnprintf (errortext, MAX_ERRORTEXT, error, argptr);
va_end (argptr); va_end (argptr);
#ifdef __APPLE__
// Close window or exit fullscreen and release mouse capture
SDL_Quit();
const CFStringRef errorString = CFStringCreateWithCStringNoCopy( kCFAllocatorDefault,
errortext, kCFStringEncodingASCII, kCFAllocatorNull );
if ( NULL != errorString )
{
CFOptionFlags dummy;
CFUserNotificationDisplayAlert( 0, kCFUserNotificationStopAlertLevel, NULL, NULL, NULL,
CFSTR( "Error" ), errorString, CFSTR( "Exit" ), NULL, NULL, &dummy );
CFRelease( errorString );
}
#endif // __APPLE__
// Record error to log (if logging) // Record error to log (if logging)
if (Logfile) if (Logfile)
{ {

View file

@ -42,6 +42,15 @@
#include "m_swap.h" #include "m_swap.h"
#include "sbar.h" #include "sbar.h"
#if defined (__APPLE__)
mach_timebase_info_data_t cycle_t::s_info;
bool cycle_t::s_initialized;
#endif // __APPLE__
FStat *FStat::FirstStat; FStat *FStat::FirstStat;
FStat::FStat (const char *name) FStat::FStat (const char *name)

View file

@ -38,6 +38,77 @@
#ifndef _WIN32 #ifndef _WIN32
#if defined (__APPLE__)
#include <mach/mach_time.h>
class cycle_t
{
public:
cycle_t()
{
if ( !s_initialized )
{
mach_timebase_info( &s_info );
s_initialized = true;
}
Reset();
}
cycle_t &operator=( const cycle_t &other )
{
if ( &other != this )
{
m_seconds = other.m_seconds;
}
return *this;
}
void Reset()
{
m_seconds = 0;
}
void Clock()
{
m_seconds -= Nanoseconds() * 1e-9;
}
void Unclock()
{
m_seconds += Nanoseconds() * 1e-9;
}
double Time()
{
return m_seconds;
}
double TimeMS()
{
return m_seconds * 1e3;
}
private:
double m_seconds;
static mach_timebase_info_data_t s_info;
static bool s_initialized;
uint64_t Nanoseconds() const
{
return mach_absolute_time() * s_info.numer / s_info.denom;
}
};
#else // !__APPLE__
#ifdef NO_CLOCK_GETTIME #ifdef NO_CLOCK_GETTIME
class cycle_t class cycle_t
{ {
@ -100,6 +171,8 @@ private:
#endif #endif
#endif // __APPLE__
#else #else
// Windows // Windows

View file

@ -209,10 +209,10 @@ include "xlat/defines.i"
204 = USE, Ceiling_LowerToHighestFloor (tag, C_SLOW) 204 = USE, Ceiling_LowerToHighestFloor (tag, C_SLOW)
205 = USE|REP, Ceiling_LowerToLowest (tag, C_SLOW) 205 = USE|REP, Ceiling_LowerToLowest (tag, C_SLOW)
206 = USE|REP, Ceiling_LowerToHighestFloor (tag, C_SLOW) 206 = USE|REP, Ceiling_LowerToHighestFloor (tag, C_SLOW)
207 = WALK|MONST, Teleport_NoFog (0, 0, tag) 207 = WALK|MONST, Teleport_NoFog (0, 0, tag, 1)
208 = WALK|REP|MONST, Teleport_NoFog (0, 0, tag) 208 = WALK|REP|MONST, Teleport_NoFog (0, 0, tag, 1)
209 = USE|MONST, Teleport_NoFog (0, 0, tag) 209 = USE|MONST, Teleport_NoFog (0, 0, tag, 1)
210 = USE|REP|MONST, Teleport_NoFog (0, 0, tag) 210 = USE|REP|MONST, Teleport_NoFog (0, 0, tag, 1)
211 = USE|REP, Plat_ToggleCeiling (tag) 211 = USE|REP, Plat_ToggleCeiling (tag)
212 = WALK|REP, Plat_ToggleCeiling (tag) 212 = WALK|REP, Plat_ToggleCeiling (tag)
213 = 0, Transfer_FloorLight (tag) 213 = 0, Transfer_FloorLight (tag)
@ -270,8 +270,8 @@ include "xlat/defines.i"
265 = MONWALK|REP, Teleport_Line (tag, tag, 1) 265 = MONWALK|REP, Teleport_Line (tag, tag, 1)
266 = MONWALK, Teleport_Line (tag, tag, 0) 266 = MONWALK, Teleport_Line (tag, tag, 0)
267 = MONWALK|REP, Teleport_Line (tag, tag, 0) 267 = MONWALK|REP, Teleport_Line (tag, tag, 0)
268 = MONWALK, Teleport_NoFog (0, 0, tag) 268 = MONWALK, Teleport_NoFog (0, 0, tag, 1)
269 = MONWALK|REP, Teleport_NoFog (0, 0, tag) 269 = MONWALK|REP, Teleport_NoFog (0, 0, tag, 1)
/****** MBF linetypes ******/ /****** MBF linetypes ******/

File diff suppressed because it is too large Load diff