From 9bcdc78d005917dfb266dfafd34719c959fc4682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 31 Aug 2010 05:32:40 +0200 Subject: [PATCH] name of GUI offset group was wrong in its module --- library/CMakeLists.txt | 39 ++++++++++++++++++++++++++++-------- library/modules/Gui.cpp | 2 +- library/modules/Position.cpp | 32 ++++++++++++++--------------- 3 files changed, 48 insertions(+), 25 deletions(-) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 6bd4815a6..82fce6887 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -26,20 +26,29 @@ include_directories (${CMAKE_SOURCE_DIR}/library/depends/tinyxml/) include_directories (${CMAKE_SOURCE_DIR}/library/depends/argstream/) include_directories (${CMAKE_SOURCE_DIR}/library/private/) +SET(PROJECT_HDRS_INTERNAL + private/ContextShared.h + private/Internal.h +) + SET(PROJECT_HDRS -private/ContextShared.h -private/Internal.h +include/DFHack.h +include/dfhack/DFContext.h +include/dfhack/DFContextManager.h include/dfhack/DFError.h -include/dfhack/VersionInfoFactory.h -include/dfhack/VersionInfo.h -include/dfhack/DFProcessEnumerator.h +include/dfhack/DFExport.h +include/dfhack/DFGlobal.h +include/dfhack/DFIntegers.h +include/dfhack/DFMiscUtils.h +include/dfhack/DFModule.h +include/dfhack/DFPragma.h include/dfhack/DFProcess.h +include/dfhack/DFProcessEnumerator.h include/dfhack/DFTileTypes.h include/dfhack/DFTypes.h include/dfhack/DFVector.h -include/dfhack-c/DFTypes_C.h -include/dfhack-c/DFContext_C.h -include/dfhack/DFIntegers.h +include/dfhack/VersionInfoFactory.h +include/dfhack/VersionInfo.h include/dfhack/modules/Buildings.h include/dfhack/modules/Constructions.h include/dfhack/modules/Creatures.h @@ -55,8 +64,21 @@ include/dfhack/modules/World.h ) SET(PROJECT_C_HDRS +include/DFHack_C.h include/dfhack-c/DFTypes_C.h include/dfhack-c/DFContext_C.h +include/dfhack-c/modules/Buildings_C.h +include/dfhack-c/modules/Constructions_C.h +include/dfhack-c/modules/Creatures_C.h +include/dfhack-c/modules/Gui_C.h +include/dfhack-c/modules/Items_C.h +include/dfhack-c/modules/Maps_C.h +include/dfhack-c/modules/Materials_C.h +include/dfhack-c/modules/Position_C.h +include/dfhack-c/modules/Translation_C.h +include/dfhack-c/modules/Vegetation_C.h +include/dfhack-c/modules/WindowIO_C.h +include/dfhack-c/modules/World_C.h ) SET(PROJECT_SRCS @@ -206,4 +228,5 @@ endif(MSVC) IF(UNIX) install(TARGETS dfhack LIBRARY DESTINATION lib) install(FILES ${CMAKE_SOURCE_DIR}/output/Memory.xml DESTINATION share/dfhack) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/library/include/ DESTINATION include FILES_MATCHING PATTERN "*.h") ENDIF(UNIX) diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index 4bb29f1f0..05568c787 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -51,7 +51,7 @@ Gui::Gui(DFContextShared * _d) d->owner = _d->p; d->Inited = d->Started = true; - OffsetGroup * OG_Gui = d->d->offset_descriptor->getGroup("Gui"); + OffsetGroup * OG_Gui = d->d->offset_descriptor->getGroup("GUI"); d->current_menu_state_offset = OG_Gui->getAddress("current_menu_state"); d->pause_state_offset = OG_Gui->getAddress ("pause_state"); d->view_screen_offset = OG_Gui->getAddress ("view_screen"); diff --git a/library/modules/Position.cpp b/library/modules/Position.cpp index 8dda58fae..920660321 100644 --- a/library/modules/Position.cpp +++ b/library/modules/Position.cpp @@ -71,22 +71,22 @@ Position::Position(DFContextShared * d_) d->cursor_xyz_offset = OG_Position->getAddress ("cursor_xyz"); d->window_dims_offset = OG_Position->getAddress ("window_dims"); d->Started = true; - try - { - OffsetGroup * OG_Hotkeys = mem->getGroup("Hotkeys"); - d->hotkey_start = OG_Hotkeys->getAddress("start"); - d->hotkey_mode_offset = OG_Hotkeys->getOffset ("mode"); - d->hotkey_xyz_offset = OG_Hotkeys->getOffset("coords"); - d->hotkey_size = OG_Hotkeys->getHexValue("size"); - d->StartedHotkeys = true; - } - catch(exception &){}; - try - { - d->screen_tiles_ptr_offset = OG_Position->getAddress ("screen_tiles_pointer"); - d->StartedScreen = true; - } - catch(exception &){}; + } + catch(exception &){}; + try + { + OffsetGroup * OG_Hotkeys = mem->getGroup("Hotkeys"); + d->hotkey_start = OG_Hotkeys->getAddress("start"); + d->hotkey_mode_offset = OG_Hotkeys->getOffset ("mode"); + d->hotkey_xyz_offset = OG_Hotkeys->getOffset("coords"); + d->hotkey_size = OG_Hotkeys->getHexValue("size"); + d->StartedHotkeys = true; + } + catch(exception &){}; + try + { + d->screen_tiles_ptr_offset = OG_Position->getAddress ("screen_tiles_pointer"); + d->StartedScreen = true; } catch(exception &){}; }