mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-19 18:50:52 +00:00
Merge remote-tracking branch 'remotes/zdoom/maint' into maint2.1
# Conflicts: # src/version.h
This commit is contained in:
commit
9144efe8bc
18 changed files with 64 additions and 44 deletions
|
@ -229,13 +229,12 @@ include_directories( ${OPENGL_INCLUDE_DIR} )
|
|||
|
||||
if( NOT NO_OPENAL )
|
||||
find_package( OpenAL )
|
||||
mark_as_advanced(CLEAR OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
|
||||
if( OPENAL_FOUND )
|
||||
mark_as_advanced(CLEAR OPENAL_INCLUDE_DIR)
|
||||
if( OPENAL_INCLUDE_DIR )
|
||||
include_directories( ${OPENAL_INCLUDE_DIR} )
|
||||
set( ZDOOM_LIBS ${OPENAL_LIBRARY} ${ZDOOM_LIBS} )
|
||||
else( OPENAL_FOUND )
|
||||
set( NO_OPENAL ON )
|
||||
endif( OPENAL_FOUND )
|
||||
else( OPENAL_INCLUDE_DIR )
|
||||
set( NO_OPENAL ON )
|
||||
endif( OPENAL_INCLUDE_DIR )
|
||||
endif( NOT NO_OPENAL )
|
||||
|
||||
if( NOT NO_FMOD )
|
||||
|
|
|
@ -95,11 +95,11 @@ void DMover::Serialize (FArchive &arc)
|
|||
arc << interpolation;
|
||||
}
|
||||
|
||||
void DMover::StopInterpolation()
|
||||
void DMover::StopInterpolation(bool force)
|
||||
{
|
||||
if (interpolation != NULL)
|
||||
{
|
||||
interpolation->DelRef();
|
||||
interpolation->DelRef(force);
|
||||
interpolation = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ protected:
|
|||
DMover ();
|
||||
void Serialize (FArchive &arc);
|
||||
void Destroy();
|
||||
void StopInterpolation();
|
||||
void StopInterpolation(bool force = false);
|
||||
inline EResult MoveFloor (fixed_t speed, fixed_t dest, int crush, int direction, bool hexencrush)
|
||||
{
|
||||
return MovePlane (speed, dest, crush, 0, direction, hexencrush);
|
||||
|
|
|
@ -1571,7 +1571,7 @@ public:
|
|||
bool res = DMover::crushed != MoveFloor(speed, dest, crush, direction, false);
|
||||
Destroy();
|
||||
m_Sector->floordata=NULL;
|
||||
StopInterpolation();
|
||||
StopInterpolation(true);
|
||||
m_Sector=NULL;
|
||||
return res;
|
||||
}
|
||||
|
@ -1656,6 +1656,14 @@ public:
|
|||
m_Speed=movespeed;
|
||||
m_Direction = _m_Direction;
|
||||
m_FloorDestDist = moveheight;
|
||||
|
||||
// Do not interpolate instant movement floors.
|
||||
fixed_t movedist = abs(-sec->floorplane.d - moveheight);
|
||||
if (m_Speed >= movedist)
|
||||
{
|
||||
StopInterpolation(true);
|
||||
}
|
||||
|
||||
StartFloorSound();
|
||||
}
|
||||
};
|
||||
|
@ -1713,7 +1721,7 @@ public:
|
|||
bool res = DMover::crushed != MoveCeiling(speed, dest, crush, direction, false);
|
||||
Destroy();
|
||||
m_Sector->ceilingdata=NULL;
|
||||
StopInterpolation ();
|
||||
StopInterpolation (true);
|
||||
m_Sector=NULL;
|
||||
return res;
|
||||
}
|
||||
|
@ -1806,7 +1814,7 @@ public:
|
|||
fixed_t movedist = abs(sec->ceilingplane.d - m_BottomHeight);
|
||||
if (m_Speed >= movedist)
|
||||
{
|
||||
StopInterpolation ();
|
||||
StopInterpolation (true);
|
||||
m_Silent=2;
|
||||
}
|
||||
PlayCeilingSound();
|
||||
|
|
|
@ -626,7 +626,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DeathBallImpact)
|
|||
}
|
||||
else
|
||||
{ // Seek
|
||||
self->angle = self->AngleTo(target);
|
||||
angle = self->AngleTo(target);
|
||||
newAngle = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -412,7 +412,7 @@ DCeiling *DCeiling::Create(sector_t *sec, DCeiling::ECeiling type, line_t *line,
|
|||
}
|
||||
if (ceiling->m_Speed >= movedist)
|
||||
{
|
||||
ceiling->StopInterpolation();
|
||||
ceiling->StopInterpolation(true);
|
||||
}
|
||||
|
||||
// set texture/type change properties
|
||||
|
|
|
@ -478,7 +478,7 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
|
|||
(floor->m_Direction<0 && floor->m_FloorDestDist<sec->floorplane.d) || // moving down but going up
|
||||
(floor->m_Speed >= abs(sec->floorplane.d - floor->m_FloorDestDist))) // moving in one step
|
||||
{
|
||||
floor->StopInterpolation();
|
||||
floor->StopInterpolation(true);
|
||||
|
||||
// [Graf Zahl]
|
||||
// Don't make sounds for instant movement hacks but make an exception for
|
||||
|
|
|
@ -627,13 +627,19 @@ static void ParseFloor (FScanner &sc)
|
|||
FTextureID picnum;
|
||||
int terrain;
|
||||
|
||||
bool opt = sc.CheckString("optional");
|
||||
sc.MustGetString ();
|
||||
|
||||
picnum = TexMan.CheckForTexture (sc.String, FTexture::TEX_Flat,
|
||||
FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_TryAny);
|
||||
|
||||
if (!picnum.Exists())
|
||||
{
|
||||
Printf ("Unknown flat %s\n", sc.String);
|
||||
sc.MustGetString ();
|
||||
if (!opt)
|
||||
{
|
||||
Printf("Unknown flat %s\n", sc.String);
|
||||
}
|
||||
sc.MustGetString();
|
||||
return;
|
||||
}
|
||||
sc.MustGetString ();
|
||||
|
|
|
@ -344,9 +344,10 @@ int DInterpolation::AddRef()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
int DInterpolation::DelRef()
|
||||
int DInterpolation::DelRef(bool force)
|
||||
{
|
||||
if (refcount > 0) --refcount;
|
||||
if (force && refcount == 0) Destroy();
|
||||
return refcount;
|
||||
}
|
||||
|
||||
|
@ -943,20 +944,6 @@ DInterpolation *sector_t::SetInterpolation(int position, bool attach)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void sector_t::StopInterpolation(int position)
|
||||
{
|
||||
if (interpolations[position] != NULL)
|
||||
{
|
||||
interpolations[position]->DelRef();
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
DInterpolation *FPolyObj::SetInterpolation()
|
||||
{
|
||||
if (interpolation != NULL)
|
||||
|
|
|
@ -25,7 +25,7 @@ protected:
|
|||
|
||||
public:
|
||||
int AddRef();
|
||||
int DelRef();
|
||||
int DelRef(bool force = false);
|
||||
|
||||
virtual void Destroy();
|
||||
virtual void UpdateInterpolation() = 0;
|
||||
|
|
|
@ -542,7 +542,6 @@ struct sector_t
|
|||
sector_t *GetHeightSec() const;
|
||||
|
||||
DInterpolation *SetInterpolation(int position, bool attach);
|
||||
void StopInterpolation(int position);
|
||||
|
||||
ASkyViewpoint *GetSkyBox(int which);
|
||||
|
||||
|
|
|
@ -55,6 +55,8 @@ std2:
|
|||
/*!re2c
|
||||
"/*" { goto comment; } /* C comment */
|
||||
"//" (any\"\n")* "\n" { goto newline; } /* C++ comment */
|
||||
("#region"|"#endregion") (any\"\n")* "\n"
|
||||
{ goto newline; } /* Region blocks [mxd] */
|
||||
|
||||
/* C Keywords */
|
||||
'break' { RET(TK_Break); }
|
||||
|
@ -241,6 +243,8 @@ std2:
|
|||
/*!re2c
|
||||
"/*" { goto comment; } /* C comment */
|
||||
("//"|";") (any\"\n")* "\n" { goto newline; } /* C++/Hexen comment */
|
||||
("#region"|"#endregion") (any\"\n")* "\n"
|
||||
{ goto newline; } /* Region blocks [mxd] */
|
||||
|
||||
WSP+ { goto std1; } /* whitespace */
|
||||
"\n" { goto newline; }
|
||||
|
@ -259,6 +263,8 @@ std2:
|
|||
/*!re2c
|
||||
"/*" { goto comment; } /* C comment */
|
||||
"//" (any\"\n")* "\n" { goto newline; } /* C++ comment */
|
||||
("#region"|"#endregion") (any\"\n")* "\n"
|
||||
{ goto newline; } /* Region blocks [mxd] */
|
||||
|
||||
WSP+ { goto std1; } /* whitespace */
|
||||
"\n" { goto newline; }
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
#ifndef OALDEF_H
|
||||
#define OALDEF_H
|
||||
|
||||
#if defined _WIN32 && !defined NO_OPENAL
|
||||
#ifndef NO_OPENAL
|
||||
|
||||
#ifndef _WIN32
|
||||
typedef void* FARPROC;
|
||||
#endif
|
||||
|
||||
#define DEFINE_ENTRY(type, name) static type p_##name;
|
||||
#include "oaldef.h"
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#include "except.h"
|
||||
|
@ -61,14 +63,23 @@ CVAR (Bool, snd_efx, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
|
||||
#ifdef _WIN32
|
||||
static HMODULE hmodOpenAL;
|
||||
#define OPENALLIB "openal32.dll"
|
||||
#else
|
||||
static void* hmodOpenAL;
|
||||
#ifdef __APPLE__
|
||||
#define OPENALLIB "OpenAL.framework/OpenAL"
|
||||
#else
|
||||
#define OPENALLIB "libopenal.so"
|
||||
#endif
|
||||
#define LoadLibrary(x) dlopen((x), RTLD_LAZY)
|
||||
#define GetProcAddress(a,b) dlsym((a),(b))
|
||||
#define FreeLibrary(x) dlclose((x))
|
||||
#endif
|
||||
|
||||
bool IsOpenALPresent()
|
||||
{
|
||||
#ifdef NO_OPENAL
|
||||
return false;
|
||||
#elif !defined _WIN32
|
||||
return true;
|
||||
#else
|
||||
static bool cached_result = false;
|
||||
static bool done = false;
|
||||
|
@ -78,10 +89,10 @@ bool IsOpenALPresent()
|
|||
done = true;
|
||||
if (hmodOpenAL == NULL)
|
||||
{
|
||||
hmodOpenAL = LoadLibrary(NicePath("$PROGDIR/openal32.dll"));
|
||||
hmodOpenAL = LoadLibrary(NicePath("$PROGDIR/" OPENALLIB));
|
||||
if (hmodOpenAL == NULL)
|
||||
{
|
||||
hmodOpenAL = LoadLibrary("openal32.dll");
|
||||
hmodOpenAL = LoadLibrary(OPENALLIB);
|
||||
if (hmodOpenAL == NULL)
|
||||
{
|
||||
return false;
|
||||
|
@ -90,7 +101,7 @@ bool IsOpenALPresent()
|
|||
for(int i = 0; oalfuncs[i].name != NULL; i++)
|
||||
{
|
||||
*oalfuncs[i].funcaddr = GetProcAddress(hmodOpenAL, oalfuncs[i].name);
|
||||
if (oalfuncs[i].funcaddr == NULL)
|
||||
if (*oalfuncs[i].funcaddr == NULL)
|
||||
{
|
||||
FreeLibrary(hmodOpenAL);
|
||||
hmodOpenAL = NULL;
|
||||
|
|
|
@ -34,7 +34,7 @@ ACTOR Fatso
|
|||
FATT H 10 BRIGHT A_FatAttack2
|
||||
FATT IG 5 A_FaceTarget
|
||||
FATT H 10 BRIGHT A_FatAttack3
|
||||
FATT IG 5
|
||||
FATT IG 5 A_FaceTarget
|
||||
Goto See
|
||||
Pain:
|
||||
FATT J 3
|
||||
|
|
|
@ -29,8 +29,8 @@ ACTOR PainElemental
|
|||
Missile:
|
||||
PAIN D 5 A_FaceTarget
|
||||
PAIN E 5 A_FaceTarget
|
||||
PAIN F 4 BRIGHT A_FaceTarget
|
||||
PAIN F 1 BRIGHT A_PainAttack
|
||||
PAIN F 5 BRIGHT A_FaceTarget
|
||||
PAIN F 0 BRIGHT A_PainAttack
|
||||
Goto See
|
||||
Pain:
|
||||
PAIN G 6
|
||||
|
|
|
@ -31,7 +31,7 @@ ACTOR Revenant
|
|||
SKEL AABBCCDDEEFF 2 A_Chase
|
||||
Loop
|
||||
Melee:
|
||||
SKEL G 1 A_FaceTarget
|
||||
SKEL G 0 A_FaceTarget
|
||||
SKEL G 6 A_SkelWhoosh
|
||||
SKEL H 6 A_FaceTarget
|
||||
SKEL I 6 A_SkelFist
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue