feat: add Math library source and integrate into MSVC project and VM initialization
Add wren_math.c and wren_math.h to the MSVC 2013 project files, including both the .vcxproj and .vcxproj.filters. Also fix the indentation of the WREN_COMPUTED_GOTO comment in wren_common.h and correct a conditional guard bug in wren_vm.c where wrenLoadMathLibrary was guarded by WREN_USE_LIB_IO instead of WREN_USE_LIB_MATH.
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@
|
||||
// Defaults to on.
|
||||
#ifndef WREN_COMPUTED_GOTO
|
||||
#ifdef _MSC_VER
|
||||
// No computed gotos in Visual Studio.
|
||||
// No computed gotos in Visual Studio.
|
||||
#define WREN_COMPUTED_GOTO 0
|
||||
#else
|
||||
#define WREN_COMPUTED_GOTO 1
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#if WREN_USE_LIB_IO
|
||||
#include "wren_io.h"
|
||||
#endif
|
||||
#if WREN_USE_LIB_MATH
|
||||
#include "wren_math.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -72,6 +75,9 @@ WrenVM* wrenNewVM(WrenConfiguration* configuration)
|
||||
#if WREN_USE_LIB_IO
|
||||
wrenLoadIOLibrary(vm);
|
||||
#endif
|
||||
#if WREN_USE_LIB_IO
|
||||
wrenLoadMathLibrary(vm);
|
||||
#endif
|
||||
|
||||
return vm;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user