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 040f8f7b7a.
develop
belal 2010-09-13 09:45:53 -04:00
parent 040f8f7b7a
commit d2db7524a1
4 changed files with 0 additions and 39 deletions

@ -694,8 +694,6 @@
<Address name="current_cursor_creature" description="A vector? of creatures currently under the cursor."/>
<Address name="current_menu_state" description="A numeric value that describes the state of the current GUI element (switching between menus will change this)."/>
<Address name="view_screen" description="Pointer to the current view screen object (GUI screen)."/>
<Address name="tileset_filename" description="String holding the path to the current tileset file"/>
<Address name="colors_filename" description="String holding the path to the current color file"/>
</Group>
<Group name="Maps" description="Offsets used by the Maps module.">
<Address name="map_data" description="Pointer to the start of the map structure."/>
@ -1454,10 +1452,6 @@
<Group name="World">
<Address name="current_weather" value="0x14BCDEE" />
</Group>
<Group name="GUI">
<Address name="tileset_filename" value="0xA95BB0" />
<Address name="colors_filename" value="0xA95F8C" />
</Group>
</Offsets>
</Version>

@ -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;

@ -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 "";
}

@ -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();