summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-10-09 15:43:13 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-09 15:43:13 (GMT)
commit249e3dcad3aa62ba09e0b712ff508d94f255a947 (patch)
tree004584e3a72a9e616417edc7a230495f085dec3b /src
parentaf181faeea1437df1e236f9bfc05832e9b1ca03b (diff)
parentb1d3ebacd29f1cd6bb09c9b204d6dae257413159 (diff)
downloadpowder-249e3dcad3aa62ba09e0b712ff508d94f255a947.zip
powder-249e3dcad3aa62ba09e0b712ff508d94f255a947.tar.gz
Merge pull request #195 from Huulivoide/master
Minor fixes needed to build on Linux/64bit.
Diffstat (limited to 'src')
-rw-r--r--src/cat/LuaScriptInterface.cpp6
-rw-r--r--src/pim/Machine.cpp10
-rw-r--r--src/simulation/StructProperty.h1
3 files changed, 11 insertions, 6 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index 39a5add..b9124c5 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -39,6 +39,10 @@
#include "LuaSlider.h"
#include "LuaProgressBar.h"
+#ifdef __unix__
+#include <unistd.h>
+#endif
+
extern "C"
{
#ifdef WIN
@@ -1702,4 +1706,4 @@ std::string LuaScriptInterface::FormatCommand(std::string command)
LuaScriptInterface::~LuaScriptInterface() {
delete legacy;
-} \ No newline at end of file
+}
diff --git a/src/pim/Machine.cpp b/src/pim/Machine.cpp
index aebe093..a954d31 100644
--- a/src/pim/Machine.cpp
+++ b/src/pim/Machine.cpp
@@ -424,20 +424,20 @@ namespace pim
//Load value at base stack + offset into eax
emit("8B 85"); //mov eax [ebp+ram+offset]
- emit((int) (ram - argument.Integer));
+ emit((intptr_t) (ram - argument.Integer));
//Store value in eax onto top of program stack
emit("89 07"); //mov [edi], eax
- emit((int) (ram));
+ emit((intptr_t) (ram));
break;
case Opcode::Store:
//Load value on top of the program stack into eax
emit("8B 07"); //mov eax [edi]
- emit((int) (ram));
+ emit((intptr_t) (ram));
//Load value in eax onto top of program stack
emit("89 85"); //mov [ebp+ram+offset], eax
- emit((int) (ram - argument.Integer));
+ emit((intptr_t) (ram - argument.Integer));
emit("83 C7 04"); //add edi 4
break;
@@ -634,4 +634,4 @@ namespace pim
programCounter = entryPoint;
Run();
}
-} \ No newline at end of file
+}
diff --git a/src/simulation/StructProperty.h b/src/simulation/StructProperty.h
index 8debaca..5c46c7e 100644
--- a/src/simulation/StructProperty.h
+++ b/src/simulation/StructProperty.h
@@ -10,6 +10,7 @@
#define The_Powder_Toy_StructProperty_h
#include <string>
+#include <stdint.h>
struct StructProperty
{