mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 09:20:59 +00:00
- got new CVar system from GZDoom.
This commit is contained in:
parent
ff25dc7ae5
commit
479616a80f
25 changed files with 323 additions and 164 deletions
|
@ -6715,12 +6715,12 @@ FxExpression *FxCVar::Resolve(FCompileContext &ctx)
|
|||
switch (CVar->GetRealType())
|
||||
{
|
||||
case CVAR_Bool:
|
||||
case CVAR_DummyBool:
|
||||
case CVAR_Flag:
|
||||
ValueType = TypeBool;
|
||||
break;
|
||||
|
||||
case CVAR_Int:
|
||||
case CVAR_DummyInt:
|
||||
case CVAR_Mask:
|
||||
ValueType = TypeSInt32;
|
||||
break;
|
||||
|
||||
|
@ -6776,7 +6776,7 @@ ExpEmit FxCVar::Emit(VMFunctionBuilder *build)
|
|||
build->Emit(OP_LS, dest.RegNum, addr.RegNum, nul);
|
||||
break;
|
||||
|
||||
case CVAR_DummyBool:
|
||||
case CVAR_Flag:
|
||||
{
|
||||
int *pVal;
|
||||
auto cv = static_cast<FFlagCVar *>(CVar);
|
||||
|
@ -6789,7 +6789,7 @@ ExpEmit FxCVar::Emit(VMFunctionBuilder *build)
|
|||
break;
|
||||
}
|
||||
|
||||
case CVAR_DummyInt:
|
||||
case CVAR_Mask:
|
||||
{
|
||||
auto cv = static_cast<FMaskCVar *>(CVar);
|
||||
build->Emit(OP_LKP, addr.RegNum, build->GetConstantAddress(&cv->ValueVar.Value));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue