- Backend update from Raze
This commit is contained in:
parent
55ce0510c2
commit
ba146ed5e5
43 changed files with 473 additions and 168 deletions
|
|
@ -76,12 +76,15 @@ void D_ProcessEvents (void)
|
|||
continue;
|
||||
if (ev->type == EV_DeviceChange)
|
||||
UpdateJoystickMenu(I_UpdateDeviceList());
|
||||
if (gamestate == GS_INTRO)
|
||||
continue;
|
||||
if (C_Responder (ev))
|
||||
continue; // console ate the event
|
||||
if (M_Responder (ev))
|
||||
continue; // menu ate the event
|
||||
|
||||
if (gamestate != GS_INTRO) // GS_INTRO blocks the UI.
|
||||
{
|
||||
if (C_Responder(ev))
|
||||
continue; // console ate the event
|
||||
if (M_Responder(ev))
|
||||
continue; // menu ate the event
|
||||
}
|
||||
|
||||
G_Responder (ev);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1287,6 +1287,42 @@ void FScanner::AddSymbol(const char* name, double value)
|
|||
symbols.Insert(name, sym);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
int FScanner::StartBraces(FScanner::SavedPos* braceend)
|
||||
{
|
||||
if (CheckString("{"))
|
||||
{
|
||||
auto here = SavePos();
|
||||
SkipToEndOfBlock();
|
||||
*braceend = SavePos();
|
||||
RestorePos(here);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScriptError("'{' expected");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool FScanner::FoundEndBrace(FScanner::SavedPos& braceend)
|
||||
{
|
||||
auto here = SavePos();
|
||||
return here.SavedScriptPtr >= braceend.SavedScriptPtr;
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// a class that remembers a parser position
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@ public:
|
|||
inline void AddSymbol(const char* name, uint32_t value) { return AddSymbol(name, uint64_t(value)); }
|
||||
void AddSymbol(const char* name, double value);
|
||||
void SkipToEndOfBlock();
|
||||
int StartBraces(FScanner::SavedPos* braceend);
|
||||
bool FoundEndBrace(FScanner::SavedPos& braceend);
|
||||
|
||||
static FString TokenName(int token, const char *string=NULL);
|
||||
|
||||
|
|
@ -113,7 +115,30 @@ public:
|
|||
void MustGetNumber(bool evaluate = false);
|
||||
bool CheckNumber(bool evaluate = false);
|
||||
|
||||
bool GetNumber(int& var, bool evaluate = false)
|
||||
{
|
||||
if (!GetNumber(evaluate)) return false;
|
||||
var = Number;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GetString(FString& var)
|
||||
{
|
||||
if (!GetString()) return false;
|
||||
var = String;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GetFloat(bool evaluate = false);
|
||||
|
||||
bool GetFloat(double& var, bool evaluate = false)
|
||||
{
|
||||
if (!GetFloat(evaluate)) return false;
|
||||
var = Float;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void MustGetFloat(bool evaluate = false);
|
||||
bool CheckFloat(bool evaluate = false);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ struct FStartupInfo
|
|||
int LoadLights = -1;
|
||||
int LoadBrightmaps = -1;
|
||||
int LoadWidescreen = -1;
|
||||
int modern = 0;
|
||||
enum
|
||||
{
|
||||
DefaultStartup,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue