|
From: Erik B. <do...@us...> - 2004-11-06 18:59:05
|
Update of /cvsroot/seq/showeq/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18666/src Modified Files: Tag: pre_v5_0_dev2 Makefile.am editor.cpp everquest.h interface.cpp interface.h itemdbtool.cpp packetlog.cpp packetstream.cpp player.cpp player.h xmlpreferences.cpp Log Message: x86_64 and gcc 3.4.2 changes Index: player.h =================================================================== RCS file: /cvsroot/seq/showeq/src/player.h,v retrieving revision 1.21.6.2 retrieving revision 1.21.6.2.2.1 diff -u -d -r1.21.6.2 -r1.21.6.2.2.1 --- player.h 16 Jan 2004 20:22:11 -0000 1.21.6.2 +++ player.h 6 Nov 2004 18:58:52 -0000 1.21.6.2.2.1 @@ -132,7 +132,7 @@ signals: void newPlayer(void); void buffLoad(const spellBuff*); - void newSpeed (int speed); + void newSpeed (double speed); void statChanged ( int statNum, int val, int max Index: packetstream.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/packetstream.cpp,v retrieving revision 1.1.6.4.2.1 retrieving revision 1.1.6.4.2.2 diff -u -d -r1.1.6.4.2.1 -r1.1.6.4.2.2 --- packetstream.cpp 2 Oct 2004 21:36:36 -0000 1.1.6.4.2.1 +++ packetstream.cpp 6 Nov 2004 18:58:52 -0000 1.1.6.4.2.2 @@ -695,7 +695,7 @@ if (!found && !opcodeEntry->isEmpty()) { QString tempStr; - tempStr.sprintf("%s (%#04x) (dataLen: %d) doesn't match:", + tempStr.sprintf("%s (%#04x) (dataLen: %u) doesn't match:", (const char*)opcodeEntry->name(), opcodeEntry->opcode(), len); Index: itemdbtool.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/itemdbtool.cpp,v retrieving revision 1.11.6.3 retrieving revision 1.11.6.3.2.1 diff -u -d -r1.11.6.3 -r1.11.6.3.2.1 --- itemdbtool.cpp 24 Sep 2004 04:25:53 -0000 1.11.6.3 +++ itemdbtool.cpp 6 Nov 2004 18:58:52 -0000 1.11.6.3.2.1 @@ -1683,7 +1683,7 @@ printf("001: "); uint8_t fieldCount = 1; uint8_t col = 5; - size_t fieldWidth; + int fieldWidth; const char* curPos = rawData; const char* endField; Index: Makefile.am =================================================================== RCS file: /cvsroot/seq/showeq/src/Makefile.am,v retrieving revision 1.22.6.5.2.2 retrieving revision 1.22.6.5.2.3 diff -u -d -r1.22.6.5.2.2 -r1.22.6.5.2.3 --- Makefile.am 2 Oct 2004 21:36:23 -0000 1.22.6.5.2.2 +++ Makefile.am 6 Nov 2004 18:58:51 -0000 1.22.6.5.2.3 @@ -10,7 +10,7 @@ ITEMDB_SRCS = itemdb.cpp gdbmconv.cpp $(DB3_SRCS) nodist_ITEMDB_SRCS = -bin_PROGRAMS = showeq showeqitemdbtool +bin_PROGRAMS = showeq showeqitemdbtool patcher showeq_SOURCES = main.cpp spawn.cpp spawnshell.cpp spawnlist.cpp spellshell.cpp \ spelllist.cpp vpacket.cpp editor.cpp filter.cpp packetfragment.cpp packetstream.cpp \ @@ -90,6 +90,15 @@ showeq_LDADD = $(QT_LDFLAGS) $(QTLIB) $(DB3_LIBS) $(LIBPTHREAD) $(MEMORY_LIBS) \ $(PROFILE_LIBS) $(SHOWEQ_RPATH) $(USER_LDFLAGS) +patcher_SOURCES = testpatcher.cpp patchdialogreceiver.cpp patcher.cpp diagnosticmessageslight.cpp datalocationmgr.cpp + +nodist_patcher_SOURCES = patcher.moc patchdialogreceiver.moc + +patcher_LDADD = $(QT_LDFLAGS) -lqui $(QTLIB) $(LIBPTHREAD) $(MEMORY_LIBS) \ + $(PROFILE_LIBS) $(SHOWEQ_RPATH) $(USER_LDFLAGS) + +$(srcdir)/patcher.cpp: patcher.moc +$(srcdir)/patchdialogreceiver.cpp: patchdialogreceiver.moc showeqitemdbtool_SOURCES = itemdbtool.cpp util.cpp diagnosticmessageslight.cpp datalocationmgr.cpp $(ITEMDB_SRCS) nodist_showeqitemdbtool_SOURCES = $(nodist_ITEMDB_SRCS) @@ -131,7 +140,9 @@ nodist_sortitem_SOURCES = sortitem_LDADD = $(QT_LDFLAGS) $(QTLIB) $(LIBPTHREAD) $(SHOWEQ_RPATH) $(USER_LDFLAGS) -EXTRA_DIST = classes.h compass.h everquest.h interface.h main.h map.h filter.h vpacket.h editor.h packet.h packetcapture.h packetcommon.h packetformat.h packetstream.h packetfragment.h packetinfo.h races.h skills.h spells.h util.h experiencelog.h combatlog.h spawn.h spawnshell.h spawnlist.h spellshell.h spelllist.h languages.h weapons.h weapons1.h weapons27.h weapons28.h weapons2b.h decode.h itemdb.h gdbmconv.h cgiconv.h skilllist.h statlist.h db3conv.h dbcommon.h deity.h player.h crctab.h filtermgr.h point.h pointarray.h mapcore.h category.h compassframe.h group.h guild.h fixpt.h netdiag.h zones.h logger.h xmlconv.h xmlpreferences.h seqwindow.h seqlistview.h zonemgr.h spawnmonitor.h spawnpointlist.h typenames.h spawnlistcommon.h spawnlist2.h datetimemgr.h spawnlog.h packetlog.h datalocationmgr.h eqstr.h messages.h messagefilter.h messagewindow.h messageshell.h terminal.h filteredspawnlog.h messagefilterdialog.h diagnosticmessages.h mapicon.h mapicondialog.ui mapicondialog.ui.h filternotifications.h netstream.h guildshell.h guildlist.h bazaarlog.h message.h s_everquest.h staticspells.h h2info.pl +EXTRA_DIST = h2info.pl + +noinst_HEADERS = classes.h compass.h everquest.h interface.h main.h map.h filter.h vpacket.h editor.h packet.h packetcapture.h packetcommon.h packetformat.h packetstream.h packetfragment.h packetinfo.h races.h skills.h spells.h util.h experiencelog.h combatlog.h spawn.h spawnshell.h spawnlist.h spellshell.h spelllist.h languages.h weapons.h weapons1.h weapons27.h weapons28.h weapons2b.h decode.h itemdb.h gdbmconv.h cgiconv.h skilllist.h statlist.h db3conv.h dbcommon.h deity.h player.h crctab.h filtermgr.h point.h pointarray.h mapcore.h category.h compassframe.h group.h guild.h fixpt.h netdiag.h zones.h logger.h xmlconv.h xmlpreferences.h seqwindow.h seqlistview.h zonemgr.h spawnmonitor.h spawnpointlist.h typenames.h spawnlistcommon.h spawnlist2.h datetimemgr.h spawnlog.h packetlog.h datalocationmgr.h eqstr.h messages.h messagefilter.h messagewindow.h messageshell.h terminal.h filteredspawnlog.h messagefilterdialog.h diagnosticmessages.h mapicon.h mapicondialog.ui mapicondialog.ui.h filternotifications.h netstream.h guildshell.h guildlist.h bazaarlog.h message.h s_everquest.h staticspells.h patcher.h patchdialogreceiver.h CLEANFILES = $(nodist_showeq_SOURCES) @@ -165,3 +176,4 @@ done endif + Index: xmlpreferences.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/xmlpreferences.cpp,v retrieving revision 1.3.16.2.2.2 retrieving revision 1.3.16.2.2.3 diff -u -d -r1.3.16.2.2.2 -r1.3.16.2.2.3 --- xmlpreferences.cpp 2 Oct 2004 21:36:36 -0000 1.3.16.2.2.2 +++ xmlpreferences.cpp 6 Nov 2004 18:58:52 -0000 1.3.16.2.2.3 @@ -765,7 +765,7 @@ default: qWarning("XMLPreferences::getPrefInt64(%s, %s, %lld): preference found,\n" "\tbut type %s is not convertable to type int64_t!", - (const char*)inName, (const char*)inSection, def, + (const char*)inName, (const char*)inSection, (long long)def, preference->typeName()); } @@ -811,9 +811,10 @@ break; } default: - qWarning("XMLPreferences::getPrefUInt64(%s, %s, %lld): preference found,\n" + qWarning("XMLPreferences::getPrefUInt64(%s, %s, %llu): preference found,\n" "\tbut type %s is not convertable to type uint64_t!", - (const char*)inName, (const char*)inSection, def, + (const char*)inName, (const char*)inSection, + (unsigned long long)def, preference->typeName()); } Index: interface.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/interface.cpp,v retrieving revision 1.67.6.9.2.2 retrieving revision 1.67.6.9.2.3 diff -u -d -r1.67.6.9.2.2 -r1.67.6.9.2.3 --- interface.cpp 2 Oct 2004 21:36:35 -0000 1.67.6.9.2.2 +++ interface.cpp 6 Nov 2004 18:58:52 -0000 1.67.6.9.2.3 @@ -126,6 +126,7 @@ m_unknownZoneLog(0), m_opcodeMonitorLog(0), m_selectedSpawn(0), + m_windowsMenus(11), m_compass(0), m_expWindow(0), m_combatWindow(0), @@ -135,6 +136,9 @@ { // disable the dock menu setDockMenuEnabled(false); + + // make sure the windows menus list autodeletes + m_windowsMenus.setAutoDelete(true); setCentralWidget(new QWidget(this, "filler")); @@ -2095,8 +2099,8 @@ this, SLOT(numPacket(int, int))); connect (m_packet, SIGNAL(resetPacket(int, int)), this, SLOT(resetPacket(int, int))); - connect (m_player, SIGNAL(newSpeed(int)), - this, SLOT(newSpeed(int))); + connect (m_player, SIGNAL(newSpeed(double)), + this, SLOT(newSpeed(double))); connect(m_player, SIGNAL(setExp(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)), this, SLOT(setExp(uint32_t, uint32_t, uint32_t, @@ -4384,7 +4388,7 @@ } void -EQInterface::newSpeed(int speed) +EQInterface::newSpeed(double speed) { // update twice per sec static int lastupdate = 0; @@ -4393,7 +4397,7 @@ lastupdate = mTime(); QString tempStr; - tempStr.sprintf("Run Speed: %d", speed); + tempStr.sprintf("Run Speed: %3.1f", speed); m_stsbarSpeed->setText(tempStr); } @@ -6049,12 +6053,28 @@ { QPopupMenu* menu = window->menu(); if (menu) - m_windowMenu->insertItem(window->caption(), menu, int(window)); + { + // insert the windows menu into the window menu + int id = m_windowMenu->insertItem(window->caption(), menu); + + // insert it into the window to window menu id dictionary + m_windowsMenus.insert((void*)window, new int(id)); + } } void EQInterface::removeWindowMenu(SEQWindow* window) { - m_windowMenu->removeItem(int(window)); + // find the windows menu id + int* id = m_windowsMenus.find((void*)window); + + // if the window had a menu, then remove it + if (id) + { + m_windowMenu->removeItem(*id); + + // remove the item from the list + m_windowsMenus.remove(window); + } } void EQInterface::setDockEnabled(QDockWindow* dw, bool enable) Index: player.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/player.cpp,v retrieving revision 1.42.6.6.2.1 retrieving revision 1.42.6.6.2.2 diff -u -d -r1.42.6.6.2.1 -r1.42.6.6.2.2 --- player.cpp 2 Oct 2004 21:36:36 -0000 1.42.6.6.2.1 +++ player.cpp 6 Nov 2004 18:58:52 -0000 1.42.6.6.2.2 @@ -851,9 +851,9 @@ updateLastChanged(); emit changeItem(this, tSpawnChangedPosition); - emit newSpeed((int)lrint(hypot( hypot( (pupdate->deltaX*8), - (pupdate->deltaY*8)), - (pupdate->deltaZ*8)))); + emit newSpeed(hypot( hypot( (pupdate->deltaX*8), + (pupdate->deltaY*8)), + (pupdate->deltaZ*8))); static uint8_t count = 0; Index: interface.h =================================================================== RCS file: /cvsroot/seq/showeq/src/interface.h,v retrieving revision 1.33.6.6 retrieving revision 1.33.6.6.2.1 diff -u -d -r1.33.6.6 -r1.33.6.6.2.1 --- interface.h 5 Sep 2004 19:11:12 -0000 1.33.6.6 +++ interface.h 6 Nov 2004 18:58:52 -0000 1.33.6.6.2.1 @@ -28,7 +28,7 @@ #include <qtabdialog.h> #include <qspinbox.h> #include <qintdict.h> - +#include <qptrdict.h> #include "everquest.h" #include "spawnlist.h" #include "spawnshell.h" @@ -106,6 +106,9 @@ //-------------------------------------------------- // EQInterface +/*! + \brief QMainWindow from Hell! Also known as ShowEQ's main window. +*/ class EQInterface:public QMainWindow { Q_OBJECT @@ -132,7 +135,7 @@ void newAltExp(uint32_t newExp, uint32_t totalExp, uint32_t totalTick, uint32_t maxExp, uint32_t tickExp, uint32_t aapoints); void levelChanged(uint8_t level); - void newSpeed(int); + void newSpeed(double); void numPacket(int, int); void resetPacket(int, int); void attack2Hand1(const uint8_t*); @@ -390,6 +393,7 @@ QPopupMenu* m_terminalShowUserFilterMenu; QPopupMenu* m_terminalHideUserFilterMenu; QPopupMenu* m_windowMenu; + QPtrDict<int> m_windowsMenus; CompassFrame* m_compass; MessageWindow* m_messageWindow[maxNumMessageWindows]; Index: packetlog.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/packetlog.cpp,v retrieving revision 1.1.6.4.2.1 retrieving revision 1.1.6.4.2.2 diff -u -d -r1.1.6.4.2.1 -r1.1.6.4.2.2 --- packetlog.cpp 2 Oct 2004 21:36:36 -0000 1.1.6.4.2.1 +++ packetlog.cpp 6 Nov 2004 18:58:52 -0000 1.1.6.4.2.2 @@ -266,7 +266,7 @@ else ::putchar('\n'); - ::printf("%s [Size: %d]%s\n", + ::printf("%s [Size: %u]%s\n", ((dir == DIR_Server) ? "[Server->Client]" : "[Client->Server]"), len, (const char*)opCodeToString(opcode)); Index: editor.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/editor.cpp,v retrieving revision 1.2.18.2 retrieving revision 1.2.18.3 diff -u -d -r1.2.18.2 -r1.2.18.3 --- editor.cpp 2 Oct 2004 21:36:35 -0000 1.2.18.2 +++ editor.cpp 6 Nov 2004 18:58:51 -0000 1.2.18.3 @@ -225,4 +225,4 @@ } #include "editor.moc" - \ No newline at end of file + Index: everquest.h =================================================================== RCS file: /cvsroot/seq/showeq/src/everquest.h,v retrieving revision 1.74.6.16 retrieving revision 1.74.6.16.2.1 diff -u -d -r1.74.6.16 -r1.74.6.16.2.1 --- everquest.h 24 Sep 2004 04:25:52 -0000 1.74.6.16 +++ everquest.h 6 Nov 2004 18:58:51 -0000 1.74.6.16.2.1 @@ -445,7 +445,7 @@ /*0244*/ uint8_t unknown244[14]; /*0258*/ int16_t deity; // Player's Deity -/*0262*/ uint8_t unknown260[115]; +/*0262*/ uint8_t unknown260[119]; }; /* 0375 */ /* @@ -473,7 +473,7 @@ /*0508*/ float underworld; // Underworld /*0512*/ float minclip; // Minimum view distance /*0516*/ float maxclip; // Maximum view distance -/*0520*/ uint8_t unknown0520[156]; // *** Placeholder +/*0520*/ uint8_t unknown0520[160]; // *** Placeholder /*0676*/ }; @@ -820,7 +820,7 @@ /*250*/ int8_t unknown249[4]; /*254*/ uint32_t petOwnerId; /*258*/ int16_t deity; -/*260*/ uint8_t unknown260[115]; +/*260*/ uint8_t unknown260[119]; /*375*/ }; |