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:
Marco Lizza
2015-01-22 16:46:09 +00:00
parent a34eb52d6c
commit 88d7c318ef
4 changed files with 33 additions and 19 deletions
+1 -1
View File
@@ -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
+6
View File
@@ -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;
}