2019-12-22 19:55:47 +00:00
|
|
|
|
|
|
|
#ifndef __I_SYSTEM__
|
|
|
|
#define __I_SYSTEM__
|
|
|
|
|
|
|
|
#include "basics.h"
|
|
|
|
#include <thread>
|
|
|
|
#include "tarray.h"
|
|
|
|
#include "zstring.h"
|
|
|
|
#include "utf8.h"
|
|
|
|
|
|
|
|
struct ticcmd_t;
|
|
|
|
struct WadStuff;
|
|
|
|
|
|
|
|
// [RH] Detects the OS the game is running under.
|
|
|
|
void I_DetectOS (void);
|
|
|
|
|
|
|
|
// Called by DoomMain.
|
2020-04-23 19:18:40 +00:00
|
|
|
void CalculateCPUSpeed (void);
|
2019-12-22 19:55:47 +00:00
|
|
|
|
|
|
|
// Return a seed value for the RNG.
|
|
|
|
unsigned int I_MakeRNGSeed();
|
|
|
|
|
2020-04-11 22:09:39 +00:00
|
|
|
|
2019-12-22 19:55:47 +00:00
|
|
|
void I_StartFrame (void);
|
|
|
|
void I_StartTic (void);
|
|
|
|
|
|
|
|
// Set the mouse cursor. The texture must be 32x32.
|
2020-05-25 21:59:07 +00:00
|
|
|
class FGameTexture;
|
|
|
|
bool I_SetCursor(FGameTexture *cursor);
|
2019-12-22 19:55:47 +00:00
|
|
|
|
|
|
|
// Repaint the pre-game console
|
|
|
|
void I_PaintConsole (void);
|
|
|
|
|
|
|
|
// Print a console string
|
|
|
|
void I_PrintStr (const char *cp);
|
|
|
|
|
|
|
|
// Set the title string of the startup window
|
|
|
|
void I_SetIWADInfo ();
|
|
|
|
|
|
|
|
// Pick from multiple IWADs to use
|
2022-10-02 18:33:18 +00:00
|
|
|
int I_PickIWad(WadStuff* wads, int numwads, bool queryiwad, int defaultiwad, int& autoloadflags);
|
2019-12-22 19:55:47 +00:00
|
|
|
|
|
|
|
// The ini could not be saved at exit
|
2022-10-02 18:33:18 +00:00
|
|
|
bool I_WriteIniFailed (const char* filename);
|
2019-12-22 19:55:47 +00:00
|
|
|
|
|
|
|
// [RH] Checks the registry for Steam's install path, so we can scan its
|
|
|
|
// directories for IWADs if the user purchased any through Steam.
|
|
|
|
TArray<FString> I_GetSteamPath();
|
|
|
|
|
|
|
|
// [GZ] Same deal for GOG paths
|
|
|
|
TArray<FString> I_GetGogPaths();
|
|
|
|
|
2021-09-22 08:20:39 +00:00
|
|
|
// Again for the Bethesda.net Launcher path
|
|
|
|
TArray<FString> I_GetBethesdaPath();
|
|
|
|
|
2019-12-22 19:55:47 +00:00
|
|
|
// Damn Microsoft for doing Get/SetWindowLongPtr half-assed. Instead of
|
|
|
|
// giving them proper prototypes under Win32, they are just macros for
|
|
|
|
// Get/SetWindowLong, meaning they take LONGs and not LONG_PTRs.
|
|
|
|
#ifdef _WIN64
|
|
|
|
typedef long long WLONG_PTR;
|
|
|
|
#elif _MSC_VER
|
|
|
|
typedef _W64 long WLONG_PTR;
|
|
|
|
#else
|
|
|
|
typedef long WLONG_PTR;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Wrapper for GetLongPathName
|
|
|
|
FString I_GetLongPathName(const FString &shortpath);
|
|
|
|
|
|
|
|
// Mirror WIN32_FIND_DATAA in <winbase.h>
|
|
|
|
#ifndef MAX_PATH
|
|
|
|
#define MAX_PATH 260
|
|
|
|
#endif
|
|
|
|
#ifndef PATH_MAX
|
|
|
|
#define PATH_MAX 260
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int I_GetNumaNodeCount();
|
|
|
|
int I_GetNumaNodeThreadCount(int numaNode);
|
|
|
|
void I_SetThreadNumaNode(std::thread &thread, int numaNode);
|
2020-01-28 10:20:30 +00:00
|
|
|
|
2022-08-26 16:28:22 +00:00
|
|
|
void I_OpenShellFolder(const char*);
|
2023-08-23 18:36:19 +00:00
|
|
|
FString I_GetCWD();
|
|
|
|
bool I_ChDir(const char* path);
|
2022-08-26 16:28:22 +00:00
|
|
|
|
2019-12-22 19:55:47 +00:00
|
|
|
#endif
|