mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-17 01:01:09 +00:00
- backend cleanup from GZDoom.
This commit is contained in:
parent
d7da983c5e
commit
b1e2b2addf
8 changed files with 41 additions and 11 deletions
|
@ -85,7 +85,7 @@ void D_ProcessEvents (void)
|
|||
UpdateJoystickMenu(I_UpdateDeviceList());
|
||||
|
||||
// allow the game to intercept Escape before dispatching it.
|
||||
if (ev->type != EV_KeyDown || ev->data1 != KEY_ESCAPE || !sysCallbacks.WantEscape())
|
||||
if (ev->type != EV_KeyDown || ev->data1 != KEY_ESCAPE || !sysCallbacks.WantEscape || !sysCallbacks.WantEscape())
|
||||
{
|
||||
if (gamestate != GS_INTRO) // GS_INTRO blocks the UI.
|
||||
{
|
||||
|
|
|
@ -79,6 +79,7 @@ xx(__decorate_internal_float__)
|
|||
// Per-actor sound channels (for deprecated PlaySoundEx function) Do not separate this block!!!
|
||||
xx(Auto)
|
||||
xx(Weapon)
|
||||
xx(BobPivot3D)
|
||||
xx(Voice)
|
||||
xx(Item)
|
||||
xx(Body)
|
||||
|
|
|
@ -560,11 +560,10 @@ public:
|
|||
class FxVectorValue : public FxExpression
|
||||
{
|
||||
constexpr static int maxVectorDimensions = 4;
|
||||
|
||||
FxExpression *xyzw[maxVectorDimensions];
|
||||
bool isConst; // gets set to true if all element are const (used by function defaults parser)
|
||||
|
||||
public:
|
||||
FxExpression *xyzw[maxVectorDimensions];
|
||||
|
||||
friend class ZCCCompiler;
|
||||
|
||||
|
|
|
@ -215,6 +215,11 @@ struct VMReturn
|
|||
Location = loc;
|
||||
RegType = REGT_FLOAT | REGT_MULTIREG2;
|
||||
}
|
||||
void Vec3At(DVector3 *loc)
|
||||
{
|
||||
Location = loc;
|
||||
RegType = REGT_FLOAT | REGT_MULTIREG3;
|
||||
}
|
||||
void StringAt(FString *loc)
|
||||
{
|
||||
Location = loc;
|
||||
|
@ -229,6 +234,7 @@ struct VMReturn
|
|||
VMReturn(int *loc) { IntAt(loc); }
|
||||
VMReturn(double *loc) { FloatAt(loc); }
|
||||
VMReturn(DVector2 *loc) { Vec2At(loc); }
|
||||
VMReturn(DVector3 *loc) { Vec3At(loc); }
|
||||
VMReturn(FString *loc) { StringAt(loc); }
|
||||
VMReturn(void **loc) { PointerAt(loc); }
|
||||
};
|
||||
|
|
|
@ -61,7 +61,7 @@ enum EGameTexFlags
|
|||
GTexf_AutoMaterialsAdded = 256, // AddAutoMaterials has been called on this texture.
|
||||
GTexf_OffsetsNotForFont = 512, // The offsets must be ignored when using this texture in a font.
|
||||
GTexf_NoTrim = 1024, // Don't perform trimming on this texture.
|
||||
GTexf_Seen = 2024, // Set to true when the texture is being used for rendering. Must be cleared manually if the check is needed.
|
||||
GTexf_Seen = 2048, // Set to true when the texture is being used for rendering. Must be cleared manually if the check is needed.
|
||||
};
|
||||
|
||||
struct FMaterialLayers
|
||||
|
@ -375,6 +375,31 @@ public:
|
|||
if (!Layers) return nullptr;
|
||||
return Layers->Detailmap.get();
|
||||
}
|
||||
FTexture* GetNormalmap()
|
||||
{
|
||||
if (!Layers) return nullptr;
|
||||
return Layers->Normal.get();
|
||||
}
|
||||
FTexture* GetSpecularmap()
|
||||
{
|
||||
if (!Layers) return nullptr;
|
||||
return Layers->Specular.get();
|
||||
}
|
||||
FTexture* GetMetallic()
|
||||
{
|
||||
if (!Layers) return nullptr;
|
||||
return Layers->Metallic.get();
|
||||
}
|
||||
FTexture* GetRoughness()
|
||||
{
|
||||
if (!Layers) return nullptr;
|
||||
return Layers->Roughness.get();
|
||||
}
|
||||
FTexture* GetAmbientOcclusion()
|
||||
{
|
||||
if (!Layers) return nullptr;
|
||||
return Layers->AmbientOcclusion.get();
|
||||
}
|
||||
|
||||
void SetGlowmap(FTexture *T)
|
||||
{
|
||||
|
|
|
@ -82,9 +82,6 @@ PalettedPixels FImageSource::GetCachedPalettedPixels(int conversion)
|
|||
{
|
||||
PalettedPixels ret;
|
||||
|
||||
//FString name;
|
||||
//fileSystem.GetFileShortName(name, SourceLump);
|
||||
|
||||
auto imageID = ImageID;
|
||||
|
||||
// Do we have this image in the cache?
|
||||
|
@ -196,9 +193,6 @@ FBitmap FImageSource::GetCachedBitmap(const PalEntry *remap, int conversion, int
|
|||
{
|
||||
FBitmap ret;
|
||||
|
||||
//FString name;
|
||||
//fileSystem.GetFileShortName(name, SourceLump);
|
||||
|
||||
int trans = -1;
|
||||
auto imageID = ImageID;
|
||||
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
#include <string.h>
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
#include <zlib.h>
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
#include <algorithm>
|
||||
|
@ -15,6 +17,10 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <cassert>
|
||||
#ifdef _MSC_VER
|
||||
#include <direct.h>
|
||||
#include <io.h>
|
||||
#endif // _MSC_VER
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
|
|
|
@ -139,7 +139,6 @@ public:
|
|||
}
|
||||
case kFrameSound:
|
||||
{
|
||||
auto sfxx = soundEngine->GetSounds();
|
||||
auto buffer = fp.Read(nSize);
|
||||
assert(buffer.Size() == kSampleSize);
|
||||
auto wbuffer = audio.samples + audio.nWrite * kSampleSize;
|
||||
|
|
Loading…
Reference in a new issue