You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(18) |
Oct
(11) |
Nov
(9) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
(6) |
Mar
|
Apr
(10) |
May
(38) |
Jun
(15) |
Jul
(32) |
Aug
|
Sep
(17) |
Oct
(11) |
Nov
|
Dec
(14) |
| 2006 |
Jan
(2) |
Feb
(5) |
Mar
(3) |
Apr
(2) |
May
(3) |
Jun
(7) |
Jul
|
Aug
|
Sep
(3) |
Oct
(2) |
Nov
(6) |
Dec
(3) |
| 2007 |
Jan
|
Feb
(17) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
(11) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
|
Sep
(6) |
Oct
(4) |
Nov
(1) |
Dec
|
| 2009 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
|
May
(4) |
Jun
(3) |
Jul
|
Aug
(5) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(6) |
| 2010 |
Jan
|
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
(5) |
| 2013 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(2) |
Dec
(2) |
| 2014 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(4) |
May
(4) |
Jun
(3) |
Jul
(4) |
Aug
(5) |
Sep
|
Oct
(2) |
Nov
(5) |
Dec
(2) |
| 2015 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(2) |
Sep
(2) |
Oct
(3) |
Nov
(4) |
Dec
(2) |
| 2017 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(4) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2018 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(2) |
Jun
(2) |
Jul
(8) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
(6) |
| 2019 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(4) |
May
(2) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(2) |
Oct
(13) |
Nov
(6) |
Dec
(4) |
| 2020 |
Jan
(7) |
Feb
(7) |
Mar
(7) |
Apr
(8) |
May
(5) |
Jun
(3) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
(37) |
Nov
(30) |
Dec
(8) |
| 2021 |
Jan
(14) |
Feb
(9) |
Mar
(7) |
Apr
(17) |
May
(3) |
Jun
(10) |
Jul
(7) |
Aug
(3) |
Sep
(3) |
Oct
(4) |
Nov
(15) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(5) |
Sep
(6) |
Oct
(4) |
Nov
(34) |
Dec
(17) |
| 2023 |
Jan
(3) |
Feb
(3) |
Mar
(29) |
Apr
(2) |
May
(18) |
Jun
(12) |
Jul
(12) |
Aug
(2) |
Sep
(7) |
Oct
(2) |
Nov
(2) |
Dec
(2) |
| 2024 |
Jan
(2) |
Feb
(10) |
Mar
(17) |
Apr
(6) |
May
(3) |
Jun
(9) |
Jul
(22) |
Aug
(48) |
Sep
(3) |
Oct
(2) |
Nov
(2) |
Dec
(8) |
| 2025 |
Jan
(3) |
Feb
(2) |
Mar
(9) |
Apr
(7) |
May
(3) |
Jun
(3) |
Jul
(2) |
Aug
(2) |
Sep
(11) |
Oct
(6) |
Nov
(9) |
Dec
(4) |
| 2026 |
Jan
(5) |
Feb
(6) |
Mar
(3) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <cn...@us...> - 2024-08-26 22:40:01
|
Revision: 1546
http://sourceforge.net/p/seq/svn/1546
Author: cn187
Date: 2024-08-26 22:40:00 +0000 (Mon, 26 Aug 2024)
Log Message:
-----------
Add ida helper script for generating zones.h
Added Paths:
-----------
showeq/branches/cn187_devel/scripts/ida/
showeq/branches/cn187_devel/scripts/ida/gen_zones_h.py
Added: showeq/branches/cn187_devel/scripts/ida/gen_zones_h.py
===================================================================
--- showeq/branches/cn187_devel/scripts/ida/gen_zones_h.py (rev 0)
+++ showeq/branches/cn187_devel/scripts/ida/gen_zones_h.py 2024-08-26 22:40:00 UTC (rev 1546)
@@ -0,0 +1,294 @@
+
+import datetime
+import sys
+import idautils
+
+""" Generate ShowEQ's zones.h from eggame.exe and Resources/ZoneNames.txt
+
+ NOTE: Requires IDA and python3
+
+ To use this script:
+ 1. Open eqgame.exe in IDA, and let IDA complete its analysis.
+ 2. Select View->Recent Scripts
+ 3. In the Recent Scripts tab, press Insert, and browse to the location
+ of this script. Select this script and click "Open".
+ 4. An entry for this script now appears in the list of scripts.
+ Double-click it to load it.
+ 5. (optional) right click in the output window and select "Clear". This
+ will reduce the extra stuff you have to delete when you copy/paste
+ 6. At the idapython command line, run
+
+ dump_zones('/path/to/ZoneNames.txt')
+
+ Note: ZoneNames.txt is found in your EQ client directory, under the
+ Resources subdirectory. If you want you can copy it to somewhere
+ convenient (e.g., /tmp), then pass that path to dump_zones.
+ 7. Create a new file (e.g. zones.h.new)
+ 8. Right-click in the output window, select "Select All", then "Copy".
+ 9. Paste into the file you created in step 7
+ 10. There will be a couple of lines (or more if you skipped step 5) at
+ the top of the file (before the start of the block comment containing
+ the copyright/license info) that need to be deleted. Basically,
+ delete everything before the line consisting of "/*"
+ 11. Save the file
+ 12. As a sanity check, diff with zones.h to see what changed. This is
+ important in case the way the code works changed, or there's a bug
+ in the script - we don't want to commit an empty or otherwise bad
+ zones file.
+ 13. If everything looks good, rename your new file to zones.h and replace
+ the existing zones.h.
+ 14. Do a test compile to make sure everything is good.
+ 15. Commit changes.
+"""
+
+def find_string_refs_to(haystack, needle):
+ refs = set()
+ for s in haystack:
+ if str(s) == needle:
+ for x in idautils.XrefsTo(s.ea):
+ refs.add(x.to)
+ return refs
+
+def find_string_refs_from(haystack, needle):
+ refs = set()
+ for s in haystack:
+ if str(s) == needle:
+ for x in idautils.XrefsTo(s.ea):
+ refs.add(x.frm)
+ return refs
+
+
+def get_worlddata_start(ida_strings=None):
+
+ if not ida_strings:
+ strings = idautils.Strings(True)
+ else:
+ strings = ida_strings
+
+ key_string = 'EQWorldData::EQWorldData'
+
+ eas = find_string_refs_from(strings, key_string)
+
+ if len(eas) == 1:
+ ea = eas.pop()
+ return ea
+ else:
+ return None
+
+
+# NOTE we could grab the addresses of EQWorldData::EQWorldData and Unknown Zone
+# and use those for addr boundaries when looking for zone string loads
+# (if there are too many conflicting loads in amongst the ones we want)
+
+# NOTE also, if we have to, we could determine exact reg numbers based on known
+# zone names, with the assumption that the compiler will reuse the same registers
+# throughout the function
+def get_next_zone_loaded(cur_ea, end_ea, rnum=None):
+ ea = cur_ea
+
+ while ea < end_ea:
+ mnem = idc.print_insn_mnem(ea)
+ if mnem == "lea":
+ if idc.get_operand_type(ea, 0) != o_reg:
+ ea = idc.next_head(ea)
+ continue
+ if rnum is not None and idc.get_operand_value(ea, 0) != rnum:
+ ea = idc.next_head(ea)
+ continue
+ if idc.get_operand_type(ea, 1) != o_mem:
+ ea = idc.next_head(ea)
+ continue
+ string = idc.get_strlit_contents(idc.get_operand_value(ea, 1))
+ if not string:
+ ea = idc.next_head(ea)
+ continue
+ return ea, idc.get_strlit_contents(idc.get_operand_value(ea, 1)).decode('ascii')
+ ea = idc.next_head(ea)
+
+ return ea, None
+
+
+
+def get_next_file_index(cur_ea, end_ea, rnum=None):
+ ea = cur_ea
+
+ offset = 0
+ backtrack = False
+
+ while ea < end_ea:
+ mnem = idc.print_insn_mnem(ea)
+ if mnem == "lea":
+ if idc.get_operand_type(ea, 0) != o_reg:
+ ea = idc.next_head(ea)
+ continue
+ if rnum is not None and idc.get_operand_value(ea, 0) != rnum:
+ ea = idc.next_head(ea)
+ continue
+ if idc.get_operand_type(ea, 1) != o_displ:
+ ea = idc.next_head(ea)
+ continue
+ backtrack = True
+ break
+ elif mnem == "mov":
+ if idc.get_operand_type(ea, 0) != o_reg:
+ ea = idc.next_head(ea)
+ continue
+ if rnum is not None and idc.get_operand_value(ea, 0) != rnum:
+ ea = idc.next_head(ea)
+ continue
+ if idc.get_operand_type(ea, 1) != o_imm:
+ ea = idc.next_head(ea)
+ continue
+ return ea, idc.get_operand_value(ea, 1)
+ ea = idc.next_head(ea)
+
+ if backtrack:
+ prev = idc.prev_head(ea)
+ mnem = idc.print_insn_mnem(prev)
+ if mnem == "xor" and \
+ idc.get_operand_type(prev, 0) == o_reg and \
+ idc.get_operand_type(prev,1) == o_reg:
+ return ea, idc.get_operand_value(ea, 1)
+
+ if mnem != "mov" or \
+ idc.get_operand_type(prev, 0) != o_reg or\
+ idc.get_operand_type(prev, 1) != o_imm:
+ sys.stderr.write("Backtrack failed at " + hex(prev) + '\n')
+ return ea, -1
+
+ offset = idc.get_operand_value(prev, 1)
+
+ return ea, idc.get_operand_value(ea, 1) + offset
+
+ return ea, -1
+
+def find_qeynos_load(cur_ea, end_ea):
+ ea = cur_ea
+
+ while ea < end_ea:
+ ea, shortzone = get_next_zone_loaded(ea, end_ea)
+ if shortzone != 'qeynos':
+ ea = idc.next_head(ea)
+ continue
+
+ rnum = idc.get_operand_value(ea, 0)
+
+ return ea, shortzone, rnum
+
+def find_qeynos_index(cur_ea, end_ea):
+ ea = cur_ea
+
+ while ea < end_ea:
+ ea, idx = get_next_file_index(ea, end_ea)
+ if idx != 1:
+ ea = idc.next_head(ea)
+ continue
+
+ rnum = idc.get_operand_value(ea, 0)
+
+ return ea, idx, rnum
+
+
+
+
+# if you know the address where "EQWorldData::EQWorldData" is loaded, you can
+# pass it as the start_ea
+def dump_zones(zonenames_path=None, ida_strings=None, start_ea=None):
+
+ if not zonenames_path:
+ sys.stderr.write("Path to ZoneNames.txt is required\n")
+ return
+
+ if not ida_strings:
+ strings = idautils.Strings(True)
+ else:
+ strings = ida_strings
+
+ if not start_ea:
+ start_ea = get_worlddata_start(strings)
+ if not start_ea:
+ sys.stderr.write("Could not find unique start ea. Found: " + eas + '\n')
+ return
+
+ wd_func = ida_funcs.get_func(start_ea)
+ func_end = wd_func.end_ea
+
+ cur_ea, shortzone, zone_regnum = find_qeynos_load(idc.next_head(start_ea), func_end)
+ if not cur_ea:
+ sys.stderr.write("Could not find first zone load\n")
+ return
+
+ cur_ea, idx, idx_regnum = find_qeynos_index(idc.next_head(start_ea), func_end)
+ if not cur_ea:
+ sys.stderr.write("Could not find first load index\n")
+ return
+
+ zonenames = {}
+ zones = {}
+
+ with open(zonenames_path, 'r') as f:
+ for line in f.readlines():
+ index, zonename, _, _ = line.split('^')
+ if index == "ZONE":
+ continue
+ zonenames[int(index)] = zonename.strip()
+
+ #print(idx, shortzone, zonenames[idx])
+ zones[idx] = (idx, shortzone, zonenames[idx])
+
+ while cur_ea < func_end:
+ cur_ea, shortzone = get_next_zone_loaded(cur_ea, func_end, zone_regnum)
+ if not shortzone:
+ break
+
+ cur_ea = idc.next_head(cur_ea)
+ cur_ea, idx = get_next_file_index(cur_ea, func_end, idx_regnum)
+ if idx < 0:
+ break;
+
+ if idx not in zonenames:
+ cur_ea = idc.next_head(cur_ea)
+ #sys.stderr.write("Did not find index {} for zone {} in ZoneNames.txt\n".format(idx, shortzone))
+ zones[idx] = (idx, shortzone, shortzone)
+ else:
+ #print(idx, shortzone, zonenames[idx])
+ zones[idx] = (idx, shortzone, zonenames[idx])
+
+ cur_ea = idc.next_head(cur_ea)
+
+
+ keys = sorted(zones.keys())
+ last_idx = keys[-1]
+ current_year=datetime.datetime.now().year
+ print(f"""/*
+ * zones.h
+ * Copyright 2003-{current_year} by the respective ShowEQ Developers
+ *
+ * This file is part of ShowEQ.
+ * http://www.sourceforge.net/projects/seq
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* Maps zoneId numbers to strings, used in util.cpp */""")
+
+ for i in range(0, last_idx+1):
+ if i in zones:
+ idx, shortzone, longzone = zones[i]
+ print('{{ "{}", "{}" }}, // {}'.format(shortzone, longzone, idx))
+ else:
+ print('{{ NULL, NULL }}, // {}'.format(i))
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-26 22:39:34
|
Revision: 1545
http://sourceforge.net/p/seq/svn/1545
Author: cn187
Date: 2024-08-26 22:39:31 +0000 (Mon, 26 Aug 2024)
Log Message:
-----------
Regenerate zones.h from current client files
Modified Paths:
--------------
showeq/trunk/src/zones.h
Modified: showeq/trunk/src/zones.h
===================================================================
--- showeq/trunk/src/zones.h 2024-08-26 22:39:24 UTC (rev 1544)
+++ showeq/trunk/src/zones.h 2024-08-26 22:39:31 UTC (rev 1545)
@@ -1,6 +1,6 @@
/*
* zones.h
- * Copyright 2003-2009, 2011-2012, 2014-2015, 2017-2019 by the respective ShowEQ Developers
+ * Copyright 2003-2024 by the respective ShowEQ Developers
*
* This file is part of ShowEQ.
* http://www.sourceforge.net/projects/seq
@@ -19,6 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
/* Maps zoneId numbers to strings, used in util.cpp */
{ NULL, NULL }, // 0
{ "qeynos", "South Qeynos" }, // 1
@@ -31,14 +32,14 @@
{ "freportn", "North Freeport" }, // 8
{ "freportw", "West Freeport" }, // 9
{ "freporte", "East Freeport" }, // 10
-{ "runnyeye", "Clan Runnyeye" }, // 11
-{ "qey2hh1", "West Karana" }, // 12
-{ "northkarana", "North Karana" }, // 13
-{ "southkarana", "South Karana" }, // 14
-{ "eastkarana", "East Karana" }, // 15
-{ "beholder", "Gorge of King Xorbb" }, // 16
-{ "blackburrow", "BlackBurrow" }, // 17
-{ "paw", "Infected Paw" }, // 18
+{ "runnyeye", "The Liberated Citadel of Runnyeye" }, // 11
+{ "qey2hh1", "The Western Plains of Karana" }, // 12
+{ "northkarana", "The Northern Plains of Karana" }, // 13
+{ "southkarana", "The Southern Plains of Karana" }, // 14
+{ "eastkarana", "The Eastern Plains of Karana" }, // 15
+{ "beholder", "The Gorge of King Xorbb" }, // 16
+{ "blackburrow", "Blackburrow" }, // 17
+{ "paw", "The Lair of the Splitpaw" }, // 18
{ "rivervale", "Rivervale" }, // 19
{ "kithicor", "Kithicor Forest" }, // 20
{ "commons", "West Commonlands" }, // 21
@@ -47,18 +48,18 @@
{ "erudnext", "Erudin" }, // 24
{ "nektulos", "Nektulos Forest" }, // 25
{ "cshome", "Sunset Home" }, // 26
-{ "lavastorm", "Lavastorm Mountains" }, // 27
-{ "nektropos", "Nektropos" }, // 28
+{ "lavastorm", "The Lavastorm Mountains" }, // 27
+{ "nektropos", "nektropos" }, // 28
{ "halas", "Halas" }, // 29
{ "everfrost", "Everfrost Peaks" }, // 30
{ "soldunga", "Solusek's Eye" }, // 31
{ "soldungb", "Nagafen's Lair" }, // 32
-{ "misty", "Misty Thicket" }, // 33
-{ "nro", "North Ro" }, // 34
-{ "sro", "South Ro" }, // 35
+{ "misty", "misty" }, // 33
+{ "nro", "The Northern Desert of Ro" }, // 34
+{ "sro", "The Southern Desert of Ro" }, // 35
{ "befallen", "Befallen" }, // 36
-{ "oasis", "Oasis of Marr" }, // 37
-{ "tox", "Toxxulia Forest" }, // 38
+{ "oasis", "The Oasis of Marr" }, // 37
+{ "tox", "tox" }, // 38
{ "hole", "The Ruins of Old Paineel" }, // 39
{ "neriaka", "Neriak - Foreign Quarter" }, // 40
{ "neriakb", "Neriak - Commons" }, // 41
@@ -65,53 +66,53 @@
{ "neriakc", "Neriak - Third Gate" }, // 42
{ "neriakd", "Neriak - Fourth Gate" }, // 43
{ "najena", "Najena" }, // 44
-{ "qcat", "Qeynos Catacombs" }, // 45
-{ "innothule", "Innothule Swamp" }, // 46
+{ "qcat", "The Qeynos Aqueduct System" }, // 45
+{ "innothule", "innothule" }, // 46
{ "feerrott", "The Feerrott" }, // 47
-{ "cazicthule", "Cazic-Thule" }, // 48
+{ "cazicthule", "Temple of Cazic-Thule" }, // 48
{ "oggok", "Oggok" }, // 49
-{ "rathemtn", "Mountains of Rathe" }, // 50
+{ "rathemtn", "The Rathe Mountains" }, // 50
{ "lakerathe", "Lake Rathetear" }, // 51
{ "grobb", "Grobb" }, // 52
-{ "aviak", "Aviak Village" }, // 53
-{ "gfaydark", "Greater Faydark" }, // 54
+{ "aviak", "Aviak" }, // 53
+{ "gfaydark", "The Greater Faydark" }, // 54
{ "akanon", "Ak'Anon" }, // 55
-{ "steamfont", "Steamfont Mountains" }, // 56
-{ "lfaydark", "Lesser Faydark" }, // 57
+{ "steamfont", "steamfont" }, // 56
+{ "lfaydark", "The Lesser Faydark" }, // 57
{ "crushbone", "Clan Crushbone" }, // 58
-{ "mistmoore", "Castle Mistmoore" }, // 59
-{ "kaladima", "Kaladim" }, // 60
-{ "felwithea", "Felwithe" }, // 61
-{ "felwitheb", "Felwithe" }, // 62
-{ "unrest", "Estate of Unrest" }, // 63
+{ "mistmoore", "The Castle of Mistmoore" }, // 59
+{ "kaladima", "South Kaladim" }, // 60
+{ "felwithea", "Northern Felwithe" }, // 61
+{ "felwitheb", "Southern Felwithe" }, // 62
+{ "unrest", "The Estate of Unrest" }, // 63
{ "kedge", "Kedge Keep" }, // 64
-{ "guktop", "Upper Guk" }, // 65
-{ "gukbottom", "Lower Guk" }, // 66
-{ "kaladimb", "Kaladim" }, // 67
+{ "guktop", "The City of Guk" }, // 65
+{ "gukbottom", "The Ruins of Old Guk" }, // 66
+{ "kaladimb", "North Kaladim" }, // 67
{ "butcher", "Butcherblock Mountains" }, // 68
-{ "oot", "Ocean of Tears" }, // 69
+{ "oot", "The Ocean of Tears" }, // 69
{ "cauldron", "Dagnor's Cauldron" }, // 70
-{ "airplane", "Plane of Sky" }, // 71
-{ "fearplane", "Plane of Fear" }, // 72
+{ "airplane", "The Plane of Sky" }, // 71
+{ "fearplane", "The Plane of Fear" }, // 72
{ "permafrost", "Permafrost Keep" }, // 73
-{ "kerraridge", "Kerra Isle" }, // 74
+{ "kerraridge", "kerraridge" }, // 74
{ "paineel", "Paineel" }, // 75
{ "hateplane", "The Plane of Hate" }, // 76
{ "arena", "The Arena" }, // 77
{ "fieldofbone", "The Field of Bone" }, // 78
-{ "warslikswood", "Warsliks Woods" }, // 79
-{ "soltemple", "Temple of Solusek Ro" }, // 80
-{ "droga", "Temple of Droga" }, // 81
-{ "cabwest", "West Cabilis" }, // 82
-{ "swampofnohope", "Swamp of No Hope" }, // 83
+{ "warslikswood", "The Warsliks Woods" }, // 79
+{ "soltemple", "The Temple of Solusek Ro" }, // 80
+{ "droga", "The Temple of Droga" }, // 81
+{ "cabwest", "Cabilis West" }, // 82
+{ "swampofnohope", "The Swamp of No Hope" }, // 83
{ "firiona", "Firiona Vie" }, // 84
{ "lakeofillomen", "Lake of Ill Omen" }, // 85
-{ "dreadlands", "Dreadlands" }, // 86
-{ "burningwood", "Burning Woods" }, // 87
+{ "dreadlands", "The Dreadlands" }, // 86
+{ "burningwood", "The Burning Woods" }, // 87
{ "kaesora", "Kaesora" }, // 88
-{ "sebilis", "Old Sebilis" }, // 89
-{ "citymist", "City of Mist" }, // 90
-{ "skyfire", "Skyfire Mountains" }, // 91
+{ "sebilis", "The Ruins of Sebilis" }, // 89
+{ "citymist", "The City of Mist" }, // 90
+{ "skyfire", "The Skyfire Mountains" }, // 91
{ "frontiermtns", "Frontier Mountains" }, // 92
{ "overthere", "The Overthere" }, // 93
{ "emeraldjungle", "The Emerald Jungle" }, // 94
@@ -120,37 +121,37 @@
{ "kurn", "Kurn's Tower" }, // 97
{ "erudsxing", "Erud's Crossing" }, // 98
{ NULL, NULL }, // 99
-{ "stonebrunt", "Stonebrunt Mountains" }, // 100
+{ "stonebrunt", "The Stonebrunt Mountains" }, // 100
{ "warrens", "The Warrens" }, // 101
{ "karnor", "Karnor's Castle" }, // 102
{ "chardok", "Chardok" }, // 103
-{ "dalnir", "Dalnir" }, // 104
+{ "dalnir", "The Crypt of Dalnir" }, // 104
{ "charasis", "Howling Stones" }, // 105
-{ "cabeast", "East Cabilis" }, // 106
-{ "nurga", "Mines of Nurga" }, // 107
+{ "cabeast", "Cabilis East" }, // 106
+{ "nurga", "The Mines of Nurga" }, // 107
{ "veeshan", "Veeshan's Peak" }, // 108
{ "veksar", "Veksar" }, // 109
-{ "iceclad", "Iceclad Ocean" }, // 110
-{ "frozenshadow", "Tower of Frozen Shadow" }, // 111
+{ "iceclad", "The Iceclad Ocean" }, // 110
+{ "frozenshadow", "The Tower of Frozen Shadow" }, // 111
{ "velketor", "Velketor's Labyrinth" }, // 112
{ "kael", "Kael Drakkel" }, // 113
{ "skyshrine", "Skyshrine" }, // 114
-{ "thurgadina", "Thurgadin" }, // 115
+{ "thurgadina", "The City of Thurgadin" }, // 115
{ "eastwastes", "Eastern Wastes" }, // 116
{ "cobaltscar", "Cobalt Scar" }, // 117
-{ "greatdivide", "Great Divide" }, // 118
+{ "greatdivide", "The Great Divide" }, // 118
{ "wakening", "The Wakening Land" }, // 119
-{ "westwastes", "Western Wastes" }, // 120
+{ "westwastes", "The Western Wastes" }, // 120
{ "crystal", "Crystal Caverns" }, // 121
{ NULL, NULL }, // 122
{ "necropolis", "Dragon Necropolis" }, // 123
-{ "templeveeshan", "Temple of Veeshan" }, // 124
+{ "templeveeshan", "The Temple of Veeshan" }, // 124
{ "sirens", "Siren's Grotto" }, // 125
-{ "mischiefplane", "Plane of Mischief" }, // 126
-{ "growthplane", "Plane of Growth" }, // 127
-{ "sleeper", "Sleeper's Tomb" }, // 128
+{ "mischiefplane", "The Plane of Mischief" }, // 126
+{ "growthplane", "The Plane of Growth" }, // 127
+{ "sleeper", "The Sleeper's Tomb" }, // 128
{ "thurgadinb", "Icewell Keep" }, // 129
-{ "erudsxing2", "Marauder's Mire" }, // 130
+{ "erudsxing2", "erudsxing2" }, // 130
{ NULL, NULL }, // 131
{ NULL, NULL }, // 132
{ NULL, NULL }, // 133
@@ -177,7 +178,7 @@
{ "acrylia", "Acrylia Caverns" }, // 154
{ "sharvahl", "Shar Vahl" }, // 155
{ "paludal", "Paludal Caverns" }, // 156
-{ "fungusgrove", "Fungus Grove" }, // 157
+{ "fungusgrove", "The Fungus Grove" }, // 157
{ "vexthal", "Vex Thal" }, // 158
{ "sseru", "Sanctus Seru" }, // 159
{ "katta", "Katta Castellum" }, // 160
@@ -199,18 +200,18 @@
{ "umbral", "The Umbral Plains" }, // 176
{ NULL, NULL }, // 177
{ NULL, NULL }, // 178
-{ "akheva", "Akheva Ruins" }, // 179
-{ "arena2", "The Arena" }, // 180
-{ "jaggedpine", "The Jaggedpine Forest" }, // 181
+{ "akheva", "The Akheva Ruins" }, // 179
+{ "arena2", "arena2" }, // 180
+{ "jaggedpine", "Jaggedpine Forest" }, // 181
{ "nedaria", "Nedaria's Landing" }, // 182
-{ "tutorial", "Tutorial Zone" }, // 183
-{ "load", "Loading" }, // 184
-{ "load2", "Loading" }, // 185
+{ "tutorial", "tutorial" }, // 183
+{ "load", "load" }, // 184
+{ "load2", "load2" }, // 185
{ "hateplaneb", "The Plane of Hate" }, // 186
{ "shadowrest", "Shadowrest" }, // 187
-{ "tutoriala", "The Mines of Gloomingdeep" }, // 188
-{ "tutorialb", "The Mines of Gloomingdeep" }, // 189
-{ "clz", "Loading" }, // 190
+{ "tutoriala", "tutoriala" }, // 188
+{ "tutorialb", "tutorialb" }, // 189
+{ "clz", "clz" }, // 190
{ NULL, NULL }, // 191
{ NULL, NULL }, // 192
{ NULL, NULL }, // 193
@@ -221,115 +222,115 @@
{ NULL, NULL }, // 198
{ NULL, NULL }, // 199
{ "codecay", "Ruins of Lxanvom" }, // 200
-{ "pojustice", "Plane of Justice" }, // 201
-{ "poknowledge", "Plane of Knowledge" }, // 202
-{ "potranquility", "Plane of Tranquility" }, // 203
-{ "ponightmare", "Plane of Nightmare" }, // 204
-{ "podisease", "Plane of Disease" }, // 205
-{ "poinnovation", "Plane of Innovation" }, // 206
-{ "potorment", "Plane of Torment" }, // 207
-{ "povalor", "Plane of Valor" }, // 208
-{ "bothunder", "Torden, The Bastion of Thunder" }, // 209
-{ "postorms", "Plane of Storms" }, // 210
-{ "hohonora", "Halls of Honor" }, // 211
-{ "solrotower", "Solusek Ro's Tower" }, // 212
-{ "powar", "Plane of War" }, // 213
-{ "potactics", "Drunder, Fortress of Zek" }, // 214
+{ "pojustice", "The Plane of Justice" }, // 201
+{ "poknowledge", "The Plane of Knowledge" }, // 202
+{ "potranquility", "The Plane of Tranquility" }, // 203
+{ "ponightmare", "The Plane of Nightmare" }, // 204
+{ "podisease", "The Plane of Disease" }, // 205
+{ "poinnovation", "The Plane of Innovation" }, // 206
+{ "potorment", "Torment, the Plane of Pain" }, // 207
+{ "povalor", "The Plane of Valor" }, // 208
+{ "bothunder", "Torden, the Bastion of Thunder" }, // 209
+{ "postorms", "The Plane of Storms" }, // 210
+{ "hohonora", "The Halls of Honor" }, // 211
+{ "solrotower", "The Tower of Solusek Ro" }, // 212
+{ "powar", "The Plane of War" }, // 213
+{ "potactics", "Drunder, the Fortress of Zek" }, // 214
{ "poair", "Eryslai, the Kingdom of Wind" }, // 215
-{ "powater", "Reef of Coirnav" }, // 216
-{ "pofire", "Doomfire, The Burning Lands" }, // 217
+{ "powater", "The Reef of Coirnav" }, // 216
+{ "pofire", "Doomfire, the Burning Lands" }, // 217
{ "poeartha", "Vegarlson, The Earthen Badlands" }, // 218
-{ "potimea", "Plane of Time" }, // 219
-{ "hohonorb", "Temple of Marr" }, // 220
-{ "nightmareb", "Lair of Terris Thule" }, // 221
-{ "poearthb", "Stronghold of the Twelve" }, // 222
-{ "potimeb", "Plane of Time" }, // 223
-{ "gunthak", "Gulf of Gunthak" }, // 224
+{ "potimea", "The Plane of Time" }, // 219
+{ "hohonorb", "The Temple of Marr" }, // 220
+{ "nightmareb", "The Lair of Terris-Thule" }, // 221
+{ "poearthb", "Ragrax, Stronghold of the Twelve" }, // 222
+{ "potimeb", "The Prison of the Forsaken" }, // 223
+{ "gunthak", "The Gulf of Gunthak" }, // 224
{ "dulak", "Dulak's Harbor" }, // 225
-{ "torgiran", "Torgiran Mines" }, // 226
-{ "nadox", "Crypt of Nadox" }, // 227
-{ "hatesfury", "Hate's Fury, The Scorned Maiden" }, // 228
-{ "guka", "The Cauldron of Lost Souls" }, // 229
-{ "ruja", "The Bloodied Quarries" }, // 230
-{ "taka", "The Sunken Library" }, // 231
-{ "mira", "The Silent Gallery" }, // 232
-{ "mmca", "The Forlorn Caverns" }, // 233
-{ "gukb", "The Drowning Crypt" }, // 234
-{ "rujb", "The Halls of War" }, // 235
-{ "takb", "The Shifting Tower" }, // 236
-{ "mirb", "The Maw of the Menagerie" }, // 237
-{ "mmcb", "The Dreary Grotto" }, // 238
-{ "gukc", "The Ancient Aqueducts" }, // 239
-{ "rujc", "The Wind Bridges" }, // 240
-{ "takc", "The Fading Temple" }, // 241
-{ "mirc", "The Spider Den" }, // 242
-{ "mmcc", "The Asylum of Invoked Stone" }, // 243
-{ "gukd", "The Mushroom Grove" }, // 244
-{ "rujd", "The Gladiator Pits" }, // 245
-{ "takd", "The Royal Observatory" }, // 246
-{ "mird", "The Hushed Banquet" }, // 247
-{ "mmcd", "The Chambers of Eternal Affliction" }, // 248
-{ "guke", "The Foreboding Prison" }, // 249
-{ "ruje", "The Drudge Hollows" }, // 250
-{ "take", "The River of Recollection" }, // 251
-{ "mire", "The Frosted Halls" }, // 252
-{ "mmce", "The Sepulcher of the Damned" }, // 253
-{ "gukf", "The Chapel of the Witnesses" }, // 254
-{ "rujf", "The Fortified Lair of the Taskmasters" }, // 255
-{ "takf", "The Sandfall Corridors" }, // 256
-{ "mirf", "The Forgotten Wastes" }, // 257
-{ "mmcf", "The Ritualistic Summoning Grounds" }, // 258
-{ "gukg", "The Root Garden" }, // 259
-{ "rujg", "The Hidden Vale" }, // 260
-{ "takg", "The Balancing Chamber" }, // 261
-{ "mirg", "The Heart of the Menagerie" }, // 262
-{ "mmcg", "The Cesspits of Putrescence" }, // 263
-{ "gukh", "The Accursed Sanctuary" }, // 264
-{ "rujh", "The Blazing Forge" }, // 265
-{ "takh", "The Sweeping Tides" }, // 266
-{ "mirh", "The Morbid Laboratory" }, // 267
-{ "mmch", "The Aisles of Blood" }, // 268
-{ "ruji", "The Arena of Chance" }, // 269
-{ "taki", "The Antiquated Palace" }, // 270
-{ "miri", "The Theater of Imprisoned Horrors" }, // 271
-{ "mmci", "The Halls of Sanguinary Rites" }, // 272
-{ "rujj", "The Barracks of War" }, // 273
-{ "takj", "The Prismatic Corridors" }, // 274
-{ "mirj", "The Grand Library" }, // 275
-{ "mmcj", "The Infernal Sanctuary" }, // 276
-{ "chardokb", "The Halls of Betrayal" }, // 277
+{ "torgiran", "The Torgiran Mines" }, // 226
+{ "nadox", "The Crypt of Nadox" }, // 227
+{ "hatesfury", "Hate's Fury" }, // 228
+{ "guka", "Deepest Guk: Cauldron of Lost Souls" }, // 229
+{ "ruja", "The Rujarkian Hills: Bloodied Quarries" }, // 230
+{ "taka", "Takish-Hiz: Sunken Library" }, // 231
+{ "mira", "Miragul's Menagerie: Silent Gallery" }, // 232
+{ "mmca", "Mistmoore's Catacombs: Forlorn Caverns" }, // 233
+{ "gukb", "Deepest Guk: Drowning Crypt" }, // 234
+{ "rujb", "The Rujarkian Hills: Halls of War" }, // 235
+{ "takb", "Takish-Hiz: Shifting Tower" }, // 236
+{ "mirb", "Miragul's Menagerie: Maw of the Menagerie" }, // 237
+{ "mmcb", "Mistmoore's Catacombs: Dreary Grotto" }, // 238
+{ "gukc", "Deepest Guk: Ancient Aqueducts" }, // 239
+{ "rujc", "The Rujarkian Hills: Wind Bridges" }, // 240
+{ "takc", "Takish-Hiz: Fading Temple" }, // 241
+{ "mirc", "Miragul's Menagerie: Spider Den" }, // 242
+{ "mmcc", "Mistmoore's Catacombs: Asylum of Invoked Stone" }, // 243
+{ "gukd", "Deepest Guk: Mushroom Grove" }, // 244
+{ "rujd", "The Rujarkian Hills: Gladiator Pits" }, // 245
+{ "takd", "Takish-Hiz: Royal Observatory" }, // 246
+{ "mird", "Miragul's Menagerie: Hushed Banquet" }, // 247
+{ "mmcd", "Mistmoore's Catacombs: Chambers of Eternal Affliction" }, // 248
+{ "guke", "Deepest Guk: Foreboding Prison" }, // 249
+{ "ruje", "The Rujarkian Hills: Drudge Hollows" }, // 250
+{ "take", "Takish-Hiz: River of Recollection" }, // 251
+{ "mire", "Miragul's Menagerie: Frosted Halls" }, // 252
+{ "mmce", "Mistmoore's Catacombs: Sepulcher of the Damned" }, // 253
+{ "gukf", "Deepest Guk: Chapel of the Witnesses" }, // 254
+{ "rujf", "The Rujarkian Hills: Fortified Lair of the Taskmasters" }, // 255
+{ "takf", "Takish-Hiz: Sandfall Corridors" }, // 256
+{ "mirf", "Miragul's Menagerie: Forgotten Wastes" }, // 257
+{ "mmcf", "Mistmoore's Catacombs: Ritualistic Summoning Grounds" }, // 258
+{ "gukg", "Deepest Guk: Root Garden" }, // 259
+{ "rujg", "The Rujarkian Hills: Hidden Vale" }, // 260
+{ "takg", "Takish-Hiz: Balancing Chamber" }, // 261
+{ "mirg", "Miragul's Menagerie: Heart of the Menagerie" }, // 262
+{ "mmcg", "Mistmoore's Catacombs: Cesspits of Putrescence" }, // 263
+{ "gukh", "Deepest Guk: Accursed Sanctuary" }, // 264
+{ "rujh", "The Rujarkian Hills: Blazing Forge" }, // 265
+{ "takh", "Takish-Hiz: Sweeping Tides" }, // 266
+{ "mirh", "Miragul's Menagerie: Morbid Laboratory" }, // 267
+{ "mmch", "Mistmoore's Catacombs: Aisles of Blood" }, // 268
+{ "ruji", "The Rujarkian Hills: Arena of Chance" }, // 269
+{ "taki", "Takish-Hiz: Antiquated Palace" }, // 270
+{ "miri", "Miragul's Menagerie: Theater of Imprisoned Horrors" }, // 271
+{ "mmci", "Mistmoore's Catacombs: Halls of Sanguinary Rites" }, // 272
+{ "rujj", "The Rujarkian Hills: Barracks of War" }, // 273
+{ "takj", "Takish-Hiz: Prismatic Corridors" }, // 274
+{ "mirj", "Miragul's Menagerie: Grand Library" }, // 275
+{ "mmcj", "Mistmoore's Catacombs: Infernal Sanctuary" }, // 276
+{ "chardokb", "Chardok: The Halls of Betrayal" }, // 277
{ "soldungc", "The Caverns of Exile" }, // 278
-{ "abysmal", "Abysmal Sea" }, // 279
-{ "natimbi", "Natimbi, The Broken Shores" }, // 280
+{ "abysmal", "The Abysmal Sea" }, // 279
+{ "natimbi", "Natimbi, the Broken Shores" }, // 280
{ "qinimi", "Qinimi, Court of Nihilia" }, // 281
{ "riwwi", "Riwwi, Coliseum of Games" }, // 282
{ "barindu", "Barindu, Hanging Gardens" }, // 283
{ "ferubi", "Ferubi, Forgotten Temple of Taelosia" }, // 284
{ "snpool", "Sewers of Nihilia, Pool of Sludge" }, // 285
-{ "snlair", "Sewers of Nihilia, Lair of Trapped Ones..." }, // 286
+{ "snlair", "Sewers of Nihilia, Lair of Trapped Ones" }, // 286
{ "snplant", "Sewers of Nihilia, Purifying Plant" }, // 287
-{ "sncrematory", "Sewers of Nihilia, the Crematory" }, // 288
+{ "sncrematory", "Sewers of Nihilia, Emanating Crematory" }, // 288
{ "tipt", "Tipt, Treacherous Crags" }, // 289
-{ "vxed", "Vxed, The Crumbling Caverns" }, // 290
+{ "vxed", "Vxed, the Crumbling Caverns" }, // 290
{ "yxtta", "Yxtta, Pulpit of Exiles" }, // 291
-{ "uqua", "Uqua, The Ocean God Chantry" }, // 292
+{ "uqua", "Uqua, the Ocean God Chantry" }, // 292
{ "kodtaz", "Kod'Taz, Broken Trial Grounds" }, // 293
{ "ikkinz", "Ikkinz, Chambers of Destruction" }, // 294
{ "qvic", "Qvic, Prayer Grounds of Calling" }, // 295
-{ "inktuta", "Inktu`Ta, The Unmasked Chapel" }, // 296
+{ "inktuta", "Inktu'Ta, the Unmasked Chapel" }, // 296
{ "txevu", "Txevu, Lair of the Elite" }, // 297
-{ "tacvi", "Tacvi, Seat of the Slaver" }, // 298
-{ "qvicb", "Qvic, the Hidden Vault" }, // 299
+{ "tacvi", "Tacvi, the Broken Temple" }, // 298
+{ "qvicb", "qvicb" }, // 299
{ "wallofslaughter", "Wall of Slaughter" }, // 300
{ "bloodfields", "The Bloodfields" }, // 301
{ "draniksscar", "Dranik's Scar" }, // 302
{ "causeway", "Nobles' Causeway" }, // 303
-{ "chambersa", "Muramite Proving Grounds" }, // 304
-{ "chambersb", "Muramite Proving Grounds" }, // 305
-{ "chambersc", "Muramite Proving Grounds" }, // 306
-{ "chambersd", "Muramite Proving Grounds" }, // 307
-{ "chamberse", "Muramite Proving Grounds" }, // 308
-{ "chambersf", "Muramite Proving Grounds" }, // 309
+{ "chambersa", "Proving Grounds" }, // 304
+{ "chambersb", "Proving Grounds" }, // 305
+{ "chambersc", "Proving Grounds" }, // 306
+{ "chambersd", "Proving Grounds" }, // 307
+{ "chamberse", "Proving Grounds" }, // 308
+{ "chambersf", "Proving Grounds" }, // 309
{ NULL, NULL }, // 310
{ NULL, NULL }, // 311
{ NULL, NULL }, // 312
@@ -338,9 +339,9 @@
{ NULL, NULL }, // 315
{ "provinggrounds", "Muramite Proving Grounds" }, // 316
{ "anguish", "Anguish, the Fallen Palace" }, // 317
-{ "dranikhollowsa", "Dranik's Hollows" }, // 318
-{ "dranikhollowsb", "Dranik's Hollows" }, // 319
-{ "dranikhollowsc", "Dranik's Hollows" }, // 320
+{ "dranikhollowsa", "Dranik's Hollows: Watering Hole" }, // 318
+{ "dranikhollowsb", "Dranik's Hollows: Fire Pit" }, // 319
+{ "dranikhollowsc", "Dranik's Hollows: Murkglider Hive" }, // 320
{ "dranikhollowsd", "Dranik's Hollows" }, // 321
{ "dranikhollowse", "Dranik's Hollows" }, // 322
{ "dranikhollowsf", "Dranik's Hollows" }, // 323
@@ -355,7 +356,7 @@
{ "draniksewersb", "Sewers of Dranik" }, // 332
{ "draniksewersc", "Sewers of Dranik" }, // 333
{ "riftseekers", "Riftseekers' Sanctum" }, // 334
-{ "harbingers", "Harbingers' Spire" }, // 335
+{ "harbingers", "Harbinger's Spire" }, // 335
{ "dranik", "The Ruined City of Dranik" }, // 336
{ "broodlands", "The Broodlands" }, // 337
{ "stillmoona", "Stillmoon Temple" }, // 338
@@ -364,25 +365,25 @@
{ "delvea", "Lavaspinner's Lair" }, // 341
{ "delveb", "Tirranun's Delve" }, // 342
{ "thenest", "The Accursed Nest" }, // 343
-{ "guildlobby", "The Guild Lobby" }, // 344
+{ "guildlobby", "Guild Lobby" }, // 344
{ "guildhall", "Guild Hall" }, // 345
-{ "barter", "The Barter Hall" }, // 346
+{ "barter", "barter" }, // 346
{ "illsalin", "Ruins of Illsalin" }, // 347
-{ "illsalina", "Imperial Bazaar" }, // 348
+{ "illsalina", "Illsalin Marketplace" }, // 348
{ "illsalinb", "Temple of the Korlach" }, // 349
{ "illsalinc", "The Nargilor Pits" }, // 350
{ "dreadspire", "Dreadspire Keep" }, // 351
-{ "dreadspirea", "The Torture Chamber" }, // 352
-{ "dreadspireb", "The Artifact Room" }, // 353
+{ NULL, NULL }, // 352
+{ NULL, NULL }, // 353
{ "drachnidhive", "The Hive" }, // 354
-{ "drachnidhivea", "Living Larder" }, // 355
-{ "drachnidhiveb", "Coven of the Skinwalkers" }, // 356
-{ "drachnidhivec", "Queen Sendaii's Lair" }, // 357
+{ "drachnidhivea", "The Hatchery" }, // 355
+{ "drachnidhiveb", "The Cocoons" }, // 356
+{ "drachnidhivec", "The Queen's Lair" }, // 357
{ "westkorlach", "Stoneroot Falls" }, // 358
{ "westkorlacha", "Chambers of Xill" }, // 359
{ "westkorlachb", "Caverns of the Lost" }, // 360
{ "westkorlachc", "Lair of the Korlach" }, // 361
-{ "eastkorlach", "Undershore" }, // 362
+{ "eastkorlach", "The Undershore" }, // 362
{ "eastkorlacha", "Snarlstone Dens" }, // 363
{ "shadowspine", "Shadowspine" }, // 364
{ "corathus", "Corathus Creep" }, // 365
@@ -389,8 +390,8 @@
{ "corathusa", "Sporali Caverns" }, // 366
{ "corathusb", "Corathus Lair" }, // 367
{ "nektulosa", "Shadowed Grove" }, // 368
-{ "arcstone", "Arcstone" }, // 369
-{ "relic", "Relic" }, // 370
+{ "arcstone", "Arcstone, Isle of Spirits" }, // 369
+{ "relic", "Relic, the Artifact City" }, // 370
{ "skylance", "Skylance" }, // 371
{ "devastation", "The Devastation" }, // 372
{ "devastationa", "The Seething Wall" }, // 373
@@ -412,8 +413,8 @@
{ "freeportcityhall", "City Hall" }, // 389
{ "freeporttheater", "Theater" }, // 390
{ "freeporthall", "Hall of Truth" }, // 391
-{ "northro", "North Ro" }, // 392
-{ "southro", "South Ro" }, // 393
+{ "northro", "North Desert of Ro" }, // 392
+{ "southro", "South Desert of Ro" }, // 393
{ "crescent", "Crescent Reach" }, // 394
{ "moors", "Blightfire Moors" }, // 395
{ "stonehive", "Stone Hive" }, // 396
@@ -428,11 +429,11 @@
{ "direwind", "Direwind Cliffs" }, // 405
{ "ashengate", "Ashengate, Reliquary of the Scale" }, // 406
{ "highpasshold", "Highpass Hold" }, // 407
-{ "commonlands", "Commonlands" }, // 408
-{ "oceanoftears", "Ocean of Tears" }, // 409
-{ "kithforest", "Kithicor Forest" }, // 410
-{ "befallenb", "Befallen" }, // 411
-{ "highpasskeep", "High Keep" }, // 412
+{ "commonlands", "The Commonlands" }, // 408
+{ "oceanoftears", "The Ocean of Tears" }, // 409
+{ "kithforest", "kithforest" }, // 410
+{ "befallenb", "befallenb" }, // 411
+{ "highpasskeep", "highpasskeep" }, // 412
{ "innothuleb", "Innothule Swamp" }, // 413
{ "toxxulia", "Toxxulia Forest" }, // 414
{ "mistythicket", "Misty Thicket" }, // 415
@@ -468,17 +469,17 @@
{ "bloodmoon", "Bloodmoon Keep" }, // 445
{ "crystallos", "Crystallos, Lair of the Awakened" }, // 446
{ "guardian", "The Mechamatic Guardian" }, // 447
-{ "steamfontmts", "Steamfont Mountains" }, // 448
+{ "steamfontmts", "The Steamfont Mountains" }, // 448
{ "cryptofshade", "Crypt of Shade" }, // 449
{ "dragonscalea", "Tinmizer's Wunderwerks" }, // 450
{ "dragonscaleb", "Deepscar's Den" }, // 451
{ "oldfieldofbone", "Field of Scale" }, // 452
{ "oldkaesoraa", "Kaesora Library" }, // 453
-{ "oldkaesorab", "Hatchery Wing" }, // 454
+{ "oldkaesorab", "Kaesora Hatchery" }, // 454
{ "oldkurn", "Kurn's Tower" }, // 455
{ "oldkithicor", "Bloody Kithicor" }, // 456
{ "oldcommons", "Old Commonlands" }, // 457
-{ "oldhighpass", "Highpass Hold" }, // 458
+{ "oldhighpass", "oldhighpass" }, // 458
{ "thevoida", "The Void" }, // 459
{ "thevoidb", "The Void" }, // 460
{ "thevoidc", "The Void" }, // 461
@@ -493,18 +494,18 @@
{ "discord", "Korafax, Home of the Riders" }, // 470
{ "discordtower", "Citadel of the Worldslayer" }, // 471
{ "oldbloodfield", "Old Bloodfields" }, // 472
-{ "precipiceofwar", "The Precipice of War" }, // 473
+{ "precipiceofwar", "Precipice of War" }, // 473
{ "olddranik", "City of Dranik" }, // 474
{ "toskirakk", "Toskirakk" }, // 475
{ "korascian", "Korascian Warrens" }, // 476
-{ "rathechamber", "Rathe Council Chambers" }, // 477
+{ "rathechamber", "Rathe Council Chamber" }, // 477
{ "oldfieldofboneb", "Field of Scale" }, // 478
-{ "crafthalls", "Ngreth's Den" }, // 479
+{ "crafthalls", "crafthalls" }, // 479
{ "brellsrest", "Brell's Rest" }, // 480
{ "fungalforest", "Fungal Forest" }, // 481
{ "underquarry", "The Underquarry" }, // 482
{ "coolingchamber", "The Cooling Chamber" }, // 483
-{ "shiningcity", "Kernagir, The Shining City" }, // 484
+{ "shiningcity", "Kernagir, the Shining City" }, // 484
{ "arthicrex", "Arthicrex" }, // 485
{ "foundation", "The Foundation" }, // 486
{ "lichencreep", "Lichen Creep" }, // 487
@@ -734,16 +735,16 @@
{ "thuledream", "Fear Itself" }, // 711
{ "neighborhood", "Sunrise Hills" }, // 712
{ "phylactery", "Miragul's Phylactery" }, // 713
-{ "phinterior3a1", "House Interior" }, // 714
-{ "phinterior1a1", "House Interior" }, // 715
-{ "phinterior3a2", "House Interior" }, // 716
-{ "phinterior3a3", "House Interior" }, // 717
-{ "phinterior1a2", "House Interior" }, // 718
-{ "phinterior1a3", "House Interior" }, // 719
-{ "phinterior1b1", "Dragon House Interior" }, // 720
+{ "phinterior3a1", "Three Room House Interior" }, // 714
+{ "phinterior1a1", "One Room House Interior" }, // 715
+{ "phinterior3a2", "Three Room House Interior" }, // 716
+{ "phinterior3a3", "Three Room House Interior" }, // 717
+{ "phinterior1a2", "One Room House Interior" }, // 718
+{ "phinterior1a3", "One Room House Interior" }, // 719
+{ "phinterior1b1", "One Room House Interior" }, // 720
{ NULL, NULL }, // 721
{ NULL, NULL }, // 722
-{ "phinterior1d1", "Dragon House Interior" }, // 723
+{ "phinterior1d1", "Hermit's Hideaway Interior" }, // 723
{ "argath", "Argath, Bastion of Illdaera" }, // 724
{ "arelis", "Valley of Lunanyn" }, // 725
{ "sarithcity", "Sarith, City of Tides" }, // 726
@@ -779,15 +780,15 @@
{ "crystalshard", "The Crystal Caverns: Fragment of Fear" }, // 756
{ "breedinggrounds", "The Breeding Grounds" }, // 757
{ "eviltree", "Evantil, the Vile Oak" }, // 758
-{ "grelleth", "Grelleth's Palace, the Chateau of Filth..." }, // 759
+{ "grelleth", "Grelleth's Palace, the Chateau of Filth" }, // 759
{ "chapterhouse", "Chapterhouse of the Fallen" }, // 760
-{ "pomischief", "The Plane of Mischief" }, // 761
-{ "burnedwoods", "The Burned Woods" }, // 762
+{ "pomischief", "pomischief" }, // 761
+{ "burnedwoods", "burnedwoods" }, // 762
{ "chelsithreborn", "Chelsith Reborn" }, // 763
{ "poshadow", "Plane of Shadow" }, // 764
{ "heartoffear", "Heart of Fear: The Threshold" }, // 765
{ "phinteriortree", "Evantil's Abode" }, // 766
-{ "interiorwalltest", "Wall Wall Wall" }, // 767
+{ "interiorwalltest", "interiorwalltest" }, // 767
{ "heartoffearb", "Heart of Fear: The Rebirth" }, // 768
{ "heartoffearc", "Heart of Fear: The Epicenter" }, // 769
{ "bixiewarfront", "Bixie Warfront" }, // 770
@@ -806,11 +807,11 @@
{ "thuliasaur", "Thuliasaur Island" }, // 783
{ "degmar", "Degmar, the Lost Castle" }, // 784
{ "tempesttemple", "Tempest Temple" }, // 785
-{ "plhpirateshipint", "Pirate Ship" }, // 786
+{ "plhpirateshipint", "The Wayward Lady" }, // 786
{ "gnomemtn", "Gnome Memorial Mountain" }, // 787
{ "drogab", "The Temple of Droga" }, // 788
{ "charasisb", "Sathir's Tomb" }, // 789
-{ "scorchedwoods", "Scorched Woods" }, // 790
+{ "scorchedwoods", "The Scorched Woods" }, // 790
{ "frontiermtnsb", "Frontier Mountains" }, // 791
{ "gorowyn", "Gorowyn" }, // 792
{ "korshaext", "Gates of Kor-Sha" }, // 793
@@ -834,16 +835,16 @@
{ NULL, NULL }, // 811
{ NULL, NULL }, // 812
{ "charasistwo", "Howling Stones" }, // 813
-{ "skyfiretwo", "Skyfire Mountains" }, // 814
+{ "skyfiretwo", "The Skyfire Mountains" }, // 814
{ "overtheretwo", "The Overthere" }, // 815
{ "veeshantwo", "Veeshan's Peak" }, // 816
{ "trialsofsmoke", "Plane of Smoke" }, // 817
{ "stratos", "Stratos: Zephyr's Flight" }, // 818
-{ "aalishai", "Aslishai: Palace of Embers" }, // 819
+{ "aalishai", "Aalishai: Palace of Embers" }, // 819
{ "empyr", "Empyr: Realms of Ash" }, // 820
{ "esianti", "Esianti: Palace of the Winds" }, // 821
{ "mearatas", "Mearatas: The Stone Demesne" }, // 822
-{ "chamberoftears", "The Chamber of Tears" }, // 823
+{ "chamberoftears", "Chamber of Tears" }, // 823
{ "eastwastestwo", "The Eastern Wastes" }, // 824
{ "frozenshadowtwo", "The Tower of Frozen Shadow" }, // 825
{ "crystaltwoa", "The Ry`Gorr Mines" }, // 826
@@ -856,14 +857,14 @@
{ "cobaltscartwo", "Cobalt Scar" }, // 833
{ "westwastestwo", "The Western Wastes" }, // 834
{ "skyshrinetwo", "Skyshrine" }, // 835
-{ "templeveeshantwo", "Temple of Veeshan" }, // 836
-{ NULL, NULL }, // 837
-{ NULL, NULL }, // 838
-{ NULL, NULL }, // 839
-{ NULL, NULL }, // 840
-{ NULL, NULL }, // 841
-{ NULL, NULL }, // 842
-{ "maidentwo", "The Maiden's Eye" }, // 843
+{ "templeveeshantwo", "The Temple of Veeshan" }, // 836
+{ "clz-winter", "Winter" }, // 837
+{ "clz-anniversary", "Anniversary" }, // 838
+{ "clz-spring", "Spring" }, // 839
+{ "clz-autumn", "Autumn" }, // 840
+{ "clz-frostfell", "Frostfell" }, // 841
+{ "clz-af", "April Fools" }, // 842
+{ "maidentwo", "Maiden's Eye" }, // 843
{ "umbraltwo", "Umbral Plains" }, // 844
{ "akhevatwo", "Ka Vethan" }, // 845
{ "vexthaltwo", "Vex Thal" }, // 846
@@ -886,10 +887,10 @@
{ "moorsofnokk", "Moors of Nokk" }, // 863
{ "unkemptwoods", "Unkempt Woods" }, // 864
{ "timorousfalls", "Timorous Falls" }, // 865
-{ NULL, NULL }, // 866
+{ "clz-tempest", "Tempest Festival" }, // 866
{ NULL, NULL }, // 867
{ NULL, NULL }, // 868
-{ NULL, NULL }, // 869
+{ "anniversarytower", "Tides of Time" }, // 869
{ NULL, NULL }, // 870
{ NULL, NULL }, // 871
{ NULL, NULL }, // 872
@@ -896,7 +897,7 @@
{ NULL, NULL }, // 873
{ NULL, NULL }, // 874
{ NULL, NULL }, // 875
-{ NULL, NULL }, // 876
+{ "clz-25anniversary", "clz-25anniversary" }, // 876
{ NULL, NULL }, // 877
{ NULL, NULL }, // 878
{ NULL, NULL }, // 879
@@ -1016,7 +1017,7 @@
{ NULL, NULL }, // 993
{ NULL, NULL }, // 994
{ NULL, NULL }, // 995
-{ "arttest", "Art Testing Domain" }, // 996
+{ "arttest", "The Pit of Rathpher" }, // 996
{ NULL, NULL }, // 997
{ "fhalls", "The Forgotten Halls" }, // 998
-{ "apprentice", "Designer Apprentice" }, // 999
+{ "apprentice", "apprentice" }, // 999
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-26 22:39:26
|
Revision: 1544
http://sourceforge.net/p/seq/svn/1544
Author: cn187
Date: 2024-08-26 22:39:24 +0000 (Mon, 26 Aug 2024)
Log Message:
-----------
Add ida helper script for generating zones.h
Added Paths:
-----------
showeq/trunk/scripts/ida/
showeq/trunk/scripts/ida/gen_zones_h.py
Added: showeq/trunk/scripts/ida/gen_zones_h.py
===================================================================
--- showeq/trunk/scripts/ida/gen_zones_h.py (rev 0)
+++ showeq/trunk/scripts/ida/gen_zones_h.py 2024-08-26 22:39:24 UTC (rev 1544)
@@ -0,0 +1,294 @@
+
+import datetime
+import sys
+import idautils
+
+""" Generate ShowEQ's zones.h from eggame.exe and Resources/ZoneNames.txt
+
+ NOTE: Requires IDA and python3
+
+ To use this script:
+ 1. Open eqgame.exe in IDA, and let IDA complete its analysis.
+ 2. Select View->Recent Scripts
+ 3. In the Recent Scripts tab, press Insert, and browse to the location
+ of this script. Select this script and click "Open".
+ 4. An entry for this script now appears in the list of scripts.
+ Double-click it to load it.
+ 5. (optional) right click in the output window and select "Clear". This
+ will reduce the extra stuff you have to delete when you copy/paste
+ 6. At the idapython command line, run
+
+ dump_zones('/path/to/ZoneNames.txt')
+
+ Note: ZoneNames.txt is found in your EQ client directory, under the
+ Resources subdirectory. If you want you can copy it to somewhere
+ convenient (e.g., /tmp), then pass that path to dump_zones.
+ 7. Create a new file (e.g. zones.h.new)
+ 8. Right-click in the output window, select "Select All", then "Copy".
+ 9. Paste into the file you created in step 7
+ 10. There will be a couple of lines (or more if you skipped step 5) at
+ the top of the file (before the start of the block comment containing
+ the copyright/license info) that need to be deleted. Basically,
+ delete everything before the line consisting of "/*"
+ 11. Save the file
+ 12. As a sanity check, diff with zones.h to see what changed. This is
+ important in case the way the code works changed, or there's a bug
+ in the script - we don't want to commit an empty or otherwise bad
+ zones file.
+ 13. If everything looks good, rename your new file to zones.h and replace
+ the existing zones.h.
+ 14. Do a test compile to make sure everything is good.
+ 15. Commit changes.
+"""
+
+def find_string_refs_to(haystack, needle):
+ refs = set()
+ for s in haystack:
+ if str(s) == needle:
+ for x in idautils.XrefsTo(s.ea):
+ refs.add(x.to)
+ return refs
+
+def find_string_refs_from(haystack, needle):
+ refs = set()
+ for s in haystack:
+ if str(s) == needle:
+ for x in idautils.XrefsTo(s.ea):
+ refs.add(x.frm)
+ return refs
+
+
+def get_worlddata_start(ida_strings=None):
+
+ if not ida_strings:
+ strings = idautils.Strings(True)
+ else:
+ strings = ida_strings
+
+ key_string = 'EQWorldData::EQWorldData'
+
+ eas = find_string_refs_from(strings, key_string)
+
+ if len(eas) == 1:
+ ea = eas.pop()
+ return ea
+ else:
+ return None
+
+
+# NOTE we could grab the addresses of EQWorldData::EQWorldData and Unknown Zone
+# and use those for addr boundaries when looking for zone string loads
+# (if there are too many conflicting loads in amongst the ones we want)
+
+# NOTE also, if we have to, we could determine exact reg numbers based on known
+# zone names, with the assumption that the compiler will reuse the same registers
+# throughout the function
+def get_next_zone_loaded(cur_ea, end_ea, rnum=None):
+ ea = cur_ea
+
+ while ea < end_ea:
+ mnem = idc.print_insn_mnem(ea)
+ if mnem == "lea":
+ if idc.get_operand_type(ea, 0) != o_reg:
+ ea = idc.next_head(ea)
+ continue
+ if rnum is not None and idc.get_operand_value(ea, 0) != rnum:
+ ea = idc.next_head(ea)
+ continue
+ if idc.get_operand_type(ea, 1) != o_mem:
+ ea = idc.next_head(ea)
+ continue
+ string = idc.get_strlit_contents(idc.get_operand_value(ea, 1))
+ if not string:
+ ea = idc.next_head(ea)
+ continue
+ return ea, idc.get_strlit_contents(idc.get_operand_value(ea, 1)).decode('ascii')
+ ea = idc.next_head(ea)
+
+ return ea, None
+
+
+
+def get_next_file_index(cur_ea, end_ea, rnum=None):
+ ea = cur_ea
+
+ offset = 0
+ backtrack = False
+
+ while ea < end_ea:
+ mnem = idc.print_insn_mnem(ea)
+ if mnem == "lea":
+ if idc.get_operand_type(ea, 0) != o_reg:
+ ea = idc.next_head(ea)
+ continue
+ if rnum is not None and idc.get_operand_value(ea, 0) != rnum:
+ ea = idc.next_head(ea)
+ continue
+ if idc.get_operand_type(ea, 1) != o_displ:
+ ea = idc.next_head(ea)
+ continue
+ backtrack = True
+ break
+ elif mnem == "mov":
+ if idc.get_operand_type(ea, 0) != o_reg:
+ ea = idc.next_head(ea)
+ continue
+ if rnum is not None and idc.get_operand_value(ea, 0) != rnum:
+ ea = idc.next_head(ea)
+ continue
+ if idc.get_operand_type(ea, 1) != o_imm:
+ ea = idc.next_head(ea)
+ continue
+ return ea, idc.get_operand_value(ea, 1)
+ ea = idc.next_head(ea)
+
+ if backtrack:
+ prev = idc.prev_head(ea)
+ mnem = idc.print_insn_mnem(prev)
+ if mnem == "xor" and \
+ idc.get_operand_type(prev, 0) == o_reg and \
+ idc.get_operand_type(prev,1) == o_reg:
+ return ea, idc.get_operand_value(ea, 1)
+
+ if mnem != "mov" or \
+ idc.get_operand_type(prev, 0) != o_reg or\
+ idc.get_operand_type(prev, 1) != o_imm:
+ sys.stderr.write("Backtrack failed at " + hex(prev) + '\n')
+ return ea, -1
+
+ offset = idc.get_operand_value(prev, 1)
+
+ return ea, idc.get_operand_value(ea, 1) + offset
+
+ return ea, -1
+
+def find_qeynos_load(cur_ea, end_ea):
+ ea = cur_ea
+
+ while ea < end_ea:
+ ea, shortzone = get_next_zone_loaded(ea, end_ea)
+ if shortzone != 'qeynos':
+ ea = idc.next_head(ea)
+ continue
+
+ rnum = idc.get_operand_value(ea, 0)
+
+ return ea, shortzone, rnum
+
+def find_qeynos_index(cur_ea, end_ea):
+ ea = cur_ea
+
+ while ea < end_ea:
+ ea, idx = get_next_file_index(ea, end_ea)
+ if idx != 1:
+ ea = idc.next_head(ea)
+ continue
+
+ rnum = idc.get_operand_value(ea, 0)
+
+ return ea, idx, rnum
+
+
+
+
+# if you know the address where "EQWorldData::EQWorldData" is loaded, you can
+# pass it as the start_ea
+def dump_zones(zonenames_path=None, ida_strings=None, start_ea=None):
+
+ if not zonenames_path:
+ sys.stderr.write("Path to ZoneNames.txt is required\n")
+ return
+
+ if not ida_strings:
+ strings = idautils.Strings(True)
+ else:
+ strings = ida_strings
+
+ if not start_ea:
+ start_ea = get_worlddata_start(strings)
+ if not start_ea:
+ sys.stderr.write("Could not find unique start ea. Found: " + eas + '\n')
+ return
+
+ wd_func = ida_funcs.get_func(start_ea)
+ func_end = wd_func.end_ea
+
+ cur_ea, shortzone, zone_regnum = find_qeynos_load(idc.next_head(start_ea), func_end)
+ if not cur_ea:
+ sys.stderr.write("Could not find first zone load\n")
+ return
+
+ cur_ea, idx, idx_regnum = find_qeynos_index(idc.next_head(start_ea), func_end)
+ if not cur_ea:
+ sys.stderr.write("Could not find first load index\n")
+ return
+
+ zonenames = {}
+ zones = {}
+
+ with open(zonenames_path, 'r') as f:
+ for line in f.readlines():
+ index, zonename, _, _ = line.split('^')
+ if index == "ZONE":
+ continue
+ zonenames[int(index)] = zonename.strip()
+
+ #print(idx, shortzone, zonenames[idx])
+ zones[idx] = (idx, shortzone, zonenames[idx])
+
+ while cur_ea < func_end:
+ cur_ea, shortzone = get_next_zone_loaded(cur_ea, func_end, zone_regnum)
+ if not shortzone:
+ break
+
+ cur_ea = idc.next_head(cur_ea)
+ cur_ea, idx = get_next_file_index(cur_ea, func_end, idx_regnum)
+ if idx < 0:
+ break;
+
+ if idx not in zonenames:
+ cur_ea = idc.next_head(cur_ea)
+ #sys.stderr.write("Did not find index {} for zone {} in ZoneNames.txt\n".format(idx, shortzone))
+ zones[idx] = (idx, shortzone, shortzone)
+ else:
+ #print(idx, shortzone, zonenames[idx])
+ zones[idx] = (idx, shortzone, zonenames[idx])
+
+ cur_ea = idc.next_head(cur_ea)
+
+
+ keys = sorted(zones.keys())
+ last_idx = keys[-1]
+ current_year=datetime.datetime.now().year
+ print(f"""/*
+ * zones.h
+ * Copyright 2003-{current_year} by the respective ShowEQ Developers
+ *
+ * This file is part of ShowEQ.
+ * http://www.sourceforge.net/projects/seq
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* Maps zoneId numbers to strings, used in util.cpp */""")
+
+ for i in range(0, last_idx+1):
+ if i in zones:
+ idx, shortzone, longzone = zones[i]
+ print('{{ "{}", "{}" }}, // {}'.format(shortzone, longzone, idx))
+ else:
+ print('{{ NULL, NULL }}, // {}'.format(i))
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-23 20:37:54
|
Revision: 1543
http://sourceforge.net/p/seq/svn/1543
Author: cn187
Date: 2024-08-23 20:37:52 +0000 (Fri, 23 Aug 2024)
Log Message:
-----------
Add missing pthread include
Modified Paths:
--------------
showeq/branches/cn187_devel/src/packetcaptureprovider.h
Modified: showeq/branches/cn187_devel/src/packetcaptureprovider.h
===================================================================
--- showeq/branches/cn187_devel/src/packetcaptureprovider.h 2024-08-23 20:35:46 UTC (rev 1542)
+++ showeq/branches/cn187_devel/src/packetcaptureprovider.h 2024-08-23 20:37:52 UTC (rev 1543)
@@ -26,6 +26,8 @@
#include <cstdint>
#include <QString>
+#include <pthread.h>
+
class PacketCaptureProviderThread
{
public:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-23 20:35:48
|
Revision: 1542
http://sourceforge.net/p/seq/svn/1542
Author: cn187
Date: 2024-08-23 20:35:46 +0000 (Fri, 23 Aug 2024)
Log Message:
-----------
add missing pthread include
Modified Paths:
--------------
showeq/trunk/src/packetcaptureprovider.h
Modified: showeq/trunk/src/packetcaptureprovider.h
===================================================================
--- showeq/trunk/src/packetcaptureprovider.h 2024-08-21 21:17:21 UTC (rev 1541)
+++ showeq/trunk/src/packetcaptureprovider.h 2024-08-23 20:35:46 UTC (rev 1542)
@@ -26,6 +26,8 @@
#include <cstdint>
#include <QString>
+#include <pthread.h>
+
class PacketCaptureProviderThread
{
public:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 21:17:24
|
Revision: 1541
http://sourceforge.net/p/seq/svn/1541
Author: cn187
Date: 2024-08-21 21:17:21 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
R6elease 6.4.0
- Update to version 6.4.0
- Support for EQ Patch 08/21/24
- Struct and opcode updates
Modified Paths:
--------------
showeq/branches/cn187_devel/ChangeLog
showeq/branches/cn187_devel/conf/zoneopcodes.xml
showeq/branches/cn187_devel/configure.in
showeq/branches/cn187_devel/src/everquest.h
Modified: showeq/branches/cn187_devel/ChangeLog
===================================================================
--- showeq/branches/cn187_devel/ChangeLog 2024-08-21 20:12:56 UTC (rev 1540)
+++ showeq/branches/cn187_devel/ChangeLog 2024-08-21 21:17:21 UTC (rev 1541)
@@ -1,3 +1,30 @@
+cn187 (08/21/24)
+----------------
+- Update to version 6.4.0
+- Support for EQ Patch 08/21/24
+- Struct and opcode updates
+- Fixes:
+ - Improvements/fixes to various column sort/reorder/hide behavior
+ - Fixes for player-controlled external entity detection and updates, and related crash
+ - Rework packet capture filter to improve reliability of session detection
+ - Update OP_Consider logic to correctly display con colors and level
+ - Enable menu options to rename/delete spawnpoints
+ - Don't auto-select another mob when a targeted corpse decays
+ - Fixes for formatted messages
+ - Remove config.sub/config.guess from source and regenerate them as needed
+ - Character menu now allows selecting level 125
+ - Correctly interpret character x/y when loading map (fixes tiny map in northro, etc.)
+ - Correctly interpret zone ID for player purchased housing/guildhalls
+- Enhancements:
+ - Add option to deselect your target if mob is untargeted
+ - Add support for configuring map line/location colors
+ - Add support for configuring PCAP snaplen and ring buffer size
+ - PCAP will now attempt to detect dropped packets and emit a warning with possible fixes
+ - New UI for adding and editing spawn filters
+ - Add support for using info/equipment fields in spawn filter matches
+- Misc:
+ - Some internal and build system reorganization to make future changes less cumbersome
+
cn187 (07/17/24)
----------------
- Update to version 6.3.16
Modified: showeq/branches/cn187_devel/conf/zoneopcodes.xml
===================================================================
--- showeq/branches/cn187_devel/conf/zoneopcodes.xml 2024-08-21 20:12:56 UTC (rev 1540)
+++ showeq/branches/cn187_devel/conf/zoneopcodes.xml 2024-08-21 21:17:21 UTC (rev 1541)
@@ -3,37 +3,37 @@
<seqopcodes>
<!-- Critical opcodes used directly by ShowEQ -->
- <opcode id="3193" name="OP_PlayerProfile" updated="07/17/24">
+ <opcode id="6acb" name="OP_PlayerProfile" updated="08/21/24">
<comment>CharProfileCode</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="1eb3" name="OP_ZoneEntry" updated="07/17/24">
+ <opcode id="6bee" name="OP_ZoneEntry" updated="08/21/24">
<comment>ZoneEntryCode</comment>
<payload dir="client" typename="ClientZoneEntryStruct" sizechecktype="match"/>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="39b4" name="OP_TimeOfDay" updated="07/17/24">
+ <opcode id="7a78" name="OP_TimeOfDay" updated="08/21/24">
<comment>TimeOfDayCode</comment>
<payload dir="server" typename="timeOfDayStruct" sizechecktype="match"/>
</opcode>
- <opcode id="518c" name="OP_NewZone" updated="07/17/24">
+ <opcode id="461c" name="OP_NewZone" updated="08/21/24">
<comment>NewZoneCode</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="221a" name="OP_SpawnDoor" updated="07/17/24">
+ <opcode id="3aa8" name="OP_SpawnDoor" updated="08/21/24">
<comment>DoorSpawnsCode</comment>
<payload dir="server" typename="doorStruct" sizechecktype="modulus"/>
</opcode>
- <opcode id="4feb" name="OP_GroundSpawn" updated="07/17/24">
+ <opcode id="24ad" name="OP_GroundSpawn" updated="08/21/24">
<comment>MakeDropCode</comment>
<payload dir="server" typename="makeDropStruct" sizechecktype="none"/>
<payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="4743" name="OP_SendZonePoints" updated="07/17/24">
+ <opcode id="4dc1" name="OP_SendZonePoints" updated="08/21/24">
<comment>Coords in a zone that will port you to another zone</comment>
<payload dir="server" typename="zonePointsStruct" sizechecktype="none"/>
</opcode>
- <opcode id="0d97" name="OP_AAExpUpdate" updated="07/17/24">
+ <opcode id="35d1" name="OP_AAExpUpdate" updated="08/21/24">
<comment>Receiving AA experience. Also when percent to AA changes.</comment>
<payload dir="server" typename="altExpUpdateStruct" sizechecktype="match"/>
</opcode>
@@ -41,32 +41,32 @@
<comment>ExpUpdateCode</comment>
<payload dir="server" typename="expUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="37e3" name="OP_GuildMOTD" updated="07/17/24">
+ <opcode id="198f" name="OP_GuildMOTD" updated="08/21/24">
<comment>GuildMOTD</comment>
<payload dir="server" typename="guildMOTDStruct" sizechecktype="none"/>
</opcode>
- <opcode id="4187" name="OP_ClientUpdate" updated="07/17/24">
+ <opcode id="441b" name="OP_ClientUpdate" updated="08/21/24">
<comment>Position updates</comment>
<payload dir="server" typename="playerSpawnPosStruct" sizechecktype="match"/>
<payload dir="both" typename="playerSelfPosStruct" sizechecktype="match"/>
</opcode>
- <opcode id="1f6b" name="OP_NpcMoveUpdate" updated="07/17/24">
+ <opcode id="5332" name="OP_NpcMoveUpdate" updated="08/21/24">
<comment>Position updates</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="3afa" name="OP_MobUpdate" updated="07/17/24">
+ <opcode id="6f8e" name="OP_MobUpdate" updated="08/21/24">
<comment>MobUpdateCode</comment>
<payload dir="both" typename="spawnPositionUpdate" sizechecktype="match"/>
</opcode>
- <opcode id="1a9e" name="OP_DeleteSpawn" updated="07/17/24">
+ <opcode id="6447" name="OP_DeleteSpawn" updated="08/21/24">
<comment>DeleteSpawnCode</comment>
<payload dir="both" typename="deleteSpawnStruct" sizechecktype="match"/>
</opcode>
- <opcode id="67ae" name="OP_RemoveSpawn" updated="07/17/24">
+ <opcode id="4d80" name="OP_RemoveSpawn" updated="08/21/24">
<comment>Remove spawn from zone</comment>
<payload dir="both" typename="removeSpawnStruct" sizechecktype="none"/>
</opcode>
- <opcode id="7c61" name="OP_Death" updated="07/17/24">
+ <opcode id="3054" name="OP_Death" updated="08/21/24">
<comment>old NewCorpseCode</comment>
<payload dir="server" typename="newCorpseStruct" sizechecktype="match"/>
</opcode>
@@ -74,7 +74,7 @@
<comment>SpawnUpdateCode</comment>
<payload dir="both" typename="SpawnUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="033d" name="OP_SpawnAppearance" updated="07/17/24">
+ <opcode id="44c3" name="OP_SpawnAppearance" updated="08/21/24">
<comment>SpawnAppearanceCode</comment>
<payload dir="both" typename="spawnAppearanceStruct" sizechecktype="match"/>
</opcode>
@@ -86,15 +86,15 @@
<comment>NpcHpUpdateCode Update HP % of a PC or NPC</comment>
<payload dir="both" typename="hpNpcUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="2bfb" name="OP_GuildMemberUpdate" updated="07/17/24">
+ <opcode id="169c" name="OP_GuildMemberUpdate" updated="08/21/24">
<comment>Info regarding guild members</comment>
<payload dir="server" typename="GuildMemberUpdate" sizechecktype="match"/>
</opcode>
- <opcode id="4454" name="OP_ClickObject" updated="07/17/24">
+ <opcode id="6cec" name="OP_ClickObject" updated="08/21/24">
<comment>Items dropped on the ground</comment>
<payload dir="both" typename="remDropStruct" sizechecktype="match"/>
</opcode>
- <opcode id="681d" name="OP_Action" updated="07/17/24">
+ <opcode id="38ad" name="OP_Action" updated="08/21/24">
<comment>Spells cast etc</comment>
<payload dir="both" typename="actionStruct" sizechecktype="match"/>
<payload dir="both" typename="actionAltStruct" sizechecktype="match"/>
@@ -103,11 +103,11 @@
<comment>Combat actions i.e. bash, kick etc</comment>
<payload dir="both" typename="action2Struct" sizechecktype="match"/>
</opcode>
- <opcode id="4126" name="OP_Consider" updated="07/17/24">
+ <opcode id="6fc1" name="OP_Consider" updated="08/21/24">
<comment>ConsiderCode</comment>
<payload dir="both" typename="considerStruct" sizechecktype="match"/>
</opcode>
- <opcode id="0987" name="OP_TargetMouse" updated="07/17/24">
+ <opcode id="13f6" name="OP_TargetMouse" updated="08/21/24">
<comment>Targeting a person - old ClientTargetCode</comment>
<payload dir="both" typename="clientTargetStruct" sizechecktype="match"/>
</opcode>
@@ -123,7 +123,7 @@
<comment>Server putting players into shroud form</comment>
<payload dir="server" typename="spawnShroudSelf" sizechecktype="none"/>
</opcode>
- <opcode id="24bc" name="OP_ZoneChange" updated="07/17/24">
+ <opcode id="343e" name="OP_ZoneChange" updated="08/21/24">
<comment>old ZoneChangeCode</comment>
<payload dir="both" typename="zoneChangeStruct" sizechecktype="match"/>
</opcode>
@@ -191,19 +191,19 @@
<comment>EmoteTextCode</comment>
<payload dir="both" typename="emoteTextStruct" sizechecktype="none"/>
</opcode>
- <opcode id="1520" name="OP_SimpleMessage" updated="07/17/24">
+ <opcode id="7a7a" name="OP_SimpleMessage" updated="08/21/24">
<comment>SimpleMessageCode</comment>
<payload dir="server" typename="simpleMessageStruct" sizechecktype="match"/>
</opcode>
- <opcode id="3fc6" name="OP_FormattedMessage" updated="07/17/24">
+ <opcode id="01b6" name="OP_FormattedMessage" updated="08/21/24">
<comment>FormattedMessageCode i.e. pet dismissed etc</comment>
<payload dir="server" typename="formattedMessageStruct" sizechecktype="none"/>
</opcode>
- <opcode id="60f9" name="OP_CommonMessage" updated="07/17/24">
+ <opcode id="41ec" name="OP_CommonMessage" updated="08/21/24">
<comment>ChannelMessageCode i.e. /tell /ooc /shout etc</comment>
<payload dir="both" typename="channelMessageStruct" sizechecktype="none"/>
</opcode>
- <opcode id="36f2" name="OP_SpecialMesg" updated="07/17/24">
+ <opcode id="24fe" name="OP_SpecialMesg" updated="08/21/24">
<comment>Communicate textual info to client including hail responses etc</comment>
<payload dir="server" typename="specialMessageStruct" sizechecktype="none"/>
</opcode>
@@ -315,7 +315,7 @@
<comment>List of group members - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="6d8b" name="OP_GuildMemberList" updated="07/17/24">
+ <opcode id="0ae8" name="OP_GuildMemberList" updated="08/21/24">
<comment>List of guild members - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
@@ -375,7 +375,7 @@
<comment>Fellowship information - 2576 bytes</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="725b" name="OP_ExpandedGuildInfo" updated="07/17/24">
+ <opcode id="ffff" name="OP_ExpandedGuildInfo" updated="07/17/24">
<comment>Guild ranks and other misc guild data - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
@@ -543,7 +543,7 @@
<comment>Listing of all guilds. Can be triggered by /lfg search?</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="3f04" name="OP_GuildsInZoneList" updated="07/17/24">
+ <opcode id="4a89" name="OP_GuildsInZoneList" updated="08/21/24">
<comment>Listing of guild names present in the current zone. Generally seen on zoning</comment>
<payload dir="server" typename="guildsInZoneListStruct" sizechecktype="none"/>
</opcode>
@@ -603,7 +603,7 @@
<comment>Free to play nags and other data - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="54c9" name="OP_Find" updated="07/17/24">
+ <opcode id="56f4" name="OP_Find" updated="08/21/24">
<comment>Find window data - 112 bytes</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
Modified: showeq/branches/cn187_devel/configure.in
===================================================================
--- showeq/branches/cn187_devel/configure.in 2024-08-21 20:12:56 UTC (rev 1540)
+++ showeq/branches/cn187_devel/configure.in 2024-08-21 21:17:21 UTC (rev 1541)
@@ -2,7 +2,7 @@
dnl $Id$ $Name$
AC_PREREQ(2.59)
-AC_INIT(showeq, 6.3.16)
+AC_INIT(showeq, 6.4.0)
AC_CONFIG_SRCDIR(src/main.cpp)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_SYSTEM
Modified: showeq/branches/cn187_devel/src/everquest.h
===================================================================
--- showeq/branches/cn187_devel/src/everquest.h 2024-08-21 20:12:56 UTC (rev 1540)
+++ showeq/branches/cn187_devel/src/everquest.h 2024-08-21 21:17:21 UTC (rev 1541)
@@ -1119,31 +1119,25 @@
struct
{
- signed deltaX:13; // change in x
- signed deltaY:13; // change in y
- unsigned padding00:6;
-
unsigned heading:12; // heading
- signed x:19; // x coord (1st loc value)
- unsigned padding01:1;
+ signed animation:10; // current animation
+ unsigned padding00:10;
+ signed deltaZ:13; // change in z
+ signed y:19; // y coord (2nd loc value)
+
+ signed deltaX:13; // change in x
signed z:19; // z coord (3rd loc value)
- unsigned padding02:13;
- signed y:19; // y coord (2nd loc value)
+ unsigned pitch:12; // pitch (up/down heading)
signed deltaHeading:10; // change in heading
- unsigned padding03:3;
+ unsigned padding03:10;
- signed deltaZ:13; // change in z
- unsigned pitch:12; // pitch (up/down heading)
- unsigned padding04:7;
+ signed deltaY:13; // change in y
+ signed x:19; // x coord (1st loc value)
- signed animation:10; // current animation
- unsigned padding05:22;
-
};
- int32_t posData[6];
-
+ int32_t posData[5];
};
/*0000*/ union
@@ -2393,7 +2387,7 @@
/*
** Player Position Update
-** Length: 28 Octets
+** Length: 24 Octets
** OpCode: PlayerPosCode
*/
struct playerSpawnPosStruct
@@ -2401,28 +2395,23 @@
/*0000*/ uint16_t spawnId;
/*0002*/ uint16_t spawnId2;
/*0004*/
- signed deltaX:13; // change in x
- signed deltaY:13; // change in y
- unsigned padding00:6;
+ unsigned heading:12; // heading
+ signed animation:10; // current animation
+ unsigned padding00:10;
/*0008*/
- unsigned heading:12; // heading
- signed x:19; // x coord (1st loc value)
- unsigned padding01:1;
+ signed deltaZ:13; // change in z
+ signed y:19; // y coord (2nd loc value)
/*0012*/
+ signed deltaX:13; // change in x
signed z:19; // z coord (3rd loc value)
- unsigned padding02:13;
/*0016*/
- signed y:19; // y coord (2nd loc value)
+ unsigned pitch:12; // pitch (up/down heading)
signed deltaHeading:10; // change in heading
- unsigned padding03:3;
+ unsigned padding03:10;
/*0020*/
- signed deltaZ:13; // change in z
- unsigned pitch:12; // pitch (up/down heading)
- unsigned padding04:7;
+ signed deltaY:13; // change in y
+ signed x:19; // x coord (1st loc value)
/*0024*/
- signed animation:10; // current animation
- unsigned padding05:22;
-/*0028*/
};
/*
@@ -2436,27 +2425,27 @@
/*0002*/ uint16_t spawnId; // Player's spawn id
/*0004*/ uint16_t unknown0004; // ***Placeholder
/*0006*/
- float x; // x coord (1st loc value)
+ float z; // z coord (3rd loc value)
/*0010*/
- signed deltaHeading:10; // change in heading
- unsigned padding01:22;
+ float y; // y coord (2nd loc value)
/*0014*/
- float z; // z coord (3rd loc value)
+ unsigned heading:12; // heading
+ unsigned padding02:20;
/*0018*/
- float deltaZ; // change in z
+ float deltaX; // change in x
/*0022*/
+ float x; // x coord (1st loc value)
+/*0026*/
signed animation:10; // current animation
- unsigned padding04:22;
-/*0026*/
- float deltaX; // change in x
+ unsigned pitch:12; // pitch (up/down heading)
+ unsigned padding05:10;
/*0030*/
float deltaY; // change in y
/*0034*/
- unsigned heading:12; // heading
- unsigned pitch:12; // pitch (up/down heading)
- unsigned padding07:8;
+ signed deltaHeading:10; // change in heading
+ unsigned padding07:22;
/*0038*/
- float y; // y coord (2nd loc value)
+ float deltaZ; // change in z
/*0042*/
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 20:12:57
|
Revision: 1540
http://sourceforge.net/p/seq/svn/1540
Author: cn187
Date: 2024-08-21 20:12:56 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Delete incorrectly named tag for 6.4
Removed Paths:
-------------
showeq/tags/v_6_4_0/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 20:09:15
|
Revision: 1539
http://sourceforge.net/p/seq/svn/1539
Author: cn187
Date: 2024-08-21 20:09:12 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Tag for release 6.4.0
Added Paths:
-----------
showeq/tags/v6_4_0/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 20:05:19
|
Revision: 1538
http://sourceforge.net/p/seq/svn/1538
Author: cn187
Date: 2024-08-21 20:05:16 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Reorganize makefile for easier merging
Modified Paths:
--------------
showeq/branches/cn187_devel/src/Makefile.am
Modified: showeq/branches/cn187_devel/src/Makefile.am
===================================================================
--- showeq/branches/cn187_devel/src/Makefile.am 2024-08-21 20:00:48 UTC (rev 1537)
+++ showeq/branches/cn187_devel/src/Makefile.am 2024-08-21 20:05:16 UTC (rev 1538)
@@ -2,33 +2,128 @@
QT_LIBS = $(LIB_QT)
-bin_PROGRAMS = showeq
+bin_PROGRAMS = showeq
-showeq_SOURCES = main.cpp spawn.cpp spawnshell.cpp spawnlist.cpp spellshell.cpp \
- spelllist.cpp vpacket.cpp editor.cpp filterlistwindow.cpp filter.cpp packetfragment.cpp packetstream.cpp \
- packetinfo.cpp packet.cpp packetcapture.cpp packetformat.cpp interface.cpp compass.cpp \
- map.cpp util.cpp experiencelog.cpp combatlog.cpp player.cpp skilllist.cpp \
- statlist.cpp filtermgr.cpp mapcore.cpp category.cpp compassframe.cpp group.cpp \
- guild.cpp netdiag.cpp logger.cpp xmlconv.cpp xmlpreferences.cpp seqwindow.cpp \
- seqlistview.cpp zonemgr.cpp spawnmonitor.cpp spawnpointlist.cpp spawnlistcommon.cpp \
- spawnlist2.cpp spells.cpp datetimemgr.cpp spawnlog.cpp packetlog.cpp \
- datalocationmgr.cpp eqstr.cpp messages.cpp message.cpp messagefilter.cpp messagewindow.cpp \
- messageshell.cpp terminal.cpp filteredspawnlog.cpp messagefilterdialog.cpp \
- diagnosticmessages.cpp mapicon.cpp filternotifications.cpp netstream.cpp guildshell.cpp \
- guildlist.cpp bazaarlog.cpp mapicondialog.cpp packetcaptureprovider.cpp toolbaricons.cpp
+showeq_SOURCES = \
+ bazaarlog.cpp \
+ category.cpp \
+ combatlog.cpp \
+ compass.cpp \
+ compassframe.cpp \
+ datalocationmgr.cpp \
+ datetimemgr.cpp \
+ diagnosticmessages.cpp \
+ editor.cpp \
+ eqstr.cpp \
+ experiencelog.cpp \
+ filter.cpp \
+ filteredspawnlog.cpp \
+ filterlistwindow.cpp \
+ filtermgr.cpp \
+ filternotifications.cpp \
+ group.cpp \
+ guild.cpp \
+ guildlist.cpp \
+ guildshell.cpp \
+ interface.cpp \
+ logger.cpp \
+ main.cpp \
+ mapcore.cpp \
+ map.cpp \
+ mapicon.cpp \
+ mapicondialog.cpp \
+ message.cpp \
+ messagefilter.cpp \
+ messagefilterdialog.cpp \
+ messages.cpp \
+ messageshell.cpp \
+ messagewindow.cpp \
+ netdiag.cpp \
+ netstream.cpp \
+ packetcapture.cpp \
+ packetcaptureprovider.cpp \
+ packet.cpp \
+ packetformat.cpp \
+ packetfragment.cpp \
+ packetinfo.cpp \
+ packetlog.cpp \
+ packetstream.cpp \
+ player.cpp \
+ seqlistview.cpp \
+ seqwindow.cpp \
+ skilllist.cpp \
+ spawn.cpp \
+ spawnlist2.cpp \
+ spawnlistcommon.cpp \
+ spawnlist.cpp \
+ spawnlog.cpp \
+ spawnmonitor.cpp \
+ spawnpointlist.cpp \
+ spawnshell.cpp \
+ spelllist.cpp \
+ spells.cpp \
+ spellshell.cpp \
+ statlist.cpp \
+ terminal.cpp \
+ toolbaricons.cpp \
+ util.cpp \
+ vpacket.cpp \
+ xmlconv.cpp \
+ xmlpreferences.cpp \
+ zonemgr.cpp
-showeq_moc_SRCS = bazaarlog.moc category.moc combatlog.moc compass.moc \
- compassframe.moc datetimemgr.moc editor.moc filterlistwindow.moc experiencelog.moc \
- filteredspawnlog.moc filtermgr.moc filternotifications.moc group.moc \
- guild.moc guildlist.moc guildshell.moc interface.moc logger.moc \
- map.moc mapicon.moc mapicondialog.moc messagefilter.moc \
- messagefilterdialog.moc messages.moc messageshell.moc messagewindow.moc \
- netdiag.moc packet.moc packetinfo.moc packetlog.moc packetstream.moc \
- player.moc seqlistview.moc seqwindow.moc skilllist.moc spawnlist.moc \
- spawnlist2.moc spawnlistcommon.moc spawnlog.moc spawnmonitor.moc \
- spawnpointlist.moc spawnshell.moc spelllist.moc spellshell.moc statlist.moc \
- terminal.moc xmlpreferences.moc zonemgr.moc
+showeq_moc_SRCS = \
+ bazaarlog.moc \
+ category.moc \
+ combatlog.moc \
+ compassframe.moc \
+ compass.moc \
+ datetimemgr.moc \
+ editor.moc \
+ experiencelog.moc \
+ filteredspawnlog.moc \
+ filterlistwindow.moc \
+ filtermgr.moc \
+ filternotifications.moc \
+ group.moc \
+ guildlist.moc \
+ guild.moc \
+ guildshell.moc \
+ interface.moc \
+ logger.moc \
+ mapicondialog.moc \
+ mapicon.moc \
+ map.moc \
+ messagefilterdialog.moc \
+ messagefilter.moc \
+ messageshell.moc \
+ messages.moc \
+ messagewindow.moc \
+ netdiag.moc \
+ packetinfo.moc \
+ packetlog.moc \
+ packet.moc \
+ packetstream.moc \
+ player.moc \
+ seqlistview.moc \
+ seqwindow.moc \
+ skilllist.moc \
+ spawnlist2.moc \
+ spawnlistcommon.moc \
+ spawnlist.moc \
+ spawnlog.moc \
+ spawnmonitor.moc \
+ spawnpointlist.moc \
+ spawnshell.moc \
+ spelllist.moc \
+ spellshell.moc \
+ statlist.moc \
+ terminal.moc \
+ xmlpreferences.moc \
+ zonemgr.moc
+
+
nodist_showeq_SOURCES = ui_mapicondialog.h $(showeq_moc_SRCS)
$(srcdir)/bazaarlog.cpp: bazaarlog.moc
@@ -38,9 +133,9 @@
$(srcdir)/compassframe.cpp: compassframe.moc
$(srcdir)/datetimemgr.cpp: datetimemgr.moc
$(srcdir)/editor.cpp: editor.moc
-$(srcdir)/filterlistwindow.cpp: filterlistwindow.moc
$(srcdir)/experiencelog.cpp: experiencelog.moc
$(srcdir)/filteredspawnlog.cpp: filteredspawnlog.moc
+$(srcdir)/filterlistwindow.cpp: filterlistwindow.moc
$(srcdir)/filtermgr.cpp: filtermgr.moc
$(srcdir)/filternotifications.cpp: filternotifications.moc
$(srcdir)/group.cpp: group.moc
@@ -114,8 +209,107 @@
EXTRA_DIST = h2info.pl
-noinst_HEADERS = classes.h compass.h everquest.h interface.h main.h map.h filter.h vpacket.h editor.h filterlistwindow.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 weapons29.h weapons2a.h weapons2b.h weapons2c.h weapons2d.h weapons2e.h weapons2f.h weapons30.h weapons4e.h decode.h cgiconv.h skilllist.h statlist.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.h mapicondialog.ui filternotifications.h netstream.h guildshell.h guildlist.h bazaarlog.h message.h s_everquest.h staticspells.h packetcaptureprovider.h mapcolors.h toolbaricons.h
+noinst_HEADERS = \
+ bazaarlog.h \
+ category.h \
+ cgiconv.h \
+ classes.h \
+ combatlog.h \
+ compassframe.h \
+ compass.h \
+ crctab.h \
+ datalocationmgr.h \
+ datetimemgr.h \
+ decode.h \
+ deity.h \
+ diagnosticmessages.h \
+ editor.h \
+ eqstr.h \
+ everquest.h \
+ experiencelog.h \
+ filteredspawnlog.h \
+ filter.h \
+ filterlistwindow.h \
+ filtermgr.h \
+ filternotifications.h \
+ fixpt.h \
+ group.h \
+ guild.h \
+ guildlist.h \
+ guildshell.h \
+ interface.h \
+ languages.h \
+ logger.h \
+ main.h \
+ mapcolors.h \
+ mapcore.h \
+ map.h \
+ mapicondialog.h \
+ mapicondialog.ui \
+ mapicon.h \
+ messagefilterdialog.h \
+ messagefilter.h \
+ message.h \
+ messages.h \
+ messageshell.h \
+ messagewindow.h \
+ netdiag.h \
+ netstream.h \
+ packetcapture.h \
+ packetcaptureprovider.h \
+ packetcommon.h \
+ packetformat.h \
+ packetfragment.h \
+ packet.h \
+ packetinfo.h \
+ packetlog.h \
+ packetstream.h \
+ player.h \
+ pointarray.h \
+ point.h \
+ races.h \
+ seqlistview.h \
+ seqwindow.h \
+ s_everquest.h \
+ skilllist.h \
+ skills.h \
+ spawn.h \
+ spawnlist2.h \
+ spawnlistcommon.h \
+ spawnlist.h \
+ spawnlog.h \
+ spawnmonitor.h \
+ spawnpointlist.h \
+ spawnshell.h \
+ spelllist.h \
+ spells.h \
+ spellshell.h \
+ staticspells.h \
+ statlist.h \
+ terminal.h \
+ toolbaricons.h \
+ typenames.h \
+ util.h \
+ vpacket.h \
+ weapons1.h \
+ weapons27.h \
+ weapons28.h \
+ weapons29.h \
+ weapons2a.h \
+ weapons2b.h \
+ weapons2c.h \
+ weapons2d.h \
+ weapons2e.h \
+ weapons2f.h \
+ weapons30.h \
+ weapons4e.h \
+ weapons.h \
+ xmlconv.h \
+ xmlpreferences.h \
+ zonemgr.h \
+ zones.h
+
CLEANFILES = $(nodist_showeq_SOURCES)
MAINTAINERCLEANFILES = Makefile.in s_everquest.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 20:00:49
|
Revision: 1537
http://sourceforge.net/p/seq/svn/1537
Author: cn187
Date: 2024-08-21 20:00:48 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Tag for release 6.4.0
Added Paths:
-----------
showeq/tags/v_6_4_0/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 20:00:22
|
Revision: 1536
http://sourceforge.net/p/seq/svn/1536
Author: cn187
Date: 2024-08-21 20:00:20 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Release 6.4.0
- Update to version 6.4.0
- Support for EQ Patch 08/21/24
- Struct and opcode updates
- Fixes:
- Improvements/fixes to various column sort/reorder/hide behavior
- Fixes for player-controlled external entity detection and updates, and related crash
- Rework packet capture filter to improve reliability of session detection
- Update OP_Consider logic to correctly display con colors and level
- Enable menu options to rename/delete spawnpoints
- Don't auto-select another mob when a targeted corpse decays
- Fixes for formatted messages
- Remove config.sub/config.guess from source and regenerate them as needed
- Character menu now allows selecting level 125
- Correctly interpret character x/y when loading map (fixes tiny map in northro, etc.)
- Correctly interpret zone ID for player purchased housing/guildhalls
- Enhancements:
- Add option to deselect your target if mob is untargeted
- Add support for configuring map line/location colors
- Add support for configuring PCAP snaplen and ring buffer size
- PCAP will now attempt to detect dropped packets and emit a warning with possible fixes
- New UI for adding and editing spawn filters
- Add support for using info/equipment fields in spawn filter matches
- Misc:
- Some internal and build system reorganization to make future changes less cumbersome
Modified Paths:
--------------
showeq/trunk/ChangeLog
showeq/trunk/conf/zoneopcodes.xml
showeq/trunk/configure.in
showeq/trunk/src/everquest.h
Modified: showeq/trunk/ChangeLog
===================================================================
--- showeq/trunk/ChangeLog 2024-08-21 20:00:10 UTC (rev 1535)
+++ showeq/trunk/ChangeLog 2024-08-21 20:00:20 UTC (rev 1536)
@@ -1,3 +1,29 @@
+cn187 (08/21/24)
+- Update to version 6.4.0
+- Support for EQ Patch 08/21/24
+- Struct and opcode updates
+- Fixes:
+ - Improvements/fixes to various column sort/reorder/hide behavior
+ - Fixes for player-controlled external entity detection and updates, and related crash
+ - Rework packet capture filter to improve reliability of session detection
+ - Update OP_Consider logic to correctly display con colors and level
+ - Enable menu options to rename/delete spawnpoints
+ - Don't auto-select another mob when a targeted corpse decays
+ - Fixes for formatted messages
+ - Remove config.sub/config.guess from source and regenerate them as needed
+ - Character menu now allows selecting level 125
+ - Correctly interpret character x/y when loading map (fixes tiny map in northro, etc.)
+ - Correctly interpret zone ID for player purchased housing/guildhalls
+- Enhancements:
+ - Add option to deselect your target if mob is untargeted
+ - Add support for configuring map line/location colors
+ - Add support for configuring PCAP snaplen and ring buffer size
+ - PCAP will now attempt to detect dropped packets and emit a warning with possible fixes
+ - New UI for adding and editing spawn filters
+ - Add support for using info/equipment fields in spawn filter matches
+- Misc:
+ - Some internal and build system reorganization to make future changes less cumbersome
+
cn187 (07/17/24)
----------------
- Update to version 6.3.16
Modified: showeq/trunk/conf/zoneopcodes.xml
===================================================================
--- showeq/trunk/conf/zoneopcodes.xml 2024-08-21 20:00:10 UTC (rev 1535)
+++ showeq/trunk/conf/zoneopcodes.xml 2024-08-21 20:00:20 UTC (rev 1536)
@@ -3,37 +3,37 @@
<seqopcodes>
<!-- Critical opcodes used directly by ShowEQ -->
- <opcode id="3193" name="OP_PlayerProfile" updated="07/17/24">
+ <opcode id="6acb" name="OP_PlayerProfile" updated="08/21/24">
<comment>CharProfileCode</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="1eb3" name="OP_ZoneEntry" updated="07/17/24">
+ <opcode id="6bee" name="OP_ZoneEntry" updated="08/21/24">
<comment>ZoneEntryCode</comment>
<payload dir="client" typename="ClientZoneEntryStruct" sizechecktype="match"/>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="39b4" name="OP_TimeOfDay" updated="07/17/24">
+ <opcode id="7a78" name="OP_TimeOfDay" updated="08/21/24">
<comment>TimeOfDayCode</comment>
<payload dir="server" typename="timeOfDayStruct" sizechecktype="match"/>
</opcode>
- <opcode id="518c" name="OP_NewZone" updated="07/17/24">
+ <opcode id="461c" name="OP_NewZone" updated="08/21/24">
<comment>NewZoneCode</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="221a" name="OP_SpawnDoor" updated="07/17/24">
+ <opcode id="3aa8" name="OP_SpawnDoor" updated="08/21/24">
<comment>DoorSpawnsCode</comment>
<payload dir="server" typename="doorStruct" sizechecktype="modulus"/>
</opcode>
- <opcode id="4feb" name="OP_GroundSpawn" updated="07/17/24">
+ <opcode id="24ad" name="OP_GroundSpawn" updated="08/21/24">
<comment>MakeDropCode</comment>
<payload dir="server" typename="makeDropStruct" sizechecktype="none"/>
<payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="4743" name="OP_SendZonePoints" updated="07/17/24">
+ <opcode id="4dc1" name="OP_SendZonePoints" updated="08/21/24">
<comment>Coords in a zone that will port you to another zone</comment>
<payload dir="server" typename="zonePointsStruct" sizechecktype="none"/>
</opcode>
- <opcode id="0d97" name="OP_AAExpUpdate" updated="07/17/24">
+ <opcode id="35d1" name="OP_AAExpUpdate" updated="08/21/24">
<comment>Receiving AA experience. Also when percent to AA changes.</comment>
<payload dir="server" typename="altExpUpdateStruct" sizechecktype="match"/>
</opcode>
@@ -41,32 +41,32 @@
<comment>ExpUpdateCode</comment>
<payload dir="server" typename="expUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="37e3" name="OP_GuildMOTD" updated="07/17/24">
+ <opcode id="198f" name="OP_GuildMOTD" updated="08/21/24">
<comment>GuildMOTD</comment>
<payload dir="server" typename="guildMOTDStruct" sizechecktype="none"/>
</opcode>
- <opcode id="4187" name="OP_ClientUpdate" updated="07/17/24">
+ <opcode id="441b" name="OP_ClientUpdate" updated="08/21/24">
<comment>Position updates</comment>
<payload dir="server" typename="playerSpawnPosStruct" sizechecktype="match"/>
<payload dir="both" typename="playerSelfPosStruct" sizechecktype="match"/>
</opcode>
- <opcode id="1f6b" name="OP_NpcMoveUpdate" updated="07/17/24">
+ <opcode id="5332" name="OP_NpcMoveUpdate" updated="08/21/24">
<comment>Position updates</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="3afa" name="OP_MobUpdate" updated="07/17/24">
+ <opcode id="6f8e" name="OP_MobUpdate" updated="08/21/24">
<comment>MobUpdateCode</comment>
<payload dir="both" typename="spawnPositionUpdate" sizechecktype="match"/>
</opcode>
- <opcode id="1a9e" name="OP_DeleteSpawn" updated="07/17/24">
+ <opcode id="6447" name="OP_DeleteSpawn" updated="08/21/24">
<comment>DeleteSpawnCode</comment>
<payload dir="both" typename="deleteSpawnStruct" sizechecktype="match"/>
</opcode>
- <opcode id="67ae" name="OP_RemoveSpawn" updated="07/17/24">
+ <opcode id="4d80" name="OP_RemoveSpawn" updated="08/21/24">
<comment>Remove spawn from zone</comment>
<payload dir="both" typename="removeSpawnStruct" sizechecktype="none"/>
</opcode>
- <opcode id="7c61" name="OP_Death" updated="07/17/24">
+ <opcode id="3054" name="OP_Death" updated="08/21/24">
<comment>old NewCorpseCode</comment>
<payload dir="server" typename="newCorpseStruct" sizechecktype="match"/>
</opcode>
@@ -74,7 +74,7 @@
<comment>SpawnUpdateCode</comment>
<payload dir="both" typename="SpawnUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="033d" name="OP_SpawnAppearance" updated="07/17/24">
+ <opcode id="44c3" name="OP_SpawnAppearance" updated="08/21/24">
<comment>SpawnAppearanceCode</comment>
<payload dir="both" typename="spawnAppearanceStruct" sizechecktype="match"/>
</opcode>
@@ -86,15 +86,15 @@
<comment>NpcHpUpdateCode Update HP % of a PC or NPC</comment>
<payload dir="both" typename="hpNpcUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="2bfb" name="OP_GuildMemberUpdate" updated="07/17/24">
+ <opcode id="169c" name="OP_GuildMemberUpdate" updated="08/21/24">
<comment>Info regarding guild members</comment>
<payload dir="server" typename="GuildMemberUpdate" sizechecktype="match"/>
</opcode>
- <opcode id="4454" name="OP_ClickObject" updated="07/17/24">
+ <opcode id="6cec" name="OP_ClickObject" updated="08/21/24">
<comment>Items dropped on the ground</comment>
<payload dir="both" typename="remDropStruct" sizechecktype="match"/>
</opcode>
- <opcode id="681d" name="OP_Action" updated="07/17/24">
+ <opcode id="38ad" name="OP_Action" updated="08/21/24">
<comment>Spells cast etc</comment>
<payload dir="both" typename="actionStruct" sizechecktype="match"/>
<payload dir="both" typename="actionAltStruct" sizechecktype="match"/>
@@ -103,11 +103,11 @@
<comment>Combat actions i.e. bash, kick etc</comment>
<payload dir="both" typename="action2Struct" sizechecktype="match"/>
</opcode>
- <opcode id="4126" name="OP_Consider" updated="07/17/24">
+ <opcode id="6fc1" name="OP_Consider" updated="08/21/24">
<comment>ConsiderCode</comment>
<payload dir="both" typename="considerStruct" sizechecktype="match"/>
</opcode>
- <opcode id="0987" name="OP_TargetMouse" updated="07/17/24">
+ <opcode id="13f6" name="OP_TargetMouse" updated="08/21/24">
<comment>Targeting a person - old ClientTargetCode</comment>
<payload dir="both" typename="clientTargetStruct" sizechecktype="match"/>
</opcode>
@@ -123,7 +123,7 @@
<comment>Server putting players into shroud form</comment>
<payload dir="server" typename="spawnShroudSelf" sizechecktype="none"/>
</opcode>
- <opcode id="24bc" name="OP_ZoneChange" updated="07/17/24">
+ <opcode id="343e" name="OP_ZoneChange" updated="08/21/24">
<comment>old ZoneChangeCode</comment>
<payload dir="both" typename="zoneChangeStruct" sizechecktype="match"/>
</opcode>
@@ -191,19 +191,19 @@
<comment>EmoteTextCode</comment>
<payload dir="both" typename="emoteTextStruct" sizechecktype="none"/>
</opcode>
- <opcode id="1520" name="OP_SimpleMessage" updated="07/17/24">
+ <opcode id="7a7a" name="OP_SimpleMessage" updated="08/21/24">
<comment>SimpleMessageCode</comment>
<payload dir="server" typename="simpleMessageStruct" sizechecktype="match"/>
</opcode>
- <opcode id="3fc6" name="OP_FormattedMessage" updated="07/17/24">
+ <opcode id="01b6" name="OP_FormattedMessage" updated="08/21/24">
<comment>FormattedMessageCode i.e. pet dismissed etc</comment>
<payload dir="server" typename="formattedMessageStruct" sizechecktype="none"/>
</opcode>
- <opcode id="60f9" name="OP_CommonMessage" updated="07/17/24">
+ <opcode id="41ec" name="OP_CommonMessage" updated="08/21/24">
<comment>ChannelMessageCode i.e. /tell /ooc /shout etc</comment>
<payload dir="both" typename="channelMessageStruct" sizechecktype="none"/>
</opcode>
- <opcode id="36f2" name="OP_SpecialMesg" updated="07/17/24">
+ <opcode id="24fe" name="OP_SpecialMesg" updated="08/21/24">
<comment>Communicate textual info to client including hail responses etc</comment>
<payload dir="server" typename="specialMessageStruct" sizechecktype="none"/>
</opcode>
@@ -307,7 +307,7 @@
<comment>List of group members - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="6d8b" name="OP_GuildMemberList" updated="07/17/24">
+ <opcode id="0ae8" name="OP_GuildMemberList" updated="08/21/24">
<comment>List of guild members - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
@@ -367,7 +367,7 @@
<comment>Fellowship information - 2576 bytes</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="725b" name="OP_ExpandedGuildInfo" updated="07/17/24">
+ <opcode id="ffff" name="OP_ExpandedGuildInfo" updated="07/17/24">
<comment>Guild ranks and other misc guild data - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
@@ -535,7 +535,7 @@
<comment>Listing of all guilds. Can be triggered by /lfg search?</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="3f04" name="OP_GuildsInZoneList" updated="07/17/24">
+ <opcode id="4a89" name="OP_GuildsInZoneList" updated="08/21/24">
<comment>Listing of guild names present in the current zone. Generally seen on zoning</comment>
<payload dir="server" typename="guildsInZoneListStruct" sizechecktype="none"/>
</opcode>
@@ -595,7 +595,7 @@
<comment>Free to play nags and other data - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="54c9" name="OP_Find" updated="07/17/24">
+ <opcode id="56f4" name="OP_Find" updated="08/21/24">
<comment>Find window data - 112 bytes</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
Modified: showeq/trunk/configure.in
===================================================================
--- showeq/trunk/configure.in 2024-08-21 20:00:10 UTC (rev 1535)
+++ showeq/trunk/configure.in 2024-08-21 20:00:20 UTC (rev 1536)
@@ -2,7 +2,7 @@
dnl $Id$ $Name$
AC_PREREQ(2.59)
-AC_INIT(showeq, 6.3.16)
+AC_INIT(showeq, 6.4.0)
AC_CONFIG_SRCDIR(src/main.cpp)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_SYSTEM
Modified: showeq/trunk/src/everquest.h
===================================================================
--- showeq/trunk/src/everquest.h 2024-08-21 20:00:10 UTC (rev 1535)
+++ showeq/trunk/src/everquest.h 2024-08-21 20:00:20 UTC (rev 1536)
@@ -1119,31 +1119,25 @@
struct
{
- signed deltaX:13; // change in x
- signed deltaY:13; // change in y
- unsigned padding00:6;
-
unsigned heading:12; // heading
- signed x:19; // x coord (1st loc value)
- unsigned padding01:1;
+ signed animation:10; // current animation
+ unsigned padding00:10;
+ signed deltaZ:13; // change in z
+ signed y:19; // y coord (2nd loc value)
+
+ signed deltaX:13; // change in x
signed z:19; // z coord (3rd loc value)
- unsigned padding02:13;
- signed y:19; // y coord (2nd loc value)
+ unsigned pitch:12; // pitch (up/down heading)
signed deltaHeading:10; // change in heading
- unsigned padding03:3;
+ unsigned padding03:10;
- signed deltaZ:13; // change in z
- unsigned pitch:12; // pitch (up/down heading)
- unsigned padding04:7;
+ signed deltaY:13; // change in y
+ signed x:19; // x coord (1st loc value)
- signed animation:10; // current animation
- unsigned padding05:22;
-
};
- int32_t posData[6];
-
+ int32_t posData[5];
};
/*0000*/ union
@@ -2393,7 +2387,7 @@
/*
** Player Position Update
-** Length: 28 Octets
+** Length: 24 Octets
** OpCode: PlayerPosCode
*/
struct playerSpawnPosStruct
@@ -2401,28 +2395,23 @@
/*0000*/ uint16_t spawnId;
/*0002*/ uint16_t spawnId2;
/*0004*/
- signed deltaX:13; // change in x
- signed deltaY:13; // change in y
- unsigned padding00:6;
+ unsigned heading:12; // heading
+ signed animation:10; // current animation
+ unsigned padding00:10;
/*0008*/
- unsigned heading:12; // heading
- signed x:19; // x coord (1st loc value)
- unsigned padding01:1;
+ signed deltaZ:13; // change in z
+ signed y:19; // y coord (2nd loc value)
/*0012*/
+ signed deltaX:13; // change in x
signed z:19; // z coord (3rd loc value)
- unsigned padding02:13;
/*0016*/
- signed y:19; // y coord (2nd loc value)
+ unsigned pitch:12; // pitch (up/down heading)
signed deltaHeading:10; // change in heading
- unsigned padding03:3;
+ unsigned padding03:10;
/*0020*/
- signed deltaZ:13; // change in z
- unsigned pitch:12; // pitch (up/down heading)
- unsigned padding04:7;
+ signed deltaY:13; // change in y
+ signed x:19; // x coord (1st loc value)
/*0024*/
- signed animation:10; // current animation
- unsigned padding05:22;
-/*0028*/
};
/*
@@ -2436,27 +2425,27 @@
/*0002*/ uint16_t spawnId; // Player's spawn id
/*0004*/ uint16_t unknown0004; // ***Placeholder
/*0006*/
- float x; // x coord (1st loc value)
+ float z; // z coord (3rd loc value)
/*0010*/
- signed deltaHeading:10; // change in heading
- unsigned padding01:22;
+ float y; // y coord (2nd loc value)
/*0014*/
- float z; // z coord (3rd loc value)
+ unsigned heading:12; // heading
+ unsigned padding02:20;
/*0018*/
- float deltaZ; // change in z
+ float deltaX; // change in x
/*0022*/
+ float x; // x coord (1st loc value)
+/*0026*/
signed animation:10; // current animation
- unsigned padding04:22;
-/*0026*/
- float deltaX; // change in x
+ unsigned pitch:12; // pitch (up/down heading)
+ unsigned padding05:10;
/*0030*/
float deltaY; // change in y
/*0034*/
- unsigned heading:12; // heading
- unsigned pitch:12; // pitch (up/down heading)
- unsigned padding07:8;
+ signed deltaHeading:10; // change in heading
+ unsigned padding07:22;
/*0038*/
- float y; // y coord (2nd loc value)
+ float deltaZ; // change in z
/*0042*/
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 20:00:14
|
Revision: 1535
http://sourceforge.net/p/seq/svn/1535
Author: cn187
Date: 2024-08-21 20:00:10 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Reorganize makefile for easier merging
Modified Paths:
--------------
showeq/trunk/src/Makefile.am
Modified: showeq/trunk/src/Makefile.am
===================================================================
--- showeq/trunk/src/Makefile.am 2024-08-21 20:00:03 UTC (rev 1534)
+++ showeq/trunk/src/Makefile.am 2024-08-21 20:00:10 UTC (rev 1535)
@@ -2,33 +2,128 @@
QT_LIBS = $(LIB_QT)
-bin_PROGRAMS = showeq
+bin_PROGRAMS = showeq
-showeq_SOURCES = main.cpp spawn.cpp spawnshell.cpp spawnlist.cpp spellshell.cpp \
- spelllist.cpp vpacket.cpp editor.cpp filterlistwindow.cpp filter.cpp packetfragment.cpp packetstream.cpp \
- packetinfo.cpp packet.cpp packetcapture.cpp packetformat.cpp interface.cpp compass.cpp \
- map.cpp util.cpp experiencelog.cpp combatlog.cpp player.cpp skilllist.cpp \
- statlist.cpp filtermgr.cpp mapcore.cpp category.cpp compassframe.cpp group.cpp \
- guild.cpp netdiag.cpp logger.cpp xmlconv.cpp xmlpreferences.cpp seqwindow.cpp \
- seqlistview.cpp zonemgr.cpp spawnmonitor.cpp spawnpointlist.cpp spawnlistcommon.cpp \
- spawnlist2.cpp spells.cpp datetimemgr.cpp spawnlog.cpp packetlog.cpp \
- datalocationmgr.cpp eqstr.cpp messages.cpp message.cpp messagefilter.cpp messagewindow.cpp \
- messageshell.cpp terminal.cpp filteredspawnlog.cpp messagefilterdialog.cpp \
- diagnosticmessages.cpp mapicon.cpp filternotifications.cpp netstream.cpp guildshell.cpp \
- guildlist.cpp bazaarlog.cpp mapicondialog.cpp packetcaptureprovider.cpp toolbaricons.cpp
+showeq_SOURCES = \
+ bazaarlog.cpp \
+ category.cpp \
+ combatlog.cpp \
+ compass.cpp \
+ compassframe.cpp \
+ datalocationmgr.cpp \
+ datetimemgr.cpp \
+ diagnosticmessages.cpp \
+ editor.cpp \
+ eqstr.cpp \
+ experiencelog.cpp \
+ filter.cpp \
+ filteredspawnlog.cpp \
+ filterlistwindow.cpp \
+ filtermgr.cpp \
+ filternotifications.cpp \
+ group.cpp \
+ guild.cpp \
+ guildlist.cpp \
+ guildshell.cpp \
+ interface.cpp \
+ logger.cpp \
+ main.cpp \
+ mapcore.cpp \
+ map.cpp \
+ mapicon.cpp \
+ mapicondialog.cpp \
+ message.cpp \
+ messagefilter.cpp \
+ messagefilterdialog.cpp \
+ messages.cpp \
+ messageshell.cpp \
+ messagewindow.cpp \
+ netdiag.cpp \
+ netstream.cpp \
+ packetcapture.cpp \
+ packetcaptureprovider.cpp \
+ packet.cpp \
+ packetformat.cpp \
+ packetfragment.cpp \
+ packetinfo.cpp \
+ packetlog.cpp \
+ packetstream.cpp \
+ player.cpp \
+ seqlistview.cpp \
+ seqwindow.cpp \
+ skilllist.cpp \
+ spawn.cpp \
+ spawnlist2.cpp \
+ spawnlistcommon.cpp \
+ spawnlist.cpp \
+ spawnlog.cpp \
+ spawnmonitor.cpp \
+ spawnpointlist.cpp \
+ spawnshell.cpp \
+ spelllist.cpp \
+ spells.cpp \
+ spellshell.cpp \
+ statlist.cpp \
+ terminal.cpp \
+ toolbaricons.cpp \
+ util.cpp \
+ vpacket.cpp \
+ xmlconv.cpp \
+ xmlpreferences.cpp \
+ zonemgr.cpp
-showeq_moc_SRCS = bazaarlog.moc category.moc combatlog.moc compass.moc \
- compassframe.moc datetimemgr.moc editor.moc filterlistwindow.moc experiencelog.moc \
- filteredspawnlog.moc filtermgr.moc filternotifications.moc group.moc \
- guild.moc guildlist.moc guildshell.moc interface.moc logger.moc \
- map.moc mapicon.moc mapicondialog.moc messagefilter.moc \
- messagefilterdialog.moc messages.moc messageshell.moc messagewindow.moc \
- netdiag.moc packet.moc packetinfo.moc packetlog.moc packetstream.moc \
- player.moc seqlistview.moc seqwindow.moc skilllist.moc spawnlist.moc \
- spawnlist2.moc spawnlistcommon.moc spawnlog.moc spawnmonitor.moc \
- spawnpointlist.moc spawnshell.moc spelllist.moc spellshell.moc statlist.moc \
- terminal.moc xmlpreferences.moc zonemgr.moc
+showeq_moc_SRCS = \
+ bazaarlog.moc \
+ category.moc \
+ combatlog.moc \
+ compassframe.moc \
+ compass.moc \
+ datetimemgr.moc \
+ editor.moc \
+ experiencelog.moc \
+ filteredspawnlog.moc \
+ filterlistwindow.moc \
+ filtermgr.moc \
+ filternotifications.moc \
+ group.moc \
+ guildlist.moc \
+ guild.moc \
+ guildshell.moc \
+ interface.moc \
+ logger.moc \
+ mapicondialog.moc \
+ mapicon.moc \
+ map.moc \
+ messagefilterdialog.moc \
+ messagefilter.moc \
+ messageshell.moc \
+ messages.moc \
+ messagewindow.moc \
+ netdiag.moc \
+ packetinfo.moc \
+ packetlog.moc \
+ packet.moc \
+ packetstream.moc \
+ player.moc \
+ seqlistview.moc \
+ seqwindow.moc \
+ skilllist.moc \
+ spawnlist2.moc \
+ spawnlistcommon.moc \
+ spawnlist.moc \
+ spawnlog.moc \
+ spawnmonitor.moc \
+ spawnpointlist.moc \
+ spawnshell.moc \
+ spelllist.moc \
+ spellshell.moc \
+ statlist.moc \
+ terminal.moc \
+ xmlpreferences.moc \
+ zonemgr.moc
+
+
nodist_showeq_SOURCES = ui_mapicondialog.h $(showeq_moc_SRCS)
$(srcdir)/bazaarlog.cpp: bazaarlog.moc
@@ -38,9 +133,9 @@
$(srcdir)/compassframe.cpp: compassframe.moc
$(srcdir)/datetimemgr.cpp: datetimemgr.moc
$(srcdir)/editor.cpp: editor.moc
-$(srcdir)/filterlistwindow.cpp: filterlistwindow.moc
$(srcdir)/experiencelog.cpp: experiencelog.moc
$(srcdir)/filteredspawnlog.cpp: filteredspawnlog.moc
+$(srcdir)/filterlistwindow.cpp: filterlistwindow.moc
$(srcdir)/filtermgr.cpp: filtermgr.moc
$(srcdir)/filternotifications.cpp: filternotifications.moc
$(srcdir)/group.cpp: group.moc
@@ -114,8 +209,107 @@
EXTRA_DIST = h2info.pl
-noinst_HEADERS = classes.h compass.h everquest.h interface.h main.h map.h filter.h vpacket.h editor.h filterlistwindow.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 weapons29.h weapons2a.h weapons2b.h weapons2c.h weapons2d.h weapons2e.h weapons2f.h weapons30.h weapons4e.h decode.h cgiconv.h skilllist.h statlist.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.h mapicondialog.ui filternotifications.h netstream.h guildshell.h guildlist.h bazaarlog.h message.h s_everquest.h staticspells.h packetcaptureprovider.h mapcolors.h toolbaricons.h
+noinst_HEADERS = \
+ bazaarlog.h \
+ category.h \
+ cgiconv.h \
+ classes.h \
+ combatlog.h \
+ compassframe.h \
+ compass.h \
+ crctab.h \
+ datalocationmgr.h \
+ datetimemgr.h \
+ decode.h \
+ deity.h \
+ diagnosticmessages.h \
+ editor.h \
+ eqstr.h \
+ everquest.h \
+ experiencelog.h \
+ filteredspawnlog.h \
+ filter.h \
+ filterlistwindow.h \
+ filtermgr.h \
+ filternotifications.h \
+ fixpt.h \
+ group.h \
+ guild.h \
+ guildlist.h \
+ guildshell.h \
+ interface.h \
+ languages.h \
+ logger.h \
+ main.h \
+ mapcolors.h \
+ mapcore.h \
+ map.h \
+ mapicondialog.h \
+ mapicondialog.ui \
+ mapicon.h \
+ messagefilterdialog.h \
+ messagefilter.h \
+ message.h \
+ messages.h \
+ messageshell.h \
+ messagewindow.h \
+ netdiag.h \
+ netstream.h \
+ packetcapture.h \
+ packetcaptureprovider.h \
+ packetcommon.h \
+ packetformat.h \
+ packetfragment.h \
+ packet.h \
+ packetinfo.h \
+ packetlog.h \
+ packetstream.h \
+ player.h \
+ pointarray.h \
+ point.h \
+ races.h \
+ seqlistview.h \
+ seqwindow.h \
+ s_everquest.h \
+ skilllist.h \
+ skills.h \
+ spawn.h \
+ spawnlist2.h \
+ spawnlistcommon.h \
+ spawnlist.h \
+ spawnlog.h \
+ spawnmonitor.h \
+ spawnpointlist.h \
+ spawnshell.h \
+ spelllist.h \
+ spells.h \
+ spellshell.h \
+ staticspells.h \
+ statlist.h \
+ terminal.h \
+ toolbaricons.h \
+ typenames.h \
+ util.h \
+ vpacket.h \
+ weapons1.h \
+ weapons27.h \
+ weapons28.h \
+ weapons29.h \
+ weapons2a.h \
+ weapons2b.h \
+ weapons2c.h \
+ weapons2d.h \
+ weapons2e.h \
+ weapons2f.h \
+ weapons30.h \
+ weapons4e.h \
+ weapons.h \
+ xmlconv.h \
+ xmlpreferences.h \
+ zonemgr.h \
+ zones.h
+
CLEANFILES = $(nodist_showeq_SOURCES)
MAINTAINERCLEANFILES = Makefile.in s_everquest.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 20:00:06
|
Revision: 1534
http://sourceforge.net/p/seq/svn/1534
Author: cn187
Date: 2024-08-21 20:00:03 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Increase max level to 125 for Character menu
Modified Paths:
--------------
showeq/trunk/src/interface.cpp
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2024-08-21 19:59:55 UTC (rev 1533)
+++ showeq/trunk/src/interface.cpp 2024-08-21 20:00:03 UTC (rev 1534)
@@ -2052,7 +2052,7 @@
m_levelSpinBox = new QSpinBox(this);
m_levelSpinBox->setObjectName("m_levelSpinBox");
m_levelSpinBox->setMinimum(1);
- m_levelSpinBox->setMaximum(115);
+ m_levelSpinBox->setMaximum(125);
m_levelSpinBox->setSingleStep(1);
QWidgetAction* levelSpinBoxAction = new QWidgetAction(m_charLevelMenu);
levelSpinBoxAction->setDefaultWidget(m_levelSpinBox);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 19:59:58
|
Revision: 1533
http://sourceforge.net/p/seq/svn/1533
Author: cn187
Date: 2024-08-21 19:59:55 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Break out main menu and status bar creation
Break main menu and status bar creation into separate functions
in order to reduce the size and increase readability of the EQInterface
constructor.
Modified Paths:
--------------
showeq/trunk/src/interface.cpp
showeq/trunk/src/interface.h
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2024-08-21 19:59:48 UTC (rev 1532)
+++ showeq/trunk/src/interface.cpp 2024-08-21 19:59:55 UTC (rev 1533)
@@ -104,6 +104,16 @@
// this define is used to diagnose the order with which zone packets are rcvd
#define ZONE_ORDER_DIAG
+const char* player_classes[] = {"Warrior", "Cleric", "Paladin",
+ "Ranger", "Shadow Knight", "Druid", "Monk", "Bard", "Rogue", "Shaman",
+ "Necromancer", "Wizard", "Magician", "Enchanter", "Beastlord", "Berserker"
+};
+
+const char* player_races[] = {"Human", "Barbarian", "Erudite",
+ "Wood elf", "High Elf", "Dark Elf", "Half Elf", "Dwarf", "Troll", "Ogre",
+ "Halfling", "Gnome", "Iksar", "Vah Shir", "Froglok" };
+
+
/* The main interface widget */
EQInterface::EQInterface(DataLocationMgr* dlm,
QWidget * parent, const char *name)
@@ -175,18 +185,6 @@
m_selectOnTarget = pSEQPrefs->getPrefBool("SelectOnTarget", section, false);
m_deselectOnUntarget = pSEQPrefs->getPrefBool("DeselectOnUntarget", section, false);
- const char* player_classes[] = {"Warrior", "Cleric", "Paladin", "Ranger",
- "Shadow Knight", "Druid", "Monk", "Bard",
- "Rogue", "Shaman", "Necromancer", "Wizard",
- "Magician", "Enchanter", "Beastlord",
- "Berserker"
- };
- const char* player_races[] = {"Human", "Barbarian", "Erudite", "Wood elf",
- "High Elf", "Dark Elf", "Half Elf", "Dwarf",
- "Troll", "Ogre", "Halfling", "Gnome", "Iksar",
- "Vah Shir", "Froglok"
- };
-
// set the applications default font
if (pSEQPrefs->isPreference("Font", section))
{
@@ -537,11 +535,710 @@
// The first call to menuBar() makes it exist
menuBar()->addSeparator();
+ createFileMenu();
+ createViewMenu();
+ createOptionsMenu();
+ createNetworkMenu();
+ createCharacterMenu();
+ createFiltersMenu();
+ createInterfaceMenu();
+ createWindowMenu();
+ createDebugMenu();
+
+////////////////////
+// QStatusBar creation
+ createStatusBar();
+
+/////////////////
+// interface connections
+ // connect EQInterface slots to its own signals
+ connect(this, SIGNAL(restoreFonts(void)),
+ this, SLOT(restoreStatusFont(void)));
+
+ // connect MapMgr slots to interface signals
+ connect(this, SIGNAL(saveAllPrefs(void)),
+ m_mapMgr, SLOT(savePrefs(void)));
+
+ // connect CategoryMgr slots to interface signals
+ connect(this, SIGNAL(saveAllPrefs(void)),
+ m_categoryMgr, SLOT(savePrefs(void)));
+
+ if (m_zoneMgr)
+ {
+ m_packet->connect2("OP_ZoneEntry", SP_Zone, DIR_Client,
+ "ClientZoneEntryStruct", SZC_Match,
+ m_zoneMgr, SLOT(zoneEntryClient(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_PlayerProfile", SP_Zone, DIR_Server,
+ "uint8_t", SZC_None,
+ m_zoneMgr, SLOT(zonePlayer(const uint8_t*, size_t)));
+ m_packet->connect2("OP_ZoneChange", SP_Zone, DIR_Client|DIR_Server,
+ "zoneChangeStruct", SZC_Match,
+ m_zoneMgr, SLOT(zoneChange(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_NewZone", SP_Zone, DIR_Server,
+ "uint8_t", SZC_None,
+ m_zoneMgr, SLOT(zoneNew(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_SendZonePoints", SP_Zone, DIR_Server,
+ "zonePointsStruct", SZC_None,
+ m_zoneMgr, SLOT(zonePoints(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_DzSwitchInfo", SP_Zone, DIR_Server,
+ "dzSwitchInfo", SZC_None,
+ m_zoneMgr, SLOT(dynamicZonePoints(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_DzInfo", SP_Zone, DIR_Server,
+ "dzInfo", SZC_Match,
+ m_zoneMgr, SLOT(dynamicZoneInfo(const uint8_t*, size_t, uint8_t)));
+ }
+
+ if (m_groupMgr != 0)
+ {
+ connect(m_zoneMgr, SIGNAL(playerProfile(const charProfileStruct*)),
+ m_groupMgr, SLOT(player(const charProfileStruct*)));
+ m_packet->connect2("OP_GroupUpdate", SP_Zone, DIR_Server,
+ "uint8_t", SZC_None,
+ m_groupMgr, SLOT(groupUpdate(const uint8_t*, size_t)));
+ m_packet->connect2("OP_GroupFollow", SP_Zone, DIR_Server,
+ "groupFollowStruct", SZC_Match,
+ m_groupMgr, SLOT(addGroupMember(const uint8_t*)));
+ m_packet->connect2("OP_GroupDisband", SP_Zone, DIR_Server,
+ "groupDisbandStruct", SZC_Match,
+ m_groupMgr, SLOT(removeGroupMember(const uint8_t*)));
+ m_packet->connect2("OP_GroupDisband2", SP_Zone, DIR_Server,
+ "groupDisbandStruct", SZC_Match,
+ m_groupMgr, SLOT(removeGroupMember(const uint8_t*)));
+ // connect GroupMgr slots to SpawnShell signals
+ connect(m_spawnShell, SIGNAL(addItem(const Item*)),
+ m_groupMgr, SLOT(addItem(const Item*)));
+ // connect GroupMgr slots to SpawnShell signals
+ connect(m_spawnShell, SIGNAL(delItem(const Item*)),
+ m_groupMgr, SLOT(delItem(const Item*)));
+ // connect GroupMgr slots to SpawnShell signals
+ connect(m_spawnShell, SIGNAL(killSpawn(const Item*, const Item*, uint16_t)),
+ m_groupMgr, SLOT(killSpawn(const Item*)));
+ }
+
+ if (m_dateTimeMgr)
+ {
+ // connect DateTimeMgr slots to EQPacket signals
+ m_packet->connect2("OP_TimeOfDay", SP_Zone, DIR_Server,
+ "timeOfDayStruct", SZC_Match,
+ m_dateTimeMgr, SLOT(timeOfDay(const uint8_t*)));
+
+ // connect interface slots to DateTimeMgr signals
+ connect(m_dateTimeMgr, SIGNAL(updatedDateTime(const QDateTime&)),
+ this, SLOT(updatedDateTime(const QDateTime&)));
+
+ connect(m_dateTimeMgr, SIGNAL(syncDateTime(const QDateTime&)),
+ this, SLOT(syncDateTime(const QDateTime&)));
+ }
+
+ if (m_filterMgr)
+ {
+ connect(m_zoneMgr, SIGNAL(zoneBegin(const QString&)),
+ m_filterMgr, SLOT(loadZone(const QString&)));
+ connect(m_zoneMgr, SIGNAL(zoneEnd(const QString&, const QString&)),
+ m_filterMgr, SLOT(loadZone(const QString&)));
+ connect(m_zoneMgr, SIGNAL(zoneChanged(const QString&)),
+ m_filterMgr, SLOT(loadZone(const QString&)));
+ }
+
+ if (m_guildmgr)
+ {
+ /*
+ m_packet->connect2("OP_GuildList", SP_World, DIR_Server,
+ "worldGuildListStruct", SZC_None,
+ m_guildmgr,
+ SLOT(worldGuildList(const uint8_t*, size_t)));
+ */
+
+ m_packet->connect2("OP_GuildsInZoneList", SP_Zone, DIR_Server,
+ "guildsInZoneListStruct", SZC_None, m_guildmgr,
+ SLOT(guildsInZoneList(const uint8_t*, size_t)));
+
+ m_packet->connect2("OP_NewGuildInZone", SP_Zone, DIR_Server,
+ "newGuildInZoneStruct", SZC_None, m_guildmgr,
+ SLOT(newGuildInZone(const uint8_t*, size_t)));
+
+ connect(this, SIGNAL(guildList2text(QString)),
+ m_guildmgr, SLOT(guildList2text(QString)));
+
+ }
+
+ if (m_guildShell)
+ {
+ m_packet->connect2("OP_GuildMemberList", SP_Zone, DIR_Server,
+ "uint8_t", SZC_None,
+ m_guildShell,
+ SLOT(guildMemberList(const uint8_t*, size_t)));
+ m_packet->connect2("OP_GuildMemberUpdate", SP_Zone, DIR_Server,
+ "GuildMemberUpdate", SZC_Match,
+ m_guildShell,
+ SLOT(guildMemberUpdate(const uint8_t*, size_t)));
+ }
+
+ if (m_messageShell)
+ {
+ m_packet->connect2("OP_CommonMessage", SP_Zone, DIR_Client|DIR_Server,
+ "channelMessageStruct", SZC_None,
+ m_messageShell,
+ SLOT(channelMessage(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_FormattedMessage", SP_Zone, DIR_Server,
+ "formattedMessageStruct", SZC_None,
+ m_messageShell,
+ SLOT(formattedMessage(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_SimpleMessage", SP_Zone, DIR_Server,
+ "simpleMessageStruct", SZC_Match,
+ m_messageShell,
+ SLOT(simpleMessage(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_SpecialMesg", SP_Zone, DIR_Server,
+ "specialMessageStruct", SZC_None,
+ m_messageShell,
+ SLOT(specialMessage(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_GuildMOTD", SP_Zone, DIR_Server,
+ "guildMOTDStruct", SZC_None,
+ m_messageShell,
+ SLOT(guildMOTD(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_RandomReq", SP_Zone, DIR_Client,
+ "randomReqStruct", SZC_Match,
+ m_messageShell, SLOT(randomRequest(const uint8_t*)));
+ m_packet->connect2("OP_RandomReply", SP_Zone, DIR_Server,
+ "randomStruct", SZC_Match,
+ m_messageShell, SLOT(random(const uint8_t*)));
+ m_packet->connect2("OP_ConsentResponse", SP_Zone, DIR_Server,
+ "consentResponseStruct", SZC_Match,
+ m_messageShell, SLOT(consent(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_DenyResponse", SP_Zone, DIR_Server,
+ "consentResponseStruct", SZC_Match,
+ m_messageShell, SLOT(consent(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_Emote", SP_Zone, DIR_Server|DIR_Client,
+ "emoteTextStruct", SZC_None,
+ m_messageShell, SLOT(emoteText(const uint8_t*)));
+ m_packet->connect2("OP_InspectAnswer", SP_Zone, DIR_Server,
+ "inspectDataStruct", SZC_Match,
+ m_messageShell, SLOT(inspectData(const uint8_t*)));
+ m_packet->connect2("OP_MoneyOnCorpse", SP_Zone, DIR_Server,
+ "moneyOnCorpseStruct", SZC_Match,
+ m_messageShell, SLOT(moneyOnCorpse(const uint8_t*)));
+ m_packet->connect2("OP_Logout", SP_Zone, DIR_Server,
+ "none", SZC_Match,
+ m_messageShell, SLOT(logOut(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_NewZone", SP_Zone, DIR_Server,
+ "uint8_t", SZC_None,
+ m_messageShell, SLOT(zoneNew(const uint8_t*, size_t, uint8_t)));
+ connect(m_zoneMgr, SIGNAL(zoneBegin(const ClientZoneEntryStruct*, size_t, uint8_t)),
+ m_messageShell, SLOT(zoneEntryClient(const ClientZoneEntryStruct*)));
+ connect(m_zoneMgr, SIGNAL(zoneChanged(const zoneChangeStruct*, size_t, uint8_t)),
+ m_messageShell, SLOT(zoneChanged(const zoneChangeStruct*, size_t, uint8_t)));
+ connect(m_zoneMgr, SIGNAL(zoneBegin(const QString&)),
+ m_messageShell, SLOT(zoneBegin(const QString&)));
+ connect(m_zoneMgr, SIGNAL(zoneEnd(const QString&, const QString&)),
+ m_messageShell, SLOT(zoneEnd(const QString&, const QString&)));
+ connect(m_zoneMgr, SIGNAL(zoneChanged(const QString&)),
+ m_messageShell, SLOT(zoneChanged(const QString&)));
+
+ m_packet->connect2("OP_MOTD", SP_World, DIR_Server,
+ "worldMOTDStruct", SZC_None,
+ m_messageShell, SLOT(worldMOTD(const uint8_t*)));
+ m_packet->connect2("OP_MemorizeSpell", SP_Zone, DIR_Server|DIR_Client,
+ "memSpellStruct", SZC_Match,
+ m_messageShell, SLOT(handleSpell(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_BeginCast", SP_Zone, DIR_Server|DIR_Client,
+ "beginCastStruct", SZC_Match,
+ m_messageShell, SLOT(beginCast(const uint8_t*)));
+ m_packet->connect2("OP_BuffFadeMsg", SP_Zone, DIR_Server|DIR_Client,
+ "spellFadedStruct", SZC_None,
+ m_messageShell, SLOT(spellFaded(const uint8_t*)));
+ m_packet->connect2("OP_CastSpell", SP_Zone, DIR_Server|DIR_Client,
+ "startCastStruct", SZC_Match,
+ m_messageShell, SLOT(startCast(const uint8_t*)));
+ connect(m_zoneMgr, SIGNAL(playerProfile(const charProfileStruct*)),
+ m_messageShell, SLOT(player(const charProfileStruct*)));
+ m_packet->connect2("OP_SkillUpdate", SP_Zone, DIR_Server,
+ "skillIncStruct", SZC_Match,
+ m_messageShell, SLOT(increaseSkill(const uint8_t*)));
+ m_packet->connect2("OP_LevelUpdate", SP_Zone, DIR_Server,
+ "levelUpUpdateStruct", SZC_Match,
+ m_messageShell, SLOT(updateLevel(const uint8_t*)));
+
+ m_packet->connect2("OP_Consider", SP_Zone, DIR_Server,
+ "considerStruct", SZC_Match,
+ m_messageShell, SLOT(consMessage(const uint8_t*, size_t, uint8_t)));
+
+ connect(m_player, SIGNAL(setExp(uint32_t, uint32_t, uint32_t, uint32_t,
+ uint32_t)),
+ m_messageShell, SLOT(setExp(uint32_t, uint32_t, uint32_t,
+ uint32_t, uint32_t)));
+ connect(m_player, SIGNAL(newExp(uint32_t, uint32_t, uint32_t, uint32_t,
+ uint32_t, uint32_t)),
+ m_messageShell, SLOT(newExp(uint32_t, uint32_t, uint32_t,
+ uint32_t, uint32_t, uint32_t)));
+ connect(m_player, SIGNAL(setAltExp(uint32_t, uint32_t, uint32_t, uint32_t)),
+ m_messageShell, SLOT(setAltExp(uint32_t, uint32_t, uint32_t, uint32_t)));
+ connect(m_player, SIGNAL(newAltExp(uint32_t, uint32_t, uint32_t, uint32_t,
+ uint32_t, uint32_t)),
+ m_messageShell, SLOT(newAltExp(uint32_t, uint32_t, uint32_t, uint32_t,
+ uint32_t, uint32_t)));
+
+ connect(m_spawnShell, SIGNAL(addItem(const Item*)),
+ m_messageShell, SLOT(addItem(const Item*)));
+ connect(m_spawnShell, SIGNAL(delItem(const Item*)),
+ m_messageShell, SLOT(delItem(const Item*)));
+ connect(m_spawnShell, SIGNAL(killSpawn(const Item*, const Item*, uint16_t)),
+ m_messageShell, SLOT(killSpawn(const Item*)));
+
+ connect(m_dateTimeMgr, SIGNAL(syncDateTime(const QDateTime&)),
+ m_messageShell, SLOT(syncDateTime(const QDateTime&)));
+
+// 9/3/2008 - Removed. Serialized packet now.
+// m_packet->connect2("OP_GroupUpdate", SP_Zone, DIR_Server,
+// "groupUpdateStruct", SZC_None,
+// m_messageShell, SLOT(groupUpdate(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_GroupInvite", SP_Zone, DIR_Client|DIR_Server,
+ "groupInviteStruct", SZC_None,
+ m_messageShell, SLOT(groupInvite(const uint8_t*, size_t, uint8_t)));
+// m_packet->connect2("OP_GroupInvite", SP_Zone, DIR_Server,
+// "groupAltInviteStruct", SZC_Match,
+// m_messageShell, SLOT(groupInvite(const uint8_t*)));
+ m_packet->connect2("OP_GroupInvite2", SP_Zone, DIR_Client,
+ "groupInviteStruct", SZC_None,
+ m_messageShell, SLOT(groupInvite(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_GroupFollow", SP_Zone, DIR_Server,
+ "groupFollowStruct", SZC_Match,
+ m_messageShell, SLOT(groupFollow(const uint8_t*)));
+ m_packet->connect2("OP_GroupFollow2", SP_Zone, DIR_Server,
+ "groupFollowStruct", SZC_Match,
+ m_messageShell, SLOT(groupFollow(const uint8_t*)));
+ m_packet->connect2("OP_GroupDisband", SP_Zone, DIR_Server,
+ "groupDisbandStruct", SZC_Match,
+ m_messageShell, SLOT(groupDisband(const uint8_t*)));
+ m_packet->connect2("OP_GroupDisband2", SP_Zone, DIR_Server,
+ "groupDisbandStruct", SZC_Match,
+ m_messageShell, SLOT(groupDisband(const uint8_t*)));
+ m_packet->connect2("OP_GroupCancelInvite", SP_Zone, DIR_Server|DIR_Client,
+ "groupDeclineStruct", SZC_Match,
+ m_messageShell, SLOT(groupDecline(const uint8_t*)));
+ m_packet->connect2("OP_GroupLeader", SP_Zone, DIR_Server,
+ "groupLeaderChangeStruct", SZC_Match,
+ m_messageShell, SLOT(groupLeaderChange(const uint8_t*)));
+ }
+
+ if (m_filterNotifications)
+ {
+ connect(m_spawnShell, SIGNAL(addItem(const Item*)),
+ m_filterNotifications, SLOT(addItem(const Item*)));
+ connect(m_spawnShell, SIGNAL(delItem(const Item*)),
+ m_filterNotifications, SLOT(delItem(const Item*)));
+ connect(m_spawnShell, SIGNAL(killSpawn(const Item*, const Item*, uint16_t)),
+ m_filterNotifications, SLOT(killSpawn(const Item*)));
+ connect(m_spawnShell, SIGNAL(changeItem(const Item*, uint32_t)),
+ m_filterNotifications,
+ SLOT(changeItem(const Item*, uint32_t)));
+ }
+
+ // connect interface slots to Packet signals
+ m_packet->connect2("OP_TargetMouse", SP_Zone, DIR_Client|DIR_Server,
+ "clientTargetStruct", SZC_Match,
+ this, SLOT(clientTarget(const uint8_t*)));
+#if 0 // ZBTEMP
+ connect(m_packet, SIGNAL(attack2Hand1(const uint8_t*, size_t, uint8_t)),
+ this, SLOT(attack2Hand1(const uint8_t*)));
+#endif
+ m_packet->connect2("OP_Action2", SP_Zone, DIR_Client|DIR_Server,
+ "action2Struct", SZC_Match,
+ this, SLOT(action2Message(const uint8_t*)));
+ m_packet->connect2("OP_Death", SP_Zone, DIR_Server,
+ "newCorpseStruct", SZC_Match,
+ this, SLOT(combatKillSpawn(const uint8_t*)));
+#if 0 // ZBTEMP
+ connect(m_packet, SIGNAL(interruptSpellCast(const uint8_t*, size_t, uint8_t)),
+ this, SLOT(interruptSpellCast(const uint8_t*)));
+ connect(m_packet, SIGNAL(moneyUpdate(const uint8_t*, size_t, uint8_t)),
+ this, SLOT(moneyUpdate(const uint8_t*)));
+ connect(m_packet, SIGNAL(moneyThing(const uint8_t*, size_t, uint8_t)),
+ this, SLOT(moneyThing(const uint8_t*)));
+#endif // ZBTEMP
+
+ connect(m_packet, SIGNAL(toggle_session_tracking(bool)),
+ this, SLOT(toggle_net_session_tracking(bool)));
+
+ // connect EQInterface slots to ZoneMgr signals
+ connect(m_zoneMgr, SIGNAL(zoneBegin(const QString&)),
+ this, SLOT(zoneBegin(const QString&)));
+ connect(m_zoneMgr, SIGNAL(zoneEnd(const QString&, const QString&)),
+ this, SLOT(zoneEnd(const QString&, const QString&)));
+ connect(m_zoneMgr, SIGNAL(zoneChanged(const QString&)),
+ this, SLOT(zoneChanged(const QString&)));
+
+ // connect the SpellShell slots to EQInterface signals
+ connect(this, SIGNAL(spellMessage(QString&)),
+ m_spellShell, SLOT(spellMessage(QString&)));
+
+ // connect EQInterface slots to SpawnShell signals
+ connect(m_spawnShell, SIGNAL(addItem(const Item*)),
+ this, SLOT(addItem(const Item*)));
+ connect(m_spawnShell, SIGNAL(delItem(const Item*)),
+ this, SLOT(delItem(const Item*)));
+ connect(m_spawnShell, SIGNAL(killSpawn(const Item*, const Item*, uint16_t)),
+ this, SLOT(killSpawn(const Item*)));
+ connect(m_spawnShell, SIGNAL(changeItem(const Item*, uint32_t)),
+ this, SLOT(changeItem(const Item*)));
+ connect(m_spawnShell, SIGNAL(spawnConsidered(const Item*)),
+ this, SLOT(spawnConsidered(const Item*)));
+
+ // connect the SpawnShell slots to Packet signals
+ m_packet->connect2("OP_GroundSpawn", SP_Zone, DIR_Server,
+ "makeDropStruct", SZC_None,
+ m_spawnShell, SLOT(newGroundItem(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_ClickObject", SP_Zone, DIR_Server,
+ "remDropStruct", SZC_Match,
+ m_spawnShell, SLOT(removeGroundItem(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_SpawnDoor", SP_Zone, DIR_Server,
+ "doorStruct", SZC_Modulus,
+ m_spawnShell, SLOT(newDoorSpawns(const uint8_t*, size_t, uint8_t)));
+// OP_NewSpawn is deprecated in the client
+// m_packet->connect2("OP_NewSpawn", SP_Zone, DIR_Server,
+// "spawnStruct", SZC_Match,
+// m_spawnShell, SLOT(newSpawn(const uint8_t*)));
+ m_packet->connect2("OP_ZoneEntry", SP_Zone, DIR_Server,
+ "uint8_t", SZC_None,
+ m_spawnShell, SLOT(zoneEntry(const uint8_t*, size_t)));
+ m_packet->connect2("OP_MobUpdate", SP_Zone, DIR_Server|DIR_Client,
+ "spawnPositionUpdate", SZC_Match,
+ m_spawnShell, SLOT(updateSpawns(const uint8_t*)));
+ m_packet->connect2("OP_WearChange", SP_Zone, DIR_Server|DIR_Client,
+ "SpawnUpdateStruct", SZC_Match,
+ m_spawnShell, SLOT(updateSpawnInfo(const uint8_t*)));
+ m_packet->connect2("OP_HPUpdate", SP_Zone, DIR_Server|DIR_Client,
+ "hpNpcUpdateStruct", SZC_Match,
+ m_spawnShell, SLOT(updateNpcHP(const uint8_t*)));
+ m_packet->connect2("OP_DeleteSpawn", SP_Zone, DIR_Server|DIR_Client,
+ "deleteSpawnStruct", SZC_Match,
+ m_spawnShell, SLOT(deleteSpawn(const uint8_t*)));
+ m_packet->connect2("OP_SpawnRename", SP_Zone, DIR_Server,
+ "spawnRenameStruct", SZC_Match,
+ m_spawnShell, SLOT(renameSpawn(const uint8_t*)));
+ m_packet->connect2("OP_Illusion", SP_Zone, DIR_Server|DIR_Client,
+ "spawnIllusionStruct", SZC_Match,
+ m_spawnShell, SLOT(illusionSpawn(const uint8_t*)));
+ m_packet->connect2("OP_SpawnAppearance", SP_Zone, DIR_Server|DIR_Client,
+ "spawnAppearanceStruct", SZC_Match,
+ m_spawnShell, SLOT(updateSpawnAppearance(const uint8_t*)));
+ m_packet->connect2("OP_Death", SP_Zone, DIR_Server,
+ "newCorpseStruct", SZC_Match,
+ m_spawnShell, SLOT(killSpawn(const uint8_t*)));
+// m_packet->connect2("OP_RespawnFromHover", SP_Zone, DIR_Server|DIR_Client,
+// "uint8_t", SZC_None,
+// m_spawnShell, SLOT(respawnFromHover(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_Shroud", SP_Zone, DIR_Server,
+ "spawnShroudSelf", SZC_None,
+ m_spawnShell, SLOT(shroudSpawn(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_RemoveSpawn", SP_Zone, DIR_Server|DIR_Client,
+ "removeSpawnStruct", SZC_None,
+ m_spawnShell, SLOT(removeSpawn(const uint8_t*, size_t, uint8_t)));
+#if 0 // ZBTEMP
+ connect(m_packet, SIGNAL(spawnWearingUpdate(const uint8_t*, size_t, uint8_t)),
+ m_spawnShell, SLOT(spawnWearingUpdate(const uint8_t*)));
+#endif
+ m_packet->connect2("OP_Consider", SP_Zone, DIR_Server|DIR_Client,
+ "considerStruct", SZC_Match,
+ m_spawnShell, SLOT(consMessage(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_NpcMoveUpdate", SP_Zone, DIR_Server,
+ "uint8_t", SZC_None,
+ m_spawnShell, SLOT(npcMoveUpdate(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_ClientUpdate", SP_Zone, DIR_Server,
+ "playerSpawnPosStruct", SZC_Match,
+ m_spawnShell, SLOT(playerUpdate(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_CorpseLocResponse", SP_Zone, DIR_Server,
+ "corpseLocStruct", SZC_Match,
+ m_spawnShell, SLOT(corpseLoc(const uint8_t*)));
+#if 0 // No longer used as of 5-22-2008
+ m_packet->connect2("OP_ZoneSpawns", SP_Zone, DIR_Server,
+ "spawnStruct", SZC_None,
+ m_spawnShell, SLOT(zoneSpawns(const uint8_t*, size_t)));
+#endif
+
+ // connect the SpellShell slots to ZoneMgr signals
+ connect(m_zoneMgr, SIGNAL(zoneChanged(const QString&)),
+ m_spellShell, SLOT(zoneChanged()));
+
+ // connect the SpellShell slots to SpawnShell signals
+ connect(m_spawnShell, SIGNAL(killSpawn(const Item*, const Item*, uint16_t)),
+ m_spellShell, SLOT(killSpawn(const Item*)));
+
+ // connect the SpellShell slots to Player signals
+ connect(m_player, SIGNAL(newPlayer(void)),
+ m_spellShell, SLOT(clear()));
+ connect(m_player, SIGNAL(buffLoad(const spellBuff *)),
+ m_spellShell, SLOT(buffLoad(const spellBuff *)));
+
+ // connect the SpellShell slots to EQPacket signals
+ m_packet->connect2("OP_CastSpell", SP_Zone, DIR_Server|DIR_Client,
+ "startCastStruct", SZC_Match,
+ m_spellShell, SLOT(selfStartSpellCast(const uint8_t*)));
+ m_packet->connect2("OP_Buff", SP_Zone, DIR_Server|DIR_Client,
+ "buffStruct", SZC_Match,
+ m_spellShell, SLOT(buff(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_Action", SP_Zone, DIR_Server|DIR_Client,
+ "actionStruct", SZC_Match,
+ m_spellShell, SLOT(action(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_Action", SP_Zone, DIR_Server|DIR_Client,
+ "actionAltStruct", SZC_Match,
+ m_spellShell, SLOT(action(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_SimpleMessage", SP_Zone, DIR_Server,
+ "simpleMessageStruct", SZC_Match,
+ m_spellShell,
+ SLOT(simpleMessage(const uint8_t*, size_t, uint8_t)));
+
+
+ // connect Player slots to EQPacket signals
+ connect(m_zoneMgr, SIGNAL(playerProfile(const charProfileStruct*)),
+ m_player, SLOT(player(const charProfileStruct*)));
+ m_packet->connect2("OP_SkillUpdate", SP_Zone, DIR_Server,
+ "skillIncStruct", SZC_Match,
+ m_player, SLOT(increaseSkill(const uint8_t*)));
+ m_packet->connect2("OP_ManaChange", SP_Zone, DIR_Server,
+ "manaDecrementStruct", SZC_Match,
+ m_player, SLOT(manaChange(const uint8_t*)));
+ m_packet->connect2("OP_ClientUpdate", SP_Zone, DIR_Server|DIR_Client,
+ "playerSelfPosStruct", SZC_Match,
+ m_player, SLOT(playerUpdateSelf(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_ExpUpdate", SP_Zone, DIR_Server,
+ "expUpdateStruct", SZC_Match,
+ m_player, SLOT(updateExp(const uint8_t*)));
+ m_packet->connect2("OP_AAExpUpdate", SP_Zone, DIR_Server,
+ "altExpUpdateStruct", SZC_Match,
+ m_player, SLOT(updateAltExp(const uint8_t*)));
+ m_packet->connect2("OP_LevelUpdate", SP_Zone, DIR_Server,
+ "levelUpUpdateStruct", SZC_Match,
+ m_player, SLOT(updateLevel(const uint8_t*)));
+ m_packet->connect2("OP_HPUpdate", SP_Zone, DIR_Server|DIR_Client,
+ "hpNpcUpdateStruct", SZC_Match,
+ m_player, SLOT(updateNpcHP(const uint8_t*)));
+ m_packet->connect2("OP_WearChange", SP_Zone, DIR_Server|DIR_Client,
+ "SpawnUpdateStruct", SZC_Match,
+ m_player, SLOT(updateSpawnInfo(const uint8_t*)));
+ m_packet->connect2("OP_Stamina", SP_Zone, DIR_Server,
+ "staminaStruct", SZC_Match,
+ m_player, SLOT(updateStamina(const uint8_t*)));
+ m_packet->connect2("OP_Consider", SP_Zone, DIR_Server|DIR_Client,
+ "considerStruct", SZC_Match,
+ m_player, SLOT(consMessage(const uint8_t*, size_t, uint8_t)));
+ m_packet->connect2("OP_SwapSpell", SP_Zone, DIR_Server,
+ "tradeSpellBookSlotsStruct", SZC_Match,
+ m_player, SLOT(tradeSpellBookSlots(const uint8_t*, size_t, uint8_t)));
+
+ // interface statusbar slots
+ connect (this, SIGNAL(newZoneName(const QString&)),
+ m_stsbarZone, SLOT(setText(const QString&)));
+ connect (m_packet, SIGNAL(stsMessage(const QString &, int)),
+ this, SLOT(stsMessage(const QString &, int)));
+ connect (m_spawnShell, SIGNAL(numSpawns(int)),
+ this, SLOT(numSpawns(int)));
+ connect (m_packet, SIGNAL(numPacket(int, int)),
+ this, SLOT(numPacket(int, int)));
+ connect (m_packet, SIGNAL(resetPacket(int, int)),
+ this, SLOT(resetPacket(int, 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,
+ uint32_t, uint32_t)));
+ connect(m_player, SIGNAL(newExp(uint32_t, uint32_t, uint32_t, uint32_t,
+ uint32_t, uint32_t)),
+ this, SLOT(newExp(uint32_t, uint32_t, uint32_t,
+ uint32_t, uint32_t, uint32_t)));
+ connect(m_player, SIGNAL(setAltExp(uint32_t, uint32_t, uint32_t, uint32_t)),
+ this, SLOT(setAltExp(uint32_t, uint32_t, uint32_t, uint32_t)));
+ connect(m_player, SIGNAL(newAltExp(uint32_t, uint32_t, uint32_t, uint32_t,
+ uint32_t, uint32_t)),
+ this, SLOT(newAltExp(uint32_t, uint32_t, uint32_t, uint32_t,
+ uint32_t, uint32_t)));
+ connect(m_player, SIGNAL(levelChanged(uint8_t)),
+ this, SLOT(levelChanged(uint8_t)));
+
+
+ if (m_expWindow != 0)
+ {
+ // connect ExperienceWindow slots to Player signals
+ connect(m_player, SIGNAL(newPlayer(void)),
+ m_expWindow, SLOT(clear(void)));
+ connect(m_player, SIGNAL(expGained(const QString &, int, long, QString )),
+ m_expWindow, SLOT(addExpRecord(const QString &, int, long,QString )));
+
+ // connect ExperienceWindow slots to EQInterface signals
+ connect(this, SIGNAL(restoreFonts(void)),
+ m_expWindow, SLOT(restoreFont(void)));
+ connect(this, SIGNAL(saveAllPrefs(void)),
+ m_expWindow, SLOT(savePrefs(void)));
+ }
+
+ if (m_combatWindow != 0)
+ {
+ // connect CombatWindow slots to the signals
+ connect(m_player, SIGNAL(newPlayer(void)),
+ m_combatWindow, SLOT(clear(void)));
+ connect (this, SIGNAL(combatSignal(int, int, int, int, int, QString, QString)),
+ m_combatWindow, SLOT(addCombatRecord(int, int, int, int, int, QString, QString)));
+ connect (m_spawnShell, SIGNAL(spawnConsidered(const Item*)),
+ m_combatWindow, SLOT(resetDPS()));
+ connect(this, SIGNAL(restoreFonts(void)),
+ m_combatWindow, SLOT(restoreFont(void)));
+ connect(this, SIGNAL(saveAllPrefs(void)),
+ m_combatWindow, SLOT(savePrefs(void)));
+ }
+
+
+ //
+ // Geometry Configuration
+ //
+
+
+ // interface components
+
+ // set mainwindow Geometry
+ section = "Interface";
+
+ // The way window/dock state was saved with Qt3 won't work with Qt4+, so
+ // we use the Qt-provided functions instead. Unforunately, that means the
+ // size/position preferences saved in the Qt3 version won't be usable, and
+ // the users will have to redo their window/dock size/placement.
+ QString dockPrefsState = pSEQPrefs->getPrefString("DockingInfoState",
+ section, QString());
+ QString dockPrefsGeometry = pSEQPrefs->getPrefString("DockingInfoGeometry",
+ section, QString());
+
+ bool usePos = pSEQPrefs->getPrefBool("UseWindowPos", section, true);
+ if (usePos)
+ {
+ if (!restoreGeometry(QByteArray::fromBase64(dockPrefsGeometry.toLatin1())))
+ seqWarn("Could not restore dock/window geometry. Rearrange windows "
+ "as desired and then re-save preferences");
+ else
+ // work around QTBUG-46620
+ if (isMaximized())
+ setGeometry(QApplication::desktop()->availableGeometry(this));
+
+ if (!restoreState(QByteArray::fromBase64(dockPrefsState.toLatin1())))
+ seqWarn("Could not restore dock/window state. Rearrange windows as"
+ " desired and then re-save prefrences");
+ }
+
+ new QShortcut(Qt::CTRL|Qt::ALT|Qt::Key_S, this, SLOT(toggle_view_statusbar()));
+ new QShortcut(Qt::CTRL|Qt::ALT|Qt::Key_T, this, SLOT(toggle_view_menubar()));
+
+ // Set main window title
+ // TODO: Add % replacement values and a signal to update, for ip address currently
+ // TODO: being monitored.
+
+ QMainWindow::setWindowTitle(pSEQPrefs->getPrefString("Caption", section,
+ "ShowEQ - Main (ctrl+alt+t to toggle menubar)"));
+
+ show();
+
+
+ // load the format strings for display
+ loadFormatStrings();
+
+ /* Start the packet capturing */
+ m_packet->start (10);
+}// end constructor
+////////////////////
+
+EQInterface::~EQInterface()
+{
+ if (m_netDiag != 0)
+ delete m_netDiag;
+
+ if (m_spawnPointList != 0)
+ delete m_spawnPointList;
+
+ if (m_statList != 0)
+ delete m_statList;
+
+ if (m_guildListWindow != 0)
+ delete m_guildListWindow;
+
+ if (m_skillList != 0)
+ delete m_skillList;
+
+ if (m_spellList != 0)
+ delete m_spellList;
+
+ if (m_spawnList2 != 0)
+ delete m_spawnList2;
+
+ if (m_spawnList != 0)
+ delete m_spawnList;
+
+ for (int i = 0; i < maxNumMaps; i++)
+ if (m_map[i] != 0)
+ delete m_map[i];
+
+ for (int i = 0; i < maxNumMessageWindows; i++)
+ if (m_messageWindow[i] != 0)
+ delete m_messageWindow[i];
+
+ if (m_combatWindow != 0)
+ delete m_combatWindow;
+
+ if (m_expWindow != 0)
+ delete m_expWindow;
+
+ if (m_spawnLogger != 0)
+ delete m_spawnLogger;
+
+ if (m_spawnMonitor != 0)
+ delete m_spawnMonitor;
+
+ if (m_groupMgr != 0)
+ delete m_groupMgr;
+
+ if (m_spellShell != 0)
+ delete m_spellShell;
+
+ if (m_spells != 0)
+ delete m_spells;
+
+ if (m_mapMgr != 0)
+ delete m_mapMgr;
+
+ if (m_spawnShell != 0)
+ delete m_spawnShell;
+
+ if (m_categoryMgr != 0)
+ delete m_categoryMgr;
+
+ if (m_filterMgr != 0)
+ delete m_filterMgr;
+
+ if (m_dateTimeMgr != 0)
+ delete m_dateTimeMgr;
+
+ if (m_eqStrings != 0)
+ delete m_eqStrings;
+
+ if (m_player != 0)
+ delete m_player;
+
+ if (m_guildShell != 0)
+ delete m_guildShell;
+
+ if (m_guildmgr != 0)
+ delete m_guildmgr;
+
+ if (m_zoneMgr != 0)
+ delete m_zoneMgr;
+
+ if (m_packet != 0)
+ delete m_packet;
+}
+
+void EQInterface::createFileMenu() {
+
// File Menu
QMenu* pFileMenu = new QMenu("&File");
menuBar()->addMenu(pFileMenu);
pFileMenu->addAction("&Save Preferences", this, SLOT(savePrefs()),
- Qt::CTRL+Qt::Key_S);
+ Qt::CTRL|Qt::Key_S);
pFileMenu->addAction("Open &Map", m_mapMgr, SLOT(loadMap()), Qt::Key_F1);
pFileMenu->addAction("&Import &Map", m_mapMgr, SLOT(importMap()));
pFileMenu->addAction("Sa&ve Map", m_mapMgr, SLOT(saveMap()), Qt::Key_F2);
@@ -549,15 +1246,15 @@
pFileMenu->addAction("Reload Guilds File", m_guildmgr, SLOT(readGuildList()));
pFileMenu->addAction("Save Guilds File", m_guildmgr, SLOT(writeGuildList()));
pFileMenu->addAction("Add Spawn Category", this, SLOT(addCategory()),
- Qt::ALT+Qt::Key_C);
+ Qt::ALT|Qt::Key_C);
pFileMenu->addAction("Rebuild SpawnList", this, SLOT(rebuildSpawnList()),
- Qt::ALT+Qt::Key_R);
+ Qt::ALT|Qt::Key_R);
pFileMenu->addAction("Reload Categories", this, SLOT(reloadCategories()),
- Qt::CTRL+Qt::Key_R);
+ Qt::CTRL|Qt::Key_R);
pFileMenu->addAction("Select Next", this, SLOT(selectNext()),
- Qt::CTRL+Qt::Key_Right);
+ Qt::CTRL|Qt::Key_Right);
pFileMenu->addAction("Select Prev", this, SLOT(selectPrev()),
- Qt::CTRL+Qt::Key_Left);
+ Qt::CTRL|Qt::Key_Left);
pFileMenu->addAction("Save Selected Spawns Path", this,
SLOT(saveSelectedSpawnPath(void)));
pFileMenu->addAction("Save NPC Spawn Paths", this, SLOT(saveSpawnPaths(void)));
@@ -564,12 +1261,17 @@
if (m_packet->playbackPackets() != PLAYBACK_OFF)
{
pFileMenu->addAction("Inc Playback Speed", m_packet, SLOT(incPlayback()),
- Qt::CTRL+Qt::Key_X);
+ Qt::CTRL|Qt::Key_X);
pFileMenu->addAction("Dec Playback Speed", m_packet, SLOT(decPlayback()),
- Qt::CTRL+Qt::Key_Z);
+ Qt::CTRL|Qt::Key_Z);
}
pFileMenu->addAction("&Quit", qApp, SLOT(quit()));
+}
+void EQInterface::createViewMenu() {
+
+ QString section = "Interface";
+
// View menu
QMenu* pViewMenu = new QMenu("&View");
menuBar()->addMenu(pViewMenu);
@@ -1003,6 +1705,11 @@
// view menu checks are set by init_view_menu
connect(pViewMenu, SIGNAL(aboutToShow()), this, SLOT(init_view_menu()));
+
+}
+
+void EQInterface::createOptionsMenu() {
+
// Options Menu
QMenu* pOptMenu = new QMenu("&Options");
menuBar()->addMenu(pOptMenu);
@@ -1056,6 +1763,7 @@
m_action_opt_PvPDeity->setCheckable(true);
m_action_opt_PvPDeity->setChecked(showeq_params->deitypvp);
+ QAction* tmpAction;
tmpAction = pOptMenu->addAction("Create Unknown Spawns", this,
SLOT(toggle_opt_CreateUnknownSpawns(bool)));
tmpAction->setCheckable(true);
@@ -1076,7 +1784,7 @@
tmpAction->setCheckable(true);
tmpAction->setChecked(showeq_params->walkpathrecord);
- subMenu = new QMenu("Walk Path Length");
+ QMenu* subMenu = new QMenu("Walk Path Length");
QSpinBox* walkPathLengthSpinBox = new QSpinBox(subMenu);
walkPathLengthSpinBox->setMinimum(0);
walkPathLengthSpinBox->setMaximum(8192);
@@ -1167,6 +1875,10 @@
m_action_opt_UseUpdateRadius->setCheckable(true);
m_action_opt_UseUpdateRadius->setChecked(showeq_params->useUpdateRadius);
+}
+
+void EQInterface::createNetworkMenu() {
+
// Network Menu
m_netMenu = new QMenu("&Network");
menuBar()->addMenu(m_netMenu);
@@ -1184,6 +1896,7 @@
m_action_net_sessiontrack->setCheckable(true);
m_action_net_sessiontrack->setChecked(m_packet->session_tracking());
+ QAction* tmpAction;
tmpAction = m_netMenu->addAction("&Real Time Thread", this,
SLOT(toggle_net_real_time_thread(bool)));
tmpAction->setCheckable(true);
@@ -1279,14 +1992,14 @@
m_netMenu->addMenu(pOpCodeMenu);
m_action_opcode_monitor = pOpCodeMenu->addAction("&OpCode Monitoring", this,
- SLOT(toggle_opcode_monitoring()), Qt::CTRL+Qt::ALT+Qt::Key_O);
+ SLOT(toggle_opcode_monitoring()), Qt::CTRL|Qt::ALT|Qt::Key_O);
m_action_opcode_monitor->setCheckable(true);
m_action_opcode_monitor->setChecked(m_opcodeMonitorLog != 0);
pOpCodeMenu->addAction("&Reload Monitored OpCode List...", this,
- SLOT(set_opcode_monitored_list()), Qt::CTRL+Qt::ALT+Qt::Key_R);
+ SLOT(set_opcode_monitored_list()), Qt::CTRL|Qt::ALT|Qt::Key_R);
- section = "OpCodeMonitoring";
+ QString section = "OpCodeMonitoring";
m_action_opcode_view = pOpCodeMenu->addAction("&View Monitored OpCode Matches",
this, SLOT(toggle_opcode_view()));
@@ -1305,7 +2018,7 @@
section = "Interface";
// Advanced menu
- subMenu = new QMenu("Advanced");
+ QMenu* subMenu = new QMenu("Advanced");
QMenu* subSubMenu = new QMenu("Arq Seq Give Up");
QSpinBox* arqSeqGiveUpSpinBox = new QSpinBox(subSubMenu);
arqSeqGiveUpSpinBox->setMinimum(32);
@@ -1320,9 +2033,14 @@
subMenu->addMenu(subSubMenu);
m_netMenu->addMenu(subMenu);
+}
+
+void EQInterface::createCharacterMenu() {
+
// Character Menu
m_charMenu = new QMenu("&Character");
menuBar()->addMenu(m_charMenu);
+ QAction* tmpAction;
tmpAction = m_charMenu->addAction("Use Auto Detected Settings", this,
SLOT(toggleAutoDetectPlayerSettings(bool)));
tmpAction->setCheckable(true);
@@ -1389,6 +2107,11 @@
connect (m_charRaceMenu, SIGNAL(triggered(QAction*)), this,
SLOT(SetDefaultCharacterRace(QAction*)));
+
+}
+
+void EQInterface::createFiltersMenu() {
+
// Filters Menu
QMenu* filterMenu = new QMenu("Fi<ers");
menuBar()->addMenu(filterMenu);
@@ -1402,9 +2125,9 @@
filterMenu->addAction("Select Fil&ter File", this, SLOT(select_filter_file()));
filterMenu->addAction("Reload &Zone Filters", m_filterMgr,
- SLOT(loadZoneFilters()), Qt::SHIFT+Qt::Key_F3);
+ SLOT(loadZoneFilters()), Qt::SHIFT|Qt::Key_F3);
filterMenu->addAction("S&ave Zone Filters", m_filterMgr,
- SLOT(saveZoneFilters()), Qt::SHIFT+Qt::Key_F4);
+ SLOT(saveZoneFilters()), Qt::SHIFT|Qt::Key_F4);
filterMenu->addAction("Edit Zone Filters", this,
SLOT(launch_filterlistwindow_zoneFilters()));
filterMenu->addAction("Edit Zone Fi<ers XML", this,
@@ -1412,6 +2135,7 @@
filterMenu->addAction("Re&filter Spawns", m_spawnShell, SLOT(refilterSpawns()));
+ QAction* tmpAction;
tmpAction = filterMenu->addAction("&Is Case Sensitive", this,
SLOT(toggle_filter_Case(bool)));
tmpAction->setCheckable(true);
@@ -1436,6 +2160,10 @@
QMenu* filterLogMenu = new QMenu("&Log");
filterMenu->addMenu(filterLogMenu);
+ uint32_t filters = 0;
+ if (m_filteredSpawnLog)
+ filters = m_filteredSpawnLog->filters();
+
tmpAction = filterLogMenu->addAction( "Alerts");
tmpAction->setCheckable(true);
tmpAction->setData(FILTER_FLAG_ALERT);
@@ -1492,6 +2220,10 @@
connect(filterCmdMenu, SIGNAL(triggered(QAction*)), this,
SLOT(set_filter_AudioCommand(QAction*)));
+}
+
+void EQInterface::createInterfaceMenu() {
+
// Interface Menu
QMenu* pInterfaceMenu = new QMenu("&Interface");
menuBar()->addMenu(pInterfaceMenu);
@@ -1514,6 +2246,7 @@
QStringList::Iterator styleItr = availableStyles.begin();
+ QAction* tmpAction;
while (styleItr != availableStyles.end()) {
tmpAction = pStyleMenu->addAction(*styleItr);
@@ -1520,7 +2253,7 @@
tmpAction->setCheckable(true);
if (currentStyleName.toLower() == (*styleItr).toLower())
- tmpAction->setChecked(true);
+ tmpAction->setChecked(true);
tmpAction->setData(*styleItr);
ActionList_StyleMenu.append(tmpAction);
@@ -1531,6 +2264,7 @@
connect (pStyleMenu, SIGNAL(triggered(QAction*)), this,
SLOT(selectTheme(QAction*)));
+ QString section = "Interface";
QString themeName = pSEQPrefs->getPrefString("ThemeName", section, "");
//Use the text name if there is one. If not, fall back to old numeric id. If no
@@ -1724,6 +2458,11 @@
pInterfaceMenu->addAction( "Spells File...", this,
SLOT(select_main_SpellsFile()));
+
+}
+
+void EQInterface::createWindowMenu() {
+
// insert Window menu
menuBar()->addMenu(m_windowMenu);
@@ -1734,6 +2473,7 @@
m_windowCaptionMenu = new QMenu("Window &Caption");
m_windowMenu->insertMenu(m_windowMenu->actions()[0], m_windowCaptionMenu);
+ QAction* tmpAction;
tmpAction = m_windowCaptionMenu->addAction("&Main Window...");
tmpAction->setData(5);
@@ -1856,29 +2596,36 @@
m_windowMenu->insertSeparator(m_windowMenu->actions()[4]);
+
+}
+
+void EQInterface::createDebugMenu() {
+
// Debug menu
QMenu* pDebugMenu = new QMenu("&Debug");
menuBar()->addMenu(pDebugMenu);
pDebugMenu->addAction("List I&nterface", this, SLOT(listInterfaceInfo()));
- pDebugMenu->addAction("List S&pawns", this, SLOT(listSpawns()), Qt::ALT+Qt::CTRL+Qt::Key_P);
- pDebugMenu->addAction("List &Drops", this, SLOT(listDrops()), Qt::ALT+Qt::CTRL+Qt::Key_D);
- pDebugMenu->addAction("List &Map Info", this, SLOT(listMapInfo()), Qt::ALT+Qt::CTRL+Qt::Key_M);
+ pDebugMenu->addAction("List S&pawns", this, SLOT(listSpawns()), Qt::ALT|Qt::CTRL|Qt::Key_P);
+ pDebugMenu->addAction("List &Drops", this, SLOT(listDrops()), Qt::ALT|Qt::CTRL|Qt::Key_D);
+ pDebugMenu->addAction("List &Map Info", this, SLOT(listMapInfo()), Qt::ALT|Qt::CTRL|Qt::Key_M);
pDebugMenu->addAction("List G&uild Info", m_guildmgr, SLOT(listGuildInfo()));
- pDebugMenu->addAction("List &Group", this, SLOT(listGroup()), Qt::ALT+Qt::CTRL+Qt::Key_G);
- pDebugMenu->addAction("List Guild M&embers", this, SLOT(listGuild()), Qt::ALT+Qt::CTRL+Qt::Key_E);
- pDebugMenu->addAction("Dump Spawns", this, SLOT(dumpSpawns()), Qt::ALT+Qt::SHIFT+Qt::CTRL+Qt::Key_P);
- pDebugMenu->addAction("Dump Drops", this, SLOT(dumpDrops()), Qt::ALT+Qt::SHIFT+Qt::CTRL+Qt::Key_D);
- pDebugMenu->addAction("Dump Map Info", this, SLOT(dumpMapInfo()), Qt::ALT+Qt::SHIFT+Qt::CTRL+Qt::Key_M);
+ pDebugMenu->addAction("List &Group", this, SLOT(listGroup()), Qt::ALT|Qt::CTRL|Qt::Key_G);
+ pDebugMenu->addAction("List Guild M&embers", this, SLOT(listGuild()), Qt::ALT|Qt::CTRL|Qt::Key_E);
+ pDebugMenu->addAction("Dump Spawns", this, SLOT(dumpSpawns()), Qt::ALT|Qt::SHIFT|Qt::CTRL|Qt::Key_P);
+ pDebugMenu->addAction("Dump Drops", this, SLOT(dumpDrops()), Qt::ALT|Qt::SHIFT|Qt::CTRL|Qt::Key_D);
+ pDebugMenu->addAction("Dump Map Info", this, SLOT(dumpMapInfo()), Qt::ALT|Qt::SHIFT|Qt::CTRL|Qt::Key_M);
pDebugMenu->addAction("Dump Guild Info", this , SLOT(dumpGuildInfo()));
pDebugMenu->addAction("Dump SpellBook Info", this , SLOT(dumpSpellBook()));
- pDebugMenu->addAction("Dump Group", this, SLOT(dumpGroup()), Qt::ALT+Qt::CTRL+Qt::SHIFT+Qt::Key_G);
- pDebugMenu->addAction("Dump Guild Members", this, SLOT(dumpGuild()), Qt::ALT+Qt::CTRL+Qt::SHIFT+Qt::Key_E);
- pDebugMenu->addAction("List &Filters", m_filterMgr, SLOT(listFilters()), Qt::ALT+Qt::CTRL+Qt::Key_F);
+ pDebugMenu->addAction("Dump Group", this, SLOT(dumpGroup()), Qt::ALT|Qt::CTRL|Qt::SHIFT|Qt::Key_G);
+ pDebugMenu->addAction("Dump Guild Members", this, SLOT(dumpGuild()), Qt::ALT|Qt::CTRL|Qt::SHIFT|Qt::Key_E);
+ pDebugMenu->addAction("List &Filters", m_filterMgr, SLOT(listFilters()), Qt::ALT|Qt::CTRL|Qt::Key_F);
pDebugMenu->addAction("List &Zone Filters", m_filterMgr, SLOT(listZoneFilters()));
-////////////////////
-// QStatusBar creation
-
+
+}
+
+void EQInterface::createStatusBar() {
+
QString statusBarSection = "Interface_StatusBar";
int sts_widget_count = 0; // total number of widgets visible on status bar
@@ -1991,691 +2738,9 @@
//hide the statusbar if no visible widgets
if (!sts_widget_count || !pSEQPrefs->getPrefBool("StatusBarActive", statusBarSection, 1))
statusBar()->hide();
+}
-/////////////////
-// interface connections
- // connect EQInterface slots to its own signals
- connect(this, SIGNAL(restoreFonts(void)),
- this, SLOT(restoreStatusFont(void)));
-
- // connect MapMgr slots to interface signals
- connect(this, SIGNAL(saveAllPrefs(void)),
- m_mapMgr, SLOT(savePrefs(void)));
-
- // connect CategoryMgr slots to interface signals
- connect(this, SIGNAL(saveAllPrefs(void)),
- m_categoryMgr, SLOT(savePrefs(void)));
-
- if (m_zoneMgr)
- {
- m_packet->connect2("OP_ZoneEntry", SP_Zone, DIR_Client,
- "ClientZoneEntryStruct", SZC_Match,
- m_zoneMgr, SLOT(zoneEntryClient(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_PlayerProfile", SP_Zone, DIR_Server,
- "uint8_t", SZC_None,
- m_zoneMgr, SLOT(zonePlayer(const uint8_t*, size_t)));
- m_packet->connect2("OP_ZoneChange", SP_Zone, DIR_Client|DIR_Server,
- "zoneChangeStruct", SZC_Match,
- m_zoneMgr, SLOT(zoneChange(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_NewZone", SP_Zone, DIR_Server,
- "uint8_t", SZC_None,
- m_zoneMgr, SLOT(zoneNew(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_SendZonePoints", SP_Zone, DIR_Server,
- "zonePointsStruct", SZC_None,
- m_zoneMgr, SLOT(zonePoints(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_DzSwitchInfo", SP_Zone, DIR_Server,
- "dzSwitchInfo", SZC_None,
- m_zoneMgr, SLOT(dynamicZonePoints(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_DzInfo", SP_Zone, DIR_Server,
- "dzInfo", SZC_Match,
- m_zoneMgr, SLOT(dynamicZoneInfo(const uint8_t*, size_t, uint8_t)));
- }
-
- if (m_groupMgr != 0)
- {
- connect(m_zoneMgr, SIGNAL(playerProfile(const charProfileStruct*)),
- m_groupMgr, SLOT(player(const charProfileStruct*)));
- m_packet->connect2("OP_GroupUpdate", SP_Zone, DIR_Server,
- "uint8_t", SZC_None,
- m_groupMgr, SLOT(groupUpdate(const uint8_t*, size_t)));
- m_packet->connect2("OP_GroupFollow", SP_Zone, DIR_Server,
- "groupFollowStruct", SZC_Match,
- m_groupMgr, SLOT(addGroupMember(const uint8_t*)));
- m_packet->connect2("OP_GroupDisband", SP_Zone, DIR_Server,
- "groupDisbandStruct", SZC_Match,
- m_groupMgr, SLOT(removeGroupMember(const uint8_t*)));
- m_packet->connect2("OP_GroupDisband2", SP_Zone, DIR_Server,
- "groupDisbandStruct", SZC_Match,
- m_groupMgr, SLOT(removeGroupMember(const uint8_t*)));
- // connect GroupMgr slots to SpawnShell signals
- connect(m_spawnShell, SIGNAL(addItem(const Item*)),
- m_groupMgr, SLOT(addItem(const Item*)));
- // connect GroupMgr slots to SpawnShell signals
- connect(m_spawnShell, SIGNAL(delItem(const Item*)),
- m_groupMgr, SLOT(delItem(const Item*)));
- // connect GroupMgr slots to SpawnShell signals
- connect(m_spawnShell, SIGNAL(killSpawn(const Item*, const Item*, uint16_t)),
- m_groupMgr, SLOT(killSpawn(const Item*)));
- }
-
- if (m_dateTimeMgr)
- {
- // connect DateTimeMgr slots to EQPacket signals
- m_packet->connect2("OP_TimeOfDay", SP_Zone, DIR_Server,
- "timeOfDayStruct", SZC_Match,
- m_dateTimeMgr, SLOT(timeOfDay(const uint8_t*)));
-
- // connect interface slots to DateTimeMgr signals
- connect(m_dateTimeMgr, SIGNAL(updatedDateTime(const QDateTime&)),
- this, SLOT(updatedDateTime(const QDateTime&)));
-
- connect(m_dateTimeMgr, SIGNAL(syncDateTime(const QDateTime&)),
- this, SLOT(syncDateTime(const QDateTime&)));
- }
-
- if (m_filterMgr)
- {
- connect(m_zoneMgr, SIGNAL(zoneBegin(const QString&)),
- m_filterMgr, SLOT(loadZone(const QString&)));
- connect(m_zoneMgr, SIGNAL(zoneEnd(const QString&, const QString&)),
- m_filterMgr, SLOT(loadZone(const QString&)));
- connect(m_zoneMgr, SIGNAL(zoneChanged(const QString&)),
- m_filterMgr, SLOT(loadZone(const QString&)));
- }
-
- if (m_guildmgr)
- {
- /*
- m_packet->connect2("OP_GuildList", SP_World, DIR_Server,
- "worldGuildListStruct", SZC_None,
- m_guildmgr,
- SLOT(worldGuildList(const uint8_t*, size_t)));
- */
-
- m_packet->connect2("OP_GuildsInZoneList", SP_Zone, DIR_Server,
- "guildsInZoneListStruct", SZC_None, m_guildmgr,
- SLOT(guildsInZoneList(const uint8_t*, size_t)));
-
- m_packet->connect2("OP_NewGuildInZone", SP_Zone, DIR_Server,
- "newGuildInZoneStruct", SZC_None, m_guildmgr,
- SLOT(newGuildInZone(const uint8_t*, size_t)));
-
- connect(this, SIGNAL(guildList2text(QString)),
- m_guildmgr, SLOT(guildList2text(QString)));
-
- }
-
- if (m_guildShell)
- {
- m_packet->connect2("OP_GuildMemberList", SP_Zone, DIR_Server,
- "uint8_t", SZC_None,
- m_guildShell,
- SLOT(guildMemberList(const uint8_t*, size_t)));
- m_packet->connect2("OP_GuildMemberUpdate", SP_Zone, DIR_Server,
- "GuildMemberUpdate", SZC_Match,
- m_guildShell,
- SLOT(guildMemberUpdate(const uint8_t*, size_t)));
- }
-
- if (m_messageShell)
- {
- m_packet->connect2("OP_CommonMessage", SP_Zone, DIR_Client|DIR_Server,
- "channelMessageStruct", SZC_None,
- m_messageShell,
- SLOT(channelMessage(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_FormattedMessage", SP_Zone, DIR_Server,
- "formattedMessageStruct", SZC_None,
- m_messageShell,
- SLOT(formattedMessage(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_SimpleMessage", SP_Zone, DIR_Server,
- "simpleMessageStruct", SZC_Match,
- m_messageShell,
- SLOT(simpleMessage(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_SpecialMesg", SP_Zone, DIR_Server,
- "specialMessageStruct", SZC_None,
- m_messageShell,
- SLOT(specialMessage(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_GuildMOTD", SP_Zone, DIR_Server,
- "guildMOTDStruct", SZC_None,
- m_messageShell,
- SLOT(guildMOTD(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_RandomReq", SP_Zone, DIR_Client,
- "randomReqStruct", SZC_Match,
- m_messageShell, SLOT(randomRequest(const uint8_t*)));
- m_packet->connect2("OP_RandomReply", SP_Zone, DIR_Server,
- "randomStruct", SZC_Match,
- m_messageShell, SLOT(random(const uint8_t*)));
- m_packet->connect2("OP_ConsentResponse", SP_Zone, DIR_Server,
- "consentResponseStruct", SZC_Match,
- m_messageShell, SLOT(consent(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_DenyResponse", SP_Zone, DIR_Server,
- "consentResponseStruct", SZC_Match,
- m_messageShell, SLOT(consent(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_Emote", SP_Zone, DIR_Server|DIR_Client,
- "emoteTextStruct", SZC_None,
- m_messageShell, SLOT(emoteText(const uint8_t*)));
- m_packet->connect2("OP_InspectAnswer", SP_Zone, DIR_Server,
- "inspectDataStruct", SZC_Match,
- m_messageShell, SLOT(inspectData(const uint8_t*)));
- m_packet->connect2("OP_MoneyOnCorpse", SP_Zone, DIR_Server,
- "moneyOnCorpseStruct", SZC_Match,
- m_messageShell, SLOT(moneyOnCorpse(const uint8_t*)));
- m_packet->connect2("OP_Logout", SP_Zone, DIR_Server,
- "none", SZC_Match,
- m_messageShell, SLOT(logOut(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_NewZone", SP_Zone, DIR_Server,
- "uint8_t", SZC_None,
- m_messageShell, SLOT(zoneNew(const uint8_t*, size_t, uint8_t)));
- connect(m_zoneMgr, SIGNAL(zoneBegin(const ClientZoneEntryStruct*, size_t, uint8_t)),
- m_messageShell, SLOT(zoneEntryClient(const ClientZoneEntryStruct*)));
- connect(m_zoneMgr, SIGNAL(zoneChanged(const zoneChangeStruct*, size_t, uint8_t)),
- m_messageShell, SLOT(zoneChanged(const zoneChangeStruct*, size_t, uint8_t)));
- connect(m_zoneMgr, SIGNAL(zoneBegin(const QString&)),
- m_messageShell, SLOT(zoneBegin(const QString&)));
- connect(m_zoneMgr, SIGNAL(zoneEnd(const QString&, const QString&)),
- m_messageShell, SLOT(zoneEnd(const QString&, const QString&)));
- connect(m_zoneMgr, SIGNAL(zoneChanged(const QString&)),
- m_messageShell, SLOT(zoneChanged(const QString&)));
-
- m_packet->connect2("OP_MOTD", SP_World, DIR_Server,
- "worldMOTDStruct", SZC_None,
- m_messageShell, SLOT(worldMOTD(const uint8_t*)));
- m_packet->connect2("OP_MemorizeSpell", SP_Zone, DIR_Server|DIR_Client,
- "memSpellStruct", SZC_Match,
- m_messageShell, SLOT(handleSpell(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_BeginCast", SP_Zone, DIR_Server|DIR_Client,
- "beginCastStruct", SZC_Match,
- m_messageShell, SLOT(beginCast(const uint8_t*)));
- m_packet->connect2("OP_BuffFadeMsg", SP_Zone, DIR_Server|DIR_Client,
- "spellFadedStruct", SZC_None,
- m_messageShell, SLOT(spellFaded(const uint8_t*)));
- m_packet->connect2("OP_CastSpell", SP_Zone, DIR_Server|DIR_Client,
- "startCastStruct", SZC_Match,
- m_messageShell, SLOT(startCast(const uint8_t*)));
- connect(m_zoneMgr, SIGNAL(playerProfile(const charProfileStruct*)),
- m_messageShell, SLOT(player(const charProfileStruct*)));
- m_packet->connect2("OP_SkillUpdate", SP_Zone, DIR_Server,
- "skillIncStruct", SZC_Match,
- m_messageShell, SLOT(increaseSkill(const uint8_t*)));
- m_packet->connect2("OP_LevelUpdate", SP_Zone, DIR_Server,
- "levelUpUpdateStruct", SZC_Match,
- m_messageShell, SLOT(updateLevel(const uint8_t*)));
-
- m_packet->connect2("OP_Consider", SP_Zone, DIR_Server,
- "considerStruct", SZC_Match,
- m_messageShell, SLOT(consMessage(const uint8_t*, size_t, uint8_t)));
-
- connect(m_player, SIGNAL(setExp(uint32_t, uint32_t, uint32_t, uint32_t,
- uint32_t)),
- m_messageShell, SLOT(setExp(uint32_t, uint32_t, uint32_t,
- uint32_t, uint32_t)));
- connect(m_player, SIGNAL(newExp(uint32_t, uint32_t, uint32_t, uint32_t,
- uint32_t, uint32_t)),
- m_messageShell, SLOT(newExp(uint32_t, uint32_t, uint32_t,
- uint32_t, uint32_t, uint32_t)));
- connect(m_player, SIGNAL(setAltExp(uint32_t, uint32_t, uint32_t, uint32_t)),
- m_messageShell, SLOT(setAltExp(uint32_t, uint32_t, uint32_t, uint32_t)));
- connect(m_player, SIGNAL(newAltExp(uint32_t, uint32_t, uint32_t, uint32_t,
- uint32_t, uint32_t)),
- m_messageShell, SLOT(newAltExp(uint32_t, uint32_t, uint32_t, uint32_t,
- uint32_t, uint32_t)));
-
- connect(m_spawnShell, SIGNAL(addItem(const Item*)),
- m_messageShell, SLOT(addItem(const Item*)));
- connect(m_spawnShell, SIGNAL(delItem(const Item*)),
- m_messageShell, SLOT(delItem(const Item*)));
- connect(m_spawnShell, SIGNAL(killSpawn(const Item*, const Item*, uint16_t)),
- m_messageShell, SLOT(killSpawn(const Item*)));
-
- connect(m_dateTimeMgr, SIGNAL(syncDateTime(const QDateTime&)),
- m_messageShell, SLOT(syncDateTime(const QDateTime&)));
-
-// 9/3/2008 - Removed. Serialized packet now.
-// m_packet->connect2("OP_GroupUpdate", SP_Zone, DIR_Server,
-// "groupUpdateStruct", SZC_None,
-// m_messageShell, SLOT(groupUpdate(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_GroupInvite", SP_Zone, DIR_Client|DIR_Server,
- "groupInviteStruct", SZC_None,
- m_messageShell, SLOT(groupInvite(const uint8_t*, size_t, uint8_t)));
-// m_packet->connect2("OP_GroupInvite", SP_Zone, DIR_Server,
-// "groupAltInviteStruct", SZC_Match,
-// m_messageShell, SLOT(groupInvite(const uint8_t*)));
- m_packet->connect2("OP_GroupInvite2", SP_Zone, DIR_Client,
- "groupInviteStruct", SZC_None,
- m_messageShell, SLOT(groupInvite(const uint8_t*, size_t, uint8_t)));
- m_packet->connect2("OP_GroupFollow", SP_Zone, DIR_Server,
- "groupFollowStruct", SZC_Match,
- m_messageShell, SLOT(groupFollow(const uint8_t*)));
- m_packet->connect2("OP_GroupFollow2", SP_Zone, DIR_Server,
- "groupFollowStruct", SZC_Match,
- m_messageShell, SLOT(groupFollow(const uint8_t*)));
- m_packet->connect2("OP_GroupDisband", SP_Zone, DIR_Server,
- "groupDisbandStruct", SZC_Match,
- m_messageShell, SLOT(groupDisband(const uint8_t*)));
- m_packet->connect2("OP_GroupDisband2", SP_Zone, DIR_Server,
- "groupDisbandStruct", SZC_Match,
- m_messageShell, SLOT(groupDisband(const uint8_t*)));
- m_packet->connect2("OP_GroupCancelInvite", SP_Zone, DIR_Server|DIR_Client,
- "groupDeclineStruct", SZC_Match,
- m_messageShell, SLOT(groupDecline(const uint8_t*)));
- m_packet->connect2("OP_GroupLeader", SP_Zone, DIR_Server,
- "groupLeaderChangeStruct", SZC_Match,
- m_messageShell, SLOT(groupLeaderChange(const uint8_t*)));
- }
-
- if (m_filterNotifications)
- {
- connect(m_spawnShell, SIGNAL(addItem(const Item*)),
- m_filterNotifications, SLOT(addItem(const Item*)));
- connect(m_spawnShell, SIGNAL(delItem(const Item*)),
- m_filterNotifications, SLOT(delItem(const Item*)));
- connect(m_spawnShell, SIGNAL(killSpawn(const Item*, const Item*, uint16_t)),
- m_filterNotifications, SLOT(killSpawn(const Item*)));
- connect(m_spawnShell, SIGNAL(changeItem(const Item*, uint32_t)),
- m_filterNotifications,
- SLOT(changeItem(const Item*, uint32_t)));
- }
-
- // connect interface slots to Packet signals
- m_packet->connect2("OP_TargetMouse", SP_Zone, DIR_Client|DIR_Server,
- "clientTargetStruct", SZC_Match,
- this, SLOT(clientTarget(const uint8_t*)));
-#if 0 // ZBTEMP
- connect(m_packet, SIGNAL(attack2Hand1(const uint8_t*, size_t, uint8_t)),
- this, SLOT(attack2Hand1(const uint8_t*)));
-#endif
- m_packet->connect2("OP_Action2", SP_Zone, DIR_Client|DIR_Server,
- "action2Struct", SZC_Match,
- this, SLOT(action2Message(const uint8_t*)));
- m_packet->connect2("OP_Death", SP_Zone, DIR_Server,
- "newCorpseStruct", SZC_Match,
- this, SLOT(combatKillSpawn(const uint8_t*)));
-#if 0 // ZBTEMP
- connect(m_packet, SIGNAL(interruptSpellCast(const uint8_t*, size_t, uint8_t)),
- this, SLOT(interruptSpellCast(const uint8_t*)));
- connect(m_packet, SIGNAL(moneyUpdate(const uint8_t*, size_t, uint8_t)),
- this, SLOT(moneyUpdate(const uint8_t*)));
- connect(m_packet, SIGNAL(moneyThing(const uint8_t*, size_t, uint8_t)),
- this, SLOT(moneyThing(const uint8_t*)));
-#endif // ZBTEMP
-
- connect(m_packet, SIGNAL(toggle_session_tracking(bool)),
- this, SLOT(toggle_net_session_tracking(bool)));
-
- // connect EQInterface slots to ZoneMgr signals
- connect(m_zoneMgr, SIGNAL(zoneBegin(const QString&)),
- this, SLOT(zoneBegin(const QString&)));
- connect(m_zoneMgr, SIGNAL(zoneEnd(const QString&, const QString&)),
- this, SLOT(zoneEnd(const QString&, const QString&)));
- connect(m_zoneMgr, SIGNAL(zoneChanged(const QString&)),
- this, SLOT(zoneChanged(const QString&)));
-
- // connect the SpellShell slots to EQInterface signals
- connect(this, SIGNAL(spellMessage(QString&)),
- m_spellShell, SLOT(spellMessage(QString&)));
-
- // connect EQInterface slots to SpawnShell signals
- connect(m_spawnShell, SIGNAL(addItem(const Item*)),
- this, SLOT(addItem(const Item*)));
- connect(m_spawnShell, SIGNAL(delItem(const Item*)),
- this, SLOT(delItem(const Item*)));
- connect(m_spawnShell, SIGNAL(killSpawn(const Item*, const Item*, uint16_t)),
- this, SLOT(killSpawn(const Item*)));
- connect(m_spawnShell, SIGNAL(changeItem(const Item*, uint32_t)),
- this, SLOT(changeItem(const Item*)));
- connect(m_spawnShell, SIGNAL(spawnConsidered(const Item*)),
- this, SLOT(spawnConsidered(const Item*)));
-
- // connect the SpawnShell slots to Packet signals
- m_packet->conne...
[truncated message content] |
|
From: <cn...@us...> - 2024-08-21 19:59:50
|
Revision: 1532
http://sourceforge.net/p/seq/svn/1532
Author: cn187
Date: 2024-08-21 19:59:48 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Mask high bits of zoneid so player purchased housing/guildhalls don't show as unknown
Modified Paths:
--------------
showeq/trunk/src/zonemgr.cpp
Modified: showeq/trunk/src/zonemgr.cpp
===================================================================
--- showeq/trunk/src/zonemgr.cpp 2024-08-21 19:59:37 UTC (rev 1531)
+++ showeq/trunk/src/zonemgr.cpp 2024-08-21 19:59:48 UTC (rev 1532)
@@ -96,8 +96,8 @@
QString ZoneMgr::zoneNameFromID(uint16_t zoneId)
{
const char* zoneName = NULL;
- if (zoneId < (sizeof(zoneNames) / sizeof (ZoneNames)))
- zoneName = zoneNames[zoneId].shortName;
+ if ((zoneId & 0x0fff) < (sizeof(zoneNames) / sizeof(ZoneNames)))
+ zoneName = zoneNames[zoneId & 0x0fff].shortName;
if (zoneName != NULL)
return zoneName;
@@ -115,8 +115,8 @@
QString ZoneMgr::zoneLongNameFromID(uint16_t zoneId)
{
const char* zoneName = NULL;
- if (zoneId < (sizeof(zoneNames) / sizeof (ZoneNames)))
- zoneName = zoneNames[zoneId].longName;
+ if ((zoneId & 0x0fff) < (sizeof(zoneNames) / sizeof(ZoneNames)))
+ zoneName = zoneNames[zoneId & 0x0fff].longName;
if (zoneName != NULL)
return zoneName;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 19:59:40
|
Revision: 1531
http://sourceforge.net/p/seq/svn/1531
Author: cn187
Date: 2024-08-21 19:59:37 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Fix sort by distance when Fast Machine is enabled
Modified Paths:
--------------
showeq/trunk/src/spawnlistcommon.cpp
Modified: showeq/trunk/src/spawnlistcommon.cpp
===================================================================
--- showeq/trunk/src/spawnlistcommon.cpp 2024-08-21 19:59:30 UTC (rev 1530)
+++ showeq/trunk/src/spawnlistcommon.cpp 2024-08-21 19:59:37 UTC (rev 1531)
@@ -144,10 +144,20 @@
case 5: // coord 2
case 6: // coord 3
case 7: // ID
- case 8: // distance
return data(column, Qt::DisplayRole).value<int>() <
other.data(column, Qt::DisplayRole).value<int>();
+ case 8: // distance
+ // "fast machine" option will use float, not int
+ return
+ ((data(column, Qt::DisplayRole).canConvert<float>()) ?
+ data(column, Qt::DisplayRole).value<float>() :
+ data(column, Qt::DisplayRole).value<int>())
+ <
+ ((other.data(column, Qt::DisplayRole).canConvert<float>()) ?
+ other.data(column, Qt::DisplayRole).value<float>() :
+ other.data(column, Qt::DisplayRole).value<int>());
+
case 0: // name
case 9: // race
case 10:// class
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 19:59:32
|
Revision: 1530
http://sourceforge.net/p/seq/svn/1530
Author: cn187
Date: 2024-08-21 19:59:30 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Swap x/y when reading charProfileStruct
Fixes starting map size issue in NRo, etc.
Modified Paths:
--------------
showeq/trunk/src/zonemgr.cpp
Modified: showeq/trunk/src/zonemgr.cpp
===================================================================
--- showeq/trunk/src/zonemgr.cpp 2024-08-21 19:59:22 UTC (rev 1529)
+++ showeq/trunk/src/zonemgr.cpp 2024-08-21 19:59:30 UTC (rev 1530)
@@ -468,12 +468,12 @@
player->zoneId = netStream.readUInt16NC();
player->zoneInstance = netStream.readUInt16NC();
+ memcpy(&player->y, netStream.pos(), sizeof(player->y));
+ netStream.skipBytes(sizeof(player->y));
+
memcpy(&player->x, netStream.pos(), sizeof(player->x));
netStream.skipBytes(sizeof(player->x));
- memcpy(&player->y, netStream.pos(), sizeof(player->y));
- netStream.skipBytes(sizeof(player->y));
-
memcpy(&player->z, netStream.pos(), sizeof(player->z));
netStream.skipBytes(sizeof(player->z));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 19:59:25
|
Revision: 1529
http://sourceforge.net/p/seq/svn/1529
Author: cn187
Date: 2024-08-21 19:59:22 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Fix for regex regression due to different behavior between Qt4 and Qt5/6
Modified Paths:
--------------
showeq/trunk/src/eqstr.cpp
Modified: showeq/trunk/src/eqstr.cpp
===================================================================
--- showeq/trunk/src/eqstr.cpp 2024-08-21 19:59:15 UTC (rev 1528)
+++ showeq/trunk/src/eqstr.cpp 2024-08-21 19:59:22 UTC (rev 1529)
@@ -254,11 +254,11 @@
#else
if (!substFormatStringRes.isEmpty())
{
- formatString.replace(curPos-2, rxt.matchedLength()+2, substFormatStringRes);
+ formatString.replace(curPos, rxt.matchedLength(), substFormatStringRes);
}
else
{
- formatString.replace(curPos-2, rxt.matchedLength()+2, "");
+ formatString.replace(curPos, rxt.matchedLength(), "");
curPos += rxt.matchedLength(); // if no replacement string, skip over
}
@@ -293,7 +293,7 @@
// some messages contains spell names with additional delimited fields
if (sub.contains('^'))
{
- sub = sub.section("^", -1);
+ sub = sub.mid(sub.lastIndexOf('^')+1);
// they also contain an oddball apostrophe
if (sub.startsWith("'"))
sub.replace(0, 1, "");
@@ -320,17 +320,17 @@
// some messages contains spell names with additional delimited fields
if (sub.contains('^'))
{
- sub = sub.section("^", -1);
+ sub = sub.mid(sub.lastIndexOf('^')+1);
// they also contain an oddball apostrophe
if (sub.startsWith("'"))
sub.replace(0, 1, "");
}
- formatString.replace(curPos-1, rx.matchedLength()+1, argList[substArg-1]);
+ formatString.replace(curPos, rx.matchedLength(), sub);
}
else
{
//no argument for this replacement, so replace with empty string
- formatString.replace(curPos-1, rx.matchedLength()+1, "");
+ formatString.replace(curPos, rx.matchedLength(), "");
curPos += rx.matchedLength(); // if no such argument, skip over
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 19:59:17
|
Revision: 1528
http://sourceforge.net/p/seq/svn/1528
Author: cn187
Date: 2024-08-21 19:59:15 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Redesign spawn filter edit window based on new add filter dialog
Modified Paths:
--------------
showeq/trunk/src/Makefile.am
showeq/trunk/src/editor.cpp
showeq/trunk/src/filter.cpp
showeq/trunk/src/filter.h
showeq/trunk/src/filtermgr.cpp
showeq/trunk/src/filtermgr.h
showeq/trunk/src/interface.cpp
showeq/trunk/src/interface.h
showeq/trunk/src/spawnlistcommon.cpp
Added Paths:
-----------
showeq/trunk/src/filterlistwindow.cpp
showeq/trunk/src/filterlistwindow.h
showeq/trunk/src/toolbaricons.cpp
showeq/trunk/src/toolbaricons.h
Modified: showeq/trunk/src/Makefile.am
===================================================================
--- showeq/trunk/src/Makefile.am 2024-08-21 19:58:52 UTC (rev 1527)
+++ showeq/trunk/src/Makefile.am 2024-08-21 19:59:15 UTC (rev 1528)
@@ -5,7 +5,7 @@
bin_PROGRAMS = showeq
showeq_SOURCES = main.cpp spawn.cpp spawnshell.cpp spawnlist.cpp spellshell.cpp \
- spelllist.cpp vpacket.cpp editor.cpp filter.cpp packetfragment.cpp packetstream.cpp \
+ spelllist.cpp vpacket.cpp editor.cpp filterlistwindow.cpp filter.cpp packetfragment.cpp packetstream.cpp \
packetinfo.cpp packet.cpp packetcapture.cpp packetformat.cpp interface.cpp compass.cpp \
map.cpp util.cpp experiencelog.cpp combatlog.cpp player.cpp skilllist.cpp \
statlist.cpp filtermgr.cpp mapcore.cpp category.cpp compassframe.cpp group.cpp \
@@ -15,10 +15,10 @@
datalocationmgr.cpp eqstr.cpp messages.cpp message.cpp messagefilter.cpp messagewindow.cpp \
messageshell.cpp terminal.cpp filteredspawnlog.cpp messagefilterdialog.cpp \
diagnosticmessages.cpp mapicon.cpp filternotifications.cpp netstream.cpp guildshell.cpp \
- guildlist.cpp bazaarlog.cpp mapicondialog.cpp packetcaptureprovider.cpp
+ guildlist.cpp bazaarlog.cpp mapicondialog.cpp packetcaptureprovider.cpp toolbaricons.cpp
showeq_moc_SRCS = bazaarlog.moc category.moc combatlog.moc compass.moc \
- compassframe.moc datetimemgr.moc editor.moc experiencelog.moc \
+ compassframe.moc datetimemgr.moc editor.moc filterlistwindow.moc experiencelog.moc \
filteredspawnlog.moc filtermgr.moc filternotifications.moc group.moc \
guild.moc guildlist.moc guildshell.moc interface.moc logger.moc \
map.moc mapicon.moc mapicondialog.moc messagefilter.moc \
@@ -38,6 +38,7 @@
$(srcdir)/compassframe.cpp: compassframe.moc
$(srcdir)/datetimemgr.cpp: datetimemgr.moc
$(srcdir)/editor.cpp: editor.moc
+$(srcdir)/filterlistwindow.cpp: filterlistwindow.moc
$(srcdir)/experiencelog.cpp: experiencelog.moc
$(srcdir)/filteredspawnlog.cpp: filteredspawnlog.moc
$(srcdir)/filtermgr.cpp: filtermgr.moc
@@ -113,7 +114,7 @@
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 weapons29.h weapons2a.h weapons2b.h weapons2c.h weapons2d.h weapons2e.h weapons2f.h weapons30.h weapons4e.h decode.h cgiconv.h skilllist.h statlist.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.h mapicondialog.ui filternotifications.h netstream.h guildshell.h guildlist.h bazaarlog.h message.h s_everquest.h staticspells.h packetcaptureprovider.h mapcolors.h
+noinst_HEADERS = classes.h compass.h everquest.h interface.h main.h map.h filter.h vpacket.h editor.h filterlistwindow.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 weapons29.h weapons2a.h weapons2b.h weapons2c.h weapons2d.h weapons2e.h weapons2f.h weapons30.h weapons4e.h decode.h cgiconv.h skilllist.h statlist.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.h mapicondialog.ui filternotifications.h netstream.h guildshell.h guildlist.h bazaarlog.h message.h s_everquest.h staticspells.h packetcaptureprovider.h mapcolors.h toolbaricons.h
CLEANFILES = $(nodist_showeq_SOURCES)
Modified: showeq/trunk/src/editor.cpp
===================================================================
--- showeq/trunk/src/editor.cpp 2024-08-21 19:58:52 UTC (rev 1527)
+++ showeq/trunk/src/editor.cpp 2024-08-21 19:59:15 UTC (rev 1528)
@@ -43,55 +43,10 @@
#include <QCloseEvent>
#include "util.h"
+#include "toolbaricons.h"
#include "editor.h"
-/* XPM */
-static const char *filesave[] = {
-" 14 14 4 1",
-". c #040404",
-"# c #808304",
-"a c #bfc2bf",
-"b c None",
-"..............",
-".#.aaaaaaaa.a.",
-".#.aaaaaaaa...",
-".#.aaaaaaaa.#.",
-".#.aaaaaaaa.#.",
-".#.aaaaaaaa.#.",
-".#.aaaaaaaa.#.",
-".##........##.",
-".############.",
-".##.........#.",
-".##......aa.#.",
-".##......aa.#.",
-".##......aa.#.",
-"b............."
-};
-
-/* XPM */
-static const char *fileopen[] = {
-" 16 13 5 1",
-". c #040404",
-"# c #808304",
-"a c None",
-"b c #f3f704",
-"c c #f3f7f3",
-"aaaaaaaaa...aaaa",
-"aaaaaaaa.aaa.a.a",
-"aaaaaaaaaaaaa..a",
-"a...aaaaaaaa...a",
-".bcb.......aaaaa",
-".cbcbcbcbc.aaaaa",
-".bcbcbcbcb.aaaaa",
-".cbcb...........",
-".bcb.#########.a",
-".cb.#########.aa",
-".b.#########.aaa",
-"..#########.aaaa",
-"...........aaaaa"
-};
-
EditorWindow::EditorWindow(const char *fileName)
: QMainWindow( 0 )
{
@@ -98,8 +53,8 @@
setObjectName("ShowEQ - Editor");
setAttribute(Qt::WA_DeleteOnClose);
QPixmap openIcon, saveIcon;
- openIcon = QPixmap( fileopen );
- saveIcon = QPixmap( filesave );
+ openIcon = ToolbarIcons::FileOpen();
+ saveIcon = ToolbarIcons::FileSave();
fileTools = new QToolBar(this);
fileTools->setWindowTitle( tr( "File Operations" ) );
Modified: showeq/trunk/src/filter.cpp
===================================================================
--- showeq/trunk/src/filter.cpp 2024-08-21 19:58:52 UTC (rev 1527)
+++ showeq/trunk/src/filter.cpp 2024-08-21 19:59:15 UTC (rev 1528)
@@ -33,10 +33,10 @@
#include <QFile>
#include <QTextStream>
+#include <QXmlStreamReader>
#define MAXLEN 5000
-#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
#define ENDL Qt::endl
#else
@@ -45,9 +45,22 @@
//#define DEBUG_FILTER
+#define X(a, b) #b,
+const QString FilterStringFieldName[FSF_Max] = {
+ FILTERSTRINGFIELD_TABLE
+};
+#undef X
+
+#define X(a, b) #b,
+const QString FilterStringInfoFieldName[FSIF_Max] = {
+ FILTERSTRINGINFOFIELD_TABLE
+};
+#undef X
+
+
//----------------------------------------------------------------------
// LoadXmlContentHandler declaration
-class LoadXmlContentHandler : public QXmlDefaultHandler
+class LoadXmlContentHandler : public QObject
{
public:
LoadXmlContentHandler(Filters& filters, const FilterTypes& types);
@@ -56,7 +69,7 @@
// QXmlContentHandler overrides
bool startDocument();
bool startElement( const QString&, const QString&, const QString& ,
- const QXmlAttributes& );
+ const QXmlStreamAttributes& );
bool characters(const QString& ch);
bool endElement( const QString&, const QString&, const QString& );
bool endDocument();
@@ -182,15 +195,41 @@
(const char*)regexString, minLevel, maxLevel);
#endif
+ // in theory, we have minLevel and maxLevel, so there should be no level range
+ // appended to the filter string. But there are situation where that can
+ // happen, so check for it and remove it if found. Otherwise, if
+ // we leave it attached, the filter will never match anything since the
+ // level range will be treated as part of the match string.
+
+ QString filterString;
+ QString workString = regexString;
+
+ // find the semi-colon that seperates the regex from the level info
+ int breakPoint = workString.indexOf(';');
+
+ // if no semi-colon, then it's all a regex
+ if (breakPoint == -1)
+ filterString = regexString;
+ else
+ // regex is the left most part of the string up to breakPoint characters
+ filterString = workString.left(breakPoint);
+
+ filterString = regexString;
+
+#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
+ if (!caseSensitive)
+ m_regexp.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
+#else
m_regexp.setPatternSyntax(QRegExp::RegExp);
m_regexp.setCaseSensitivity(caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);
+#endif
// For the pattern, save off the original. This is what will be saved
// during save operations. But the actual regexp we filter with will
// mark the # in spawn names as optional to aid in filter writing.
- m_regexpOriginalPattern = QString(regexString.toLatin1().data());
+ m_regexpOriginalPattern = filterString;
- QString fixedFilterPattern = regexString;
+ QString fixedFilterPattern = filterString;
fixedFilterPattern.replace("Name:", "Name:#?", Qt::CaseInsensitive);
m_regexp.setPattern(fixedFilterPattern);
@@ -244,7 +283,7 @@
bool FilterItem::isFiltered(const QString& filterString, uint8_t level) const
{
// check the main filter string
- if (m_regexp.indexIn(filterString) != -1)
+ if (filterString.indexOf(m_regexp) != -1)
{
// is there is a level range component to this filter
if ((m_minLevel > 0) || (m_maxLevel > 0))
@@ -469,6 +508,49 @@
}
}
+QString Filter::getFilterString(int index) const
+{
+ if (index >= m_filterItems.size())
+ return QString();
+
+ FilterItem* item = m_filterItems[index];
+ QString pattern = item->filterPattern();
+
+ return pattern;
+}
+
+QString Filter::getOrigFilterString(int index) const
+{
+ if (index >= m_filterItems.size())
+ return QString();
+
+ FilterItem* item = m_filterItems[index];
+ QString pattern = item->origFilterPattern();
+
+ return pattern;
+}
+
+int Filter::getMinLevel(int index) const
+{
+ if (index >= m_filterItems.size())
+ return -1;
+
+ FilterItem* item = m_filterItems[index];
+
+ return item->minLevel();
+}
+
+int Filter::getMaxLevel(int index) const
+{
+ if (index >= m_filterItems.size())
+ return -1;
+
+ FilterItem* item = m_filterItems[index];
+
+ return item->maxLevel();
+};
+
+
//----------------------------------------------------------------------
// Filters
Filters::Filters(const FilterTypes& types)
@@ -533,23 +615,61 @@
// load filters
m_file = filename;
+ if (filename.isEmpty())
+ return false;
+
// create XML content handler
LoadXmlContentHandler handler(*this, m_types);
// create a file object on the file
QFile xmlFile(filename);
+ xmlFile.open(QIODevice::ReadOnly);
+ if (!xmlFile.isOpen())
+ return false;
- // create an XmlInputSource on the file
- QXmlInputSource source(&xmlFile);
-
- // create an XML parser
- QXmlSimpleReader reader;
+ QXmlStreamReader reader(&xmlFile);
- // set the content handler
- reader.setContentHandler(&handler);
+ bool status = true;
+ while(!reader.atEnd() && status)
+ {
+ switch(reader.readNext())
+ {
+ case QXmlStreamReader::NoToken:
+ break;
+ case QXmlStreamReader::Invalid:
+ status = false;
+ break;
+ case QXmlStreamReader::StartDocument:
+ if (!handler.startDocument())
+ status = false;
+ break;
+ case QXmlStreamReader::EndDocument:
+ if (!handler.endDocument())
+ status = false;
+ break;
+ case QXmlStreamReader::StartElement:
+ if (!handler.startElement(QString(), QString(), reader.name().toString(), reader.attributes()))
+ status = false;
+ break;
+ case QXmlStreamReader::EndElement:
+ if (!handler.endElement(QString(), QString(), reader.name().toString()))
+ status = false;
+ break;
+ case QXmlStreamReader::Characters:
+ if (!handler.characters(reader.text().toString()))
+ status = false;
+ break;
+ case QXmlStreamReader::Comment:
+ case QXmlStreamReader::DTD:
+ case QXmlStreamReader::EntityReference:
+ case QXmlStreamReader::ProcessingInstruction:
+ break;
+ }
+ }
- // parse the file
- return reader.parse(source);
+ xmlFile.close();
+
+ return status;
}
bool Filters::save(const QString& filename) const
@@ -565,8 +685,13 @@
QTextStream out(&file);
// set the output encoding to be UTF8
+#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
+ out.setEncoding(QStringConverter::Utf8);
+#else
out.setCodec("UTF-8");
+#endif
+
// set the number output to be left justified decimal
out.setIntegerBase(10);
out.setFieldAlignment(QTextStream::AlignLeft);
@@ -707,6 +832,59 @@
filter->remFilter(filterPattern);
}
+int Filters::numFilters(uint8_t type) const
+{
+ uint32_t mask = (1 << type);
+ FilterMap::const_iterator it = m_filters.find(mask);
+
+ if (it == m_filters.end()) return 0;
+
+ return it->second->numFilters();
+}
+
+QString Filters::getFilterString(uint8_t type, int index) const
+{
+ uint32_t mask = (1 << type);
+ FilterMap::const_iterator it = m_filters.find(mask);
+
+ if (it == m_filters.end()) return QString();
+
+ return it->second->getFilterString(index);
+}
+
+QString Filters::getOrigFilterString(uint8_t type, int index) const
+{
+ uint32_t mask = (1 << type);
+ FilterMap::const_iterator it = m_filters.find(mask);
+
+ if (it == m_filters.end()) return QString();
+
+ return it->second->getOrigFilterString(index);
+}
+
+int Filters::getMinLevel(uint8_t type, int index) const
+{
+ uint32_t mask = (1 << type);
+ FilterMap::const_iterator it = m_filters.find(mask);
+
+ if (it == m_filters.end()) return -1;
+
+ return it->second->getMinLevel(index);
+}
+
+int Filters::getMaxLevel(uint8_t type, int index) const
+{
+ uint32_t mask = (1 << type);
+ FilterMap::const_iterator it = m_filters.find(mask);
+
+ if (it == m_filters.end()) return -1;
+
+ return it->second->getMaxLevel(index);
+}
+
+
+
+
///////////////////////////////////
// FilterTypes
FilterTypes::FilterTypes()
@@ -823,7 +1001,7 @@
bool LoadXmlContentHandler::startElement(const QString&,
const QString&,
const QString& name,
- const QXmlAttributes& attr)
+ const QXmlStreamAttributes& attr)
{
if (name == "oldfilter")
{
@@ -843,21 +1021,13 @@
if (name == "level")
{
- int index;
-
- // first check for a min
- index = attr.index("min");
-
// if min attribute was found, use it
- if (index != -1)
- m_currentMinLevel = uint8_t(attr.value(index).toUShort());
+ if (!attr.value("min").isEmpty())
+ m_currentMinLevel = uint8_t(attr.value("min").toString().toUShort());
- // then check for a max
- index = attr.index("max");
-
// if max attribute was found, use it
- if (index != -1)
- m_currentMaxLevel = uint8_t(attr.value(index).toUShort());
+ if (!attr.value("max").isEmpty())
+ m_currentMaxLevel = uint8_t(attr.value("max").toString().toUShort());
// done
return true;
@@ -865,17 +1035,16 @@
if (name == "section")
{
- int index = attr.index("name");
// section is only valid if a name is specified
- if (index == -1)
+ if (attr.value("name").isEmpty())
return false;
// get the current type for the name
- m_currentType = m_types.type(attr.value(index));
+ m_currentType = m_types.type(attr.value("name").toString());
return true;
}
-
+
return true;
}
Modified: showeq/trunk/src/filter.h
===================================================================
--- showeq/trunk/src/filter.h 2024-08-21 19:58:52 UTC (rev 1527)
+++ showeq/trunk/src/filter.h 2024-08-21 19:59:15 UTC (rev 1528)
@@ -33,13 +33,83 @@
#include <QString>
#include <QList>
-#include <QRegExp>
-#include <QXmlAttributes>
#include <QTextStream>
+#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
+#include <QRegularExpression>
+#else
+#include <QRegExp>
+#endif
+
#include <map>
+
//--------------------------------------------------
+// defines and enums
+
+// HumanReadableName, FilterStringFieldName
+#define FILTERSTRINGFIELD_TABLE \
+ X(Name, Name) \
+ X(Level, Level) \
+ X(Race, Race) \
+ X(Class, Class) \
+ X(NPC, NPC) \
+ X(X, X) \
+ X(Y, Y) \
+ X(Z, Z) \
+ X(Light, Light) \
+ X(Deity, Deity) \
+ X(RaceTeam, RTeam) \
+ X(DeityTeam, DTeam) \
+ X(Type, Type) \
+ X(LastName, LastName) \
+ X(Guild, Guild) \
+ X(SpawnTime, Spawn) \
+ X(Info, Info) \
+ X(GM, GM)
+
+// HumanReadableName, FilterStringFieldName
+#define FILTERSTRINGINFOFIELD_TABLE \
+ X(Light, Light) \
+ X(Head, H) \
+ X(Chest, C) \
+ X(Arms, A) \
+ X(Waist, W) \
+ X(Gloves, G) \
+ X(Legs, L) \
+ X(Feet, F) \
+ X(Primary, 1) \
+ X(Secondary, 2)
+
+
+#define X(a, b) FSF_##a,
+enum FilterStringField
+{
+ FILTERSTRINGFIELD_TABLE
+ FSF_Max
+};
+#undef X
+
+#define X(a, b) FSIF_##a,
+enum FilterStringInfoField
+{
+ FILTERSTRINGINFOFIELD_TABLE
+ FSIF_Max
+};
+#undef X
+
+extern const QString FilterStringFieldName[FSF_Max];
+extern const QString FilterStringInfoFieldName[FSIF_Max];
+
+
+// special handling for min/max level, which aren't part of regex filter string
+#define FSF_MINLEVEL_NAME "MinLevel"
+#define FSF_MINLEVEL_LABEL "Min Level"
+#define FSF_MAXLEVEL_NAME "MaxLevel"
+#define FSF_MAXLEVEL_LABEL "Max Level"
+
+
+//--------------------------------------------------
// forward declarations
class FilterItem;
class Filter;
@@ -68,6 +138,7 @@
QString name() const { return m_regexp.pattern(); }
QString filterPattern() const { return m_regexp.pattern(); }
+ QString origFilterPattern() const { return m_regexpOriginalPattern; }
uint8_t minLevel() const { return m_minLevel; }
uint8_t maxLevel() const { return m_maxLevel; }
bool valid() { return m_regexp.isValid(); }
@@ -76,7 +147,11 @@
void init(const QString& filterPattern, bool caseSensitive, uint8_t minLevel,
uint8_t maxLevel);
+#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
+ QRegularExpression m_regexp;
+#else
QRegExp m_regexp;
+#endif
QString m_regexpOriginalPattern;
uint8_t m_minLevel;
uint8_t m_maxLevel;
@@ -99,6 +174,12 @@
void listFilters(void);
void setCaseSensitive(bool caseSensitive);
+ int numFilters() const { return m_filterItems.size(); }
+ QString getFilterString(int index) const;
+ QString getOrigFilterString(int index) const;
+ int getMinLevel(int index) const;
+ int getMaxLevel(int index) const;
+
private:
FilterItem* findFilter(const QString& filterPattern);
@@ -128,7 +209,11 @@
uint8_t minLevel = 0, uint8_t maxLevel = 0);
void remFilter(uint8_t type, const QString& filterString);
- protected:
+ int numFilters(uint8_t type) const;
+ QString getFilterString(uint8_t type, int index) const;
+ QString getOrigFilterString(uint8_t type, int index)const;
+ int getMinLevel(uint8_t type, int index) const;
+ int getMaxLevel(uint8_t type, int index) const;
protected:
QString m_file;
Copied: showeq/trunk/src/filterlistwindow.cpp (from rev 1527, showeq/trunk/src/filtermgr.cpp)
===================================================================
--- showeq/trunk/src/filterlistwindow.cpp (rev 0)
+++ showeq/trunk/src/filterlistwindow.cpp 2024-08-21 19:59:15 UTC (rev 1528)
@@ -0,0 +1,1297 @@
+/*
+ * filterlistwindow.cpp
+ * Copyright 2024 by the respective ShowEQ Developers
+ *
+ * This file is part of ShowEQ.
+ * http://www.sourceforge.net/projects/seq
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <QWidget>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QTabWidget>
+#include <QTreeView>
+#include <QDebug>
+#include <QHeaderView>
+#include <QLineEdit>
+#include <QLabel>
+#include <QGridLayout>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QPushButton>
+#include <QCheckBox>
+#include <QToolBar>
+#include <QAction>
+#include <QMenuBar>
+#include <QMenu>
+#include <QFileDialog>
+
+#include "diagnosticmessages.h"
+#include "filtermgr.h"
+#include "filterlistwindow.h"
+#include "toolbaricons.h"
+
+
+
+#define FILTERLISTCOLUMN_TABLE \
+ X(FilterString) \
+ X(MinLevel) \
+ X(MaxLevel)
+
+#define X(a) FLC_##a,
+enum FilterListColumn {
+ FILTERLISTCOLUMN_TABLE
+ FLC_Max
+};
+#undef X
+
+#define X(a) #a,
+const QString FilterListColumnName[] = {
+ FILTERLISTCOLUMN_TABLE
+};
+#undef X
+
+enum DataItemUserRole
+{
+ DIUR_FilterStringWithLevelRange=Qt::UserRole + 1,
+};
+
+
+FilterListWindow::FilterListWindow(QString filename, QWidget* parent, Qt::WindowFlags flags):
+ QMainWindow(parent, flags),
+ m_filename(filename),
+ m_tabWidget(nullptr),
+ m_statusBar(nullptr),
+ m_filters(nullptr),
+ m_types(nullptr)
+{
+ //setModal(true);
+ setAttribute(Qt::WA_DeleteOnClose);
+ setWindowTitle(filename);
+
+ m_types = new FilterTypes;
+ uint8_t type;
+ uint32_t mask;
+ #define X(a, b, c) m_types->registerType(#a, type, mask);
+ FILTER_TYPE_TABLE
+ #undef X
+
+ m_filters = new Filters(*m_types);
+
+ QMenuBar* menubar = new QMenuBar(this);
+ setMenuBar(menubar);
+
+ QMenu* fileMenu = new QMenu("&File", this);
+
+#if (QT_VERSION >= QT_VERSION_CHECK(6,3,0))
+ fileMenu->addAction(ToolbarIcons::FileOpen(), "&Open", Qt::CTRL|Qt::Key_O, this, SLOT(load()));
+ fileMenu->addAction(ToolbarIcons::FileSave(), "&Save", Qt::CTRL|Qt::Key_S, this, SLOT(save()));
+ fileMenu->addSeparator();
+ fileMenu->addAction("&Close", Qt::CTRL|Qt::Key_W, this, SLOT(close()));
+#else
+ fileMenu->addAction(ToolbarIcons::FileOpen(), "&Open", this, SLOT(load()), Qt::CTRL|Qt::Key_O);
+ fileMenu->addAction(ToolbarIcons::FileSave(), "&Save", this, SLOT(save()), Qt::CTRL|Qt::Key_S);
+ fileMenu->addSeparator();
+ fileMenu->addAction("&Close", this, SLOT(close()), Qt::CTRL|Qt::Key_W);
+#endif
+
+ menubar->addMenu(fileMenu);
+
+ QToolBar* toolbar = new QToolBar(this);
+ toolbar->addAction(ToolbarIcons::FileOpen(), "Open File", this, SLOT(load()));
+ toolbar->addAction(ToolbarIcons::FileSave(), "Save File", this, SLOT(save()));
+
+ addToolBar(toolbar);
+
+ m_tabWidget = new QTabWidget(this);
+
+ QStringList tabs = {
+ #define X(a, b, c) #a,
+ FILTER_TYPE_TABLE
+ };
+ #undef X
+
+ for (uint8_t i=0; i < SIZEOF_FILTERS; ++i)
+ {
+ QWidget* t = createTab(m_types->name(i));
+ m_tabWidget->addTab(t, "&" + m_types->name(i));
+ }
+
+ setCentralWidget(m_tabWidget);
+
+ m_statusBar = new QStatusBar(this);
+ setStatusBar(m_statusBar);
+
+ loadFile();
+
+ show();
+
+ m_statusBar->showMessage("Ready", 2000);
+
+}
+
+FilterListWindow::~FilterListWindow()
+{
+ if (m_filters)
+ delete m_filters;
+
+ if (m_types)
+ delete m_types;
+
+ qDeleteAll(m_models);
+ m_models.clear();
+
+ qDeleteAll(m_views);
+ m_views.clear();
+}
+
+void FilterListWindow::setTabLabel(uint8_t type, int count)
+{
+#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
+ if (!m_tabWidget || !m_tabWidget->tabBar())
+ return;
+
+ m_tabWidget->tabBar()->setTabText(type, QString("&") + m_types->name(type)
+#else
+ if (!m_tabWidget)
+ return;
+
+ m_tabWidget->setTabText(type, QString("&") + m_types->name(type)
+#endif
+ + " (" + QString::number(count) + ")");
+}
+
+QWidget* FilterListWindow::createTab(QString name)
+{
+ uint8_t type = m_types->type(name);
+
+ QWidget* w = new QWidget(this);
+ w->setObjectName(name);
+ QVBoxLayout* l = new QVBoxLayout(w);
+
+ QToolBar* tabButtons = new QToolBar(w);
+
+ QAction* tmpAction = new QAction("+", nullptr);
+ tmpAction->setToolTip("Add New Item");
+ tmpAction->setProperty("type", m_types->type(name));
+ tmpAction->setProperty("action", "add");
+ tabButtons->addAction(tmpAction);
+
+ tmpAction = new QAction("-", nullptr);
+ tmpAction->setToolTip("Delete Selected Item");
+ tmpAction->setProperty("type", m_types->type(name));
+ tmpAction->setProperty("action", "delete");
+ tabButtons->addAction(tmpAction);
+
+ l->addWidget(tabButtons);
+ connect(tabButtons, SIGNAL(actionTriggered(QAction*)), this, SLOT(tabButtonClicked(QAction*)));
+
+
+ QTreeView* t = new QTreeView();
+ m_views[type] = t;
+ t->setRootIsDecorated(false);
+ t->setSelectionMode(QAbstractItemView::SingleSelection);
+ t->setSelectionBehavior(QAbstractItemView::SelectRows);
+ t->expandAll();
+ t->setItemsExpandable(false);
+
+ connect(t, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(editItem(QModelIndex)));
+ l->addWidget(t);
+
+ return w;
+}
+
+void FilterListWindow::tabButtonClicked(QAction* action)
+{
+ uint8_t type = action->property("type").toInt();
+ QString a = action->property("action").toString();
+ if (a == "add")
+ createItem(type);
+ else if (a == "delete")
+ deleteItem(type);
+}
+
+void FilterListWindow::createItem(uint8_t type)
+{
+ bool ok = false;
+ QString filterString;
+ filterString = FilterDialog::getFilter(this, "Add " + m_types->name(type) + " Filter", filterString, &ok);
+ if (ok)
+ {
+ m_models[type]->addFilter(filterString);
+ setTabLabel(type, m_models[type]->rowCount());
+ }
+}
+
+void FilterListWindow::deleteItem(uint8_t type)
+{
+ QModelIndexList selectedRows = m_views[type]->selectionModel()->selectedRows();
+ if (selectedRows.size())
+ {
+ QModelIndex selected = selectedRows[0]; //only one selection allowed, so we can take the first
+ m_models[type]->removeFilter(selected);
+ setTabLabel(type, m_models[type]->rowCount());
+ }
+}
+
+void FilterListWindow::editItem(QModelIndex index)
+{
+ //TODO rework the whole filterdialog/filtermodel/filters call chain
+ //to to better handle min/max level rather than this kludge
+ //
+ const QAbstractItemModel* model = index.model();
+ QString filterString = model->data(index, DIUR_FilterStringWithLevelRange).toString();
+ uint8_t type = index.internalId();
+ bool ok = false;
+ filterString = FilterDialog::getFilter(this, "Edit " + m_types->name(type) + " Filter", filterString, &ok);
+ if (ok)
+ {
+ m_models[type]->removeFilter(index);
+ m_models[type]->addFilter(filterString);
+ }
+}
+
+void FilterListWindow::load()
+{
+ QString fn = QFileDialog::getOpenFileName(this, "Open File",
+ m_filename, "XML Files (*.xml)");
+ if (fn.isEmpty())
+ {
+ m_statusBar->showMessage("File Open Cancelled", 2000);
+ return;
+ }
+
+ m_filename = fn;
+ setWindowTitle(m_filename);
+ loadFile();
+}
+
+void FilterListWindow::loadFile()
+{
+
+ for (uint8_t i=0; i < SIZEOF_FILTERS; ++i)
+ m_views[i]->setModel(nullptr);
+
+ qDeleteAll(m_models);
+ m_models.clear();
+
+ m_filters->load(m_filename);
+
+ for (int i=0; i < SIZEOF_FILTERS; ++i)
+ {
+ m_models[i] = new FilterModel(m_filters, i);
+ m_views[i]->setModel(m_models[i]);
+ setTabLabel(i, m_models[i]->rowCount());
+
+#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
+ m_views[i]->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
+#else
+ m_views[i]->header()->setResizeMode(QHeaderView::ResizeToContents);
+#endif
+ }
+
+ m_statusBar->showMessage(QString("Loaded %1").arg(m_filename), 2000);
+}
+
+void FilterListWindow::save()
+{
+ if (m_filename.isEmpty())
+ saveAs();
+ else
+ if (!m_filters->save())
+ m_statusBar->showMessage(QString("Could not write to %1").arg(m_filename),
+ 2000);
+ else
+ m_statusBar->showMessage(QString("Saved %1").arg(m_filename), 2000);
+}
+
+void FilterListWindow::saveAs()
+{
+ QString fn = QFileDialog::getSaveFileName(this, "Save File",
+ m_filename, "XML Files (*.xml)");
+ if (fn.isEmpty())
+ {
+ m_statusBar->showMessage("Save File Cancelled", 2000);
+ return;
+ }
+
+ m_filename = fn;
+ setWindowTitle(m_filename);
+ save();
+}
+
+
+FilterModel::FilterModel(Filters* filters, uint8_t type, QObject* parent) :
+ QAbstractItemModel(parent),
+ m_filters(filters),
+ m_type(type)
+{ }
+
+FilterModel::~FilterModel()
+{}
+
+QModelIndex FilterModel::index(int row, int column, const QModelIndex &parent) const
+{
+ return createIndex(row, column, m_type);
+}
+
+QModelIndex FilterModel::parent(const QModelIndex &index) const
+{
+ return QModelIndex();
+}
+
+int FilterModel::rowCount(const QModelIndex &parent) const
+{
+ return m_filters->numFilters(m_type);
+}
+
+int FilterModel::columnCount(const QModelIndex &parent) const
+{
+ return FLC_Max;
+}
+
+QVariant FilterModel::headerData(int section, Qt::Orientation, int role) const
+{
+ switch (role)
+ {
+ case Qt::DisplayRole:
+ return FilterListColumnName[section];
+
+ default:
+ return QVariant();
+ }
+}
+
+QVariant FilterModel::data(const QModelIndex &index, int role) const
+{
+ switch (role)
+ {
+ case Qt::DisplayRole:
+ switch(index.column())
+ {
+ case FLC_FilterString:
+ return m_filters->getOrigFilterString(m_type, index.row());
+ case FLC_MinLevel:
+ return m_filters->getMinLevel(m_type, index.row());
+ case FLC_MaxLevel:
+ return m_filters->getMaxLevel(m_type, index.row());
+ default:
+ return QVariant();
+ }
+ case DIUR_FilterStringWithLevelRange:
+ {
+ int minLevel = m_filters->getMinLevel(m_type, index.row());
+ int maxLevel = m_filters->getMaxLevel(m_type, index.row());
+ QString filterString = m_filters->getOrigFilterString(m_type, index.row());
+ if (minLevel > 0 || maxLevel > 0)
+ {
+ filterString += ';';
+ if (minLevel > 0)
+ {
+ filterString += QString::number(minLevel);
+ if (maxLevel > 0)
+ filterString += "-" + QString::number(maxLevel);
+ else
+ filterString += "-" + QString::number(SHRT_MAX);
+ }
+ else
+ {
+ filterString += "0-" + QString::number(maxLevel);
+ }
+ }
+ return filterString;
+ }
+
+ default:
+ return QVariant();
+ }
+}
+
+void FilterModel::addFilter(QString filterPattern)
+{
+ //TODO rework the whole filterdialog/filtermodel/filters call chain
+ //to to better handle min/max level rather than this kludge
+ int minLevel = 0;
+ int maxLevel = 0;
+
+ QString workString = filterPattern;
+ int breakpoint = workString.indexOf(';');
+ if (breakpoint == -1)
+ {
+ beginInsertRows(QModelIndex(), rowCount(), 1);
+ m_filters->addFilter(m_type, filterPattern);
+ endInsertRows();
+ }
+ else
+ {
+ //this is basically a copy of the level string parsing code in FilterItem()
+ filterPattern = workString.left(breakpoint);
+ QString levelString = workString.mid(breakpoint+1);
+ breakpoint = levelString.indexOf('-');
+ bool ok;
+ int level;
+ if (breakpoint == -1)
+ {
+ level = levelString.toInt(&ok);
+ if (ok)
+ minLevel = level;
+ }
+ else
+ {
+ level = levelString.left(breakpoint).toInt(&ok);
+ if (ok)
+ minLevel = level;
+
+ levelString = levelString.mid(breakpoint+1);
+ if (levelString.isEmpty())
+ {
+ maxLevel = SHRT_MAX;
+ }
+ else
+ {
+ level = levelString.toInt(&ok);
+ if (ok)
+ maxLevel = level;
+ }
+ }
+ if (maxLevel < minLevel)
+ maxLevel = minLevel;
+
+
+ beginInsertRows(QModelIndex(), rowCount(), 1);
+ m_filters->addFilter(m_type, filterPattern, minLevel, maxLevel);
+ endInsertRows();
+
+
+ }
+
+ emit dataChanged(index(rowCount()-1, 0), index(rowCount(), 1));
+}
+
+void FilterModel::removeFilter(QModelIndex selection)
+{
+ beginRemoveRows(QModelIndex(), selection.row(), 1);
+ m_filters->remFilter(m_type, m_filters->getFilterString(m_type, selection.row()));
+ endRemoveRows();
+}
+
+
+FilterFormField::FilterFormField(QString name, QString labeltext, QWidget* parent) :
+ QWidget(parent),
+ m_name(name),
+ m_labeltext(labeltext),
+ m_check(nullptr),
+ m_label(nullptr),
+ m_edit(nullptr)
+{
+ if (m_labeltext.isNull())
+ m_labeltext = m_name;
+
+ m_check = new QCheckBox(this);
+ m_check->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
+
+ m_label = new QLabel(m_labeltext, this);
+ QSizePolicy tmpPolicy = m_label->sizePolicy();
+ tmpPolicy.setVerticalPolicy(QSizePolicy::Fixed);
+ m_label->setSizePolicy(tmpPolicy);
+
+ m_edit = new QLineEdit(this);
+ tmpPolicy = m_edit->sizePolicy();
+ tmpPolicy.setVerticalPolicy(QSizePolicy::Fixed);
+ m_edit->setSizePolicy(tmpPolicy);
+
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(m_check);
+ layout->addWidget(m_label);
+ layout->addWidget(m_edit);
+
+ connect(m_check, SIGNAL(toggled(bool)), m_edit, SLOT(setEnabled(bool)));
+ m_edit->installEventFilter(this);
+}
+
+bool FilterFormField::eventFilter(QObject* object, QEvent* event)
+{
+ if (object == m_edit && event->type() == QEvent::MouseButtonPress)
+ {
+ m_check->setChecked(true);
+ //stateChanged(Qt::Checked);
+ m_edit->setFocus(Qt::MouseFocusReason);
+ return true;
+ }
+ return false;
+}
+
+void FilterFormField::stateChanged(int state)
+{
+ bool old_check_state = m_check->blockSignals(true);
+ bool old_edit_state = m_edit->blockSignals(true);
+ switch (state)
+ {
+ case Qt::Unchecked:
+ m_check->setChecked(false);
+ m_edit->setEnabled(false);
+ break;
+ case Qt::PartiallyChecked:
+ break;
+ case Qt::Checked:
+ m_check->setChecked(true);
+ m_edit->setEnabled(true);
+ break;
+ }
+ m_check->blockSignals(old_check_state);
+ m_edit->blockSignals(old_edit_state);
+}
+
+void ToggleAllCheckBox::nextCheckState()
+{
+ switch(checkState())
+ {
+ case Qt::Unchecked:
+ setCheckState(Qt::Checked);
+ break;
+ case Qt::PartiallyChecked:
+ setCheckState(Qt::Unchecked);
+ break;
+ case Qt::Checked:
+ setCheckState(Qt::Unchecked);
+ break;
+ }
+
+}
+
+FilterDialog::FilterDialog(QWidget* parent, Qt::WindowFlags flags) :
+ QDialog(parent, flags),
+ m_toggleAll(nullptr),
+ m_filterString(QString()),
+ m_fieldCount(0),
+ m_fieldsCheckedCount(0)
+{
+ //init m_spawnFilterMap
+ for (int field = FSF_Name; field < FSF_Max; ++field)
+ {
+ if (field == FSF_Info) continue;
+
+ QString name = FilterStringFieldName[field];
+ m_spawnFilterMap[name] = "";
+ }
+ //starting with Head since Light is handled above
+ for (int field = FSIF_Head; field < FSIF_Max; ++field)
+ {
+ QString name = FilterStringInfoFieldName[field];
+ m_spawnFilterMap[name] = "";
+ }
+ m_spawnFilterMap[FSF_MINLEVEL_NAME] = "";
+ m_spawnFilterMap[FSF_MAXLEVEL_NAME] = "";
+
+ createForm();
+}
+
+FilterDialog::~FilterDialog()
+{ }
+
+void FilterDialog::createForm()
+{
+
+ const int colspc_x = 20;
+ const int colspc_y = 1;
+
+ QVBoxLayout* pageLayout = new QVBoxLayout(this);
+ QGridLayout* gridLayout = new QGridLayout();
+
+ // info/instructions
+ QLabel* tmpLabel = new QLabel("All fields except '" FSF_MINLEVEL_LABEL "' and '" FSF_MAXLEVEL_LABEL "' accept Regular Expression syntax.", this);
+ tmpLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ pageLayout->addWidget(tmpLabel);
+ tmpLabel = new QLabel("For an exact level match or matching multiple levels using a RegEx, use the 'Level' field.", this);
+ tmpLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ pageLayout->addWidget(tmpLabel);
+ tmpLabel = new QLabel("To limit to a simple level range (no RegEx), use the '" FSF_MINLEVEL_LABEL "' and '" FSF_MAXLEVEL_LABEL "' fields.", this);
+ tmpLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ pageLayout->addWidget(tmpLabel);
+ tmpLabel = new QLabel("Any fields left blank or not checked will not be matched against.", this);
+ tmpLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ pageLayout->addWidget(tmpLabel);
+
+ pageLayout->addItem(new QSpacerItem(colspc_x, 25));
+
+ //using an extra widget so the spacing lines up
+ QWidget* toggleAllWidget = new QWidget();
+ QHBoxLayout* toggleAllLayout = new QHBoxLayout(toggleAllWidget);
+ m_toggleAll = new ToggleAllCheckBox();
+ m_toggleAll->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
+ m_toggleAll->setTristate(true);
+ toggleAllLayout->addWidget(m_toggleAll);
+ toggleAllLayout->addWidget(new QLabel("Toggle All", this));
+ connect(m_toggleAll, SIGNAL(stateChanged(int)), this, SLOT(toggleAllToggled(int)));
+
+ pageLayout->addLayout(gridLayout);
+ gridLayout->addWidget(toggleAllWidget, 0, 0);
+
+ #define X(a, b) #a,
+ const QString labels[] = {
+ FILTERSTRINGFIELD_TABLE
+ };
+ #undef X
+
+ for (int field = FSF_Name; field < FSF_Max; ++field)
+ {
+ if (field == FSF_Info) continue;
+
+ QString name = FilterStringFieldName[field];
+ QString label = labels[field];
+ m_filterFields[name] = new FilterFormField(name, label);
+ m_fieldCount++;
+
+ }
+
+ #define X(a, b) #a,
+ const QString info_labels[] = {
+ FILTERSTRINGINFOFIELD_TABLE
+ };
+ #undef X
+
+ // Starting with head, since Light is already created above.
+ for (int field = FSIF_Head; field < FSIF_Max; ++field)
+ {
+ QString name = FilterStringInfoFieldName[field];
+ QString label = info_labels[field];
+ m_filterFields[name] = new FilterFormField(name, label);
+ m_fieldCount++;
+ }
+
+ //not part of normal regex string, but still part of filter
+ m_filterFields[FSF_MINLEVEL_NAME] = new FilterFormField(FSF_MINLEVEL_NAME, FSF_MINLEVEL_LABEL);
+ m_filterFields[FSF_MAXLEVEL_NAME] = new FilterFormField(FSF_MAXLEVEL_NAME, FSF_MAXLEVEL_LABEL);
+ m_fieldCount += 2;
+
+ const QString formFieldOrder[] = { "Name", "LastName", "Guild", "Race", "Class",
+ "Deity", "Level", FSF_MINLEVEL_NAME, FSF_MAXLEVEL_NAME, "X", "Y", "Z", "NPC", "Type",
+ "GM", "RTeam", "DTeam", "Spawn", "Light",
+ //Info fields
+ "H", "C", "A", "W", "G", "L", "F", "1", "2" };
+
+ int row = 1; //toggle all is row 0
+ int col = 0;
+ for (auto fieldname : formFieldOrder)
+ {
+ gridLayout->addWidget(m_filterFields[fieldname], row, col++);
+
+ connect(m_toggleAll, SIGNAL(stateChanged(int)), m_filterFields[fieldname], SLOT(stateChanged(int)));
+ connect(m_filterFields[fieldname]->m_check, SIGNAL(toggled(bool)), this, SLOT(fieldToggled(bool)));
+
+ if (fieldname == "Guild" || fieldname == "Deity" ||
+ fieldname == FSF_MAXLEVEL_NAME || fieldname == "Z" ||
+ fieldname == "GM" || fieldname == "Spawn" ||
+ fieldname == "Light" ||
+ fieldname == "A" || fieldname == "L")
+ {
+ row++;
+ col = 0;
+ }
+ }
+
+ //buttons
+ QHBoxLayout* buttonLayout = new QHBoxLayout();
+ pageLayout->addItem(new QSpacerItem(colspc_x, 25));
+ pageLayout->addLayout(buttonLayout);
+
+ QPushButton* resetButton = new QPushButton("Reset");
+ resetButton->setDefault(false);
+ resetButton->setAutoDefault(false);
+ buttonLayout->addWidget(resetButton);
+ connect(resetButton, SIGNAL(clicked()), this, SLOT(resetForm()));
+
+ buttonLayout->addItem(new QSpacerItem(colspc_x, colspc_y));
+
+ QPushButton* okButton = new QPushButton("Ok");
+ okButton->setDefault(false);
+ okButton->setAutoDefault(false);
+ buttonLayout->addWidget(okButton);
+ connect(okButton, SIGNAL(clicked()), this, SLOT(acceptDialog()));
+
+ QPushButton* cancelButton = new QPushButton("Cancel");
+ cancelButton->setDefault(false);
+ cancelButton->setAutoDefault(false);
+ buttonLayout->addWidget(cancelButton);
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+}
+
+void FilterDialog::setData(const QString filterString)
+{
+ m_spawnFilterString = filterString;
+
+ FilterString2FilterFieldMap(filterString, &m_spawnFilterMap);
+
+ resetForm();
+}
+
+void FilterDialog::resetForm()
+{
+ m_fieldsCheckedCount = 0;
+ for (int field = FSF_Name; field < FSF_Max; ++field)
+ {
+ if (field == FSF_Info) continue;
+
+ QString name = FilterStringFieldName[field];
+
+ m_filterFields[name]->m_edit->setText(m_spawnFilterMap[name]);
+
+ if (m_filterFields[name]->m_edit->text().length())
+ {
+ m_filterFields[name]->stateChanged(Qt::Checked);
+ m_fieldsCheckedCount++;
+ }
+ else
+ {
+ m_filterFields[name]->stateChanged(Qt::Unchecked);
+ }
+ }
+
+ //starting with Head, since Light was handled above
+ for (int field = FSIF_Head; field < FSIF_Max; ++field)
+ {
+ QString name = FilterStringInfoFieldName[field];
+ m_filterFields[name]->m_edit->setText(m_spawnFilterMap[name]);
+
+ if (m_filterFields[name]->m_edit->text().length())
+ {
+ m_filterFields[name]->stateChanged(Qt::Checked);
+ m_fieldsCheckedCount++;
+ }
+ else
+ {
+ m_filterFields[name]->stateChanged(Qt::Unchecked);
+ }
+ }
+
+ //not part of normal regex string, but still part of filter
+ m_filterFields[FSF_MINLEVEL_NAME]->m_edit->setText(m_spawnFilterMap[FSF_MINLEVEL_NAME]);
+ if (m_filterFields[FSF_MINLEVEL_NAME]->m_edit->text().length())
+ {
+ m_filterFields[FSF_MINLEVEL_NAME]->stateChanged(Qt::Checked);
+ m_fieldsCheckedCount++;
+ }
+ else
+ {
+ m_filterFields[FSF_MINLEVEL_NAME]->stateChanged(Qt::Unchecked);
+ }
+ m_filterFields[FSF_MAXLEVEL_NAME]->m_edit->setText(m_spawnFilterMap[FSF_MAXLEVEL_NAME]);
+ if (m_filterFields[FSF_MAXLEVEL_NAME]->m_edit->text().length())
+ {
+ m_filterFields[FSF_MAXLEVEL_NAME]->stateChanged(Qt::Checked);
+ m_fieldsCheckedCount++;
+ }
+ else
+ {
+ m_filterFields[FSF_MAXLEVEL_NAME]->stateChanged(Qt::Unchecked);
+ }
+
+ bool old_state = m_toggleAll->blockSignals(true);
+ if (m_fieldsCheckedCount == 0)
+ m_toggleAll->setCheckState(Qt::Unchecked);
+ else if (m_fieldsCheckedCount == m_fieldCount)
+ m_toggleAll->setCheckState(Qt::Checked);
+ else
+ m_toggleAll->setCheckState(Qt::PartiallyChecked);
+ m_toggleAll->blockSignals(old_state);
+
+}
+
+void FilterDialog::acceptDialog()
+{
+ FilterFieldMap map;
+
+ //if enabled, add to map
+ for (int field = FSF_Name; field < FSF_Max; ++field)
+ {
+ if (field == FSF_Info) continue;
+
+ QString name = FilterStringFieldName[field];
+ if (m_filterFields[name]->m_edit->isEnabled())
+ map[name] = m_filterFields[name]->m_edit->text();
+ }
+ //starting with Head since Light is handled above
+ for (int field = FSIF_Head; field < FSIF_Max; ++field)
+ {
+ QString name = FilterStringInfoFieldName[field];
+ if (m_filterFields[name]->m_edit->isEnabled())
+ map[name] = m_filterFields[name]->m_edit->text();
+ }
+ //not part of normal regex string, but still part of filter
+ if (m_filterFields[FSF_MINLEVEL_NAME]->m_edit->isEnabled())
+ map[FSF_MINLEVEL_NAME] = m_filterFields[FSF_MINLEVEL_NAME]->m_edit->text();
+
+ if (m_filterFields[FSF_MAXLEVEL_NAME]->m_edit->isEnabled())
+ map[FSF_MAXLEVEL_NAME] = m_filterFields[FSF_MAXLEVEL_NAME]->m_edit->text();
+
+
+ m_filterString = FilterFieldMap2FilterString(&map);
+
+ done(QDialog::Accepted);
+}
+
+void FilterDialog::fieldToggled(bool checked)
+{
+ if (checked)
+ m_fieldsCheckedCount++;
+ else
+ m_fieldsCheckedCount--;
+
+ bool old_state = m_toggleAll->blockSignals(true);
+ if (m_fieldsCheckedCount == m_fieldCount)
+ m_toggleAll->setCheckState(Qt::Checked);
+ else if (m_fieldsCheckedCount == 0)
+ m_toggleAll->setCheckState(Qt::Unchecked);
+ else
+ m_toggleAll->setCheckState(Qt::PartiallyChecked);
+ m_toggleAll->blockSignals(old_state);
+}
+
+void FilterDialog::toggleAllToggled(int state)
+{
+ if (sender() != m_toggleAll)
+ return;
+
+ switch(state)
+ {
+ case Qt::Checked:
+ m_fieldsCheckedCount = m_fieldCount;
+ break;
+ case Qt::Unchecked:
+ m_fieldsCheckedCount = 0;
+ break;
+ case Qt::PartiallyChecked:
+ m_toggleAll->setCheckState(Qt::Checked);
+ m_fieldsCheckedCount = m_fieldCount;
+ }
+ emit stateChanged(m_toggleAll->checkState());
+}
+
+QString FilterDialog::getFilter(QWidget* parent, const QString& title,
+ const QString& filterString, bool* ok, Qt::WindowFlags flags,
+ Qt::InputMethodHints inputMethodHints)
+{
+ FilterDialog* dlg = new FilterDialog(parent, flags);
+ dlg->setWindowTitle(title);
+ dlg->setData(filterString);
+
+ const int ret = dlg->exec();
+ if (ok)
+ *ok = ret;
+
+ QString result;
+ if (ok)
+ result = dlg->m_filterString;
+
+ dlg->deleteLater();
+ return result;
+}
+
+
+void FilterString2FilterFieldMap(const QString filterString, FilterFieldMap* map)
+{
+ if (!map || !filterString.length())
+ return;
+
+ QString levelSuffix;
+ QString regex;
+ int minLevel = -1;
+ int maxLevel = -1;
+
+ int split = filterString.lastIndexOf(';');
+ if (split == -1)
+ {
+ regex = filterString;
+ }
+ else
+ {
+ regex = filterString.left(split);
+ levelSuffix = filterString.mid(split+1);
+ }
+
+
+ // parse level range string
+ if (levelSuffix.length())
+ {
+ auto range = levelSuffix.split('-');
+ bool ok = false;
+
+ if (range.size() == 1)
+ {
+ //no dash, only a single level specified - treat as exact match
+ int level = range[0].toInt(&ok);
+ if (ok)
+ {
+ minLevel = level;
+ maxLevel = level;
+ }
+ else
+ {
+ seqWarn("Could not parse level: %s", range[0].toLatin1().data());
+ }
+ }
+ else if (range.size() == 2)
+ {
+ //one dash, two fields - treat as range
+ int level = range[0].toInt(&ok);
+ if (ok)
+ minLevel = level;
+ else
+ seqWarn("Could not parse min level: %s", range[0].toLatin1().data());
+
+ ok = false;
+ level = range[1].toInt(&ok);
+ if (ok)
+ maxLevel = level;
+ else
+ seqWarn("Could not parse max level: %s", range[0].toLatin1().data());
+
+
+ // if range wasn't fully/correctly specified, use defaults
+ minLevel = (minLevel > -1) ? minLevel : 0;
+ maxLevel = (maxLevel > -1) ? maxLevel : SHRT_MAX;
+
+ }
+ else
+ {
+ seqWarn("Ignoring malformed level range string.");
+ }
+
+ if (maxLevel < minLevel)
+ {
+ int tmp = maxLevel;
+ maxLevel = minLevel;
+ minLevel = tmp;
+ }
+ }
+
+
+ //process filter string and set form/map fields
+ QStringList tokens = regex.split(":");
+
+ QStringList::const_iterator itr = tokens.begin();
+ for (; itr < tokens.end(); ++itr)
+ {
+ QString name = *itr;
+ if (!map->contains(name))
+ {
+ if (!name.length() && itr == tokens.end() - 1)
+ {
+ //filter string has an ending : that we can ignore
+ continue;
+ }
+
+ // Info isn't in the map, but we need to process it.
+ // Also, if there are multi-field wildcards, it could parse
+ // as a name of ".*"
+ // Otherwise, skip any unknown fields
+ if (name != "Info" && name != ".*")
+ {
+ seqWarn("Ignoring unknown filter string field: %s", name.toLatin1().data());
+ ++itr; // skip this field's data
+ continue;
+ }
+ }
+
+ // handle multi-field wildcards
+ if (name == ".*")
+ {
+ if (++itr == tokens.end())
+ break;
+
+ QString value = *itr;
+ if (map->contains(value) || value == "Info")
+ {
+ // value is the next specified field name, so we'll back the
+ // iterator back to 'name == ".*"' and restart the loop
+ --itr;
+ continue;
+ }
+ else
+ {
+ // we have a value but we don't know what field it belongs to.
+ // If the next field is set, we could figure it out by working
+ // backwards, but it's probably not worth the effort.
+ // So we're just going to warn and ignore it
+ seqWarn("A match value of \"%s\" was found, but no field was specified. Ignoring.",
+ value.toLatin1().data());
+ continue;
+ }
+ }
+
+ // get field data
+ if (++itr == tokens.end())
+ break;
+ QString value = *itr;
+ if (!value.trimmed().length())
+ continue;
+
+ if (name == "Name" && (value == "Door" || value == "Drop"))
+ {
+ //we add a colon to door and drop names, so it makes
+ //parsing a little more complicated.
+ value += ":";
+ if (++itr == tokens.end())
+ break;
+ value += *itr;
+ if (value.trimmed().length() <= 1)
+ continue;
+ }
+
+ if (name == "Info")
+ {
+ //Info field contains space-separated slot:item pairs, and the
+ //items themselves can also contain spaces. So special parsing
+ //is needed.
+ bool info_done = false;
+ QString subfield_name = value;
+ while (itr != tokens.end() && !info_done)
+ {
+ //strip multi field wildcards from name (note, order matters here)
+ subfield_name = subfield_name.remove("( | .* )");
+ subfield_name = subfield_name.remove(".*");
+
+ // Check the name against valid sub-fields, because we could
+ // be past the Info field and into the next main field
+ bool is_info_field = false;
+ for (int field = FSIF_Light; field < FSIF_Max; ++field)
+ {
+ if (subfield_name == FilterStringInfoFieldName[field])
+ {
+ is_info_field = true;
+ break;
+ }
+ }
+
+ if (!is_info_field)
+ {
+ info_done = true;
+ continue;
+ }
+
+ // get value
+ if (++itr == tokens.end())
+ break;
+ value = *itr;
+ if (!value.trimmed().length())
+ continue;
+
+ //replace multi field wildcards in value/next
+ value = value.replace("( | .* )", " ");
+
+ int delim = value.lastIndexOf(' ');
+ QString next_subfield_name = value.mid(delim+1);
+ value = value.left(delim);
+
+ (*map)[subfield_name] = value.trimmed();
+
+ subfield_name = next_subfield_name;
+
+ }
+
+ if (itr == tokens.end())
+ break;
+ }
+ else
+ {
+ (*map)[name] = value.trimmed();
+ }
+ }
+
+ if (minLevel > -1)
+ (*map)[FSF_MINLEVEL_NAME] = QString::number(minLevel);
+
+ if (maxLevel > -1)
+ (*map)[FSF_MAXLEVEL_NAME] = QString::number(maxLevel);
+
+}
+
+QString FilterFieldMap2FilterString(FilterFieldMap* map)
+{
+ if (!map)
+ return QString();
+
+ QString filterString;
+ bool wildcard = false;
+ bool has_first_match = false;
+
+ for (int field = FSF_Name; field < FSF_Max; ++field)
+ {
+ QString name = FilterStringFieldName[field];
+
+ if (name == "Info")
+ {
+ //info subfields need special handling
+ bool info_added = false;
+ bool info_wildcard = false;
+ for (int info_field = FSIF_Light; info_field < FSIF_Max; ++info_field)
+ {
+ QString subfield_name = FilterStringInfoFieldName[info_field];
+ if (!map->contains(subfield_name) || !(*map)[subfield_name].trimmed().length())
+ {
+ if (!info_wildcard)
+ {
+ info_wildcard = true;
+ }
+ continue;
+ }
+
+ QString value = (*map)[subfield_name];
+ value = value.trimmed();
+
+ if (!info_added)
+ {
+ if (wildcard)
+ {
+ wildcard = false;
+ filterString += ".*:Info:";
+ }
+ else
+ {
+ filterString += "Info:";
+ }
+ info_added = true;
+ }
+
+ if (info_wildcard)
+ {
+ info_wildcard = false;
+ // we need to handle 2 cases here
+ // 1. match-field ignore-field match-field
+ // 2. match-field matchfield
+ // If we naively insert .* like we do elsewhere, we'll
+ // wind up with " .* " which will never match case 2.
+ // But we also don't want to just not include spaces
+ // in the match, because we don't want to accidentally
+ // match a different field/value (especially with short
+ // field names like C or A.
+ if (filterString.length() && filterString.endsWith(" "))
+ {
+ filterString.chop(1);
+ filterString += "( | .* )";
+ }
+ else
+ {
+ filterString += ".*";
+ }
+ }
+
+ filterString += subfield_name;
+ filterString += ":";
+ filterString += value;
+ filterString += " ";
+ }
+ //end of Info loop, tidy up
+ if (info_added)
+ {
+ if (info_wildcard)
+ {
+ info_wildcard = false;
+ filterString += ".*:";
+ }
+ else
+ {
+ filterString += ":";
+ }
+ }
+ }
+ else
+ {
+ if (!map->contains(name) || !(*map)[name].trimmed().length())
+ {
+ if (has_first_match && !wildcard)
+ {
+ wildcard = true;
+ }
+ continue;
+ }
+
+ QString value = (*map)[name];
+ value = value.trimmed();
+
+ has_first_match = true;
+
+ if (wildcard)
+ {
+ wildcard = false;
+ filterString += ".*:";
+ }
+ filterString += name;
+ filterString += ":";
+
+ //Remove/change :'s depending on the field
+ if (name == "Spawn")
+ filterString += value.replace(':', '.');
+ else if (name != "Name")
+ filterString += value.remove(':');
+ else
+ filterString += value;
+
+ filterString += ":";
+
+ }
+ }
+
+ //min/max level are not part of normal regex string, but still part of filter
+ int minLevel = -1;
+ int maxLevel = -1;
+
+ if (map->contains(FSF_MINLEVEL_NAME))
+ {
+ QString value = (*map)[FSF_MINLEVEL_NAME];
+ value = value.trimmed();
+ bool ok = false;
+ int level = value.toInt(&ok);
+ if (ok)
+ minLevel = level;
+ }
+
+ if (map->contains(FSF_MAXLEVEL_NAME))
+ {
+ QString value = (*map)[FSF_MAXLEVEL_NAME];
+ value = value.trimmed();
+ bool ok = false;
+ int level = value.toInt(&ok);
+ if (ok)
+ maxLevel = level;
+ }
+
+ if (minLevel >= 0 || maxLevel >= 0)
+ {
+ minLevel = (minLevel >= 0) ? minLevel : 0;
+ maxLevel = (maxLevel >= 0) ? maxLevel : SHRT_MAX;
+
+ if (maxLevel < minLevel)
+ {
+ int tmp = maxLevel;
+ maxLevel = minLevel;
+ minLevel = tmp;
+ }
+
+ filterString += ";";
+ filterString += QString::number(minLevel);
+ filterString += "-";
+ filterString += QString::number(maxLevel);
+ }
+
+ return filterString;
+}
+
+
+#ifndef QMAKEBUILD
+#include "filterlistwindow.moc"
+#endif
Added: showeq/trunk/src/filterlistwind...
[truncated message content] |
|
From: <cn...@us...> - 2024-08-21 19:58:55
|
Revision: 1527
http://sourceforge.net/p/seq/svn/1527
Author: cn187
Date: 2024-08-21 19:58:52 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Enable using info/equipment fields in spawn filter matches
Modified Paths:
--------------
showeq/trunk/src/filtermgr.cpp
showeq/trunk/src/filtermgr.h
showeq/trunk/src/spawn.cpp
Modified: showeq/trunk/src/filtermgr.cpp
===================================================================
--- showeq/trunk/src/filtermgr.cpp 2024-08-21 19:58:44 UTC (rev 1526)
+++ showeq/trunk/src/filtermgr.cpp 2024-08-21 19:58:52 UTC (rev 1527)
@@ -55,6 +55,11 @@
};
#undef X
+#define X(a, b) b,
+const QString InfoFilterStringFieldName[] = {
+ INFOFILTERSTRINGFIELD_TABLE
+};
+
//----------------------------------------------------------------------
// FilterMgr
FilterMgr::FilterMgr(const DataLocationMgr* dataLocMgr,
@@ -427,9 +432,17 @@
//init m_spawnFilterMap
for (int field = FSF_Name; field < FSF_Max; ++field)
{
+ if (field == FSF_Info) continue;
+
QString name = FilterStringFieldName[field];
m_spawnFilterMap[name] = "";
}
+ //starting with Head since Light is handled above
+ for (int field = IFSF_Head; field < IFSF_Max; ++field)
+ {
+ QString name = InfoFilterStringFieldName[field];
+ m_spawnFilterMap[name] = "";
+ }
m_spawnFilterMap[FSF_MINLEVEL_NAME] = "";
m_spawnFilterMap[FSF_MAXLEVEL_NAME] = "";
@@ -479,10 +492,12 @@
const QString labels[] = {
"Name", "Level", "Race", "Class", "NPC", "X", "Y", "Z", "Light", "Deity",
- "Race Team", "Deity Team", "Type", "Last Name", "Guild", "Spawn Time", "GM" };
+ "Race Team", "Deity Team", "Type", "Last Name", "Guild", "Spawn Time", "Info", "GM" };
for (int field = FSF_Name; field < FSF_Max; ++field)
{
+ if (field == FSF_Info) continue;
+
QString name = FilterStringFieldName[field];
QString label = labels[field];
m_filterFields[name] = new FilterFormField(name, label);
@@ -490,6 +505,19 @@
}
+ const QString info_labels[] = {
+ "Light", "Head", "Chest", "Arms", "Waist", "Gloves", "Legs", "Feet",
+ "Primary", "Secondary" };
+
+ // Starting with head, since Light is already created above.
+ for (int field = IFSF_Head; field < IFSF_Max; ++field)
+ {
+ QString name = InfoFilterStringFieldName[field];
+ QString label = info_labels[field];
+ m_filterFields[name] = new FilterFormField(name, label);
+ m_fieldCount++;
+ }
+
//not part of normal regex string, but still part of filter
m_filterFields[FSF_MINLEVEL_NAME] = new FilterFormField(FSF_MINLEVEL_NAME, FSF_MINLEVEL_LABEL);
m_filterFields[FSF_MAXLEVEL_NAME] = new FilterFormField(FSF_MAXLEVEL_NAME, FSF_MAXLEVEL_LABEL);
@@ -497,7 +525,9 @@
const QString formFieldOrder[] = { "Name", "LastName", "Guild", "Race", "Class",
"Deity", "Level", FSF_MINLEVEL_NAME, FSF_MAXLEVEL_NAME, "X", "Y", "Z", "NPC", "Type",
- "GM", "RTeam", "DTeam", "Spawn", "Light" };
+ "GM", "RTeam", "DTeam", "Spawn", "Light",
+ //Info fields
+ "H", "C", "A", "W", "G", "L", "F", "1", "2" };
int row = 1; //toggle all is row 0
int col = 0;
@@ -510,7 +540,9 @@
if (fieldname == "Guild" || fieldname == "Deity" ||
fieldname == FSF_MAXLEVEL_NAME || fieldname == "Z" ||
- fieldname == "GM" || fieldname == "Spawn")
+ fieldname == "GM" || fieldname == "Spawn" ||
+ fieldname == "Light" ||
+ fieldname == "A" || fieldname == "L")
{
row++;
col = 0;
@@ -557,7 +589,10 @@
m_fieldsCheckedCount = 0;
for (int field = FSF_Name; field < FSF_Max; ++field)
{
+ if (field == FSF_Info) continue;
+
QString name = FilterStringFieldName[field];
+
m_filterFields[name]->m_edit->setText(m_spawnFilterMap[name]);
if (m_filterFields[name]->m_edit->text().length())
@@ -570,6 +605,24 @@
m_filterFields[name]->stateChanged(Qt::Unchecked);
}
}
+
+ //starting with Head, since Light was handled above
+ for (int field = IFSF_Head; field < IFSF_Max; ++field)
+ {
+ QString name = InfoFilterStringFieldName[field];
+ m_filterFields[name]->m_edit->setText(m_spawnFilterMap[name]);
+
+ if (m_filterFields[name]->m_edit->text().length())
+ {
+ m_filterFields[name]->stateChanged(Qt::Checked);
+ m_fieldsCheckedCount++;
+ }
+ else
+ {
+ m_filterFields[name]->stateChanged(Qt::Unchecked);
+ }
+ }
+
//not part of normal regex string, but still part of filter
m_filterFields[FSF_MINLEVEL_NAME]->m_edit->setText(m_spawnFilterMap[FSF_MINLEVEL_NAME]);
if (m_filterFields[FSF_MINLEVEL_NAME]->m_edit->text().length())
@@ -610,10 +663,19 @@
//if enabled, add to map
for (int field = FSF_Name; field < FSF_Max; ++field)
{
+ if (field == FSF_Info) continue;
+
QString name = FilterStringFieldName[field];
if (m_filterFields[name]->m_edit->isEnabled())
map[name] = m_filterFields[name]->m_edit->text();
}
+ //starting with Head since Light is handled above
+ for (int field = IFSF_Head; field < IFSF_Max; ++field)
+ {
+ QString name = InfoFilterStringFieldName[field];
+ if (m_filterFields[name]->m_edit->isEnabled())
+ map[name] = m_filterFields[name]->m_edit->text();
+ }
//not part of normal regex string, but still part of filter
if (m_filterFields[FSF_MINLEVEL_NAME]->m_edit->isEnabled())
map[FSF_MINLEVEL_NAME] = m_filterFields[FSF_MINLEVEL_NAME]->m_edit->text();
@@ -768,17 +830,8 @@
//process filter string and set form fields
QStringList tokens = regex.split(":");
- //fields should be key:value, but split will create an extra item in the
- //list after the last :, so for a well-formed filterString, there should
- //always be an odd number of elements
- if (tokens.length() % 2 != 1)
- {
- seqWarn("Malformed filterString regex: %s", regex.toLatin1().data());
- return;
- }
-
QStringList::const_iterator itr = tokens.begin();
- for (;itr < tokens.end(); ++itr)
+ for (; itr < tokens.end(); ++itr)
{
QString name = *itr;
if (!map->contains(name))
@@ -789,29 +842,84 @@
continue;
}
- seqWarn("Ignoring unknown filter string field: %s", name.toLatin1().data());
- ++itr; // skip this field's data
- continue;
+ // Info isn't in the map, but we need to process it
+ // otherwise, skip any unknown fields
+ if (name != "Info")
+ {
+ seqWarn("Ignoring unknown filter string field: %s", name.toLatin1().data());
+ ++itr; // skip this field's data
+ continue;
+ }
}
+ // get field data
if (++itr == tokens.end())
+ break;
+ QString value = *itr;
+ if (!value.trimmed().length())
continue;
- QString value = *itr;
if (name == "Name" && (value == "Door" || value == "Drop"))
{
- //infuriatingly, we add a colon to door and drop names.
- //TODO try to find out how many people's filters this will break
- //if we remove the : from door and drop names (maybe replace it with
- //a - or something. Or save it for 7.x and do it anyway.
- //TODO also, check on adding trailing : to Item spawn filterstring
- //to make it consistent with the Spawn filterstring
+ //we add a colon to door and drop names, so it makes
+ //parsing a little more complicated.
value += ":";
if (++itr == tokens.end())
+ break;
+ value += *itr;
+ if (value.trimmed().length() <= 1)
continue;
- value += *itr;
}
- (*map)[name] = value.trimmed();
+ if (name == "Info")
+ {
+ //Info field contains space-separated slot:item pairs, and the
+ //items themselves can also contain spaces. So special parsing
+ //is needed.
+ bool info_done = false;
+ QString subfield_name = value;
+ while (itr != tokens.end() && !info_done)
+ {
+ // Check the name against valid sub-fields, because we could
+ // be past the Info field and into the next main field
+ bool is_info_field = false;
+ for (int field = IFSF_Light; field < IFSF_Max; ++field)
+ {
+ if (subfield_name == InfoFilterStringFieldName[field])
+ {
+ is_info_field = true;
+ break;
+ }
+ }
+
+ if (!is_info_field)
+ {
+ info_done = true;
+ continue;
+ }
+
+ // get value
+ if (++itr == tokens.end())
+ break;
+ value = *itr;
+ if (!value.trimmed().length())
+ continue;
+
+ QString next_subfield_name = value.section(" ", -1);
+ value = value.section(" ", 0, -2);
+
+ (*map)[subfield_name] = value.trimmed();
+
+ subfield_name = next_subfield_name;
+
+ }
+
+ if (itr == tokens.end())
+ break;
+ }
+ else
+ {
+ (*map)[name] = value.trimmed();
+ }
}
if (minLevel > -1)
@@ -835,30 +943,109 @@
{
QString name = FilterStringFieldName[field];
- if (!map->contains(name) || !(*map)[name].trimmed().length())
+ if (name == "Info")
{
- if (has_first_match && !wildcard)
+ //info subfields need special handling
+ bool info_added = false;
+ bool info_wildcard = false;
+ for (int info_field = IFSF_Light; info_field < IFSF_Max; ++info_field)
{
- wildcard = true;
+ QString subfield_name = InfoFilterStringFieldName[info_field];
+ if (!map->contains(subfield_name) || !(*map)[subfield_name].trimmed().length())
+ {
+ if (!info_wildcard)
+ {
+ info_wildcard = true;
+ }
+ continue;
+ }
+
+ QString value = (*map)[subfield_name];
+ value = value.trimmed();
+
+ if (!info_added)
+ {
+ if (wildcard)
+ {
+ wildcard = false;
+ filterString += ".*:Info:";
+ }
+ else
+ {
+ filterString += "Info:";
+ }
+ info_added = true;
+ }
+
+ if (info_wildcard)
+ {
+ info_wildcard = false;
+ // we need to handle 2 cases here
+ // 1. match-field ignore-field match-field
+ // 2. match-field matchfield
+ // If we naively insert .* like we do elsewhere, we'll
+ // wind up with " .* " which will never match case 2.
+ // But we also don't want to just not include spaces
+ // in the match, because we don't want to accidentally
+ // match a different field/value (especially with short
+ // field names like C or A.
+ if (filterString.length() && filterString.endsWith(" "))
+ {
+ filterString.chop(1);
+ filterString += "( | .* )";
+ }
+ else
+ {
+ filterString += ".*";
+ }
+ }
+
+ filterString += subfield_name;
+ filterString += ":";
+ filterString += value;
+ filterString += " ";
}
- continue;
+ //end of Info loop, tidy up
+ if (info_added)
+ {
+ if (info_wildcard)
+ {
+ info_wildcard = false;
+ filterString += ".*:";
+ }
+ else
+ {
+ filterString += ":";
+ }
+ }
}
+ else
+ {
+ if (!map->contains(name) || !(*map)[name].trimmed().length())
+ {
+ if (has_first_match && !wildcard)
+ {
+ wildcard = true;
+ }
+ continue;
+ }
- QString value = (*map)[name];
- value = value.trimmed();
+ QString value = (*map)[name];
+ value = value.trimmed();
- has_first_match = true;
+ has_first_match = true;
- if (wildcard)
- {
- wildcard = false;
- filterString += ".*:";
+ if (wildcard)
+ {
+ wildcard = false;
+ filterString += ".*:";
+ }
+ filterString += name;
+ filterString += ":";
+ filterString += value;
+ filterString += ":";
+
}
- filterString += name;
- filterString += ":";
- filterString += value;
- filterString += ":";
-
}
//min/max level are not part of normal regex string, but still part of filter
Modified: showeq/trunk/src/filtermgr.h
===================================================================
--- showeq/trunk/src/filtermgr.h 2024-08-21 19:58:44 UTC (rev 1526)
+++ showeq/trunk/src/filtermgr.h 2024-08-21 19:58:52 UTC (rev 1527)
@@ -83,25 +83,39 @@
#define FILTER_FLAG_TRACER (1 << TRACER_FILTER)
-#define FILTERSTRINGFIELD_TABLE \
- X(FSF_Name, "Name") \
- X(FSF_Level, "Level") \
- X(FSF_Race, "Race") \
- X(FSF_Class, "Class") \
- X(FSF_NPC, "NPC") \
- X(FSF_X, "X") \
- X(FSF_Y, "Y") \
- X(FSF_Z, "Z") \
- X(FSF_Light, "Light") \
- X(FSF_Deity, "Deity") \
- X(FSF_RTeam, "RTeam") \
- X(FSF_DTeam, "DTeam") \
- X(FSF_Type, "Type") \
- X(FSF_LastName, "LastName") \
- X(FSF_Guild, "Guild") \
- X(FSF_Spawn, "Spawn") \
+#define FILTERSTRINGFIELD_TABLE \
+ X(FSF_Name, "Name") \
+ X(FSF_Level, "Level") \
+ X(FSF_Race, "Race") \
+ X(FSF_Class, "Class") \
+ X(FSF_NPC, "NPC") \
+ X(FSF_X, "X") \
+ X(FSF_Y, "Y") \
+ X(FSF_Z, "Z") \
+ X(FSF_Light, "Light") \
+ X(FSF_Deity, "Deity") \
+ X(FSF_RTeam, "RTeam") \
+ X(FSF_DTeam, "DTeam") \
+ X(FSF_Type, "Type") \
+ X(FSF_LastName, "LastName") \
+ X(FSF_Guild, "Guild") \
+ X(FSF_Spawn, "Spawn") \
+ X(FSF_Info, "Info") \
X(FSF_GM, "GM")
+#define INFOFILTERSTRINGFIELD_TABLE \
+ X(IFSF_Light, "Light") \
+ X(IFSF_Head, "H") \
+ X(IFSF_Chest, "C") \
+ X(IFSF_Arms, "A") \
+ X(IFSF_Waist, "W") \
+ X(IFSF_Gloves, "G") \
+ X(IFSF_Legs, "L") \
+ X(IFSF_Feet, "F") \
+ X(IFSF_Primary, "1") \
+ X(IFSF_Secondary, "2")
+
+
#define X(a, b) a,
enum FilterStringField
{
@@ -110,7 +124,15 @@
};
#undef X
+#define X(a, b) a,
+enum InfoFilterStringField
+{
+ INFOFILTERSTRINGFIELD_TABLE
+ IFSF_Max
+};
+#undef X
+
// special handling for min/max level, which aren't part of regex filter string
#define FSF_MINLEVEL_NAME "MinLevel"
#define FSF_MINLEVEL_LABEL "Min Level"
Modified: showeq/trunk/src/spawn.cpp
===================================================================
--- showeq/trunk/src/spawn.cpp 2024-08-21 19:58:44 UTC (rev 1526)
+++ showeq/trunk/src/spawn.cpp 2024-08-21 19:58:52 UTC (rev 1527)
@@ -301,13 +301,13 @@
{
QString buff;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff = QString::asprintf("Name:%s:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d",
+ buff = QString::asprintf("Name:%s:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d:",
transformedName().toUtf8().data(),
raceString().toUtf8().data(),
classString().toUtf8().data(),
NPC(), x(), y(), z());
#else
- buff.sprintf("Name:%s:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d",
+ buff.sprintf("Name:%s:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d:",
transformedName().toUtf8().data(),
raceString().toUtf8().data(),
classString().toUtf8().data(),
@@ -960,7 +960,8 @@
QString buff;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
buff = QString::asprintf("Name:%s:Level:%d:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d:"
- "Light:%s:Deity:%s:RTeam:%d:DTeam:%d:Type:%s:LastName:%s:Guild:%s:Spawn:%s:",
+ "Light:%s:Deity:%s:RTeam:%d:DTeam:%d:Type:%s:LastName:%s:Guild:%s:Spawn:%s:"
+ "Info:%s:",
name.toUtf8().data(),
level(),
raceString().toUtf8().data(),
@@ -974,11 +975,13 @@
typeString().toUtf8().data(),
lastName().toUtf8().data(),
guildTag().toUtf8().data(),
- spawnTimeStr ().replace (":", ".").toUtf8 ().data ()
+ spawnTimeStr ().replace (":", ".").toUtf8 ().data (),
+ info().toUtf8().data()
);
#else
buff.sprintf("Name:%s:Level:%d:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d:"
- "Light:%s:Deity:%s:RTeam:%d:DTeam:%d:Type:%s:LastName:%s:Guild:%s:Spawn:%s:",
+ "Light:%s:Deity:%s:RTeam:%d:DTeam:%d:Type:%s:LastName:%s:Guild:%s:Spawn:%s:"
+ "Info:%s:",
name.toUtf8().data(),
level(),
raceString().toUtf8().data(),
@@ -992,7 +995,8 @@
typeString().toUtf8().data(),
lastName().toUtf8().data(),
guildTag().toUtf8().data(),
- spawnTimeStr ().replace (":", ".").toUtf8 ().data ()
+ spawnTimeStr ().replace (":", ".").toUtf8 ().data (),
+ info().toUtf8().data()
);
#endif
@@ -1021,6 +1025,7 @@
+ ":DTeam:" + QString::number(deityTeam())
+ ":Type:" + typeString()
+ ":Guild:" + guildTag()
+ + ":Info:" + info()
+ ":FilterFlags:" + QString::number(filterFlags())
+ ":";
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 19:58:47
|
Revision: 1526
http://sourceforge.net/p/seq/svn/1526
Author: cn187
Date: 2024-08-21 19:58:44 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Redesign filter add dialog
Modified Paths:
--------------
showeq/trunk/src/filtermgr.cpp
showeq/trunk/src/filtermgr.h
showeq/trunk/src/spawnlistcommon.cpp
Modified: showeq/trunk/src/filtermgr.cpp
===================================================================
--- showeq/trunk/src/filtermgr.cpp 2024-08-21 19:58:37 UTC (rev 1525)
+++ showeq/trunk/src/filtermgr.cpp 2024-08-21 19:58:44 UTC (rev 1526)
@@ -35,6 +35,13 @@
#include <QRegExp>
#include <QString>
#include <QFileInfo>
+#include <QLineEdit>
+#include <QLabel>
+#include <QGridLayout>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QPushButton>
+#include <QCheckBox>
//
// ZBTEMP: predefined filters and filter mask will be migrated out
@@ -42,6 +49,12 @@
// at runtime ala the runtime Filter stuff
//
+#define X(a, b) b,
+const QString FilterStringFieldName[] = {
+ FILTERSTRINGFIELD_TABLE
+};
+#undef X
+
//----------------------------------------------------------------------
// FilterMgr
FilterMgr::FilterMgr(const DataLocationMgr* dataLocMgr,
@@ -332,6 +345,567 @@
emit runtimeFiltersChanged(type);
}
+
+
+FilterFormField::FilterFormField(QString name, QString labeltext, QWidget* parent) :
+ QWidget(parent),
+ m_name(name),
+ m_labeltext(labeltext),
+ m_check(nullptr),
+ m_label(nullptr),
+ m_edit(nullptr)
+{
+ if (m_labeltext.isNull())
+ m_labeltext = m_name;
+
+ m_check = new QCheckBox(this);
+ m_check->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
+
+ m_label = new QLabel(m_labeltext, this);
+ QSizePolicy tmpPolicy = m_label->sizePolicy();
+ tmpPolicy.setVerticalPolicy(QSizePolicy::Fixed);
+ m_label->setSizePolicy(tmpPolicy);
+
+ m_edit = new QLineEdit(this);
+ tmpPolicy = m_edit->sizePolicy();
+ tmpPolicy.setVerticalPolicy(QSizePolicy::Fixed);
+ m_edit->setSizePolicy(tmpPolicy);
+
+ QHBoxLayout* layout = new QHBoxLayout(this);
+ layout->addWidget(m_check);
+ layout->addWidget(m_label);
+ layout->addWidget(m_edit);
+
+ connect(m_check, SIGNAL(toggled(bool)), m_edit, SLOT(setEnabled(bool)));
+}
+
+void FilterFormField::stateChanged(int state)
+{
+ bool old_check_state = m_check->blockSignals(true);
+ bool old_edit_state = m_edit->blockSignals(true);
+ switch (state)
+ {
+ case Qt::Unchecked:
+ m_check->setChecked(false);
+ m_edit->setEnabled(false);
+ break;
+ case Qt::PartiallyChecked:
+ break;
+ case Qt::Checked:
+ m_check->setChecked(true);
+ m_edit->setEnabled(true);
+ break;
+ }
+ m_check->blockSignals(old_check_state);
+ m_edit->blockSignals(old_edit_state);
+}
+
+void ToggleAllCheckBox::nextCheckState()
+{
+ switch(checkState())
+ {
+ case Qt::Unchecked:
+ setCheckState(Qt::Checked);
+ break;
+ case Qt::PartiallyChecked:
+ setCheckState(Qt::Unchecked);
+ break;
+ case Qt::Checked:
+ setCheckState(Qt::Unchecked);
+ break;
+ }
+
+}
+
+FilterDialog::FilterDialog(QWidget* parent, Qt::WindowFlags flags) :
+ QDialog(parent, flags),
+ m_toggleAll(nullptr),
+ m_filterString(QString()),
+ m_fieldCount(0),
+ m_fieldsCheckedCount(0)
+{
+ //init m_spawnFilterMap
+ for (int field = FSF_Name; field < FSF_Max; ++field)
+ {
+ QString name = FilterStringFieldName[field];
+ m_spawnFilterMap[name] = "";
+ }
+ m_spawnFilterMap[FSF_MINLEVEL_NAME] = "";
+ m_spawnFilterMap[FSF_MAXLEVEL_NAME] = "";
+
+ createForm();
+}
+
+FilterDialog::~FilterDialog()
+{ }
+
+void FilterDialog::createForm()
+{
+
+ const int colspc_x = 20;
+ const int colspc_y = 1;
+
+ QVBoxLayout* pageLayout = new QVBoxLayout(this);
+ QGridLayout* gridLayout = new QGridLayout();
+
+ // info/instructions
+ QLabel* tmpLabel = new QLabel("All fields except '" FSF_MINLEVEL_LABEL "' and '" FSF_MAXLEVEL_LABEL "' accept Regular Expression syntax.", this);
+ tmpLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ pageLayout->addWidget(tmpLabel);
+ tmpLabel = new QLabel("For an exact level match or matching multiple levels using a RegEx, use the 'Level' field.", this);
+ tmpLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ pageLayout->addWidget(tmpLabel);
+ tmpLabel = new QLabel("To limit to a simple level range (no RegEx), use the '" FSF_MINLEVEL_LABEL "' and '" FSF_MAXLEVEL_LABEL "' fields.", this);
+ tmpLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ pageLayout->addWidget(tmpLabel);
+ tmpLabel = new QLabel("Any fields left blank or not checked will not be matched against.", this);
+ tmpLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ pageLayout->addWidget(tmpLabel);
+
+ pageLayout->addItem(new QSpacerItem(colspc_x, 25));
+
+ //using an extra widget so the spacing lines up
+ QWidget* toggleAllWidget = new QWidget();
+ QHBoxLayout* toggleAllLayout = new QHBoxLayout(toggleAllWidget);
+ m_toggleAll = new ToggleAllCheckBox();
+ m_toggleAll->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
+ m_toggleAll->setTristate(true);
+ toggleAllLayout->addWidget(m_toggleAll);
+ toggleAllLayout->addWidget(new QLabel("Toggle All", this));
+ connect(m_toggleAll, SIGNAL(stateChanged(int)), this, SLOT(toggleAllToggled(int)));
+
+ pageLayout->addLayout(gridLayout);
+ gridLayout->addWidget(toggleAllWidget, 0, 0);
+
+ const QString labels[] = {
+ "Name", "Level", "Race", "Class", "NPC", "X", "Y", "Z", "Light", "Deity",
+ "Race Team", "Deity Team", "Type", "Last Name", "Guild", "Spawn Time", "GM" };
+
+ for (int field = FSF_Name; field < FSF_Max; ++field)
+ {
+ QString name = FilterStringFieldName[field];
+ QString label = labels[field];
+ m_filterFields[name] = new FilterFormField(name, label);
+ m_fieldCount++;
+
+ }
+
+ //not part of normal regex string, but still part of filter
+ m_filterFields[FSF_MINLEVEL_NAME] = new FilterFormField(FSF_MINLEVEL_NAME, FSF_MINLEVEL_LABEL);
+ m_filterFields[FSF_MAXLEVEL_NAME] = new FilterFormField(FSF_MAXLEVEL_NAME, FSF_MAXLEVEL_LABEL);
+ m_fieldCount += 2;
+
+ const QString formFieldOrder[] = { "Name", "LastName", "Guild", "Race", "Class",
+ "Deity", "Level", FSF_MINLEVEL_NAME, FSF_MAXLEVEL_NAME, "X", "Y", "Z", "NPC", "Type",
+ "GM", "RTeam", "DTeam", "Spawn", "Light" };
+
+ int row = 1; //toggle all is row 0
+ int col = 0;
+ for (auto fieldname : formFieldOrder)
+ {
+ gridLayout->addWidget(m_filterFields[fieldname], row, col++);
+
+ connect(m_toggleAll, SIGNAL(stateChanged(int)), m_filterFields[fieldname], SLOT(stateChanged(int)));
+ connect(m_filterFields[fieldname]->m_check, SIGNAL(toggled(bool)), this, SLOT(fieldToggled(bool)));
+
+ if (fieldname == "Guild" || fieldname == "Deity" ||
+ fieldname == FSF_MAXLEVEL_NAME || fieldname == "Z" ||
+ fieldname == "GM" || fieldname == "Spawn")
+ {
+ row++;
+ col = 0;
+ }
+ }
+
+ //buttons
+ QHBoxLayout* buttonLayout = new QHBoxLayout();
+ pageLayout->addItem(new QSpacerItem(colspc_x, 25));
+ pageLayout->addLayout(buttonLayout);
+
+ QPushButton* resetButton = new QPushButton("Reset");
+ resetButton->setDefault(false);
+ resetButton->setAutoDefault(false);
+ buttonLayout->addWidget(resetButton);
+ connect(resetButton, SIGNAL(clicked()), this, SLOT(resetForm()));
+
+ buttonLayout->addItem(new QSpacerItem(colspc_x, colspc_y));
+
+ QPushButton* okButton = new QPushButton("Ok");
+ okButton->setDefault(false);
+ okButton->setAutoDefault(false);
+ buttonLayout->addWidget(okButton);
+ connect(okButton, SIGNAL(clicked()), this, SLOT(acceptDialog()));
+
+ QPushButton* cancelButton = new QPushButton("Cancel");
+ cancelButton->setDefault(false);
+ cancelButton->setAutoDefault(false);
+ buttonLayout->addWidget(cancelButton);
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+}
+
+void FilterDialog::setData(const QString filterString)
+{
+ m_spawnFilterString = filterString;
+
+ FilterString2FilterFieldMap(filterString, &m_spawnFilterMap);
+
+ resetForm();
+}
+
+void FilterDialog::resetForm()
+{
+ m_fieldsCheckedCount = 0;
+ for (int field = FSF_Name; field < FSF_Max; ++field)
+ {
+ QString name = FilterStringFieldName[field];
+ m_filterFields[name]->m_edit->setText(m_spawnFilterMap[name]);
+
+ if (m_filterFields[name]->m_edit->text().length())
+ {
+ m_filterFields[name]->stateChanged(Qt::Checked);
+ m_fieldsCheckedCount++;
+ }
+ else
+ {
+ m_filterFields[name]->stateChanged(Qt::Unchecked);
+ }
+ }
+ //not part of normal regex string, but still part of filter
+ m_filterFields[FSF_MINLEVEL_NAME]->m_edit->setText(m_spawnFilterMap[FSF_MINLEVEL_NAME]);
+ if (m_filterFields[FSF_MINLEVEL_NAME]->m_edit->text().length())
+ {
+ m_filterFields[FSF_MINLEVEL_NAME]->stateChanged(Qt::Checked);
+ m_fieldsCheckedCount++;
+ }
+ else
+ {
+ m_filterFields[FSF_MINLEVEL_NAME]->stateChanged(Qt::Unchecked);
+ }
+ m_filterFields[FSF_MAXLEVEL_NAME]->m_edit->setText(m_spawnFilterMap[FSF_MAXLEVEL_NAME]);
+ if (m_filterFields[FSF_MAXLEVEL_NAME]->m_edit->text().length())
+ {
+ m_filterFields[FSF_MAXLEVEL_NAME]->stateChanged(Qt::Checked);
+ m_fieldsCheckedCount++;
+ }
+ else
+ {
+ m_filterFields[FSF_MAXLEVEL_NAME]->stateChanged(Qt::Unchecked);
+ }
+
+ bool old_state = m_toggleAll->blockSignals(true);
+ if (m_fieldsCheckedCount == 0)
+ m_toggleAll->setCheckState(Qt::Unchecked);
+ else if (m_fieldsCheckedCount == m_fieldCount)
+ m_toggleAll->setCheckState(Qt::Checked);
+ else
+ m_toggleAll->setCheckState(Qt::PartiallyChecked);
+ m_toggleAll->blockSignals(old_state);
+
+}
+
+void FilterDialog::acceptDialog()
+{
+ FilterFieldMap map;
+
+ //if enabled, add to map
+ for (int field = FSF_Name; field < FSF_Max; ++field)
+ {
+ QString name = FilterStringFieldName[field];
+ if (m_filterFields[name]->m_edit->isEnabled())
+ map[name] = m_filterFields[name]->m_edit->text();
+ }
+ //not part of normal regex string, but still part of filter
+ if (m_filterFields[FSF_MINLEVEL_NAME]->m_edit->isEnabled())
+ map[FSF_MINLEVEL_NAME] = m_filterFields[FSF_MINLEVEL_NAME]->m_edit->text();
+
+ if (m_filterFields[FSF_MAXLEVEL_NAME]->m_edit->isEnabled())
+ map[FSF_MAXLEVEL_NAME] = m_filterFields[FSF_MAXLEVEL_NAME]->m_edit->text();
+
+
+ m_filterString = FilterFieldMap2FilterString(&map);
+
+ done(QDialog::Accepted);
+}
+
+void FilterDialog::fieldToggled(bool checked)
+{
+ if (checked)
+ m_fieldsCheckedCount++;
+ else
+ m_fieldsCheckedCount--;
+
+ bool old_state = m_toggleAll->blockSignals(true);
+ if (m_fieldsCheckedCount == m_fieldCount)
+ m_toggleAll->setCheckState(Qt::Checked);
+ else if (m_fieldsCheckedCount == 0)
+ m_toggleAll->setCheckState(Qt::Unchecked);
+ else
+ m_toggleAll->setCheckState(Qt::PartiallyChecked);
+ m_toggleAll->blockSignals(old_state);
+}
+
+void FilterDialog::toggleAllToggled(int state)
+{
+ if (sender() != m_toggleAll)
+ return;
+
+ switch(state)
+ {
+ case Qt::Checked:
+ m_fieldsCheckedCount = m_fieldCount;
+ break;
+ case Qt::Unchecked:
+ m_fieldsCheckedCount = 0;
+ break;
+ case Qt::PartiallyChecked:
+ m_toggleAll->setCheckState(Qt::Checked);
+ m_fieldsCheckedCount = m_fieldCount;
+ }
+ emit stateChanged(m_toggleAll->checkState());
+}
+
+QString FilterDialog::getFilter(QWidget* parent, const QString& title,
+ const QString& filterString, bool* ok, Qt::WindowFlags flags,
+ Qt::InputMethodHints inputMethodHints)
+{
+ FilterDialog* dlg = new FilterDialog(parent, flags);
+ dlg->setWindowTitle(title);
+ dlg->setData(filterString);
+
+ const int ret = dlg->exec();
+ if (ok)
+ *ok = ret;
+
+ QString result;
+ if (ok)
+ result = dlg->m_filterString;
+
+ dlg->deleteLater();
+ return result;
+}
+
+
+void FilterString2FilterFieldMap(const QString filterString, FilterFieldMap* map)
+{
+ if (!map || !filterString.length())
+ return;
+
+ QString levelSuffix;
+ QString regex;
+ int minLevel = -1;
+ int maxLevel = -1;
+
+ int split = filterString.lastIndexOf(';');
+ if (split == -1)
+ {
+ regex = filterString;
+ }
+ else
+ {
+ regex = filterString.left(split);
+ levelSuffix = filterString.mid(split+1);
+ }
+
+
+ // parse level range string
+ if (levelSuffix.length())
+ {
+ auto range = levelSuffix.split('-');
+ bool ok = false;
+
+ if (range.size() == 1)
+ {
+ //no dash, only a single level specified - treat as exact match
+ int level = range[0].toInt(&ok);
+ if (ok)
+ {
+ minLevel = level;
+ maxLevel = level;
+ }
+ else
+ {
+ seqWarn("Could not parse level: %s", range[0].toLatin1().data());
+ }
+ }
+ else if (range.size() == 2)
+ {
+ //one dash, two fields - treat as range
+ int level = range[0].toInt(&ok);
+ if (ok)
+ minLevel = level;
+ else
+ seqWarn("Could not parse min level: %s", range[0].toLatin1().data());
+
+ ok = false;
+ level = range[1].toInt(&ok);
+ if (ok)
+ maxLevel = level;
+ else
+ seqWarn("Could not parse max level: %s", range[0].toLatin1().data());
+
+
+ // if range wasn't fully/correctly specified, use defaults
+ minLevel = (minLevel > -1) ? minLevel : 0;
+ maxLevel = (maxLevel > -1) ? maxLevel : SHRT_MAX;
+
+ }
+ else
+ {
+ seqWarn("Ignoring malformed level range string.");
+ }
+
+ if (maxLevel < minLevel)
+ {
+ int tmp = maxLevel;
+ maxLevel = minLevel;
+ minLevel = tmp;
+ }
+ }
+
+
+ // parse regex string and set map fields
+
+ //process filter string and set form fields
+ QStringList tokens = regex.split(":");
+
+ //fields should be key:value, but split will create an extra item in the
+ //list after the last :, so for a well-formed filterString, there should
+ //always be an odd number of elements
+ if (tokens.length() % 2 != 1)
+ {
+ seqWarn("Malformed filterString regex: %s", regex.toLatin1().data());
+ return;
+ }
+
+ QStringList::const_iterator itr = tokens.begin();
+ for (;itr < tokens.end(); ++itr)
+ {
+ QString name = *itr;
+ if (!map->contains(name))
+ {
+ if (!name.length() && itr == tokens.end() - 1)
+ {
+ //filter string has an ending : that we can ignore
+ continue;
+ }
+
+ seqWarn("Ignoring unknown filter string field: %s", name.toLatin1().data());
+ ++itr; // skip this field's data
+ continue;
+ }
+ if (++itr == tokens.end())
+ continue;
+ QString value = *itr;
+
+ if (name == "Name" && (value == "Door" || value == "Drop"))
+ {
+ //infuriatingly, we add a colon to door and drop names.
+ //TODO try to find out how many people's filters this will break
+ //if we remove the : from door and drop names (maybe replace it with
+ //a - or something. Or save it for 7.x and do it anyway.
+ //TODO also, check on adding trailing : to Item spawn filterstring
+ //to make it consistent with the Spawn filterstring
+ value += ":";
+ if (++itr == tokens.end())
+ continue;
+ value += *itr;
+ }
+
+ (*map)[name] = value.trimmed();
+ }
+
+ if (minLevel > -1)
+ (*map)[FSF_MINLEVEL_NAME] = QString::number(minLevel);
+
+ if (maxLevel > -1)
+ (*map)[FSF_MAXLEVEL_NAME] = QString::number(maxLevel);
+
+}
+
+QString FilterFieldMap2FilterString(FilterFieldMap* map)
+{
+ if (!map)
+ return QString();
+
+ QString filterString;
+ bool wildcard = false;
+ bool has_first_match = false;
+
+ for (int field = FSF_Name; field < FSF_Max; ++field)
+ {
+ QString name = FilterStringFieldName[field];
+
+ if (!map->contains(name) || !(*map)[name].trimmed().length())
+ {
+ if (has_first_match && !wildcard)
+ {
+ wildcard = true;
+ }
+ continue;
+ }
+
+ QString value = (*map)[name];
+ value = value.trimmed();
+
+ has_first_match = true;
+
+ if (wildcard)
+ {
+ wildcard = false;
+ filterString += ".*:";
+ }
+ filterString += name;
+ filterString += ":";
+ filterString += value;
+ filterString += ":";
+
+ }
+
+ //min/max level are not part of normal regex string, but still part of filter
+ int minLevel = -1;
+ int maxLevel = -1;
+
+ if (map->contains(FSF_MINLEVEL_NAME))
+ {
+ QString value = (*map)[FSF_MINLEVEL_NAME];
+ value = value.trimmed();
+ bool ok = false;
+ int level = value.toInt(&ok);
+ if (ok)
+ minLevel = level;
+ }
+
+ if (map->contains(FSF_MAXLEVEL_NAME))
+ {
+ QString value = (*map)[FSF_MAXLEVEL_NAME];
+ value = value.trimmed();
+ bool ok = false;
+ int level = value.toInt(&ok);
+ if (ok)
+ maxLevel = level;
+ }
+
+ if (minLevel >= 0 || maxLevel >= 0)
+ {
+ minLevel = (minLevel >= 0) ? minLevel : 0;
+ maxLevel = (maxLevel >= 0) ? maxLevel : SHRT_MAX;
+
+ if (maxLevel < minLevel)
+ {
+ int tmp = maxLevel;
+ maxLevel = minLevel;
+ minLevel = tmp;
+ }
+
+ filterString += ";";
+ filterString += QString::number(minLevel);
+ filterString += "-";
+ filterString += QString::number(maxLevel);
+ }
+
+ return filterString;
+}
+
#ifndef QMAKEBUILD
#include "filtermgr.moc"
#endif
Modified: showeq/trunk/src/filtermgr.h
===================================================================
--- showeq/trunk/src/filtermgr.h 2024-08-21 19:58:37 UTC (rev 1525)
+++ showeq/trunk/src/filtermgr.h 2024-08-21 19:58:44 UTC (rev 1526)
@@ -39,6 +39,11 @@
#include <map>
#include <QObject>
+#include <QDialog>
+#include <QString>
+#include <QLabel>
+#include <QLineEdit>
+#include <QCheckBox>
#include "everquest.h"
@@ -74,9 +79,46 @@
#define FILTER_FLAG_DANGER (1 << DANGER_FILTER)
#define FILTER_FLAG_LOCATE (1 << LOCATE_FILTER)
#define FILTER_FLAG_ALERT (1 << ALERT_FILTER)
-#define FILTER_FLAG_FILTERED (1 << FILTERED_FILTER)
+#define FILTER_FLAG_FILTERED (1 << FILTERED_FILTER)
#define FILTER_FLAG_TRACER (1 << TRACER_FILTER)
+
+#define FILTERSTRINGFIELD_TABLE \
+ X(FSF_Name, "Name") \
+ X(FSF_Level, "Level") \
+ X(FSF_Race, "Race") \
+ X(FSF_Class, "Class") \
+ X(FSF_NPC, "NPC") \
+ X(FSF_X, "X") \
+ X(FSF_Y, "Y") \
+ X(FSF_Z, "Z") \
+ X(FSF_Light, "Light") \
+ X(FSF_Deity, "Deity") \
+ X(FSF_RTeam, "RTeam") \
+ X(FSF_DTeam, "DTeam") \
+ X(FSF_Type, "Type") \
+ X(FSF_LastName, "LastName") \
+ X(FSF_Guild, "Guild") \
+ X(FSF_Spawn, "Spawn") \
+ X(FSF_GM, "GM")
+
+#define X(a, b) a,
+enum FilterStringField
+{
+ FILTERSTRINGFIELD_TABLE
+ FSF_Max
+};
+#undef X
+
+
+// special handling for min/max level, which aren't part of regex filter string
+#define FSF_MINLEVEL_NAME "MinLevel"
+#define FSF_MINLEVEL_LABEL "Min Level"
+#define FSF_MAXLEVEL_NAME "MaxLevel"
+#define FSF_MAXLEVEL_LABEL "Max Level"
+
+typedef QHash<QString, QString> FilterFieldMap;
+
//----------------------------------------------------------------------
// FilterMgr
class FilterMgr : public QObject
@@ -87,7 +129,7 @@
FilterMgr(const DataLocationMgr* dataLocMgr,
const QString filterFile, bool spawnfilter_case);
~FilterMgr();
-
+
const QString& filterFile(void) { return m_filterFile; }
const QString& zoneFilterFile(void) { return m_zoneFilterFile; }
bool caseSensitive(void) { return m_caseSensitive; }
@@ -140,4 +182,76 @@
bool m_caseSensitive;
};
+
+class FilterFormField : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ FilterFormField(QString name, QString labeltext = QString(), QWidget* parent=nullptr);
+
+ QString m_name;
+ QString m_labeltext;
+ QCheckBox* m_check;
+ QLabel* m_label;
+ QLineEdit* m_edit;
+
+ public slots:
+ void stateChanged(int state);
+};
+
+//SubClassing QCheckBox so we can control the sequence of check/uncheck/partial when
+//clicking "Toggle All"
+class ToggleAllCheckBox : public QCheckBox
+{
+ protected:
+ virtual void nextCheckState() override;
+
+};
+
+
+class FilterDialog : public QDialog
+{
+ Q_OBJECT
+
+ public:
+
+ static QString getFilter(QWidget* parent, const QString& title,
+ const QString& filterString, bool* ok=nullptr,
+ Qt::WindowFlags flags = Qt::WindowFlags(),
+ Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
+
+ protected:
+ FilterDialog(QWidget* parent=nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
+ ~FilterDialog();
+
+ void setData(const QString filterString);
+ void createForm();
+
+ QHash<QString, FilterFormField*> m_filterFields;
+ ToggleAllCheckBox* m_toggleAll;
+
+ QString m_spawnFilterString;
+ FilterFieldMap m_spawnFilterMap;
+
+ QString m_filterString;
+ int m_fieldCount;
+ int m_fieldsCheckedCount;
+ bool m_hasTrailingColon;
+
+ signals:
+ void stateChanged(int state);
+
+ protected slots:
+ void resetForm();
+ void acceptDialog();
+ void fieldToggled(bool checked);
+ void toggleAllToggled(int state);
+
+};
+
+// helper functions
+void FilterString2FilterFieldMap(const QString filterString, FilterFieldMap* map);
+QString FilterFieldMap2FilterString(FilterFieldMap* map);
+
#endif // FILTERMGR_H
Modified: showeq/trunk/src/spawnlistcommon.cpp
===================================================================
--- showeq/trunk/src/spawnlistcommon.cpp 2024-08-21 19:58:37 UTC (rev 1525)
+++ showeq/trunk/src/spawnlistcommon.cpp 2024-08-21 19:58:44 UTC (rev 1526)
@@ -655,12 +655,9 @@
// get the user edited filter string, based on the items filterString
bool ok = false;
filterString =
- QInputDialog::getText(m_spawnlist, filterName + " Filter",
- "Enter the filter string:",
- QLineEdit::Normal,
+ FilterDialog::getFilter(m_spawnlist, filterName + " Filter",
filterString, &ok);
-
// if the user clicked ok, add the filter
if (ok)
m_filterMgr->addFilter(filter, filterString);
@@ -678,12 +675,9 @@
// get the user edited filter string, based on the items filterString
bool ok = false;
filterString =
- QInputDialog::getText(m_spawnlist, filterName + " Filter",
- "Enter the filter string:",
- QLineEdit::Normal,
+ FilterDialog::getFilter(m_spawnlist, filterName + " Zone Filter",
filterString, &ok);
-
// if the user clicked ok, add the filter
if (ok)
m_filterMgr->addZoneFilter(filter, filterString);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 19:58:40
|
Revision: 1525
http://sourceforge.net/p/seq/svn/1525
Author: cn187
Date: 2024-08-21 19:58:37 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Attempt to detect dropped packets and notify user
Modified Paths:
--------------
showeq/trunk/src/packetcapture.cpp
showeq/trunk/src/packetcapture.h
Modified: showeq/trunk/src/packetcapture.cpp
===================================================================
--- showeq/trunk/src/packetcapture.cpp 2024-08-21 19:58:30 UTC (rev 1524)
+++ showeq/trunk/src/packetcapture.cpp 2024-08-21 19:58:37 UTC (rev 1525)
@@ -35,7 +35,10 @@
#include "diagnosticmessages.h"
//#define PCAP_DEBUG 1
-
+
+unsigned int PacketCaptureThread::last_ps_ifdrop = 0;
+unsigned int PacketCaptureThread::last_ps_drop = 0;
+
//----------------------------------------------------------------------
// PacketCaptureThread
// start and stop the thread
@@ -45,8 +48,7 @@
m_playbackSpeed(0),
m_snaplen(snaplen),
m_buffersize(buffersize)
-{
-}
+{ }
PacketCaptureThread::~PacketCaptureThread()
{
@@ -55,7 +57,6 @@
// Turn off pcap
pcap_close(m_pcache_pcap);
}
-
}
void PacketCaptureThread::setPlaybackSpeed(int playbackSpeed)
@@ -335,6 +336,31 @@
}
pthread_mutex_unlock (&myThis->m_pcache_mutex);
+
+ struct pcap_stat ps = {0};
+
+ //NOTE: using fprintf here because seqWarn sends a MessageEntry, which
+ //can't cross thread boundaries using signals/slots without doing work
+ //to change MessageEntry to a proper Qt MetaType FIXME
+ pcap_stats(myThis->m_pcache_pcap, &ps);
+ if (ps.ps_ifdrop > 0 && ps.ps_ifdrop != last_ps_ifdrop)
+ {
+ fprintf(stderr, "PCAP detected %d packets dropped at the network interface! "
+ "This could cause ShowEQ to malfunction. Read FAQ #5 in the "
+ "FAQ located in the ShowEQ source directory for information "
+ "about tuning your kernel networking parameters.\n", ps.ps_ifdrop);
+ fprintf(stderr, "Packet loss due to dropping at the interface: %02f%%\n", (ps.ps_ifdrop * 1.0) / (ps.ps_recv * 1.0) * 100.0);
+ last_ps_ifdrop = ps.ps_ifdrop;
+ }
+
+ if (ps.ps_drop > 0 && ps.ps_drop != last_ps_drop)
+ {
+ fprintf(stderr, "PCAP detected %d packets dropped due to insufficent PCAP buffer size! "
+ "This could cause ShowEQ to malfunction. Increase the PCAP buffer "
+ "size and/or decrease the PCAP snapshot length.\n", ps.ps_drop);
+ fprintf(stderr, "Packet loss due to dropping at the PCAP buffer: %02f%%\n", (ps.ps_drop * 1.0) / (ps.ps_recv * 1.0) * 100.0);
+ last_ps_drop = ps.ps_drop;
+ }
}
void PacketCaptureThread::setFilter (const char *device,
Modified: showeq/trunk/src/packetcapture.h
===================================================================
--- showeq/trunk/src/packetcapture.h 2024-08-21 19:58:30 UTC (rev 1524)
+++ showeq/trunk/src/packetcapture.h 2024-08-21 19:58:37 UTC (rev 1525)
@@ -79,6 +79,8 @@
private:
static void* loop(void *param);
static void packetCallBack(u_char * param, const struct pcap_pkthdr *ph, const u_char *data);
+ static unsigned int last_ps_ifdrop;
+ static unsigned int last_ps_drop;
pcap_t *m_pcache_pcap;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 19:58:33
|
Revision: 1524
http://sourceforge.net/p/seq/svn/1524
Author: cn187
Date: 2024-08-21 19:58:30 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Allow user to configure PCAP snaplen and ring buffer size
Modified Paths:
--------------
showeq/trunk/src/interface.cpp
showeq/trunk/src/interface.h
showeq/trunk/src/packet.cpp
showeq/trunk/src/packet.h
showeq/trunk/src/packetcapture.cpp
showeq/trunk/src/packetcapture.h
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2024-08-21 19:58:23 UTC (rev 1523)
+++ showeq/trunk/src/interface.cpp 2024-08-21 19:58:30 UTC (rev 1524)
@@ -235,7 +235,7 @@
if (!selected.isEmpty())
{
// set it as the device to monitor next session
- pSEQPrefs->setPrefString("Device", "Network", selected);
+ pSEQPrefs->setPrefString("Device", section, selected);
net_device = selected;
}
}
@@ -249,6 +249,8 @@
pSEQPrefs->getPrefString("MAC", section, "0"),
pSEQPrefs->getPrefBool("RealTimeThread", section,
false),
+ pSEQPrefs->getPrefInt("CaptureSnapLen", section, 1),
+ pSEQPrefs->getPrefInt("CaptureBufferSize", section, 2),
pSEQPrefs->getPrefBool("SessionTracking",
section, false),
pSEQPrefs->getPrefBool("Record", vpsection, false),
@@ -1186,6 +1188,41 @@
tmpAction->setCheckable(true);
tmpAction->setChecked(m_packet->realtime());
+ QMenu* captureMenu = new QMenu("Packet Capture Configuration");
+ m_netMenu->addMenu(captureMenu);
+
+
+ QWidgetAction* captureSettingNotice = new QWidgetAction(captureMenu);
+ QLabel* tmpLabel = new QLabel("NOTE: You must save preferences and restart ShowEQ for these changes to take effect (for now)");
+ tmpLabel->setWordWrap(true);
+ tmpLabel->setContentsMargins(30, 11, 11, 11);
+ captureSettingNotice->setDefaultWidget(tmpLabel);
+ captureMenu->addAction(captureSettingNotice);
+
+ captureMenu->addSeparator();
+
+ QMenu* tmpMenu = new QMenu("Snapshot Length (KB)");
+ QSpinBox* snapLenSpinBox = new QSpinBox(tmpMenu);
+ snapLenSpinBox->setMinimum(1);
+ snapLenSpinBox->setMaximum(64);
+ snapLenSpinBox->setValue(pSEQPrefs->getPrefInt("CaptureSnapLen", "Network", 1));
+ connect(snapLenSpinBox, SIGNAL(valueChanged(int)), this, SLOT(set_net_capture_snap_len(int)));
+ QWidgetAction* snapLenWidgetAction = new QWidgetAction(tmpMenu);
+ snapLenWidgetAction->setDefaultWidget(snapLenSpinBox);
+ tmpMenu->addAction(snapLenWidgetAction);
+ captureMenu->addMenu(tmpMenu);
+
+ tmpMenu = new QMenu("Capture Buffer Size (MB)");
+ QSpinBox* captureBufferSizeSpinBox = new QSpinBox();
+ captureBufferSizeSpinBox->setMinimum(2);
+ captureBufferSizeSpinBox->setMaximum(128);
+ captureBufferSizeSpinBox->setValue(pSEQPrefs->getPrefInt("CaptureBufferSize", "Network", 2));
+ connect(captureBufferSizeSpinBox, SIGNAL(valueChanged(int)), this, SLOT(set_net_capture_buffer_size(int)));
+ QWidgetAction* captureBufferSizeWidgetAction = new QWidgetAction(tmpMenu);
+ captureBufferSizeWidgetAction->setDefaultWidget(captureBufferSizeSpinBox);
+ tmpMenu->addAction(captureBufferSizeWidgetAction);
+ captureMenu->addMenu(tmpMenu);
+
m_netMenu->addSeparator();
// Log menu
@@ -5316,6 +5353,18 @@
}
}
+void EQInterface::set_net_capture_snap_len(int len)
+{
+ m_packet->setSnapLen(len);
+ pSEQPrefs->setPrefInt("CaptureSnapLen", "Network", len);
+}
+
+void EQInterface::set_net_capture_buffer_size(int size)
+{
+ m_packet->setBufferSize(size);
+ pSEQPrefs->setPrefInt("CaptureBufferSize", "Network", size);
+}
+
void EQInterface::set_net_arq_giveup(int giveup)
{
// set the Arq Seq Give Up length
Modified: showeq/trunk/src/interface.h
===================================================================
--- showeq/trunk/src/interface.h 2024-08-21 19:58:23 UTC (rev 1523)
+++ showeq/trunk/src/interface.h 2024-08-21 19:58:30 UTC (rev 1524)
@@ -224,6 +224,8 @@
void set_net_client_IP_address();
void set_net_client_MAC_address();
void set_net_device();
+ void set_net_capture_snap_len(int len);
+ void set_net_capture_buffer_size(int size);
void set_net_arq_giveup(int giveup);
virtual void setCaption(const QString&);
void restoreStatusFont();
Modified: showeq/trunk/src/packet.cpp
===================================================================
--- showeq/trunk/src/packet.cpp 2024-08-21 19:58:23 UTC (rev 1523)
+++ showeq/trunk/src/packet.cpp 2024-08-21 19:58:30 UTC (rev 1524)
@@ -92,6 +92,8 @@
QString ip,
QString mac_address,
bool realtime,
+ int snaplen,
+ int buffersize,
bool sessionTrackingFlag,
bool recordPackets,
int playbackPackets,
@@ -107,6 +109,8 @@
m_ip(ip),
m_mac(mac_address),
m_realtime(realtime),
+ m_snaplen(snaplen),
+ m_buffersize(buffersize),
m_session_tracking(sessionTrackingFlag),
m_recordPackets(recordPackets),
m_playbackPackets(playbackPackets),
@@ -193,7 +197,7 @@
if (m_playbackPackets == PLAYBACK_OFF)
{
// create the pcap object and initialize, either with MAC or IP
- m_packetCapture = new PacketCaptureThread();
+ m_packetCapture = new PacketCaptureThread(m_snaplen, m_buffersize);
if (m_mac.length() == 17)
{
seqInfo("Listening for client MAC: %s", m_mac.toLatin1().data());
@@ -218,7 +222,7 @@
else if (m_playbackPackets == PLAYBACK_FORMAT_TCPDUMP)
{
// Create the pcap object and initialize with the file input given
- m_packetCapture = new PacketCaptureThread();
+ m_packetCapture = new PacketCaptureThread(m_snaplen, m_buffersize);
QString filename = pSEQPrefs->getPrefString("Filename", "VPacket");
Modified: showeq/trunk/src/packet.h
===================================================================
--- showeq/trunk/src/packet.h 2024-08-21 19:58:23 UTC (rev 1523)
+++ showeq/trunk/src/packet.h 2024-08-21 19:58:30 UTC (rev 1524)
@@ -72,6 +72,8 @@
QString m_ip,
QString m_mac_address,
bool m_realtime,
+ int snaplen,
+ int buffersize,
bool m_session_tracking,
bool m_recordPackets,
int m_playbackPackets,
@@ -102,6 +104,10 @@
bool connect2(const QString& opcodeName, EQStreamPairs sp,
uint8_t dir, const char* payload, EQSizeCheckType szt,
const QObject* receiver, const char* member);
+ int snaplen(void) { return m_snaplen; }
+ int buffersize(void) { return m_buffersize; }
+ void setSnapLen(int len) { m_snaplen = len; }
+ void setBufferSize(int size) { m_buffersize = size; }
public slots:
void processPackets(void);
@@ -176,6 +182,8 @@
QString m_ip;
QString m_mac;
bool m_realtime;
+ int m_snaplen;
+ int m_buffersize;
bool m_session_tracking;
bool m_recordPackets;
int m_playbackPackets;
Modified: showeq/trunk/src/packetcapture.cpp
===================================================================
--- showeq/trunk/src/packetcapture.cpp 2024-08-21 19:58:23 UTC (rev 1523)
+++ showeq/trunk/src/packetcapture.cpp 2024-08-21 19:58:30 UTC (rev 1524)
@@ -40,9 +40,11 @@
// PacketCaptureThread
// start and stop the thread
// get packets to the processing engine(dispatchPacket)
-PacketCaptureThread::PacketCaptureThread() : PacketCaptureProviderThread(),
+PacketCaptureThread::PacketCaptureThread(int snaplen, int buffersize) : PacketCaptureProviderThread(),
m_pcache_pcap(NULL),
- m_playbackSpeed(0)
+ m_playbackSpeed(0),
+ m_snaplen(snaplen),
+ m_buffersize(buffersize)
{
}
@@ -81,7 +83,6 @@
bool realtime, uint8_t address_type)
{
char ebuf[PCAP_ERRBUF_SIZE]; // pcap error buffer
- char filter_buf[256]; // pcap filter buffer
seqInfo("Initializing Packet Capture Thread: ");
m_pcache_closed = false;
@@ -109,11 +110,8 @@
}
pcap_set_promisc(m_pcache_pcap, 1);
- //PCAP docs say 64K snaplen should be enough for most networks.
- pcap_set_snaplen(m_pcache_pcap, UINT16_MAX);
- // default buffer size is 2M: 2*1024*1024
- // but we can increase it in the future if needed
- //pcap_set_buffer_size(m_pcache_pcap, 4*1024*1024);
+ pcap_set_snaplen(m_pcache_pcap, m_snaplen*1024);
+ pcap_set_buffer_size(m_pcache_pcap, m_buffersize*1024*1024);
#ifndef __FreeBSD__
pcap_set_immediate_mode(m_pcache_pcap, 1);
Modified: showeq/trunk/src/packetcapture.h
===================================================================
--- showeq/trunk/src/packetcapture.h 2024-08-21 19:58:23 UTC (rev 1523)
+++ showeq/trunk/src/packetcapture.h 2024-08-21 19:58:30 UTC (rev 1524)
@@ -54,7 +54,7 @@
class PacketCaptureThread : public PacketCaptureProviderThread
{
public:
- PacketCaptureThread();
+ PacketCaptureThread(int snaplen, int buffersize);
~PacketCaptureThread();
bool offlinePlaybackSupported() { return true; }
@@ -88,6 +88,9 @@
int m_playbackSpeed; // -1=paused, 0=max, 1=1x speed, 2=2x speed, up to 9
timeval m_tvLastProcessedActual;
timeval m_tvLastProcessedOriginal;
+
+ int m_snaplen;
+ int m_buffersize;
};
#endif // _PACKETCAPTURE_H_
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 19:58:25
|
Revision: 1523
http://sourceforge.net/p/seq/svn/1523
Author: cn187
Date: 2024-08-21 19:58:23 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Allow user to configure map line/location colors
Modified Paths:
--------------
showeq/trunk/src/Makefile.am
showeq/trunk/src/interface.cpp
showeq/trunk/src/interface.h
showeq/trunk/src/map.cpp
showeq/trunk/src/map.h
showeq/trunk/src/mapcore.cpp
showeq/trunk/src/mapcore.h
Added Paths:
-----------
showeq/trunk/src/mapcolors.h
Modified: showeq/trunk/src/Makefile.am
===================================================================
--- showeq/trunk/src/Makefile.am 2024-08-21 19:58:12 UTC (rev 1522)
+++ showeq/trunk/src/Makefile.am 2024-08-21 19:58:23 UTC (rev 1523)
@@ -113,7 +113,7 @@
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 weapons29.h weapons2a.h weapons2b.h weapons2c.h weapons2d.h weapons2e.h weapons2f.h weapons30.h weapons4e.h decode.h cgiconv.h skilllist.h statlist.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.h mapicondialog.ui filternotifications.h netstream.h guildshell.h guildlist.h bazaarlog.h message.h s_everquest.h staticspells.h packetcaptureprovider.h
+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 weapons29.h weapons2a.h weapons2b.h weapons2c.h weapons2d.h weapons2e.h weapons2f.h weapons30.h weapons4e.h decode.h cgiconv.h skilllist.h statlist.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.h mapicondialog.ui filternotifications.h netstream.h guildshell.h guildlist.h bazaarlog.h message.h s_everquest.h staticspells.h packetcaptureprovider.h mapcolors.h
CLEANFILES = $(nodist_showeq_SOURCES)
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2024-08-21 19:58:12 UTC (rev 1522)
+++ showeq/trunk/src/interface.cpp 2024-08-21 19:58:23 UTC (rev 1523)
@@ -149,7 +149,8 @@
m_netDiag(0),
m_messageFilterDialog(0),
m_guildListWindow(0),
- m_deviceList(enumerateNetworkDevices())
+ m_deviceList(enumerateNetworkDevices()),
+ m_mapColorDialog(new MapColorDialog())
{
setObjectName(name);
setWindowFlags(Qt::Window);
@@ -1156,6 +1157,8 @@
pOptMenu->addMenu(conColorBaseMenu);
+ pOptMenu->addAction("Map Colors...", this, SLOT(select_opt_mapColors()));
+
m_action_opt_UseUpdateRadius = pOptMenu->addAction("Use EQ's Update Radius",
this, SLOT(toggle_opt_UseUpdateRadius()));
m_action_opt_UseUpdateRadius->setCheckable(true);
@@ -4624,6 +4627,11 @@
}
}
+void EQInterface::select_opt_mapColors()
+{
+ m_mapColorDialog->show();
+}
+
void EQInterface::setExp(uint32_t totalExp, uint32_t totalTick,
uint32_t minExpLevel, uint32_t maxExpLevel,
uint32_t tickExpLevel)
Modified: showeq/trunk/src/interface.h
===================================================================
--- showeq/trunk/src/interface.h 2024-08-21 19:58:12 UTC (rev 1522)
+++ showeq/trunk/src/interface.h 2024-08-21 19:58:23 UTC (rev 1523)
@@ -43,6 +43,7 @@
#include "packetlog.h"
#include "message.h"
#include "messagefilter.h"
+#include "map.h"
//--------------------------------------------------
// forward declarations
@@ -264,6 +265,7 @@
void toggle_opt_RetardedCoords(bool enable);
void toggle_opt_SystimeSpawntime(bool enable);
void select_opt_conColorBase(QAction* con);
+ void select_opt_mapColors();
void toggle_view_SpawnList();
void toggle_view_SpawnList2();
void toggle_view_SpawnPointList();
@@ -501,6 +503,8 @@
QStringList m_StringList;
QDialog *dialogbox;
+ MapColorDialog* m_mapColorDialog;
+
bool m_isSkillListDocked;
bool m_isStatListDocked;
bool m_isMapDocked[maxNumMaps];
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2024-08-21 19:58:12 UTC (rev 1522)
+++ showeq/trunk/src/map.cpp 2024-08-21 19:58:23 UTC (rev 1523)
@@ -67,6 +67,8 @@
#include <QImageWriter>
#include <QMenu>
#include <QWidgetAction>
+#include <QGridLayout>
+#include <QCommonStyle>
#if 1 // ZBTEMP: Until we setup a better way to enter location name/color
#include <QInputDialog>
@@ -5614,7 +5616,127 @@
}
}
+MapColorDialog::MapColorDialog(QWidget* parent) : QDialog(parent)
+{
+ #define X(a,b) m_color_base_table[b] = a;
+ SEQMAP_COLOR_TABLE
+ #undef X
+ setWindowTitle("Map Colors");
+
+ loadUserColors();
+
+ QVBoxLayout* vbox = new QVBoxLayout(this);
+
+ QGridLayout* gridLayout = new QGridLayout();
+ vbox->addLayout(gridLayout);
+
+ int col = 0;
+ int row = 0;
+ for (int i = 0; i < SEQMAP_NUM_COLORS; ++i)
+ {
+ row = floor(i / 8);
+ col = i % 8;
+
+ m_color_pb[i] = new QPushButton(QString::number(i), this);
+ m_color_pb[i]->setStyle(new QCommonStyle());
+ m_color_pb[i]->setPalette(QPalette(QColor(m_color_user_table[i])));
+ m_color_pb[i]->setProperty("colorIndex", i);
+ connect(m_color_pb[i], SIGNAL(clicked()), this, SLOT(selectColor()));
+
+ gridLayout->addWidget(m_color_pb[i], row, col);
+ }
+
+ QHBoxLayout* hbox = new QHBoxLayout();
+ vbox->addItem(new QSpacerItem(20, 25));
+ vbox->addLayout(hbox);
+
+ QPushButton* resetButton = new QPushButton("Reset");
+ resetButton->setDefault(false);
+ resetButton->setAutoDefault(false);
+ hbox->addWidget(resetButton);
+ connect(resetButton, SIGNAL(clicked()), this, SLOT(resetDialog()));
+
+ QPushButton* defaultsButton = new QPushButton("Load Defaults");
+ defaultsButton->setDefault(false);
+ defaultsButton->setAutoDefault(false);
+ hbox->addWidget(defaultsButton);
+ connect(defaultsButton, SIGNAL(clicked()), this, SLOT(loadDefaults()));
+
+ hbox->addItem(new QSpacerItem(20, 1));
+
+ QPushButton* okButton = new QPushButton("Ok");
+ okButton->setDefault(false);
+ okButton->setAutoDefault(false);
+ hbox->addWidget(okButton);
+ connect(okButton, SIGNAL(clicked()), this, SLOT(acceptDialog()));
+
+ QPushButton* cancelButton = new QPushButton("Cancel");
+ okButton->setDefault(false);
+ okButton->setAutoDefault(false);
+ hbox->addWidget(cancelButton);
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+
+ setLayout(vbox);
+
+ resetDialog();
+}
+
+MapColorDialog::~MapColorDialog()
+{ }
+
+void MapColorDialog::resetDialog()
+{
+ loadUserColors();
+ for (int i=0; i<SEQMAP_NUM_COLORS; ++i)
+ m_color_pb[i]->setPalette(QPalette(QColor(m_color_user_table[i])));
+}
+
+void MapColorDialog::acceptDialog()
+{
+ updateUserColors();
+ done(QDialog::Accepted);
+}
+
+void MapColorDialog::loadDefaults()
+{
+ for (int i=0; i<SEQMAP_NUM_COLORS; ++i)
+ {
+ m_color_user_table[i] = m_color_base_table[i];
+ m_color_pb[i]->setPalette(QPalette(QColor(m_color_base_table[i])));
+ }
+}
+
+void MapColorDialog::loadUserColors()
+{
+ for (int i=0; i<SEQMAP_NUM_COLORS; ++i)
+ m_color_user_table[i] = pSEQPrefs->getPrefString("MapColor" + QString::number(i),
+ "MapColors", m_color_base_table[i]);
+}
+
+void MapColorDialog::updateUserColors()
+{
+ for (int i=0; i<SEQMAP_NUM_COLORS; ++i)
+ pSEQPrefs->setPrefString("MapColor" + QString::number(i), "MapColors", m_color_user_table[i]);
+}
+
+
+
+void MapColorDialog::selectColor()
+{
+ QPushButton* pb = qobject_cast<QPushButton*>(sender());
+ if (!pb) return;
+
+ QColor newColor = QColorDialog::getColor(pb->palette().color(backgroundRole()), this);
+ if (newColor.isValid())
+ {
+ int i = pb->property("colorIndex").toInt();
+ m_color_user_table[i] = newColor.name();
+ pb->setPalette(QPalette(QColor(m_color_user_table[i])));
+ }
+
+}
+
#ifndef QMAKEBUILD
#include "map.moc"
#endif
Modified: showeq/trunk/src/map.h
===================================================================
--- showeq/trunk/src/map.h 2024-08-21 19:58:12 UTC (rev 1522)
+++ showeq/trunk/src/map.h 2024-08-21 19:58:23 UTC (rev 1523)
@@ -44,6 +44,7 @@
#include <QDateTime>
#include <QPen>
#include <QBrush>
+#include <QPushButton>
// includes required for MapMenu
#include <QMenu>
@@ -69,6 +70,7 @@
#include "seqwindow.h"
#include "spawn.h"
#include "mapicon.h"
+#include "mapcolors.h"
//----------------------------------------------------------------------
// forward declarations
@@ -105,6 +107,8 @@
tFOVClassic = 2
};
+
+
//----------------------------------------------------------------------
// constants
const int maxFrameTimes = 40;
@@ -790,5 +794,29 @@
QAction* m_action_bottomControl_Options;
};
+class MapColorDialog : public QDialog
+{
+ Q_OBJECT
+
+ public:
+ MapColorDialog(QWidget* parent=0);
+ ~MapColorDialog();
+
+ private slots:
+ void selectColor();
+ void resetDialog();
+ void acceptDialog();
+ void loadDefaults();
+
+ private:
+ void loadUserColors();
+ void updateUserColors();
+
+ QString m_color_base_table[SEQMAP_NUM_COLORS];
+ QString m_color_user_table[SEQMAP_NUM_COLORS];
+ QPushButton* m_color_pb[SEQMAP_NUM_COLORS];
+
+};
+
#endif // _EQMAP_H_
Added: showeq/trunk/src/mapcolors.h
===================================================================
--- showeq/trunk/src/mapcolors.h (rev 0)
+++ showeq/trunk/src/mapcolors.h 2024-08-21 19:58:23 UTC (rev 1523)
@@ -0,0 +1,95 @@
+/*
+ * mapcolors.h
+ * Copyright 2024 by the respective ShowEQ Developers
+ *
+ * This file is part of ShowEQ.
+ * http://www.sourceforge.net/projects/seq
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+//colors used in SEQ maps, and after converting SOE maps.
+#ifndef SEQMAP_COLORS_H
+#define SEQMAP_COLORS_H
+
+#define SEQMAP_NUM_COLORS 64
+
+#define SEQMAP_COLOR_TABLE\
+ X("Black", 0) \
+ X("DarkRed", 1) \
+ X("FireBrick", 2) \
+ X("Red", 3) \
+ X("DarkGreen", 4) \
+ X("Orange", 5) \
+ X("DarkOrange", 6) \
+ X("DarkOrange", 7) \
+ X("Green", 8) \
+ X("Chartreuse", 9) \
+ X("Gold", 10) \
+ X("Gold", 11) \
+ X("Green", 12) \
+ X("Chartreuse", 13) \
+ X("Goldenrod", 14) \
+ X("Yellow", 15) \
+ X("DarkBlue", 16) \
+ X("Magenta", 17) \
+ X("DeepPink", 18) \
+ X("DeepPink", 19) \
+ X("DarkCyan", 20) \
+ X("Grey", 21) \
+ X("IndianRed", 22) \
+ X("LightCoral", 23) \
+ X("SpringGreen", 24) \
+ X("LightGreen", 25) \
+ X("DarkKhaki", 26) \
+ X("Khaki", 27) \
+ X("SpringGreen", 28) \
+ X("PaleGreen", 29) \
+ X("DarkOliveGreen",30) \
+ X("Khaki", 31) \
+ X("MediumBlue", 32) \
+ X("DarkViolet", 33) \
+ X("Magenta", 34) \
+ X("Maroon", 35) \
+ X("RoyalBlue", 36) \
+ X("SlateBlue", 37) \
+ X("Orchid", 38) \
+ X("HotPink", 39) \
+ X("Turquoise", 40) \
+ X("SkyBlue", 41) \
+ X("Snow", 42) \
+ X("LightPink", 43) \
+ X("Cyan", 44) \
+ X("Aquamarine", 45) \
+ X("DarkSeaGreen", 46) \
+ X("Beige", 47) \
+ X("Blue", 48) \
+ X("Purple", 49) \
+ X("Purple", 50) \
+ X("Magenta", 51) \
+ X("DodgerBlue", 52) \
+ X("SlateBlue", 53) \
+ X("MediumPurple", 54) \
+ X("Orchid", 55) \
+ X("DeepSkyBlue", 56) \
+ X("LightBlue", 57) \
+ X("Plum", 58) \
+ X("Cyan", 59) \
+ X("CadetBlue", 60) \
+ X("PaleTurquoise", 61) \
+ X("LightCyan", 62) \
+ X("White", 63)
+
+#endif
Modified: showeq/trunk/src/mapcore.cpp
===================================================================
--- showeq/trunk/src/mapcore.cpp 2024-08-21 19:58:12 UTC (rev 1522)
+++ showeq/trunk/src/mapcore.cpp 2024-08-21 19:58:23 UTC (rev 1523)
@@ -47,7 +47,10 @@
#include <QPolygon>
#include <QByteArray>
#include <QPixmap>
+#include "xmlpreferences.h"
+extern XMLPreferences* pSEQPrefs;
+
//----------------------------------------------------------------------
// MapParameters
MapParameters::MapParameters(const MapData& mapData)
@@ -1080,7 +1083,10 @@
// create an M line (start with 2 points because of SOE's lame
// format).
- currentLineM = new MapLineM("soe", getMapConvertColor(r, g, b), 2);
+ unsigned short map_color_index = getMapConvertColorIndex(r, g, b);
+ QColor lineColor = pSEQPrefs->getPrefString("MapColor" + QString::number(map_color_index),
+ "MapColors", getMapConvertColor(r, g, b));
+ currentLineM = new MapLineM("soe", lineColor, 2);
currentLineM->setOrigColor(QColor(r, g, b));
// set the first point
@@ -1142,8 +1148,10 @@
name.replace("_", " ");
// add it to the list of locations
- MapLocation* loc = new MapLocation(name, getMapConvertColor(r, g, b),
- x1, y1, z1);
+ unsigned short map_color_index = getMapConvertColorIndex(r, g, b);
+ QColor lineColor = pSEQPrefs->getPrefString("MapColor" + QString::number(map_color_index),
+ "MapColors", getMapConvertColor(r, g, b));
+ MapLocation* loc = new MapLocation(name, lineColor, x1, y1, z1);
loc->setOrigColor(QColor(r, g, b));
layer->locations().append(loc);
Modified: showeq/trunk/src/mapcore.h
===================================================================
--- showeq/trunk/src/mapcore.h 2024-08-21 19:58:12 UTC (rev 1522)
+++ showeq/trunk/src/mapcore.h 2024-08-21 19:58:23 UTC (rev 1523)
@@ -48,6 +48,7 @@
#include <QList>
#include <QPolygon>
+#include "mapcolors.h"
#include "point.h"
#include "pointarray.h"
#include "fixpt.h"
@@ -732,6 +733,16 @@
(z >= floorRoom));
}
+inline unsigned short getMapConvertColorIndex(const unsigned short r, const unsigned short g,
+ const unsigned short b)
+{
+ unsigned short index = floor(r/80) + floor(g/80)*4 + floor(b/80)*16;
+ if (index == 0)
+ return 63;
+ else
+ return index;
+}
+
inline QString getMapConvertColor(const unsigned short r, const unsigned short g,
const unsigned short b)
{
@@ -739,70 +750,9 @@
//This adjusts the SOE map colors to colors that work for SEQs default color scheme
QString sColor[64] = {
- "Black", //0
- "DarkRed", //1
- "FireBrick", //2
- "Red", //3
- "DarkGreen", //4
- "Orange", //5
- "DarkOrange", //6
- "DarkOrange", //7
- "Green", //8
- "Chartreuse", //9
- "Gold", //10
- "Gold", //11
- "Green", //12
- "Chartreuse", //13
- "Goldenrod", //14
- "Yellow", //15
- "DarkBlue", //16
- "Magenta", //17
- "DeepPink", //18
- "DeepPink", //19
- "DarkCyan", //20
- "Grey", //21
- "IndianRed", //22
- "LightCoral", //23
- "SpringGreen", //24
- "LightGreen", //25
- "DarkKhaki", //26
- "Khaki", //27
- "SpringGreen", //28
- "PaleGreen", //29
- "DarkOliveGreen",//30
- "Khaki", //31
- "MediumBlue", //32
- "DarkViolet", //33
- "Magenta", //34
- "Maroon", //35
- "RoyalBlue", //36
- "SlateBlue", //37
- "Orchid", //38
- "HotPink", //39
- "Turquoise", //40
- "SkyBlue", //41
- "Snow", //42
- "LightPink", //43
- "Cyan", //44
- "Aquamarine", //45
- "DarkSeaGreen", //46
- "Beige", //47
- "Blue", //48
- "Purple", //49
- "Purple", //50
- "Magenta", //51
- "DodgerBlue", //52
- "SlateBlue", //53
- "MediumPurple", //54
- "Orchid", //55
- "DeepSkyBlue", //56
- "LightBlue", //57
- "Plum", //58
- "Cyan", //59
- "CadetBlue", //60
- "PaleTurquoise",//61
- "LightCyan", //62
- "White" //63
+ #define X(a,b) a,
+ SEQMAP_COLOR_TABLE
+ #undef X
};
unsigned short color = floor(r/80) + floor(g/80)*4 + floor(b/80)*16;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2024-08-21 19:58:14
|
Revision: 1522
http://sourceforge.net/p/seq/svn/1522
Author: cn187
Date: 2024-08-21 19:58:12 +0000 (Wed, 21 Aug 2024)
Log Message:
-----------
Regenerate config.sub/config.guess, remove shipped versions
Modified Paths:
--------------
showeq/trunk/Makefile.dist
Removed Paths:
-------------
showeq/trunk/config.guess
Modified: showeq/trunk/Makefile.dist
===================================================================
--- showeq/trunk/Makefile.dist 2024-08-21 19:58:04 UTC (rev 1521)
+++ showeq/trunk/Makefile.dist 2024-08-21 19:58:12 UTC (rev 1522)
@@ -3,7 +3,7 @@
AUTOHEADER = autoheader
AUTOMAKE = automake
AUTOCONF = autoconf
-LIBTOOLIZE_ARGS = --force --copy --automake
+LIBTOOLIZE_ARGS = --force --copy --automake --install
ACLOCAL_ARGS = -I m4
AUTOHEADER_ARGS = --force
AUTOMAKE_ARGS = --add-missing --copy --include-deps
Deleted: showeq/trunk/config.guess
===================================================================
--- showeq/trunk/config.guess 2024-08-21 19:58:04 UTC (rev 1521)
+++ showeq/trunk/config.guess 2024-08-21 19:58:12 UTC (rev 1522)
@@ -1,1516 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-07-22'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <pe...@bo...>.
-# Please send patches to <con...@gn...>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <con...@gn...>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (gh...@no... 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # ak...@wp... (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[45])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo frv-unknown-linux-gnu
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa:Linux:*:*)
- echo xtensa-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Ric...@cc...>
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <he...@op...>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- # From se...@sw....
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Pau...@st....
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- # From Pau...@st....
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <con...@gn...> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|