From ce03b2fa5e003795862d70ff843f09dd42622ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 17 Jul 2016 23:54:12 +0200 Subject: [PATCH] Add openrct2_assert function for C --- src/core/Guard.cpp | 9 +++++++++ src/openrct2.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/core/Guard.cpp b/src/core/Guard.cpp index 4a775b0c2f..316a97c600 100644 --- a/src/core/Guard.cpp +++ b/src/core/Guard.cpp @@ -30,6 +30,15 @@ extern "C" { #include "../openrct2.h" + + void openrct2_assert(bool expression, const char * message, ...) + { + va_list args; + va_start(args, message); + Guard::Assert_VA(expression, message, args); + va_end(args); + } + } namespace Guard diff --git a/src/openrct2.h b/src/openrct2.h index c140013f32..7f2bdb5bcf 100644 --- a/src/openrct2.h +++ b/src/openrct2.h @@ -52,6 +52,7 @@ void openrct2_dispose(); void openrct2_finish(); void openrct2_reset_object_tween_locations(); bool openrct2_setup_rct2_segment(); +void openrct2_assert(bool expression, const char * message, ...); int cmdline_run(const char **argv, int argc);