- moved key definitions to their own header.

- moved VM hooks to vmthunks.cpp.
- header cleanup for c_bind.h to avoid including high level game definitions.
This commit is contained in:
Christoph Oelckers 2020-04-11 18:06:52 +02:00
commit d7a9bdc858
5 changed files with 170 additions and 151 deletions

View file

@ -3406,6 +3406,33 @@ DEFINE_ACTION_FUNCTION(DOptionMenuItemCommand, DoCommand)
return 0;
}
DEFINE_ACTION_FUNCTION(_Console, MidPrint)
{
PARAM_PROLOGUE;
PARAM_POINTER(fnt, FFont);
PARAM_STRING(text);
PARAM_BOOL(bold);
const char* txt = text[0] == '$' ? GStrings(&text[1]) : text.GetChars();
C_MidPrint(fnt, txt, bold);
return 0;
}
DEFINE_ACTION_FUNCTION(_Console, HideConsole)
{
C_HideConsole();
return 0;
}
DEFINE_ACTION_FUNCTION(_Console, Printf)
{
PARAM_PROLOGUE;
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
FString s = FStringFormat(VM_ARGS_NAMES);
Printf("%s\n", s.GetChars());
return 0;
}