Skip to content

Commit

Permalink
Force ScriptID calls to decompile as unsigned
Browse files Browse the repository at this point in the history
Don't think it'll help with the messager in Phantasmagoria, that's a completely different thing, I think, but that's what set this goose chase off so here we are.

honk.
  • Loading branch information
Kawa-oneechan committed Apr 22, 2020
1 parent 66c0cd9 commit 2f9d0d9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion SCICompanionLib/Src/Compile/DecompilerSpecialCases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,13 @@ void _MassageDisplay(ProcedureCall &proc, DecompileLookups &lookups)
}
#endif

void _MassageScriptID(ProcedureCall &proc, DecompileLookups &lookups)
{
SyntaxNode *param = proc.GetParameter(0);
PropertyValue *pV = SafeSyntaxNode<PropertyValue>(param);
pV->_fNegate = false;
}

// Print(100 44) becomes Print("Hello there")
void _SubstituteTextTuples(ProcedureCall &proc, DecompileLookups &lookups, std::string &text, bool replace)
{
Expand All @@ -225,8 +232,11 @@ void _MassageProcedureCall(ProcedureCall &proc, DecompileLookups &lookups)
{
_MassageDisplay(proc, lookups);
}

#endif
else if (proc.GetName() == "ScriptID")
{
_MassageScriptID(proc, lookups);
}
}

class MassageProcedureCallsWorker : public IExploreNode
Expand Down

0 comments on commit 2f9d0d9

Please sign in to comment.