fix mac compiling, fix renderer, fix other minor compiling issues
This commit is contained in:
parent
5807602cc1
commit
01cd146ee9
@ -17,7 +17,6 @@
|
||||
#endif
|
||||
#ifdef MACOSX
|
||||
#include <mach-o/dyld.h>
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#endif
|
||||
|
||||
std::string URLEscape(std::string source)
|
||||
|
@ -3,3 +3,4 @@
|
||||
void EngineProcess();
|
||||
void ClipboardPush(char * text);
|
||||
char * ClipboardPull();
|
||||
int GetModifiers();
|
||||
|
@ -20,6 +20,7 @@
|
||||
void EngineProcess() {}
|
||||
void ClipboardPush(char * text) {}
|
||||
char * ClipboardPull() {}
|
||||
int GetModifiers() { return 0; }
|
||||
|
||||
void readFile(std::string filename, std::vector<char> & storage)
|
||||
{
|
||||
|
@ -20,6 +20,9 @@
|
||||
#ifndef WIN
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef MACOSX
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#endif
|
||||
|
||||
#include "Format.h"
|
||||
#include "Style.h"
|
||||
@ -540,6 +543,11 @@ void EngineProcess()
|
||||
#endif
|
||||
}
|
||||
|
||||
int GetModifiers()
|
||||
{
|
||||
return SDL_GetModState();
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
currentWidth = XRES+BARSIZE;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "game/Tool.h"
|
||||
#include "LuaScriptHelper.h"
|
||||
#include "client/HTTP.h"
|
||||
#include "PowderToy.h"
|
||||
|
||||
//#include "virtualmachine/VirtualMachine.h"
|
||||
#include "pim/Parser.h"
|
||||
@ -43,7 +44,6 @@
|
||||
#ifndef WIN
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "SDL.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@ -1888,7 +1888,7 @@ bool LuaScriptInterface::OnMouseWheel(int x, int y, int d)
|
||||
|
||||
bool LuaScriptInterface::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt)
|
||||
{
|
||||
return luacon_keyevent(key, SDL_GetModState(), LUACON_KDOWN);
|
||||
return luacon_keyevent(key, GetModifiers(), LUACON_KDOWN);
|
||||
}
|
||||
|
||||
bool LuaScriptInterface::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt)
|
||||
|
@ -659,6 +659,7 @@ void Client::Tick()
|
||||
this->messageOfTheDay = messageOfTheDay.Value();
|
||||
notifyMessageOfTheDay();
|
||||
|
||||
#ifndef IGNORE_UPDATES
|
||||
//Check for updates
|
||||
json::Object versions = objDocument["Updates"];
|
||||
|
||||
@ -701,7 +702,6 @@ void Client::Tick()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef IGNORE_UPDATES
|
||||
if(updateAvailable)
|
||||
{
|
||||
notifyUpdateAvailable();
|
||||
|
@ -1218,11 +1218,15 @@ void Renderer::render_parts()
|
||||
{
|
||||
if (elements[t].Graphics)
|
||||
{
|
||||
#ifndef RENDERER
|
||||
if (lua_gr_func[t])
|
||||
{
|
||||
luacon_graphicsReplacement(this, &(sim->parts[i]), nx, ny, &pixel_mode, &cola, &colr, &colg, &colb, &firea, &firer, &fireg, &fireb, i);
|
||||
}
|
||||
else if ((*(elements[t].Graphics))(this, &(sim->parts[i]), nx, ny, &pixel_mode, &cola, &colr, &colg, &colb, &firea, &firer, &fireg, &fireb)) //That's a lot of args, a struct might be better
|
||||
#else
|
||||
if ((*(elements[t].Graphics))(this, &(sim->parts[i]), nx, ny, &pixel_mode, &cola, &colr, &colg, &colb, &firea, &firer, &fireg, &fireb)) //That's a lot of args, a struct might be better
|
||||
#endif
|
||||
{
|
||||
graphicscache[t].isready = 1;
|
||||
graphicscache[t].pixel_mode = pixel_mode;
|
||||
|
Reference in New Issue
Block a user