Merge remote-tracking branches 'lethosor/remove-embark' and 'lethosor/revert-401-dfhack-log'

Also update NEWS
develop
lethosor 2015-01-05 16:29:56 -05:00
commit 8f60e0eb01
4 changed files with 5 additions and 55 deletions

@ -10,6 +10,7 @@ DFHack Future
scripts/putontable: added to the readme scripts/putontable: added to the readme
stderr.log: removed excessive debug output on OS X stderr.log: removed excessive debug output on OS X
trackstop: No longer prevents cancelling the removal of a track stop or roller. trackstop: No longer prevents cancelling the removal of a track stop or roller.
Fixed a display issue with PRINT_MODE:TEXT
Fixed a symbol error (MapExtras::BiomeInfo::MAX_LAYERS) when compiling DFHack in Debug mode Fixed a symbol error (MapExtras::BiomeInfo::MAX_LAYERS) when compiling DFHack in Debug mode
New Plugins New Plugins
New Scripts New Scripts
@ -18,6 +19,8 @@ DFHack Future
position: Reports the current date, time, month, and season, plus position: Reports the current date, time, month, and season, plus
some location info. Port/update of position.py some location info. Port/update of position.py
hfs-pit: Digs a hole to hell under the cursor. Replaces needs_porting/hellhole.cpp hfs-pit: Digs a hole to hell under the cursor. Replaces needs_porting/hellhole.cpp
Removed
embark.lua: Obsolete, use `embark-tools`
Misc Improvements Misc Improvements
further work on needs_porting further work on needs_porting

@ -12,6 +12,6 @@ fi
old_tty_settings=$(stty -g) old_tty_settings=$(stty -g)
cd "${PWD}" cd "${PWD}"
DYLD_INSERT_LIBRARIES=./hack/libdfhack.dylib ./dwarfort.exe "$@" 2>&1 | tee dfhack.log DYLD_INSERT_LIBRARIES=./hack/libdfhack.dylib ./dwarfort.exe "$@"
stty "$old_tty_settings" stty "$old_tty_settings"
echo "" echo ""

@ -65,7 +65,7 @@ case "$1" in
ret=$? ret=$?
;; ;;
*) *)
setarch i386 -R env LD_PRELOAD=$PRELOAD_LIB ./libs/Dwarf_Fortress "$@" 2>&1 | tee dfhack.log setarch i386 -R env LD_PRELOAD=$PRELOAD_LIB ./libs/Dwarf_Fortress "$@"
ret=$? ret=$?
;; ;;
esac esac

@ -1,53 +0,0 @@
-- lets you embark anywhere.
helpstring=[[ embark [-t|-d|-e|-h]
-t test if the patch can be applied
-d disable the patch if enabled
-e enable the patch if disabled
-h shows help
]]
args={...}
if args[1]=="-h" then
print(helpstring)
return
end
local ms=require("memscan")
local dfu=require("plugins.dfusion")
local patch
function embark() --windows only?
local seg=ms.get_code_segment()
local idx,off
local patch=dfu.patches.embark_anywhere
if patch~=nil then
return patch
else
idx,off=seg.uint8_t:find_one{0x66, 0x83, 0x7F ,0x1A ,0xFF,0x74,0x04}
if idx then
patch=dfu.BinaryPatch{name="embark_anywhere",pre_data={0x74,0x04},data={0x90,0x90},address=off+5}
return patch
else
qerror("Offset for embark patch not found!")
end
end
end
patch=embark()
if args[1]=="-t" then
if patch:test() and not patch.is_applied then
print("all okay, patch can be applied")
elseif patch.is_applied then
print("patch is currently applied, can be removed")
else
qerror("patch can't be applied")
end
elseif args[1]=="-d" then
if patch.is_applied then
patch:remove()
print("patch removed")
end
elseif args[1]=="-e" then
if not patch.is_applied then
patch:apply()
print("patch applied")
end
else
print(helpstring)
end