- resolve the single Doom specific dependency in the VM by using a callback.

This commit is contained in:
Christoph Oelckers 2020-04-06 21:57:47 +02:00
parent c9b2399cd0
commit a6d982ed04
4 changed files with 7 additions and 3 deletions

View file

@ -46,6 +46,9 @@
extern cycle_t VMCycles[10];
extern int VMCalls[10];
// THe sprite ID to string cast is game specific so let's do it with a callback to remove the dependency and allow easier reuse.
void (*VM_CastSpriteIDToString)(FString* a, unsigned int b) = [](FString* a, unsigned int b) { a->Format("%d", b); };
// intentionally implemented in a different source file to prevent inlining.
#if 0
void ThrowVMException(VMException *x);