mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- moved some more things out of build.h
This commit is contained in:
parent
0eea776065
commit
479c732a72
6 changed files with 43 additions and 49 deletions
|
@ -23,21 +23,6 @@ static_assert('\xff' == 255, "Char must be unsigned!");
|
|||
|
||||
typedef int64_t coord_t;
|
||||
|
||||
enum
|
||||
{
|
||||
MAXWALLSB = 6144,
|
||||
|
||||
// Maximum number of component tiles in a multi-psky:
|
||||
MAXUNIQHUDID = 256, //Extra slots so HUD models can store animation state without messing game sprites
|
||||
|
||||
TSPR_TEMP = 99,
|
||||
|
||||
CLIPMASK0 = (1 << 16) + 1,
|
||||
CLIPMASK1 = (256 << 16) + 64
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define POINT2(i) (wall[wall[i].point2])
|
||||
|
||||
|
||||
|
@ -46,19 +31,6 @@ enum
|
|||
|
||||
int32_t getwalldist(vec2_t const in, int const wallnum, vec2_t * const out);
|
||||
|
||||
struct usermaphack_t
|
||||
{
|
||||
FString mhkfile;
|
||||
FString title;
|
||||
uint8_t md4[16]{};
|
||||
};
|
||||
|
||||
enum {
|
||||
PALETTE_MAIN = 1<<0,
|
||||
PALETTE_SHADE = 1<<1,
|
||||
PALETTE_TRANSLUC = 1<<2,
|
||||
};
|
||||
|
||||
enum {
|
||||
ENGINECOMPATIBILITY_NONE = 0,
|
||||
ENGINECOMPATIBILITY_19950829, // Powerslave/Exhumed
|
||||
|
@ -66,22 +38,9 @@ enum {
|
|||
ENGINECOMPATIBILITY_19961112, // Duke 3d v1.5, Redneck Rampage
|
||||
};
|
||||
|
||||
inline int leveltimer;
|
||||
inline int32_t Numsprites;
|
||||
inline int32_t display_mirror;
|
||||
inline int32_t randomseed;
|
||||
inline uint8_t paletteloaded;
|
||||
inline int32_t g_visibility = 512, g_relvisibility = 0;
|
||||
inline int32_t enginecompatibility_mode;
|
||||
|
||||
|
||||
void setVideoMode();
|
||||
|
||||
class F2DDrawer;
|
||||
|
||||
|
||||
struct HitInfoBase;
|
||||
|
||||
inline int32_t ksqrt(uint64_t num)
|
||||
{
|
||||
return int(sqrt(double(num)));
|
||||
|
|
|
@ -44,12 +44,13 @@
|
|||
#include "mapinfo.h"
|
||||
#include "hw_voxels.h"
|
||||
#include "psky.h"
|
||||
#include "gamefuncs.h"
|
||||
#include "models/modeldata.h"
|
||||
|
||||
int tileSetHightileReplacement(int picnum, int palnum, const char* filename, float alphacut, float xscale, float yscale, float specpower, float specfactor, bool indexed = false);
|
||||
int tileSetSkybox(int picnum, int palnum, FString* facenames, bool indexed = false);
|
||||
void tileRemoveReplacement(int num);
|
||||
void AddUserMapHack(usermaphack_t&);
|
||||
void AddUserMapHack(const FString& title, const FString& mhkfile, uint8_t* md4);
|
||||
|
||||
static void defsparser(FScanner& sc);
|
||||
|
||||
|
@ -826,7 +827,10 @@ void parseMusic(FScanner& sc, FScriptPosition& pos)
|
|||
|
||||
void parseMapinfo(FScanner& sc, FScriptPosition& pos)
|
||||
{
|
||||
usermaphack_t mhk;
|
||||
FString title;
|
||||
FString mhkfile;
|
||||
uint8_t md4b[16]{};
|
||||
|
||||
FScanner::SavedPos blockend;
|
||||
TArray<FString> md4s;
|
||||
|
||||
|
@ -835,8 +839,8 @@ void parseMapinfo(FScanner& sc, FScriptPosition& pos)
|
|||
{
|
||||
sc.MustGetString();
|
||||
if (sc.Compare("mapfile")) sc.GetString();
|
||||
else if (sc.Compare("maptitle")) sc.GetString(mhk.title);
|
||||
else if (sc.Compare("mhkfile")) sc.GetString(mhk.mhkfile);
|
||||
else if (sc.Compare("maptitle")) sc.GetString(title);
|
||||
else if (sc.Compare("mhkfile")) sc.GetString(mhkfile);
|
||||
else if (sc.Compare("mapmd4"))
|
||||
{
|
||||
sc.GetString();
|
||||
|
@ -848,9 +852,9 @@ void parseMapinfo(FScanner& sc, FScriptPosition& pos)
|
|||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
char smallbuf[3] = { md4[2 * i], md4[2 * i + 1], 0 };
|
||||
mhk.md4[i] = (uint8_t)strtol(smallbuf, nullptr, 16);
|
||||
md4b[i] = (uint8_t)strtol(smallbuf, nullptr, 16);
|
||||
}
|
||||
AddUserMapHack(mhk);
|
||||
AddUserMapHack(title, mhkfile, md4b);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ void DeferredStartGame(MapRecord* map, int skill, bool nostopsound = false);
|
|||
void ChangeLevel(MapRecord* map, int skill, bool bossexit = false);
|
||||
void CompleteLevel(MapRecord* map);
|
||||
bool CheckCheatmode(bool printmsg = true, bool sponly = false);
|
||||
void setVideoMode();
|
||||
|
||||
void TITLE_InformName(const char* newname);
|
||||
|
||||
|
|
|
@ -18,9 +18,20 @@ extern bool hw_int_useindexedcolortextures;
|
|||
EXTERN_CVAR(Bool, hw_useindexedcolortextures)
|
||||
EXTERN_CVAR(Bool, r_voxels)
|
||||
|
||||
inline int leveltimer;
|
||||
inline int Numsprites;
|
||||
inline int display_mirror;
|
||||
inline int randomseed;
|
||||
inline int g_visibility = 512, g_relvisibility = 0;
|
||||
|
||||
constexpr int SLOPEVAL_FACTOR = 4096;
|
||||
|
||||
enum
|
||||
{
|
||||
CLIPMASK0 = (1 << 16) + 1,
|
||||
CLIPMASK1 = (256 << 16) + 64
|
||||
};
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// breadth first search, this gets used multiple times throughout the engine, mainly for iterating over sectors.
|
||||
|
|
|
@ -39,12 +39,23 @@
|
|||
#include "md4.h"
|
||||
#include "hw_sections.h"
|
||||
#include "mapinfo.h"
|
||||
#include "gamefuncs.h"
|
||||
|
||||
struct usermaphack_t
|
||||
{
|
||||
FString mhkfile;
|
||||
FString title;
|
||||
uint8_t md4[16]{};
|
||||
};
|
||||
|
||||
static TArray<usermaphack_t> usermaphacks;
|
||||
|
||||
void AddUserMapHack(usermaphack_t& mhk)
|
||||
void AddUserMapHack(const FString& title, const FString& mhkfile, uint8_t* md4)
|
||||
{
|
||||
usermaphacks.Push(mhk);
|
||||
usermaphacks.Reserve(1);
|
||||
usermaphacks.Last().title = title;
|
||||
usermaphacks.Last().mhkfile = mhkfile;
|
||||
memcpy(usermaphacks.Last().md4, md4, 16);
|
||||
}
|
||||
|
||||
static int32_t LoadMapHack(const char *filename, SpawnSpriteDef& sprites)
|
||||
|
|
|
@ -197,4 +197,12 @@ FRenderStyle GetRenderStyle(int blend, int def);
|
|||
float GetAlphaFromBlend(uint32_t maskprops, uint32_t blend);
|
||||
void DrawFullscreenBlends();
|
||||
|
||||
enum {
|
||||
PALETTE_MAIN = 1 << 0,
|
||||
PALETTE_SHADE = 1 << 1,
|
||||
PALETTE_TRANSLUC = 1 << 2,
|
||||
};
|
||||
|
||||
inline uint8_t paletteloaded;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue