From 4e6e564e14d4f354129d90aaa801ceced4b3b84a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 5 Nov 2020 18:59:21 +0100 Subject: [PATCH] - silenced message about missing function prototypes for exports. This is necessary to later separate the games' script content from each other because there'd be lots of unprototyped functions otherwise. --- source/common/fonts/v_text.cpp | 21 +++++++++++++++++++++ source/common/scripting/vm/vmframe.cpp | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/source/common/fonts/v_text.cpp b/source/common/fonts/v_text.cpp index 59d843496..54dfbf290 100644 --- a/source/common/fonts/v_text.cpp +++ b/source/common/fonts/v_text.cpp @@ -242,6 +242,27 @@ DEFINE_ACTION_FUNCTION(FFont, BreakLines) ACTION_RETURN_OBJECT(Create(broken)); } +DEFINE_ACTION_FUNCTION(FFont, BreakLines2) +{ + PARAM_SELF_STRUCT_PROLOGUE(FFont); + PARAM_STRING(text); + PARAM_INT(maxwidth); + + auto broken = V_BreakLines(self, maxwidth, text, true); + ACTION_RETURN_OBJECT(Create(broken)); +} + +DEFINE_ACTION_FUNCTION(_Hugohaft, BreakLines) +{ + PARAM_SELF_STRUCT_PROLOGUE(FFont); + PARAM_STRING(text); + PARAM_INT(maxwidth); + + auto broken = V_BreakLines(self, maxwidth, text, true); + ACTION_RETURN_OBJECT(Create(broken)); +} + + bool generic_ui; EXTERN_CVAR(String, language) diff --git a/source/common/scripting/vm/vmframe.cpp b/source/common/scripting/vm/vmframe.cpp index bc6b344e5..4b50f9b21 100644 --- a/source/common/scripting/vm/vmframe.cpp +++ b/source/common/scripting/vm/vmframe.cpp @@ -79,8 +79,8 @@ void VMFunction::CreateRegUse() int count = 0; if (!Proto) { - if (RegTypes) return; - Printf(TEXTCOLOR_ORANGE "Function without prototype needs register info manually set: %s\n", PrintableName.GetChars()); + //if (RegTypes) return; + //Printf(TEXTCOLOR_ORANGE "Function without prototype needs register info manually set: %s\n", PrintableName.GetChars()); return; } assert(Proto->isPrototype());