mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- fixed: String CVARs get stored as a const char *, not an FString, so the ls opcode cannot be used to read their content.
This commit is contained in:
parent
c4cb94123f
commit
5bc26763cb
3 changed files with 13 additions and 1 deletions
|
@ -6522,7 +6522,7 @@ ExpEmit FxCVar::Emit(VMFunctionBuilder *build)
|
|||
|
||||
case CVAR_String:
|
||||
build->Emit(OP_LKP, addr.RegNum, build->GetConstantAddress(&static_cast<FStringCVar *>(CVar)->Value, ATAG_GENERIC));
|
||||
build->Emit(OP_LS, dest.RegNum, addr.RegNum, nul);
|
||||
build->Emit(OP_LCS, dest.RegNum, addr.RegNum, nul);
|
||||
break;
|
||||
|
||||
case CVAR_DummyBool:
|
||||
|
|
|
@ -197,6 +197,16 @@ begin:
|
|||
GETADDR(PB,RC,X_READ_NIL);
|
||||
reg.s[a] = *(FString *)ptr;
|
||||
NEXTOP;
|
||||
OP(LCS):
|
||||
ASSERTS(a); ASSERTA(B); ASSERTKD(C);
|
||||
GETADDR(PB,KC,X_READ_NIL);
|
||||
reg.s[a] = *(const char **)ptr;
|
||||
NEXTOP;
|
||||
OP(LCS_R):
|
||||
ASSERTS(a); ASSERTA(B); ASSERTD(C);
|
||||
GETADDR(PB,RC,X_READ_NIL);
|
||||
reg.s[a] = *(const char **)ptr;
|
||||
NEXTOP;
|
||||
OP(LO):
|
||||
ASSERTA(a); ASSERTA(B); ASSERTKD(C);
|
||||
GETADDR(PB,KC,X_READ_NIL);
|
||||
|
|
|
@ -52,6 +52,8 @@ xx(LV2, lv2, RVRPKI, LV2_R, 4, REGT_INT), // load vector2
|
|||
xx(LV2_R, lv2, RVRPRI, NOP, 0, 0),
|
||||
xx(LV3, lv3, RVRPKI, LV3_R, 4, REGT_INT), // load vector3
|
||||
xx(LV3_R, lv3, RVRPRI, NOP, 0, 0),
|
||||
xx(LCS, lcs, RSRPKI, LCS_R, 4, REGT_INT), // load string from char ptr.
|
||||
xx(LCS_R, lcs, RSRPRI, NOP, 0, 0),
|
||||
|
||||
xx(LBIT, lbit, RIRPI8, NOP, 0, 0), // rA = !!(*rB & C) -- *rB is a byte
|
||||
|
||||
|
|
Loading…
Reference in a new issue