Memory.xml in new format (offsetedit/Memory-ng.xml). The declarations/descriptions are still missing.

develop
Petr Mrázek 2010-08-12 21:38:15 +02:00
parent ca7b2219da
commit f6aea927c8
6 changed files with 734 additions and 1151 deletions

@ -739,31 +739,40 @@ std::string memory_info::getMood(const uint32_t moodID)
std::string memory_info::PrintOffsets()
{
ostringstream ss;
ss << "version: " << getVersion();
ss << "<Version name=\"" << getVersion() << "\">" << endl;
switch (getOS())
{
case OS_LINUX:
ss << " LINUX" << endl;
ss << "md5 hash: " << getString("md5") << endl;
ss << "<MD5 value=\"" << getString("md5") << "\" />" << endl;
break;
case OS_WINDOWS:
ss << " WINDOWS" << endl;
ss << "PE timestamp: " << hex << "0x" << getHexValue("pe_timestamp") << endl;
ss << "md5 hash: " << getString("md5") << endl;
ss << "<PETimeStamp value=\"" << hex << "0x" << getHexValue("pe_timestamp") << "\" />" << endl;
ss << "<MD5 value=\"" << getString("md5") << "\" />" << endl;
break;
default:
ss << " UNKNOWN" << endl;
}
ss << "<Offsets>" << endl;
map<string,uint32_t>::const_iterator iter;
for(iter = d->addresses.begin(); iter != d->addresses.end(); iter++)
{
ss << "address " << (*iter).first << " : " << hex << "0x" << (*iter).second << endl;
ss << " <Address name=\"" << (*iter).first << "\" value=\"" << hex << "0x" << (*iter).second << "\" />" << endl;
}
map<string,int32_t>::const_iterator iter2;
for(iter2 = d->offsets.begin(); iter2 != d->offsets.end(); iter2++)
{
ss << "offset " << (*iter2).first << " : " << hex << "0x" << (*iter2).second << endl;
ss << " <Offset name=\"" << (*iter2).first << "\" value=\"" << hex << "0x" << (*iter2).second <<"\" />" << endl;
}
for(iter = d->hexvals.begin(); iter != d->hexvals.end(); iter++)
{
ss << " <HexValue name=\"" << (*iter).first << "\" value=\"" << hex << "0x" << (*iter).second <<"\" />" << endl;
}
map<string,string>::const_iterator iter3;
for(iter3 = d->strings.begin(); iter3 != d->strings.end(); iter3++)
{
ss << " <String name=\"" << (*iter3).first << "\" value=\"" << (*iter3).second <<"\" />" << endl;
}
ss << "</Offsets>" << endl;
ss << "</Version>" << endl;
return ss.str();
}

@ -258,24 +258,24 @@ bool Materials::ReadCreatureTypes (void)
bool Materials::ReadOthers(void)
{
Process * p = d->owner;
uint32_t matBase = p->getDescriptor()->getAddress ("mat_other");
uint32_t i = 0;
uint32_t ptr;
Process * p = d->owner;
uint32_t matBase = p->getDescriptor()->getAddress ("mat_other");
uint32_t i = 0;
uint32_t ptr;
other.clear();
other.clear();
while(1)
{
t_matglossOther mat;
ptr = p->readDWord(matBase + i*4);
if(ptr==0)
break;
p->readSTLString(ptr, mat.rawname, sizeof(mat.rawname));
other.push_back(mat);
i++;
}
return true;
while(1)
{
t_matglossOther mat;
ptr = p->readDWord(matBase + i*4);
if(ptr==0)
break;
p->readSTLString(ptr, mat.rawname, sizeof(mat.rawname));
other.push_back(mat);
i++;
}
return true;
}
bool Materials::ReadDescriptorColors (void)

File diff suppressed because it is too large Load Diff

@ -18,10 +18,8 @@ SET( 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_SRCS ${dfedit_UI})
QT4_WRAP_UI(dfoffsetedit_UI_h ${dfedit_UI})
qt4_automoc(${dfoffsetedit_SRCS})
#ADD_EXECUTABLE( sample ${SAMPLE_SRCS} ${SAMPLE_MOC_SRCS} ${SAMPLE_RC_SRCS} ${SAMPLE_UI_HDRS})
add_executable(dfoffsetedit ${dfoffsetedit_SRCS} ${dfoffsetedit_RC_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} )

@ -30,7 +30,7 @@ dfedit::~dfedit()
void dfedit::slotOpen(bool )
{
QFileDialog fd(this,tr("Locate the Memoxy.xml file"));
fd.setNameFilter(tr("Memory definition (Memory.xml)"));
fd.setNameFilter(tr("Memory definition (*.xml)"));
fd.setFileMode(QFileDialog::ExistingFile);
fd.setAcceptMode(QFileDialog::AcceptOpen);
int result = fd.exec();

@ -82,7 +82,12 @@
<number>0</number>
</property>
<property name="text">
<string>&lt;h1&gt;Title text&lt;/h1&gt;&lt;p&gt;Some other text. It seriously rocks.&lt;/p&gt;</string>
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:xx-large; font-weight:600;&quot;&gt;Title text&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Some other text.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>