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