diff --git a/CMakeLists.txt b/CMakeLists.txt
index cbe192e78..3d478369e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,282 +1,87 @@
# main project file. use it from a build sub-folder, see COMPILE for details
## some generic CMake magic
-cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
-PROJECT (dfhack)
+cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
+project(dfhack)
SET(CMAKE_MODULE_PATH
${dfhack_SOURCE_DIR}/CMake/Modules
${CMAKE_MODULE_PATH}
)
-if("${dfhack_SOURCE_DIR}" STREQUAL "${dfhack_BINARY_DIR}")
+if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "In-source builds are not allowed.")
endif()
-SET(DFHACK_CONSISTENCY 1)
-
-set(CPACK_PACKAGE_VERSION_MAJOR "0")
-set(CPACK_PACKAGE_VERSION_MINOR "5")
-set(CPACK_PACKAGE_VERSION_PATCH "15")
+set(DFHACK_VERSION_MAJOR "0")
+set(DFHACK_VERSION_MINOR "31")
+set(DFHACK_VERSION_PATCH "25")
set(DFHACK_REVISION "1")
set(DFHACK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION ${DFHACK_VERSION})
-
-set(CPACK_PACKAGE_NAME "dfhack")
-SET(CPACK_PACKAGE_VENDOR "dethware.org")
-SET(CPACK_PACKAGE_CONTACT "peterix@dethware.org")
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Memory hacks for Dwarf Fortress")
-SET(CPACK_PACKAGE_DESCRIPTION
-"DFHack is a Dwarf Fortress memory access library and a set of basic
-tools using this library. The library is a work in progress, so things
-might change as more tools are written for it.
-.
-It is an attempt to unite the various ways tools access DF memory and
-allow for easier development of new tools.")
-
## setting the build type
IF(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
- SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.")
+ SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Release RelWithDebInfo.")
ENDIF()
-## put everything in one big ugly directory to make MSVC and KDevelop debuggers happy
-SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${dfhack_BINARY_DIR}/bin")
-SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${dfhack_BINARY_DIR}/bin")
-SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${dfhack_BINARY_DIR}/bin")
-
+SET(DFHACK_OUTPUT_DIR "${dfhack_BINARY_DIR}/bin" CACHE STRING "Where should be the produced libraries and binaries stored.")
+
+## where to put things during the build (force MSVC to behave)
+SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${DFHACK_OUTPUT_DIR})
+SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${DFHACK_OUTPUT_DIR})
+SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${DFHACK_OUTPUT_DIR})
+SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${DFHACK_OUTPUT_DIR})
+SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL ${DFHACK_OUTPUT_DIR})
+SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL ${DFHACK_OUTPUT_DIR})
+SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${DFHACK_OUTPUT_DIR})
+SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${DFHACK_OUTPUT_DIR})
+SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${DFHACK_OUTPUT_DIR})
+
+## where to install things (after the build is done, classic 'make install' or package structure)
+# the dfhack libraries will be installed here:
+SET(DFHACK_LIBRARY_DESTINATION .)
+# the dfhack tools will be installed here:
+SET(DFHACK_BINARY_DESTINATION .)
+# Memory.xml goes here:
+SET(DFHACK_DATA_DESTINATION .)
+# Includes go here:
+SET(DFHACK_INCLUDES_DESTINATION dev/include)
+# the Windows .lib files go here:
IF(WIN32)
- set (DFHACK_INST_DEFAULT "portable")
-ELSE()
- set (DFHACK_INST_DEFAULT "linux")
-ENDIF()
-
-SET( DFHACK_INSTALL ${DFHACK_INST_DEFAULT} CACHE STRING
-"Choose the install type:
-'portable' for a portable zip or tar.gz package (windows default)
-'linux' for generic packaging and system installs on linux (linux default)
-'ubuntu-10.10' for ubuntu maverick package.")
-
-IF(${DFHACK_INSTALL} STREQUAL "portable")
- # the dfhack libraries will be installed here:
- SET(DFHACK_LIBRARY_DESTINATION .)
- # the dfhack tools will be installed here:
- SET(DFHACK_BINARY_DESTINATION .)
- # Memory.xml goes here:
- SET(DFHACK_DATA_DESTINATION .)
- # Includes go here:
- SET(DFHACK_INCLUDES_DESTINATION dev/include)
- # the Windows .lib files go here:
- IF(WIN32)
- SET(DFHACK_DEVLIB_DESTINATION dev)
- SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
- ENDIF()
- IF(UNIX)
- SET(CMAKE_INSTALL_RPATH "$ORIGIN")
- ENDIF()
- # documentation goes here:
- SET(DFHACK_USERDOC_DESTINATION .)
- SET(DFHACK_DEVDOC_DESTINATION dev)
- SET(DFHACK_DOXYGEN_DESTINATION dev/doxygen)
-ENDIF()
-
-# generic linux package in a .tar.gz
-IF(${DFHACK_INSTALL} STREQUAL "linux")
- if(WIN32)
- MESSAGE(FATAL_ERROR "WTF are you doing?")
- endif()
- # set RPATH to always point at the dfhack lib using relative path.
- SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib/")
- # the dfhack libraries will be installed here:
- SET(DFHACK_LIBRARY_DESTINATION lib)
- # the dfhack tools will be installed here:
- SET(DFHACK_BINARY_DESTINATION bin)
- # Memory.xml goes here:
- SET(DFHACK_DATA_DESTINATION share/dfhack)
- # Includes go here:
- SET(DFHACK_INCLUDES_DESTINATION include)
- # documentation goes here:
- SET(DFHACK_USERDOC_DESTINATION share/dfhack/doc)
- SET(DFHACK_DEVDOC_DESTINATION share/dfhack/doc)
- SET(DFHACK_DOXYGEN_DESTINATION share/dfhack/doc/doxygen)
-ENDIF()
-
-IF(${DFHACK_INSTALL} STREQUAL "ubuntu-10.10" OR ${DFHACK_INSTALL} STREQUAL "debian")
- if(WIN32)
- MESSAGE(FATAL_ERROR "WTF are you doing?")
- endif()
- # set RPATH to always point at the dfhack lib using relative path.
- SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib/")
- # the dfhack libraries will be installed here:
- SET(DFHACK_LIBRARY_DESTINATION usr/lib)
- # the dfhack tools will be installed here:
- SET(DFHACK_BINARY_DESTINATION usr/bin)
- # Memory.xml goes here:
- SET(DFHACK_DATA_DESTINATION usr/share/dfhack)
- # Includes go here:
- SET(DFHACK_INCLUDES_DESTINATION usr/include)
- # documentation goes here:
- SET(DFHACK_USERDOC_DESTINATION usr/share/dfhack/doc)
- SET(DFHACK_DEVDOC_DESTINATION usr/share/dfhack/doc)
- SET(DFHACK_DOXYGEN_DESTINATION usr/share/dfhack/doc/doxygen)
- INSTALL(FILES
- "${CMAKE_CURRENT_SOURCE_DIR}/package/${DFHACK_INSTALL}/99-dfhack.conf"
- DESTINATION etc/sysctl.d)
-ENDIF()
-
-
-
-## some options for the user/developer to play with
-OPTION(BUILD_DFHACK_LIBRARY "Build the library. Needed for all the tools." ON)
-OPTION(BUILD_DFHACK_C_BINDINGS "Build the C portion of the library." ON)
-OPTION(BUILD_DFHACK_PYTHON_BINDINGS "Build/install the python wrapper." ON)
-IF(WIN32)
- OPTION(BUILD_DFHACK_DEVEL "Build the developer stuff." OFF)
-ENDIF()
-IF(UNIX)
- OPTION(BUILD_DFHACK_DEVEL "Build the developer stuff." ON)
+ SET(DFHACK_DEVLIB_DESTINATION dev)
+ SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
ENDIF()
-OPTION(BUILD_DFHACK_DOXYGEN "Create doxygen documentation for developers" ON)
-OPTION(BUILD_DFHACK_SUPPORTED "Build the supported tools." ON)
-OPTION(BUILD_DFHACK_EXAMPLES "Build example tools" OFF)
-OPTION(BUILD_DFHACK_PLAYGROUND "Build tools from the playground folder" OFF)
-
-include_directories (${dfhack_SOURCE_DIR}/library/include/)
-include_directories (${dfhack_SOURCE_DIR}/library/shm/)
-include_directories (${dfhack_SOURCE_DIR}/library/depends/argstream/)
-include_directories (${dfhack_SOURCE_DIR}/library/depends/xgetopt/)
-
-# handle curses library bull**** on multiple platforms.
IF(UNIX)
- find_package(Curses QUIET)
- if(Curses_FOUND)
- add_library(curses SHARED IMPORTED)
- set_property(TARGET curses PROPERTY IMPORTED_LOCATION ${Curses_LIBRARY})
- include_directories (${Curses_INCLUDE_PATH})
- endif()
-ELSE()
- add_library(curses SHARED IMPORTED)
- set_property(TARGET curses PROPERTY IMPORTED_LOCATION ${dfhack_SOURCE_DIR}/pdcurses/pdcurses.dll)
- set_property(TARGET curses PROPERTY IMPORTED_IMPLIB ${dfhack_SOURCE_DIR}/pdcurses/pdcurses.lib)
- include_directories (${dfhack_SOURCE_DIR}/pdcurses)
- add_custom_target( curses-copy
- COMMAND "${CMAKE_COMMAND}" -E make_directory ${dfhack_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/
- COMMAND "${CMAKE_COMMAND}" -E copy "${dfhack_SOURCE_DIR}/pdcurses/pdcurses.dll" ${dfhack_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/
- DEPENDS "${dfhack_SOURCE_DIR}/pdcurses/pdcurses.dll")
- SET(Curses_FOUND TRUE)
- INSTALL(FILES "${dfhack_SOURCE_DIR}/pdcurses/pdcurses.dll" DESTINATION ${DFHACK_BINARY_DESTINATION})
+ SET(CMAKE_INSTALL_RPATH "$ORIGIN")
ENDIF()
+# documentation goes here:
+SET(DFHACK_USERDOC_DESTINATION .)
+SET(DFHACK_DEVDOC_DESTINATION dev)
+SET(DFHACK_DOXYGEN_DESTINATION dev/doxygen)
-# macro to save on typing in the tool subdirs
-# builds a tool, links it to the dfhack lib and makes sure the dependency
-# LOCAL_DEPNAME is built first, in case there is one
-MACRO(DFHACK_TOOL TOOL_NAME TOOL_SOURCES)
- ADD_EXECUTABLE(${TOOL_NAME} ${TOOL_SOURCES})
- TARGET_LINK_LIBRARIES(${TOOL_NAME} dfhack)
- if(DEFINED LOCAL_DEPNAME)
- ADD_DEPENDENCIES(${TOOL_NAME} ${LOCAL_DEPNAME})
- endif()
- install(TARGETS
- ${TOOL_NAME}
- RUNTIME DESTINATION ${DFHACK_BINARY_DESTINATION})
-ENDMACRO()
-
-# same as above builds a curses tool instead of plain terminal one.
-MACRO(DFHACK_CURSES_TOOL TOOL_NAME TOOL_SOURCES)
- IF(Curses_FOUND)
- ADD_EXECUTABLE(${TOOL_NAME} ${TOOL_SOURCES})
- TARGET_LINK_LIBRARIES(${TOOL_NAME} dfhack curses)
- if(DEFINED LOCAL_DEPNAME)
- ADD_DEPENDENCIES(${TOOL_NAME} ${LOCAL_DEPNAME})
- endif()
- if(WIN32)
- ADD_DEPENDENCIES(${TOOL_NAME} curses-copy)
- ENDIF()
- install(TARGETS
- ${TOOL_NAME}
- RUNTIME DESTINATION ${DFHACK_BINARY_DESTINATION})
- ELSE()
- MESSAGE(STATUS "Wide-character ncurses library not found - " ${TOOL_NAME} "can't be built")
- ENDIF()
-ENDMACRO()
+## some options for the user/developer to play with
+OPTION(BUILD_LIBRARY "Build the library that goes into DF." ON)
+OPTION(BUILD_PLUGINS "Build the library that goes into DF." ON)
-IF(BUILD_DFHACK_LIBRARY)
-
+IF(BUILD_LIBRARY)
add_subdirectory (library)
-
- IF(BUILD_DFHACK_PYTHON_BINDINGS)
- MESSAGE("TODO: write CMakeLists.txt for the python things.")
- ENDIF()
- IF(BUILD_DFHACK_SUPPORTED)
- add_subdirectory (tools/supported)
- ENDIF()
-
- IF(BUILD_DFHACK_EXAMPLES)
- add_subdirectory (tools/examples)
- ENDIF()
-
- IF(BUILD_DFHACK_PLAYGROUND)
- add_subdirectory (tools/playground)
- ENDIF()
-
## install the default documentation files
install(FILES LICENSE Readme.html DESTINATION ${DFHACK_USERDOC_DESTINATION})
endif()
-IF(BUILD_DFHACK_DOXYGEN AND BUILD_DFHACK_DEVEL)
- add_subdirectory (doc)
+# Packaging with CPack!
+IF(UNIX)
+ SET(CPACK_GENERATOR "TGZ")
ENDIF()
-
-IF(${DFHACK_INSTALL} STREQUAL "portable")
- IF(UNIX)
- SET(CPACK_GENERATOR "TGZ")
- ENDIF()
- IF(WIN32)
- SET(CPACK_GENERATOR "ZIP")
- # this includes the MSVC C++ DLLs in the package. Doesn't work with Express versions in general.
- INCLUDE(InstallRequiredSystemLibraries)
- ENDIF()
- set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${DFHACK_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
- INCLUDE(CPack)
+IF(WIN32)
+ SET(CPACK_GENERATOR "ZIP")
+ # this includes the MSVC C++ DLLs in the package. Doesn't work with Express versions in general.
+ # we should be fine with the stuff DF already has packaged... so, commenting out
+ # INCLUDE(InstallRequiredSystemLibraries)
ENDIF()
+set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${DFHACK_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
+INCLUDE(CPack)
-#-------------------------------------------------------------------------------
-# Figure out debian architecture
-#-------------------------------------------------------------------------------
-
-FUNCTION(GET_DEBIAN_ARCHITECTURE arch)
- SET(dpkgarch)
-
- FIND_PROGRAM(DPKG_CMD dpkg)
- IF(NOT DPKG_CMD)
- MESSAGE(STATUS "Can not find dpkg in your path, default to i386.")
- SET(${arch} i386 PARENT_SCOPE)
- ENDIF()
- EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture
- OUTPUT_VARIABLE dpkgarch
- OUTPUT_STRIP_TRAILING_WHITESPACE )
- SET(${arch} ${dpkgarch} PARENT_SCOPE)
-ENDFUNCTION()
-
-IF(${DFHACK_INSTALL} STREQUAL "ubuntu-10.10" OR ${DFHACK_INSTALL} STREQUAL "debian")
- SET(CPACK_GENERATOR "DEB")
- #wtf, wtf, wtf. force them to be empty
- set(CMAKE_INSTALL_PREFIX "" FORCE)
- set(CPACK_INSTALL_PREFIX "")
- SET(CPACK_PACKAGING_INSTALL_PREFIX "")
- set(CPACK_SET_DESTDIR true)
-
- SET(CPACK_DEBIAN_PACKAGE_SECTION "Games") # yep. magma.
- SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") # very.
- SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) # find deps automatically! hopefully... maybe...
- SET(INSTSCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/package/${DFHACK_INSTALL}")
- SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${INSTSCRIPT}/postinst;${INSTSCRIPT}/preinst;${INSTSCRIPT}/postrm")
-
- GET_DEBIAN_ARCHITECTURE(PKG_ARCHITECTURE)
-
- set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${DFHACK_VERSION}-${DFHACK_REVISION}_${DFHACK_INSTALL}-${PKG_ARCHITECTURE}")
- INCLUDE(CPack)
-ENDIF()
diff --git a/Memory-40d.xml b/Memory-40d.xml
deleted file mode 100644
index b6d5ce1f5..000000000
--- a/Memory-40d.xml
+++ /dev/null
@@ -1,2129 +0,0 @@
-
-
-
-
-
-
-
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
- 201
- 202
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 0
- 66
- 11
- 10
- 13
- 12
- 14
- 15
- 16
- 20
- 38
- 19
- 41
- 39
- 43
- 42
- 40
- 44
- 45
- 48
- 27
- 49
- 21
- 47
- 26
- 46
- 50
- 23
- 18
- 30
- 32
- 71
- 33
- 34
- 70
- 31
- 28
- 69
- 25
- 22
- 29
- 72
- 35
- 36
- 37
- 67
- 73
- 64
- 65
- 17
- 8
- 2
- 6
- 4
- 1
- 5
- 7
- 9
- 3
- 24
- 51
- 52
- 53
- 54
- 55
- 57
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .,:rsr,
- :2;,;r2A@@5
- @2::s5A#@@@ @r. .
- sd;:riXA#@@ :@@@Gir;;AS9
- Bs::sS3A#@2 @@#AhXirsS#;
- iHrLr5d#@@@ .@#95sr;;rie
- i*' `*@3 @@A2sr;:;r#5
- :..:rll: @@A5sr::r3@
- @Hr;iZ#@@@@ `:rr;;;;:
- S@r.;i2#@@@ @s. ..
- @2::ri2A@@# B@G2ir:...5i
- :@r,r3X##@@ @G5sr:..,:A
- .@Ar;;rSB@@# H#2sr;,..,is
- .' `* ,@ASs;:..,:B
- ;rr;:,..,:.
- `'''
- W I N D O W S
- and
- W I N E
-
-
- 0x47b6fac2
- 48c831b6f3950913b8e1aeada563d2db
- 0x0
- 0x4
- 0x014639f4
- 0x01463288
- 0x01463388
- 0x00c7bc00
- 0x01287d14
- 0x00941288
- 0x01287a9c
- 0x01463358
- 0x014a6994
- 0x014a4eac
- 0x014a6834
- 0xffffffff
- 0x8b010127
- 0x014a4edc
- 0x014a4ee0
- 0x014a4ee4
- 0x014a6680
- 0x014a671c
- 0x014a69b4
- 0x01467b78
- 0x01295d58
- 0x01284184
- 0x00941288
- 0x00c2358c
- 0x00c68350
- 0x014a64dc
- 0x014a4ec4
- 0x014a4ec8
- 0x014a4ecc
-
- 0x08
-
- 0x08
- 0x2C
- 0x0062
- 0x0264
- 0x0664
- 0x1D64
-
- 0x0
- 0x1C
- 0x38
- 0x1C
-
- 0x00
- 0x6c
- 0x88
- 0x8C
- 0x94
- 0xE4
- 0xE8
- 0xF2
- 0xF4
- 0x158
- 0x1F8
- 0x1FC
- 0x228
- 0x2F8
- 0x2AC
- 0x328
- 0x32C
- 0x330
- 0x3CC
- 0x438
- 0x43C
- 0x440
- 0x444
- 0x454
- 0x474
- 0x520
- 0x5D0
-
- 0x70
-
- 0x84
- 0x86
- 0x684
- 0x6B4
-
- 0x5C
- 0x58
-
- 0x4
-
- 0x10
-
- 0x84
- 0x60
- 0x08
- 0x2C
- 0x0062
- 0x0264
- 0x0664
- 0x1D64
- 0x3C
- 0x2
- 0x4
- 0x8
- 0x24
- 0x1C
- 0x20
- 0x00
- 0x7a
- 0xD8
- 0x68
- 0x24
- 0x1C
- 0x28
- 0x24
- 0x24
- 0x24
- 0x5C
- 0x94
- 0xB0
-
-
- 0x47c12f36
- 8bd90fb6db8388f129fde224a35459de
- 0x01463bec
- 0x01463480
- 0x01463580
- 0x00c7bc04
- 0x01287d14
- 0x0094128c
- 0x01287a9c
- 0x01463550
- 0x014a6c60
- 0x014a50a4
- 0x014a6b00
- 0xffffffff
- 0x8b010127
- 0x014a50d4
- 0x014a50d8
- 0x014a50dc
- 0x014a694c
- 0x014a69e8
- 0x014a6c80
- 0x01467d70
- 0x01295d58
- 0x01284184
- 0x00c3fb40
- 0x00c23594
- 0x00c68354
- 0x014a66d4
- 0x014a50bc
- 0x014a50c0
- 0x014a50c4
-
-
- 0x47c29583
- 9147b5e922a30873fd1a742b1dea1724
- 0xffffffff
- 0x8b010127
-
-
- 0x487b4e8b
- 4b3857a05590b9d9488900e575079e9d
- 0x01512b70
- 0x014feb80
- 0x01512504
- 0x00d16c20
- 0x01322d58
- 0x009d6284
- 0x01322adc
- 0x014fec50
- 0x01555f88
- 0x01554028
- 0x01555e28
- 0xffffffff
- 0x8b010131
- 0x01554058
- 0x0155405c
- 0x01554060
- 0x01555ce8
- 0x01555c6c
- 0x01555fa8
- 0x01516cf4
- 0x01330d98
- 0x0131f1b4
- 0x00cd5398
- 0x00cb8dec
- 0x00d03370
- 0x01555658
- 0x01554040
- 0x01554044
- 0x01554048
-
-
- 0x487c9338
- 52155dea390c2080fc16e4bbeb077164
- 0xffffffff
- 0x8b010131
-
-
- 0x487f2f30
- 8f8cf06b1cd5ea102881a7cced767d4f
- 0x01513b90
- 0x014ffba0
- 0x01513524
- 0x00d17c44
- 0x01323d78
- 0x009d7284
- 0xffffffff
-
- 0x014ffc70
- 0x01556fa8
- 0x01555048
- 0x01556e48
- 0xffffffff
-
- 0x8b010131
- 0x01555078
- 0x0155507c
- 0x01555080
- 0x01556d08
- 0x01556c8c
- 0x01556fc8
- 0x01517d14
- 0x01331db8
- 0x013201d4
- 0x00cd63bc
- 0x00cb9dec
- 0x00d04394
- 0x01556678
- 0x01555060
- 0x01555064
- 0x01555068
-
-
- 0x48873bc3
- 8614a01593baef6e4a341e2f1a92ba06
- 0x0151ffb8
- 0x0150bfc8
- 0x0151f94c
- 0x00d23c4c
- 0x0132fdb0
- 0x009e3284
- 0x0132fb34
- 0x0150c098
- 0x015635cc
- 0x01561470
- 0x0156346c
- 0x0132faac
- 0x8b010131
- 0x015614a0
- 0x015614a4
- 0x015614a8
- 0x01563154
- 0x015630d8
- 0x015635ec
- 0x0152413c
- 0x0133ddf0
- 0x0132c1dc
- 0x00ce23c4
- 0x00cc5df4
- 0x00d1039c
- 0x01562aa0
- 0x01561488
- 0x0156148c
- 0x01561490
-
-
- 0x4888672c
- 32f68422f5b4d938549eed0565bcfb92
-
-
- 0x489d8c7f
- 33db0401081058fb54252210bf371344
- 0x01576468
- 0x01562478
- 0x01575dfc
- 0x00d7a0fc
- 0x01386260
- 0x009ef294
- 0x01385fe4
- 0x01562548
- 0x015b9a7c
- 0x015b7920
- 0x015b991c
- 0x01385f5c
- 0x5f010137
- 0x015b7950
- 0x015b7954
- 0x015b7958
- 0x015b9604
- 0x015b9588
- 0x015b9a9c
- 0x0157a5ec
- 0x013942a0
- 0x0138268c
- 0x00d387fc
- 0x00d66870
- 0x00d6684c
- 0x015b8f50
- 0x015b7938
- 0x015b793c
- 0x015b7940
-
-
- 0x48a9727f
- 441c76f45cfffc6abc6548e41c7e2218
- 0x015828a8
- 0x0156e8b8
- 0x0158223c
- 0x00d860fc
- 0x01392268
- 0x009fb294
- 0x01391fc0
- 0x0156e988
- 0x015c5ecc
- 0x015c3d60
- 0x015c5d6c
- 0x01391f64
- 0x5f010138
- 0x015c3d90
- 0x015c3d94
- 0x015c3d98
- 0x015c5a54
- 0x015c59c8
- 0x015c5eec
- 0x01586a2c
- 0x013a02a8
- 0x0138e694
- 0x00d447fc
- 0x00d72870
- 0x00d7284c
- 0x015c5390
- 0x015c3d78
- 0x015c3d7c
- 0x015c3d80
-
-
- 0x48ad547a
- 65b4fa339d4081e934c1297d2a22234a
-
-
- 0x48ad802b
- 15e95727019e76aa653538618c7e0cfd
-
-
- 0x48c330df
- 2c686c26307dcccd7c36cc79737ebe4f
- 0x015838a0
- 0x0156f8b0
- 0x01583234
- 0x00D870F4
- 0x01393260
- 0x009fc294
- 0x1583234
- 0x01392fb8
- 0x0156f980
- 0x015c6ed0
- 0x015c4d58
- 0x015c6d70
- 0x01392f5c
- 0x0138147f
- 0x015c4d88
- 0x015c4d8c
- 0x015c4d90
- 0x015c6a58
- 0x015c69cc
- 0x015c6ef0
- 0x01587a24
- 0x013a12a0
- 0x0138f68c
- 0x00d457f4
- 0x00d73868
- 0x00d73844
- 0x015c6388
- 0x015c4d70
- 0x015c4d74
- 0x015c4d78
-
-
-
- 0x4953556c
- b1a8ca1f91734eb492b7f54f6823cddb
- -0x8
- 0x4
- 0x014d1db0
- 0x014bda18
- 0x014D141C
- 0x00cd4c3c
- 0x0165b5a8
- 0x0094b27c
- 0x165b410
- 0x012e101c
- 0x014d14f8
- 0x01517678
- 0x015152f8
- 0x01517468
- 0x012e0fe4
- 0x012cefbf
- 0x01515330
- 0x01515334
- 0x01515338
- 0x015170f8
- 0x0151702c
- 0x015176a8
- 0x014d7f84
- 0x012ef340
- 0x0165a34c
- 0x00c9333c
- 0x00cc13b0
- 0x00cc138c
- 0x01516930
- 0x01515318
- 0x0151531c
- 0x01515320
- 0x54
-
- 0x0
- 0x1C
- 0x38
- 0x1C
-
-
- 0xFC
- 0x100
- 0x10A
- 0x10C
- 0x198
- 0x238
- 0x23C
- 0x268
- 0x2F8
- 0x314
- 0x3C0
- 0x3C4
- 0x3C8
- 0x484
- 0x4F0
- 0x4F4
- 0x4F8
- 0x504
- 0x51C
- 0x544
- 0x610
- 0x700
-
- 0x70
-
- 0x10
- 0x2C
- 0x0082
- 0x0284
- 0x0684
- 0x1D84
- 0x84
- 0x86
- 0x75C
- 0x79C
-
- 0x64
- 0x60
-
- 0xC
- 0x2
- 0x4
- 0x8
- 0x24
- 0x1C
- 0x20
- 0x2C
- 0x0
- 0x7a
- 0x100
- 0x68
- 0x24
-
- 0x18
- 0x1C
- 0x28
- 0x24
- 0x24
- 0x24
- 0x5C
- 0x94
- 0xB0
-
-
-
-
-
-
-
-
-
- 0x4957716f
- 9b6da355562a4cdd345ea3046290499b
- 0x00cd6c3c
- 0x0094d27c
- 0x012d0fbf
- 0x00c9533c
- 0x00cc33b0
- 0x00cc338c
-
-
- 0x4957a0a2
- b77759db7a6dd787bf98953fc5749d81
-
-
- 0x495991c3
- a0792b81e5b8ec1dbdd627643e93b40d
- 0xcd8c34
- 0x0094f27c
- 0x012d2fbb
- 0x00c97334
- 0x00cc53a8
- 0x00cc5384
-
-
- 0x495cafd2
- d09e88a32fe57de5973f78ef213271b6
- 0xcefc68
- 0x009662a4
- 0x012e9fef
- 0x00cae368
- 0x00cdc3dc
- 0x00cdc3b8
-
-
- 0x495fcfef
- 8e8e2a83d421e356a8047dc8830a7426
- 0xcefc68
- 0x009662a4
- 0x012e9fef
- 0x00cae368
- 0x00cdc3dc
- 0x00cdc3b8
-
-
- 0x4963c928
- 32253bee114dd25ebbaa50d90b5c0a2a
-
-
- 0x4967c2e0
- aea5a207b8b1cda942502f97a429f6c3
-
-
- 0x49c59b94
- 193193d8624f2f3f6d9d556fab09b122
- 0x0151bd00
- 0x01507968
- 0x0151b36c
- 0x00d20ed8
- 0x016a54f8
- 0x009652a4
- 0x16a5360
- 0x0132e574
- 0x0151b448
- 0x015615c8
- 0x0155f248
- 0x015613b8
- 0x0132e53c
- 0x0131b25f
- 0x0155f280
- 0x0155f284
- 0x0155f288
- 0x01561048
- 0x01560f7c
- 0x015615f8
- 0x01521ed4
- 0x0133c898
- 0x016a429c
- 0x00cdf5a0
- 0x00d0d64c
- 0x00d0d628
- 0x01560880
- 0x0155f268
- 0x0155f26c
- 0x0155f270
-
-
- 0x49c82d3f
- 6f81231b845e9c9dc29aaf57705ccc7c
-
-
- 0x4a3ccb7f
- 6ea1de36af8e1666bd6478736e298c4c
- 0x015b7750
- 0x015a33b8
- 0x015b6dbc
- 0x00ddaed8
- 0x0095f410
- 0x0095f2b4
- 0x1740e60
- 0x013e8574
- 0x015b6e98
- 0x015fd04c
- 0x015faccc
- 0x015fce3c
- 0x013e853c
- 0x013d525f
- 0x015fad04
- 0x015fad08
- 0x015fad0c
- 0x015fcacc
- 0x015fca00
- 0x015fd07c
- 0x015bd924
- 0x015b6dc4
- 0x0173fde0
- 0x00d995a0
- 0x00dc764c
- 0x00dc7628
- 0x015fc304
- 0x015facec
- 0x015facf0
- 0x015facf4
-
-
- 0x4a51c26e
- 04a8d8ce311d8ac75e4241bef68d3147
- 0x00ddff38
- 0x00964430
- 0x009642b4
- 0x013da2bf
- 0x00d9e600
- 0x00dcc6ac
- 0x00dcc688
-
-
- 0x4a8623d2
- 781a2e51be4056a7320108f8f0df8a13
- 0x00de1f44
- 0x00966430
- 0x009662b4
- 0x013dc2c7
- 0x00da060c
- 0x00dce6b8
- 0x00dce694
-
-
- 0x4a9a6090
- 12cc4a3dbb6e6dfd7bc7aee458b9471a
- 0x015be808
- 0x015aa470
- 0x015bde74
- 0x00de1f54
- 0x00966430
- 0x009662b4
- 0x1747f20
- 0x013ef62c
- 0x015bdf50
- 0x01604104
- 0x01601d84
- 0x01603ef4
- 0x013ef5f4
- 0x013dc2eb
- 0x01601dbc
- 0x01601dc0
- 0x01601dc4
- 0x01603b84
- 0x01603ab8
- 0x01604134
- 0x015c49dc
- 0x015bde7c
- 0x01746e98
- 0x00da061c
- 0x00dce6c8
- 0x00dce6a4
- 0x016033bc
- 0x01601da4
- 0x01601da8
- 0x01601dac
-
-
- 0x4a9b1a72
- 59ab29021aca9f3c66b1ab102fb3ceea
-
-
- 0x4b6b7879
- de66405f54d98297303d439b3b7aa30e
- 0x015f3260
- 0x015deec8
- 0x015f28cc
- 0x00e16924
- 0x0099ae08
- 0x0099ac88
- 0x177c978
- 0x014240dc
- 0x015f29a8
- 0x01638b5c
- 0x016367dc
- 0x0163894c
- 0x014240a4
- 0x01410cc1
- 0x01636814
- 0x01636818
- 0x0163681c
- 0x016385dc
- 0x01638510
- 0x01638b8c
- 0x015f9434
- 0x014243c4
- 0x0177b8f0
- 0x00dd4fec
- 0x00e03098
- 0x00e03074
- 0x01637e14
- 0x016367fc
- 0x01636800
- 0x01636804
- 0x0177c978
-
-
-
-
- 0x4b81b00d
- 5cdc6f4804809f4d5cacdb66785e8cda
-
- 0x00df2ebc
- 0x00977438
- 0x009772b8
- 0x014ad278
- 0x00db1584
- 0x00ddf630
- 0x00ddf60c
-
-
- 0x4b90268a
- 13640a273d90af39425b798ae9823757
- 0x01512898
- 0x014fe500
- 0x01511f04
- 0x00d35b68
- 0x016ac1a0
- 0x0097a2b8
- 0x169bfb0
- 0x01343714
- 0x01511fe0
- 0x01558194
- 0x01555e14
- 0x01557f84
- 0x013436dc
- 0x0132ff1e
- 0x01555e4c
- 0x01555e50
- 0x01555e54
- 0x01557c14
- 0x01557b48
- 0x015581c4
- 0x01518a6c
- 0x013439fc
- 0x0169af28
- 0x00cf4230
- 0x00d222dc
- 0x00d222b8
- 0x0155744c
- 0x01555e34
- 0x01555e38
- 0x01555e3c
-
-
- 0x4B918BB9
- af29004e1763bb3460faa11907c3ac90
-
- .-"""-.
- ' \
- |,. ,-. |
- |()L( ()| |
- |,' `".| |
- |.___.',| `
- .j `--"' ` `.
- / ' ' \
- / / ` `.
- / / ` .
- / / l |
- . , L I N U X | |
- ,"`. .| |
- _.' ``. | `..-'l
- | `.`, | `.
- | `. __.j )
- |__ |--""___| ,-'
- `"--...,+"""" `._,.-'
-
-
-
- 7a0859795e972574e80fa3cebc9fcf85
- 0x0
- 0x0
- 0x093154e0
- 0x093016b8
- 0x09355940
- 0x09314ffc
- 0x09301560
- 0x08859fc0
- 0x08cfa060
- 0x0930140c
- 0x09356fd0
- 0x09314ffc
- 0x09355964
- 0x09357808
- 0x093013e4
- 0x092f0580
- 0x0935596c
- 0x09355970
- 0x09355974
- 0x0935754c
- 0x093574e0
- 0x09357928
- 0x09318630
- 0x08b36c80
- 0x09355968
- 0x08b36c84
- 0x08cfa978
- 0x08cfa97c
- 0x09356f6c
- 0x09355954
- 0x09355958
- 0x0935595c
- 0x1C
-
- 0x0
- 0x4
- 0x8
- 0x4
-
- 0x08
-
- 0x00
- 0x4C
- 0x44
- 0x90
- 0x94
- 0x003c
- 0x0040
- 0x009E
- 0x00A0
- 0x00F0
- 0x160
- 0x164
- 0x190
- 0x02F8
- 0x0200
- 0x264
- 0x268
- 0x26C
- 0x02F8
- 0x0334
- 0x0338
- 0x033C
- 0x0340
- 0x034C
- 0x0364
- 0x0400
- 0x0490
-
- 0x40
-
- 0x08
- 0x2C
- 0x0052
- 0x0254
- 0x0654
- 0x1D54
-
- 0x54
- 0x56
- 0x5A4
- 0x5C8
-
- 0x58
- 0x54
-
- 0x4
-
- 0xC
- 0x24
- 0x18
- 0x2
- 0x4
- 0x8
- 0xC
- 0x4
- 0x8
- 0x14
- 0x00
- 0x4a
- 0x94
- 0x50
- 0x0C
-
- 0x20
-
- 0xC
- 0x4
- 0x10
- 0xC
- 0xC
- 0xC
- 0x14
- 0x1C
- 0x20
-
-
-
-
-
-
-
-
- 51c73ff46b2688aafaee0204efe91a94
- 0x09315f00
- 0x093020d8
- 0x09356360
- 0x09315a1c
- 0x09301f80
- 0x0885a9e4
- 0x08cfaa80
- 0x09301e2c
- 0x093579f0
- 0x09315a1c
- 0x09356384
- 0x09358228
- 0x09301e04
- 0x092f0fa0
- 0x0935638c
- 0x09356390
- 0x09356394
- 0x09357f6c
- 0x09357f00
- 0x09358348
- 0x09319050
- 0x08b376a0
- 0x09356388
- 0x08b376a4
- 0x08cfb398
- 0x08cfb39c
- 0x0935798c
- 0x09356374
- 0x09356378
- 0x0935637c
-
-
- c1eb408868c80fd1c726d2a917cd1b9a
- 0x0885ad54
-
-
- 59d497bfc3a523f0f40f34283ad59796
- 0x0885bbf0
-
-
- f756194db073f05b98fc6ce872c8757d
- 0x09333e00
- 0x0931ffd8
- 0x09374260
- 0x0933391c
- 0x0931fe80
- 0x088788e4
- 0x08d18980
- 0x0931fd2c
- 0x093758f0
- 0x0933391c
- 0x09374284
- 0x09376128
- 0x0931fd04
- 0x0930eea0
- 0x0937428c
- 0x09374290
- 0x09374294
- 0x09375e6c
- 0x09375e00
- 0x09376248
- 0x09336f50
- 0x08b555a0
- 0x09374288
- 0x08b555a4
- 0x08d19298
- 0x08d1929c
- 0x0937588c
- 0x09374274
- 0x09374278
- 0x0937427c
-
-
- b004b3876193633875956af752663f26
-
-
- c8616fc74d79b3c8c40bbc1182fbd61c
- 0x088786a0
-
-
- 992afd73855e787860277f53d18afcbb
- 0x08877630
-
-
- cba6354000ec54865a161627605c3837
- 0x092bf340
- 0x092ab518
- 0x092bee5c
- 0x0929a3c8
- 0x092ab3c0
- 0x088073d4
- 0x08ca3eb8
- 0x092ab26c
- 0x092beecc
- 0x09301770
- 0x092ff7a0
- 0x09301668
- 0x092ab244
- 0x0929a3e0
- 0x092ff7cc
- 0x092ff7d0
- 0x092ff7d4
- 0x093013ac
- 0x09301340
- 0x09301788
- 0x092c2490
- 0x08ae40a0
- 0x09510050
- 0x08ca47d4
- 0x08ca47d8
- 0x08ca47dc
- 0x09300dcc
- 0x092ff7b4
- 0x092ff7b8
- 0x092ff7bc
-
-
- fb8ecac8a12af5d0d7b1707078985d0d
-
-
- 4367c59934cbcf14f43fd3af6444c455
- 0x08f55740
- 0x08f41918
- 0x08f5525c
- 0x08f307c8
- 0x08f417c0
- 0x0877b33c
- 0x0893a2ac
- 0x08f4166c
- 0x08f552cc
- 0x08f97b8c
- 0x08f95bbc
- 0x08f97a84
- 0x08f41644
- 0x08f307e0
- 0x08f95be8
- 0x08f95bec
- 0x08f95bf0
- 0x08f977c8
- 0x08f9775c
- 0x08f97ba4
- 0x08f58890
- 0x0877f8e0
- 0x091a647c
- 0x0893abd4
- 0x0893abd8
- 0x0893abdc
- 0x08f971e8
- 0x08f95bd0
- 0x08f95bd4
- 0x08f95bd8
-
-
- 2f3cb9d720e9fe8844c02c72a2b20bbd
- 0x08780344
- 0x0893f2d0
-
-
- dab3ce6bc074529706a1e5fe1273108c
- 0x08f5a760
- 0x08f46938
- 0x08f5a27c
- 0x08f357e8
- 0x08f467e0
- 0x08780354
- 0x0893f2d0
- 0x08f4668c
- 0x08f5a2ec
- 0x08f9cbac
- 0x08f9abdc
- 0x08f9caa4
- 0x08f46664
- 0x08f35800
- 0x08f9ac08
- 0x08f9ac0c
- 0x08f9ac10
- 0x08f9c7e8
- 0x08f9c77c
- 0x08f9cbc4
- 0x08f5d8b0
- 0x08784900
- 0x091ab49c
- 0x0893fbf4
- 0x0893fbf8
- 0x0893fbfc
- 0x08f9c208
- 0x08f9abf0
- 0x08f9abf4
- 0x08f9abf8
-
-
- 4f55a1dcc326786271f221de23c425b5
-
-
- 022b933926e08da49c6df8649295f2b7
-
-
- 8f55a6250f2550e28535b79db43d5f1a
- 0x08f628c0
- 0x08f4ea98
- 0x08f623dc
- 0x08f3d948
- 0x08f4e940
- 0x0878c340
- 0x08947438
- 0x08f4e7ec
- 0x08f6244c
- 0x08fa4d0c
- 0x08fa2d3c
- 0x08fa4c04
- 0x08f4e7c4
- 0x660008f3
- 0x08fa2d68
- 0x08fa2d6c
- 0x08fa2d70
- 0x08fa4948
- 0x08fa48dc
- 0x08fa4d24
- 0x08f65a10
- 0x0878caa0
- 0x091b35fc
- 0x08947d54
- 0x08947d58
- 0x08947d5c
- 0x08fa4368
- 0x08fa2d50
- 0x08fa2d54
- 0x08fa2d58
-
-
- 777e7d674d8908042307994cb75250ff
- 0x09009860
- 0x08ff5a38
- 0x0900937C
- 0x08fe48e8
- 0x08ff58e0
- 0x08833324
- 0x089ee3d8
- 0x08FF578C
- 0x090093ec
- 0x0904bcac
- 0x09049cdc
- 0x0904bba4
- 0x08ff5764
- 0x08fe4900
- 0x09049d08
- 0x09049d0c
- 0x09049d10
- 0x0904b8e8
- 0x0904b87c
- 0x0904bcc4
- 0x0900c9b0
- 0x08833a40
- 0x0925a59c
- 0x089eecf4
- 0x089eecf8
- 0x089eecfc
- 0x0904b308
- 0x09049cf0
- 0x09049cf4
- 0x09049cf8
-
-
- 04c3ad13c657f59ba6fc135e156d721d
- 0x09008880
- 0x08ff4a58
- 0x0900839C
- 0x08fe3908
- 0x08ff4900
- 0x08832328
- 0x089ed3f8
- 0x08ff47ac
- 0x0900840c
- 0x0904accc
- 0x09048cfc
- 0x0904abc4
- 0x08ff4784
- 0xc60008fe
- 0x09048d28
- 0x09048d2c
- 0x09048d30
- 0x0904a908
- 0x0904a89c
- 0x0904ace4
- 0x0900b9d0
- 0x08832a60
- 0x091995fc
- 0x089edd14
- 0x089edd18
- 0x089edd1c
- 0x0904a328
- 0x09048d10
- 0x09048d14
- 0x09048d18
-
-
-
- 851c1190b6a7b42f2463967623d18575
- 0x4BB45F99
-
-
- 0x18
- 0x0
- 0xC
- 0x1C
-
-
- 0xe32798
- 0xe60838
- 0xe60814
- 0xae82cc
-
- 0x17f5ab8
- Found addresses: (next to each other!)
- 0x17f5ab8
- 0x17f5ac0
- 0x17f5ac8
- 0x17f5ad0
-
- 0x146e45f
- Found addresses:
- 0x146e45f
- 0x185b677
-
- Bogus: 0xae82cc
-
- 0x017f6f38
-
- Bogus: 0xae82cc
-
-
-
- 0x016ad738
- 0x016ad73C
- 0x016ad740
-
- 0x016ad744
- 0x016ad748
- 0x016ad74C
-
- 0x016ad750
- 0x016ad754
- 0x016ad758
-
- 0x016AD718
- 0x10
- 0x0092
- 0x029C
-
-
- 0x0
- 0x1C
- 0x38
-
-
- 0x0
- 0x90
- 0xF8
- 0xFC
- 0x110
- 0x114
- 0x6D0
- 0x770
-
-
-
-
-
-
-
diff --git a/ReleaseText.txt b/ReleaseText.txt
deleted file mode 100644
index 83b538a63..000000000
--- a/ReleaseText.txt
+++ /dev/null
@@ -1 +0,0 @@
-DFHack tools for DF 31.21
\ No newline at end of file
diff --git a/build/build-MinGW32-debug.bat b/build/build-MinGW32-debug.bat
deleted file mode 100644
index a20cb905c..000000000
--- a/build/build-MinGW32-debug.bat
+++ /dev/null
@@ -1,6 +0,0 @@
-mkdir MINGW32-debug
-cd MINGW32-debug
-cmake ..\.. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE:string=Debug
-cmake-gui .
-mingw32-make 2> ..\mingw-build-log.txt
-pause
\ No newline at end of file
diff --git a/build/build-MinGW32-release.bat b/build/build-MinGW32-release.bat
deleted file mode 100644
index af1dd060b..000000000
--- a/build/build-MinGW32-release.bat
+++ /dev/null
@@ -1,7 +0,0 @@
-mkdir MINGW32-release
-cd MINGW32-release
-cmake ..\.. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE:string=Release
-
-cmake-gui .
-mingw32-make 2> ..\mingw-build-log.txt
-pause
\ No newline at end of file
diff --git a/build/generate-MSVC-2005.bat b/build/generate-MSVC-2005.bat
deleted file mode 100644
index 40aca9e01..000000000
--- a/build/generate-MSVC-2005.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-mkdir VC2005
-cd VC2005
-echo Pre-generating a build folder
-cmake ..\.. -G"Visual Studio 8 2005"
-cmake-gui .
\ No newline at end of file
diff --git a/build/generate-MSVC-2008.bat b/build/generate-MSVC-2008.bat
deleted file mode 100644
index f8b0fd040..000000000
--- a/build/generate-MSVC-2008.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-mkdir VC2008
-cd VC2008
-echo Pre-generating a build folder
-cmake ..\.. -G"Visual Studio 9 2008"
-cmake-gui .
\ No newline at end of file
diff --git a/build/linux-remote.expect b/build/linux-remote.expect
deleted file mode 100644
index 18fcdc8b9..000000000
--- a/build/linux-remote.expect
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/expect
-# procedure to attempt connecting; result 0 if OK, 1 otherwise
-proc connect {} {
- expect "login:"
- send "kitteh\r"
- expect "password:"
- send "a\r"
-expect {
- kitteh {return 0}
- failed return 1
- "invalid password" return 1
- timeout return 1
- connected
-}
- # timed out
- return 1
-}
-
-# procedure to do build stuff; result 0 if OK, 1 otherwise
-proc dobuild {} {
- set timeout -1
- send "pkg-win32.bat\r\n"
- puts "\nBuilding...\n"
-expect {
- "BUILD OK" {return 0}
- "MSVC ERROR" {return 1}
- "CMAKE ERROR" {return 1}
- "ENV ERROR" {return 1}
-}
-}
-
-spawn telnet win7
-
-set rez [connect]
-if { $rez == 1 } {
-puts "\nError connecting to server!\n"
-exit 1
-}
-
-send "net use X: \\\\vboxsvr\\projects\r\n"
-expect "The command completed successfully."
-send "X:\r\n"
-expect "X:"
-send "cd X:\\dfhack\\build\r\n"
-expect "build"
-
-set buildrez [dobuild]
-if { $buildrez == 1 } {
- puts "\nThere was an error during build.\n"
-} else {
- puts "\nAll OK.\n"
-}
-send "exit\r"
-expect eof
-exit $buildrez
diff --git a/build/pkg-debian.sh b/build/pkg-debian.sh
deleted file mode 100644
index 6d3bce5da..000000000
--- a/build/pkg-debian.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-rm -r debian
-mkdir debian
-cd debian
-cmake ../.. -DCMAKE_BUILD_TYPE="Release" -DDFHACK_INSTALL="debian" -DMEMXML_DATA_PATH="/usr/share/dfhack" -DBUILD_DFHACK_C_BINDINGS=ON -DBUILD_DFHACK_DEVEL=ON -DBUILD_DFHACK_DOXYGEN=OFF -DBUILD_DFHACK_EXAMPLES=OFF -DBUILD_DFHACK_PLAYGROUND=OFF -DBUILD_DFHACK_PYTHON_BINDINGS=ON
-make package
-mv *.deb ../
\ No newline at end of file
diff --git a/build/pkg-ubuntu-10.10-x64.sh b/build/pkg-ubuntu-10.10-x64.sh
deleted file mode 100644
index 5f4e17b3f..000000000
--- a/build/pkg-ubuntu-10.10-x64.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-rm -r ubuntu64
-mkdir ubuntu64
-cd ubuntu64
-cmake ../.. -DCMAKE_BUILD_TYPE="Release" -DDFHACK_INSTALL="ubuntu-10.10" -DMEMXML_DATA_PATH="/usr/share/dfhack" -DDFHACK_PACKAGE_DIR=".." -DBUILD_DFHACK_C_BINDINGS=ON -DBUILD_DFHACK_DEVEL=ON -DBUILD_DFHACK_DOXYGEN=OFF -DBUILD_DFHACK_EXAMPLES=OFF -DBUILD_DFHACK_PLAYGROUND=OFF -DBUILD_DFHACK_PYTHON_BINDINGS=ON
-make package
-mv *.deb ../
\ No newline at end of file
diff --git a/build/pkg-ubuntu-10.10.sh b/build/pkg-ubuntu-10.10.sh
deleted file mode 100644
index 01baab90e..000000000
--- a/build/pkg-ubuntu-10.10.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-rm -r ubuntu
-mkdir ubuntu
-cd ubuntu
-cmake ../.. -DCMAKE_BUILD_TYPE="Release" -DDFHACK_INSTALL="ubuntu-10.10" -DMEMXML_DATA_PATH="/usr/share/dfhack" -DDFHACK_PACKAGE_DIR=".." -DBUILD_DFHACK_C_BINDINGS=ON -DBUILD_DFHACK_DEVEL=ON -DBUILD_DFHACK_DOXYGEN=OFF -DBUILD_DFHACK_EXAMPLES=OFF -DBUILD_DFHACK_PLAYGROUND=OFF -DBUILD_DFHACK_PYTHON_BINDINGS=ON
-make package
-mv *.deb ../
diff --git a/build/pkg-win32.bat b/build/pkg-win32.bat
deleted file mode 100644
index ff71e9744..000000000
--- a/build/pkg-win32.bat
+++ /dev/null
@@ -1,37 +0,0 @@
-@ECHO OFF
-rd /S /Q MSVC10
-mkdir MSVC10
-cd MSVC10
-echo CLEANUP DONE
-
-cmake ..\.. -G"Visual Studio 10" -DDFHACK_INSTALL="portable" -DMEMXML_DATA_PATH="." -DBUILD_DFHACK_C_BINDINGS=OFF -DBUILD_DFHACK_DEVEL=OFF -DBUILD_DFHACK_DOXYGEN=OFF -DBUILD_DFHACK_EXAMPLES=OFF -DBUILD_DFHACK_PLAYGROUND=OFF -DBUILD_DFHACK_PYTHON_BINDINGS=OFF > ..\pkg-win32-cmake.log
-if errorlevel 1 goto cmakeerror
-echo CMAKE OK
-
-call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" > ..\pkg-win32-env.log
-if errorlevel 1 goto enverror
-echo ENV OK
-
-msbuild PACKAGE.vcxproj /p:Configuration=Release /l:FileLogger,Microsoft.Build.Engine;logfile=..\pkg-win32-msbuild.log;encoding=utf-8 -noconsolelogger > NUL
-if errorlevel 1 goto msvcerror
-move /Y *.zip ..
-echo BUILD OK
-set errorlevel=0
-goto end
-
-:cmakeerror
-echo CMAKE ERROR
-set errorlevel=1
-goto end
-
-:enverror
-echo ENV ERROR
-set errorlevel=1
-goto end
-
-:msvcerror
-echo MSVC ERROR
-set errorlevel=1
-goto end
-
-:end
\ No newline at end of file
diff --git a/build/pkg-win32.sh b/build/pkg-win32.sh
deleted file mode 100755
index 6e81264f2..000000000
--- a/build/pkg-win32.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#/bin/sh
-# Remote into a virtualbox VM to build with MSVC.
-# Very specific to my own local setup. ~px
-
-# VARS. TODO: parametrize
-export DFHACK_VER=0.5.7
-export PKG=dfhack-bin-$DFHACK_VER
-export TARGET=Release
-
-# let's build it all
-VBoxManage startvm "7 Prof"
-sleep 20
-expect linux-remote.expect $TARGET
-
diff --git a/dfhack-python/CMakeLists.txt b/dfhack-python/CMakeLists.txt
deleted file mode 100644
index e69de29bb..000000000
diff --git a/dfhack-python/__init__.py b/dfhack-python/__init__.py
deleted file mode 100644
index f6d2a2d31..000000000
--- a/dfhack-python/__init__.py
+++ /dev/null
@@ -1,13 +0,0 @@
-import context
-
-__all__ = [ "buildings",
- "constructions",
- "context",
- "creatures",
- "dftypes",
- "flags",
- "gui",
- "items",
- "maps",
- "materials",
- "vegetation" ]
\ No newline at end of file
diff --git a/dfhack-python/buildings.py b/dfhack-python/buildings.py
deleted file mode 100644
index d58b92840..000000000
--- a/dfhack-python/buildings.py
+++ /dev/null
@@ -1,34 +0,0 @@
-from ctypes import *
-from dftypes import *
-import util
-
-libdfhack.Buildings_GetCustomWorkshopType.argtypes = [ c_void_p, POINTER(CustomWorkshop) ]
-
-class Buildings(object):
- def __init__(self, ptr):
- self._b_ptr = ptr
-
- def start(self):
- num = c_uint()
-
- if libdfhack.Buildings_Start(self._b_ptr, byref(num)) > 0:
- return int(num.value)
- else:
- return -1
-
- def finish(self):
- return libdfhack.Buildings_Finish(self._b_ptr) > 0
-
- def read(self, index):
- b = Building()
-
- if libdfhack.Buildings_Read(self._b_ptr, c_uint(index), byref(b)) > 0:
- return b
- else:
- return None
-
- def read_custom_workshop_types(self):
- return libdfhack.Buildings_ReadCustomWorkshopTypes(self._b_ptr)
-
- def get_custom_workshop_type(self, custom_workshop):
- return libdfhack.Buildings_GetCustomWorkshopType(self._b_ptr, byref(custom_workshop))
diff --git a/dfhack-python/constructions.py b/dfhack-python/constructions.py
deleted file mode 100644
index f822a54fa..000000000
--- a/dfhack-python/constructions.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from ctypes import c_uint, byref
-from dftypes import libdfhack, Construction
-
-class Constructions(object):
- def __init__(self, ptr):
- self._c_ptr = ptr
-
- def start(self):
- num = c_uint()
-
- if libdfhack.Constructions_Start(self._c_ptr, byref(num)) > 0:
- return int(num.value)
- else:
- return -1
-
- def finish(self):
- return libdfhack.Constructions_Finish(self._c_ptr) > 0
-
- def read(self, index):
- c = Construction()
-
- if libdfhack.Constructions_Read(self._c_ptr, c_uint(index), byref(c)) > 0:
- return c
- else:
- return None
diff --git a/dfhack-python/context.py b/dfhack-python/context.py
deleted file mode 100644
index b2459af46..000000000
--- a/dfhack-python/context.py
+++ /dev/null
@@ -1,191 +0,0 @@
-from ctypes import *
-from dftypes import *
-
-libdfhack.ContextManager_Alloc.restype = c_void_p
-libdfhack.ContextManager_Free.argtypes = [ c_void_p ]
-
-libdfhack.ContextManager_getContext.restype = c_void_p
-libdfhack.ContextManager_getSingleContext.restype = c_void_p
-
-libdfhack.Context_Free.argtypes = [ c_void_p ]
-
-libdfhack.Context_getMemoryInfo.restype = c_void_p
-libdfhack.Context_getProcess.restype = c_void_p
-
-libdfhack.Context_getCreatures.restype = c_void_p
-libdfhack.Context_getMaps.restype = c_void_p
-libdfhack.Context_getGui.restype = c_void_p
-libdfhack.Context_getMaterials.restype = c_void_p
-libdfhack.Context_getTranslation.restype = c_void_p
-libdfhack.Context_getVegetation.restype = c_void_p
-libdfhack.Context_getBuildings.restype = c_void_p
-libdfhack.Context_getConstructions.restype = c_void_p
-libdfhack.Context_getItems.restype = c_void_p
-libdfhack.Context_getWorld.restype = c_void_p
-libdfhack.Context_getWindowIO.restype = c_void_p
-
-class ContextManager(object):
- def __init__(self, memory_path):
- self._cm_ptr = libdfhack.ContextManager_Alloc(create_string_buffer(memory_path))
-
- def __del__(self):
- libdfhack.ContextManager_Free(self._cm_ptr)
-
- def refresh(self):
- return libdfhack.ContextManager_Refresh(self._cm_ptr) > 0
-
- def purge(self):
- libdfhack.ContextManager_purge(self._cm_ptr)
-
- def get_context(self, index):
- p = libdfhack.ContextManager_getContext(self._cm_ptr, index)
-
- if p:
- return Context(p)
- else:
- return None
-
- def get_single_context(self):
- p = libdfhack.ContextManager_getSingleContext(self._cm_ptr)
-
- if p:
- return Context(p)
- else:
- return None
-
-class Context(object):
- def __init__(self, ptr):
- self._c_ptr = ptr
-
- self._mat_obj = None
- self._map_obj = None
- self._veg_obj = None
- self._build_obj = None
- self._con_obj = None
- self._gui_obj = None
- self._tran_obj = None
- self._item_obj = None
- self._creature_obj = None
- self._world_obj = None
- self._window_io_obj = None
-
- def __del__(self):
- libdfhack.Context_Free(self._c_ptr)
-
- def attach(self):
- return libdfhack.Context_Attach(self._c_ptr) > 0
-
- def detach(self):
- self._mat_obj = None
- self._map_obj = None
- self._veg_obj = None
- self._build_obj = None
- self._con_obj = None
- self._gui_obj = None
- self._tran_obj = None
- self._item_obj = None
- self._creature_obj = None
- self._world_obj = None
- self._window_io_obj = None
-
- return libdfhack.Context_Detach(self._c_ptr) > 0
-
- def suspend(self):
- return libdfhack.Context_Suspend(self._c_ptr) > 0
-
- def resume(self):
- return libdfhack.Context_Resume(self._c_ptr) > 0
-
- def force_resume(self):
- return libdfhack.Context_ForceResume(self._c_ptr) > 0
-
- def async_suspend(self):
- return libdfhack.Context_AsyncSuspend(self._c_ptr) > 0
-
- @property
- def is_attached(self):
- return libdfhack.Context_isAttached(self._c_ptr) > 0
-
- @property
- def is_suspended(self):
- return libdfhack.Context_isSuspended(self._c_ptr) > 0
-
- @property
- def materials(self):
- import materials
- if self._mat_obj is None:
- self._mat_obj = materials.Materials(libdfhack.Context_getMaterials(self._c_ptr))
-
- return self._mat_obj
-
- @property
- def maps(self):
- import maps
- if self._map_obj is None:
- self._map_obj = maps.Maps(libdfhack.Context_getMaps(self._c_ptr))
-
- return self._map_obj
-
- @property
- def vegetation(self):
- import vegetation
- if self._veg_obj is None:
- self._veg_obj = vegetation.Vegetation(libdfhack.Context_getVegetation(self._c_ptr))
-
- return self._veg_obj
-
- @property
- def buildings(self):
- import buildings
- if self._build_obj is None:
- self._build_obj = buildings.Buildings(libdfhack.Context_getBuildings(self._c_ptr))
-
- return self._build_obj
-
- @property
- def creatures(self):
- import creatures
- if self._creature_obj is None:
- self._creature_obj = creatures.Creatures(libdfhack.Context_getCreatures(self._c_ptr))
-
- return self._creature_obj
-
- @property
- def gui(self):
- import gui
- if self._gui_obj is None:
- self._gui_obj = gui.Gui(libdfhack.Context_getGui(self._c_ptr))
-
- return self._gui_obj
-
- @property
- def items(self):
- import items
- if self._item_obj is None:
- self._item_obj = items.Items(libdfhack.Context_getItems(self._c_ptr))
-
- return self._item_obj
-
- @property
- def translation(self):
- import translation
- if self._tran_obj is None:
- self._tran_obj = translation.Translation(libdfhack.Context_getTranslation(self._c_ptr))
-
- return self._tran_obj
-
- @property
- def world(self):
- import world
- if self._world_obj is None:
- self._world_obj = world.World(libdfhack.Context_getWorld(self._c_ptr))
-
- return self._world_obj
-
- @property
- def window_io(self):
- import window_io
- if self._window_io_obj is None:
- self._window_io_obj = window_io.WindowIO(libdfhack.Context_getWindowIO(self._c_ptr))
-
- return self._window_io_obj
\ No newline at end of file
diff --git a/dfhack-python/creatures.py b/dfhack-python/creatures.py
deleted file mode 100644
index b4a51a4b5..000000000
--- a/dfhack-python/creatures.py
+++ /dev/null
@@ -1,73 +0,0 @@
-from ctypes import *
-from dftypes import libdfhack, Creature, Material
-import util
-
-libdfhack.Creatures_WriteLabors.argtypes = [ c_void_p, c_uint, POINTER(c_ubyte) ]
-
-libdfhack.Creatures_ReadJob.restype = POINTER(Material)
-libdfhack.Creatures_ReadInventoryIdx.restype = POINTER(c_uint)
-libdfhack.Creatures_ReadInventoryPtr.restype = POINTER(c_uint)
-
-class Creatures(object):
- def __init__(self, ptr):
- print ptr
- self._c_ptr = ptr
-
- self._d_race_index = None
- self._d_civ_id = None
-
- def start(self):
- n = c_uint(0)
-
- if libdfhack.Creatures_Start(self._c_ptr, byref(n)) > 0:
- return int(n.value)
- else:
- return -1
-
- def finish(self):
- return libdfhack.Creatures_Finish(self._c_ptr) > 0
-
- def read_creature(self, index):
- c = Creature()
-
- if libdfhack.Creatures_ReadCreature(self._c_ptr, c_int(index), byref(c)) > 0:
- return c
- else:
- return None
-
- def read_creature_in_box(self, index, pos1, pos2):
- c = Creature()
-
- x1, y1, z1 = c_uint(pos1[0]), c_uint(pos1[1]), c_uint(pos1[2])
- x2, y2, z2 = c_uint(pos2[0]), c_uint(pos2[1]), c_uint(pos2[2])
-
- retval = libdfhack.Creatures_ReadCreatureInBox(self._c_ptr, byref(c), x1, y1, z1, x2, y2, z2)
-
- return (retval, c)
-
- def write_labors(self, index, labors):
- return libdfhack.Creatures_WriteLabors(self._c_ptr, c_uint(index), labors) > 0
-
- def read_job(self, creature):
- job_ptr = libdfhack.Creatures_ReadJob(self._c_ptr, byref(creature))
- jobs = None
-
- if id(job_ptr) in dftypes.pointer_dict:
- jobs = dftypes.pointer_dict[id(job_ptr)][1]
- del dftypes.pointer_dict[id(job_ptr)]
-
- return jobs
-
- @property
- def dwarf_race_index(self):
- if self._d_race_index is None:
- self._d_race_index =libdfhack.Creatures_GetDwarfRaceIndex(self._c_ptr)
-
- return self._d_race_index
-
- @property
- def dwarf_civ_id(self):
- if self._d_civ_id is None:
- self._d_civ_id = libdfhack.Creatures_GetDwarfCivId(self._c_ptr)
-
- return self._d_civ_id
diff --git a/dfhack-python/dfhack_api_ctypes.py b/dfhack-python/dfhack_api_ctypes.py
deleted file mode 100644
index 185746e3b..000000000
--- a/dfhack-python/dfhack_api_ctypes.py
+++ /dev/null
@@ -1,152 +0,0 @@
-from ctypes import *
-from pydftypes import *
-
-
-libdfhack.API_Alloc.restype = c_void_p
-libdfhack.API_Free.argtypes = [ c_void_p ]
-
-libdfhack.API_getMemoryInfo.restype = c_void_p
-libdfhack.API_getProcess.restype = c_void_p
-libdfhack.API_getWindow.restype = c_void_p
-
-libdfhack.API_getCreatures.restype = c_void_p
-libdfhack.API_getMaps.restype = c_void_p
-libdfhack.API_getGui.restype = c_void_p
-libdfhack.API_getMaterials.restype = c_void_p
-libdfhack.API_getTranslation.restype = c_void_p
-libdfhack.API_getVegetation.restype = c_void_p
-libdfhack.API_getBuildings.restype = c_void_p
-libdfhack.API_getConstructions.restype = c_void_p
-libdfhack.API_getItems.restype = c_void_p
-
-class API(object):
- def __init__(self, memory_path):
- self._api_ptr = libdfhack.API_Alloc(create_string_buffer(memory_path))
-
- self._mat_obj = None
- self._map_obj = None
- self._veg_obj = None
- self._build_obj = None
- self._con_obj = None
- self._gui_obj = None
- self._tran_obj = None
- self._item_obj = None
- self._creature_obj = None
-
- def __del__(self):
- libdfhack.API_Free(self._api_ptr)
-
- def attach(self):
- return libdfhack.API_Attach(self._api_ptr) > 0
-
- def detach(self):
- return libdfhack.API_Detach(self._api_ptr) > 0
-
- def suspend(self):
- return libdfhack.API_Suspend(self._api_ptr) > 0
-
- def resume(self):
- return libdfhack.API_Resume(self._api_ptr) > 0
-
- def force_resume(self):
- return libdfhack.API_ForceResume(self._api_ptr) > 0
-
- def async_suspend(self):
- return libdfhack.API_AsyncSuspend(self._api_ptr) > 0
-
- @property
- def is_attached(self):
- return libdfhack.API_isAttached(self._api_ptr) > 0
-
- @property
- def is_suspended(self):
- return libdfhack.API_isSuspended(self._api_ptr) > 0
-
- @property
- def materials(self):
- import materials
- if self._mat_obj is None:
- self._mat_obj = materials.Materials(libdfhack.API_getMaterials(self._api_ptr))
-
- return self._mat_obj
-
- @property
- def maps(self):
- import maps
- if self._map_obj is None:
- self._map_obj = maps.Maps(libdfhack.API_getMaps(self._api_ptr))
-
- return self._map_obj
-
- @property
- def vegetation(self):
- import vegetation
- if self._veg_obj is None:
- self._veg_obj = vegetation.Vegetation(libdfhack.API_getVegetation(self._api_ptr))
-
- return self._veg_obj
-
- @property
- def buildings(self):
- import buildings
- if self._build_obj is None:
- self._build_obj = buildings.Buildings(libdfhack.API_getBuildings(self._api_ptr))
-
- return self._build_obj
-
- @property
- def creatures(self):
- import creatures
- if self._creature_obj is None:
- self._creature_obj = creatures.Creatures(libdfhack.API_getCreatures(self._api_ptr))
-
- return self._creature_obj
-
- @property
- def gui(self):
- import gui
- if self._gui_obj is None:
- self._gui_obj = gui.Gui(libdfhack.API_getGui(self._api_ptr))
-
- return self._gui_obj
-
- @property
- def items(self):
- import items
- if self._item_obj is None:
- self._item_obj = items.Items(libdfhack.API_getItems(self._api_ptr))
-
- return self._item_obj
-
- @property
- def translation(self):
- import translation
- if self._tran_obj is None:
- self._tran_obj = translation.Translation(libdfhack.API_getTranslation(self._api_ptr))
-
- return self._tran_obj
-
-def reveal():
- df = API("Memory.xml")
- df.attach()
-
- m = df.maps
-
- m.start()
-
- m_x, m_y, m_z = m.size
-
- for x in xrange(m_x):
- for y in xrange(m_y):
- for z in xrange(m_z):
- if m.is_valid_block(x, y, z):
- d = m.read_designations(x, y, z)
-
- for i in d:
- for j in i:
- j.bits.hidden = 0
-
- m.write_designations(x, y, z, d)
-
- m.finish()
- df.detach()
diff --git a/dfhack-python/dftypes.py b/dfhack-python/dftypes.py
deleted file mode 100644
index 729f7cdff..000000000
--- a/dfhack-python/dftypes.py
+++ /dev/null
@@ -1,637 +0,0 @@
-from ctypes import *
-from flags import *
-from enum import *
-import util
-from util import *
-
-libdfhack = cdll.libdfhack
-
-def _register_callback(name, func):
- ptr = c_void_p.in_dll(libdfhack, name)
- ptr.value = cast(func, c_void_p).value
-
-_register_callback("alloc_byte_buffer_callback", alloc_byte_buffer)
-_register_callback("alloc_ubyte_buffer_callback", alloc_ubyte_buffer)
-_register_callback("alloc_short_buffer_callback", alloc_short_buffer)
-_register_callback("alloc_ushort_buffer_callback", alloc_ushort_buffer)
-_register_callback("alloc_int_buffer_callback", alloc_int_buffer)
-_register_callback("alloc_uint_buffer_callback", alloc_uint_buffer)
-_register_callback("alloc_char_buffer_callback", alloc_char_buffer)
-
-_arr_create_func = CFUNCTYPE(c_void_p, c_int)
-_dfhack_string = (c_char * 128)
-
-TileTypes40d = ((c_int * 16) * 16)
-BiomeIndices40d = c_ubyte * 16
-Temperatures = ((c_ushort * 16) * 16)
-Designations40d = ((DesignationFlags * 16) * 16)
-Occupancies40d = ((OccupancyFlags * 16) * 16)
-
-def wall_terrain_check(terrain):
- return libdfhack.DFHack_isWallTerrain(terrain) > 0
-
-def floor_terrain_check(terrain):
- return libdfhack.DFHack_isFloorTerrain(terrain) > 0
-
-def ramp_terrain_check(terrain):
- return libdfhack.DFHack_isRampTerrain(terrain) > 0
-
-def stair_terrain_check(terrain):
- return libdfhack.DFHack_isStairTerrain(terrain) > 0
-
-def open_terrain_check(terrain):
- return libdfhack.DFHack_isOpenTerrain(terrain) > 0
-
-def get_vegetation_type(terrain):
- return libdfhack.DFHack_getVegetationType(terrain)
-
-class Position2D(Structure):
- _fields_ = [("x", c_ushort),
- ("y", c_ushort)]
-
-class Position3D(Structure):
- _fields_ = [("x", c_ushort),
- ("y", c_ushort),
- ("z", c_uint)]
-
-class PlaneCoord(Union):
- _fields_ = [("xyz", Position3D),
- ("dim", Position2D),
- ("comparate", c_ulong)]
-
- def __cmp__(self, other):
- if isinstance(other, PlaneCoord):
- return self.comparate - other.comparate
- else:
- raise TypeError("argument must be of type %s" % type(self))
-
-class Feature(Structure):
- _fields_ = [("type", FeatureType),
- ("main_material", c_short),
- ("sub_material", c_short),
- ("discovered", c_byte),
- ("origin", c_uint)]
-
-class FeatureMapNode(Structure):
- _fields_ = [("coordinate", PlaneCoord),
- ("features", POINTER(Feature)),
- ("feature_length", c_uint)]
-
-def _alloc_featuremap_buffer_callback(ptr, fmap_list, count):
- arr_list = []
- arr = (FeatureMapNode * count)()
-
- for i, v in enumerate(arr):
- f_count = int(fmap_list[i])
- f_arr = (Feature * f_count)()
-
- f_p = cast(f_arr, POINTER(Feature))
- v.features = f_p
-
- arr_list.extend((f_arr, f_p))
-
- p = cast(arr, POINTER(FeatureMapNode))
- ptr[0] = p
-
- pointer_dict[addressof(arr)] = (ptr, arr, p, arr_list)
-
- return 1
-
-_alloc_featuremap_buffer_functype = CFUNCTYPE(c_int, POINTER(POINTER(FeatureMapNode)), uint_ptr, c_uint)
-_alloc_featuremap_buffer_func = _alloc_featuremap_buffer_functype(_alloc_featuremap_buffer_callback)
-_register_callback("alloc_featuremap_buffer_callback", _alloc_featuremap_buffer_func)
-
-class Vein(Structure):
- _fields_ = [("vtable", c_uint),
- ("type", c_int),
- ("assignment", c_short * 16),
- ("flags", c_uint),
- ("address_of", c_uint)]
-
-_vein_ptr = POINTER(Vein)
-
-def _alloc_vein_buffer_callback(ptr, count):
- return util._allocate_array(ptr, Vein, count)
-
-_vein_functype = CFUNCTYPE(c_int, POINTER(_vein_ptr), c_uint)
-_vein_func = _vein_functype(_alloc_vein_buffer_callback)
-_register_callback("alloc_vein_buffer_callback", _vein_func)
-
-class FrozenLiquidVein(Structure):
- _fields_ = [("vtable", c_uint),
- ("tiles", TileTypes40d),
- ("address_of", c_uint)]
-
-_frozenvein_ptr = POINTER(FrozenLiquidVein)
-
-def _alloc_frozenliquidvein_buffer_callback(ptr, count):
- return util._allocate_array(ptr, FrozenLiquidVein, count)
-
-_frozenliquidvein_functype = CFUNCTYPE(c_int, POINTER(_frozenvein_ptr), c_uint)
-_frozenliquidvein_func = _frozenliquidvein_functype(_alloc_frozenliquidvein_buffer_callback)
-_register_callback("alloc_frozenliquidvein_buffer_callback", _frozenliquidvein_func)
-
-class SpatterVein(Structure):
- _fields_ = [("vtable", c_uint),
- ("mat1", c_ushort),
- ("unk1", c_ushort),
- ("mat2", c_uint),
- ("mat3", c_ushort),
- ("intensity", ((c_ubyte * 16) * 16)),
- ("address_of", c_uint)]
-
-_spattervein_ptr = POINTER(SpatterVein)
-
-def _alloc_spattervein_buffer_callback(ptr, count):
- return util._allocate_array(ptr, SpatterVein, count)
-
-_spattervein_functype = CFUNCTYPE(c_int, POINTER(_spattervein_ptr), c_uint)
-_spattervein_func = _spattervein_functype(_alloc_spattervein_buffer_callback)
-_register_callback("alloc_spattervein_buffer_callback", _spattervein_func)
-
-class GrassVein(Structure):
- _fields_ = [("vtable", c_uint),
- ("material", c_uint),
- ("intensity", ((c_ubyte * 16) * 16)),
- ("address_of", c_uint)]
-
-_grassvein_ptr = POINTER(GrassVein)
-
-def _alloc_grassvein_buffer_callback(ptr, count):
- return util._allocate_array(ptr, GrassVein, count)
-
-_grassvein_functype = CFUNCTYPE(c_int, POINTER(_grassvein_ptr), c_uint)
-_grassvein_func = _grassvein_functype(_alloc_grassvein_buffer_callback)
-_register_callback("alloc_grassvein_buffer_callback", _grassvein_func)
-
-class WorldConstruction(Structure):
- _fields_ = [("vtable", c_uint),
- ("material", c_uint),
- ("assignment", c_ushort * 16),
- ("address_of", c_uint)]
-
-_worldconstruction_ptr = POINTER(WorldConstruction)
-
-def _alloc_worldconstruction_buffer_callback(ptr, count):
- return util._allocate_array(ptr, WorldConstruction, count)
-
-_worldconstruction_functype = CFUNCTYPE(c_int, POINTER(_worldconstruction_ptr), c_uint)
-_worldconstruction_func = _worldconstruction_functype(_alloc_worldconstruction_buffer_callback)
-_register_callback("alloc_worldconstruction_buffer_callback", _worldconstruction_func)
-
-class MapBlock40d(Structure):
- _fields_ = [("tiletypes", TileTypes40d),
- ("designation", Designations40d),
- ("occupancy", Occupancies40d),
- ("biome_indices", BiomeIndices40d),
- ("origin", c_uint),
- ("blockflags", BlockFlags),
- ("global_feature", c_short),
- ("local_feature", c_short)]
-
-
-class ViewScreen(Structure):
- _fields_ = [("type", c_int)]
-
-class Matgloss(Structure):
- _fields_ = [("id", _dfhack_string),
- ("fore", c_byte),
- ("back", c_byte),
- ("bright", c_byte),
- ("name", _dfhack_string)]
-
-_matgloss_ptr = POINTER(Matgloss)
-
-def _alloc_matgloss_buffer_callback(ptr, count):
- return util._allocate_array(ptr, Matgloss, count)
-
-_matgloss_functype = CFUNCTYPE(c_int, POINTER(_matgloss_ptr), c_uint)
-_matgloss_func = _matgloss_functype(_alloc_matgloss_buffer_callback)
-_register_callback("alloc_matgloss_buffer_callback", _matgloss_func)
-
-class MatglossPair(Structure):
- _fields_ = [("type", c_short),
- ("index", c_int)]
-
-class DescriptorColor(Structure):
- _fields_ = [("id", _dfhack_string),
- ("r", c_float),
- ("v", c_float),
- ("b", c_float),
- ("name", _dfhack_string)]
-
-def _alloc_descriptor_buffer_callback(ptr, count):
- return util._allocate_array(ptr, DescriptorColor, count)
-
-_descriptor_functype = CFUNCTYPE(c_int, POINTER(POINTER(DescriptorColor)), c_uint)
-_descriptor_func = _descriptor_functype(_alloc_descriptor_buffer_callback)
-_register_callback("alloc_descriptor_buffer_callback", _descriptor_func)
-
-class MatglossPlant(Structure):
- _fields_ = [("id", _dfhack_string),
- ("fore", c_ubyte),
- ("back", c_ubyte),
- ("bright", c_ubyte),
- ("name", _dfhack_string),
- ("drink_name", _dfhack_string),
- ("food_name", _dfhack_string),
- ("extract_name", _dfhack_string)]
-
-class MatglossOther(Structure):
- _fields_ = [("rawname", c_char * 128)]
-
-def _alloc_matgloss_other_buffer_callback(ptr, count):
- return util._allocate_array(ptr, MatglossOther, count)
-
-_matgloss_other_functype = CFUNCTYPE(c_int, POINTER(POINTER(MatglossOther)), c_uint)
-_matgloss_other_func = _matgloss_other_functype(_alloc_matgloss_other_buffer_callback)
-_register_callback("alloc_matgloss_other_buffer_callback", _matgloss_other_func)
-
-class Building(Structure):
- _fields_ = [("origin", c_uint),
- ("vtable", c_uint),
- ("x1", c_uint),
- ("y1", c_uint),
- ("x2", c_uint),
- ("y2", c_uint),
- ("z", c_uint),
- ("material", MatglossPair),
- ("type", c_uint)]
-
-class CustomWorkshop(Structure):
- _fields_ = [("index", c_uint),
- ("name", c_char * 256)]
-
-def _alloc_custom_workshop_buffer_callback(ptr, count):
- return util._allocate_array(ptr, CustomWorkshop, count)
-
-_custom_workshop_functype = CFUNCTYPE(c_int, POINTER(POINTER(CustomWorkshop)), c_uint)
-_custom_workshop_func = _custom_workshop_functype(_alloc_custom_workshop_buffer_callback)
-_register_callback("alloc_customWorkshop_buffer_callback", _custom_workshop_func)
-
-class Construction(Structure):
- _fields_ = [("x", c_ushort),
- ("y", c_ushort),
- ("z", c_ushort),
- ("form", c_ushort),
- ("unk_8", c_ushort),
- ("mat_type", c_ushort),
- ("mat_idx", c_uint),
- ("unk3", c_ushort),
- ("unk4", c_ushort),
- ("unk5", c_ushort),
- ("unk6", c_uint),
- ("origin", c_uint)]
-
-class Tree(Structure):
- _fields_ = [("type", c_ushort),
- ("material", c_ushort),
- ("x", c_ushort),
- ("y", c_ushort),
- ("z", c_ushort),
- ("address", c_uint)]
-
- def __str__(self):
- water = ""
- tree_type = "tree"
-
- if self.type == 1 or self.type == 3:
- water = "near-water"
- if self.type == 2 or self.type == 3:
- tree_type = "shrub"
-
- s = "%d:%d = %s %s\nAddress: 0x%x\n" % (self.type, self.material, water, tree_type, self.address)
-
- return s
-
-def _alloc_tree_buffer_callback(ptr, count):
- return util._allocate_array(ptr, Tree, count)
-
-_alloc_tree_buffer_functype = CFUNCTYPE(c_int, POINTER(POINTER(Tree)), c_uint)
-_alloc_tree_buffer_func = _alloc_tree_buffer_functype(_alloc_tree_buffer_callback)
-_register_callback("alloc_tree_buffer_callback", _alloc_tree_buffer_func)
-
-class Material(Structure):
- _fields_ = [("itemType", c_short),
- ("subType", c_short),
- ("subIndex", c_short),
- ("index", c_int),
- ("flags", c_uint)]
-
-def _alloc_material_buffer_callback(ptr, count):
- return util._allocate_array(ptr, Material, count)
-
-_material_functype = CFUNCTYPE(c_int, POINTER(POINTER(Material)), c_uint)
-_material_func = _material_functype(_alloc_material_buffer_callback)
-_register_callback("alloc_material_buffer_callback", _material_func)
-
-class Skill(Structure):
- _fields_ = [("id", c_uint),
- ("experience", c_uint),
- ("rating", c_uint)]
-
-class Job(Structure):
- _fields_ = [("active", c_byte),
- ("jobId", c_uint),
- ("jobType", c_ubyte),
- ("occupationPtr", c_uint)]
-
-class Like(Structure):
- _fields_ = [("type", c_short),
- ("itemClass", c_short),
- ("itemIndex", c_short),
- ("material", MatglossPair),
- ("active", c_byte)]
-
-class Attribute(Structure):
- _fields_ = [("level", c_uint),
- ("field_4", c_uint),
- ("field_8", c_uint),
- ("field_C", c_uint),
- ("leveldiff", c_uint),
- ("field_14", c_uint),
- ("field_18", c_uint)]
-
-class Name(Structure):
- _fields_ = [("first_name", _dfhack_string),
- ("nickname", _dfhack_string),
- ("words", (c_int * 7)),
- ("parts_of_speech", (c_ushort * 7)),
- ("language", c_uint),
- ("has_name", c_byte)]
-
-class Note(Structure):
- _fields_ = [("symbol", c_char),
- ("foreground", c_ushort),
- ("background", c_ushort),
- ("name", _dfhack_string),
- ("x", c_ushort),
- ("y", c_ushort),
- ("z", c_ushort)]
-
-class Settlement(Structure):
- _fields_ = [("origin", c_uint),
- ("name", Name),
- ("world_x", c_short),
- ("world_y", c_short),
- ("local_x1", c_short),
- ("local_x2", c_short),
- ("local_y1", c_short),
- ("local_y2", c_short)]
-
-_NUM_CREATURE_TRAITS = 30
-_NUM_CREATURE_LABORS = 102
-
-class Soul(Structure):
- _fields_ = [("numSkills", c_ubyte),
- ("skills", (Skill * 256)),
- ("traits", (c_ushort * _NUM_CREATURE_TRAITS)),
- ("analytical_ability", Attribute),
- ("focus", Attribute),
- ("willpower", Attribute),
- ("creativity", Attribute),
- ("intuition", Attribute),
- ("patience", Attribute),
- ("memory", Attribute),
- ("linguistic_ability", Attribute),
- ("spatial_sense", Attribute),
- ("musicality", Attribute),
- ("kinesthetic_sense", Attribute),
- ("empathy", Attribute),
- ("social_awareness", Attribute)]
-
-_MAX_COLORS = 15
-
-class Creature(Structure):
- _fields_ = [("origin", c_uint),
- ("x", c_ushort),
- ("y", c_ushort),
- ("z", c_ushort),
- ("race", c_uint),
- ("civ", c_int),
- ("flags1", CreatureFlags1),
- ("flags2", CreatureFlags2),
- ("name", Name),
- ("mood", c_short),
- ("mood_skill", c_short),
- ("artifact_name", Name),
- ("profession", c_ubyte),
- ("custom_profession", _dfhack_string),
- ("labors", (c_ubyte * _NUM_CREATURE_LABORS)),
- ("current_job", Job),
- ("happiness", c_uint),
- ("id", c_uint),
- ("strength", Attribute),
- ("agility", Attribute),
- ("toughness", Attribute),
- ("endurance", Attribute),
- ("recuperation", Attribute),
- ("disease_resistance", Attribute),
- ("squad_leader_id", c_int),
- ("sex", c_ubyte),
- ("caste", c_ushort),
- ("pregnancy_timer", c_uint),
- ("has_default_soul", c_byte),
- ("defaultSoul", Soul),
- ("nbcolors", c_uint),
- ("color", (c_uint * _MAX_COLORS)),
- ("birth_year", c_int),
- ("birth_time", c_uint)]
-
-class CreatureExtract(Structure):
- _fields_ = [("rawname", _dfhack_string)]
-
-class BodyPart(Structure):
- _fields_ = [("id", _dfhack_string),
- ("category", _dfhack_string),
- ("single", _dfhack_string),
- ("plural", _dfhack_string)]
-
-_bodypart_ptr = POINTER(BodyPart)
-
-class ColorModifier(Structure):
- _fields_ = [("part", _dfhack_string),
- ("colorlist", POINTER(c_uint)),
- ("colorlistLength", c_uint),
- ("startdate", c_uint),
- ("enddate", c_uint)]
-
- def __init__(self):
- self.colorlistLength = 0
-
-_colormodifier_ptr = POINTER(ColorModifier)
-
-class CreatureCaste(Structure):
- _fields_ = [("rawname", _dfhack_string),
- ("singular", _dfhack_string),
- ("plural", _dfhack_string),
- ("adjective", _dfhack_string),
- ("color_modifier", _colormodifier_ptr),
- ("color_modifier_length", c_uint),
- ("bodypart", _bodypart_ptr),
- ("bodypart_length", c_uint),
- ("strength", Attribute),
- ("agility", Attribute),
- ("toughness", Attribute),
- ("endurance", Attribute),
- ("recuperation", Attribute),
- ("disease_resistance", Attribute),
- ("analytical_ability", Attribute),
- ("focus", Attribute),
- ("willpower", Attribute),
- ("creativity", Attribute),
- ("intuition", Attribute),
- ("patience", Attribute),
- ("memory", Attribute),
- ("linguistic_ability", Attribute),
- ("spatial_sense", Attribute),
- ("musicality", Attribute),
- ("kinesthetic_sense", Attribute)]
-
-_creaturecaste_ptr = POINTER(CreatureCaste)
-
-class TileColor(Structure):
- _fields_ = [("fore", c_ushort),
- ("back", c_ushort),
- ("bright", c_ushort)]
-
-class ColorDescriptor(Structure):
- _fields_ = [("colorlistLength", c_uint)]
-
-class CasteDescriptor(Structure):
- _fields_ = [("color_descriptors", POINTER(ColorDescriptor)),
- ("colorModifierLength", c_uint),
- ("bodypartLength", c_uint)]
-
-class CreatureTypeDescriptor(Structure):
- _fields_ = [("caste_descriptors", POINTER(CasteDescriptor)),
- ("castesCount", c_uint),
- ("extractCount", c_uint)]
-
-class CreatureType(Structure):
- _fields_ = [("rawname", _dfhack_string),
- ("castes", _creaturecaste_ptr),
- ("castes_count", c_uint),
- ("extract", POINTER(CreatureExtract)),
- ("extract_count", c_uint),
- ("tile_character", c_ubyte),
- ("tilecolor", TileColor)]
-
-_creaturetype_ptr = POINTER(CreatureType)
-
-def _alloc_creaturetype_buffer(ptr, descriptors, count):
- arr_list = []
- c_arr = (CreatureType * count)()
-
- for i, v in enumerate(c_arr):
- v.castesCount = descriptors[i].castesCount
- v_caste_arr = (CreatureCaste * v.castesCount)()
-
- for j, v_c in enumerate(v_caste_arr):
- caste_descriptor = descriptors[i].caste_descriptors[j]
-
- v_c.colorModifierLength = caste_descriptor.colorModifierLength
- c_color_arr = (ColorModifier * v_c.colorModifierLength)()
-
- for k, c_c in enumerate(c_color_arr):
- color_descriptor = caste_descriptor.color_descriptors[k]
-
- c_c.colorlistLength = color_descriptor.colorlistLength
-
- c_color_list_arr = (c_uint * c_c.colorlistLength)()
-
- p = cast(c_color_list_arr, POINTER(c_uint))
-
- c_c.colorlist = p
-
- arr_list.extend((c_color_list_arr, p))
-
- c_p = cast(c_color_arr, POINTER(ColorModifier))
- v_c.colorModifier = c_p
-
- v_c.bodypartLength = caste_descriptor.bodypartLength
- c_bodypart_arr = (BodyPart * v_c.bodypartLength)()
-
- b_p = cast(c_bodypart_arr, POINTER(BodyPart))
- v_c.bodypart = b_p
-
- arr_list.extend((c_color_arr, c_p, c_bodypart_arr, b_p))
-
- v.extractCount = descriptors[i].extractCount
- v_extract_arr = (CreatureExtract * v.extractCount)()
-
- caste_p = cast(v_caste_arr, POINTER(CreatureCaste))
- v.castes = caste_p
-
- extract_p = cast(v_extract_arr, POINTER(CreatureExtract))
- v.extract = extract_p
-
- arr_list.extend((v_caste_arr, caste_p, v_extract_arr, extract_p))
-
- p = cast(c_arr, _creaturetype_ptr)
- ptr[0] = p
-
- pointer_dict[addressof(c_arr)] = (ptr, c_arr, p, arr_list)
-
- return 1
-
-_alloc_creaturetype_buffer_functype = CFUNCTYPE(c_int, POINTER(_creaturetype_ptr), POINTER(CreatureTypeDescriptor), c_uint)
-_alloc_creaturetype_buffer_func = _alloc_creaturetype_buffer_functype(_alloc_creaturetype_buffer)
-_register_callback("alloc_creaturetype_buffer_callback", _alloc_creaturetype_buffer_func)
-
-class GameModes(Structure):
- _fields_ = [("control_mode", c_ubyte),
- ("game_mode", c_ubyte)]
-
-class Hotkey(Structure):
- _fields_ = [("name", (c_char * 10)),
- ("mode", c_short),
- ("x", c_int),
- ("y", c_int),
- ("z", c_int)]
-
-_hotkey_ptr = POINTER(Hotkey)
-
-def _alloc_hotkey_buffer_callback(ptr, count):
- print "hotkey alloc: %d" % count
- return util._allocate_array(ptr, Hotkey, count)
-
-_hotkey_functype = CFUNCTYPE(c_int, POINTER(_hotkey_ptr), c_uint)
-_hotkey_func = _hotkey_functype(_alloc_hotkey_buffer_callback)
-_register_callback("alloc_hotkey_buffer_callback", _hotkey_func)
-
-class MemRange(Structure):
- _fields_ = [("start", c_ulong),
- ("end", c_ulong),
- ("name", (c_char * 1024)),
- ("read", c_uint, 1),
- ("write", c_uint, 1),
- ("execute", c_uint, 1),
- ("shared", c_uint, 1),
- ("valid", c_ubyte),
- ("buffer", POINTER(c_ubyte))]
-
-_memrange_ptr = POINTER(MemRange)
-
-def _alloc_memrange_buffer(ptr, descriptors, count):
- arr_list = []
- m_arr = (MemRange * count)()
-
- for i, v in enumerate(m_arr):
- buf_arr = (c_ubyte * int(descriptors[i]))()
- buf_ptr = cast(buf_arr, POINTER(c_ubyte))
-
- v.buffer = buf_ptr
-
- arr_list.extend((buf_arr, buf_ptr))
-
- p = cast(m_arr, _memrange_ptr)
- ptr[0] = p
-
- pointer_dict[addressof(m_arr)] = (ptr, m_arr, p, arr_list)
-
- return 1
-
-_alloc_memrange_buffer_functype = CFUNCTYPE(c_int, POINTER(_memrange_ptr), POINTER(c_uint), c_uint)
-_alloc_memrange_buffer_func = _alloc_memrange_buffer_functype(_alloc_memrange_buffer)
-_register_callback("alloc_memrange_buffer_callback", _alloc_memrange_buffer_func)
\ No newline at end of file
diff --git a/dfhack-python/enum.py b/dfhack-python/enum.py
deleted file mode 100644
index bc123a8c9..000000000
--- a/dfhack-python/enum.py
+++ /dev/null
@@ -1,156 +0,0 @@
-#found this in the cookbook: http://code.activestate.com/recipes/576415/
-
-from ctypes import c_uint
-
-class C_EnumerationType(type(c_uint)):
- def __new__(metacls, name, bases, dictionary):
- if not "_members_" in dictionary:
- _members_ = {}
-
- for key, value in dictionary.iteritems():
- if not key.startswith("_"):
- _members_[key] = value
-
- dictionary["_members_"] = _members_
-
- cls = type(c_uint).__new__(metacls, name, bases, dictionary)
-
- for key, value in cls._members_.iteritems():
- globals()[key] = value
-
- return cls
-
- def __contains__(self, value):
- return value in self._members_.values()
-
- def __repr__(self):
- return "" % self.__name__
-
-class C_Enumeration(c_uint):
- __metaclass__ = C_EnumerationType
- _members_ = {}
-
- def __init__(self, value):
- for key, value in self._members_.iteritems():
- if v == value:
- self.name = key
- break
- else:
- raise ValueError("No enumeration member with value %r" % value)
-
- c_uint.__init__(self, value)
-
- def __repr__(self):
- return "" % (self.name, self.value, self.__class__)
-
- @classmethod
- def from_param(cls, param):
- if isinstance(param, C_Enumeration):
- if param.__class__ != cls:
- raise ValueError("Cannot mix enumeration members")
- else:
- return param
- else:
- return cls(param)
-
-FeatureType = C_EnumerationType("FeatureType",
- (c_uint,),
- {"Other" : 0,
- "Adamantine_Tube" : 1,
- "Underworld" : 2,
- "Hell_Temple" : 3})
-
-BiomeOffset = C_EnumerationType("BiomeOffset",
- (c_uint,),
- {"NorthWest" : 0,
- "North" : 1,
- "NorthEast" : 2,
- "West" : 3,
- "Here" : 4,
- "East" : 5,
- "SouthWest" : 6,
- "South" : 7,
- "SouthEast" : 8,
- "BiomeCount" : 9})
-
-TrafficType = C_EnumerationType("TrafficType",
- (c_uint,),
- {"Normal" : 0,
- "Low" : 1,
- "High" : 2,
- "Restricted" : 3})
-
-DesignationType = C_EnumerationType("DesignationType",
- (c_uint,),
- {"No" : 0,
- "Default" : 1,
- "UD_Stair" : 2,
- "Channel" : 3,
- "Ramp" : 4,
- "D_Stair" : 5,
- "U_Stair" : 6,
- "Whatever" : 7})
-
-LiquidType = C_EnumerationType("LiquidType",
- (c_uint,),
- {"Water" : 0,
- "Magma" : 1})
-
-#this list must stay in the same order as the one in dfhack/library/include/dfhack/modules/WindowIO.h!
-_keys = ["ENTER",
- "SPACE",
- "BACK_SPACE",
- "TAB",
- "CAPS_LOCK",
- "LEFT_SHIFT",
- "RIGHT_SHIFT",
- "LEFT_CONTROL",
- "RIGHT_CONTROL",
- "ALT",
- "WAIT",
- "ESCAPE",
- "UP",
- "DOWN",
- "LEFT",
- "RIGHT",
- "F1",
- "F2",
- "F3",
- "F4",
- "F5",
- "F6",
- "F7",
- "F8",
- "F9",
- "F10",
- "F11",
- "F12",
- "PAGE_UP",
- "PAGE_DOWN",
- "INSERT",
- "DFK_DELETE",
- "HOME",
- "END",
- "KEYPAD_DIVIDE",
- "KEYPAD_MULTIPLY",
- "KEYPAD_SUBTRACT",
- "KEYPAD_ADD,"
- "KEYPAD_ENTER",
- "KEYPAD_0",
- "KEYPAD_1",
- "KEYPAD_2",
- "KEYPAD_3",
- "KEYPAD_4",
- "KEYPAD_5",
- "KEYPAD_6",
- "KEYPAD_7",
- "KEYPAD_8",
- "KEYPAD_9",
- "KEYPAD_DECIMAL_POINT",
- "NUM_SPECIALS"]
-
-_key_dict = dict([(k, i) for i, k in enumerate(_keys)])
-
-KeyType = C_EnumerationType("KeyType",
- (c_uint,),
- _key_dict)
diff --git a/dfhack-python/flags.py b/dfhack-python/flags.py
deleted file mode 100644
index e058ab511..000000000
--- a/dfhack-python/flags.py
+++ /dev/null
@@ -1,201 +0,0 @@
-# -*- coding: utf-8 -*-
-from ctypes import Structure, Union, c_uint
-from enum import *
-
-class DesignationStruct(Structure):
- _fields_ = [("flow_size", c_uint, 3),
- ("pile", c_uint, 1),
- ("dig", DesignationType, 3),
- ("smooth", c_uint, 2),
- ("hidden", c_uint, 1),
- ("geolayer_index", c_uint, 4),
- ("light", c_uint, 1),
- ("subterranean", c_uint, 1),
- ("skyview", c_uint, 1),
- ("biome", c_uint, 4),
- ("liquid_type", c_uint, 1),
- ("water_table", c_uint, 1),
- ("rained", c_uint, 1),
- ("traffic", c_uint, 2),
- ("flow_forbid", c_uint, 1),
- ("liquid_static", c_uint, 1),
- ("feature_local", c_uint, 1),
- ("feature_global", c_uint, 1),
- ("water_stagnant", c_uint, 1),
- ("water_salt", c_uint, 1)]
-
-class DesignationFlags(Union):
- _fields_ = [("whole", c_uint, 32),
- ("bits", DesignationStruct)]
-
- def __init__(self, initial = 0):
- self.whole = initial
-
- def __int__(self):
- return self.whole
-
-class OccupancyStruct(Structure):
- _fields_ = [("building", c_uint, 3),
- ("unit", c_uint, 1),
- ("unit_grounded", c_uint, 1),
- ("item", c_uint, 1),
- ("splatter", c_uint, 26)]
-
-class OccupancyFlags(Union):
- _fields_ = [("whole", c_uint, 32),
- ("bits", OccupancyStruct)]
-
- def __init__(self, initial = 0):
- self.whole = initial
-
- def __int__(self):
- return self.whole
-
-class CreatureStruct1(Structure):
- _fields_ = [("move_state", c_uint, 1),
- ("dead", c_uint, 1),
- ("has_mood", c_uint, 1),
- ("had_mood", c_uint, 1),
- ("marauder", c_uint, 1),
- ("drowning", c_uint, 1),
- ("merchant", c_uint, 1),
- ("forest", c_uint, 1),
- ("left", c_uint, 1),
- ("rider", c_uint, 1),
- ("incoming", c_uint, 1),
- ("diplomat", c_uint, 1),
- ("zombie", c_uint, 1),
- ("skeleton", c_uint, 1),
- ("can_swap", c_uint, 1),
- ("on_ground", c_uint, 1),
- ("projectile", c_uint, 1),
- ("active_invader", c_uint, 1),
- ("hidden_in_ambush", c_uint, 1),
- ("invader_origin", c_uint, 1),
- ("coward", c_uint, 1),
- ("hidden_ambusher", c_uint, 1),
- ("invades", c_uint, 1),
- ("check_flows", c_uint, 1),
- ("ridden", c_uint, 1),
- ("caged", c_uint, 1),
- ("tame", c_uint, 1),
- ("chained", c_uint, 1),
- ("royal_guard", c_uint, 1),
- ("fortress_guard", c_uint, 1),
- ("suppress_wield", c_uint, 1),
- ("important_historical_figure", c_uint, 1)]
-
-class CreatureFlags1(Union):
- _fields_ = [("whole", c_uint, 32),
- ("bits", CreatureStruct1)]
-
- def __init__(self, initial = 0):
- self.whole = initial
-
- def __int__(self):
- return self.whole
-
-class CreatureStruct2(Structure):
- _fields_ = [("swimming", c_uint, 1),
- ("sparring", c_uint, 1),
- ("no_notify", c_uint, 1),
- ("unused", c_uint, 1),
- ("calculated_nerves", c_uint, 1),
- ("calculated_bodyparts", c_uint, 1),
- ("important_historical_figure", c_uint, 1),
- ("killed", c_uint, 1),
- ("cleanup_1", c_uint, 1),
- ("cleanup_2", c_uint, 1),
- ("cleanup_3", c_uint, 1),
- ("for_trade", c_uint, 1),
- ("trade_resolved", c_uint, 1),
- ("has_breaks", c_uint, 1),
- ("gutted", c_uint, 1),
- ("circulatory_spray", c_uint, 1),
- ("locked_in_for_trading", c_uint, 1),
- ("slaughter", c_uint, 1),
- ("underworld", c_uint, 1),
- ("resident", c_uint, 1),
- ("cleanup_4", c_uint, 1),
- ("calculated_insulation", c_uint, 1),
- ("visitor_uninvited", c_uint, 1),
- ("visitor", c_uint, 1),
- ("calculated_inventory", c_uint, 1),
- ("vision_good", c_uint, 1),
- ("vision_damaged", c_uint, 1),
- ("vision_missing", c_uint, 1),
- ("breathing_good", c_uint, 1),
- ("breathing_problem", c_uint, 1),
- ("roaming_wilderness_population_source", c_uint, 1),
- ("roaming_wilderness_population_source_not_a_map_feature", c_uint, 1)]
-
-class CreatureFlags2(Union):
- _fields_ = [("whole", c_uint, 32),
- ("bits", CreatureStruct2)]
-
- def __init__(self, initial = 0):
- self.whole = initial
-
- def __int__(self):
- return self.whole
-
-class ItemStruct(Structure):
- _fields_ = [("on_ground", c_uint, 1),
- ("in_job", c_uint, 1),
- ("in_inventory", c_uint, 1),
- ("u_ngrd1", c_uint, 1),
- ("in_workshop", c_uint, 1),
- ("u_ngrd2", c_uint, 1),
- ("u_ngrd3", c_uint, 1),
- ("rotten", c_uint, 1),
- ("unk1", c_uint, 1),
- ("u_ngrd4", c_uint, 1),
- ("unk2", c_uint, 1),
- ("u_ngrd5", c_uint, 1),
- ("unk3", c_uint, 1),
- ("u_ngrd6", c_uint, 1),
- ("narrow", c_uint, 1),
- ("u_ngrd7", c_uint, 1),
- ("worn", c_uint, 1),
- ("unk4", c_uint, 1),
- ("u_ngrd8", c_uint, 1),
- ("forbid", c_uint, 1),
- ("unk5", c_uint, 1),
- ("dump", c_uint, 1),
- ("on_fire", c_uint, 1),
- ("melt", c_uint, 1),
- ("hidden", c_uint, 1),
- ("u_ngrd9", c_uint, 1),
- ("unk6", c_uint, 1),
- ("unk7", c_uint, 1),
- ("unk8", c_uint, 1),
- ("unk9", c_uint, 1),
- ("unk10", c_uint, 1),
- ("unk11", c_uint, 1)]
-
-class ItemFlags(Union):
- _fields_ = [("whole", c_uint, 32),
- ("bits", ItemStruct)]
-
- def __init__(self, initial = 0):
- self.whole = initial
-
- def __int__(self):
- return self.whole
-
-class BlockFlagStruct(Structure):
- _fields_ = [("designated", c_uint, 1),
- ("unk_1", c_uint, 1),
- ("liquid_1", c_uint, 1),
- ("liquid_2", c_uint, 1),
- ("unk_2", c_uint, 28)]
-
-class BlockFlags(Union):
- _fields_ = [("whole", c_uint, 32),
- ("bits", BlockFlagStruct)]
-
- def __init__(self, inital = 0):
- self.whole = initial
-
- def __int__(self):
- return self.whole
diff --git a/dfhack-python/gui.py b/dfhack-python/gui.py
deleted file mode 100644
index 2a050d782..000000000
--- a/dfhack-python/gui.py
+++ /dev/null
@@ -1,73 +0,0 @@
-from ctypes import c_void_p, c_int, c_uint, byref
-from dftypes import libdfhack, ViewScreen, Hotkey
-from util import check_pointer_cache
-
-libdfhack.Gui_getViewCoords.argtypes = [ c_void_p, POINTER(c_int), POINTER(c_int), POINTER(c_int) ]
-libdfhack.Gui_setViewCoords.argtypes = [ c_void_p, c_int, c_int, c_int ]
-
-libdfhack.Gui_getCursorCoords.argtypes = [ c_void_p, POINTER(c_int), POINTER(c_int), POINTER(c_int) ]
-libdfhack.Gui_setCursorCoords.argtypes = [ c_void_p, c_int, c_int, c_int ]
-
-libdfhack.Gui_getWindowSize.argtypes = [ c_void_p, POINTER(c_int), POINTER(c_int) ]
-
-libdfhack.Gui_ReadViewScreen.argtypes = [ c_void_p, c_void_p ]
-
-libdfhack.Gui_ReadHotkeys.restype = c_void_p
-
-libdfhack.Gui_getScreenTiles.argtypes = [ c_void_p, c_int, c_int ]
-libdfhack.Gui_getScreenTiles.restype = c_void_p
-
-class Gui(object):
- def __init__(self, ptr):
- self._gui_ptr = ptr
-
- def start(self):
- return libdfhack.Gui_Start(self._gui_ptr) > 0
-
- def finish(self):
- return libdfhack.Gui_Finish(self._gui_ptr) > 0
-
- def read_view_screen(self):
- s = ViewScreen()
-
- if libdfhack.Gui_ReadViewScreen(self._gui_ptr, byref(s)) > 0:
- return s
- else:
- return None
-
- def get_view_coords(self):
- x, y, z = (0, 0, 0)
-
- if libdfhack.Gui_getViewCoords(self._gui_ptr, byref(x), byref(y), byref(z)) > 0:
- return (x, y, z)
- else:
- return (-1, -1, -1)
-
- def set_view_coords(self, x, y, z):
- libdfhack.Gui_setViewCoords(self._gui_ptr, x, y, z)
-
- def get_cursor_coords(self):
- x, y, z = (0, 0, 0)
-
- if libdfhack.Gui_getCursorCoords(self._gui_ptr, byref(x), byref(y), byref(z)) > 0:
- return (x, y, z)
- else:
- return (-1, -1, -1)
-
- def set_cursor_coords(self, x, y, z):
- libdfhack.Gui_setCursorCoords(self._gui_ptr, x, y, z)
-
- def read_hotkeys(self):
- return check_pointer_cache(libdfhack.Gui_ReadHotkeys(self._gui_ptr))
-
- def get_screen_tiles(self, width, height):
- return check_pointer_cache(libdfhack.Gui_getScreenTiles(self._gui_ptr, width, height))
-
- @property
- def window_size(self):
- width, height = (0, 0)
-
- if libdfhack.Gui_getWindowSize(self._gui_ptr, byref(width), byref(height)) > 0:
- return (width, height)
- else:
- return (-1, -1)
diff --git a/dfhack-python/items.py b/dfhack-python/items.py
deleted file mode 100644
index 8c5d6625e..000000000
--- a/dfhack-python/items.py
+++ /dev/null
@@ -1,33 +0,0 @@
-from ctypes import *
-from dftypes import *
-
-libdfhack.Items_getItemDescription.argtypes = [ c_void_p, c_uint, c_void_ptr, _arr_create_func ]
-libdfhack.Items_getItemDescription.restype = c_char_p
-libdfhack.Items_getItemClass.argtypes = [ c_void_p, c_int, _arr_create_func ]
-libdfhack.Item_getItemClass.restype = c_char_p
-
-class Items(object):
- def __init__(self, ptr):
- self._i_ptr = ptr
-
- def get_item_description(self, itemptr, materials):
- def get_callback(count):
- item_string = create_string_buffer(count)
-
- return byref(item_string)
-
- item_string = None
- callback = _arr_create_func(get_callback)
-
- return libdfhack.Items_getItemDescription(self._i_ptr, itemptr, materials, callback)
-
- def get_item_class(self, index):
- def get_callback(count):
- item_string = create_string_buffer(count)
-
- return byref(item_string)
-
- item_string = None
- callback = _arr_create_func(get_callback)
-
- return libdfhack.Items_getItemClass(self._i_ptr, index, callback)
diff --git a/dfhack-python/maps.py b/dfhack-python/maps.py
deleted file mode 100644
index 616eda056..000000000
--- a/dfhack-python/maps.py
+++ /dev/null
@@ -1,291 +0,0 @@
-from ctypes import *
-from dftypes import *
-from util import _uintify, int_ptr, uint_ptr, check_pointer_cache
-
-_MAX_DIM = 0x300
-_MAX_DIM_SQR = _MAX_DIM * _MAX_DIM
-
-libdfhack.Maps_getSize.argtypes = [ c_void_p, uint_ptr, uint_ptr, uint_ptr ]
-libdfhack.Maps_getPosition.argtypes = [ c_void_p, int_ptr, int_ptr, int_ptr ]
-
-libdfhack.Maps_ReadTileTypes.argtypes = [ c_void_p, c_uint, c_uint, c_uint, POINTER(TileTypes40d) ]
-libdfhack.Maps_WriteTileTypes.argtypes = [ c_void_p, c_uint, c_uint, c_uint, POINTER(TileTypes40d) ]
-libdfhack.Maps_ReadDesignations.argtypes = [ c_void_p, c_uint, c_uint, c_uint, POINTER(Designations40d) ]
-libdfhack.Maps_WriteDesignations.argtypes = [ c_void_p, c_uint, c_uint, c_uint, POINTER(Designations40d) ]
-libdfhack.Maps_ReadTemperatures.argtypes = [ c_void_p, c_uint, c_uint, c_uint, POINTER(Temperatures) ]
-libdfhack.Maps_WriteTemperatures.argtypes = [ c_void_p, c_uint, c_uint, c_uint, POINTER(Temperatures) ]
-libdfhack.Maps_ReadOccupancy.argtypes = [ c_void_p, c_uint, c_uint, c_uint, POINTER(Occupancies40d) ]
-libdfhack.Maps_WriteOccupancy.argtypes = [ c_void_p, c_uint, c_uint, c_uint, POINTER(Occupancies40d) ]
-libdfhack.Maps_ReadRegionOffsets.argtypes = [ c_void_p, c_uint, c_uint, c_uint, POINTER(BiomeIndices40d) ]
-
-libdfhack.Maps_ReadVegetation.restype = c_void_p
-
-libdfhack.Maps_ReadStandardVeins.argtypes = [ c_void_p, c_uint, c_uint, c_uint ]
-libdfhack.Maps_ReadFrozenVeins.argtypes = [ c_void_p, c_uint, c_uint, c_uint ]
-libdfhack.Maps_ReadSpatterVeins.argtypes = [ c_void_p, c_uint, c_uint, c_uint ]
-libdfhack.Maps_ReadGrassVeins.argtypes = [ c_void_p, c_uint, c_uint, c_uint ]
-libdfhack.Maps_ReadWorldConstructions.argtypes = [ c_void_p, c_uint, c_uint, c_uint ]
-
-libdfhack.Maps_ReadStandardVeins.restype = c_void_p
-libdfhack.Maps_ReadFrozenVeins.restype = c_void_p
-libdfhack.Maps_ReadSpatterVeins.restype = c_void_p
-libdfhack.Maps_ReadGrassVeins.restype = c_void_p
-libdfhack.Maps_ReadWorldConstructions.restype = c_void_p
-
-libdfhack.Maps_ReadLocalFeatures.restype = c_void_p
-
-class Maps(object):
- def __init__(self, ptr):
- self._map_ptr = ptr
-
- def start(self):
- return libdfhack.Maps_Start(self._map_ptr) > 0
-
- def finish(self):
- return libdfhack.Maps_Finish(self._map_ptr) > 0
-
- def is_valid_block(self, x, y, z):
- return libdfhack.Maps_isValidBlock(self._map_ptr, *_uintify(x, y, z)) > 0
-
- def read_tile_types(self, x, y, z):
- tt = TileTypes40d()
-
- ux, uy, uz = _uintify(x, y, z)
-
- if libdfhack.Maps_ReadTileTypes(self._map_ptr, ux, uy, uz, tt) > 0:
- return tt
- else:
- return None
-
- def write_tile_types(self, x, y, z, tt):
- ux, uy, uz = _uintify(x, y, z)
-
- return libdfhack.Maps_WriteTileTypes(self._map_ptr, ux, uy, uz, tt) > 0
-
- def read_designations(self, x, y, z):
- d = Designations40d()
-
- ux, uy, uz = _uintify(x, y, z)
-
- if libdfhack.Maps_ReadDesignations(self._map_ptr, ux, uy, uz, byref(d)) > 0:
- return d
- else:
- return None
-
- def write_designations(self, x, y, z, d):
- ux, uy, uz = _uintify(x, y, z)
-
- return libdfhack.Maps_WriteDesignations(self._map_ptr, ux, uy, uz, byref(d)) > 0
-
- def read_temperatures(self, x, y, z):
- t = Temperatures()
-
- ux, uy, uz = _uintify(x, y, z)
-
- if libdfhack.Maps_ReadDesignations(self._map_ptr, ux, uy, uz, t) > 0:
- return t
- else:
- return None
-
- def write_temperatures(self, x, y, z, t):
- ux, uy, uz = _uintify(x, y, z)
-
- return libdfhack.Maps_WriteDesignations(self._map_ptr, ux, uy, uz, t) > 0
-
- def read_occupancy(self, x, y, z):
- o = Occupancies40d()
-
- ux, uy, uz = _uintify(x, y, z)
-
- if libdfhack.Maps_ReadDesignations(self._map_ptr, ux, uy, uz, o) > 0:
- return o
- else:
- return None
-
- def write_occupancy(self, x, y, z, o):
- ux, uy, uz = _uintify(x, y, z)
-
- return libdfhack.Maps_WriteDesignations(self._map_ptr, ux, uy, uz, byref(o)) > 0
-
- def read_dirty_bit(self, x, y, z):
- bit = c_int(0)
-
- ux, uy, uz = _uintify(x, y, z)
-
- if libdfhack.Maps_ReadDirtyBit(self._map_ptr, ux, uy, uz, byref(bit)) > 0:
- if bit > 0:
- return True
- else:
- return False
- else:
- return None
-
- def write_dirty_bit(self, x, y, z, dirty):
- ux, uy, uz = _uintify(x, y, z)
-
- return libdfhack.Maps_WriteDirtyBit(self._map_ptr, ux, uy, uz, c_int(dirty)) > 0
-
- def read_features(self, x, y, z):
- lf = c_short()
- gf = c_short()
-
- ux, uy, uz = _uintify(x, y, z)
-
- libdfhack.Maps_ReadFeatures(self._map_ptr, ux, uy, uz, byref(lf), byref(fg))
-
- return (lf, gf)
-
- def write_local_feature(self, x, y, z, local_feature = -1):
- ux, uy, uz = _uintify(x, y, z)
-
- return libdfhack.Maps_WriteLocalFeature(self._map_ptr, ux, uy, uz, c_short(local_feature)) > 0
-
- def write_global_feature(self, x, y, z, global_feature = -1):
- ux, uy, uz = _uintify(x, y, z)
-
- return libdfhack.Maps_WriteGlobalFeature(self._map_ptr, ux, uy, uz, c_short(global_feature)) > 0
-
- def read_block_flags(self, x, y, z):
- bf = BlockFlags()
-
- ux, uy, uz = _uintify(x, y, z)
-
- if libdfhack.Maps_ReadBlockFlags(self._map_ptr, ux, uy, uz, byref(bf)) > 0:
- return bf
- else:
- return None
-
- def write_block_flags(self, x, y, z, block_flags):
- ux, uy, uz = _uintify(x, y, z)
-
- return libdfhack.Maps_WriteBlockFlags(self._map_ptr, ux, uy, uz, block_flags) > 0
-
- def read_region_offsets(self, x, y, z):
- bi = BiomeIndices40d()
-
- ux, uy, uz = _uintify(x, y, z)
-
- if libdfhack.Maps_ReadRegionOffsets(self._map_ptr, ux, uy, uz, byref(bi)) > 0:
- return bi
- else:
- return None
-
- def read_veins(self, x, y, z):
- ux, uy, uz = _uintify(x, y, z)
-
- return check_pointer_cache(libdfhack.Maps_ReadStandardVeins(self._map_ptr, ux, uy, uz))
-
- def read_frozen_veins(self, x, y, z):
- ux, uy, uz = _uintify(x, y, z)
-
- return check_pointer_cache(libdfhack.Maps_ReadFrozenVeins(self._map_ptr, ux, uy, uz))
-
- def read_spatter_veins(self, x, y, z):
- ux, uy, uz = _uintify(x, y, z)
-
- return check_pointer_cache(libdfhack.Maps_ReadSpatterVeins(self._map_ptr, ux, uy, uz))
-
- def read_grass_veins(self, x, y, z):
- ux, uy, uz = _uintify(x, y, z)
-
- return check_pointer_cache(libdfhack.Maps_ReadGrassVeins(self._map_ptr, ux, uy, uz))
-
- def read_world_constructions(self, x, y, z):
- ux, uy, uz = _uintify(x, y, z)
-
- return check_pointer_cache(libdfhack.Maps_ReadWorldConstructions(self._map_ptr, ux, uy, uz))
-
- def read_vegetation(self, x, y, z):
- ux, uy, uz = _uintify(x, y, z)
-
- return check_pointer_cache(libdfhack.Maps_ReadVegetation(self._map_ptr, ux, uy, uz))
-
- def read_local_features(self):
- f = libdfhack.Maps_ReadLocalFeatures(self._map_ptr)
- feature_dict = {}
- f_arr = check_pointer_cache(f, False)
-
- if f_arr is not None:
- for node in f_arr:
- c = node.coordinate.xyz
- coord = MapPoint(c.x, c.y, c.z)
- f_list = [node.features[i] for i in xrange(node.feature_length)]
- feature_dict[coord] = f_list
-
- return feature_dict
-
- @property
- def size(self):
- x, y, z = (c_uint(0), c_uint(0), c_uint(0))
-
- retval = libdfhack.Maps_getSize(self._map_ptr, byref(x), byref(y), byref(z))
-
- return (int(x.value), int(y.value), int(z.value))
-
- @property
- def position(self):
- x, y, z = (c_int(0), c_int(0), c_int(0))
-
- libdfhack.Maps_getPosition(self._map_ptr, byref(x), byref(y), byref(z))
-
- return (int(x.value), int(y.value), int(z.value))
-
-class MapPoint(object):
- __slots__ = ["_x", "_y", "_z", "_cmp_val"]
-
- def __init__(self, x = 0, y = 0, z = 0):
- self._x, self._y, self._z = x, y, z
-
- self._cmp_val = self._get_cmp_value()
-
- def _val_set(self, which, val):
- if which == 0:
- self._x = val
- elif which == 1:
- self._y = val
- elif which == 2:
- self._z = val
-
- self._cmp_val = self._get_cmp_value()
-
- x = property(fget = lambda self: self._x, fset = lambda self, v: self._val_set(0, v))
- y = property(fget = lambda self: self._y, fset = lambda self, v: self._val_set(1, v))
- z = property(fget = lambda self: self._z, fset = lambda self, v: self._val_set(2, v))
-
- def _get_cmp_value(self):
- return (self.z * _MAX_DIM_SQR) + (self.y * _MAX_DIM) + self.x
-
- #comparison operators
- def __eq__(self, other):
- return self.x == other.x and self.y == other.y and self.z == other.z
-
- def __ne__(self, other):
- return not self == other
-
- def __lt__(self, other):
- return self._cmp_val < other._cmp_val
-
- def __le__(self, other):
- return self < other or self == other
-
- def __gt__(self, other):
- return self._cmp_val > other._cmp_val
-
- def __ge__(self, other):
- return self > other or self == other
-
- #arithmetic operators
- def __add__(self, num):
- return MapPoint(self.x, self.y, self.z + num)
-
- def __sub__(self, num):
- return MapPoint(self.x, self.y, self.z - num)
-
- def __div__(self, num):
- return MapPoint(self.x / num, self.y / num, self.z)
-
- def __mul__(self, num):
- return MapPoint(self.x * num, self.y * num, self.z)
-
- def __mod__(self, num):
- return MapPoint(self.x % num, self.y % num, self.z)
\ No newline at end of file
diff --git a/dfhack-python/materials.py b/dfhack-python/materials.py
deleted file mode 100644
index 37bfcf2ff..000000000
--- a/dfhack-python/materials.py
+++ /dev/null
@@ -1,166 +0,0 @@
-from ctypes import *
-import dftypes
-from dftypes import libdfhack, Matgloss, CreatureType, DescriptorColor, MatglossOther
-from util import check_pointer_cache
-
-libdfhack.Materials_getInorganic.restype = c_void_p
-libdfhack.Materials_getOrganic.restype = c_void_p
-libdfhack.Materials_getTree.restype = c_void_p
-libdfhack.Materials_getPlant.restype = c_void_p
-libdfhack.Materials_getRace.restype = c_void_p
-libdfhack.Materials_getRaceEx.restype = c_void_p
-libdfhack.Materials_getColor.restype = c_void_p
-libdfhack.Materials_getOther.restype = c_void_p
-libdfhack.Materials_getAllDesc.restype = c_void_p
-
-class Materials(object):
- def __init__(self, ptr):
- self._mat_ptr = ptr
-
- self.inorganic = None
- self.organic = None
- self.tree = None
- self.plant = None
- self.race = None
- self.race_ex = None
- self.color = None
- self.other = None
-
- def _get_inorganic(self):
- self.inorganic = check_pointer_cache(libdfhack.Materials_getInorganic(self._mat_ptr))
-
- def _get_organic(self):
- self.organic = check_pointer_cache(libdfhack.Materials_getOrganic(self._mat_ptr))
-
- def _get_tree(self):
- self.tree = check_pointer_cache(libdfhack.Materials_getTree(self._mat_ptr))
-
- def _get_plant(self):
- self.plant = check_pointer_cache(libdfhack.Materials_getPlant(self._mat_ptr))
-
- def _get_race(self):
- self.race = check_pointer_cache(libdfhack.Materials_getRace(self._mat_ptr))
-
- def _get_race_ex(self):
- self.race_ex = check_pointer_cache(libdfhack.Materials_getRaceEx(self._mat_ptr))
-
- def _get_color(self):
- self.color = check_pointer_cache(libdfhack.Materials_getColor(self._mat_ptr))
-
- def _get_other(self):
- self.other = check_pointer_cache(libdfhack.Materials_getOther(self._mat_ptr))
-
- def _get_all(self):
- self._get_inorganic()
- self._get_organic()
- self._get_tree()
- self._get_plant()
- self._get_race()
- self._get_race_ex()
- self._get_color()
- self._get_other()
- def _clear_all(self):
- self.inorganic = None
- self.organic = None
- self.tree = None
- self.plant = None
- self.race = None
- self.race_ex = None
- self.color = None
- self.other = None
-
- def read_inorganic(self):
- result = libdfhack.Materials_ReadInorganicMaterials(self._mat_ptr) > 0
-
- if result == True:
- self._get_inorganic()
- else:
- self.inorganic = None
-
- return result
-
- def read_organic(self):
- result = libdfhack.Materials_ReadOrganicMaterials(self._mat_ptr) > 0
-
- if result == True:
- self._get_organic()
- else:
- self.organic = None
-
- return result
-
- def read_tree(self):
- result = libdfhack.Materials_ReadWoodMaterials(self._mat_ptr) > 0
-
- if result == True:
- self._get_tree()
- else:
- self.tree = None
-
- return result
-
- def read_plant(self):
- result = libdfhack.Materials_ReadPlantMaterials(self._mat_ptr) > 0
-
- if result == True:
- self._get_plant()
- else:
- self.plant = None
-
- return result
-
- def read_creature_types(self):
- result = libdfhack.Materials_ReadCreatureTypes(self._mat_ptr) > 0
-
- if result == True:
- self._get_race()
- else:
- self.race = None
-
- return result
-
- def read_creature_types_ex(self):
- result = libdfhack.Materials_ReadCreatureTypesEx(self._mat_ptr) > 0
-
- if result == True:
- self._get_race_ex()
- else:
- self.race_ex = None
-
- return result
-
- def read_descriptor_colors(self):
- result = libdfhack.Materials_ReadDescriptorColors(self._mat_ptr) > 0
-
- if result == True:
- self._get_color()
- else:
- self.color = None
-
- return result
-
- def read_others(self):
- result = libdfhack.Materials_ReadOthers(self._mat_ptr) > 0
-
- if result == True:
- self._get_other()
- else:
- self.other = None
-
- return result
-
- def read_all(self):
- result = libdfhack.Materials_ReadAllMaterials(self._mat_ptr) > 0
-
- if result == True:
- self._get_all()
- else:
- self._clear_all()
-
- return result
-
- def get_type(self, material):
- return libdfhack.Materials_getType(self._mat_ptr, byref(material))
-
- def get_description(self, material):
- return libdfhack.Materials_getDescription(self._mat_ptr, byref(material))
\ No newline at end of file
diff --git a/dfhack-python/process.py b/dfhack-python/process.py
deleted file mode 100644
index b9ac200b6..000000000
--- a/dfhack-python/process.py
+++ /dev/null
@@ -1,135 +0,0 @@
-from ctypes import *
-from dftypes import libdfhack
-from util import check_pointer_cache
-
-libdfhack.Process_readQuad.argtypes = [ c_void_p, c_uint, POINTER(c_ulong) ]
-libdfhack.Process_writeQuad.argtypes = [ c_void_p, c_uint, c_ulong ]
-
-libdfhack.Process_readDWord.argtypes = [ c_void_p, c_uint, POINTER(c_uint) ]
-libdfhack.Process_writeDWord.argtypes = [ c_void_p, c_uint, c_uint ]
-
-libdfhack.Process_readWord.argtypes = [ c_void_p, c_uint, POINTER(c_ushort) ]
-libdfhack.Process_writeWord.argtypes = [ c_void_p, c_uint, c_ushort ]
-
-libdfhack.Process_readByte.argtypes = [ c_void_p, c_uint, POINTER(c_ubyte) ]
-libdfhack.Process_writeByte.argtypes = [ c_void_p, c_uint, c_ubyte ]
-
-libdfhack.Process_readFloat.argtypes = [ c_void_p, c_uint, POINTER(c_float) ]
-
-libdfhack.Process_read.argtypes = [ c_void_p, c_uint, c_uint ]
-libdfhack.Process_read.restype = c_void_p
-
-libdfhack.Process_write.argtypes = [ c_void_p, c_uint, c_uint, POINTER(c_ubyte) ]
-
-libdfhack.Process_getThreadIDs.restype = c_void_p
-
-class Process(object):
- def __init__(self, ptr):
- self._p_ptr = ptr
-
- def attach(self):
- return libdfhack.Process_attach(self._p_ptr) > 0
-
- def detach(self):
- return libdfhack.Process_detach(self._p_ptr) > 0
-
- def suspend(self):
- return libdfhack.Process_suspend(self._p_ptr) > 0
-
- def async_suspend(self):
- return libdfhack.Process_asyncSuspend(self._p_ptr) > 0
-
- def resume(self):
- return libdfhack.Process_resume(self._p_ptr) > 0
-
- def force_resume(self):
- return libdfhack.Process_forceresume(self._p_ptr) > 0
-
- def read_quad(self, address):
- q = c_ulong(0)
-
- if libdfhack.Process_readQuad(self._p_ptr, address, byref(q)) > 0:
- return long(q.value)
- else:
- return -1
-
- def write_quad(self, address, value):
- return libdfhack.Process_writeQuad(self._p_ptr, address, value) > 0
-
- def read_dword(self, address):
- d = c_uint(0)
-
- if libdfhack.Process_readDWord(self._p_ptr, address, byref(d)) > 0:
- return int(d.value)
- else:
- return -1
-
- def write_dword(self, address, value):
- return libdfhack.Process_writeDWord(self._p_ptr, address, value) > 0
-
- def read_word(self, address):
- s = c_ushort(0)
-
- if libdfhack.Process_readWord(self._p_ptr, address, byref(s)) > 0:
- return int(s.value)
- else:
- return -1
-
- def write_word(self, address, value):
- return libdfhack.Process_writeWord(self._p_ptr, address, value) > 0
-
- def read_byte(self, address):
- b = c_ubyte(0)
-
- if libdfhack.Process_readByte(self._p_ptr, address, byref(b)) > 0:
- return int(b.value)
- else:
- return -1
-
- def write_byte(self, address, value):
- return libdfhack.Process_writeByte(self._p_ptr, address, value) > 0
-
- def read_float(self, address):
- f = c_float(0)
-
- if libdfhack.Process_readFloat(self._p_ptr, address, byref(f)) > 0:
- return float(f.value)
- else:
- return -1
-
- def read(self, address, length):
- return check_pointer_cache(libdfhack.Process_read(self._p_ptr, address, length))
-
- def write(self, address, length, buffer):
- libdfhack.Process_write(self._p_ptr, address, length, byref(buffer))
-
- def get_thread_ids(self):
- return check_pointer_cache(libdfhack.Process_getThreadIDs(self._p_ptr))
-
- def set_and_wait(self, state):
- return libdfhack.Process_SetAndWait(self._p_ptr, state) > 0
-
- @property
- def is_suspended(self):
- return libdfhack.Process_isSuspended(self._p_ptr) > 0
-
- @property
- def is_attached(self):
- return libdfhack.Process_isAttached(self._p_ptr) > 0
-
- @property
- def is_identified(self):
- return libdfhack.Process_isIdentified(self._p_ptr) > 0
-
- @property
- def is_snapshot(self):
- return libdfhack.Process_isSnapshot(self._p_ptr) > 0
-
- @property
- def pid(self):
- p = c_int(0)
-
- if libdfhack.Process_getPID(self._p_ptr, byref(p)) > 0:
- return int(p.value)
- else:
- return -1
\ No newline at end of file
diff --git a/dfhack-python/util.py b/dfhack-python/util.py
deleted file mode 100644
index 40fd990a1..000000000
--- a/dfhack-python/util.py
+++ /dev/null
@@ -1,88 +0,0 @@
-from ctypes import *
-
-int_ptr = POINTER(c_int)
-uint_ptr = POINTER(c_uint)
-
-short_ptr = POINTER(c_short)
-ushort_ptr = POINTER(c_ushort)
-
-byte_ptr = POINTER(c_byte)
-ubyte_ptr = POINTER(c_ubyte)
-
-pointer_dict = {}
-
-def check_pointer_cache(address, return_as_list = True):
- arr = None
-
- if address in pointer_dict:
- arr = pointer_dict[address][1]
- del pointer_dict[address]
-
- if return_as_list == True:
- arr = [i for i in arr]
-
- return arr
-
-def _uintify(x, y, z):
- return (c_uint(x), c_uint(y), c_uint(z))
-
-def _allocate_array(ptr, t_type, count):
- arr = (t_type * count)()
-
- p = cast(arr, POINTER(t_type))
-
- ptr[0] = p
-
- pointer_dict[addressof(arr)] = (ptr, arr, p)
-
- return 1
-
-def _alloc_int_buffer(ptr, count):
- return _allocate_array(ptr, c_int, count)
-
-_int_functype = CFUNCTYPE(c_int, POINTER(POINTER(c_int)), c_uint)
-alloc_int_buffer = _int_functype(_alloc_int_buffer)
-
-def _alloc_uint_buffer(ptr, count):
- return _allocate_array(ptr, c_uint, count)
-
-_uint_functype = CFUNCTYPE(c_int, POINTER(POINTER(c_uint)), c_uint)
-alloc_uint_buffer = _uint_functype(_alloc_uint_buffer)
-
-def _alloc_short_buffer(ptr, count):
- return _allocate_array(ptr, c_short, count)
-
-_short_functype = CFUNCTYPE(c_int, POINTER(POINTER(c_short)), c_uint)
-alloc_short_buffer = _short_functype(_alloc_short_buffer)
-
-def _alloc_ushort_buffer(ptr, count):
- return _allocate_array(ptr, c_ushort, count)
-
-_ushort_functype = CFUNCTYPE(c_int, POINTER(POINTER(c_ushort)), c_uint)
-alloc_ushort_buffer = _ushort_functype(_alloc_ushort_buffer)
-
-def _alloc_byte_buffer(ptr, count):
- return _allocate_array(ptr, c_byte, count)
-
-_byte_functype = CFUNCTYPE(c_int, POINTER(POINTER(c_byte)), c_uint)
-alloc_byte_buffer = _byte_functype(_alloc_byte_buffer)
-
-def _alloc_ubyte_buffer(ptr, count):
- return _allocate_array(ptr, c_ubyte, count)
-
-_ubyte_functype = CFUNCTYPE(c_int, POINTER(POINTER(c_ubyte)), c_uint)
-alloc_ubyte_buffer = _ubyte_functype(_alloc_ubyte_buffer)
-
-def _alloc_char_buffer(ptr, count):
- c = create_string_buffer(count)
-
- p = cast(c, POINTER(c_char))
-
- ptr[0] = p
-
- pointer_dict[id(ptr[0])] = (ptr, c, p)
-
- return 1
-
-_char_functype = CFUNCTYPE(c_int, POINTER(POINTER(c_char)), c_uint)
-alloc_char_buffer = _char_functype(_alloc_char_buffer)
diff --git a/dfhack-python/vegetation.py b/dfhack-python/vegetation.py
deleted file mode 100644
index ca1f12bd6..000000000
--- a/dfhack-python/vegetation.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from ctypes import *
-from dftypes import libdfhack, Tree
-
-class Vegetation(object):
- def __init__(self, ptr):
- self._v_ptr = ptr
-
- def start(self):
- n = c_uint(0)
-
- if libdfhack.Vegetation_Start(self._v_ptr, byref(n)) > 0:
- return int(n.value)
- else:
- return -1
-
- def finish(self):
- return libdfhack.Vegetation_Finish(self._v_ptr) > 0
-
- def read(self, index):
- t = Tree()
-
- if libdfhack.Vegetation_Read(self._v_ptr, c_uint(index), byref(t)) > 0:
- return t
- else:
- return None
diff --git a/dfhack-python/window_io.py b/dfhack-python/window_io.py
deleted file mode 100644
index 0e29b86fc..000000000
--- a/dfhack-python/window_io.py
+++ /dev/null
@@ -1,26 +0,0 @@
-from ctypes import *
-from dftypes import libdfhack
-
-libdfhack.WindowIO_TypeStr.argtypes = [ c_void_p, c_char_p, c_uint, c_byte ]
-libdfhack.WindowIO_TypeSpecial.argtypes = [ c_void_p, c_uint, c_uint, c_uint, c_uint ]
-
-class WindowIO(object):
- def __init__(self, ptr):
- self._window_io_ptr = ptr
-
- def type_str(self, s, delay = 0, use_shift = False):
- c_shift = c_byte(0)
- c_delay = c_uint(delay)
- c_s = c_char_p(s)
-
- if use_shift is True:
- c_shift = c_byte(1)
-
- return libdfhack.WindowIO_TypeStr(self._window_io_ptr, c_s, c_delay, c_shift) > 0
-
- def type_special(self, command, count = 1, delay = 0):
- c_command = c_uint(command)
- c_count = c_uint(count)
- c_delay = c_uint(delay)
-
- return libdfhack.WindowIO_TypeSpecial(self._window_io_ptr, c_command, c_count, c_delay) > 0
\ No newline at end of file
diff --git a/dfhack-python/world.py b/dfhack-python/world.py
deleted file mode 100644
index 5a6e798b0..000000000
--- a/dfhack-python/world.py
+++ /dev/null
@@ -1,80 +0,0 @@
-from ctypes import *
-from dftypes import libdfhack, GameModes
-from util import _uintify, uint_ptr
-
-libdfhack.World_ReadGameMode.argtypes = [ c_void_p, POINTER(GameModes) ]
-
-class World(object):
- def __init__(self, ptr):
- self._world_ptr = ptr
-
- def start(self):
- return libdfhack.World_Start(self._world_ptr) > 0
-
- def finish(self):
- return libdfhack.World_Finish(self._world_ptr) > 0
-
- def read_pause_state(self):
- return libdfhack.World_ReadPauseState(self._world_ptr) > 0
-
- def set_pause_state(self, pause_state):
- p = c_byte(0)
-
- if pause_state is not None and pause_state is not False:
- p.value = 1
-
- return libdfhack.World_SetPauseState(self._world_ptr, p) > 0
-
- def read_current_tick(self):
- tick = c_uint(0)
-
- if libdfhack.World_ReadCurrentTick(self._world_ptr, byref(tick)) > 0:
- return int(tick)
- else:
- return -1
-
- def read_current_year(self):
- year = c_uint(0)
-
- if libdfhack.World_ReadCurrentYear(self._world_ptr, byref(year)) > 0:
- return int(year)
- else:
- return -1
-
- def read_current_month(self):
- month = c_uint(0)
-
- if libdfhack.World_ReadCurrentMonth(self._world_ptr, byref(month)) > 0:
- return int(month)
- else:
- return -1
-
- def read_current_day(self):
- day = c_uint(0)
-
- if libdfhack.World_ReadCurrentDay(self._world_ptr, byref(day)) > 0:
- return int(day)
- else:
- return -1
-
- def read_current_weather(self):
- weather = c_ubyte(0)
-
- if libdfhack.World_ReadCurrentWeather(self._world_ptr, byref(weather)) > 0:
- return int(weather)
- else:
- return -1
-
- def write_current_weather(self, weather):
- return libdfhack.World_WriteCurrentWeather(self._world_ptr, c_ubyte(weather))
-
- def read_game_mode(self):
- game_modes = GameModes()
-
- if libdfhack.World_ReadGameMode(self._world_ptr, byref(game_modes)) > 0:
- return game_modes
- else:
- return None
-
- def write_game_mode(self, game_mode):
- return libdfhack.World_WriteGameMode(self._world_ptr, game_modes) > 0
\ No newline at end of file
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index d396820b4..81ffbf49e 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -1,10 +1,10 @@
-if(NOT DEFINED DFHACK_CONSISTENCY)
- MESSAGE(FATAL_ERROR "Please build the whole thing, not parts. You can turn parts on/off using options.")
-ENDIF()
-
-PROJECT (dfhack-library)
+PROJECT (dfapi)
cmake_minimum_required(VERSION 2.8)
+## build options
+OPTION(BUILD_DEVEL "Install/package files required for development (For SDK)." OFF)
+OPTION(BUILD_DOXYGEN "Create/install/package doxygen documentation for DFHack (For SDK)." OFF)
+
include_directories (include)
include_directories (depends/md5)
include_directories (depends/tinyxml)
@@ -96,11 +96,6 @@ ELSE()
LIST(APPEND PROJECT_SRCS ${PROJECT_SRCS_WINDOWS})
ENDIF()
-IF(BUILD_DFHACK_C_BINDINGS)
- LIST(APPEND PROJECT_HDRS ${PROJECT_C_HDRS})
- LIST(APPEND PROJECT_SRCS ${PROJECT_C_SRCS})
-ENDIF()
-
SET_SOURCE_FILES_PROPERTIES( ${PROJECT_HDRS} PROPERTIES HEADER_FILE_ONLY TRUE )
LIST(APPEND PROJECT_SRCS ${PROJECT_HDRS})
@@ -109,12 +104,11 @@ ADD_DEFINITIONS(-DBUILD_DFHACK_LIB)
IF(UNIX)
add_definitions(-DLINUX_BUILD)
- find_library(X11_LIBRARY X11)
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall")
SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -m32")
SET(CMAKE_C_FLAGS "-fvisibility=hidden -m32")
- SET(PROJECT_LIBS ${X11_LIBRARY} rt )
+ SET(PROJECT_LIBS rt )
ELSE()
IF(MSVC)
SET(PROJECT_LIBS psapi ${dfhack_SOURCE_DIR}/library/depends/ntdll/ntdll.lib)
@@ -141,7 +135,7 @@ install(TARGETS dfhack
install(FILES ${dfhack_SOURCE_DIR}/Memory.xml
DESTINATION ${DFHACK_DATA_DESTINATION}) #linux: share/dfhack
-if(BUILD_DFHACK_DEVEL)
+if(BUILD_DEVEL)
if(WIN32)
install(TARGETS dfhack
ARCHIVE DESTINATION ${DFHACK_DEVLIB_DESTINATION})
@@ -151,4 +145,8 @@ if(BUILD_DFHACK_DEVEL)
install(DIRECTORY include/
DESTINATION ${DFHACK_INCLUDES_DESTINATION}
FILES_MATCHING PATTERN "*.h" ) #linux: include
+ # Building the docs
+ IF(BUILD_DOXYGEN)
+ add_subdirectory (doc)
+ ENDIF()
endif()
diff --git a/library/Core-linux.cpp b/library/Core-linux.cpp
index 4fe0ccdc9..3c9c146e7 100644
--- a/library/Core-linux.cpp
+++ b/library/Core-linux.cpp
@@ -117,6 +117,24 @@ DFhackCExport void SDL_DestroyMutex(DFMutex * mutex)
_SDL_DestroyMutex(mutex);
}
+static void * (*_SDL_LoadFunction)(DFLibrary *handle, const char *name) = 0;
+DFhackCExport void * SDL_LoadFunction(DFLibrary *handle, const char *name)
+{
+ return _SDL_LoadFunction(handle, name);
+}
+
+static DFLibrary * (*_SDL_LoadObject)(const char *sofile) = 0;
+DFhackCExport DFLibrary * SDL_LoadObject(const char *sofile)
+{
+ return _SDL_LoadObject(sofile);
+}
+
+static void (*_SDL_UnloadObject)(DFLibrary * handle) = 0;
+DFhackCExport void SDL_UnloadObject(DFLibrary * handle)
+{
+ _SDL_UnloadObject(handle);
+}
+
// hook - called at program exit
DFhackCExport void SDL_Quit(void)
{
@@ -141,6 +159,9 @@ DFhackCExport int SDL_Init(uint32_t flags)
_SDL_DestroyMutex = (void (*)(DFMutex*))dlsym(RTLD_NEXT,"SDL_DestroyMutex");
_SDL_mutexP = (int (*)(DFMutex*))dlsym(RTLD_NEXT,"SDL_mutexP");
_SDL_mutexV = (int (*)(DFMutex*))dlsym(RTLD_NEXT,"SDL_mutexV");
+ _SDL_LoadFunction = (void*(*)(DFLibrary*, const char*))dlsym(RTLD_NEXT,"SDL_LoadFunction");
+ _SDL_LoadObject = (DFLibrary*(*)(const char*))dlsym(RTLD_NEXT,"SDL_LoadObject");
+ _SDL_UnloadObject = (void (*)(DFLibrary*))dlsym(RTLD_NEXT,"SDL_UnloadObject");
// check if we got them
if(_SDL_Init && _SDL_Quit && _SDL_CreateThread && _SDL_CreateMutex && _SDL_DestroyMutex && _SDL_mutexP && _SDL_mutexV)
diff --git a/library/Core-windows.cpp b/library/Core-windows.cpp
index 67fedb93f..9817233e2 100644
--- a/library/Core-windows.cpp
+++ b/library/Core-windows.cpp
@@ -512,20 +512,20 @@ SDL_UnloadObject
extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
*/
-static vPtr (*_SDL_LoadFunction)(void *handle, const char *name) = 0;
-DFhackCExport vPtr SDL_LoadFunction(void *handle, const char *name)
+static void * (*_SDL_LoadFunction)(DFLibrary *handle, const char *name) = 0;
+DFhackCExport void * SDL_LoadFunction(DFLibrary *handle, const char *name)
{
return _SDL_LoadFunction(handle, name);
}
-static vPtr (*_SDL_LoadObject)(const char *sofile) = 0;
-DFhackCExport vPtr SDL_LoadObject(const char *sofile)
+static DFLibrary * (*_SDL_LoadObject)(const char *sofile) = 0;
+DFhackCExport DFLibrary * SDL_LoadObject(const char *sofile)
{
return _SDL_LoadObject(sofile);
}
-static void (*_SDL_UnloadObject)(vPtr handle) = 0;
-DFhackCExport void SDL_UnloadObject(vPtr handle)
+static void (*_SDL_UnloadObject)(DFLibrary * handle) = 0;
+DFhackCExport void SDL_UnloadObject(DFLibrary * handle)
{
_SDL_UnloadObject(handle);
}
@@ -803,13 +803,13 @@ bool FirstCall()
// stuff for SDL_Image
_SDL_ClearError = (void (*)())GetProcAddress(realSDLlib,"SDL_ClearError");
_SDL_Error = (void (*)(int))GetProcAddress(realSDLlib,"SDL_Error");
- _SDL_LoadFunction = (void*(*)(void*, const char*))GetProcAddress(realSDLlib,"SDL_LoadFunction");
- _SDL_LoadObject = (void*(*)(const char*))GetProcAddress(realSDLlib,"SDL_LoadObject");
+ _SDL_LoadFunction = (void*(*)(DFLibrary*, const char*))GetProcAddress(realSDLlib,"SDL_LoadFunction");
+ _SDL_LoadObject = (DFLibrary*(*)(const char*))GetProcAddress(realSDLlib,"SDL_LoadObject");
_SDL_ReadBE32 = (uint32_t (*)(void*))GetProcAddress(realSDLlib,"SDL_ReadBE32");
_SDL_ReadLE16 = (uint16_t (*)(void*))GetProcAddress(realSDLlib,"SDL_ReadLE16");
_SDL_ReadLE32 = (uint32_t (*)(void*))GetProcAddress(realSDLlib,"SDL_ReadLE32");
_SDL_SetError = (void (*)(const char*, ...))GetProcAddress(realSDLlib,"SDL_SetError");
- _SDL_UnloadObject = (void (*)(void*))GetProcAddress(realSDLlib,"SDL_UnloadObject");
+ _SDL_UnloadObject = (void (*)(DFLibrary*))GetProcAddress(realSDLlib,"SDL_UnloadObject");
_SDL_FillRect = (int (*)(void*,void*,uint32_t))GetProcAddress(realSDLlib,"SDL_FillRect");
// new in DF 0.31.04
diff --git a/library/Core.cpp b/library/Core.cpp
index 712e31a64..2788672a1 100644
--- a/library/Core.cpp
+++ b/library/Core.cpp
@@ -23,7 +23,6 @@ distribution.
*/
#include "Internal.h"
-#include "PlatformInternal.h"
#include
#include
@@ -41,8 +40,8 @@ using namespace std;
#include "dfhack/modules/Gui.h"
#include "dfhack/modules/Vegetation.h"
#include "dfhack/modules/Maps.h"
-#include
-#include "rlutil.h"
+#include "dfhack/modules/World.h"
+#include "dfhack/extra/rlutil.h"
#include
using namespace DFHack;
@@ -92,6 +91,7 @@ struct hideblock
uint32_t z;
uint8_t hiddens [16][16];
};
+
int reveal (void)
{
Core & c = DFHack::Core::getInstance();
@@ -288,6 +288,7 @@ int Core::Shutdown ( void )
#define MODULE_GETTER(TYPE) \
TYPE * Core::get##TYPE() \
{ \
+ if(errorstate) return NULL;\
if(!s_mods.p##TYPE)\
{\
Module * mod = create##TYPE();\
diff --git a/library/Process-linux.cpp b/library/Process-linux.cpp
index e6b4d050d..da5be6e9b 100644
--- a/library/Process-linux.cpp
+++ b/library/Process-linux.cpp
@@ -23,7 +23,8 @@ distribution.
*/
#include "Internal.h"
-#include "PlatformInternal.h"
+#include
+#include
#include
#include
@@ -33,14 +34,11 @@ distribution.
#include
using namespace std;
+#include
#include "dfhack/Process.h"
#include "dfhack/VersionInfoFactory.h"
#include "dfhack/VersionInfo.h"
#include "dfhack/Error.h"
-#include
-#include
-#include
-#include
using namespace DFHack;
Process::Process(VersionInfoFactory * known_versions)
diff --git a/library/Process-windows.cpp b/library/Process-windows.cpp
index a54a0c757..4aa3adc96 100644
--- a/library/Process-windows.cpp
+++ b/library/Process-windows.cpp
@@ -23,7 +23,66 @@ distribution.
*/
#include "Internal.h"
-#include "PlatformInternal.h"
+
+#define _WIN32_WINNT 0x0501 // needed for INPUT struct
+#define WINVER 0x0501 // OpenThread(), PSAPI, Toolhelp32
+#define WIN32_LEAN_AND_MEAN
+#include
+#include
+#include
+#include
+
+typedef LONG NTSTATUS;
+#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
+
+// FIXME: it is uncertain how these map to 64bit
+typedef struct _DEBUG_BUFFER
+{
+ HANDLE SectionHandle;
+ PVOID SectionBase;
+ PVOID RemoteSectionBase;
+ ULONG SectionBaseDelta;
+ HANDLE EventPairHandle;
+ ULONG Unknown[2];
+ HANDLE RemoteThreadHandle;
+ ULONG InfoClassMask;
+ ULONG SizeOfInfo;
+ ULONG AllocatedSize;
+ ULONG SectionSize;
+ PVOID ModuleInformation;
+ PVOID BackTraceInformation;
+ PVOID HeapInformation;
+ PVOID LockInformation;
+ PVOID Reserved[8];
+} DEBUG_BUFFER, *PDEBUG_BUFFER;
+
+typedef struct _DEBUG_HEAP_INFORMATION
+{
+ ULONG Base; // 0×00
+ ULONG Flags; // 0×04
+ USHORT Granularity; // 0×08
+ USHORT Unknown; // 0x0A
+ ULONG Allocated; // 0x0C
+ ULONG Committed; // 0×10
+ ULONG TagCount; // 0×14
+ ULONG BlockCount; // 0×18
+ ULONG Reserved[7]; // 0x1C
+ PVOID Tags; // 0×38
+ PVOID Blocks; // 0x3C
+} DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
+
+// RtlQueryProcessDebugInformation.DebugInfoClassMask constants
+#define PDI_MODULES 0x01
+#define PDI_BACKTRACE 0x02
+#define PDI_HEAPS 0x04
+#define PDI_HEAP_TAGS 0x08
+#define PDI_HEAP_BLOCKS 0x10
+#define PDI_LOCKS 0x20
+
+extern "C" __declspec(dllimport) NTSTATUS __stdcall RtlQueryProcessDebugInformation( IN ULONG ProcessId, IN ULONG DebugInfoClassMask, IN OUT PDEBUG_BUFFER DebugBuffer);
+extern "C" __declspec(dllimport) PDEBUG_BUFFER __stdcall RtlCreateQueryDebugBuffer( IN ULONG Size, IN BOOLEAN EventPair);
+extern "C" __declspec(dllimport) NTSTATUS __stdcall RtlDestroyQueryDebugBuffer( IN PDEBUG_BUFFER DebugBuffer);
+
#include
#include
#include
diff --git a/doc/CMakeLists.txt b/library/doc/CMakeLists.txt
similarity index 87%
rename from doc/CMakeLists.txt
rename to library/doc/CMakeLists.txt
index aad02a203..0a4e5bd2d 100644
--- a/doc/CMakeLists.txt
+++ b/library/doc/CMakeLists.txt
@@ -35,12 +35,7 @@ IF(DOXYGEN_FOUND)
# with DOXYGEN_SOURCE_DIR we fill a list of directories and later we write it into
# the Doxyfile with a REGEX REPLACE (see below)
SET( DOXYGEN_SOURCE_DIR
- "${dfhack_SOURCE_DIR}/doc/index.dxgen"
- "${dfhack_SOURCE_DIR}/library/include"
- "${dfhack_SOURCE_DIR}/library/include/dfhack"
- "${dfhack_SOURCE_DIR}/library/include/dfhack/modules"
- "${dfhack_SOURCE_DIR}/library/include/dfhack-c"
- "${dfhack_SOURCE_DIR}/library/include/dfhack-c/modules"
+ "${dfhack_SOURCE_DIR}/library"
)
STRING(REGEX REPLACE ";" " " CMAKE_DOXYGEN_INPUT_LIST "${DOXYGEN_SOURCE_DIR}")
diff --git a/doc/Doxyfile.in b/library/doc/Doxyfile.in
similarity index 99%
rename from doc/Doxyfile.in
rename to library/doc/Doxyfile.in
index a08f3f355..5ee8f500e 100644
--- a/doc/Doxyfile.in
+++ b/library/doc/Doxyfile.in
@@ -600,7 +600,7 @@ FILE_PATTERNS = *.cpp \
# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.
-RECURSIVE = NO
+RECURSIVE = YES
# The EXCLUDE tag can be used to specify files and/or directories that should
# excluded from the INPUT source files. This way you can easily exclude a
@@ -628,7 +628,7 @@ EXCLUDE_PATTERNS =
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test
-EXCLUDE_SYMBOLS =
+EXCLUDE_SYMBOLS = Private
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
diff --git a/doc/Doxygen.html b/library/doc/Doxygen.html
similarity index 100%
rename from doc/Doxygen.html
rename to library/doc/Doxygen.html
diff --git a/doc/img/.dot b/library/doc/img/.dot
similarity index 100%
rename from doc/img/.dot
rename to library/doc/img/.dot
diff --git a/doc/index.dxgen b/library/doc/index.dxgen
similarity index 100%
rename from doc/index.dxgen
rename to library/doc/index.dxgen
diff --git a/library/include/dfhack/Core.h b/library/include/dfhack/Core.h
index 045d59a85..3d2a48e2e 100644
--- a/library/include/dfhack/Core.h
+++ b/library/include/dfhack/Core.h
@@ -100,7 +100,10 @@ namespace DFHack
Core(Core const&); // Don't Implement
void operator=(Core const&); // Don't implement
bool errorstate;
+ // mutex for access to DF
DFMutex * AccessMutex;
+ // mutex for access to the Plugin storage
+ DFMutex * PluginMutex;
// FIXME: shouldn't be kept around like this
DFHack::VersionInfoFactory * vif;
// Module storage
diff --git a/library/include/dfhack/FakeSDL.h b/library/include/dfhack/FakeSDL.h
index 7bfe4be11..c3955fec1 100644
--- a/library/include/dfhack/FakeSDL.h
+++ b/library/include/dfhack/FakeSDL.h
@@ -42,6 +42,7 @@ typedef void * fPtr;
typedef void * vPtr;
struct DFMutex;
struct DFThread;
+struct DFLibrary;
// mutex and thread functions. We can call these.
DFhackCExport DFMutex * SDL_CreateMutex(void);
@@ -50,6 +51,11 @@ DFhackCExport int SDL_mutexV(DFMutex *);
DFhackCExport void SDL_DestroyMutex(DFMutex *);
DFhackCExport DFThread *SDL_CreateThread(int (*fn)(void *), void *data);
+// Functions for loading libraries and looking up exported symbols
+DFhackCExport void * SDL_LoadFunction(DFLibrary *handle, const char *name);
+DFhackCExport DFLibrary * SDL_LoadObject(const char *sofile);
+DFhackCExport void SDL_UnloadObject(DFLibrary * handle);
+
// these functions are here because they call into DFHack::Core and therefore need to
// be declared as friend functions/known
DFhackCExport int SDL_NumJoysticks(void);
diff --git a/library/include/dfhack/Process.h b/library/include/dfhack/Process.h
index c2d1cc583..29beb5bb5 100644
--- a/library/include/dfhack/Process.h
+++ b/library/include/dfhack/Process.h
@@ -94,7 +94,7 @@ namespace DFHack
};
/**
- * Allows low-level access to the memory of an OS process. OS processes can be enumerated by \ref ProcessEnumerator
+ * Allows low-level access to the memory of an OS process.
* \ingroup grp_context
*/
class DFHACK_EXPORT Process
@@ -163,7 +163,7 @@ namespace DFHack
};
/// read a byte
- uint16_t readByte(const uint32_t address)
+ uint8_t readByte(const uint32_t address)
{
return *(uint8_t *)address;
}
diff --git a/library/private/rlutil.h b/library/include/dfhack/extra/rlutil.h
similarity index 100%
rename from library/private/rlutil.h
rename to library/include/dfhack/extra/rlutil.h
diff --git a/library/modules/Graveyard.cpp b/library/modules/Graveyard.cpp
deleted file mode 100644
index 4abe854f1..000000000
--- a/library/modules/Graveyard.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-// This is just a graveyard of old 40d code. Things in here COULD be turned into modules, but it requires research.
-
-bool API::InitReadEffects ( uint32_t & numeffects )
-{
- if(d->effectsInited)
- FinishReadEffects();
- int effects = 0;
- try
- {
- effects = d->offset_descriptor->getAddress ("effects_vector");
- }
- catch(Error::AllMemdef)
- {
- return false;
- }
- d->effectsInited = true;
- d->p_effect = new DfVector (d->p, effects);
- numeffects = d->p_effect->getSize();
- return true;
-}
-
-bool API::ReadEffect(const uint32_t index, t_effect_df40d & effect)
-{
- if(!d->effectsInited)
- return false;
- if(index >= d->p_effect->getSize())
- return false;
-
- // read pointer from vector at position
- uint32_t temp = d->p_effect->at (index);
- //read effect from memory
- d->p->read (temp, sizeof (t_effect_df40d), (uint8_t *) &effect);
- return true;
-}
-
-// use with care!
-bool API::WriteEffect(const uint32_t index, const t_effect_df40d & effect)
-{
- if(!d->effectsInited)
- return false;
- if(index >= d->p_effect->getSize())
- return false;
- // read pointer from vector at position
- uint32_t temp = d->p_effect->at (index);
- // write effect to memory
- d->p->write(temp,sizeof(t_effect_df40d), (uint8_t *) &effect);
- return true;
-}
-
-void API::FinishReadEffects()
-{
- if(d->p_effect)
- {
- delete d->p_effect;
- d->p_effect = NULL;
- }
- d->effectsInited = false;
-}
-
-bool API::InitReadNotes( uint32_t &numnotes )
-{
- try
- {
- memory_info * minfo = d->offset_descriptor;
- int notes = minfo->getAddress ("notes");
- d->note_foreground_offset = minfo->getOffset ("note_foreground");
- d->note_background_offset = minfo->getOffset ("note_background");
- d->note_name_offset = minfo->getOffset ("note_name");
- d->note_xyz_offset = minfo->getOffset ("note_xyz");
-
- d->p_notes = new DfVector (d->p, notes);
- d->notesInited = true;
- numnotes = d->p_notes->getSize();
- return true;
- }
- catch (Error::AllMemdef&)
- {
- d->notesInited = false;
- numnotes = 0;
- throw;
- }
-}
-bool API::ReadNote (const int32_t index, t_note & note)
-{
- if(!d->notesInited) return false;
- // read pointer from vector at position
- uint32_t temp = d->p_notes->at (index);
- note.symbol = d->p->readByte(temp);
- note.foreground = d->p->readWord(temp + d->note_foreground_offset);
- note.background = d->p->readWord(temp + d->note_background_offset);
- d->p->readSTLString (temp + d->note_name_offset, note.name, 128);
- d->p->read (temp + d->note_xyz_offset, 3*sizeof (uint16_t), (uint8_t *) ¬e.x);
- return true;
-}
-bool API::InitReadSettlements( uint32_t & numsettlements )
-{
- if(!d->InitReadNames()) return false;
- try
- {
- memory_info * minfo = d->offset_descriptor;
- int allSettlements = minfo->getAddress ("settlements");
- int currentSettlement = minfo->getAddress("settlement_current");
- d->settlement_name_offset = minfo->getOffset ("settlement_name");
- d->settlement_world_xy_offset = minfo->getOffset ("settlement_world_xy");
- d->settlement_local_xy_offset = minfo->getOffset ("settlement_local_xy");
-
- d->p_settlements = new DfVector (d->p, allSettlements);
- d->p_current_settlement = new DfVector(d->p, currentSettlement);
- d->settlementsInited = true;
- numsettlements = d->p_settlements->getSize();
- return true;
- }
- catch (Error::AllMemdef&)
- {
- d->settlementsInited = false;
- numsettlements = 0;
- throw;
- }
-}
-bool API::ReadSettlement(const int32_t index, t_settlement & settlement)
-{
- if(!d->settlementsInited) return false;
- if(!d->p_settlements->getSize()) return false;
-
- // read pointer from vector at position
- uint32_t temp = d->p_settlements->at (index);
- settlement.origin = temp;
- d->readName(settlement.name, temp + d->settlement_name_offset);
- d->p->read(temp + d->settlement_world_xy_offset, 2 * sizeof(int16_t), (uint8_t *) &settlement.world_x);
- d->p->read(temp + d->settlement_local_xy_offset, 4 * sizeof(int16_t), (uint8_t *) &settlement.local_x1);
- return true;
-}
-
-bool API::ReadCurrentSettlement(t_settlement & settlement)
-{
- if(!d->settlementsInited) return false;
- if(!d->p_current_settlement->getSize()) return false;
-
- uint32_t temp = d->p_current_settlement->at(0);
- settlement.origin = temp;
- d->readName(settlement.name, temp + d->settlement_name_offset);
- d->p->read(temp + d->settlement_world_xy_offset, 2 * sizeof(int16_t), (uint8_t *) &settlement.world_x);
- d->p->read(temp + d->settlement_local_xy_offset, 4 * sizeof(int16_t), (uint8_t *) &settlement.local_x1);
- return true;
-}
-
-void API::FinishReadSettlements()
-{
- if(d->p_settlements)
- {
- delete d->p_settlements;
- d->p_settlements = NULL;
- }
- if(d->p_current_settlement)
- {
- delete d->p_current_settlement;
- d->p_current_settlement = NULL;
- }
- d->settlementsInited = false;
-}
-
-void API::FinishReadNotes()
-{
- if(d->p_notes)
- {
- delete d->p_notes;
- d->p_notes = 0;
- }
- d->notesInited = false;
-}
diff --git a/library/private/Internal.h b/library/private/Internal.h
index c42baaefa..34cc40901 100644
--- a/library/private/Internal.h
+++ b/library/private/Internal.h
@@ -32,10 +32,6 @@ distribution.
#define BUILD_DFHACK_LIB
#endif
-// wizardry for adding quotes to macros
-#define _QUOTEME(x) #x
-#define QUOT(x) _QUOTEME(x)
-
// force large file support
#ifdef LINUX_BUILD
#define _FILE_OFFSET_BITS 64
diff --git a/library/private/PlatformInternal.h b/library/private/PlatformInternal.h
deleted file mode 100644
index d29115a83..000000000
--- a/library/private/PlatformInternal.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
-https://github.com/peterix/dfhack
-Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any
-damages arising from the use of this software.
-
-Permission is granted to anyone to use this software for any
-purpose, including commercial applications, and to alter it and
-redistribute it freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must
-not claim that you wrote the original software. If you use this
-software in a product, an acknowledgment in the product documentation
-would be appreciated but is not required.
-
-2. Altered source versions must be plainly marked as such, and
-must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source
-distribution.
-*/
-
-#pragma once
-
-#ifndef DFPLATFORMINTERNAL_H_INCLUDED
-#define DFPLATFORMINTERNAL_H_INCLUDED
-
-// platform includes and defines
-#ifdef LINUX_BUILD
- #include
- #include
- #include
- #include
- #include
- #include
- #include
- #include
-#else
- // WINDOWS
- #define _WIN32_WINNT 0x0501 // needed for INPUT struct
- #define WINVER 0x0501 // OpenThread(), PSAPI, Toolhelp32
- #define WIN32_LEAN_AND_MEAN
- #include
- #include
- #include
- #include
- //#include // NOT present in mingw32
- typedef LONG NTSTATUS;
- #define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
-
- // FIXME: it is uncertain how these map to 64bit
- typedef struct _DEBUG_BUFFER
- {
- HANDLE SectionHandle;
- PVOID SectionBase;
- PVOID RemoteSectionBase;
- ULONG SectionBaseDelta;
- HANDLE EventPairHandle;
- ULONG Unknown[2];
- HANDLE RemoteThreadHandle;
- ULONG InfoClassMask;
- ULONG SizeOfInfo;
- ULONG AllocatedSize;
- ULONG SectionSize;
- PVOID ModuleInformation;
- PVOID BackTraceInformation;
- PVOID HeapInformation;
- PVOID LockInformation;
- PVOID Reserved[8];
- } DEBUG_BUFFER, *PDEBUG_BUFFER;
-
- typedef struct _DEBUG_HEAP_INFORMATION
- {
- ULONG Base; // 0×00
- ULONG Flags; // 0×04
- USHORT Granularity; // 0×08
- USHORT Unknown; // 0x0A
- ULONG Allocated; // 0x0C
- ULONG Committed; // 0×10
- ULONG TagCount; // 0×14
- ULONG BlockCount; // 0×18
- ULONG Reserved[7]; // 0x1C
- PVOID Tags; // 0×38
- PVOID Blocks; // 0x3C
- } DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
-
- // RtlQueryProcessDebugInformation.DebugInfoClassMask constants
- #define PDI_MODULES 0x01
- #define PDI_BACKTRACE 0x02
- #define PDI_HEAPS 0x04
- #define PDI_HEAP_TAGS 0x08
- #define PDI_HEAP_BLOCKS 0x10
- #define PDI_LOCKS 0x20
-
- extern "C" __declspec(dllimport) NTSTATUS __stdcall RtlQueryProcessDebugInformation( IN ULONG ProcessId, IN ULONG DebugInfoClassMask, IN OUT PDEBUG_BUFFER DebugBuffer);
- extern "C" __declspec(dllimport) PDEBUG_BUFFER __stdcall RtlCreateQueryDebugBuffer( IN ULONG Size, IN BOOLEAN EventPair);
- extern "C" __declspec(dllimport) NTSTATUS __stdcall RtlDestroyQueryDebugBuffer( IN PDEBUG_BUFFER DebugBuffer);
-#endif // WINDOWS
-
-#endif // DFPLATFORMINTERNAL_H_INCLUDED
\ No newline at end of file
diff --git a/offsetedit/CMakeLists.txt b/offsetedit/CMakeLists.txt
deleted file mode 100644
index f8065bc4c..000000000
--- a/offsetedit/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-
-project(dfoffsetedit)
-cmake_minimum_required(VERSION 2.6)
-find_package(Qt4 QUIET)
-if(QT4_FOUND)
- add_subdirectory (src)
-else(QT4_FOUND)
- MESSAGE(STATUS "Qt4 libraries not found - offset editor can't be built.")
-endif(QT4_FOUND)
diff --git a/offsetedit/src/CMakeLists.txt b/offsetedit/src/CMakeLists.txt
deleted file mode 100644
index 9a2218413..000000000
--- a/offsetedit/src/CMakeLists.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
-
-set ( dfoffsetedit_SRCS
- dfedit.cpp
- memxmlModel.cpp
- main.cpp
-)
-
-SET ( dfoffsetedit_UI
- gui/main.ui
-)
-
-SET( dfoffsetedit_RCS
- gui/resources.qrc
-)
-
-# this command will generate rules that will run rcc on all files from dfoffsetedit_RCS
-# in result dfoffsetedit_RC_SRCS variable will contain paths to files produced by rcc
-QT4_ADD_RESOURCES( dfoffsetedit_RC_SRCS ${dfoffsetedit_RCS} )
-
-QT4_WRAP_UI(dfoffsetedit_UI_h ${dfoffsetedit_UI})
-qt4_automoc(${dfoffsetedit_SRCS})
-
-add_executable(dfoffsetedit ${dfoffsetedit_SRCS} ${dfoffsetedit_RC_SRCS} ${dfoffsetedit_UI_h})
-target_link_libraries(dfoffsetedit ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY} )
\ No newline at end of file
diff --git a/offsetedit/src/dfedit.cpp b/offsetedit/src/dfedit.cpp
deleted file mode 100644
index f7ac3e7a4..000000000
--- a/offsetedit/src/dfedit.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-#include "dfedit.h"
-#include
-#include
-#include "memxmlModel.h"
-
-dfedit::dfedit(QWidget *parent): QMainWindow(parent)
-{
- ui.setupUi(this);
- connect(ui.actionOpen,SIGNAL(triggered(bool)),this,SLOT(slotOpen(bool)));
- connect(ui.actionQuit,SIGNAL(triggered(bool)),this,SLOT(slotQuit(bool)));
- connect(ui.actionRun_DF,SIGNAL(triggered(bool)),this,SLOT(slotRunDF(bool)));
- connect(ui.actionSave,SIGNAL(triggered(bool)),this,SLOT(slotSave(bool)));
- connect(ui.actionSave_As,SIGNAL(triggered(bool)),this,SLOT(slotSaveAs(bool)));
- connect(ui.actionSetup_DF_executables,SIGNAL(triggered(bool)),this,SLOT(slotSetupDFs(bool)));
- ui.actionOpen->setIcon(QIcon::fromTheme("document-open"));
- ui.actionOpen->setIconText(tr("Open"));
- ui.actionSave->setIcon(QIcon::fromTheme("document-save"));
- ui.actionSave->setIconText(tr("Save"));
- ui.actionSave_As->setIcon(QIcon::fromTheme("document-save-as"));
- ui.actionSave_As->setIconText(tr("Save As"));
- ui.actionRun_DF->setIcon(QIcon::fromTheme("system-run"));
- ui.actionRun_DF->setIconText(tr("Run DF"));
- ui.actionQuit->setIcon(QIcon::fromTheme("application-exit"));
- ui.actionQuit->setIconText(tr("Run DF"));
-}
-
-dfedit::~dfedit()
-{}
-
-void dfedit::slotOpen(bool )
-{
- QFileDialog fd(this,tr("Locate the Memoxy.xml file"));
- fd.setNameFilter(tr("Memory definition (*.xml)"));
- fd.setFileMode(QFileDialog::ExistingFile);
- fd.setAcceptMode(QFileDialog::AcceptOpen);
- int result = fd.exec();
- if(result == QDialog::Accepted)
- {
- QStringList files = fd.selectedFiles();
- QString fileName = files[0];
- QDomDocument doc("memxml");
- QFile file(fileName);
- if(!file.open(QIODevice::ReadOnly))
- {
- return;
- }
- if(!doc.setContent(&file))
- {
- file.close();
- return;
- }
- mod = new MemXMLModel(doc,this);
- ui.entryView->setModel(mod);
- file.close();
- }
-}
-
-void dfedit::slotQuit(bool )
-{
- close();
-}
-
-void dfedit::slotSave(bool )
-{
- // blah
-}
-
-void dfedit::slotRunDF(bool )
-{
- // blah
-}
-
-void dfedit::slotSaveAs(bool )
-{
- QFileDialog fd(this,tr("Choose file to save as..."));
- fd.setNameFilter(tr("Memory definition (*.xml)"));
- fd.setFileMode(QFileDialog::AnyFile);
- fd.selectFile("Memory.xml");
- fd.setAcceptMode(QFileDialog::AcceptSave);
- int result = fd.exec();
- if(result == QDialog::Accepted)
- {
- QStringList files = fd.selectedFiles();
- QString file = files[0];
- qDebug() << "File:" << file;
- }
-}
-
-void dfedit::slotSetupDFs(bool )
-{
- // dialog showing all the versions in Memory.xml that lets the user set up ways to run those versions...
- // currently unimplemented
-}
-
-#include "dfedit.moc"
diff --git a/offsetedit/src/dfedit.h b/offsetedit/src/dfedit.h
deleted file mode 100644
index 2a30ef7aa..000000000
--- a/offsetedit/src/dfedit.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef dfedit_H
-#define dfedit_H
-
-#include
-#include "ui_main.h"
-#include "memxmlModel.h"
-
-class dfedit : public QMainWindow
-{
- Q_OBJECT
-public:
- dfedit(QWidget *parent = 0);
- virtual ~dfedit();
-
-private:
- Ui::MainWindow ui;
- MemXMLModel * mod;
-public slots:
- void slotOpen(bool);
- void slotQuit(bool);
- void slotSave(bool);
- void slotSaveAs(bool);
- void slotRunDF(bool);
- void slotSetupDFs(bool);
-};
-#endif // dfedit_H
diff --git a/offsetedit/src/gui/dIsForDwarf.svg b/offsetedit/src/gui/dIsForDwarf.svg
deleted file mode 100644
index 51b7acf0f..000000000
--- a/offsetedit/src/gui/dIsForDwarf.svg
+++ /dev/null
@@ -1,1621 +0,0 @@
-
-
-
-
diff --git a/offsetedit/src/gui/main.ui b/offsetedit/src/gui/main.ui
deleted file mode 100644
index dfff8fa02..000000000
--- a/offsetedit/src/gui/main.ui
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
- MainWindow
-
-
-
- 0
- 0
- 633
- 622
-
-
-
- MainWindow
-
-
-
- :/main_icon/main_64.png:/main_icon/main_64.png
-
-
-
- -
-
-
-
-
-
-
-
- toolBar
-
-
- TopToolBarArea
-
-
- false
-
-
-
-
-
-
-
-
- QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable
-
-
- Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea
-
-
- Description
-
-
- 2
-
-
-
- -
-
-
-
- 1
- 1
-
-
-
-
- 0
- 0
-
-
-
- QFrame::NoFrame
-
-
- QFrame::Raised
-
-
- 1
-
-
- 0
-
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:xx-large; font-weight:600;">Title text</span></p>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Some other text.</p></body></html>
-
-
- Qt::AutoText
-
-
- false
-
-
- Qt::AlignTop
-
-
- true
-
-
-
-
-
-
-
-
- false
-
-
- QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable
-
-
- Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea
-
-
- Entries
-
-
- 1
-
-
-
- -
-
-
-
-
-
-
-
-
- Open
-
-
-
-
- Save
-
-
-
-
- Save As
-
-
-
-
- Quit
-
-
-
-
- Run DF
-
-
-
-
- Setup DF executables
-
-
-
-
-
-
-
-
diff --git a/offsetedit/src/gui/main_16.png b/offsetedit/src/gui/main_16.png
deleted file mode 100644
index 04367e58d..000000000
Binary files a/offsetedit/src/gui/main_16.png and /dev/null differ
diff --git a/offsetedit/src/gui/main_32.png b/offsetedit/src/gui/main_32.png
deleted file mode 100644
index 39137fed1..000000000
Binary files a/offsetedit/src/gui/main_32.png and /dev/null differ
diff --git a/offsetedit/src/gui/main_64.png b/offsetedit/src/gui/main_64.png
deleted file mode 100644
index e6823a94f..000000000
Binary files a/offsetedit/src/gui/main_64.png and /dev/null differ
diff --git a/offsetedit/src/gui/resources.qrc b/offsetedit/src/gui/resources.qrc
deleted file mode 100644
index 707294060..000000000
--- a/offsetedit/src/gui/resources.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- main_64.png
- main_16.png
- main_32.png
-
-
diff --git a/offsetedit/src/main.cpp b/offsetedit/src/main.cpp
deleted file mode 100644
index 36334656d..000000000
--- a/offsetedit/src/main.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-#include
-#include "dfedit.h"
-
-
-int main(int argc, char** argv)
-{
- QApplication app(argc, argv);
- dfedit appGui;
- appGui.show();
- return app.exec();
-}
diff --git a/offsetedit/src/memxmlModel.cpp b/offsetedit/src/memxmlModel.cpp
deleted file mode 100644
index 3df8849bf..000000000
--- a/offsetedit/src/memxmlModel.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
-**
-** This file was part of the example classes of the Qt Toolkit.
-** Now it's being hacked into some other shape... :)
-**
-** This file may be used under the terms of the GNU General Public
-** License version 2.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of
-** this file. Please review the following information to ensure GNU
-** General Public Licensing requirements will be met:
-** http://www.trolltech.com/products/qt/opensource.html
-**
-** If you are unsure which license is appropriate for your use, please
-** review the following information:
-** http://www.trolltech.com/products/qt/licensing.html or contact the
-** sales department at sales@trolltech.com.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-****************************************************************************/
-
-#include "memxmlModel.h"
-#include
-#include
-#include
-#include
-
-class DomItem
-{
-public:
- DomItem(QDomNode &node, int row, DomItem *parent = 0);
- ~DomItem();
- DomItem *child(int i);
- DomItem *parent();
- QDomNode node() const;
- int row();
-
-private:
- QDomNode domNode;
- QHash childItems;
- DomItem *parentItem;
- int rowNumber;
-};
-
-DomItem::DomItem(QDomNode &node, int row, DomItem *parent)
-{
- domNode = node;
- // Record the item's location within its parent.
- rowNumber = row;
- parentItem = parent;
-}
-
-DomItem::~DomItem()
-{
- QHash::iterator it;
- for (it = childItems.begin(); it != childItems.end(); ++it)
- delete it.value();
-}
-
-QDomNode DomItem::node() const
-{
- return domNode;
-}
-
-DomItem *DomItem::parent()
-{
- return parentItem;
-}
-
-DomItem *DomItem::child(int i)
-{
- if (childItems.contains(i))
- return childItems[i];
-
- if (i >= 0 && i < domNode.childNodes().count()) {
- QDomNode childNode = domNode.childNodes().item(i);
- DomItem *childItem = new DomItem(childNode, i, this);
- childItems[i] = childItem;
- return childItem;
- }
- return 0;
-}
-
-int DomItem::row()
-{
- return rowNumber;
-}
-
-MemXMLModel::MemXMLModel(QDomDocument document, QObject *parent)
- : QAbstractItemModel(parent), domDocument(document)
-{
- rootItem = new DomItem(domDocument, 0);
-}
-
-MemXMLModel::~MemXMLModel()
-{
- delete rootItem;
-}
-
-int MemXMLModel::columnCount(const QModelIndex & parent) const
-{
- Q_UNUSED(parent);
- return 3;
-}
-
-QVariant MemXMLModel::data(const QModelIndex &index, int role) const
-{
- if (!index.isValid())
- return QVariant();
-
- if (role != Qt::DisplayRole)
- return QVariant();
-
- DomItem *item = static_cast(index.internalPointer());
-
- QDomNode node = item->node();
- QStringList attributes;
- QDomNamedNodeMap attributeMap = node.attributes();
-
- switch (index.column()) {
- case 0:
- return node.nodeName();
- case 1:
- for (int i = 0; (unsigned int)(i) < attributeMap.count(); ++i)
- {
- QDomNode attribute = attributeMap.item(i);
- attributes << attribute.nodeName() + "=\"" +attribute.nodeValue() + "\"";
- }
- return attributes.join(" ");
- case 2:
- return node.nodeValue().split("\n").join(" ");
- default:
- return QVariant();
- }
-}
-
-Qt::ItemFlags MemXMLModel::flags(const QModelIndex &index) const
-{
- if (!index.isValid())
- {
- return Qt::ItemIsEnabled;
- }
-
- return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
-}
-
-QVariant MemXMLModel::headerData(int section, Qt::Orientation orientation, int role) const
-{
- if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
- switch (section) {
- case 0:
- return tr("Name");
- case 1:
- return tr("Attributes");
- case 2:
- return tr("Value");
- default:
- return QVariant();
- }
- }
-
- return QVariant();
-}
-
-QModelIndex MemXMLModel::index(int row, int column, const QModelIndex &parent) const
-{
- DomItem *parentItem;
-
- if (!parent.isValid())
- parentItem = rootItem;
- else
- parentItem = static_cast(parent.internalPointer());
-
- DomItem *childItem = parentItem->child(row);
- if (childItem)
- return createIndex(row, column, childItem);
- else
- return QModelIndex();
-}
-
-QModelIndex MemXMLModel::parent(const QModelIndex &child) const
-{
- if (!child.isValid())
- return QModelIndex();
-
- DomItem *childItem = static_cast(child.internalPointer());
- DomItem *parentItem = childItem->parent();
-
- if (!parentItem || parentItem == rootItem)
- return QModelIndex();
-
- return createIndex(parentItem->row(), 0, parentItem);
-}
-
-int MemXMLModel::rowCount(const QModelIndex &parent) const
-{
- DomItem *parentItem;
-
- if (!parent.isValid())
- parentItem = rootItem;
- else
- parentItem = static_cast(parent.internalPointer());
-
- return parentItem->node().childNodes().count();
-}
-
-#include "memxmlModel.moc"
diff --git a/offsetedit/src/memxmlModel.h b/offsetedit/src/memxmlModel.h
deleted file mode 100644
index 2879f4b5f..000000000
--- a/offsetedit/src/memxmlModel.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef memxmlModel_H
-#define memxmlModel_H
-
-#include
-#include
-
-class DomItem;
-
-class MemXMLModel : public QAbstractItemModel
-{
- Q_OBJECT
-public:
- MemXMLModel(QDomDocument document, QObject *parent = 0);
- ~MemXMLModel();
-
- QVariant data(const QModelIndex &index, int role) const;
- Qt::ItemFlags flags(const QModelIndex &index) const;
- QVariant headerData(int section, Qt::Orientation orientation,
- int role = Qt::DisplayRole) const;
- QModelIndex index(int row, int column,
- const QModelIndex &parent = QModelIndex()) const;
- QModelIndex parent(const QModelIndex &child) const;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- int columnCount(const QModelIndex &parent = QModelIndex()) const;
-
-private:
- QDomDocument domDocument;
- DomItem *rootItem;
-};
-#endif // memxmlModel
diff --git a/output/.gitignore b/output/.gitignore
deleted file mode 100644
index ff94317d8..000000000
--- a/output/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Debug
-Release
-RelWithDebInfo
diff --git a/output/stones.py b/output/stones.py
deleted file mode 100644
index 2cc7a2d7f..000000000
--- a/output/stones.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- coding: utf-8 -*-
-from pydfhack import API
-DF = API("Memory.xml")
-
-if DF.Attach():
- Mats = DF.materials
- stones = Mats.Read_Inorganic_Materials()
- print "Dumping all stone"
- for matgloss in stones:
- print "ID %s, name %s" % (matgloss.id, matgloss.name)
- DF.Detach()
diff --git a/package/debian/99-dfhack.conf b/package/debian/99-dfhack.conf
deleted file mode 100644
index a0a17e681..000000000
--- a/package/debian/99-dfhack.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# some settings required for dfhack. fucks up local security...
-kernel.randomize_va_space = 0
\ No newline at end of file
diff --git a/package/debian/postinst b/package/debian/postinst
deleted file mode 100755
index 13f47935d..000000000
--- a/package/debian/postinst
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-
diff --git a/package/debian/postrm b/package/debian/postrm
deleted file mode 100755
index 3b8cdfc62..000000000
--- a/package/debian/postrm
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-# do nothing. blah.
\ No newline at end of file
diff --git a/package/debian/preinst b/package/debian/preinst
deleted file mode 100755
index 13f47935d..000000000
--- a/package/debian/preinst
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-
diff --git a/package/ubuntu-10.10/99-dfhack.conf b/package/ubuntu-10.10/99-dfhack.conf
deleted file mode 100644
index bc7cd2bc2..000000000
--- a/package/ubuntu-10.10/99-dfhack.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# some settings required for dfhack. fucks up local security...
-# shame on kernel devs and ubuntu people for not providing
-# an /official/ way to manipulate things and just putting up roadblocks
-# instead of proper design
-kernel.randomize_va_space = 0
-kernel.yama.ptrace_scope = 0
\ No newline at end of file
diff --git a/package/ubuntu-10.10/postinst b/package/ubuntu-10.10/postinst
deleted file mode 100755
index ed50fde48..000000000
--- a/package/ubuntu-10.10/postinst
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-echo "Setting required kernel parameters."
-# I actually do it three times, hoping to hammer this into Ubuntu's dense skull.
-sysctl -w kernel.randomize_va_space=0
-sysctl -w kernel.yama.ptrace_scope=0
-if grep -q "kernel.yama.ptrace_scope=0" /etc/sysctl.conf
-then
- echo "Already installed into /etc/sysctl.conf, doing nothing."
-else
- echo "kernel.randomize_va_space=0" >> /etc/sysctl.conf
- echo "kernel.yama.ptrace_scope=0" >> /etc/sysctl.conf
-fi
-
diff --git a/package/ubuntu-10.10/postrm b/package/ubuntu-10.10/postrm
deleted file mode 100755
index 3b8cdfc62..000000000
--- a/package/ubuntu-10.10/postrm
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-# do nothing. blah.
\ No newline at end of file
diff --git a/package/ubuntu-10.10/preinst b/package/ubuntu-10.10/preinst
deleted file mode 100755
index 13f47935d..000000000
--- a/package/ubuntu-10.10/preinst
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-
diff --git a/output/doxygen/.keep b/plugins/.keep
similarity index 100%
rename from output/doxygen/.keep
rename to plugins/.keep
diff --git a/precompiled/linux/df-hacked b/precompiled/linux/df-hacked
deleted file mode 100755
index f9c3a3351..000000000
--- a/precompiled/linux/df-hacked
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-DF_DIR=$(dirname "$0")
-cd "${DF_DIR}"
-export SDL_DISABLE_LOCK_KEYS=1 # Work around for bug in Debian/Ubuntu SDL patch.
-#export SDL_VIDEO_CENTERED=1 # Centre the screen. Messes up resizing.
-ldd dwarfort.exe | grep SDL_image | grep -qv "not found$"
-if [ $? -eq 0 ]; then
- mkdir unused_libs
- mv libs/libSDL* unused_libs/
-fi
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"./libs" # Update library search path.
-export LD_PRELOAD="./libs/libdfconnect.so" # Hack DF!
-./dwarfort.exe $* # Go, go, go! :)