From d2db7524a1a6744854f0fec94a8f42d65f664600 Mon Sep 17 00:00:00 2001 From: belal Date: Mon, 13 Sep 2010 09:45:53 -0400 Subject: [PATCH] Keeping the current working directory addition, but reverting the current tileset and color stuff, as the tileset was just an initializer, not the actual current one, just going to have to read the init.txt file myself Revert "Add function to get the current working directory of the DF process, as well as offsets for the relative paths of the current tileset and color file, also created a simple program to dump those three things out" This reverts commit 040f8f7b7a3251ed263e6f60cdb5713313a4f378. --- data/Memory-ng.xml | 6 ------ library/include/dfhack/modules/Gui.h | 4 ---- library/modules/Gui.cpp | 28 ---------------------------- tools/playground/paths.cpp | 1 - 4 files changed, 39 deletions(-) diff --git a/data/Memory-ng.xml b/data/Memory-ng.xml index 127266adb..f331c10d2 100644 --- a/data/Memory-ng.xml +++ b/data/Memory-ng.xml @@ -694,8 +694,6 @@
-
-
@@ -1454,10 +1452,6 @@
- -
-
- diff --git a/library/include/dfhack/modules/Gui.h b/library/include/dfhack/modules/Gui.h index 64cf06d97..6ac91f35c 100644 --- a/library/include/dfhack/modules/Gui.h +++ b/library/include/dfhack/modules/Gui.h @@ -28,10 +28,6 @@ namespace DFHack bool ReadViewScreen(t_viewscreen &); /// read the DF menu state (designation menu ect) uint32_t ReadMenuState(); - /// read the current tileset file used in DF - string ReadCurrentTileSetFilename(); - /// read the current color file used in DF - string ReadCurrentColorsFilename(); private: struct Private; diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index 15b5a0959..177a00467 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -44,10 +44,6 @@ struct Gui::Private bool ViewScreeInited; uint32_t current_menu_state_offset; bool MenuStateInited; - uint32_t tileset_filename_offset; - bool TilesetFilenameInited; - uint32_t colors_filename_offset; - bool ColorsFilenameInited; DFContextShared *d; Process * owner; }; @@ -77,18 +73,6 @@ Gui::Gui(DFContextShared * _d) d->ViewScreeInited = true; } catch(exception &){}; - try - { - d->tileset_filename_offset = OG_Gui->getAddress ("tileset_filename"); - d->TilesetFilenameInited = true; - } - catch(exception &){}; - try - { - d->colors_filename_offset = OG_Gui->getAddress ("colors_filename"); - d->ColorsFilenameInited = true; - } - catch(exception &){}; d->Started = true; } @@ -145,15 +129,3 @@ bool Gui::ReadViewScreen (t_viewscreen &screen) } return d->d->offset_descriptor->resolveObjectToClassID (last, screen.type); } -string Gui::ReadCurrentTileSetFilename() -{ - if(d->TilesetFilenameInited) - return(d->owner->readCString(d->tileset_filename_offset)); - return ""; -} -string Gui::ReadCurrentColorsFilename() -{ - if(d->ColorsFilenameInited) - return(d->owner->readCString(d->colors_filename_offset)); - return ""; -} \ No newline at end of file diff --git a/tools/playground/paths.cpp b/tools/playground/paths.cpp index 5ae3cd37a..cc00f79a3 100644 --- a/tools/playground/paths.cpp +++ b/tools/playground/paths.cpp @@ -23,7 +23,6 @@ int main () DFHack::Process * Process = DF->getProcess(); DFHack::Gui * gui = DF->getGui(); cout << Process->getPath() << endl; - cout << gui->ReadCurrentTileSetFilename() << "\n" << gui->ReadCurrentColorsFilename() << endl; #ifndef LINUX_BUILD cout << "Done. Press any key to continue" << endl; cin.ignore();