Merge pull request #195 from Huulivoide/master
Minor fixes needed to build on Linux/64bit.
This commit is contained in:
commit
249e3dcad3
14
SConscript
14
SConscript
@ -122,7 +122,7 @@ else:
|
||||
env.Append(LIBS=['z', 'bz2', 'fftw3f'])
|
||||
|
||||
env.Append(CPPPATH=['src/', 'data/', 'generated/'])
|
||||
env.Append(CCFLAGS=['-w', '-std=c99', '-fkeep-inline-functions'])
|
||||
env.Append(CCFLAGS=['-w', '-std=c++98', '-fkeep-inline-functions'])
|
||||
env.Append(LIBS=['pthread', 'm'])
|
||||
env.Append(CPPDEFINES=["USE_SDL", "LUACONSOLE", "GRAVFFT", "_GNU_SOURCE", "USE_STDINT", "_POSIX_C_SOURCE=200112L"])
|
||||
|
||||
@ -237,8 +237,6 @@ if(GetOption('win')):
|
||||
sources+=Glob("src/*/*.cpp")
|
||||
sources+=Glob("src/simulation/elements/*.cpp")
|
||||
sources+=Glob("src/simulation/tools/*.cpp")
|
||||
sources+=Glob("generated/ToolClasses.cpp")
|
||||
sources+=Glob("generated/ElementClasses.cpp")
|
||||
|
||||
if(GetOption('win')):
|
||||
sources = filter(lambda source: str(source) != 'src/simulation/Gravity.cpp', sources)
|
||||
@ -273,8 +271,12 @@ if(GetOption('win')):
|
||||
envCopy.Append(CCFLAGS=['-mincoming-stack-boundary=2'])
|
||||
sources+=envCopy.Object('src/simulation/Gravity.cpp')
|
||||
|
||||
env.Command(['generated/ElementClasses.cpp', 'generated/ElementClasses.h'], Glob('src/simulation/elements/*.cpp'), "python generator.py elements $TARGETS $SOURCES")
|
||||
env.Command(['generated/ToolClasses.cpp', 'generated/ToolClasses.h'], Glob('src/simulation/tools/*.cpp'), "python generator.py tools $TARGETS $SOURCES")
|
||||
env.Command(['generated/ElementClasses.cpp', 'generated/ElementClasses.h'], Glob('src/simulation/elements/*.cpp'), "python2 generator.py elements $TARGETS $SOURCES")
|
||||
sources+=Glob("generated/ElementClasses.cpp")
|
||||
|
||||
env.Command(['generated/ToolClasses.cpp', 'generated/ToolClasses.h'], Glob('src/simulation/tools/*.cpp'), "python2 generator.py tools $TARGETS $SOURCES")
|
||||
sources+=Glob("generated/ToolClasses.cpp")
|
||||
|
||||
env.Decider('MD5')
|
||||
t=env.Program(target=programName, source=sources)
|
||||
Default(t)
|
||||
Default(t)
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define The_Powder_Toy_StructProperty_h
|
||||
|
||||
#include <string>
|
||||
#include <stdint.h>
|
||||
|
||||
struct StructProperty
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user