Skip to content

Commit

Permalink
working on 0.43.05 osx support
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Pronkin committed Jan 4, 2017
1 parent 2613cbe commit c96bded
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Makefile
@@ -1,4 +1,4 @@
DFHACKVER ?= 0.40.24-r4
DFHACKVER ?= 0.43.05-alpha3

DFVERNUM = `echo $(DFHACKVER) | sed -e s/-.*// -e s/\\\\.//g`

Expand All @@ -25,12 +25,12 @@ INC = -I"$(DH)/library/include" -I"$(DH)/library/proto" -I"$(DH)/depends/protobu
LIB = -L"$(DH)/build/library" -ldfhack -ldfhack-version

CXX ?= c++
CFLAGS = $(INC) -m32 -DLINUX_BUILD -O3
CFLAGS = $(INC) -m64 -DLINUX_BUILD -O3
LDFLAGS = $(LIB) -shared

ifeq ($(shell uname -s), Darwin)
export MACOSX_DEPLOYMENT_TARGET=10.6
CXX = g++-4.5
CXX = g++-4.8
CFLAGS += -std=gnu++0x #-stdlib=libstdc++
CFLAGS += -Wno-tautological-compare
LDFLAGS += -framework OpenGL -mmacosx-version-min=10.6 -undefined dynamic_lookup
Expand Down
14 changes: 7 additions & 7 deletions patches.hpp
Expand Up @@ -796,21 +796,21 @@ static void apply_patch(MemoryPatcher *mp, patchdef &p)
};

#elif defined(__APPLE__)
#define A_LOAD_MULTI_PDIM 0x0120cbb0
#define A_LOAD_MULTI_PDIM 0x10106a9b0

#define A_RENDER_MAP 0x00b9ea70
#define A_RENDER_UPDOWN 0x008f3180
#define A_RENDER_MAP 0x100a7eb10
#define A_RENDER_UPDOWN 0x100815cd0

static patchdef p_display = { 0x0119e101, 5 };
static patchdef p_display = { 0x1010003cb, 5 };

static patchdef p_dwarfmode_render = { 0x004e442a, 5 };
static patchdef p_dwarfmode_render = { 0x100457447, 5 };

static patchdef p_advmode_render[] = {
{ 0x004832b2, 5+3+5 }, { 0x0048396d, 5+3+5 }, { 0x00483d48, 5+3+5 }, { 0x00483dab, 5+3+5 }, { 0x00483e2c, 5+3+5 }
{ 0x100404a31, 5+3+5 }, { 0x100404aca, 5+7+5 }, { 0x10040501a, 5+3+5 }, { 0x10040532b, 5+3+5 }
};

static patchdef p_render_lower_levels = {
0x00e65740, 13, true, { 0x36,0x8b,0x84,0x24,0x14,0x00,0x00,0x00, 0x3e,0xc6,0x00,0x00, 0xC3 }
0x100d075c0, 9, true, { 0x48, 0x8B, 0x44, 0x24, 0x08, 0xC6, 0x00, 0x00, 0xC3 }
};

#else
Expand Down
2 changes: 1 addition & 1 deletion twbt.cpp
Expand Up @@ -282,7 +282,7 @@ static void replace_renderer()
#ifdef WIN32
//p.write((char*)&df::renderer::_identity + 72, zz, 4);
#else
p.write((char*)&df::renderer::_identity + 64, zz, 4);
p.write((char*)&df::renderer::_identity + 128, zz, 4);
#endif

renderer_opengl *oldr = (renderer_opengl*)enabler->renderer;
Expand Down

0 comments on commit c96bded

Please sign in to comment.