From fafabef792617639822438ec6b1714de2b00667c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 23 Apr 2025 08:10:36 +0200 Subject: [PATCH 01/36] Make RADRFL draw order higher than PILPNT draw order --- src/map/ENC/mapdata.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 8576635c..c4d2e3b2 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -70,10 +70,10 @@ static QMap orderMapInit() map.insert(TYPE(I_TRNBSN), 32); map.insert(TYPE(HRBFAC), 33); map.insert(TYPE(I_HRBFAC), 33); - map.insert(TYPE(PILPNT), 34); - map.insert(TYPE(ACHBRT), 35); - map.insert(TYPE(I_ACHBRT), 35); - map.insert(TYPE(RADRFL), 36); + map.insert(TYPE(RADRFL), 34); + map.insert(TYPE(PILPNT), 35); + map.insert(TYPE(ACHBRT), 36); + map.insert(TYPE(I_ACHBRT), 36); map.insert(TYPE(CRANES), 37); map.insert(TYPE(I_CRANES), 37); map.insert(TYPE(I_WTWGAG), 38); From d0ca202520385d8eb2c1d1ed646e06bf41c6a91d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 23 Apr 2025 08:49:46 +0200 Subject: [PATCH 02/36] Added BUNSTA objects style --- gpxsee.qrc | 1 + icons/map/POI/charging-station-11.svg | 4 ++++ src/map/ENC/attributes.h | 1 + src/map/ENC/mapdata.cpp | 9 ++++++--- src/map/ENC/objects.h | 1 + src/map/ENC/style.cpp | 9 +++++++++ 6 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 icons/map/POI/charging-station-11.svg diff --git a/gpxsee.qrc b/gpxsee.qrc index fd883090..1c08bde5 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -43,6 +43,7 @@ icons/map/POI/casino-11.svg icons/map/POI/castle-11.svg icons/map/POI/cemetery-11.svg + icons/map/POI/charging-station-11.svg icons/map/POI/cinema-11.svg icons/map/POI/clothing-store-11.svg icons/map/POI/college-11.svg diff --git a/icons/map/POI/charging-station-11.svg b/icons/map/POI/charging-station-11.svg new file mode 100644 index 00000000..9727f704 --- /dev/null +++ b/icons/map/POI/charging-station-11.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/map/ENC/attributes.h b/src/map/ENC/attributes.h index 167a0ad5..aec2d38a 100644 --- a/src/map/ENC/attributes.h +++ b/src/map/ENC/attributes.h @@ -43,6 +43,7 @@ #define I_RDOCAL 17017 #define I_WTWDIS 17064 #define I_CATBRT 17066 +#define I_CATBUN 17067 #define I_HUNITS 17103 #endif // ENC_ATTRIBUTES_H diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index c4d2e3b2..9e6385d0 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -81,9 +81,10 @@ static QMap orderMapInit() map.insert(TYPE(SLCONS), 40); map.insert(TYPE(LNDMRK), 41); map.insert(TYPE(SILTNK), 42); - map.insert(TYPE(LNDELV), 43); - map.insert(TYPE(SMCFAC), 44); - map.insert(TYPE(BUISGL), 45); + map.insert(TYPE(I_BUNSTA), 43); + map.insert(TYPE(LNDELV), 44); + map.insert(TYPE(SMCFAC), 45); + map.insert(TYPE(BUISGL), 46); map.insert(TYPE(I_DISMAR), 0xFFFFFFFE); map.insert(TYPE(SOUNDG), 0xFFFFFFFF); @@ -373,6 +374,8 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr, subtype = I_CATACH; else if (type == MARKUL) subtype = CATMFA; + else if (type == I_BUNSTA) + subtype = I_CATBUN; QList list(_attr.value(subtype).split(',')); std::sort(list.begin(), list.end()); diff --git a/src/map/ENC/objects.h b/src/map/ENC/objects.h index 8f1aa498..2fa3568c 100644 --- a/src/map/ENC/objects.h +++ b/src/map/ENC/objects.h @@ -122,6 +122,7 @@ #define I_GATCON 17031 #define I_SLCONS 17032 #define I_WTWAXS 17051 +#define I_BUNSTA 17054 #define I_TERMNL 17064 #define I_TRNBSN 17065 #define I_WTWGAG 17067 diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 8a9fe2f2..4fc6323a 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -435,6 +435,13 @@ void Style::pointStyle(qreal ratio) _points[SUBTYPE(I_RESARE, 22)] = _points[SUBTYPE(RESARE, 22)]; _points[SUBTYPE(I_RESARE, 23)] = _points[SUBTYPE(RESARE, 23)]; + _points[SUBTYPE(I_BUNSTA, 1)] = Point(svg2img(":/POI/fuel-11.svg", ratio), + Small); + _points[SUBTYPE(I_BUNSTA, 2)] = Point(svg2img(":/POI/drinking-water-11.svg", + ratio), Small); + _points[SUBTYPE(I_BUNSTA, 4)] = Point(svg2img(":/POI/charging-station-11.svg", + ratio), Small); + _points[SUBTYPE(SMCFAC, 7)] = Point(svg2img(":/POI/restaurant-11.svg", ratio), Small); _points[SUBTYPE(SMCFAC, 11)] = Point(svg2img(":/POI/pharmacy-11.svg", @@ -443,6 +450,8 @@ void Style::pointStyle(qreal ratio) ratio), Small); _points[SUBTYPE(SMCFAC, 13)] = Point(svg2img(":/POI/fuel-11.svg", ratio), Small); + _points[SUBTYPE(SMCFAC, 14)] = Point(svg2img(":/POI/charging-station-11.svg", + ratio), Small); _points[SUBTYPE(SMCFAC, 18)] = Point(svg2img(":/POI/toilet-11.svg", ratio), Small); _points[SUBTYPE(SMCFAC, 20)] = Point(svg2img(":/POI/telephone-11.svg", From 89219a7948fdf4dcdac94fabe6b22396f1441ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 23 Apr 2025 22:02:45 +0200 Subject: [PATCH 03/36] Use a better magic match for Vakaros VKX files --- pkg/linux/gpxsee.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/linux/gpxsee.xml b/pkg/linux/gpxsee.xml index 2c91fa5d..26e3b80c 100644 --- a/pkg/linux/gpxsee.xml +++ b/pkg/linux/gpxsee.xml @@ -210,7 +210,12 @@ - + + + + + + From 04091f21d5d6543a72356f4c0afe1f94ef2ee348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 23 Apr 2025 22:27:26 +0200 Subject: [PATCH 04/36] Improved restricted areas rendering --- src/map/ENC/mapdata.cpp | 5 ++++- src/map/ENC/style.cpp | 24 +++++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 9e6385d0..c089df85 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -201,9 +201,12 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context) || type == SUBTYPE(RESARE, 7) || type == SUBTYPE(I_RESARE, 7) || type == SUBTYPE(RESARE, 9) || type == SUBTYPE(I_RESARE, 9) || type == SUBTYPE(RESARE, 12) || type == SUBTYPE(I_RESARE, 12) + || type == SUBTYPE(RESARE, 14) || type == SUBTYPE(I_RESARE, 14) || type == SUBTYPE(RESARE, 17) || type == SUBTYPE(I_RESARE, 17) || type == SUBTYPE(RESARE, 22) || type == SUBTYPE(I_RESARE, 22) - || type == SUBTYPE(RESARE, 23) || type == SUBTYPE(I_RESARE, 23)) + || type == SUBTYPE(RESARE, 23) || type == SUBTYPE(I_RESARE, 23) + || type == SUBTYPE(RESARE, 25) || type == SUBTYPE(I_RESARE, 25) + || type == SUBTYPE(RESARE, 26) || type == SUBTYPE(I_RESARE, 26)) points->append(MapData::Point(baseType, polygon->bounds().center(), polygon->attributes(), polygon->HUNI(), true)); diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 4fc6323a..f04ae791 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -78,17 +78,24 @@ void Style::polygonStyle() _polygons[SUBTYPE(RESARE, 9)] = Polygon(QBrush(QColor(0xff, 0x00, 0x00), Qt::BDiagPattern)); _polygons[SUBTYPE(RESARE, 12)] = Polygon(QImage(":/marine/safety-zone-line.png")); + _polygons[SUBTYPE(RESARE, 14)] = Polygon(QImage(":/marine/safety-zone-line.png")); _polygons[SUBTYPE(RESARE, 17)] = Polygon(QImage(":/marine/entry-prohibited-line.png")); _polygons[SUBTYPE(RESARE, 22)] = Polygon(QImage(":/marine/sanctuary-line.png")); _polygons[SUBTYPE(RESARE, 23)] = Polygon(QImage(":/marine/nature-reserve-line.png")); + _polygons[SUBTYPE(RESARE, 25)] = Polygon(Qt::NoBrush, + QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine)); + _polygons[SUBTYPE(RESARE, 26)] = Polygon(QImage(":/marine/safety-zone-line.png")); _polygons[SUBTYPE(I_RESARE, 1)] = _polygons[SUBTYPE(RESARE, 1)]; _polygons[SUBTYPE(I_RESARE, 2)] = _polygons[SUBTYPE(RESARE, 2)]; _polygons[SUBTYPE(I_RESARE, 4)] = _polygons[SUBTYPE(RESARE, 4)]; _polygons[SUBTYPE(I_RESARE, 9)] = _polygons[SUBTYPE(RESARE, 9)]; _polygons[SUBTYPE(I_RESARE, 12)] = _polygons[SUBTYPE(RESARE, 12)]; + _polygons[SUBTYPE(I_RESARE, 14)] = _polygons[SUBTYPE(RESARE, 14)]; _polygons[SUBTYPE(I_RESARE, 17)] = _polygons[SUBTYPE(RESARE, 17)]; _polygons[SUBTYPE(I_RESARE, 22)] = _polygons[SUBTYPE(RESARE, 22)]; _polygons[SUBTYPE(I_RESARE, 23)] = _polygons[SUBTYPE(RESARE, 23)]; + _polygons[SUBTYPE(I_RESARE, 25)] = _polygons[SUBTYPE(RESARE, 25)]; + _polygons[SUBTYPE(I_RESARE, 26)] = _polygons[SUBTYPE(RESARE, 26)]; _polygons[SUBTYPE(ACHARE, 1)] = Polygon(QImage(":/marine/anchor-line.png")); _polygons[SUBTYPE(ACHARE, 2)] = _polygons[SUBTYPE(ACHARE, 1)]; _polygons[SUBTYPE(ACHARE, 3)] = _polygons[SUBTYPE(ACHARE, 1)]; @@ -177,11 +184,12 @@ void Style::polygonStyle() << SUBTYPE(I_RESARE, 5) << SUBTYPE(RESARE, 6) << SUBTYPE(I_RESARE, 6) << SUBTYPE(RESARE, 7) << SUBTYPE(I_RESARE, 7) << SUBTYPE(RESARE, 9) << SUBTYPE(I_RESARE, 9) << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12) - << SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17) << SUBTYPE(RESARE, 22) - << SUBTYPE(I_RESARE, 22) << SUBTYPE(RESARE, 23) << SUBTYPE(I_RESARE, 23) - << SUBTYPE(RESARE, 1) << TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE) - << TYPE(I_TRNBSN) << SUBTYPE(MARKUL, 0) << SUBTYPE(MARKUL, 3) - << TYPE(CONZNE); + << SUBTYPE(RESARE, 14) << SUBTYPE(I_RESARE, 14) << SUBTYPE(RESARE, 17) + << SUBTYPE(I_RESARE, 17) << SUBTYPE(RESARE, 22) << SUBTYPE(I_RESARE, 22) + << SUBTYPE(RESARE, 23) << SUBTYPE(I_RESARE, 23) << SUBTYPE(RESARE, 25) + << SUBTYPE(I_RESARE, 25) << SUBTYPE(RESARE, 26) << SUBTYPE(I_RESARE, 26) + << TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE) << TYPE(I_TRNBSN) + << SUBTYPE(MARKUL, 0) << SUBTYPE(MARKUL, 3) << TYPE(CONZNE); } void Style::lineStyle(qreal ratio) @@ -420,9 +428,12 @@ void Style::pointStyle(qreal ratio) _points[SUBTYPE(RESARE, 7)] = _points[SUBTYPE(RESARE, 4)]; _points[SUBTYPE(RESARE, 9)] = _points[SUBTYPE(RESARE, 1)]; _points[SUBTYPE(RESARE, 12)] = _points[SUBTYPE(RESARE, 1)]; + _points[SUBTYPE(RESARE, 14)] = _points[SUBTYPE(RESARE, 1)]; _points[SUBTYPE(RESARE, 17)] = _points[SUBTYPE(RESARE, 1)]; _points[SUBTYPE(RESARE, 22)] = _points[SUBTYPE(RESARE, 4)]; _points[SUBTYPE(RESARE, 23)] = _points[SUBTYPE(RESARE, 4)]; + _points[SUBTYPE(RESARE, 25)] = _points[SUBTYPE(RESARE, 1)]; + _points[SUBTYPE(RESARE, 26)] = _points[SUBTYPE(RESARE, 1)]; _points[SUBTYPE(I_RESARE, 1)] = _points[SUBTYPE(RESARE, 1)]; _points[SUBTYPE(I_RESARE, 2)] = _points[SUBTYPE(RESARE, 2)]; _points[SUBTYPE(I_RESARE, 4)] = _points[SUBTYPE(RESARE, 4)]; @@ -431,9 +442,12 @@ void Style::pointStyle(qreal ratio) _points[SUBTYPE(I_RESARE, 7)] = _points[SUBTYPE(RESARE, 7)]; _points[SUBTYPE(I_RESARE, 9)] = _points[SUBTYPE(RESARE, 9)]; _points[SUBTYPE(I_RESARE, 12)] = _points[SUBTYPE(RESARE, 12)]; + _points[SUBTYPE(I_RESARE, 14)] = _points[SUBTYPE(RESARE, 14)]; _points[SUBTYPE(I_RESARE, 17)] = _points[SUBTYPE(RESARE, 17)]; _points[SUBTYPE(I_RESARE, 22)] = _points[SUBTYPE(RESARE, 22)]; _points[SUBTYPE(I_RESARE, 23)] = _points[SUBTYPE(RESARE, 23)]; + _points[SUBTYPE(I_RESARE, 25)] = _points[SUBTYPE(RESARE, 25)]; + _points[SUBTYPE(I_RESARE, 26)] = _points[SUBTYPE(RESARE, 26)]; _points[SUBTYPE(I_BUNSTA, 1)] = Point(svg2img(":/POI/fuel-11.svg", ratio), Small); From 6f7a90fb1551041d24fc27af12da77c24de144eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 24 Apr 2025 05:24:49 +0200 Subject: [PATCH 05/36] Version++ --- .appveyor.yml | 2 +- gpxsee.pro | 2 +- pkg/windows/gpxsee64.nsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index d9ec599f..41d8cdb5 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,4 +1,4 @@ -version: 13.40.{build} +version: 13.41.{build} configuration: - Release diff --git a/gpxsee.pro b/gpxsee.pro index 40a7e5a2..76894258 100644 --- a/gpxsee.pro +++ b/gpxsee.pro @@ -3,7 +3,7 @@ unix:!macx:!android { } else { TARGET = GPXSee } -VERSION = 13.40 +VERSION = 13.41 QT += core \ gui \ diff --git a/pkg/windows/gpxsee64.nsi b/pkg/windows/gpxsee64.nsi index 1105db8d..a8afd194 100644 --- a/pkg/windows/gpxsee64.nsi +++ b/pkg/windows/gpxsee64.nsi @@ -49,7 +49,7 @@ Unicode true ; The name of the installer Name "GPXSee" ; Program version -!define VERSION "13.40" +!define VERSION "13.41" ; The file to write OutFile "GPXSee-${VERSION}_x64.exe" From 50100b02dcccd9b1946b1b1573b380e384436aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 24 Apr 2025 06:21:13 +0200 Subject: [PATCH 06/36] Fixed switched units multipliers parameters broken in 13.40 --- src/map/ENC/mapdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index c089df85..6900e131 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -763,7 +763,7 @@ MapData::Poly *MapData::polyObject(const ISO8211::Record &r, bool MapData::processRecord(const ISO8211::Record &record, QVector &fe, RecordMap &vi, RecordMap &vc, RecordMap &ve, - uint &comf, uint &huni, uint &somf) + uint &comf, uint &somf, uint &huni) { if (record.size() < 2) return false; From 285ffd680ef310f0a649ead894ae320c4e87a938 Mon Sep 17 00:00:00 2001 From: raf Date: Wed, 23 Apr 2025 10:06:21 +0200 Subject: [PATCH 07/36] Translated using Weblate (Catalan) Currently translated at 100.0% (492 of 492 strings) Translation: GPXSee/Translations Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ca/ --- lang/gpxsee_ca.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/gpxsee_ca.ts b/lang/gpxsee_ca.ts index ea47d0e4..5d6ab357 100644 --- a/lang/gpxsee_ca.ts +++ b/lang/gpxsee_ca.ts @@ -172,7 +172,7 @@ VKX files - + Arxius VKX From e2988d462124e5c0764dec90089cc6df78bc8124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 24 Apr 2025 22:38:56 +0200 Subject: [PATCH 08/36] Version++ --- .appveyor.yml | 2 +- gpxsee.pro | 2 +- pkg/windows/gpxsee64.nsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 41d8cdb5..5088f737 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,4 +1,4 @@ -version: 13.41.{build} +version: 13.42.{build} configuration: - Release diff --git a/gpxsee.pro b/gpxsee.pro index 76894258..ab247eaf 100644 --- a/gpxsee.pro +++ b/gpxsee.pro @@ -3,7 +3,7 @@ unix:!macx:!android { } else { TARGET = GPXSee } -VERSION = 13.41 +VERSION = 13.42 QT += core \ gui \ diff --git a/pkg/windows/gpxsee64.nsi b/pkg/windows/gpxsee64.nsi index a8afd194..b0d98d35 100644 --- a/pkg/windows/gpxsee64.nsi +++ b/pkg/windows/gpxsee64.nsi @@ -49,7 +49,7 @@ Unicode true ; The name of the installer Name "GPXSee" ; Program version -!define VERSION "13.41" +!define VERSION "13.42" ; The file to write OutFile "GPXSee-${VERSION}_x64.exe" From 28caeef1053a2d120fccfba78c81c152aee4c9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 24 Apr 2025 22:39:17 +0200 Subject: [PATCH 09/36] Render BUNSTA areas --- src/map/ENC/mapdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 6900e131..dd7cca0d 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -188,7 +188,7 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context) if (baseType == TSSLPT || baseType == RCTLPT || baseType == I_TRNBSN || baseType == BRIDGE || baseType == I_BRIDGE || baseType == BUAARE - || baseType == LNDARE || baseType == LNDRGN + || baseType == LNDARE || baseType == LNDRGN || baseType == I_BUNSTA || type == SUBTYPE(ACHARE, 2) || type == SUBTYPE(I_ACHARE, 2) || type == SUBTYPE(ACHARE, 3) || type == SUBTYPE(I_ACHARE, 3) || type == SUBTYPE(ACHARE, 9) || type == SUBTYPE(I_ACHARE, 9) From f90ac6a37efa6480194912440cc0e034dd06cf81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 24 Apr 2025 22:57:03 +0200 Subject: [PATCH 10/36] Micro-optimizations --- src/map/ENC/iso8211.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/map/ENC/iso8211.cpp b/src/map/ENC/iso8211.cpp index 5ee607de..1cbd462f 100644 --- a/src/map/ENC/iso8211.cpp +++ b/src/map/ENC/iso8211.cpp @@ -91,15 +91,16 @@ bool ISO8211::readDDA(const FieldDefinition &def, SubFields &fields) { static const QRegularExpression re( "([0-9]*)(A|I|R|B|b11|b12|b14|b21|b22|b24)\\(*([0-9]*)\\)*"); - QByteArray ba(def.size, Qt::Initialization::Uninitialized); + char buffer[def.size]; bool repeat = false; QVector defs; QVector defTags; - if (!(_file.seek(def.pos) && _file.read(ba.data(), ba.size()) == ba.size())) + if (!(_file.seek(def.pos) && _file.read(buffer, def.size) == def.size)) return false; - QList list(ba.split('\x1f')); + QList list(QByteArray::fromRawData(buffer, def.size) + .split('\x1f')); if (!list.at(1).isEmpty() && list.at(1).front() == '*') { repeat = true; list[1].remove(0, 1); @@ -192,15 +193,14 @@ bool ISO8211::readDDR() bool ISO8211::readUDA(quint64 pos, const FieldDefinition &def, const QVector &fields, bool repeat, Data &data) { - QByteArray ba(def.size, Qt::Initialization::Uninitialized); + char ba[def.size]; - if (!(_file.seek(pos + def.pos) - && _file.read(ba.data(), ba.size()) == ba.size())) + if (!(_file.seek(pos + def.pos) && _file.read(ba, def.size) == def.size)) return false; const char *sp; - const char *dp = ba.constData(); - const char *ep = ba.constData() + ba.size() - 1; + const char *dp = ba; + const char *ep = ba + def.size - 1; do { QVector row(fields.size()); From b4497aaa3efee8184483907ef98f633ced5d0e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 24 Apr 2025 23:51:31 +0200 Subject: [PATCH 11/36] Silence warning when compiling on Qt >= 6.9 --- src/map/ozf.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/map/ozf.cpp b/src/map/ozf.cpp index 4d7225d1..9497737b 100644 --- a/src/map/ozf.cpp +++ b/src/map/ozf.cpp @@ -232,7 +232,11 @@ QPixmap OZF::tile(int zoom, int x, int y) tileSize().height(), QImage::Format_Indexed8); img.setColorTable(z.palette); +#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0) return QPixmap::fromImage(img.mirrored()); +#else // QT 6.9 + return QPixmap::fromImage(img.flipped()); +#endif // QT 6.9 } QSize OZF::size(int zoom) const From 0c0d5dd273150b28cb0c46d32c7ca7f62c2bcc5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 25 Apr 2025 00:41:21 +0200 Subject: [PATCH 12/36] Revert "Micro-optimizations" This reverts commit f90ac6a37efa6480194912440cc0e034dd06cf81. --- src/map/ENC/iso8211.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/map/ENC/iso8211.cpp b/src/map/ENC/iso8211.cpp index 1cbd462f..5ee607de 100644 --- a/src/map/ENC/iso8211.cpp +++ b/src/map/ENC/iso8211.cpp @@ -91,16 +91,15 @@ bool ISO8211::readDDA(const FieldDefinition &def, SubFields &fields) { static const QRegularExpression re( "([0-9]*)(A|I|R|B|b11|b12|b14|b21|b22|b24)\\(*([0-9]*)\\)*"); - char buffer[def.size]; + QByteArray ba(def.size, Qt::Initialization::Uninitialized); bool repeat = false; QVector defs; QVector defTags; - if (!(_file.seek(def.pos) && _file.read(buffer, def.size) == def.size)) + if (!(_file.seek(def.pos) && _file.read(ba.data(), ba.size()) == ba.size())) return false; - QList list(QByteArray::fromRawData(buffer, def.size) - .split('\x1f')); + QList list(ba.split('\x1f')); if (!list.at(1).isEmpty() && list.at(1).front() == '*') { repeat = true; list[1].remove(0, 1); @@ -193,14 +192,15 @@ bool ISO8211::readDDR() bool ISO8211::readUDA(quint64 pos, const FieldDefinition &def, const QVector &fields, bool repeat, Data &data) { - char ba[def.size]; + QByteArray ba(def.size, Qt::Initialization::Uninitialized); - if (!(_file.seek(pos + def.pos) && _file.read(ba, def.size) == def.size)) + if (!(_file.seek(pos + def.pos) + && _file.read(ba.data(), ba.size()) == ba.size())) return false; const char *sp; - const char *dp = ba; - const char *ep = ba + def.size - 1; + const char *dp = ba.constData(); + const char *ep = ba.constData() + ba.size() - 1; do { QVector row(fields.size()); From eb81ee9aaa73b7cf566fb18d532298a49c589abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 25 Apr 2025 23:00:25 +0200 Subject: [PATCH 13/36] Shellfish farms --- gpxsee.qrc | 1 + icons/map/marine/shellfish-farm-line.png | Bin 0 -> 335 bytes src/map/ENC/mapdata.cpp | 4 ++-- src/map/ENC/objects.h | 2 +- src/map/ENC/style.cpp | 13 ++++++++----- 5 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 icons/map/marine/shellfish-farm-line.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 1c08bde5..5ea77cf5 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -218,6 +218,7 @@ icons/map/marine/nature-reserve-line.png icons/map/marine/sanctuary-line.png icons/map/marine/fishing-farm.png + icons/map/marine/shellfish-farm-line.png diff --git a/icons/map/marine/shellfish-farm-line.png b/icons/map/marine/shellfish-farm-line.png new file mode 100644 index 0000000000000000000000000000000000000000..7236ec5154e466705a6b16d5eb4ee52238464cfe GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^(m>44!3HFM9x&Sqq!^2X+?^P2p46!aa#+$GeH|GX zHuiJ>Nn{1`6_P!Id>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!tD z$=lt9!GK`_gEV*j^irS*XMsm#G0^JkAk65bF}ngNxXjbVF+}71+8{?RCPSV%*IcK} z6ZzHsvqS%z^5^col>&jcsyr2^xGuF=ZlXBzSV9tx$FGB aH@tgGLY-9W9^3)Cn8DN4&t;ucLK6Vp{d^Gs literal 0 HcmV?d00001 diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index dd7cca0d..7c4af56c 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -375,7 +375,7 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr, subtype = CATACH; else if (type == I_ACHARE) subtype = I_CATACH; - else if (type == MARKUL) + else if (type == MARCUL) subtype = CATMFA; else if (type == I_BUNSTA) subtype = I_CATBUN; @@ -436,7 +436,7 @@ MapData::Poly::Poly(uint type, const Polygon &path, const Attributes &attr, subtype = I_CATACH; else if (type == HRBFAC) subtype = CATHAF; - else if (type == MARKUL) + else if (type == MARCUL) subtype = CATMFA; else if (type == I_BERTHS) subtype = I_CATBRT; diff --git a/src/map/ENC/objects.h b/src/map/ENC/objects.h index 2fa3568c..aea5ebce 100644 --- a/src/map/ENC/objects.h +++ b/src/map/ENC/objects.h @@ -55,7 +55,7 @@ #define LNDMRK 74 #define LIGHTS 75 #define LOKBSN 79 -#define MARKUL 82 +#define MARCUL 82 #define MORFAC 84 #define NAVLNE 85 #define OBSTRN 86 diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index f04ae791..113e3f4c 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -147,8 +147,10 @@ void Style::polygonStyle() 1.5, Qt::DashLine)); _polygons[TYPE(CBLARE)] = Polygon(QImage(":/marine/cable-area-line.png")); _polygons[TYPE(PIPARE)] = Polygon(QImage(":/marine/pipeline-area-line.png")); - _polygons[SUBTYPE(MARKUL, 0)] = Polygon(QImage(":/marine/fishing-farm-line.png")); - _polygons[SUBTYPE(MARKUL, 3)] = Polygon(QImage(":/marine/fishing-farm-line.png")); + _polygons[SUBTYPE(MARCUL, 0)] = Polygon(QImage(":/marine/fishing-farm-line.png")); + _polygons[SUBTYPE(MARCUL, 1)] = Polygon(QImage(":/marine/shellfish-farm-line.png")); + _polygons[SUBTYPE(MARCUL, 2)] = Polygon(QImage(":/marine/shellfish-farm-line.png")); + _polygons[SUBTYPE(MARCUL, 3)] = Polygon(QImage(":/marine/fishing-farm-line.png")); _polygons[TYPE(BERTHS)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine)); _polygons[TYPE(I_BERTHS)] = _polygons[TYPE(BERTHS)]; @@ -189,7 +191,8 @@ void Style::polygonStyle() << SUBTYPE(RESARE, 23) << SUBTYPE(I_RESARE, 23) << SUBTYPE(RESARE, 25) << SUBTYPE(I_RESARE, 25) << SUBTYPE(RESARE, 26) << SUBTYPE(I_RESARE, 26) << TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE) << TYPE(I_TRNBSN) - << SUBTYPE(MARKUL, 0) << SUBTYPE(MARKUL, 3) << TYPE(CONZNE); + << SUBTYPE(MARCUL, 0) << SUBTYPE(MARCUL, 1) << SUBTYPE(MARCUL, 2) + << SUBTYPE(MARCUL, 3) << TYPE(CONZNE); } void Style::lineStyle(qreal ratio) @@ -402,8 +405,8 @@ void Style::pointStyle(qreal ratio) _points[TYPE(LNDARE)].setHaloColor(QColor()); _points[TYPE(LNDRGN)].setHaloColor(QColor()); _points[TYPE(RADRFL)] = Point(QImage(":/marine/radar-reflector.png")); - _points[SUBTYPE(MARKUL, 0)] = Point(QImage(":/marine/fishing-farm.png")); - _points[SUBTYPE(MARKUL, 3)] = Point(QImage(":/marine/fishing-farm.png")); + _points[SUBTYPE(MARCUL, 0)] = Point(QImage(":/marine/fishing-farm.png")); + _points[SUBTYPE(MARCUL, 3)] = Point(QImage(":/marine/fishing-farm.png")); _points[SUBTYPE(I_BERTHS, 6)] = Point(QImage(":/marine/fleeting-area.png"), Small); From ba50e673800206cf448390ad1e5574f31a1e4dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 29 Apr 2025 09:08:55 +0200 Subject: [PATCH 14/36] Refactoring --- src/map/ENC/iso8211.cpp | 8 ++++---- src/map/ENC/iso8211.h | 7 +++++-- src/map/ENC/mapdata.cpp | 20 ++++++++++---------- src/map/encmap.cpp | 4 ++-- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/map/ENC/iso8211.cpp b/src/map/ENC/iso8211.cpp index 5ee607de..1d1662f6 100644 --- a/src/map/ENC/iso8211.cpp +++ b/src/map/ENC/iso8211.cpp @@ -298,11 +298,11 @@ bool ISO8211::readRecord(Record &record) return true; } -const ISO8211::Field *ISO8211::field(const Record &record, quint32 name) +const ISO8211::Field *ISO8211::Record::field(quint32 name) const { - for (int i = 0; i < record.size(); i++) - if (record.at(i).tag() == name) - return &record.at(i); + for (int i = 0; i < size(); i++) + if (at(i).tag() == name) + return &at(i); return 0; } diff --git a/src/map/ENC/iso8211.h b/src/map/ENC/iso8211.h index 992f7846..7588836a 100644 --- a/src/map/ENC/iso8211.h +++ b/src/map/ENC/iso8211.h @@ -26,14 +26,17 @@ public: Data _data; }; - typedef QVector Record; + class Record : public QVector + { + public: + const Field *field(quint32 name) const; + }; ISO8211(const QString &path) : _file(path) {} bool readDDR(); bool readRecord(Record &record); const QString &errorString() const {return _errorString;} - static const Field *field(const Record &record, quint32 name); static constexpr quint32 NAME(const char str[4]) { return static_cast(str[0]) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 7c4af56c..98292d35 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -151,9 +151,9 @@ static const ISO8211::Field *SGXD(const ISO8211::Record &r) { const ISO8211::Field *f; - if ((f = ISO8211::field(r, SG2D))) + if ((f = r.field(SG2D))) return f; - else if ((f = ISO8211::field(r, SG3D))) + else if ((f = r.field(SG3D))) return f; else return 0; @@ -495,7 +495,7 @@ QVector MapData::soundings(const ISO8211::Record &r, uint comf, uint somf) { QVector s; - const ISO8211::Field *f = ISO8211::field(r, SG3D); + const ISO8211::Field *f = r.field(SG3D); if (!f) return QVector(); @@ -517,7 +517,7 @@ QVector MapData::soundingGeometry(const ISO8211::Record &r, quint32 id; RecordMapIterator it; - const ISO8211::Field *fspt = ISO8211::field(r, FSPT); + const ISO8211::Field *fspt = r.field(FSPT); if (!fspt || fspt->data().at(0).size() != 4) return QVector(); @@ -545,7 +545,7 @@ Coordinates MapData::pointGeometry(const ISO8211::Record &r, quint32 id; RecordMapIterator it; - const ISO8211::Field *fspt = ISO8211::field(r, FSPT); + const ISO8211::Field *fspt = r.field(FSPT); if (!fspt || fspt->data().at(0).size() != 4) return Coordinates(); @@ -575,7 +575,7 @@ QVector MapData::lineGeometry(const ISO8211::Record &r, quint8 type; quint32 id; - const ISO8211::Field *fspt = ISO8211::field(r, FSPT); + const ISO8211::Field *fspt = r.field(FSPT); if (!fspt || fspt->data().at(0).size() != 4) return QVector(); @@ -588,7 +588,7 @@ QVector MapData::lineGeometry(const ISO8211::Record &r, if (it == ve.constEnd()) return QVector(); const ISO8211::Record &frid = it.value(); - const ISO8211::Field *vrpt = ISO8211::field(frid, VRPT); + const ISO8211::Field *vrpt = frid.field(VRPT); if (!vrpt || vrpt->data().size() != 2) return QVector(); @@ -641,7 +641,7 @@ Polygon MapData::polyGeometry(const ISO8211::Record &r, const RecordMap &vc, quint8 type; quint32 id; - const ISO8211::Field *fspt = ISO8211::field(r, FSPT); + const ISO8211::Field *fspt = r.field(FSPT); if (!fspt || fspt->data().at(0).size() != 4) return Polygon(); @@ -660,7 +660,7 @@ Polygon MapData::polyGeometry(const ISO8211::Record &r, const RecordMap &vc, if (it == ve.constEnd()) return Polygon(); const ISO8211::Record &frid = it.value(); - const ISO8211::Field *vrpt = ISO8211::field(frid, VRPT); + const ISO8211::Field *vrpt = frid.field(VRPT); if (!vrpt || vrpt->data().size() != 2) return Polygon(); @@ -723,7 +723,7 @@ MapData::Attributes MapData::attributes(const ISO8211::Record &r) { Attributes attr; - const ISO8211::Field *attf = ISO8211::field(r, ATTF); + const ISO8211::Field *attf = r.field(ATTF); if (!(attf && attf->data().at(0).size() == 2)) return attr; diff --git a/src/map/encmap.cpp b/src/map/encmap.cpp index 1e1cd922..3d3a47d8 100644 --- a/src/map/encmap.cpp +++ b/src/map/encmap.cpp @@ -63,9 +63,9 @@ static const ISO8211::Field *SGXD(const ISO8211::Record &r) { const ISO8211::Field *f; - if ((f = ISO8211::field(r, SG2D))) + if ((f = r.field(SG2D))) return f; - else if ((f = ISO8211::field(r, SG3D))) + else if ((f = r.field(SG3D))) return f; else return 0; From ed4c18b7734367a5e0ea312f650d24929e7c2b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 30 Apr 2025 23:05:04 +0200 Subject: [PATCH 15/36] Improved error reporting --- src/map/ENC/iso8211.cpp | 4 ---- src/map/ENC/iso8211.h | 1 + src/map/ENC/mapdata.cpp | 10 ++++++++-- src/map/encatlas.cpp | 10 +++++----- src/map/encmap.cpp | 10 +++++----- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/map/ENC/iso8211.cpp b/src/map/ENC/iso8211.cpp index 1d1662f6..bdd198c6 100644 --- a/src/map/ENC/iso8211.cpp +++ b/src/map/ENC/iso8211.cpp @@ -259,13 +259,9 @@ bool ISO8211::readUDA(quint64 pos, const FieldDefinition &def, bool ISO8211::readRecord(Record &record) { - if (_file.atEnd()) - return false; - QVector fields; qint64 pos = _file.pos(); - if (readDR(fields) < 0) { _errorString = "Error reading DR"; return false; diff --git a/src/map/ENC/iso8211.h b/src/map/ENC/iso8211.h index 7588836a..ab2cb450 100644 --- a/src/map/ENC/iso8211.h +++ b/src/map/ENC/iso8211.h @@ -35,6 +35,7 @@ public: ISO8211(const QString &path) : _file(path) {} bool readDDR(); bool readRecord(Record &record); + bool atEnd() const {return _file.atEnd();} const QString &errorString() const {return _errorString;} static constexpr quint32 NAME(const char str[4]) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 98292d35..2e3a1179 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -829,9 +829,15 @@ MapData::MapData(const QString &path) if (!ddf.readDDR()) return; - while (ddf.readRecord(record)) + while (!ddf.atEnd()) { + if (!ddf.readRecord(record)) { + qWarning("%s: %s", qUtf8Printable(path), + qUtf8Printable(ddf.errorString())); + break; + } if (!processRecord(record, fe, vi, vc, ve, comf, somf, huni)) - qWarning("Invalid S-57 record"); + qWarning("%s: Invalid S-57 record", qUtf8Printable(path)); + } for (int i = 0; i < fe.size(); i++) { const ISO8211::Record &r = fe.at(i); diff --git a/src/map/encatlas.cpp b/src/map/encatlas.cpp index 6a9b78c2..23fb9b14 100644 --- a/src/map/encatlas.cpp +++ b/src/map/encatlas.cpp @@ -127,14 +127,14 @@ ENCAtlas::ENCAtlas(const QString &fileName, QObject *parent) _errorString = ddf.errorString(); return; } - while (ddf.readRecord(record)) { + while (!ddf.atEnd()) { + if (!ddf.readRecord(record)) { + _errorString = ddf.errorString(); + return; + } if (processRecord(record, file, bounds)) addMap(dir, file, bounds); } - if (!ddf.errorString().isNull()) { - _errorString = ddf.errorString(); - return; - } if (_data.isEmpty()) { _errorString = "No usable ENC map found"; diff --git a/src/map/encmap.cpp b/src/map/encmap.cpp index 3d3a47d8..38ff9714 100644 --- a/src/map/encmap.cpp +++ b/src/map/encmap.cpp @@ -143,16 +143,16 @@ ENCMap::ENCMap(const QString &fileName, QObject *parent) _errorString = ddf.errorString(); return; } - while (ddf.readRecord(record)) { + while (!ddf.atEnd()) { + if (!ddf.readRecord(record)) { + _errorString = ddf.errorString(); + return; + } if (!processRecord(record, gv, comf, dsnm)) { _errorString = "Invalid S-57 record"; return; } } - if (!ddf.errorString().isNull()) { - _errorString = ddf.errorString(); - return; - } _name = dsnm; From ed7fc5fba345dfda3629ded9d34f7c71ccaa7f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 1 May 2025 07:59:02 +0200 Subject: [PATCH 16/36] Properly render ACHARE labels --- src/map/ENC/mapdata.cpp | 5 ++++- src/map/ENC/style.cpp | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 2e3a1179..51b5cdcd 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -85,6 +85,8 @@ static QMap orderMapInit() map.insert(TYPE(LNDELV), 44); map.insert(TYPE(SMCFAC), 45); map.insert(TYPE(BUISGL), 46); + map.insert(TYPE(ACHARE), 47); + map.insert(TYPE(I_ACHARE), 47); map.insert(TYPE(I_DISMAR), 0xFFFFFFFE); map.insert(TYPE(SOUNDG), 0xFFFFFFFF); @@ -192,7 +194,8 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context) || type == SUBTYPE(ACHARE, 2) || type == SUBTYPE(I_ACHARE, 2) || type == SUBTYPE(ACHARE, 3) || type == SUBTYPE(I_ACHARE, 3) || type == SUBTYPE(ACHARE, 9) || type == SUBTYPE(I_ACHARE, 9) - || type == SUBTYPE(I_BERTHS, 6) + || type == SUBTYPE(I_ACHARE, 10) || type == SUBTYPE(I_ACHARE, 11) + || type == SUBTYPE(I_ACHARE, 12) || type == SUBTYPE(I_BERTHS, 6) || type == SUBTYPE(RESARE, 1) || type == SUBTYPE(I_RESARE, 1) || type == SUBTYPE(RESARE, 2) || type == SUBTYPE(I_RESARE, 2) || type == SUBTYPE(RESARE, 4) || type == SUBTYPE(I_RESARE, 4) diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 113e3f4c..6d8f7d67 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -412,15 +412,42 @@ void Style::pointStyle(qreal ratio) Small); _points[SUBTYPE(I_BERTHS, 6)].setTextColor(QColor(0xeb, 0x49, 0xeb)); _points[SUBTYPE(I_BERTHS, 6)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 1)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 1)].setHaloColor(QColor()); _points[SUBTYPE(ACHARE, 2)] = Point(QImage(":/marine/dw-anchorage.png"), Small); + _points[SUBTYPE(ACHARE, 2)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 2)].setHaloColor(QColor()); _points[SUBTYPE(ACHARE, 3)] = Point(QImage(":/marine/tanker-anchorage.png"), Small); + _points[SUBTYPE(ACHARE, 3)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 3)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 4)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 4)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 5)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 5)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 6)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 6)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 7)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 7)].setHaloColor(QColor()); + _points[SUBTYPE(ACHARE, 8)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 8)].setHaloColor(QColor()); _points[SUBTYPE(ACHARE, 9)] = Point(QImage(":/marine/24h-anchorage.png"), Small); + _points[SUBTYPE(ACHARE, 9)].setTextColor(QColor(0xeb, 0x49, 0xeb)); + _points[SUBTYPE(ACHARE, 9)].setHaloColor(QColor()); + _points[SUBTYPE(I_ACHARE, 1)] = _points[SUBTYPE(ACHARE, 1)]; _points[SUBTYPE(I_ACHARE, 2)] = _points[SUBTYPE(ACHARE, 2)]; _points[SUBTYPE(I_ACHARE, 3)] = _points[SUBTYPE(ACHARE, 3)]; + _points[SUBTYPE(I_ACHARE, 4)] = _points[SUBTYPE(ACHARE, 4)]; + _points[SUBTYPE(I_ACHARE, 5)] = _points[SUBTYPE(ACHARE, 5)]; + _points[SUBTYPE(I_ACHARE, 6)] = _points[SUBTYPE(ACHARE, 6)]; + _points[SUBTYPE(I_ACHARE, 7)] = _points[SUBTYPE(ACHARE, 7)]; + _points[SUBTYPE(I_ACHARE, 8)] = _points[SUBTYPE(ACHARE, 8)]; _points[SUBTYPE(I_ACHARE, 9)] = _points[SUBTYPE(ACHARE, 9)]; + _points[SUBTYPE(I_ACHARE, 10)] = _points[SUBTYPE(I_ACHARE, 1)]; + _points[SUBTYPE(I_ACHARE, 11)] = _points[SUBTYPE(I_ACHARE, 1)]; + _points[SUBTYPE(I_ACHARE, 12)] = _points[SUBTYPE(I_ACHARE, 1)]; _points[SUBTYPE(RESARE, 1)].setTextColor(QColor(0xeb, 0x49, 0xeb)); _points[SUBTYPE(RESARE, 1)].setHaloColor(QColor()); _points[SUBTYPE(RESARE, 2)] = _points[SUBTYPE(RESARE, 1)]; From 0d9daf8b4fa4d6829afd307af4cf1a1165b67eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 1 May 2025 08:36:55 +0200 Subject: [PATCH 17/36] Code cleanup --- src/map/ENC/iso8211.cpp | 27 +++++++++++++++------------ src/map/ENC/iso8211.h | 11 ++++++----- src/map/ENC/mapdata.cpp | 16 ++++++++-------- src/map/encatlas.cpp | 2 +- src/map/encmap.cpp | 10 +++++----- 5 files changed, 35 insertions(+), 31 deletions(-) diff --git a/src/map/ENC/iso8211.cpp b/src/map/ENC/iso8211.cpp index bdd198c6..267a2a62 100644 --- a/src/map/ENC/iso8211.cpp +++ b/src/map/ENC/iso8211.cpp @@ -44,6 +44,15 @@ ISO8211::SubFieldDefinition ISO8211::fieldType(const QString &str, int cnt) return SubFieldDefinition(); } +const ISO8211::Field *ISO8211::Record::field(quint32 name) const +{ + for (int i = 0; i < size(); i++) + if (at(i).tag() == name) + return &at(i); + + return 0; +} + int ISO8211::readDR(QVector &fields) { DR ddr; @@ -275,16 +284,12 @@ bool ISO8211::readRecord(Record &record) FieldsMap::const_iterator it(_map.find(def.tag)); if (it == _map.constEnd()) { - QByteArray tag(sizeof(quint32), Qt::Initialization::Uninitialized); - qToLittleEndian(def.tag, tag.data()); - _errorString = QString("%1: unknown record").arg(QString(tag)); + _errorString = QString("%1: unknown record").arg(NAME(def.tag)); return false; } if (!readUDA(pos, def, it->defs(), it->repeat(), data)) { - QByteArray tag(sizeof(quint32), Qt::Initialization::Uninitialized); - qToLittleEndian(def.tag, tag.data()); - _errorString = QString("Error reading %1 record").arg(QString(tag)); + _errorString = QString("Error reading %1 record").arg(NAME(def.tag)); return false; } @@ -294,11 +299,9 @@ bool ISO8211::readRecord(Record &record) return true; } -const ISO8211::Field *ISO8211::Record::field(quint32 name) const +QString ISO8211::NAME(quint32 tag) { - for (int i = 0; i < size(); i++) - if (at(i).tag() == name) - return &at(i); - - return 0; + QByteArray ba(sizeof(quint32), Qt::Initialization::Uninitialized); + qToLittleEndian(tag, ba.data()); + return QString::fromLatin1(ba); } diff --git a/src/map/ENC/iso8211.h b/src/map/ENC/iso8211.h index ab2cb450..6418387d 100644 --- a/src/map/ENC/iso8211.h +++ b/src/map/ENC/iso8211.h @@ -38,13 +38,14 @@ public: bool atEnd() const {return _file.atEnd();} const QString &errorString() const {return _errorString;} - static constexpr quint32 NAME(const char str[4]) + static constexpr quint32 TAG(const char name[4]) { - return static_cast(str[0]) - + (static_cast(str[1]) << 8) - + (static_cast(str[2]) << 16) - + (static_cast(str[3]) << 24); + return static_cast(name[0]) + + (static_cast(name[1]) << 8) + + (static_cast(name[2]) << 16) + + (static_cast(name[3]) << 24); } + static QString NAME(quint32 tag); private: enum FieldType {Unknown, String, Array, S8, S16, S32, U8, U16, U32}; diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 51b5cdcd..e041e929 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -15,14 +15,14 @@ using namespace ENC; #define PRIM_L 2 #define PRIM_A 3 -constexpr quint32 SG2D = ISO8211::NAME("SG2D"); -constexpr quint32 SG3D = ISO8211::NAME("SG3D"); -constexpr quint32 FSPT = ISO8211::NAME("FSPT"); -constexpr quint32 VRPT = ISO8211::NAME("VRPT"); -constexpr quint32 ATTF = ISO8211::NAME("ATTF"); -constexpr quint32 VRID = ISO8211::NAME("VRID"); -constexpr quint32 FRID = ISO8211::NAME("FRID"); -constexpr quint32 DSPM = ISO8211::NAME("DSPM"); +constexpr quint32 SG2D = ISO8211::TAG("SG2D"); +constexpr quint32 SG3D = ISO8211::TAG("SG3D"); +constexpr quint32 FSPT = ISO8211::TAG("FSPT"); +constexpr quint32 VRPT = ISO8211::TAG("VRPT"); +constexpr quint32 ATTF = ISO8211::TAG("ATTF"); +constexpr quint32 VRID = ISO8211::TAG("VRID"); +constexpr quint32 FRID = ISO8211::TAG("FRID"); +constexpr quint32 DSPM = ISO8211::TAG("DSPM"); static QMap orderMapInit() { diff --git a/src/map/encatlas.cpp b/src/map/encatlas.cpp index 23fb9b14..4cd8585f 100644 --- a/src/map/encatlas.cpp +++ b/src/map/encatlas.cpp @@ -12,7 +12,7 @@ using namespace ENC; #define EPSILON 1e-6 #define TILE_SIZE 512 -constexpr quint32 CATD = ISO8211::NAME("CATD"); +constexpr quint32 CATD = ISO8211::TAG("CATD"); Range ENCAtlas::zooms(IntendedUsage usage) { diff --git a/src/map/encmap.cpp b/src/map/encmap.cpp index 38ff9714..afe1c061 100644 --- a/src/map/encmap.cpp +++ b/src/map/encmap.cpp @@ -15,11 +15,11 @@ using namespace ENC; #define EPSILON 1e-6 #define TILE_SIZE 512 -constexpr quint32 SG2D = ISO8211::NAME("SG2D"); -constexpr quint32 SG3D = ISO8211::NAME("SG3D"); -constexpr quint32 VRID = ISO8211::NAME("VRID"); -constexpr quint32 DSID = ISO8211::NAME("DSID"); -constexpr quint32 DSPM = ISO8211::NAME("DSPM"); +constexpr quint32 SG2D = ISO8211::TAG("SG2D"); +constexpr quint32 SG3D = ISO8211::TAG("SG3D"); +constexpr quint32 VRID = ISO8211::TAG("VRID"); +constexpr quint32 DSID = ISO8211::TAG("DSID"); +constexpr quint32 DSPM = ISO8211::TAG("DSPM"); static Range zooms(const RectC &bounds) { From f4765d0c48695e0b3e495995c6d2ec575ac7e8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 2 May 2025 05:25:44 +0200 Subject: [PATCH 18/36] Code cleanup --- src/map/ENC/iso8211.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/map/ENC/iso8211.cpp b/src/map/ENC/iso8211.cpp index 267a2a62..dcbbfbf2 100644 --- a/src/map/ENC/iso8211.cpp +++ b/src/map/ENC/iso8211.cpp @@ -181,10 +181,8 @@ bool ISO8211::readDDR() for (int i = 0; i < fields.size(); i++) { SubFields def; if (!readDDA(fields.at(i), def)) { - QByteArray tag(sizeof(quint32), Qt::Initialization::Uninitialized); - qToLittleEndian(fields.at(i).tag, tag.data()); _errorString = QString("Error reading %1 DDA field") - .arg(QString(tag)); + .arg(NAME(fields.at(i).tag)); return false; } _map.insert(fields.at(i).tag, def); From 46a9fffb8a8efab1d7063554e7553f8f029db387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 2 May 2025 08:44:19 +0200 Subject: [PATCH 19/36] Fixed error handling --- src/map/ENC/iso8211.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/map/ENC/iso8211.cpp b/src/map/ENC/iso8211.cpp index dcbbfbf2..02dddbc4 100644 --- a/src/map/ENC/iso8211.cpp +++ b/src/map/ENC/iso8211.cpp @@ -86,11 +86,13 @@ int ISO8211::readDR(QVector &fields) return -1; r.tag = qFromLittleEndian(tag); - r.pos = offset + Util::str2int(fieldPos.constData(), posSize); + r.pos = Util::str2int(fieldPos.constData(), posSize); r.size = Util::str2int(fieldLen.constData(), lenSize); if (r.pos < 0 || r.size < 0) return -1; + + r.pos += offset; } return len; From 31a3463c9bf8224acc8d8eef848b4b3b2d6f84b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 2 May 2025 19:06:42 +0200 Subject: [PATCH 20/36] Cosmetics --- src/map/ENC/iso8211.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map/ENC/iso8211.cpp b/src/map/ENC/iso8211.cpp index 02dddbc4..4d71774f 100644 --- a/src/map/ENC/iso8211.cpp +++ b/src/map/ENC/iso8211.cpp @@ -301,7 +301,7 @@ bool ISO8211::readRecord(Record &record) QString ISO8211::NAME(quint32 tag) { - QByteArray ba(sizeof(quint32), Qt::Initialization::Uninitialized); - qToLittleEndian(tag, ba.data()); - return QString::fromLatin1(ba); + char buffer[sizeof(quint32)]; + qToLittleEndian(tag, buffer); + return QString::fromLatin1(buffer, sizeof(buffer)); } From 0d65affd4b26f0c4ebb5a52f4029d4006a4d3b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 2 May 2025 19:08:16 +0200 Subject: [PATCH 21/36] Degaussing ranges and pilot boarding areas --- gpxsee.qrc | 1 + icons/map/marine/degaussing-line.png | Bin 0 -> 289 bytes src/map/ENC/mapdata.cpp | 7 ++++++- src/map/ENC/style.cpp | 24 +++++++++++++++++------- 4 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 icons/map/marine/degaussing-line.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 5ea77cf5..469cea0e 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -219,6 +219,7 @@ icons/map/marine/sanctuary-line.png icons/map/marine/fishing-farm.png icons/map/marine/shellfish-farm-line.png + icons/map/marine/degaussing-line.png diff --git a/icons/map/marine/degaussing-line.png b/icons/map/marine/degaussing-line.png new file mode 100644 index 0000000000000000000000000000000000000000..654701cb5a605837bae9efdcb174124887c54f7f GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^@<7bO!3HGD_CHAkanc=q9T^xl_H+M9WCijWi-X*q z7;m1`sRwctl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YPV z+ua371Hn({-5}kZ1s;*bK&!8VFr$;k>hr z@NCb74_~aAnVFjpGG#8itF8aXb#nS%pqRPY-wlcn|-Ok+GMez6}ji%>Xw!a?)EQ>zv4?S&`&_g{COG1$Yi UAa(CEkoy=sUHx3vIVCg!04VoijsO4v literal 0 HcmV?d00001 diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index e041e929..b9b32176 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -191,6 +191,7 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context) if (baseType == TSSLPT || baseType == RCTLPT || baseType == I_TRNBSN || baseType == BRIDGE || baseType == I_BRIDGE || baseType == BUAARE || baseType == LNDARE || baseType == LNDRGN || baseType == I_BUNSTA + || baseType == PILBOP || type == SUBTYPE(ACHARE, 2) || type == SUBTYPE(I_ACHARE, 2) || type == SUBTYPE(ACHARE, 3) || type == SUBTYPE(I_ACHARE, 3) || type == SUBTYPE(ACHARE, 9) || type == SUBTYPE(I_ACHARE, 9) @@ -202,6 +203,7 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context) || type == SUBTYPE(RESARE, 5) || type == SUBTYPE(I_RESARE, 5) || type == SUBTYPE(RESARE, 6) || type == SUBTYPE(I_RESARE, 6) || type == SUBTYPE(RESARE, 7) || type == SUBTYPE(I_RESARE, 7) + || type == SUBTYPE(RESARE, 8) || type == SUBTYPE(I_RESARE, 8) || type == SUBTYPE(RESARE, 9) || type == SUBTYPE(I_RESARE, 9) || type == SUBTYPE(RESARE, 12) || type == SUBTYPE(I_RESARE, 12) || type == SUBTYPE(RESARE, 14) || type == SUBTYPE(I_RESARE, 14) @@ -425,6 +427,9 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr, _label = QString::fromUtf8("\xE2\x86\x95") + UNIT_SPACE + QString::number(clr) + UNIT_SPACE + hUnits(HUNI); } + } else if (_type == SUBTYPE(RESARE, 8)) { + if (_label.isEmpty()) + _label = "Degaussing Range"; } } @@ -836,7 +841,7 @@ MapData::MapData(const QString &path) if (!ddf.readRecord(record)) { qWarning("%s: %s", qUtf8Printable(path), qUtf8Printable(ddf.errorString())); - break; + return; } if (!processRecord(record, fe, vi, vc, ve, comf, somf, huni)) qWarning("%s: Invalid S-57 record", qUtf8Printable(path)); diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 6d8f7d67..f39c1bd5 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -75,6 +75,7 @@ void Style::polygonStyle() _polygons[SUBTYPE(RESARE, 5)] = Polygon(QImage(":/marine/sanctuary-line.png")); _polygons[SUBTYPE(RESARE, 6)] = Polygon(QImage(":/marine/sanctuary-line.png")); _polygons[SUBTYPE(RESARE, 7)] = Polygon(QImage(":/marine/sanctuary-line.png")); + _polygons[SUBTYPE(RESARE, 8)] = Polygon(QImage(":/marine/degaussing-line.png")); _polygons[SUBTYPE(RESARE, 9)] = Polygon(QBrush(QColor(0xff, 0x00, 0x00), Qt::BDiagPattern)); _polygons[SUBTYPE(RESARE, 12)] = Polygon(QImage(":/marine/safety-zone-line.png")); @@ -88,6 +89,10 @@ void Style::polygonStyle() _polygons[SUBTYPE(I_RESARE, 1)] = _polygons[SUBTYPE(RESARE, 1)]; _polygons[SUBTYPE(I_RESARE, 2)] = _polygons[SUBTYPE(RESARE, 2)]; _polygons[SUBTYPE(I_RESARE, 4)] = _polygons[SUBTYPE(RESARE, 4)]; + _polygons[SUBTYPE(I_RESARE, 5)] = _polygons[SUBTYPE(RESARE, 5)]; + _polygons[SUBTYPE(I_RESARE, 6)] = _polygons[SUBTYPE(RESARE, 6)]; + _polygons[SUBTYPE(I_RESARE, 7)] = _polygons[SUBTYPE(RESARE, 7)]; + _polygons[SUBTYPE(I_RESARE, 8)] = _polygons[SUBTYPE(RESARE, 8)]; _polygons[SUBTYPE(I_RESARE, 9)] = _polygons[SUBTYPE(RESARE, 9)]; _polygons[SUBTYPE(I_RESARE, 12)] = _polygons[SUBTYPE(RESARE, 12)]; _polygons[SUBTYPE(I_RESARE, 14)] = _polygons[SUBTYPE(RESARE, 14)]; @@ -159,6 +164,8 @@ void Style::polygonStyle() 1, Qt::DashLine)); _polygons[TYPE(CONZNE)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashDotLine)); + _polygons[TYPE(PILBOP)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb), + 1, Qt::DashLine)); _drawOrder << TYPE(LNDARE) << SUBTYPE(DEPARE, 0) << SUBTYPE(DEPARE, 1) @@ -184,13 +191,14 @@ void Style::polygonStyle() << SUBTYPE(I_RESARE, 1) << SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2) << SUBTYPE(RESARE, 4) << SUBTYPE(I_RESARE, 4) << SUBTYPE(RESARE, 5) << SUBTYPE(I_RESARE, 5) << SUBTYPE(RESARE, 6) << SUBTYPE(I_RESARE, 6) - << SUBTYPE(RESARE, 7) << SUBTYPE(I_RESARE, 7) << SUBTYPE(RESARE, 9) - << SUBTYPE(I_RESARE, 9) << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12) - << SUBTYPE(RESARE, 14) << SUBTYPE(I_RESARE, 14) << SUBTYPE(RESARE, 17) - << SUBTYPE(I_RESARE, 17) << SUBTYPE(RESARE, 22) << SUBTYPE(I_RESARE, 22) - << SUBTYPE(RESARE, 23) << SUBTYPE(I_RESARE, 23) << SUBTYPE(RESARE, 25) - << SUBTYPE(I_RESARE, 25) << SUBTYPE(RESARE, 26) << SUBTYPE(I_RESARE, 26) - << TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE) << TYPE(I_TRNBSN) + << SUBTYPE(RESARE, 7) << SUBTYPE(I_RESARE, 7) << SUBTYPE(RESARE, 8) + << SUBTYPE(I_RESARE, 8) << SUBTYPE(RESARE, 9) << SUBTYPE(I_RESARE, 9) + << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12) << SUBTYPE(RESARE, 14) + << SUBTYPE(I_RESARE, 14) << SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17) + << SUBTYPE(RESARE, 22) << SUBTYPE(I_RESARE, 22) << SUBTYPE(RESARE, 23) + << SUBTYPE(I_RESARE, 23) << SUBTYPE(RESARE, 25) << SUBTYPE(I_RESARE, 25) + << SUBTYPE(RESARE, 26) << SUBTYPE(I_RESARE, 26) << TYPE(CBLARE) + << TYPE(PIPARE) << TYPE(PRCARE) << TYPE(I_TRNBSN) << TYPE(PILBOP) << SUBTYPE(MARCUL, 0) << SUBTYPE(MARCUL, 1) << SUBTYPE(MARCUL, 2) << SUBTYPE(MARCUL, 3) << TYPE(CONZNE); } @@ -456,6 +464,7 @@ void Style::pointStyle(qreal ratio) _points[SUBTYPE(RESARE, 5)] = _points[SUBTYPE(RESARE, 4)]; _points[SUBTYPE(RESARE, 6)] = _points[SUBTYPE(RESARE, 4)]; _points[SUBTYPE(RESARE, 7)] = _points[SUBTYPE(RESARE, 4)]; + _points[SUBTYPE(RESARE, 8)] = _points[SUBTYPE(RESARE, 1)]; _points[SUBTYPE(RESARE, 9)] = _points[SUBTYPE(RESARE, 1)]; _points[SUBTYPE(RESARE, 12)] = _points[SUBTYPE(RESARE, 1)]; _points[SUBTYPE(RESARE, 14)] = _points[SUBTYPE(RESARE, 1)]; @@ -470,6 +479,7 @@ void Style::pointStyle(qreal ratio) _points[SUBTYPE(I_RESARE, 5)] = _points[SUBTYPE(RESARE, 5)]; _points[SUBTYPE(I_RESARE, 6)] = _points[SUBTYPE(RESARE, 6)]; _points[SUBTYPE(I_RESARE, 7)] = _points[SUBTYPE(RESARE, 7)]; + _points[SUBTYPE(I_RESARE, 8)] = _points[SUBTYPE(RESARE, 8)]; _points[SUBTYPE(I_RESARE, 9)] = _points[SUBTYPE(RESARE, 9)]; _points[SUBTYPE(I_RESARE, 12)] = _points[SUBTYPE(RESARE, 12)]; _points[SUBTYPE(I_RESARE, 14)] = _points[SUBTYPE(RESARE, 14)]; From 415962b583ccd309c201bc2af0ee982d96881640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 4 May 2025 09:04:53 +0200 Subject: [PATCH 22/36] Unified RESARE lines icons --- icons/map/marine/degaussing-line.png | Bin 289 -> 273 bytes icons/map/marine/entry-prohibited-line.png | Bin 147 -> 235 bytes icons/map/marine/nature-reserve-line.png | Bin 217 -> 292 bytes icons/map/marine/noanchor-line.png | Bin 205 -> 305 bytes icons/map/marine/overfalls.png | Bin 630 -> 617 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/icons/map/marine/degaussing-line.png b/icons/map/marine/degaussing-line.png index 654701cb5a605837bae9efdcb174124887c54f7f..697c14045d1b98500c02aaec952fd02ff40762a9 100644 GIT binary patch delta 196 zcmZ3;G?7WKGr-TCmrII^fq{Y7)59eQNGkv_I|mz(%)IPh1*8~@gWR1MZ=TetpQtE2 z(b0(0fMEfHGE1y85}Sb4q9e0GZ`S%>V!Z delta 226 zcmbQpw2;ZJGr-TCmrII^fq{Y7)59eQNXr8;3kMsJEZhGi5yVM%^mSxl*x1kgCy^D% zXDkkKcVfJGQm1~Rohc_!fPvws^X~eIH4^m|o-U3d5|@)x9GKSI#{X~M=(@ezNJ?kI zvpo|&e6eO`W^O*nl)3D#w*DX2$?1E6V&-OlTN+-J1-kKcA5Q;meDDWQTk(R^(mE5; z6pt#^yqa-AWYapIyFd6(mfBx1jq#}X#eU2zLgDNQ2h9Udtya9Z7oPCnf8BY;U=PoN T)V+Mqz^?Ih^>bP0l+XkKdKy&~ diff --git a/icons/map/marine/entry-prohibited-line.png b/icons/map/marine/entry-prohibited-line.png index 509e8c8005f2490be9c2d8ebccc3b75a106e5a1c..fe0e628a1b3374794ff193e5419410cfd6b9eef3 100644 GIT binary patch literal 235 zcmeAS@N?(olHy`uVBq!ia0vp^Qb5ek!3HG7m}0wu6k~CayA$KhlREW44okYDuOkD) z#(wTUiL5}rLb6AYF9SoB8UsT^3j@P1pisjL28L1t28LG&3=CE?7#PG0=Ijcz0ZOnX zdAqwX7%(hgkmjzRUJ4Z9Ebxdd23ma`gc+SQW>)|OojhF}Lp07OCpa*zw~hawet@Z< zGnnN9@6t}y7j40ph1_bUb>@kus$6^igTb%(#8*MjS0{THU!S)=vSVAvrI2=iSq9;C W7SH={ZeRhL#^CAd=d#Wzp$PythD2Zh delta 132 zcmaFOIGNG7Gr-TCmrII^fq{Y7)59eQNQ(e5I|mz(8- banoUDNZzN@A=n+f8f1>AtDnm{r-UW|Wws^$ diff --git a/icons/map/marine/nature-reserve-line.png b/icons/map/marine/nature-reserve-line.png index c677c355e236dd962c1bfde47dcd2bef5dfb074d..e67ae30c76292062058101fc9194ddf051568b9a 100644 GIT binary patch delta 260 zcmcb~xP&RIGr-TCmrII^fq{Y7)59eQNGkv_I|mz(%)IPh1*8~@gWR1MZ=Tet2Xa`_ z9eo`c7&i8E|4C#8@)eRjf_xbms?-=58d?|_egTCVUNA6}8Za=tN?>5Hn!&&zUNC1@ zpv^=@t@>(D7sn8d^J^#F40`Uj(MAc^b}{^Q6I_Us#jvpwq2{Mw818OFUCP-1=-P h-1y+Xx4%0RgI=YF4J*HO>_47B<>2s1iq%&q_mc6hothG?8$JJFDD_cq5s!?oSK-X t6L~<*Z2mUS%e}egk>cx*NA?Rz&P!m87fw67S{LXh22WQ%mvv4FO#r!|X*>V` delta 191 zcmdnUbe7S$Gr-TCmrII^fq{Y7)59eQNQ(e5I|mz(0T z)l^GIv}fhr~Zzry+;1wLT@T~T0~;j?|)u&O3~53 lAXlu~e2V0r+R7)I=Kik1CpsdJ$%0(q>FVdQj@c=p2>@B`K+FID diff --git a/icons/map/marine/overfalls.png b/icons/map/marine/overfalls.png index 105c0963d3f7c2ef6069476dfec0944d7d00e6e6..9a6a68c5098893048b5fa04056b2bf2232807fbe 100644 GIT binary patch literal 617 zcmV-v0+#)WP)z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;x@Vpa2^Sf0uOt000SaNLh0L01ejw01ejxLMWSf0005N zNkl zIQWwT#X*~cVhEEpKZ+q%D2qm1KJ@hL`8`%UdDnAzzVFZX^Y8n4e;A7*Hp$0fH0JQl z*ptH-Z~~KaY`U`!Yw#4CQIWwP#XXeJkipNz0A6E7nZ(ZF2~J~5hRrUN3K_&_wBQ;Z zq7p;+iNzSjhUm^sT*cI|tHd&NM)H@@7ae+sA6SX|k@!jUMxvvr#xJaj7-dn53wVQm z4B}v_n~jm&P;~nlwk7x`+`=n7$78gn;_QxlrSNke^NkZTv1o!e#c>2&fGYnJCY2e= zB+DvTp#Y{tcHCU!NxNDQhW`S{>7i+K7w_jzCnBp zbg^ab8yHWs2CT{x3`&7|@U;Q(I7 z|11n+FW$zw=)%s}Vc%oOZ=)?%KsUArUx9ge5Cwk05}b`O8o{?{KpU>4+nHXnb>X}U zJ@KVcA5UG4>#>lNSdJ~>`vx9m#B9deDE?x+)EN8*b%J1{t~@dx00000NkvXXu0mjf D%G3u4 literal 630 zcmV-+0*U>JP) z#H6-tltK{-sVOp1A}Otu3x}4ta3_iEVnxX9CCq3LQym1l-WkjoHfeAh?_^v zfA9ZY+Ldp;7w`Lh-skrmzdw4S81toL8!A)yDy&Z7^RN%ODK_;OnZj3KP7+asM_7oQ z1b!D9&>BuMQGzD4VRDw>kK!Q?p?`wS%J6>)g$euwv|wId0{IEca31%Nk9PdTSae}_ zRQWQ_VL;gBhx6SLz!@|~rC;L*rr=H_w;wkmnXU--7pBG;n{fpn@G)$@V*%FUYTB5L z!EwCAV>Dx9Mpr5$f%fRy6D;n=Pl^Cu;3*zpMaDU+;=k7Lb1Y+YYNFcBk;o~O`v(j` zX&-Hhdzoh#g@P2mv={#WMZYYI)E&cn;Rj)0AAJ<}!so`W^}sCLj0H?WHQr%wN&y;i zJ4F`Ppc8Ym@Z<3%)F%n~xDfmB7yc~dPRtBdX~z3dgbJ*~QtSyOIUNZVp$yYQUGgwE z5@|w5_?Q;|Z^6M(o))~pFpS0~)L{n><1LWo zJT(4WEao-ThWyoIN$@!sfxA(J&!HYiVq`n Date: Sun, 4 May 2025 15:50:02 +0200 Subject: [PATCH 23/36] Use colored buoys/beacons in ENC maps --- gpxsee.qrc | 40 ++++++++ icons/map/marine/beacon-black-green.png | Bin 0 -> 282 bytes icons/map/marine/beacon-black-red.png | Bin 0 -> 277 bytes icons/map/marine/beacon-black-white.png | Bin 0 -> 278 bytes icons/map/marine/beacon-black-yellow.png | Bin 0 -> 278 bytes icons/map/marine/beacon-green-black.png | Bin 0 -> 283 bytes icons/map/marine/beacon-green-red.png | Bin 0 -> 290 bytes icons/map/marine/beacon-green-white.png | Bin 0 -> 286 bytes icons/map/marine/beacon-green.png | Bin 0 -> 281 bytes icons/map/marine/beacon-red-black.png | Bin 0 -> 277 bytes icons/map/marine/beacon-red-green.png | Bin 0 -> 289 bytes icons/map/marine/beacon-red-white.png | Bin 0 -> 284 bytes icons/map/marine/beacon-red.png | Bin 0 -> 278 bytes icons/map/marine/beacon-white-black.png | Bin 0 -> 277 bytes icons/map/marine/beacon-white-green.png | Bin 0 -> 285 bytes icons/map/marine/beacon-white-red.png | Bin 0 -> 281 bytes icons/map/marine/beacon-white-yellow.png | Bin 0 -> 279 bytes icons/map/marine/beacon-white.png | Bin 0 -> 275 bytes icons/map/marine/beacon-yellow-black.png | Bin 0 -> 276 bytes icons/map/marine/beacon-yellow-white.png | Bin 0 -> 280 bytes icons/map/marine/beacon-yellow.png | Bin 0 -> 275 bytes icons/map/marine/beacon.png | Bin 202 -> 266 bytes icons/map/marine/buoy-black-green.png | Bin 0 -> 327 bytes icons/map/marine/buoy-black-red.png | Bin 0 -> 328 bytes icons/map/marine/buoy-black-white.png | Bin 0 -> 291 bytes icons/map/marine/buoy-black-yellow.png | Bin 0 -> 324 bytes icons/map/marine/buoy-green-black.png | Bin 0 -> 336 bytes icons/map/marine/buoy-green-red.png | Bin 0 -> 352 bytes icons/map/marine/buoy-green-white.png | Bin 0 -> 349 bytes icons/map/marine/buoy-green.png | Bin 0 -> 332 bytes icons/map/marine/buoy-red-black.png | Bin 0 -> 330 bytes icons/map/marine/buoy-red-green.png | Bin 0 -> 343 bytes icons/map/marine/buoy-red-white.png | Bin 0 -> 338 bytes icons/map/marine/buoy-red.png | Bin 0 -> 332 bytes icons/map/marine/buoy-white-black.png | Bin 0 -> 320 bytes icons/map/marine/buoy-white-green.png | Bin 0 -> 338 bytes icons/map/marine/buoy-white-red.png | Bin 0 -> 341 bytes icons/map/marine/buoy-white-yellow.png | Bin 0 -> 331 bytes icons/map/marine/buoy-white.png | Bin 0 -> 324 bytes icons/map/marine/buoy-yellow-black.png | Bin 0 -> 324 bytes icons/map/marine/buoy-yellow-white.png | Bin 0 -> 331 bytes icons/map/marine/buoy-yellow.png | Bin 0 -> 330 bytes src/map/ENC/mapdata.cpp | 28 +++++- src/map/ENC/style.cpp | 112 +++++++++++++++++------ 44 files changed, 150 insertions(+), 30 deletions(-) create mode 100644 icons/map/marine/beacon-black-green.png create mode 100644 icons/map/marine/beacon-black-red.png create mode 100644 icons/map/marine/beacon-black-white.png create mode 100644 icons/map/marine/beacon-black-yellow.png create mode 100644 icons/map/marine/beacon-green-black.png create mode 100644 icons/map/marine/beacon-green-red.png create mode 100644 icons/map/marine/beacon-green-white.png create mode 100644 icons/map/marine/beacon-green.png create mode 100644 icons/map/marine/beacon-red-black.png create mode 100644 icons/map/marine/beacon-red-green.png create mode 100644 icons/map/marine/beacon-red-white.png create mode 100644 icons/map/marine/beacon-red.png create mode 100644 icons/map/marine/beacon-white-black.png create mode 100644 icons/map/marine/beacon-white-green.png create mode 100644 icons/map/marine/beacon-white-red.png create mode 100644 icons/map/marine/beacon-white-yellow.png create mode 100644 icons/map/marine/beacon-white.png create mode 100644 icons/map/marine/beacon-yellow-black.png create mode 100644 icons/map/marine/beacon-yellow-white.png create mode 100644 icons/map/marine/beacon-yellow.png create mode 100644 icons/map/marine/buoy-black-green.png create mode 100644 icons/map/marine/buoy-black-red.png create mode 100644 icons/map/marine/buoy-black-white.png create mode 100644 icons/map/marine/buoy-black-yellow.png create mode 100644 icons/map/marine/buoy-green-black.png create mode 100644 icons/map/marine/buoy-green-red.png create mode 100644 icons/map/marine/buoy-green-white.png create mode 100644 icons/map/marine/buoy-green.png create mode 100644 icons/map/marine/buoy-red-black.png create mode 100644 icons/map/marine/buoy-red-green.png create mode 100644 icons/map/marine/buoy-red-white.png create mode 100644 icons/map/marine/buoy-red.png create mode 100644 icons/map/marine/buoy-white-black.png create mode 100644 icons/map/marine/buoy-white-green.png create mode 100644 icons/map/marine/buoy-white-red.png create mode 100644 icons/map/marine/buoy-white-yellow.png create mode 100644 icons/map/marine/buoy-white.png create mode 100644 icons/map/marine/buoy-yellow-black.png create mode 100644 icons/map/marine/buoy-yellow-white.png create mode 100644 icons/map/marine/buoy-yellow.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 469cea0e..b749a107 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -139,7 +139,47 @@ icons/map/marine/light-major.png icons/map/marine/buoy.png + icons/map/marine/buoy-white.png + icons/map/marine/buoy-white-black.png + icons/map/marine/buoy-white-green.png + icons/map/marine/buoy-white-red.png + icons/map/marine/buoy-white-yellow.png + icons/map/marine/buoy-green.png + icons/map/marine/buoy-green-white.png + icons/map/marine/buoy-green-black.png + icons/map/marine/buoy-green-red.png + icons/map/marine/buoy-red.png + icons/map/marine/buoy-red-white.png + icons/map/marine/buoy-red-black.png + icons/map/marine/buoy-red-green.png + icons/map/marine/buoy-yellow.png + icons/map/marine/buoy-yellow-white.png + icons/map/marine/buoy-yellow-black.png + icons/map/marine/buoy-black-white.png + icons/map/marine/buoy-black-red.png + icons/map/marine/buoy-black-green.png + icons/map/marine/buoy-black-yellow.png icons/map/marine/beacon.png + icons/map/marine/beacon-white.png + icons/map/marine/beacon-white-black.png + icons/map/marine/beacon-white-green.png + icons/map/marine/beacon-white-red.png + icons/map/marine/beacon-white-yellow.png + icons/map/marine/beacon-green.png + icons/map/marine/beacon-green-white.png + icons/map/marine/beacon-green-black.png + icons/map/marine/beacon-green-red.png + icons/map/marine/beacon-red.png + icons/map/marine/beacon-red-white.png + icons/map/marine/beacon-red-black.png + icons/map/marine/beacon-red-green.png + icons/map/marine/beacon-yellow.png + icons/map/marine/beacon-yellow-white.png + icons/map/marine/beacon-yellow-black.png + icons/map/marine/beacon-black-white.png + icons/map/marine/beacon-black-red.png + icons/map/marine/beacon-black-green.png + icons/map/marine/beacon-black-yellow.png icons/map/marine/rock-exposed.png icons/map/marine/rock-dangerous.png icons/map/marine/wreck.png diff --git a/icons/map/marine/beacon-black-green.png b/icons/map/marine/beacon-black-green.png new file mode 100644 index 0000000000000000000000000000000000000000..63bf20cbfdc264524399ac145a5c367aaa0be3ca GIT binary patch literal 282 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yHci)5S5w;`G}PN3H_~9NumHxBmNA zhbZp$DG1ZQ+b7Dk$k$`(L=HvIj3yP^?TaiKjjlJg-dLcopuIZ$#ChAj^^O{UOy<5Z z*6uN%x2rn)N%fQ^IeSh7f1P&kh)(|#75_`GcW;c+37k}X?C7DirnhQL4bow9&Vnac ST!HRpVDNPHb6Mw<&;$UnN?V)& literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-black-red.png b/icons/map/marine/beacon-black-red.png new file mode 100644 index 0000000000000000000000000000000000000000..b1c483d1db0c36b0b2afbbacb019e1ad26e33fb2 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC@@)5S5w;`G}PN3I3~9`BUj|C?ox zbT{8}ZRMPIEjV-bBrzeS7L|u;9-E#YHDPzSw>42o>;?CV9gpNb?b`SK`03ZuCpgy6 z{km@LwC5V0krjpguYKk44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC^8)5S5w;`G}o2l);ta5%qw^uK=N z$=j(a9cP+v2l}z;Xs%V_W=zmm^sLKsEo6EUH$C?VV=d!WEy>!IHP)~G>Q$Whl+mxjc$&~DYBPxA^luBceE#%$uuo4j)zEL25Ol>LDg OGkCiCxvXk44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC^8)5S5w;`G}PN4^6J9NFUk|0hj; zXC!pwT=VTfKQ(oGN#+bKa7~GOOg1Qx>J0iAf1xJk`nYfbH~QbCvm1_p}2o OX7F_Nb6Mw<&;$T%hgwbm literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-green-black.png b/icons/map/marine/beacon-green-black.png new file mode 100644 index 0000000000000000000000000000000000000000..803a56e3ed1fd590ec370f982dc1a995da877e9d GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yHca)5S5w;`G}PORfV3Jd?ZRum1P1 z4RMGSDyY?wv~m?NDARF~nOQJF#YEwxXmp?t@5Iwyw~ikz*NeY#Aaj*L`)og%UzL0B z&t7A2Z^qB3YX#p2PFnQQ#y|A-q~jX>DU;M+J}wCBKI$Dcr*7khpIhFlF*S(y6*~(m TC`rBq+RotV>gTe~DWM4ftMXf% literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-green-red.png b/icons/map/marine/beacon-green-red.png new file mode 100644 index 0000000000000000000000000000000000000000..483ef81db6776dc614248b3b37c149d37dd58598 GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yHck)5S5w;`G}PN3H_~9Nuofm;e30 z#eVICShbF=vL)B6gmP6(0uQySBnqfxR(j5oRXC^h^2X_>>G$n62uP=Faw+tDRJQfk zt0zbA?*Gm{W!Ij%#z{xB^Y50eK3Z<#=$Mz_mlNN-@YD)^@9JfCxw`+P;KesW bj0c$SE83~;ynlH=&=Cxtu6{1-oD!Mk44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yHcm)5S5w;`G}PN4^6J9NFS>TmR4h zrZKrnlGFLigLOqt*_<0$m0DC1g;ZYd6n)@uV(S{6-z|US9&$?;dgytJO@HDpZtq@r z{{3IYn<-`2mLz?+RsH_SwEGuX=kmt3zP+ij-MuKof0FLr>CvBNU98rb))6+FgTbo$ Xii65q=HyPG0~kDA{an^LB{Ts5h2dUm literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-green.png b/icons/map/marine/beacon-green.png new file mode 100644 index 0000000000000000000000000000000000000000..36e522dc2fecd8a518364572df87d7f62b832d74 GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yHcS)5S5w;`G}PORfV3Jd?ZRum1P1 z4RMH-DyY?o+;l|1piE^-gUgOdDkiRzHg8Xw$uRM>*RA7U%j4oBRxn#Fh*c1&^HTqH zhU;-}zTIBaN48!;Ci9-JEc4D!n&NJBa`KmAi`5AqC#fyx7c;ZJp(e<%=ZvtkU{09& QDWKg9p00i_>zopr0MLF{YybcN literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-red-black.png b/icons/map/marine/beacon-red-black.png new file mode 100644 index 0000000000000000000000000000000000000000..b96ea97c151ae06c5577ca85e512163aec1ebab2 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC@@)5S5w;`G}PN4^6JJWa0u|38?y z;k3`LE;*aG3I4qiPOBVRCaL&zsZ_`FSn#B*dld2hLU?ohjTOdQqAG1~|GsN2`FQL1 zJ=Lq9R!>=yv**O)4Z4+QK6&tcQmNf19lOEBbFMKPw{J(rR2PO14E5X0)F;?UZ~*OP N@O1TaS?83{1OOFQTAu&_ literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-red-green.png b/icons/map/marine/beacon-red-green.png new file mode 100644 index 0000000000000000000000000000000000000000..724823717cc32ddace5240b995f666531b1e9a19 GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yHcU)5S5w;`G}PN3H`3Jl<`;FaN8* zHD4`dI%jOJ^@%>QmMq_nqfk44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yHcq)5S5w;`G}PN3H_~9Nule|2K!9 z(9^b<{WYL$jrvO83mu9<9zu3aD%En!EEu%HEv{)lUA|I2qJwvqr(C6eT7LB2`>N&7 z1H+7D;;Qdi@3>k&Wyz^Il`*-QYS+Gb@V)h{I_sCNvvcXWnZ2#YTuh3U7k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC^8)5S5w;`G}PN3H`3Jl<{p{vQ5TG2T6IlKhX(nBXL>G({ybNag15qyvo;wsr;EI>+)d{bcVIWVdI<;|)t^&Uiaf=8b3789#BIi$T|W4mt@dRe38h>|iLJXr}&m<8@b{ O#SEUVelF{r5}E*aUtCxK literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-white-black.png b/icons/map/marine/beacon-white-black.png new file mode 100644 index 0000000000000000000000000000000000000000..7c48f3dfb05684d8f9bb42cdc417962f26fe7e80 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC@@)5S5w;`G}ohI|JUc$nXI{ogO~ za+ioEuO_p%xQ(KR&S}MMOblNbZ_7Oov+?7dxjJ;s#uZ9Cw=`bfvT4tzpF6(4pVM{p z_4&Uu!q1nooj4rxR(ON@`N(;1J>@?9%3If@>LoSDFe2s&^Jk44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yHcW)5S5w;`G}ofm{a^c$`1Cecylm zol1(maLn2|j^D-#9orPegs&XjX3FSrd-{{2jE)%9k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yHcS)5S5w;`G}o2e}Rya5$fR@$Y{- zcm8zFbG!Jsc3%x%DV3x!v6X4V^hql9+ZS2tq^t>Bcx)lplMSu6yp2y*D}D}pAAa)u z`lW{|{{AbE{$iuv@Mh-B`3+lVPkHGn^@6egb||a&k|#3^BSM}qZ&oof-pz2P)KcAF SGh`9aZU#?RKbLh*2~7YT6JG8B literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-white-yellow.png b/icons/map/marine/beacon-white-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..57f41a7487752e2a3d9f2bb878bface89c555f6f GIT binary patch literal 279 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC^0)5S5w;`G}o2e}R?@HkI?_`iPR zhqB0p8P5+K_WP!CtIcFa#7c%QLEB`XhuQcsD~GKPC=O;V%3OTzf>+T=_r3M1+wI%9 z9)EpqmviyB9dpmT$e)}yZl6@Py)A6JU~kk44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC@{)5S5w;`G}ohI|JUc$nXI{ogO~ za+ioEuO_p%xQ(Jv^tps+MuuMvx&7tZZNiG#TfI#6LY1bQ6?n9N5noxGlJ2Y3bbbDR z$9I+I86qpEswccxORwIhUVY$oS@=;QUEZ@1I(okvLxnvr@%~7%P-Q5Qi2&Nl;OXk; Jvd$@?2>`a7QM&*D literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-yellow-black.png b/icons/map/marine/beacon-yellow-black.png new file mode 100644 index 0000000000000000000000000000000000000000..f74fa690e24bcbb45f67eefe15f742b3153108fd GIT binary patch literal 276 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC^C)5S5w;`G}PLp}yYo~G{q^&2_2 z$4rj8c<`y1wd8G~CZ>sAlQw8f>M1rpo4GK_w0%}O51X9KmDpRJ?^5=?`up4OSjFGn z{P|z4+&xzvJ8iM9+@*i2+{w;)OCIjN$m+dJWQJu#hLg)~6{ZI9U5m_BHokrJ4`?le Mr>mdKI;Vst0O2cIN&o-= literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-yellow-white.png b/icons/map/marine/beacon-yellow-white.png new file mode 100644 index 0000000000000000000000000000000000000000..6e2c02662018ab590f5b53ff8689b6f9d88be449 GIT binary patch literal 280 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC^G)5S5w;`G}PN3H`3Jl<{p>o-n_ z)wwdOQlMNCAA!DnO9!F{V&=0x?wx%d7nmp?ab zJoE7DNBIYFuQfcUT7KSfC(wV*Cl9?(D!zL!OL|WenR7ED!^g#1ovA^*Ti!z5Zkxgy Ppw$eXu6{1-oD!M<5RzF= literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-yellow.png b/icons/map/marine/beacon-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..8f7cc09a31f2c35bf63c6fc45d494e643765ab35 GIT binary patch literal 275 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC@{)5S5w;`G}PN3H_~JeMZ^-@oI5 z9(T&h+Y6@0zFKJ#c*e1l$@37ihtd7SHsOWYt-))p-I&?MHh9kdBCc6eX6K<+@%Y#I zoZfxzp05tBw#wU9BD~vn(qvoD?YCccEsgRz8>M5Sx@fx^Q-ko9YvwBAyEdc(ZDsIu L^>bP0l+XkKkC<1# literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon.png b/icons/map/marine/beacon.png index 36d054d2ee04c0544804cf1e0935278333c080ea..5e400143e032d8e6852f5610041561029c4bb69f 100644 GIT binary patch delta 212 zcmX@b*u^wKJXoBAje&vT!m^`{K#H+A$lZzY=1HA;AcrO0(btiIVPik{pF~z5Um@8e z$d`ekN{xY`p@o6r7f`6-1p`B=0RzLU1O^7H84L{K1#@-<+Duf`DogZqaSX9I{dS5W z*8u|_=2F%F^@R?xQU$W+&c}p&k8Nua<7B|u*k3U_9pjj>^|Re_GdM&ideLCp=5XKB9}c`N}jtI<&{n4@_Tod0G+|$ M>FVdQ&MBb@0Ig_CPXGV_ delta 148 zcmV;F0Biq>0?Gl97YY~%1^@s6A@Fxpk!mV`YDq*vR5;7+R6!2FAP8$0zmnP^$rlOSy5_ zychTPKXTa?p?a8~WznUTH=pYQ?$bu}Obz`_v!l&3XMp$xl%>ptE}G)pl72 z^V_S~!dxfmmMZ=bOJ`8&pX98RAaK<2Qr(GWi6%RIj^w?0>ln&Xh5cu_g7Ri?A@uiFO6g-N(}v7F52>Kfo2U_&;O2ir0ij(_8NrI4wwu4m+U3 zu)tL-ZDK}ty58$^ULKDGtHR_|0&Sm3TVGu7bNtj*_0>%8uWsC^q;x4KIkWE0!Q%#8 zHpdk_t$pUHa<@F*UM=p))gUs5FM;*X583MNRu$$#(cN3^mj3LV#pCL!9(N>KFh}k0 RWS~Nn{1`6_P!Id>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!t9 z$=lt9q5Hz~%2_}jXMsm#F#`j)FbFd;%$g$s6s+@faSYKoUmN7f$DqiO-TS}(U5qt* zvr@NA&oYPT2^mfe*LqdoI3!-%uzpUy#S#zG_aFGf7WsF1_Bi(KZm&{$8{DXt@v-6J z9FbDb0}L#x=JSf?#cIq{4;N=-F+Y%RS!4{^nM4rgu&C*&t;ucLK6U>l3!5( literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-black-yellow.png b/icons/map/marine/buoy-black-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..6f9d983315b8d38c19fe3d1e3886b67c9d45e10f GIT binary patch literal 324 zcmeAS@N?(olHy`uVBq!ia0vp^fU&$ z?9!Y2ZmE~o6V~i}w{Kx$lh(-1G_`$sDtY4TIcK;Q#i!@(xPOIz+TCgfh3RuWy`D&@ zyqvDN=}9BUpFWL=OBgf`K4mI9;9XvmSN<_hWuI7aZPf3{ypppf<(+w(BsKZMQ;^#k NJYD@<);T3K0RT8yZb|?E literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-green-black.png b/icons/map/marine/buoy-green-black.png new file mode 100644 index 0000000000000000000000000000000000000000..f002b93b3bf5137cb17090a604a3afdbfa777d84 GIT binary patch literal 336 zcmeAS@N?(olHy`uVBq!ia0vp^fTX2JeP z|JCERWS2?KcAq@KENE#{(&Hm)a#Lo`ocB}0V_o$Z>j$iNR^Mmy&y?aksl;*6X@b^I zp)(~R3=ZDn7U#LuPflAU!C16A|M+q@JFi|9#YN9|)^aucKYRawJWJUmjevU^-k#r; zVl`!#W^P~-)en8J*Im{zrOmJ6^qaWFGaH`>*7Ve})|~A87ACW6!VA4`f2YhjrIQwT aN&4HnJU9QVcU*u@X7F_Nb6Mw<&;$V1J94rB literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-green-red.png b/icons/map/marine/buoy-green-red.png new file mode 100644 index 0000000000000000000000000000000000000000..024ab597a54a92d4755c6526242908de07b1cfe4 GIT binary patch literal 352 zcmeAS@N?(olHy`uVBq!ia0vp^fc)^Rih5z80HTSK>ks8E0d{ThA{GP-OUCIV-}m%Twm( z)AV&qQYN0`sCv3lwEN(vzZ?obyI);m-z4@cT-m^QbBegC>0W;Ija`4GKPaou<&U=4 ne7!fK*CKRwZ^d#^h9Arc);%UGKALj_-Ou3Z>gTe~DWM4f&Y8tESot&r%CySz!I-K zCQo-(hMp@9D|yvVPF!Vi^^bjD^5QAc*%KC+dntTueATllH0akux1HfKA|7iSo|)z~ zr*^9CW3Y>JRMe4V|cC;TW-IeGu5q{q7Q9`gsRcg|OE?~6Hm#zX8N=Nrx-)$RwU z)-o~ZY%VlqQujO^a)!B}e*3D+I%~Fg7%BZzjoua@80eC*+{S3p-s>ww7HnW*cqaaO z!K3GgdwvB@`jg(JQ>oDGr>r%FWs>TSnBROq3}xeQAF%bT5v#Ua>zS&Y7JP|!?Ue}Y U`P&>BfsSSHboFyt=akR{0BWLev;Y7A literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-red-green.png b/icons/map/marine/buoy-red-green.png new file mode 100644 index 0000000000000000000000000000000000000000..7c5a06d976a375bf1007a1c8e7e103013a894369 GIT binary patch literal 343 zcmeAS@N?(olHy`uVBq!ia0vp^fynKuLBh8rbYAv~C%hD%sb{r9# zU^TO0;&v{E32S--B`iF>o-L}cO^p906j#WkG@-U|Wr_;Z$1OUM3v2?)&#BCEXN!8D zwT}7xzlYnI7``->GRpp7{IQ15tmE%Yn*^16LfPD*qAK}Ew{KkEvHkkSt*m$XHg1l1 g9vpeb>DZ#B_CFb;f9UPF3<@v?Pgg&ebxsLQ0CLN9hyVZp literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-red-white.png b/icons/map/marine/buoy-red-white.png new file mode 100644 index 0000000000000000000000000000000000000000..9c82e5b6da74b2182a6baef8628b97a567a7b1d2 GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0vp^fs?$AsS6Pl zyqMQxY9Pa~B{*?Ex2C)1)RdLhi*^*wy>p_EBmU$q*$~$f(f1|K-QA~DM=o6;H07kA zkQD#v&w>mOg!fP0#OQf!(W-2gMKi9ia+<{SK=4n+H{lQW%O>%=+iRYUOQ~0De0RcN bN(r-XMuySN$8SY|j%M(5^>bP0l+XkKl(%eF literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-red.png b/icons/map/marine/buoy-red.png new file mode 100644 index 0000000000000000000000000000000000000000..bc57dfb43ec0a8d2102e77c6d03dd9e97ffca920 GIT binary patch literal 332 zcmeAS@N?(olHy`uVBq!ia0vp^fHHk|ftKfEUk{5iK`;t~dpgQ;(W literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-white-black.png b/icons/map/marine/buoy-white-black.png new file mode 100644 index 0000000000000000000000000000000000000000..f9d25421b4e696526ac4c24048140d017280dd26 GIT binary patch literal 320 zcmeAS@N?(olHy`uVBq!ia0vp^f!MABCP7@9z@LIJ(?;#gU)!o{LPSZ*_D? ztm8>nIB6i`di8{ie6P>8Dbr3ia?IxR6^`j#Jo~C|&ODAgA#y^oYnmQiO5698*)#1- z&a^Pur?)S5t1ur3tcm&ES24TqUha!B;kT~OALee!JCdPv_qb_-;lXo3K({h5c)I$z JtaD0e0su`qY?c53 literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-white-green.png b/icons/map/marine/buoy-white-green.png new file mode 100644 index 0000000000000000000000000000000000000000..5fde7a38938f5577fa960b7373c5211c15f7b734 GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0vp^f^wOWnzoov09y7Lh@drSL;7-p0K5~$2>{+oaw!;y^7KDq6w<={_D>D zF_U{c(4b>07}iNHEjlRgJw0qwPT@k9%ITL*dOYl4Ty#`XLgRGTn`dVoiq}uH+97mk zWfOxj|nSiB+aftQTXYx7lF9(hM^-zY!wu1h^dqI-0@L)z4*}Q$iB}HD+_+ literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-white-red.png b/icons/map/marine/buoy-white-red.png new file mode 100644 index 0000000000000000000000000000000000000000..24a99acb0274c4c90579525b0f1af9c5a628ea06 GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0vp^fTX5}CM z^UE_;-y1E_nc#4GsnXFtS)Pwco|Eo>Hk}|-x<&l~W6x?^)@sMa_q3XLWd1Mp+Vk8= zm*Iexv}j|t+v<=zClwwy=)NxayH9drc&56frbwYupka&SmQ!7C|E%jsTE8u*K$oK` ziIw3Dd-j#z_CGG)H3;w1^fZjP7}Q~PdHZ92FQ${a71Ftn^j6_y&YC+xo2+i_U(D|*)u8+%mdKI;Vst09s{m*8l(j literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-white.png b/icons/map/marine/buoy-white.png new file mode 100644 index 0000000000000000000000000000000000000000..d2ef25e8a2c4b824e4824d17e0b933ecd7d1c0eb GIT binary patch literal 324 zcmeAS@N?(olHy`uVBq!ia0vp^f#+Hz5@yz&YB

)3{Pu9t(6P NgQu&X%Q~loCIB$wZ;b!| literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-yellow-black.png b/icons/map/marine/buoy-yellow-black.png new file mode 100644 index 0000000000000000000000000000000000000000..4e2ad793cfa23cee179f349dfe0841f3814a3521 GIT binary patch literal 324 zcmeAS@N?(olHy`uVBq!ia0vp^fxatD4Mi7xnNd}<*_*#jSixqpmLuSiRK zrq!n8kyP+B>GJWV@6uIem%1*JwKZQSwn}LgN9}cfSCj0cCmUy-I`0{`rng($eDft{ z&u8;jc1>y2n6jwK;}V0+!Q)%sH%x!|WIOL2uSwO0-mU z85rdM`ki7_Svh^xN-md&=Bv6@cn^r}>HW+31lFz^Y zcj8_y-FC(F)jD%o#RY8N6g+~8ZP=LNw%4-1IUw;{FXC%OWjKra2B9flb@RMer=@Mv zk``^WX$xIx!TkSo>9kvUYt?76*i8yA4G`8|IVn%>;;HhZfsV`6i=5-4t0LmU84~o* zdqzEzP+2)&bMq1hmAdk49+w!lJoxrT{lV$7E#;dQa(A9nI+tEja&=;&#!KFBs}j_9 TUYXhobS#6XtDnm{r-UW|s5NfM literal 0 HcmV?d00001 diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index b9b32176..eb35853c 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -331,6 +331,16 @@ static uint restrictionCategory(uint type, const MapData::Attributes &attr) return catrea; } +static uint color(const QList &list) +{ + uint c = 0; + + for (int i = 0; i < list.size() && i < 2; i++) + c |= list.at(i).toUInt() << (i * 8); + + return c; +} + MapData::Point::Point(uint type, const Coordinates &c, const QString &label) : _type(SUBTYPE(type, 0)), _pos(c), _label(label), _polygon(false) { @@ -384,12 +394,22 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr, subtype = CATMFA; else if (type == I_BUNSTA) subtype = I_CATBUN; + else if (type == BOYCAR || type == BOYINB || type == BOYISD + || type == BOYLAT || type == I_BOYLAT || type == BOYSAW || type == BOYSPP + || type == BCNCAR || type == BCNISD || type == BCNLAT || type == I_BCNLAT + || type == BCNSAW || type == BCNSPP) + subtype = COLOUR; QList list(_attr.value(subtype).split(',')); - std::sort(list.begin(), list.end()); - _type = (type == RESARE || type == I_RESARE) - ? SUBTYPE(type, restrictionCategory(type, _attr)) - : SUBTYPE(type, list.first().toUInt()); + if (type == RESARE || type == I_RESARE) + _type = SUBTYPE(type, restrictionCategory(type, _attr)); + else if (subtype == COLOUR) + _type = SUBTYPE(type, color(list)); + else { + std::sort(list.begin(), list.end()); + _type = SUBTYPE(type, list.first().toUInt()); + } + _id = ((quint64)order(_type))<<32 | (uint)qHash(c); _label = QString::fromLatin1(_attr.value(OBJNAM)); diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index f39c1bd5..b0fd16e6 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -6,6 +6,77 @@ using namespace ENC; using namespace Util; +#define IMG(type, subtype, img, dx, dy) \ + _points[SUBTYPE((type), (subtype))] = Point(QImage(img), Small, QPoint(dx, dy)); + +#define BUOY(type) \ + IMG((type), 0, ":/marine/buoy.png", 6, -6); \ + IMG((type), 1, ":/marine/buoy-white.png", 6, -6); \ + IMG((type), 2, ":/marine/buoy.png", 6, -6); \ + IMG((type), 3, ":/marine/buoy-red.png", 6, -6); \ + IMG((type), 4, ":/marine/buoy-green.png", 6, -6); \ + IMG((type), 5, ":/marine/buoy.png", 6, -6); \ + IMG((type), 6, ":/marine/buoy-yellow.png", 6, -6); \ + IMG((type), 7, ":/marine/buoy.png", 6, -6); \ + IMG((type), 8, ":/marine/buoy.png", 6, -6); \ + IMG((type), 9, ":/marine/buoy.png", 6, -6); \ + IMG((type), 10, ":/marine/buoy.png", 6, -6); \ + IMG((type), 11, ":/marine/buoy-yellow.png", 6, -6); \ + IMG((type), 12, ":/marine/buoy.png", 6, -6); \ + IMG((type), 13, ":/marine/buoy.png", 6, -6); \ + IMG((type), 0x201, ":/marine/buoy-white-black.png", 6, -6); \ + IMG((type), 0x301, ":/marine/buoy-white-red.png", 6, -6); \ + IMG((type), 0x401, ":/marine/buoy-white-green.png", 6, -6); \ + IMG((type), 0x601, ":/marine/buoy-white-yellow.png", 6, -6); \ + IMG((type), 0xb01, ":/marine/buoy-white-yellow.png", 6, -6); \ + IMG((type), 0x102, ":/marine/buoy-black-white.png", 6, -6); \ + IMG((type), 0x302, ":/marine/buoy-black-red.png", 6, -6); \ + IMG((type), 0x402, ":/marine/buoy-black-green.png", 6, -6); \ + IMG((type), 0x602, ":/marine/buoy-black-yellow.png", 6, -6); \ + IMG((type), 0xb02, ":/marine/buoy-black-yellow.png", 6, -6); \ + IMG((type), 0x103, ":/marine/buoy-red-white.png", 6, -6); \ + IMG((type), 0x203, ":/marine/buoy-red-black.png", 6, -6); \ + IMG((type), 0x403, ":/marine/buoy-red-green.png", 6, -6); \ + IMG((type), 0x104, ":/marine/buoy-green-white.png", 6, -6); \ + IMG((type), 0x204, ":/marine/buoy-green-black.png", 6, -6); \ + IMG((type), 0x304, ":/marine/buoy-green-red.png", 6, -6); \ + IMG((type), 0x106, ":/marine/buoy-yellow-white.png", 6, -6); \ + IMG((type), 0x206, ":/marine/buoy-yellow-black.png", 6, -6); + +#define BEACON(type) \ + IMG((type), 0, ":/marine/beacon.png", 0, -8); \ + IMG((type), 1, ":/marine/beacon-white.png", 0, -8); \ + IMG((type), 2, ":/marine/beacon.png", 0, -8); \ + IMG((type), 3, ":/marine/beacon-red.png", 0, -8); \ + IMG((type), 4, ":/marine/beacon-green.png", 0, -8); \ + IMG((type), 5, ":/marine/beacon.png", 0, -8); \ + IMG((type), 6, ":/marine/beacon-yellow.png", 0, -8); \ + IMG((type), 7, ":/marine/beacon.png", 0, -8); \ + IMG((type), 8, ":/marine/beacon.png", 0, -8); \ + IMG((type), 9, ":/marine/beacon.png", 0, -8); \ + IMG((type), 10, ":/marine/beacon.png", 0, -8); \ + IMG((type), 11, ":/marine/beacon-yellow.png", 0, -8); \ + IMG((type), 12, ":/marine/beacon.png", 0, -8); \ + IMG((type), 13, ":/marine/beacon.png", 0, -8); \ + IMG((type), 0x201, ":/marine/beacon-white-black.png", 0, -8); \ + IMG((type), 0x301, ":/marine/beacon-white-red.png", 0, -8); \ + IMG((type), 0x401, ":/marine/beacon-white-green.png", 0, -8); \ + IMG((type), 0x601, ":/marine/beacon-white-yellow.png", 0, -8); \ + IMG((type), 0xb01, ":/marine/beacon-white-yellow.png", 0, -8); \ + IMG((type), 0x102, ":/marine/beacon-black-white.png", 0, -8); \ + IMG((type), 0x302, ":/marine/beacon-black-red.png", 0, -8); \ + IMG((type), 0x402, ":/marine/beacon-black-green.png", 0, -8); \ + IMG((type), 0x602, ":/marine/beacon-black-yellow.png", 0, -8); \ + IMG((type), 0xb02, ":/marine/beacon-black-yellow.png", 0, -8); \ + IMG((type), 0x103, ":/marine/beacon-red-white.png", 0, -8); \ + IMG((type), 0x203, ":/marine/beacon-red-black.png", 0, -8); \ + IMG((type), 0x403, ":/marine/beacon-red-green.png", 0, -8); \ + IMG((type), 0x104, ":/marine/beacon-green-white.png", 0, -8); \ + IMG((type), 0x204, ":/marine/beacon-green-black.png", 0, -8); \ + IMG((type), 0x304, ":/marine/beacon-green-red.png", 0, -8); \ + IMG((type), 0x106, ":/marine/beacon-yellow-white.png", 0, -8); \ + IMG((type), 0x206, ":/marine/beacon-yellow-black.png", 0, -8); + static QImage railroad(qreal ratio) { QImage img(16 * ratio, 4 * ratio, QImage::Format_ARGB32_Premultiplied); @@ -268,6 +339,21 @@ void Style::lineStyle(qreal ratio) void Style::pointStyle(qreal ratio) { + BUOY(BOYCAR); + BUOY(BOYINB); + BUOY(BOYISD); + BUOY(BOYLAT); + BUOY(I_BOYLAT); + BUOY(BOYSAW); + BUOY(BOYSPP); + + BEACON(BCNCAR); + BEACON(BCNISD); + BEACON(BCNLAT); + BEACON(I_BCNLAT); + BEACON(BCNSAW); + BEACON(BCNSPP); + _points[SUBTYPE(BUAARE, 1)].setTextFontSize(Large); _points[SUBTYPE(BUAARE, 5)].setTextFontSize(Large); _points[SUBTYPE(BUAARE, 4)].setTextFontSize(Large); @@ -275,32 +361,6 @@ void Style::pointStyle(qreal ratio) _points[SUBTYPE(BUAARE, 6)].setTextFontSize(Small); _points[TYPE(SOUNDG)].setTextFontSize(Small); _points[TYPE(SOUNDG)].setHaloColor(QColor()); - _points[TYPE(BOYCAR)] = Point(QImage(":/marine/buoy.png"), Small, - QPoint(6, -6)); - _points[TYPE(BOYINB)] = Point(QImage(":/marine/buoy.png"), Small, - QPoint(6, -6)); - _points[TYPE(BOYISD)] = Point(QImage(":/marine/buoy.png"), Small, - QPoint(6, -6)); - _points[TYPE(BOYLAT)] = Point(QImage(":/marine/buoy.png"), Small, - QPoint(6, -6)); - _points[TYPE(I_BOYLAT)] = Point(QImage(":/marine/buoy.png"), Small, - QPoint(6, -6)); - _points[TYPE(BOYSAW)] = Point(QImage(":/marine/buoy.png"), Small, - QPoint(6, -6)); - _points[TYPE(BOYSPP)] = Point(QImage(":/marine/buoy.png"), Small, - QPoint(6, -6)); - _points[TYPE(BCNCAR)] = Point(QImage(":/marine/beacon.png"), Small, - QPoint(0, -8)); - _points[TYPE(BCNISD)] = Point(QImage(":/marine/beacon.png"), Small, - QPoint(0, -8)); - _points[TYPE(BCNLAT)] = Point(QImage(":/marine/beacon.png"), Small, - QPoint(0, -8)); - _points[TYPE(I_BCNLAT)] = Point(QImage(":/marine/beacon.png"), Small, - QPoint(0, -8)); - _points[TYPE(BCNSAW)] = Point(QImage(":/marine/beacon.png"), Small, - QPoint(0, -8)); - _points[TYPE(BCNSPP)] = Point(QImage(":/marine/beacon.png"), Small, - QPoint(0, -8)); _points[SUBTYPE(LNDMRK, 3)] = Point(QImage(":/marine/chimney.png"), Small, QPoint(0, -11)); _points[SUBTYPE(LNDMRK, 5)] = Point(QImage(":/marine/flagstaff.png"), From 5178b8732ffe47be897e71b6cba008ccc279e503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 4 May 2025 19:20:56 +0200 Subject: [PATCH 24/36] Handle orange and amber as yellow --- src/map/ENC/style.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index b0fd16e6..4aa28713 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -19,7 +19,7 @@ using namespace Util; IMG((type), 6, ":/marine/buoy-yellow.png", 6, -6); \ IMG((type), 7, ":/marine/buoy.png", 6, -6); \ IMG((type), 8, ":/marine/buoy.png", 6, -6); \ - IMG((type), 9, ":/marine/buoy.png", 6, -6); \ + IMG((type), 9, ":/marine/buoy-yellow.png", 6, -6); \ IMG((type), 10, ":/marine/buoy.png", 6, -6); \ IMG((type), 11, ":/marine/buoy-yellow.png", 6, -6); \ IMG((type), 12, ":/marine/buoy.png", 6, -6); \ @@ -28,11 +28,13 @@ using namespace Util; IMG((type), 0x301, ":/marine/buoy-white-red.png", 6, -6); \ IMG((type), 0x401, ":/marine/buoy-white-green.png", 6, -6); \ IMG((type), 0x601, ":/marine/buoy-white-yellow.png", 6, -6); \ + IMG((type), 0x901, ":/marine/buoy-white-yellow.png", 6, -6); \ IMG((type), 0xb01, ":/marine/buoy-white-yellow.png", 6, -6); \ IMG((type), 0x102, ":/marine/buoy-black-white.png", 6, -6); \ IMG((type), 0x302, ":/marine/buoy-black-red.png", 6, -6); \ IMG((type), 0x402, ":/marine/buoy-black-green.png", 6, -6); \ IMG((type), 0x602, ":/marine/buoy-black-yellow.png", 6, -6); \ + IMG((type), 0x902, ":/marine/buoy-black-yellow.png", 6, -6); \ IMG((type), 0xb02, ":/marine/buoy-black-yellow.png", 6, -6); \ IMG((type), 0x103, ":/marine/buoy-red-white.png", 6, -6); \ IMG((type), 0x203, ":/marine/buoy-red-black.png", 6, -6); \ @@ -41,7 +43,11 @@ using namespace Util; IMG((type), 0x204, ":/marine/buoy-green-black.png", 6, -6); \ IMG((type), 0x304, ":/marine/buoy-green-red.png", 6, -6); \ IMG((type), 0x106, ":/marine/buoy-yellow-white.png", 6, -6); \ - IMG((type), 0x206, ":/marine/buoy-yellow-black.png", 6, -6); + IMG((type), 0x109, ":/marine/buoy-yellow-white.png", 6, -6); \ + IMG((type), 0x10b, ":/marine/buoy-yellow-white.png", 6, -6); \ + IMG((type), 0x206, ":/marine/buoy-yellow-black.png", 6, -6); \ + IMG((type), 0x209, ":/marine/buoy-yellow-black.png", 6, -6); \ + IMG((type), 0x20b, ":/marine/buoy-yellow-black.png", 6, -6); #define BEACON(type) \ IMG((type), 0, ":/marine/beacon.png", 0, -8); \ @@ -53,7 +59,7 @@ using namespace Util; IMG((type), 6, ":/marine/beacon-yellow.png", 0, -8); \ IMG((type), 7, ":/marine/beacon.png", 0, -8); \ IMG((type), 8, ":/marine/beacon.png", 0, -8); \ - IMG((type), 9, ":/marine/beacon.png", 0, -8); \ + IMG((type), 9, ":/marine/beacon-yellow.png", 0, -8); \ IMG((type), 10, ":/marine/beacon.png", 0, -8); \ IMG((type), 11, ":/marine/beacon-yellow.png", 0, -8); \ IMG((type), 12, ":/marine/beacon.png", 0, -8); \ @@ -62,11 +68,13 @@ using namespace Util; IMG((type), 0x301, ":/marine/beacon-white-red.png", 0, -8); \ IMG((type), 0x401, ":/marine/beacon-white-green.png", 0, -8); \ IMG((type), 0x601, ":/marine/beacon-white-yellow.png", 0, -8); \ + IMG((type), 0x901, ":/marine/beacon-white-yellow.png", 0, -8); \ IMG((type), 0xb01, ":/marine/beacon-white-yellow.png", 0, -8); \ IMG((type), 0x102, ":/marine/beacon-black-white.png", 0, -8); \ IMG((type), 0x302, ":/marine/beacon-black-red.png", 0, -8); \ IMG((type), 0x402, ":/marine/beacon-black-green.png", 0, -8); \ IMG((type), 0x602, ":/marine/beacon-black-yellow.png", 0, -8); \ + IMG((type), 0x902, ":/marine/beacon-black-yellow.png", 0, -8); \ IMG((type), 0xb02, ":/marine/beacon-black-yellow.png", 0, -8); \ IMG((type), 0x103, ":/marine/beacon-red-white.png", 0, -8); \ IMG((type), 0x203, ":/marine/beacon-red-black.png", 0, -8); \ @@ -75,7 +83,11 @@ using namespace Util; IMG((type), 0x204, ":/marine/beacon-green-black.png", 0, -8); \ IMG((type), 0x304, ":/marine/beacon-green-red.png", 0, -8); \ IMG((type), 0x106, ":/marine/beacon-yellow-white.png", 0, -8); \ - IMG((type), 0x206, ":/marine/beacon-yellow-black.png", 0, -8); + IMG((type), 0x109, ":/marine/beacon-yellow-white.png", 0, -8); \ + IMG((type), 0x10b, ":/marine/beacon-yellow-white.png", 0, -8); \ + IMG((type), 0x206, ":/marine/beacon-yellow-black.png", 0, -8); \ + IMG((type), 0x209, ":/marine/beacon-yellow-black.png", 0, -8); \ + IMG((type), 0x20b, ":/marine/beacon-yellow-black.png", 0, -8); static QImage railroad(qreal ratio) { From 15767decfc5b794a63e5b6e54357596efcf0eed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 4 May 2025 20:02:40 +0200 Subject: [PATCH 25/36] Colorset generating macros cleanup --- src/map/ENC/style.cpp | 146 +++++++++++++++--------------------------- 1 file changed, 53 insertions(+), 93 deletions(-) diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 4aa28713..d2bc4062 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -6,88 +6,48 @@ using namespace ENC; using namespace Util; -#define IMG(type, subtype, img, dx, dy) \ +#define PNT(type, subtype, img, dx, dy) \ _points[SUBTYPE((type), (subtype))] = Point(QImage(img), Small, QPoint(dx, dy)); -#define BUOY(type) \ - IMG((type), 0, ":/marine/buoy.png", 6, -6); \ - IMG((type), 1, ":/marine/buoy-white.png", 6, -6); \ - IMG((type), 2, ":/marine/buoy.png", 6, -6); \ - IMG((type), 3, ":/marine/buoy-red.png", 6, -6); \ - IMG((type), 4, ":/marine/buoy-green.png", 6, -6); \ - IMG((type), 5, ":/marine/buoy.png", 6, -6); \ - IMG((type), 6, ":/marine/buoy-yellow.png", 6, -6); \ - IMG((type), 7, ":/marine/buoy.png", 6, -6); \ - IMG((type), 8, ":/marine/buoy.png", 6, -6); \ - IMG((type), 9, ":/marine/buoy-yellow.png", 6, -6); \ - IMG((type), 10, ":/marine/buoy.png", 6, -6); \ - IMG((type), 11, ":/marine/buoy-yellow.png", 6, -6); \ - IMG((type), 12, ":/marine/buoy.png", 6, -6); \ - IMG((type), 13, ":/marine/buoy.png", 6, -6); \ - IMG((type), 0x201, ":/marine/buoy-white-black.png", 6, -6); \ - IMG((type), 0x301, ":/marine/buoy-white-red.png", 6, -6); \ - IMG((type), 0x401, ":/marine/buoy-white-green.png", 6, -6); \ - IMG((type), 0x601, ":/marine/buoy-white-yellow.png", 6, -6); \ - IMG((type), 0x901, ":/marine/buoy-white-yellow.png", 6, -6); \ - IMG((type), 0xb01, ":/marine/buoy-white-yellow.png", 6, -6); \ - IMG((type), 0x102, ":/marine/buoy-black-white.png", 6, -6); \ - IMG((type), 0x302, ":/marine/buoy-black-red.png", 6, -6); \ - IMG((type), 0x402, ":/marine/buoy-black-green.png", 6, -6); \ - IMG((type), 0x602, ":/marine/buoy-black-yellow.png", 6, -6); \ - IMG((type), 0x902, ":/marine/buoy-black-yellow.png", 6, -6); \ - IMG((type), 0xb02, ":/marine/buoy-black-yellow.png", 6, -6); \ - IMG((type), 0x103, ":/marine/buoy-red-white.png", 6, -6); \ - IMG((type), 0x203, ":/marine/buoy-red-black.png", 6, -6); \ - IMG((type), 0x403, ":/marine/buoy-red-green.png", 6, -6); \ - IMG((type), 0x104, ":/marine/buoy-green-white.png", 6, -6); \ - IMG((type), 0x204, ":/marine/buoy-green-black.png", 6, -6); \ - IMG((type), 0x304, ":/marine/buoy-green-red.png", 6, -6); \ - IMG((type), 0x106, ":/marine/buoy-yellow-white.png", 6, -6); \ - IMG((type), 0x109, ":/marine/buoy-yellow-white.png", 6, -6); \ - IMG((type), 0x10b, ":/marine/buoy-yellow-white.png", 6, -6); \ - IMG((type), 0x206, ":/marine/buoy-yellow-black.png", 6, -6); \ - IMG((type), 0x209, ":/marine/buoy-yellow-black.png", 6, -6); \ - IMG((type), 0x20b, ":/marine/buoy-yellow-black.png", 6, -6); - -#define BEACON(type) \ - IMG((type), 0, ":/marine/beacon.png", 0, -8); \ - IMG((type), 1, ":/marine/beacon-white.png", 0, -8); \ - IMG((type), 2, ":/marine/beacon.png", 0, -8); \ - IMG((type), 3, ":/marine/beacon-red.png", 0, -8); \ - IMG((type), 4, ":/marine/beacon-green.png", 0, -8); \ - IMG((type), 5, ":/marine/beacon.png", 0, -8); \ - IMG((type), 6, ":/marine/beacon-yellow.png", 0, -8); \ - IMG((type), 7, ":/marine/beacon.png", 0, -8); \ - IMG((type), 8, ":/marine/beacon.png", 0, -8); \ - IMG((type), 9, ":/marine/beacon-yellow.png", 0, -8); \ - IMG((type), 10, ":/marine/beacon.png", 0, -8); \ - IMG((type), 11, ":/marine/beacon-yellow.png", 0, -8); \ - IMG((type), 12, ":/marine/beacon.png", 0, -8); \ - IMG((type), 13, ":/marine/beacon.png", 0, -8); \ - IMG((type), 0x201, ":/marine/beacon-white-black.png", 0, -8); \ - IMG((type), 0x301, ":/marine/beacon-white-red.png", 0, -8); \ - IMG((type), 0x401, ":/marine/beacon-white-green.png", 0, -8); \ - IMG((type), 0x601, ":/marine/beacon-white-yellow.png", 0, -8); \ - IMG((type), 0x901, ":/marine/beacon-white-yellow.png", 0, -8); \ - IMG((type), 0xb01, ":/marine/beacon-white-yellow.png", 0, -8); \ - IMG((type), 0x102, ":/marine/beacon-black-white.png", 0, -8); \ - IMG((type), 0x302, ":/marine/beacon-black-red.png", 0, -8); \ - IMG((type), 0x402, ":/marine/beacon-black-green.png", 0, -8); \ - IMG((type), 0x602, ":/marine/beacon-black-yellow.png", 0, -8); \ - IMG((type), 0x902, ":/marine/beacon-black-yellow.png", 0, -8); \ - IMG((type), 0xb02, ":/marine/beacon-black-yellow.png", 0, -8); \ - IMG((type), 0x103, ":/marine/beacon-red-white.png", 0, -8); \ - IMG((type), 0x203, ":/marine/beacon-red-black.png", 0, -8); \ - IMG((type), 0x403, ":/marine/beacon-red-green.png", 0, -8); \ - IMG((type), 0x104, ":/marine/beacon-green-white.png", 0, -8); \ - IMG((type), 0x204, ":/marine/beacon-green-black.png", 0, -8); \ - IMG((type), 0x304, ":/marine/beacon-green-red.png", 0, -8); \ - IMG((type), 0x106, ":/marine/beacon-yellow-white.png", 0, -8); \ - IMG((type), 0x109, ":/marine/beacon-yellow-white.png", 0, -8); \ - IMG((type), 0x10b, ":/marine/beacon-yellow-white.png", 0, -8); \ - IMG((type), 0x206, ":/marine/beacon-yellow-black.png", 0, -8); \ - IMG((type), 0x209, ":/marine/beacon-yellow-black.png", 0, -8); \ - IMG((type), 0x20b, ":/marine/beacon-yellow-black.png", 0, -8); +#define COLORSET(type, name, dx, dy) \ + PNT(type, 0, ":/marine/" name ".png", dx, dy); \ + PNT(type, 1, ":/marine/" name "-white.png", dx, dy); \ + PNT(type, 2, ":/marine/" name ".png", dx, dy); \ + PNT(type, 3, ":/marine/" name "-red.png", dx, dy); \ + PNT(type, 4, ":/marine/" name "-green.png", dx, dy); \ + PNT(type, 5, ":/marine/" name ".png", dx, dy); \ + PNT(type, 6, ":/marine/" name "-yellow.png", dx, dy); \ + PNT(type, 7, ":/marine/" name ".png", dx, dy); \ + PNT(type, 8, ":/marine/" name ".png", dx, dy); \ + PNT(type, 9, ":/marine/" name "-yellow.png", dx, dy); \ + PNT(type, 10, ":/marine/" name ".png", dx, dy); \ + PNT(type, 11, ":/marine/" name "-yellow.png", dx, dy); \ + PNT(type, 12, ":/marine/" name ".png", dx, dy); \ + PNT(type, 13, ":/marine/" name ".png", dx, dy); \ + PNT(type, 0x201, ":/marine/" name "-white-black.png", dx, dy); \ + PNT(type, 0x301, ":/marine/" name "-white-red.png", dx, dy); \ + PNT(type, 0x401, ":/marine/" name "-white-green.png", dx, dy); \ + PNT(type, 0x601, ":/marine/" name "-white-yellow.png", dx, dy); \ + PNT(type, 0x901, ":/marine/" name "-white-yellow.png", dx, dy); \ + PNT(type, 0xb01, ":/marine/" name "-white-yellow.png", dx, dy); \ + PNT(type, 0x102, ":/marine/" name "-black-white.png", dx, dy); \ + PNT(type, 0x302, ":/marine/" name "-black-red.png", dx, dy); \ + PNT(type, 0x402, ":/marine/" name "-black-green.png", dx, dy); \ + PNT(type, 0x602, ":/marine/" name "-black-yellow.png", dx, dy); \ + PNT(type, 0x902, ":/marine/" name "-black-yellow.png", dx, dy); \ + PNT(type, 0xb02, ":/marine/" name "-black-yellow.png", dx, dy); \ + PNT(type, 0x103, ":/marine/" name "-red-white.png", dx, dy); \ + PNT(type, 0x203, ":/marine/" name "-red-black.png", dx, dy); \ + PNT(type, 0x403, ":/marine/" name "-red-green.png", dx, dy); \ + PNT(type, 0x104, ":/marine/" name "-green-white.png", dx, dy); \ + PNT(type, 0x204, ":/marine/" name "-green-black.png", dx, dy); \ + PNT(type, 0x304, ":/marine/" name "-green-red.png", dx, dy); \ + PNT(type, 0x106, ":/marine/" name "-yellow-white.png", dx, dy); \ + PNT(type, 0x109, ":/marine/" name "-yellow-white.png", dx, dy); \ + PNT(type, 0x10b, ":/marine/" name "-yellow-white.png", dx, dy); \ + PNT(type, 0x206, ":/marine/" name "-yellow-black.png", dx, dy); \ + PNT(type, 0x209, ":/marine/" name "-yellow-black.png", dx, dy); \ + PNT(type, 0x20b, ":/marine/" name "-yellow-black.png", dx, dy); static QImage railroad(qreal ratio) { @@ -351,20 +311,20 @@ void Style::lineStyle(qreal ratio) void Style::pointStyle(qreal ratio) { - BUOY(BOYCAR); - BUOY(BOYINB); - BUOY(BOYISD); - BUOY(BOYLAT); - BUOY(I_BOYLAT); - BUOY(BOYSAW); - BUOY(BOYSPP); + COLORSET(BOYCAR, "buoy", 6, -6); + COLORSET(BOYINB, "buoy", 6, -6); + COLORSET(BOYISD, "buoy", 6, -6); + COLORSET(BOYLAT, "buoy", 6, -6); + COLORSET(I_BOYLAT, "buoy", 6, -6); + COLORSET(BOYSAW, "buoy", 6, -6); + COLORSET(BOYSPP, "buoy", 6, -6); - BEACON(BCNCAR); - BEACON(BCNISD); - BEACON(BCNLAT); - BEACON(I_BCNLAT); - BEACON(BCNSAW); - BEACON(BCNSPP); + COLORSET(BCNCAR, "beacon", 0, -8); + COLORSET(BCNISD, "beacon", 0, -8); + COLORSET(BCNLAT, "beacon", 0, -8); + COLORSET(I_BCNLAT, "beacon", 0, -8); + COLORSET(BCNSAW, "beacon", 0, -8); + COLORSET(BCNSPP, "beacon", 0, -8); _points[SUBTYPE(BUAARE, 1)].setTextFontSize(Large); _points[SUBTYPE(BUAARE, 5)].setTextFontSize(Large); From cdc9aa1e50ddd59dc58adb1d35fe2e828cbadc8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 5 May 2025 22:38:17 +0200 Subject: [PATCH 26/36] Added support for multi (3 & 4) color buoys/beacons --- gpxsee.qrc | 28 ++++- icons/map/marine/beacon-black-red-black.png | Bin 0 -> 273 bytes .../map/marine/beacon-black-yellow-black.png | Bin 0 -> 274 bytes .../map/marine/beacon-green-red-green-red.png | Bin 0 -> 294 bytes icons/map/marine/beacon-green-red-green.png | Bin 0 -> 295 bytes .../marine/beacon-green-white-green-white.png | Bin 0 -> 295 bytes .../map/marine/beacon-red-green-red-green.png | Bin 0 -> 300 bytes icons/map/marine/beacon-red-green-red.png | Bin 0 -> 293 bytes .../map/marine/beacon-red-white-red-white.png | Bin 0 -> 288 bytes .../map/marine/beacon-white-yellow-white.png | Bin 0 -> 285 bytes .../map/marine/beacon-yellow-black-yellow.png | Bin 0 -> 282 bytes icons/map/marine/beacon-yellow-red-yellow.png | Bin 0 -> 286 bytes .../map/marine/beacon-yellow-white-yellow.png | Bin 0 -> 280 bytes icons/map/marine/buoy-black-red-black.png | Bin 0 -> 330 bytes icons/map/marine/buoy-black-yellow-black.png | Bin 0 -> 326 bytes icons/map/marine/buoy-green-red-green-red.png | Bin 0 -> 357 bytes icons/map/marine/buoy-green-red-green.png | Bin 0 -> 351 bytes .../marine/buoy-green-white-green-white.png | Bin 0 -> 353 bytes icons/map/marine/buoy-red-green-red-green.png | Bin 0 -> 353 bytes icons/map/marine/buoy-red-green-red.png | Bin 0 -> 351 bytes icons/map/marine/buoy-red-white-red-white.png | Bin 0 -> 348 bytes icons/map/marine/buoy-white-yellow-white.png | Bin 0 -> 331 bytes icons/map/marine/buoy-yellow-black-yellow.png | Bin 0 -> 330 bytes icons/map/marine/buoy-yellow-red-yellow.png | Bin 0 -> 348 bytes icons/map/marine/buoy-yellow-white-yellow.png | Bin 0 -> 337 bytes src/map/ENC/mapdata.cpp | 4 +- src/map/ENC/style.cpp | 102 +++++++++++------- 27 files changed, 91 insertions(+), 43 deletions(-) create mode 100644 icons/map/marine/beacon-black-red-black.png create mode 100644 icons/map/marine/beacon-black-yellow-black.png create mode 100644 icons/map/marine/beacon-green-red-green-red.png create mode 100644 icons/map/marine/beacon-green-red-green.png create mode 100644 icons/map/marine/beacon-green-white-green-white.png create mode 100644 icons/map/marine/beacon-red-green-red-green.png create mode 100644 icons/map/marine/beacon-red-green-red.png create mode 100644 icons/map/marine/beacon-red-white-red-white.png create mode 100644 icons/map/marine/beacon-white-yellow-white.png create mode 100644 icons/map/marine/beacon-yellow-black-yellow.png create mode 100644 icons/map/marine/beacon-yellow-red-yellow.png create mode 100644 icons/map/marine/beacon-yellow-white-yellow.png create mode 100644 icons/map/marine/buoy-black-red-black.png create mode 100644 icons/map/marine/buoy-black-yellow-black.png create mode 100644 icons/map/marine/buoy-green-red-green-red.png create mode 100644 icons/map/marine/buoy-green-red-green.png create mode 100644 icons/map/marine/buoy-green-white-green-white.png create mode 100644 icons/map/marine/buoy-red-green-red-green.png create mode 100644 icons/map/marine/buoy-red-green-red.png create mode 100644 icons/map/marine/buoy-red-white-red-white.png create mode 100644 icons/map/marine/buoy-white-yellow-white.png create mode 100644 icons/map/marine/buoy-yellow-black-yellow.png create mode 100644 icons/map/marine/buoy-yellow-red-yellow.png create mode 100644 icons/map/marine/buoy-yellow-white-yellow.png diff --git a/gpxsee.qrc b/gpxsee.qrc index b749a107..38b2b309 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -144,42 +144,66 @@ icons/map/marine/buoy-white-green.png icons/map/marine/buoy-white-red.png icons/map/marine/buoy-white-yellow.png + icons/map/marine/buoy-white-yellow-white.png icons/map/marine/buoy-green.png icons/map/marine/buoy-green-white.png + icons/map/marine/buoy-green-white-green-white.png icons/map/marine/buoy-green-black.png icons/map/marine/buoy-green-red.png + icons/map/marine/buoy-green-red-green.png + icons/map/marine/buoy-green-red-green-red.png icons/map/marine/buoy-red.png icons/map/marine/buoy-red-white.png + icons/map/marine/buoy-red-white-red-white.png icons/map/marine/buoy-red-black.png icons/map/marine/buoy-red-green.png + icons/map/marine/buoy-red-green-red.png + icons/map/marine/buoy-red-green-red-green.png icons/map/marine/buoy-yellow.png icons/map/marine/buoy-yellow-white.png + icons/map/marine/buoy-yellow-white-yellow.png icons/map/marine/buoy-yellow-black.png + icons/map/marine/buoy-yellow-black-yellow.png + icons/map/marine/buoy-yellow-red-yellow.png icons/map/marine/buoy-black-white.png icons/map/marine/buoy-black-red.png + icons/map/marine/buoy-black-red-black.png icons/map/marine/buoy-black-green.png icons/map/marine/buoy-black-yellow.png + icons/map/marine/buoy-black-yellow-black.png icons/map/marine/beacon.png icons/map/marine/beacon-white.png icons/map/marine/beacon-white-black.png icons/map/marine/beacon-white-green.png icons/map/marine/beacon-white-red.png - icons/map/marine/beacon-white-yellow.png + icons/map/marine/beacon-white-yellow.png + icons/map/marine/beacon-white-yellow-white.png icons/map/marine/beacon-green.png icons/map/marine/beacon-green-white.png + icons/map/marine/beacon-green-white-green-white.png icons/map/marine/beacon-green-black.png - icons/map/marine/beacon-green-red.png + icons/map/marine/beacon-green-red.png + icons/map/marine/beacon-green-red-green.png + icons/map/marine/beacon-green-red-green-red.png icons/map/marine/beacon-red.png icons/map/marine/beacon-red-white.png + icons/map/marine/beacon-red-white-red-white.png icons/map/marine/beacon-red-black.png icons/map/marine/beacon-red-green.png + icons/map/marine/beacon-red-green-red.png + icons/map/marine/beacon-red-green-red-green.png icons/map/marine/beacon-yellow.png icons/map/marine/beacon-yellow-white.png + icons/map/marine/beacon-yellow-white-yellow.png icons/map/marine/beacon-yellow-black.png + icons/map/marine/beacon-yellow-black-yellow.png + icons/map/marine/beacon-yellow-red-yellow.png icons/map/marine/beacon-black-white.png icons/map/marine/beacon-black-red.png + icons/map/marine/beacon-black-red-black.png icons/map/marine/beacon-black-green.png icons/map/marine/beacon-black-yellow.png + icons/map/marine/beacon-black-yellow-black.png icons/map/marine/rock-exposed.png icons/map/marine/rock-dangerous.png icons/map/marine/wreck.png diff --git a/icons/map/marine/beacon-black-red-black.png b/icons/map/marine/beacon-black-red-black.png new file mode 100644 index 0000000000000000000000000000000000000000..184d3746d9300e37abf02002b4aeb439c8825f53 GIT binary patch literal 273 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}OSkfJR9T^xl_H+M9WCijWi-X*q z7;m1`sRwctl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy91`Dm6sOIXM$_;wNpL)_wT<|@lto(X|m|VFS@-|| literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-green-red-green-red.png b/icons/map/marine/beacon-green-red-green-red.png new file mode 100644 index 0000000000000000000000000000000000000000..2736df0accb352f916995ac27ed48600485501d6 GIT binary patch literal 294 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}OSkfJR9T^xl_H+M9WCijWi-X*q z7;m1`sRwctl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9pI9Jvk{aCp1@UjFz07W=gm zV#5Totv_72Y}1*k(yNi^G|7N-(wj=o1C0-=r*3$g`l+~uUq#7vk$IC!UhwMo^VbOe zezMeK;nT0%Yj!`4Uy|_gR`mPbSN~X-9Z&NXPuyu)S*gNaIq6i>QPIDbF;P7tyz5MV0%>P@O zc83VaTYuT&E8vnnVZxMxg{!*MJT7Hvwq+_Nd2&|o`gP(lFZah!s&1z|9~JGb-Sk}Z zzp~&`rEmG#Os(^S+~#{G?lJuRY^~t^i%TxgTsLbir`bGrqq)mheOmFUVp3w&)Xj+- c{&q4vU^{l-N4%k6dm+e~p00i_>zopr0H0lF-T(jq literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-green-white-green-white.png b/icons/map/marine/beacon-green-white-green-white.png new file mode 100644 index 0000000000000000000000000000000000000000..9c21d6e87dcab3aa47d9d029bcf4f24103377b8f GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}OSkfJR9T^xl_H+M9WCijWi-X*q z7;m1`sRwctl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9XCyGN-oKb6Uq* cvxyxiSa1FH`cVHc)E(qZPgg&ebxsLQ0D_5Vu>b%7 literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-red-green-red-green.png b/icons/map/marine/beacon-red-green-red-green.png new file mode 100644 index 0000000000000000000000000000000000000000..e33b743f11cff77f93f4b04ab116ea95dafe446b GIT binary patch literal 300 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}OSkfJR9T^xl_H+M9WCijWi-X*q z7;m1`sRwctl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9pIPIEOF@MJIft^WW26MM@J zaqi9h{K8+75-+UHK5;8;!a-L7o{Y%*I z$1p5>qN0EHulGL{Pa)gZr=`m}Km4l9yY=dy+?s_`Uu?Q@N20Qdfys7Km38&JNr`=% h+ZQ!G^;c0UVmNWdSI+pg=TDGZJzf1=);T3K0RVk^X2Spg literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-red-green-red.png b/icons/map/marine/beacon-red-green-red.png new file mode 100644 index 0000000000000000000000000000000000000000..e12f5e734ae4d3b475e797a60f95cf16865d941a GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}OSkfJR9T^xl_H+M9WCijWi-X*q z7;m1`sRwctl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9^5b(YdzSAVYDEr;wG~q-WDva+s3VO-i+$vtR8;6K8d0z^#tb^7gmI^+`(v zPp0jdlxOnme8K!Cp@&yr-`f)U*g9%<^`g@oc0N4z$;0farpI9Jv|{c)XYV`+tz{(NV{> zfr$&^-mKKg_Tb{3=rySzNaf~lg9nKVidvIngY2bi4ms>KPqB41%M<&&aZj4cU+wx3 zx%@D>XCH2TyVoB5*WGi~nVH8Eo##b7ooI7n@|Mqj;yRH*&(9om5?0#frNj`yXjyA* TSg6VX@-l;`tDnm{r-UW|W>Q^T literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-white-yellow-white.png b/icons/map/marine/beacon-white-yellow-white.png new file mode 100644 index 0000000000000000000000000000000000000000..2e72f534a0cd01fb0dabc02dcf7f1ec5fb2f796e GIT binary patch literal 285 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}OSkfJR9T^xl_H+M9WCijWi-X*q z7;m1`sRwctl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9^q)XF{V7bYR6bTZ^~0osV9tfvdsIsQlM}*vA51W4C%o{edSC(2H S6XcGA9Ovok=d#Wzp$Pz$)L>o! literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-yellow-black-yellow.png b/icons/map/marine/beacon-yellow-black-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..d6112d53122fab3a40c49cf3cd35543c03416c66 GIT binary patch literal 282 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}OSkfJR9T^xl_H+M9WCijWi-X*q z7;m1`sRwctl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9XG z>waIk_M&pi61_dA9w&JlZ`|%)l;wXZx6CSerLJnashE`T#o5A)2RJp?SZaA5PVxY` N%+uA+Wt~$(69ChrS~LIv literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-yellow-red-yellow.png b/icons/map/marine/beacon-yellow-red-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..976312422ad48657a177bb5066b104cb64759c5a GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}OSkfJR9T^xl_H+M9WCijWi-X*q z7;m1`sRwctl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9>Q9Jv|{c)XYVum7kJCv!#5 zPeSg>ykoc8mP9)*nV=HG;`yz3#*+&H8xJjfCe_@?%l+|_nsvu9|Lm$ffr<6J{}*1<%gmU?|hhu+-E( RbJ`i?I!{+Wmvv4FO#r?4U2^~c literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-yellow-white-yellow.png b/icons/map/marine/beacon-yellow-white-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..3181f63076a1219629915f3a9729671b935dfb2d GIT binary patch literal 280 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}OSkfJR9T^xl_H+M9WCijWi-X*q z7;m1`sRwctl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9G?ISQd z@51F9Hln7AQA&YMlQwWnI#WL55zC91hY{KR4-YibP0l+XkKeK@{3dtTpz6=aiY77hwEes65fI`4s-nbpP!%j zLAUow5vOPMG>MFjbJcHgPgrvA<1CIF-_7Pt=-rY0$JwrHhJ%~gmly4vYhJUY?dw>! z@QLW`h4UBP*f?*QaANMtB}&GEM?{P4d8eqGXuquZI>RwMulSMc1Ww00yZFK`Ozn4j z@Uu~+bmpEZQ#g)iR`7e8F=$%G9^m@9-1^tHT@~hnYmdgw=PJlD>{6^{oVYwnT5#H& QK#)&7UHx3vIVCg!0CT@^_5c6? literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-black-yellow-black.png b/icons/map/marine/buoy-black-yellow-black.png new file mode 100644 index 0000000000000000000000000000000000000000..0ff9be9b8b678f644ff2e24d840241086ceeef8a GIT binary patch literal 326 zcmeAS@N?(olHy`uVBq!ia0vp^feK@{3dtTpz6=aiY77hwEes65fI`egD|^s7SI%Rjb@9pWiY2TwQIjh;93RWHodwG1$tgTf~6v|6dedNOoruxcOR4I7I zs;yUHJrwxrp6euD2QEMH4NP@D?(f6I-@7f^JL7jS=Nh-3MN4I6cO=OD{K)qax literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-green-red-green-red.png b/icons/map/marine/buoy-green-red-green-red.png new file mode 100644 index 0000000000000000000000000000000000000000..07093775d3d913c103e484fbf73ecb5c82986325 GIT binary patch literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^feK@{3dtTpz6=aiY77hwEes65fI2(72PQwvK>j*{K*x9@812%UEi2C(LIup-M~GP&0Oo2x{9L#3(%yT#ePi> zdbWET`W8hd1cke#B?Z5G_rK)w1FyL=X7V0?sFx+(Z*^Y`npd)v9xl$wS##pL_KyeIPxKfL{8$n=!98igCfC5${bl(Fx7$AuE-05> pSKIK~vqHSm-v7{)lVNU*4gCKP=Sv>q__Pk>Nl#Zlmvv4FO#o#!d?o+@ literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-green-red-green.png b/icons/map/marine/buoy-green-red-green.png new file mode 100644 index 0000000000000000000000000000000000000000..ca78b2e4e27fc4617c3ef3d3125c5938931e26c4 GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^feK@{3dtTpz6=aiY77hwEes65fI0N^1ipNYJB8_h-?D3H^5X#?uxNjAg;7-x|dJj4)Ui1Bydr`)* l|L89}b+wBV=1yZ`h+iz!y`$rD-*=GrJYD@<);T3K0RVk~dMy9| literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-green-white-green-white.png b/icons/map/marine/buoy-green-white-green-white.png new file mode 100644 index 0000000000000000000000000000000000000000..c5f0d77680413693fbe2c7602ddc59516b8521b2 GIT binary patch literal 353 zcmeAS@N?(olHy`uVBq!ia0vp^feK@{3dtTpz6=aiY77hwEes65fIkO8L_S)}^{$Td)e?$B04t{rg n&2ary{Q0Z5aos$rm6j%NomRHx$LoqEAP;)F`njxgN@xNA>T-LP literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-red-green-red-green.png b/icons/map/marine/buoy-red-green-red-green.png new file mode 100644 index 0000000000000000000000000000000000000000..5a6bf7f22b69cac34b7f72f8a97f2ebf8ca305e1 GIT binary patch literal 353 zcmeAS@N?(olHy`uVBq!ia0vp^feK@{3dtTpz6=aiY77hwEes65fIs`MIGr0cYnqvMC4|E0lg> z-m?G2ie-`v3sRD2ygQq#rds;2muaB^t7F-mk=ydl8x7c%L(R>E|w+9@4B!6m{ctd3xxBu?#k8a;M-{I@Gqs%E? maS!+2`7@R8#b>9AF#KRhe3bsZbbUi6$b+7)elF{r5}E*7L3*SB literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-red-green-red.png b/icons/map/marine/buoy-red-green-red.png new file mode 100644 index 0000000000000000000000000000000000000000..fb55915bba56c4ff60f36b5f7680cea66c4b4ee9 GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^feK@{3dtTpz6=aiY77hwEes65fI&s^}zwdBWHT#gHt*kIsZ(1@kryl*uL5Z^$$j}`>GGD mRl37{fBxhNcPGt_Vr-CKpOU;seK@{3dtTpz6=aiY77hwEes65fI76W(J0T-;O(cKXdyAqxyzpH(2XmoLjBz*(5oGGfMSN@v*>L zCpW*iwc_gW(ruAv76&g}#sA<^SID9enI!Ey&!#N#3U{gV>N^+EeK@{3dtTpz6=aiY77hwEes65fIQy%{dNl*X>l~jn zhe_8~dQ1@6KKaV33CG_WJP>=Td~#RoDXvt%+-v+>!@`#-2#aK2zMEFJvFzSz#h)MF ztL$}{^k?Cjpor3G`N!p_uuO9QRQOi?$^Mrub}@gK=zLT9mM*krdQKWE!@lIkbdBFD RT#GeK@{3dtTpz6=aiY77hwEes65fIg0x%zMyRZ;{=>!;xV?~>FCp%+*qW+EHf1c@8-!-e{ONVlt12sOatib6 zb1NnPxVcXGyz%}y4}ld4@%y(s{|NkbuAeV(rONL>!PNKe?u?eRIbS}riUC4~|bU4Jmb7_;Nb=AZrj22D(jBgs2-@mwf?j0YMSFYcdn;!jr;j7ACv7{t5yBmEM PKtAzw^>bP0l+XkKVMcN3 literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-yellow-red-yellow.png b/icons/map/marine/buoy-yellow-red-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..63290e6f75978f947bd9bfa781112afe57723d76 GIT binary patch literal 348 zcmeAS@N?(olHy`uVBq!ia0vp^feK@{3dtTpz6=aiY77hwEes65fIRh~k-x@4N2$%X}A2P%Ard$&51@sr(NH6AKw3TTht1!FIow?*ZaAq6#aFZBl~3T z3#r+jr?1s)d~}CZ<=&RGG;sz8&rkDLYMpG=d3Jww`y_`V?R)F~c2>;j+i!cJSKz(t iyYrqKq(06KVtBy)eK@{3dtTpz6=aiY77hwEes65fIR^Id0a zRnN7J8ZCZ7UTUi)pSVq2`jz`#?veIQrEROELWADs$mwkV6jhiO@JZ2IlOf?^#Jv8m zDth+bPD^J@n$kNpzSlvl$~{zrQ)T;uwQv0oTrNv`%b1rZlx|qRr?wz>ld&d40duuY Vs`|c~d~uM6JYD@<);T3K0RX1jajyUX literal 0 HcmV?d00001 diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index eb35853c..7c5d0adf 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -335,8 +335,8 @@ static uint color(const QList &list) { uint c = 0; - for (int i = 0; i < list.size() && i < 2; i++) - c |= list.at(i).toUInt() << (i * 8); + for (int i = 0; i < list.size() && i < 4; i++) + c |= list.at(i).toUInt() << (i * 4); return c; } diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index d2bc4062..0d1a4621 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -6,48 +6,72 @@ using namespace ENC; using namespace Util; +#define COLOR2(c1, c2) (((c2)<<4) | (c1)) +#define COLOR3(c1, c2, c3) (((c3)<<8) | ((c2)<<4) | (c1)) +#define COLOR4(c1, c2, c3, c4) (((c4)<<12) | ((c3)<<8) | ((c2)<<4) | (c1)) + +#define PATH(name) ":/marine/" name ".png" +#define PATH1(name, c1) ":/marine/" name "-" c1 ".png" +#define PATH2(name, c1, c2) ":/marine/" name "-" c1 "-" c2 ".png" +#define PATH3(name, c1, c2, c3) ":/marine/" name "-" c1 "-" c2 "-" c3 ".png" +#define PATH4(name, c1, c2, c3, c4) ":/marine/" name "-" c1 "-" c2 "-" c3 "-" c4 ".png" + #define PNT(type, subtype, img, dx, dy) \ - _points[SUBTYPE((type), (subtype))] = Point(QImage(img), Small, QPoint(dx, dy)); + _points[SUBTYPE((type), (subtype))] = Point(QImage(img), Small, QPoint((dx), (dy))); #define COLORSET(type, name, dx, dy) \ - PNT(type, 0, ":/marine/" name ".png", dx, dy); \ - PNT(type, 1, ":/marine/" name "-white.png", dx, dy); \ - PNT(type, 2, ":/marine/" name ".png", dx, dy); \ - PNT(type, 3, ":/marine/" name "-red.png", dx, dy); \ - PNT(type, 4, ":/marine/" name "-green.png", dx, dy); \ - PNT(type, 5, ":/marine/" name ".png", dx, dy); \ - PNT(type, 6, ":/marine/" name "-yellow.png", dx, dy); \ - PNT(type, 7, ":/marine/" name ".png", dx, dy); \ - PNT(type, 8, ":/marine/" name ".png", dx, dy); \ - PNT(type, 9, ":/marine/" name "-yellow.png", dx, dy); \ - PNT(type, 10, ":/marine/" name ".png", dx, dy); \ - PNT(type, 11, ":/marine/" name "-yellow.png", dx, dy); \ - PNT(type, 12, ":/marine/" name ".png", dx, dy); \ - PNT(type, 13, ":/marine/" name ".png", dx, dy); \ - PNT(type, 0x201, ":/marine/" name "-white-black.png", dx, dy); \ - PNT(type, 0x301, ":/marine/" name "-white-red.png", dx, dy); \ - PNT(type, 0x401, ":/marine/" name "-white-green.png", dx, dy); \ - PNT(type, 0x601, ":/marine/" name "-white-yellow.png", dx, dy); \ - PNT(type, 0x901, ":/marine/" name "-white-yellow.png", dx, dy); \ - PNT(type, 0xb01, ":/marine/" name "-white-yellow.png", dx, dy); \ - PNT(type, 0x102, ":/marine/" name "-black-white.png", dx, dy); \ - PNT(type, 0x302, ":/marine/" name "-black-red.png", dx, dy); \ - PNT(type, 0x402, ":/marine/" name "-black-green.png", dx, dy); \ - PNT(type, 0x602, ":/marine/" name "-black-yellow.png", dx, dy); \ - PNT(type, 0x902, ":/marine/" name "-black-yellow.png", dx, dy); \ - PNT(type, 0xb02, ":/marine/" name "-black-yellow.png", dx, dy); \ - PNT(type, 0x103, ":/marine/" name "-red-white.png", dx, dy); \ - PNT(type, 0x203, ":/marine/" name "-red-black.png", dx, dy); \ - PNT(type, 0x403, ":/marine/" name "-red-green.png", dx, dy); \ - PNT(type, 0x104, ":/marine/" name "-green-white.png", dx, dy); \ - PNT(type, 0x204, ":/marine/" name "-green-black.png", dx, dy); \ - PNT(type, 0x304, ":/marine/" name "-green-red.png", dx, dy); \ - PNT(type, 0x106, ":/marine/" name "-yellow-white.png", dx, dy); \ - PNT(type, 0x109, ":/marine/" name "-yellow-white.png", dx, dy); \ - PNT(type, 0x10b, ":/marine/" name "-yellow-white.png", dx, dy); \ - PNT(type, 0x206, ":/marine/" name "-yellow-black.png", dx, dy); \ - PNT(type, 0x209, ":/marine/" name "-yellow-black.png", dx, dy); \ - PNT(type, 0x20b, ":/marine/" name "-yellow-black.png", dx, dy); + PNT(type, 0, PATH(name), dx, dy); \ + PNT(type, 1, PATH1(name, "white"), dx, dy); \ + PNT(type, 2, PATH(name), dx, dy); \ + PNT(type, 3, PATH1(name, "red"), dx, dy); \ + PNT(type, 4, PATH1(name, "green"), dx, dy); \ + PNT(type, 5, PATH(name), dx, dy); \ + PNT(type, 6, PATH1(name, "yellow"), dx, dy); \ + PNT(type, 7, PATH(name), dx, dy); \ + PNT(type, 8, PATH(name), dx, dy); \ + PNT(type, 9, PATH1(name, "yellow"), dx, dy); \ + PNT(type, 10, PATH(name), dx, dy); \ + PNT(type, 11, PATH1(name, "yellow"), dx, dy); \ + PNT(type, 12, PATH(name), dx, dy); \ + PNT(type, 13, PATH(name), dx, dy); \ + PNT(type, COLOR2(1, 2), PATH2(name, "white", "black"), dx, dy); \ + PNT(type, COLOR2(1, 3), PATH2(name, "white", "red"), dx, dy); \ + PNT(type, COLOR2(1, 4), PATH2(name, "white", "green"), dx, dy); \ + PNT(type, COLOR2(1, 6), PATH2(name, "white", "yellow"), dx, dy); \ + PNT(type, COLOR2(1, 9), PATH2(name, "white", "yellow"), dx, dy); \ + PNT(type, COLOR2(1, 11), PATH2(name, "white", "yellow"), dx, dy); \ + PNT(type, COLOR2(2, 1), PATH2(name, "black", "white"), dx, dy); \ + PNT(type, COLOR2(2, 3), PATH2(name, "black", "red"), dx, dy); \ + PNT(type, COLOR2(2, 4), PATH2(name, "black", "green"), dx, dy); \ + PNT(type, COLOR2(2, 6), PATH2(name, "black", "yellow"), dx, dy); \ + PNT(type, COLOR2(2, 9), PATH2(name, "black", "yellow"), dx, dy); \ + PNT(type, COLOR2(2, 11), PATH2(name, "black", "yellow"), dx, dy); \ + PNT(type, COLOR2(3, 1), PATH2(name, "red", "white"), dx, dy); \ + PNT(type, COLOR2(3, 2), PATH2(name, "red", "black"), dx, dy); \ + PNT(type, COLOR2(3, 4), PATH2(name, "red", "green"), dx, dy); \ + PNT(type, COLOR2(4, 1), PATH2(name, "green", "white"), dx, dy); \ + PNT(type, COLOR2(4, 2), PATH2(name, "green", "black"), dx, dy); \ + PNT(type, COLOR2(4, 3), PATH2(name, "green", "red"), dx, dy); \ + PNT(type, COLOR2(6, 1), PATH2(name, "yellow", "white"), dx, dy); \ + PNT(type, COLOR2(9, 1), PATH2(name, "yellow", "white"), dx, dy); \ + PNT(type, COLOR2(11, 1), PATH2(name, "yellow", "white"), dx, dy); \ + PNT(type, COLOR2(6, 2), PATH2(name, "yellow", "black"), dx, dy); \ + PNT(type, COLOR2(9, 2), PATH2(name, "yellow", "black"), dx, dy); \ + PNT(type, COLOR2(11, 2), PATH2(name, "yellow", "black"), dx, dy); \ + PNT(type, COLOR3(1, 6, 1), PATH3(name, "white", "yellow", "white"), dx, dy); \ + PNT(type, COLOR3(1, 9, 1), PATH3(name, "white", "yellow", "white"), dx, dy); \ + PNT(type, COLOR3(1, 11, 1), PATH3(name, "white", "yellow", "white"), dx, dy); \ + PNT(type, COLOR3(2, 3, 2), PATH3(name, "black", "red", "black"), dx, dy); \ + PNT(type, COLOR3(2, 6, 2), PATH3(name, "black", "yellow", "black"), dx, dy); \ + PNT(type, COLOR3(3, 4, 3), PATH3(name, "red", "green", "red"), dx, dy); \ + PNT(type, COLOR3(4, 3, 4), PATH3(name, "green", "red", "green"), dx, dy); \ + PNT(type, COLOR3(6, 1, 6), PATH3(name, "yellow", "white", "yellow"), dx, dy); \ + PNT(type, COLOR3(6, 2, 6), PATH3(name, "yellow", "black", "yellow"), dx, dy); \ + PNT(type, COLOR3(6, 3, 6), PATH3(name, "yellow", "red", "yellow"), dx, dy); \ + PNT(type, COLOR4(3, 1, 3, 1), PATH4(name, "red", "white", "red", "white"), dx, dy); \ + PNT(type, COLOR4(3, 4, 3, 4), PATH4(name, "red", "green", "red", "green"), dx, dy); \ + PNT(type, COLOR4(4, 1, 4, 1), PATH4(name, "green", "white", "green", "white"), dx, dy); \ + PNT(type, COLOR4(4, 3, 4, 3), PATH4(name, "green", "red", "green", "red"), dx, dy); static QImage railroad(qreal ratio) { From 08f948631545a538cc4df13dd09e032372759992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 5 May 2025 22:41:43 +0200 Subject: [PATCH 27/36] Added support for colored buoys/beacons to IMG maps --- src/map/IMG/rastertile.cpp | 3 +- src/map/IMG/rgnfile.cpp | 6 ++- src/map/IMG/style.cpp | 76 ++++++++++++++++++++++++++++---------- src/map/IMG/style.h | 11 ++++-- 4 files changed, 69 insertions(+), 27 deletions(-) diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index aedf3fa1..cc8f9b69 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -522,7 +522,8 @@ void RasterTile::processPoints(QList &points, for (int i = 0; i < points.size(); i++) { const MapData::Point &point = points.at(i); const Style *style = _data->style(); - const Style::Point &ps = style->point(point.type); + const Style::Point &ps = style->point(Style::hasColorset(point.type) + ? point.type | (point.flags & 0xFF000000) : point.type); bool poi = Style::isPOI(point.type); bool sl = sectorLight(point.lights); diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index 28f4cb5b..dcd7a031 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -402,18 +402,20 @@ bool RGNFile::readLclLights(Handle &hdl, quint32 &size, quint32 lights, bool RGNFile::readLclNavaid(Handle &hdl, quint32 size, MapData::Point *point) const { - quint32 unused, flags; + quint32 unused, color, flags; // Discard the class lights info if any (marine points may have both!) point->lights.clear(); + point->flags &= 0xffffff; if (!(size >= 4 && readUInt32(hdl, flags))) return false; size -= 4; if (flags & 1) { - if (!(size >= 1 && readUInt8(hdl, unused))) + if (!(size >= 1 && readUInt8(hdl, color))) return false; size--; + point->flags |= color<<24; } if (flags & 2) { if (!(size >= 1 && readUInt8(hdl, unused))) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 85d7e6a2..3026b157 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -7,6 +7,37 @@ using namespace IMG; using namespace Util; +#define PNT(type, color, img, dx, dy) \ + _points[(type) | (color)<<24] = Point(QImage(img), QPoint(dx, dy)); + +#define COLORSET(type, name, dx, dy) \ + PNT(type, 0, ":/marine/" name ".png", dx, dy); \ + PNT(type, 1, ":/marine/" name "-red.png", dx, dy); \ + PNT(type, 2, ":/marine/" name "-green.png", dx, dy); \ + PNT(type, 3, ":/marine/" name "-yellow.png", dx, dy); \ + PNT(type, 4, ":/marine/" name "-white.png", dx, dy); \ + PNT(type, 5, ":/marine/" name ".png", dx, dy); \ + PNT(type, 6, ":/marine/" name "-black-yellow.png", dx, dy); \ + PNT(type, 7, ":/marine/" name "-white-red.png", dx, dy); \ + PNT(type, 8, ":/marine/" name "-black-red.png", dx, dy); \ + PNT(type, 9, ":/marine/" name "-white-green.png", dx, dy); \ + PNT(type, 10, ":/marine/" name "-red-yellow.png", dx, dy); \ + PNT(type, 11, ":/marine/" name "-red-green.png", dx, dy); \ + PNT(type, 12, ":/marine/" name "yellow.png", dx, dy); \ + PNT(type, 13, ":/marine/" name "-black-yellow-black.png", dx, dy); \ + PNT(type, 14, ":/marine/" name "-yellow-black.png", dx, dy); \ + PNT(type, 15, ":/marine/" name "-yellow-black-yellow.png", dx, dy); \ + PNT(type, 16, ":/marine/" name "-red-white.png", dx, dy); \ + PNT(type, 17, ":/marine/" name "-green-red-green.png", dx, dy); \ + PNT(type, 18, ":/marine/" name "-red-green-red.png", dx, dy); \ + PNT(type, 19, ":/marine/" name "-black-red-black.png", dx, dy); \ + PNT(type, 20, ":/marine/" name "-yellow-red-yellow.png", dx, dy); \ + PNT(type, 21, ":/marine/" name "-green-red.png", dx, dy); \ + PNT(type, 22, ":/marine/" name "-black-white.png", dx, dy); \ + PNT(type, 23, ":/marine/" name "-white-yellow.png", dx, dy); \ + PNT(type, 24, ":/marine/" name "-yellow-white.png", dx, dy); \ + PNT(type, 25, ":/marine/" name "-green-white.png", dx, dy); + static QFont pixelSizeFont(int pixelSize) { QFont f; @@ -731,29 +762,32 @@ void Style::defaultPointStyle(qreal ratio) _points[0x10108] = Point(QImage(":/marine/light-major.png")); _points[0x10109] = Point(QImage(":/marine/light-major.png")); _points[0x1010a] = Point(QImage(":/marine/light-major.png")); - _points[0x10200] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6)); - _points[0x10201] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6)); - _points[0x10202] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6)); - _points[0x10203] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6)); - _points[0x10204] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6)); - _points[0x10205] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6)); - _points[0x10206] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8)); + + COLORSET(0x10200, "buoy", 6, -6); + COLORSET(0x10201, "buoy", 6, -6); + COLORSET(0x10202, "buoy", 6, -6); + COLORSET(0x10203, "buoy", 6, -6); + COLORSET(0x10204, "buoy", 6, -6); + COLORSET(0x10205, "buoy", 6, -6); + COLORSET(0x10206, "beacon", 0, -8); _points[0x10207] = Point(QImage(":/marine/spar-buoy.png"), QPoint(2, -9)); - _points[0x10208] = Point(QImage(":/marine/buoy.png"), QPoint(2, -9)); - _points[0x10209] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6)); - _points[0x1020a] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6)); - _points[0x1020b] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6)); - _points[0x1020c] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6)); + COLORSET(0x10208, "buoy", 6, -6); + COLORSET(0x10209, "buoy", 6, -6); + COLORSET(0x1020a, "buoy", 6, -6); + COLORSET(0x1020b, "buoy", 6, -6); + COLORSET(0x1020c, "buoy", 6, -6); _points[0x1020d] = Point(QImage(":/marine/platform.png")); - _points[0x1020e] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8)); - _points[0x1020f] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8)); - _points[0x10210] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8)); - _points[0x10211] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8)); - _points[0x10212] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8)); - _points[0x10213] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8)); - _points[0x10214] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8)); - _points[0x10215] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8)); + COLORSET(0x1020e, "beacon", 0, -8); + COLORSET(0x1020f, "beacon", 0, -8); + COLORSET(0x10210, "beacon", 0, -8); + COLORSET(0x10210, "beacon", 0, -8); + COLORSET(0x10211, "beacon", 0, -8); + COLORSET(0x10212, "beacon", 0, -8); + COLORSET(0x10213, "beacon", 0, -8); + COLORSET(0x10214, "beacon", 0, -8); + COLORSET(0x10215, "beacon", 0, -8); _points[0x10216] = Point(QImage(":/marine/mooring-buoy.png"), QPoint(0, -5)); + _points[0x10304] = Point(QImage(":/marine/building.png")); _points[0x10305] = Point(QImage(":/marine/chimney.png"), QPoint(0, -11)); _points[0x10306] = Point(QImage(":/marine/church.png")); @@ -761,6 +795,7 @@ void Style::defaultPointStyle(qreal ratio) _points[0x10308] = Point(QImage(":/marine/tower.png"), QPoint(0, -11)); _points[0x1030a] = Point(QImage(":/marine/triangulation-point.png")); _points[0x1030b] = Point(QImage(":/marine/radio.png")); + _points[0x10400] = Point(QImage(":/marine/obstruction.png")); _points[0x10401] = Point(QImage(":/marine/obstruction.png")); _points[0x10402] = Point(QImage(":/marine/wreck.png")); @@ -768,6 +803,7 @@ void Style::defaultPointStyle(qreal ratio) _points[0x10408] = Point(QImage(":/marine/obstruction-covers.png")); _points[0x1040a] = Point(QImage(":/marine/rock-dangerous.png")); _points[0x1040c] = Point(QImage(":/marine/rock-exposed.png")); + _points[0x10701] = Point(QImage(":/marine/anchorage.png")); _points[0x10702] = Point(QImage(":/marine/boarding-place.png")); _points[0x10703] = Point(QImage(":/marine/yacht-harbor.png")); diff --git a/src/map/IMG/style.h b/src/map/IMG/style.h index 944f5468..0324792c 100644 --- a/src/map/IMG/style.h +++ b/src/map/IMG/style.h @@ -118,16 +118,16 @@ public: static bool isPOI(quint32 type) {return !((type >= TYPE(0x01) && type <= TYPE(0x1f)) - || (type >= 0x11400 && type < 0x11500));} + || (type >= 0x11400 && type < 0x11500));} static bool isContourLine(quint32 type) {return ((type >= TYPE(0x20) && type <= TYPE(0x25)) - || (type & 0xffff00) == TYPE(0x109));} + || (type & 0xffff00) == TYPE(0x109));} static bool isWaterArea(quint32 type) {return ((type >= TYPE(0x3c) && type <= TYPE(0x44)) - || (type & 0xffff00) == TYPE(0x10b));} + || (type & 0xffff00) == TYPE(0x10b));} static bool isWaterLine(quint32 type) {return (type == TYPE(0x26) || type == TYPE(0x18) - || type == TYPE(0x1f));} + || type == TYPE(0x1f));} static bool isMilitaryArea(quint32 type) {return (type == TYPE(0x04) || type == 0x10901);} static bool isNatureReserve(quint32 type) @@ -156,6 +156,9 @@ public: {return type >= 0x10100 && type < 0x10a00;} static bool isMarina(quint32 type) {return type == 0x10703;} + static bool hasColorset(quint32 type) + {return (isBuoy(type) + && !(type == 0x10207 || type == 0x1020d || type == 0x10216));} static QColor color(Light::Color c); From bdd60ed8163e4d1283688accad2437804e200998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 5 May 2025 23:00:55 +0200 Subject: [PATCH 28/36] Do not overcomplicate the macros and keep them united with the IMG macros --- src/map/ENC/style.cpp | 96 +++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 58 deletions(-) diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 0d1a4621..d767209a 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -10,68 +10,48 @@ using namespace Util; #define COLOR3(c1, c2, c3) (((c3)<<8) | ((c2)<<4) | (c1)) #define COLOR4(c1, c2, c3, c4) (((c4)<<12) | ((c3)<<8) | ((c2)<<4) | (c1)) -#define PATH(name) ":/marine/" name ".png" -#define PATH1(name, c1) ":/marine/" name "-" c1 ".png" -#define PATH2(name, c1, c2) ":/marine/" name "-" c1 "-" c2 ".png" -#define PATH3(name, c1, c2, c3) ":/marine/" name "-" c1 "-" c2 "-" c3 ".png" -#define PATH4(name, c1, c2, c3, c4) ":/marine/" name "-" c1 "-" c2 "-" c3 "-" c4 ".png" - #define PNT(type, subtype, img, dx, dy) \ _points[SUBTYPE((type), (subtype))] = Point(QImage(img), Small, QPoint((dx), (dy))); #define COLORSET(type, name, dx, dy) \ - PNT(type, 0, PATH(name), dx, dy); \ - PNT(type, 1, PATH1(name, "white"), dx, dy); \ - PNT(type, 2, PATH(name), dx, dy); \ - PNT(type, 3, PATH1(name, "red"), dx, dy); \ - PNT(type, 4, PATH1(name, "green"), dx, dy); \ - PNT(type, 5, PATH(name), dx, dy); \ - PNT(type, 6, PATH1(name, "yellow"), dx, dy); \ - PNT(type, 7, PATH(name), dx, dy); \ - PNT(type, 8, PATH(name), dx, dy); \ - PNT(type, 9, PATH1(name, "yellow"), dx, dy); \ - PNT(type, 10, PATH(name), dx, dy); \ - PNT(type, 11, PATH1(name, "yellow"), dx, dy); \ - PNT(type, 12, PATH(name), dx, dy); \ - PNT(type, 13, PATH(name), dx, dy); \ - PNT(type, COLOR2(1, 2), PATH2(name, "white", "black"), dx, dy); \ - PNT(type, COLOR2(1, 3), PATH2(name, "white", "red"), dx, dy); \ - PNT(type, COLOR2(1, 4), PATH2(name, "white", "green"), dx, dy); \ - PNT(type, COLOR2(1, 6), PATH2(name, "white", "yellow"), dx, dy); \ - PNT(type, COLOR2(1, 9), PATH2(name, "white", "yellow"), dx, dy); \ - PNT(type, COLOR2(1, 11), PATH2(name, "white", "yellow"), dx, dy); \ - PNT(type, COLOR2(2, 1), PATH2(name, "black", "white"), dx, dy); \ - PNT(type, COLOR2(2, 3), PATH2(name, "black", "red"), dx, dy); \ - PNT(type, COLOR2(2, 4), PATH2(name, "black", "green"), dx, dy); \ - PNT(type, COLOR2(2, 6), PATH2(name, "black", "yellow"), dx, dy); \ - PNT(type, COLOR2(2, 9), PATH2(name, "black", "yellow"), dx, dy); \ - PNT(type, COLOR2(2, 11), PATH2(name, "black", "yellow"), dx, dy); \ - PNT(type, COLOR2(3, 1), PATH2(name, "red", "white"), dx, dy); \ - PNT(type, COLOR2(3, 2), PATH2(name, "red", "black"), dx, dy); \ - PNT(type, COLOR2(3, 4), PATH2(name, "red", "green"), dx, dy); \ - PNT(type, COLOR2(4, 1), PATH2(name, "green", "white"), dx, dy); \ - PNT(type, COLOR2(4, 2), PATH2(name, "green", "black"), dx, dy); \ - PNT(type, COLOR2(4, 3), PATH2(name, "green", "red"), dx, dy); \ - PNT(type, COLOR2(6, 1), PATH2(name, "yellow", "white"), dx, dy); \ - PNT(type, COLOR2(9, 1), PATH2(name, "yellow", "white"), dx, dy); \ - PNT(type, COLOR2(11, 1), PATH2(name, "yellow", "white"), dx, dy); \ - PNT(type, COLOR2(6, 2), PATH2(name, "yellow", "black"), dx, dy); \ - PNT(type, COLOR2(9, 2), PATH2(name, "yellow", "black"), dx, dy); \ - PNT(type, COLOR2(11, 2), PATH2(name, "yellow", "black"), dx, dy); \ - PNT(type, COLOR3(1, 6, 1), PATH3(name, "white", "yellow", "white"), dx, dy); \ - PNT(type, COLOR3(1, 9, 1), PATH3(name, "white", "yellow", "white"), dx, dy); \ - PNT(type, COLOR3(1, 11, 1), PATH3(name, "white", "yellow", "white"), dx, dy); \ - PNT(type, COLOR3(2, 3, 2), PATH3(name, "black", "red", "black"), dx, dy); \ - PNT(type, COLOR3(2, 6, 2), PATH3(name, "black", "yellow", "black"), dx, dy); \ - PNT(type, COLOR3(3, 4, 3), PATH3(name, "red", "green", "red"), dx, dy); \ - PNT(type, COLOR3(4, 3, 4), PATH3(name, "green", "red", "green"), dx, dy); \ - PNT(type, COLOR3(6, 1, 6), PATH3(name, "yellow", "white", "yellow"), dx, dy); \ - PNT(type, COLOR3(6, 2, 6), PATH3(name, "yellow", "black", "yellow"), dx, dy); \ - PNT(type, COLOR3(6, 3, 6), PATH3(name, "yellow", "red", "yellow"), dx, dy); \ - PNT(type, COLOR4(3, 1, 3, 1), PATH4(name, "red", "white", "red", "white"), dx, dy); \ - PNT(type, COLOR4(3, 4, 3, 4), PATH4(name, "red", "green", "red", "green"), dx, dy); \ - PNT(type, COLOR4(4, 1, 4, 1), PATH4(name, "green", "white", "green", "white"), dx, dy); \ - PNT(type, COLOR4(4, 3, 4, 3), PATH4(name, "green", "red", "green", "red"), dx, dy); + PNT(type, COLOR2(1, 2), ":/marine/" name "-white-black.png", dx, dy); \ + PNT(type, COLOR2(1, 3), ":/marine/" name "-white-red.png", dx, dy); \ + PNT(type, COLOR2(1, 4), ":/marine/" name "-white-green.png", dx, dy); \ + PNT(type, COLOR2(1, 6), ":/marine/" name "-white-yellow.png", dx, dy); \ + PNT(type, COLOR2(1, 9), ":/marine/" name "-white-yellow.png", dx, dy); \ + PNT(type, COLOR2(1, 11), ":/marine/" name "-white-yellow.png", dx, dy); \ + PNT(type, COLOR2(2, 1), ":/marine/" name "-black-white.png", dx, dy); \ + PNT(type, COLOR2(2, 3), ":/marine/" name "-black-red.png", dx, dy); \ + PNT(type, COLOR2(2, 4), ":/marine/" name "-black-green.png", dx, dy); \ + PNT(type, COLOR2(2, 6), ":/marine/" name "-black-yellow.png", dx, dy); \ + PNT(type, COLOR2(2, 9), ":/marine/" name "-black-yellow.png", dx, dy); \ + PNT(type, COLOR2(2, 11), ":/marine/" name "-black-yellow.png", dx, dy); \ + PNT(type, COLOR2(3, 1), ":/marine/" name "-red-white.png", dx, dy); \ + PNT(type, COLOR2(3, 2), ":/marine/" name "-red-black.png", dx, dy); \ + PNT(type, COLOR2(3, 4), ":/marine/" name "-red-green.png", dx, dy); \ + PNT(type, COLOR2(4, 1), ":/marine/" name "-green-white.png", dx, dy); \ + PNT(type, COLOR2(4, 2), ":/marine/" name "-green-black.png", dx, dy); \ + PNT(type, COLOR2(4, 3), ":/marine/" name "-green-red.png", dx, dy); \ + PNT(type, COLOR2(6, 1), ":/marine/" name "-yellow-white.png", dx, dy); \ + PNT(type, COLOR2(9, 1), ":/marine/" name "-yellow-white.png", dx, dy); \ + PNT(type, COLOR2(11, 1), ":/marine/" name "-yellow-white.png", dx, dy); \ + PNT(type, COLOR2(6, 2), ":/marine/" name "-yellow-black.png", dx, dy); \ + PNT(type, COLOR2(9, 2), ":/marine/" name "-yellow-black.png", dx, dy); \ + PNT(type, COLOR2(11, 2), ":/marine/" name "-yellow-black.png", dx, dy); \ + PNT(type, COLOR3(1, 6, 1), ":/marine/" name "-white-yellow-white.png", dx, dy); \ + PNT(type, COLOR3(1, 9, 1), ":/marine/" name "-white-yellow-white.png", dx, dy); \ + PNT(type, COLOR3(1, 11, 1), ":/marine/" name "-white-yellow-white.png", dx, dy); \ + PNT(type, COLOR3(2, 3, 2), ":/marine/" name "-black-red-black.png", dx, dy); \ + PNT(type, COLOR3(2, 6, 2), ":/marine/" name "-black-yellow-black.png", dx, dy); \ + PNT(type, COLOR3(3, 4, 3), ":/marine/" name "-red-green-red.png", dx, dy); \ + PNT(type, COLOR3(4, 3, 4), ":/marine/" name "-green-red-green.png", dx, dy); \ + PNT(type, COLOR3(6, 1, 6), ":/marine/" name "-yellow-white-yellow.png", dx, dy); \ + PNT(type, COLOR3(6, 2, 6), ":/marine/" name "-yellow-black-yellow.png", dx, dy); \ + PNT(type, COLOR3(6, 3, 6), ":/marine/" name "-yellow-red-yellow.png", dx, dy); \ + PNT(type, COLOR4(3, 1, 3, 1), ":/marine/" name "-red-white-red-white.png", dx, dy); \ + PNT(type, COLOR4(3, 4, 3, 4), ":/marine/" name "-red-green-red-green.png", dx, dy); \ + PNT(type, COLOR4(4, 1, 4, 1), ":/marine/" name "-green-white-green-white.png", dx, dy); \ + PNT(type, COLOR4(4, 3, 4, 3), ":/marine/" name "-green-red-green-red.png", dx, dy); static QImage railroad(qreal ratio) { From a8473fa0397b30509379c4a6a852d65268968d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 5 May 2025 23:05:21 +0200 Subject: [PATCH 29/36] Added missing single color entries --- src/map/ENC/style.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index d767209a..b8f87482 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -14,6 +14,20 @@ using namespace Util; _points[SUBTYPE((type), (subtype))] = Point(QImage(img), Small, QPoint((dx), (dy))); #define COLORSET(type, name, dx, dy) \ + PNT(type, 0, ":/marine/" name ".png", dx, dy); \ + PNT(type, 1, ":/marine/" name "-white.png", dx, dy); \ + PNT(type, 2, ":/marine/" name ".png", dx, dy); \ + PNT(type, 3, ":/marine/" name "-red.png", dx, dy); \ + PNT(type, 4, ":/marine/" name "-green.png", dx, dy); \ + PNT(type, 5, ":/marine/" name ".png", dx, dy); \ + PNT(type, 6, ":/marine/" name "-yellow.png", dx, dy); \ + PNT(type, 7, ":/marine/" name ".png", dx, dy); \ + PNT(type, 8, ":/marine/" name ".png", dx, dy); \ + PNT(type, 9, ":/marine/" name "-yellow.png", dx, dy); \ + PNT(type, 10, ":/marine/" name ".png", dx, dy); \ + PNT(type, 11, ":/marine/" name "-yellow.png", dx, dy); \ + PNT(type, 12, ":/marine/" name ".png", dx, dy); \ + PNT(type, 13, ":/marine/" name ".png", dx, dy); \ PNT(type, COLOR2(1, 2), ":/marine/" name "-white-black.png", dx, dy); \ PNT(type, COLOR2(1, 3), ":/marine/" name "-white-red.png", dx, dy); \ PNT(type, COLOR2(1, 4), ":/marine/" name "-white-green.png", dx, dy); \ From c070aa062b6200a703f305ca1a7ed64437611d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 6 May 2025 05:52:58 +0200 Subject: [PATCH 30/36] Fetch the buoy color info from class data --- src/map/IMG/rgnfile.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index dcd7a031..8baed229 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -120,6 +120,8 @@ bool RGNFile::readBuoyInfo(Handle &hdl, quint8 flags, quint32 size, if (!(size >= 2 && readUInt16(hdl, val))) return false; + point->flags = (val & 0x3f)<<24; + lc = (val >> 10) & 0x0f; if (!lc) lc = (val >> 6) & 7; From 87e259a7a1316cbd5fd8a427f857200fb11b84b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 6 May 2025 20:13:49 +0200 Subject: [PATCH 31/36] Unify the area styles with ENC maps --- src/map/IMG/style.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 3026b157..8917b162 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -350,6 +350,8 @@ void Style::defaultPolygonStyle() _polygons[0x10306] = Polygon(QBrush(QColor(0xc0, 0xe0, 0xff))); _polygons[0x10307] = Polygon(QBrush(QColor(0xff, 0xff, 0xff))); _polygons[0x10308] = Polygon(QBrush(QColor(0xff, 0xff, 0xff))); + _polygons[0x10407] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3), + Qt::Dense3Pattern)); _polygons[0x10409] = Polygon(QBrush(QColor(0xff, 0x40, 0x40), Qt::FDiagPattern)); _polygons[0x10503] = Polygon(QBrush(QColor(0xff, 0x40, 0x40), @@ -381,8 +383,8 @@ void Style::defaultPolygonStyle() << TYPE(0x0a) << 0x10907 << TYPE(0x0b) << 0x10908 << TYPE(0x0c) << 0x10909 << TYPE(0x26) << TYPE(0x0d) << 0x1090a << TYPE(0x0e) << 0x1090b << TYPE(0x0f) << TYPE(0x10) << TYPE(0x11) << TYPE(0x12) << TYPE(0x19) << 0x1090d - << TYPE(0x13) << 0x10900 << 0x10613 << 0x10409 << 0x10503 << 0x10504 - << 0x1060a; + << TYPE(0x13) << 0x10900 << 0x10613 << 0x10407 << 0x10409 << 0x10503 + << 0x10504 << 0x1060a; } void Style::defaultLineStyle(qreal ratio) @@ -495,13 +497,14 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10404] = Line(QImage(":/marine/fishing-farm-line.png")); _lines[0x10405] = Line(QImage(":/marine/pipeline-area-line.png")); _lines[0x10406] = Line(QImage(":/marine/cable-area-line.png")); + _lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine)); _lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine)); _lines[0x10501] = Line(QImage(":/marine/noanchor-line.png")); - _lines[0x10503] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x10503] = Line(QImage(":/marine/entry-prohibited-line.png")); _lines[0x10504] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); _lines[0x10505] = Line(QImage(":/marine/safety-zone-line.png")); _lines[0x10506] = Line(QImage(":/marine/nature-reserve-line.png")); - _lines[0x10507] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine)); + _lines[0x10507] = Line(QImage(":/marine/safety-zone-line.png")); _lines[0x10601] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine)); _lines[0x10603] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 2, Qt::DashDotLine)); _lines[0x10606] = Line(QImage(":/marine/anchor-line.png")); From 42f785d14bc5ac4aa9407de2dbef5b10a2388aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 6 May 2025 20:16:05 +0200 Subject: [PATCH 32/36] Use the propper image for rescue station (0x1070a) points --- src/map/IMG/style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 8917b162..c7b8f32f 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -812,7 +812,7 @@ void Style::defaultPointStyle(qreal ratio) _points[0x10703] = Point(QImage(":/marine/yacht-harbor.png")); _points[0x10704] = Point(QImage(":/marine/pile.png")); _points[0x10705] = Point(QImage(":/marine/anchoring-prohibited.png")); - _points[0x1070a] = Point(QImage(":/marine/coast-guard.png")); + _points[0x1070a] = Point(QImage(":/marine/rescue-station.png")); _points[0x1070b] = Point(QImage(":/marine/fishing-harbor.png")); } From 8323694f64abc56b90807819e05656bc16f2e9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 6 May 2025 20:27:44 +0200 Subject: [PATCH 33/36] Colored spar buoys --- gpxsee.qrc | 29 ++++++++++++++++-- .../map/marine/spar-buoy-black-red-black.png | Bin 0 -> 339 bytes icons/map/marine/spar-buoy-black-red.png | Bin 0 -> 334 bytes icons/map/marine/spar-buoy-black-white.png | Bin 0 -> 332 bytes .../marine/spar-buoy-black-yellow-black.png | Bin 0 -> 336 bytes icons/map/marine/spar-buoy-black-yellow.png | Bin 0 -> 333 bytes .../map/marine/spar-buoy-green-red-green.png | Bin 0 -> 365 bytes icons/map/marine/spar-buoy-green-red.png | Bin 0 -> 354 bytes icons/map/marine/spar-buoy-green-white.png | Bin 0 -> 353 bytes icons/map/marine/spar-buoy-green.png | Bin 0 -> 348 bytes icons/map/marine/spar-buoy-red-green-red.png | Bin 0 -> 361 bytes icons/map/marine/spar-buoy-red-green.png | Bin 0 -> 356 bytes icons/map/marine/spar-buoy-red-white.png | Bin 0 -> 345 bytes icons/map/marine/spar-buoy-red-yellow.png | Bin 0 -> 345 bytes icons/map/marine/spar-buoy-red.png | Bin 0 -> 337 bytes icons/map/marine/spar-buoy-white-green.png | Bin 0 -> 355 bytes icons/map/marine/spar-buoy-white-red.png | Bin 0 -> 343 bytes icons/map/marine/spar-buoy-white-yellow.png | Bin 0 -> 341 bytes icons/map/marine/spar-buoy-white.png | Bin 0 -> 335 bytes .../marine/spar-buoy-yellow-black-yellow.png | Bin 0 -> 346 bytes icons/map/marine/spar-buoy-yellow-black.png | Bin 0 -> 335 bytes .../marine/spar-buoy-yellow-red-yellow.png | Bin 0 -> 351 bytes icons/map/marine/spar-buoy-yellow-white.png | Bin 0 -> 340 bytes icons/map/marine/spar-buoy-yellow.png | Bin 0 -> 335 bytes icons/map/marine/spar-buoy.png | Bin 243 -> 319 bytes src/map/IMG/style.cpp | 2 +- src/map/IMG/style.h | 3 +- 27 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 icons/map/marine/spar-buoy-black-red-black.png create mode 100644 icons/map/marine/spar-buoy-black-red.png create mode 100644 icons/map/marine/spar-buoy-black-white.png create mode 100644 icons/map/marine/spar-buoy-black-yellow-black.png create mode 100644 icons/map/marine/spar-buoy-black-yellow.png create mode 100644 icons/map/marine/spar-buoy-green-red-green.png create mode 100644 icons/map/marine/spar-buoy-green-red.png create mode 100644 icons/map/marine/spar-buoy-green-white.png create mode 100644 icons/map/marine/spar-buoy-green.png create mode 100644 icons/map/marine/spar-buoy-red-green-red.png create mode 100644 icons/map/marine/spar-buoy-red-green.png create mode 100644 icons/map/marine/spar-buoy-red-white.png create mode 100644 icons/map/marine/spar-buoy-red-yellow.png create mode 100644 icons/map/marine/spar-buoy-red.png create mode 100644 icons/map/marine/spar-buoy-white-green.png create mode 100644 icons/map/marine/spar-buoy-white-red.png create mode 100644 icons/map/marine/spar-buoy-white-yellow.png create mode 100644 icons/map/marine/spar-buoy-white.png create mode 100644 icons/map/marine/spar-buoy-yellow-black-yellow.png create mode 100644 icons/map/marine/spar-buoy-yellow-black.png create mode 100644 icons/map/marine/spar-buoy-yellow-red-yellow.png create mode 100644 icons/map/marine/spar-buoy-yellow-white.png create mode 100644 icons/map/marine/spar-buoy-yellow.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 38b2b309..21e6e8e2 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -204,6 +204,32 @@ icons/map/marine/beacon-black-green.png icons/map/marine/beacon-black-yellow.png icons/map/marine/beacon-black-yellow-black.png + icons/map/marine/spar-buoy.png + icons/map/marine/spar-buoy-red.png + icons/map/marine/spar-buoy-green.png + icons/map/marine/spar-buoy-yellow.png + icons/map/marine/spar-buoy-white.png + icons/map/marine/spar-buoy-black-yellow.png + icons/map/marine/spar-buoy-white-red.png + icons/map/marine/spar-buoy-black-red.png + icons/map/marine/spar-buoy-white-green.png + icons/map/marine/spar-buoy-red-yellow.png + icons/map/marine/spar-buoy-red-green.png + icons/map/marine/spar-buoy-black-yellow-black.png + icons/map/marine/spar-buoy-yellow-black.png + icons/map/marine/spar-buoy-yellow-black-yellow.png + icons/map/marine/spar-buoy-red-white.png + icons/map/marine/spar-buoy-green-red-green.png + icons/map/marine/spar-buoy-red-green-red.png + icons/map/marine/spar-buoy-black-red-black.png + icons/map/marine/spar-buoy-yellow-red-yellow.png + icons/map/marine/spar-buoy-green-red.png + icons/map/marine/spar-buoy-black-white.png + icons/map/marine/spar-buoy-white-yellow.png + icons/map/marine/spar-buoy-yellow-white.png + icons/map/marine/spar-buoy-green-white.png + icons/map/marine/mooring-buoy.png + icons/map/marine/platform.png icons/map/marine/rock-exposed.png icons/map/marine/rock-dangerous.png icons/map/marine/wreck.png @@ -223,11 +249,8 @@ icons/map/marine/yacht-harbor.png icons/map/marine/fishing-harbor.png icons/map/marine/pile.png - icons/map/marine/spar-buoy.png - icons/map/marine/mooring-buoy.png icons/map/marine/tower.png icons/map/marine/chimney.png - icons/map/marine/platform.png icons/map/marine/ferry-line.png icons/map/marine/dw-route-line.png icons/map/marine/fence-line.png diff --git a/icons/map/marine/spar-buoy-black-red-black.png b/icons/map/marine/spar-buoy-black-red-black.png new file mode 100644 index 0000000000000000000000000000000000000000..b643509cad68460319b43c86c1e472ad5c8d2080 GIT binary patch literal 339 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+Rh}-6Ar`0CPB|!aSb@VOQtJQz=H&J{ zCj>$cY`G&6dv6i*3IQdhyw!{^TwGSfu`PIQ&Hf@!$-sJ`TZx7?*Wb&F$`Y&3kY69o3J_VEh-7&~{(!hj)|Kzw`2$0tP>9 zU;p!cV$1wP=%TxeT-YC(3XY2N?>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+rJgR1Ar`0CPC3YTM1jLaa@)WE?62GA z-G~U8GwbOxjx&qTI&>HqbBD7!2n#Ys^Bg$8U*^H~*=(EB?|D2m*t2q9ioDZJ&wBR{ zs;@f#*ezB6RBP25;6F{`>Gjq>A&yhx)jw_Ls0~aMyzzE9*NnIMf)YQSoBisv7Z$j- zo#1((tt4+;y}(7j!ldKO!;cdd+bauSPf21f_{uR;SK;&ieHE$o33W@(Sm)2%m?n8N R_z=j$44$rjF6*2UngBh{b(8=A literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-black-white.png b/icons/map/marine/spar-buoy-black-white.png new file mode 100644 index 0000000000000000000000000000000000000000..caed2975fae1dd14eda20dc57847fe3ee0ec3d1a GIT binary patch literal 332 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+#hxyXAr`0CPVwerHso-wEUEg>eZC{l z%hmYjj=-C$EXmO3zQiPaK1ncm~{^ZxnDR-Yek6eFm<-!auZRG#6jx ziAnp`(V^%t)$#rQ^Dp){PON{d)#rCy*kV=7O$+1O^;;{p{0m^q+-4nr{6vBD1I=mc PL4NUc^>bP0l+XkKBY<{n literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-black-yellow-black.png b/icons/map/marine/spar-buoy-black-yellow-black.png new file mode 100644 index 0000000000000000000000000000000000000000..df5718ecfcd6096a27f60e24e11159f0045888f6 GIT binary patch literal 336 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+<(@8%Ar`0ChByixQQ%O{`Tk#i+hp5| ziGrfHi&lI1FtG-4OyY5mXYh4lxthfAt@bH{bu2^5bsmqWX%Z{)vfewb*59jl(B}%* zUyUQ$m$hm?$)B)V@!IUyqD7s?-;=${?|%Q%ohx(MpV8=7*c{Ev>R;sfgV-Ou*go~Q z_~I3k2Q-!BCnZjpamwM_{`S+cd8>O@TTBv{ZaC~cV=e2MZ}au#*4kfT%e0ZOzt@*3 TR~!Cu9mqePu6{1-oD!M<3ej_m literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-black-yellow.png b/icons/map/marine/spar-buoy-black-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..1c10d7e8a14018e32861b356b80f21369d6e23ba GIT binary patch literal 333 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+C7v#hAr`0CPB|#VtjOV9S@Qe8{Tn{p zn~t%jrKfxaJ(`4lIyySuz2X%yHolUyVBUVq729XC`Jc~H-hOz6?_c+K&O5ALz86{5 zQO9Jz{0~drT)n^>Ctq;=sd+VXCzt*8r~EIp{>+rATlG(m3ore4xSS9ZsdG*8m(Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+Bc3jfAr_~XhIoq|R^XVk@tNPw|EH{H z+U@Fi64>k&W!Cv;4r2>PM~BDqTOM)@2QmyiZR5>?wsy13o2_=L!^`mh?@kYw335gI zJ)FL)sLKv7F0?w`9SgZVMs>*$axZH?8FOAu%-tR5mck@v$ yk4IUajYpby;x;jh+x2D@TmDH%F1h*c4}<>W#&o|8oqK`)VeoYIb6Mw<&;$S<>4U8R literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-green-red.png b/icons/map/marine/spar-buoy-green-red.png new file mode 100644 index 0000000000000000000000000000000000000000..44a44ba461d90d14ff44c577d86732174fab57d0 GIT binary patch literal 354 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+ot`d^Ar`0SPVp8xqQK#j>Gpog@Ac38 z43FxlEz@v)dqQhs|9VbFrx`ONi>EM(2nudE$?)p;W9C;c7deQ8ajPc2eLb(=e&Wo| zeOKvWYk#(J;9%M?(%V0NOt`DuD0Xz#rYFAirk4{P|;7^ oCT4KE-mY@XzXLp%a?1ZP{AVp{-B>>v=ywJNPgg&ebxsLQ04bn=00000 literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-green-white.png b/icons/map/marine/spar-buoy-green-white.png new file mode 100644 index 0000000000000000000000000000000000000000..7791afe27126344839367bd031e6915643e8f6d3 GIT binary patch literal 353 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+9iA?ZAr`0SPVp8xtia=}I(^>Co&Q(0 zFIub@Wz_be@Ix1an1A1K7X_7-H>)O{VK|Usbn;W}yosshiWhc=wFoWxSoZp{y9#I7 z<=?6~rHM~AW!&c5r@!d!gWt-x59+UP*9lQ@-_W7EFYXn0pVdWk|I3vVSnfB79hJX& zxNNn(YDY+YreagQV8M@>DN`+qj$Jc8$=`5%|1D*uFecqcJpZrd_qe>;Gs9CYKhaFg lVs^bNn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+&7LlfAr`0SPH_}#R^V|-pKx#G_xQ@? zuV(A%)G{i%Yzmwt@NYqWhl5AZfiR9@(fH0Z?0dylC{Xp^ApPk&s9sd*ah%rn3|v69`(nVO{v_^#v@Jp;AYmUf9dA^ gZ~7<7pZt7I|HS*UtDpEpRX~38boFyt=akR{072(^x&QzG literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-red-green-red.png b/icons/map/marine/spar-buoy-red-green-red.png new file mode 100644 index 0000000000000000000000000000000000000000..3b7a8013a1dcc6fb855d0b5b2674967ec139ca79 GIT binary patch literal 361 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+1D-C9Ar_~XhIk4cHsF}N;_vc5|EJii z%2s8}5qQM9{mhSqW=A0&mjfZ8cZ1b-GBYfm?>X)FOXbtA6&!WfsCaSQO8Y3^5h7}I z@^7LMSH?!2olnJogt>GcIG?@uSAYxmf1gb;SCd6@zN%^@`PaUm6!}&6PvHMjYrZgz z54Li$)tlen4*wU$@=3pDrtG{tai0CQyZhH3`=H46lkG#$RcX=v?0K9v>EeGr@Vd^~ u7_xH5WS?nH`MMjn|G)5}HeV`{!3C$fKUFelF{r5}E*ocZ6yH literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-red-green.png b/icons/map/marine/spar-buoy-red-green.png new file mode 100644 index 0000000000000000000000000000000000000000..6f6b00e541c0b2f5e0bbb34cb0655307a57f4f6c GIT binary patch literal 356 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+-JULvAr`0SPH_}Etia*=fB7@Nz5h>H ztIF=mIHO?bk@}cL;J!MK%b}3ax!KB<3=Es6dv1HL?Pm6V$pMYEqFNre@_za&g|_}# z`8UnTyCUdj)@iPNxr^33xIJObgYDOgg-{$ZAv*q6m$t4-(b&Nm7D{LG@AM}F!=;`X`vd$@?2>>1XfWrU) literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-red-white.png b/icons/map/marine/spar-buoy-red-white.png new file mode 100644 index 0000000000000000000000000000000000000000..03e0a0c476ece64413e38bafabfc4e04e6660362 GIT binary patch literal 345 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+4W2HJAr`0SPPr{~Sb@XE^4g#O?AQ5f zJ7t{~m12xk2=y5f7r-cTdU4jR^zI|*0tBzv%W58@%lPl zOytjOhXeTso<2MwdDHlV;pXYP`B@k7&inV9=f8;Czuwg=_$8$S7PsDvNHF{V=<&rL e&Y4SYzWKw{s8Fn_%=j(`Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+4W2HJAr`0SPVp8xY{20xSo*I1fz{%? zSA56juSgST{v`a7LAXif@gYk>g@Ng*K5kjUQvfmv9fH&-G9Yrhri}O d<$UYyIsWRFJS{bcP&tstJYD@<);T3K0RS*Nc&-2d literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-red.png b/icons/map/marine/spar-buoy-red.png new file mode 100644 index 0000000000000000000000000000000000000000..bb09c6f5e19487eb4fa3cc55c9f35e2efaf72c10 GIT binary patch literal 337 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+6`n4RAr`0SPB|!aSb@VOGW*~E=Ir)3 zul5BG-0}n??yJpg6*@fke5kvLA?+n&=Io2HWS-~BdfBwI6P-rIqUjM6Q z%rm_&=c)hrr@BqJ=6;s?k2332#l!lX5q~B%9K0WONn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+U7jwEAr`0SPI<_8Sb?MEeZ+Ua>i_X~ zjn{Jj-gs+4=$>gy3`JYtPjKLP_U>Met!EyC!&jq|pXz^{*ksLl!8(jd(xv$O<8GI- zz~3jAu_#ZSu42-Y=)*K4oUJLT*-`F(rq^?E87+Jn64>FVdQ&MBb@0R3%(8UO$Q literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-white-red.png b/icons/map/marine/spar-buoy-white-red.png new file mode 100644 index 0000000000000000000000000000000000000000..779b90eb13047c3dd1ad443f2f62eee7433c9b6e GIT binary patch literal 343 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+b)GJcAr`0SPC3ZeV!+`ddF|hScKz8m zgLz$V_f4wUz%kccD8Xq$ie(nVp))*Lh7JGfo;B3%$}IREng2wM?d0c^U4ImRt8U{; zo6;}PRoLA5&#lhyr}WRiWtNn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+HJ&bxAr`0SPC3nY*nopY(){m#`7&33 zmmhmMgZKScr#rw#D}MR|9qbixhnZb9vg~& zo^ZOpV_D}@-a5aj=05^sH%+iiYjQoD-nCy` Zncw_EvCI~?3vWT5@^tlcS?83{1OVMdc}@TT literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-white.png b/icons/map/marine/spar-buoy-white.png new file mode 100644 index 0000000000000000000000000000000000000000..029081c73a7b9e71e5c5563bf999ffac5bb47aa5 GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+Wu7jMAr_~XPC3nYSb>Md*5vPhdB3M| zUQYya%vP%M+3cC;n&87x{yp&}@0+x=6(=3$%U53r7iZd>9J^ws#Jjp4k1Kgq`;Sag zD6TwxsGxAUcaHyu$6?h?_g8z18U2~$a8#dDq~@ut4(o0EADWF_@lgRE^qCmz+5I|a z8oQl8aQsZ%yLntL(r5lvxBeG)``5erhMH)3LbuqeZ4OueCly`$7a$jO)q1~~P?>c9 SXQSgF?|8cUxvXNn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+jh-%!Ar_~XPB|!aSb@W((&X=dc{6AK zZ5|?pr+oMXBgJ(bn;G`feZswiMdE1+-VJZQC3}^BNe`%F*jn`arpXKYFVlH8sSDlj zpU3Ba>cGW(1F>~e1WlQ@ckDTnGeM{}fuUp8;b-pa?i}-qnJg?_P{}z{cf!y4`f)eq er#hb6^O<@5twI^QX5JMbpLx3axvXNn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+Wu7jMAr_~%PPxc;Sb@X!ec|2z|2J?~ z7cIUKlw&3&FLJQ>U;|fLnpodFhv_P-4j#BsUt{2>FC-Hy-8ri(?OW`;6}nmT-%NVo z^K=r+`G=nww^;wUclF(a{_E3s349E0>Uht*cvINX{-fI43xCRote!6vvg*G)C*S_? z52~FzQ}?LYp2<;HJ=Yl9w8AoGUX6Y3}L9k(%dPZ&$G|(wbzo@oIN)`wmnl$ Sa870)$UB~{elF{r5}E)Dd3MYI literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-yellow-red-yellow.png b/icons/map/marine/spar-buoy-yellow-red-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..cd9067dc4d017daea0a6eb754b15f295ac2e0ba8 GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+ZJsWUAr_~XPVwerHso;rd+EzR_B^d! zUfwfmBt$dCgqxC?jl5cBMp{%c`A#|^#{BpH?B=>Eh8eN19b8Wu{H~oBxO3%SA$K*hTYuxTykoP=Y{an^LB{Ts5VMKgb literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-yellow-white.png b/icons/map/marine/spar-buoy-yellow-white.png new file mode 100644 index 0000000000000000000000000000000000000000..3c26b8127c8fcbe06f1117490f2280191eaf7336 GIT binary patch literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+)t)YnAr`0SPB|!aSb@W(((Lbld9%%X zuS|1sRWg=alvvx%HI2h_m+#)jtTZ<>$&CB^O*1xgH(t#5T@hile*Qpan!aZ+V}A3+>i!S=4=ss*tkrk0Pt;;h>k3_gulDn8vg=dyg05KG XXDlg^?oAJ>0{O|))z4*}Q$iB}-FJ8P literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy-yellow.png b/icons/map/marine/spar-buoy-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..faac5878e33a19ba69ec0038caa712718c0bb9ab GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRz!3HFmzMa1bq*&4&eH|GXHuiJ>Nn{1`8HI(3)EF2VS{N990fib~Fff!FFfhDIU|_JC0W_>&&aOZkpaffz zx4R3F27;f?yFt1+3p^r=fmUA!VMZs7*%d&+Wu7jMAr`0SPC3nYSb>Md*5vPh`DI1^ zTb@1D*?2@zLVq(?l#fRF_r%w{A;!j65*O6|uewl{&k}ZgR)FEgJO8zXraHe5zAN-5 zMlP~LCXj!D&B6Y)pIG+a)r-9Ga5;-so!5c~-0u~R$8*hjkk1+N=SowPJtxZ_uD=h? zNiI%*kesGp{(eo5P&bVFLUpx{3+*Cn?7?VbL7jg TnO-{$bTNactDnm{r-UW|hre|y literal 0 HcmV?d00001 diff --git a/icons/map/marine/spar-buoy.png b/icons/map/marine/spar-buoy.png index 4b6380cbb1e011b8d75fb2d848e838f0a5084e7b..aa8e9acbd17f149bcf51aa4de5ec993946c3a916 100644 GIT binary patch delta 305 zcmey&xSwf)c)d6W8v_Fa)3@_CffP%+qpu?a!^VE@KZ&eBK4Wo^yA$KhlREW4jzY3W zkS_y6l^O#>Lkk1LFQ8Dv3kHT#0|tgy2@DKYGZ+}e3+C(!v;j)6C3(BM0BIoj>AV}H zo3p?pvY3H^_c{nOI%&+V018g?taot?u{gbT%0Z!K1s<30fxrLT`>4;mbWlS=^Q05AW)0`mco7aSM}1^@s6^PqhU00006VoOIv05AZc02>Q`mvxbR7=M#VL_t(I z%e9nI4!|G?L+R%IPwc|JT+jg4Mg3BvtU$YCwP2NI)yJbv=wb-G zI&F^<$i}tuc)u)U&jbMHEHL;}3p4z4U10H30tWw#g%$jefW_Z$!QfX0Uql2>+B_n1 zt7>Ou43bVD3X3R6wzjc26)7u#Vl5<{?L*bezjiswPcR=T3*Q%QGGHTOxgB%>0000< KMNUMnLSTZD Date: Tue, 6 May 2025 20:39:18 +0200 Subject: [PATCH 34/36] Remove the restriction on the reload action on DEM/map dir load "Reload" will now behave like "close" when only the mapdir/DEMs are loaded, but when the DEMs and some other data is opened, reload will help the user to get rid of the DEMs and leave the other data. --- src/GUI/gui.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/GUI/gui.cpp b/src/GUI/gui.cpp index a3f24162..1f3bf9b4 100644 --- a/src/GUI/gui.cpp +++ b/src/GUI/gui.cpp @@ -1075,7 +1075,6 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError) if (url.scheme() == "geo") { if (loadURL(url, showError)) { _fileActionGroup->setEnabled(true); - _reloadFileAction->setEnabled(false); return true; } else if (showError) return false; @@ -1098,8 +1097,6 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError) _browser->setCurrent(path); #endif // Q_OS_ANDROID _fileActionGroup->setEnabled(true); - // Explicitly enable the reload action as it may be disabled by loadMapDir() - _reloadFileAction->setEnabled(true); _navigationActionGroup->setEnabled(true); updateNavigationActions(); @@ -2025,7 +2022,6 @@ void GUI::loadMapDir() _mapDir = fi.absolutePath(); _fileActionGroup->setEnabled(true); - _reloadFileAction->setEnabled(false); } void GUI::clearMapCache() @@ -2087,11 +2083,8 @@ void GUI::showDEMTiles() QMessageBox::information(this, APP_NAME, tr("No local DEM tiles found.")); } else { _mapView->loadDEMs(tiles); - _areaCount += tiles.size(); - _fileActionGroup->setEnabled(true); - _reloadFileAction->setEnabled(false); } } From 70acdd3d96b400bc10dddefe78ede8c8ee515826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 7 May 2025 20:33:16 +0200 Subject: [PATCH 35/36] Added missing buoy/beacon icons --- gpxsee.qrc | 4 ++++ icons/map/marine/beacon-black-white-black.png | Bin 0 -> 275 bytes icons/map/marine/beacon-red-yellow.png | Bin 0 -> 283 bytes icons/map/marine/buoy-black-white-black.png | Bin 0 -> 320 bytes icons/map/marine/buoy-red-yellow.png | Bin 0 -> 340 bytes src/map/ENC/style.cpp | 2 ++ 6 files changed, 6 insertions(+) create mode 100644 icons/map/marine/beacon-black-white-black.png create mode 100644 icons/map/marine/beacon-red-yellow.png create mode 100644 icons/map/marine/buoy-black-white-black.png create mode 100644 icons/map/marine/buoy-red-yellow.png diff --git a/gpxsee.qrc b/gpxsee.qrc index 21e6e8e2..652940ec 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -157,6 +157,7 @@ icons/map/marine/buoy-red-white-red-white.png icons/map/marine/buoy-red-black.png icons/map/marine/buoy-red-green.png + icons/map/marine/buoy-red-yellow.png icons/map/marine/buoy-red-green-red.png icons/map/marine/buoy-red-green-red-green.png icons/map/marine/buoy-yellow.png @@ -167,6 +168,7 @@ icons/map/marine/buoy-yellow-red-yellow.png icons/map/marine/buoy-black-white.png icons/map/marine/buoy-black-red.png + icons/map/marine/buoy-black-white-black.png icons/map/marine/buoy-black-red-black.png icons/map/marine/buoy-black-green.png icons/map/marine/buoy-black-yellow.png @@ -190,6 +192,7 @@ icons/map/marine/beacon-red-white-red-white.png icons/map/marine/beacon-red-black.png icons/map/marine/beacon-red-green.png + icons/map/marine/beacon-red-yellow.png icons/map/marine/beacon-red-green-red.png icons/map/marine/beacon-red-green-red-green.png icons/map/marine/beacon-yellow.png @@ -199,6 +202,7 @@ icons/map/marine/beacon-yellow-black-yellow.png icons/map/marine/beacon-yellow-red-yellow.png icons/map/marine/beacon-black-white.png + icons/map/marine/beacon-black-white-black.png icons/map/marine/beacon-black-red.png icons/map/marine/beacon-black-red-black.png icons/map/marine/beacon-black-green.png diff --git a/icons/map/marine/beacon-black-white-black.png b/icons/map/marine/beacon-black-white-black.png new file mode 100644 index 0000000000000000000000000000000000000000..ea4bbfea728a701fc23467f38d9c6752728ceb5d GIT binary patch literal 275 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yC@{)5S5w;`GxghI|JUc$nXI{ogO~ za+ioEuO_qd*%qeGGmbf}3>VyQe2dtgRIGJkuU_tvPS>?wZc(CV?>DT_tGDS$`tWPA zyhD{;dV^2)*WL!(%5$G`{695Zuij-eO(XM5&#^~IIuVu=Rqoz*w^03m;RVQJ44$rj JF6*2UngE=zTFw9f literal 0 HcmV?d00001 diff --git a/icons/map/marine/beacon-red-yellow.png b/icons/map/marine/beacon-red-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..82ec81b58d1babb1b5fa21aac1bdfea54c901275 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp@KrGI|1|%;mJK6}O7>k44ofvPP)Tsw@SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d72G^}9Gu0R{01Y44~ zy9!vY3r?)vGaKoQOYkH})6mDfR-(Me-=1yHca)5S5w;`G}PN4^6J9NFUE{gm8aCshbpOA9?uthZ8~^|S literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-black-white-black.png b/icons/map/marine/buoy-black-white-black.png new file mode 100644 index 0000000000000000000000000000000000000000..98c3c0184717613eacc4a9223101cb0dd5f434f8 GIT binary patch literal 320 zcmeAS@N?(olHy`uVBq!ia0vp^fQ3Ts-C0rK|Ikbh_(B5Lkjm(!OA0-0=L_)HdSWlbuV|W*x1CwSN7ngW9U@z z)tmU;Gu^sb7qCp{-@sgVmv8=CyFKij>4~3Tifqz$yL^eWZgZM!_oD4fflg%bboFyt I=akR{0GI1$O8@`> literal 0 HcmV?d00001 diff --git a/icons/map/marine/buoy-red-yellow.png b/icons/map/marine/buoy-red-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..a1c2fdc4e42fe7341df39342d5e57b5e89c98d91 GIT binary patch literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^fzK8NfSzaJiF|JuLZHp{9?Vy$y4DchyA)*_I-Q(*5nqHPqgT+wVRu; eH6 Date: Wed, 7 May 2025 22:47:07 +0200 Subject: [PATCH 36/36] Show obstruction/wreck depths --- src/map/ENC/attributes.h | 1 + src/map/ENC/mapdata.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/map/ENC/attributes.h b/src/map/ENC/attributes.h index aec2d38a..7cef6a21 100644 --- a/src/map/ENC/attributes.h +++ b/src/map/ENC/attributes.h @@ -33,6 +33,7 @@ #define TRAFIC 172 #define VALDCO 174 #define VALNMR 178 +#define VALSOU 179 #define VERCLR 181 #define WATLEV 187 diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 7c5d0adf..1819f66c 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -351,6 +351,7 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr, uint HUNI, bool polygon) : _pos(c), _attr(attr), _polygon(polygon) { uint subtype = 0; + bool ok; if (type == HRBFAC) subtype = CATHAF; @@ -442,11 +443,14 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr, _label += "\n(" + QString::fromLatin1(_attr.value(ELEVAT)) + "\xE2\x80\x89m)"; } else if (type == BRIDGE || type == I_BRIDGE) { - double clr = _attr.value(VERCLR).toDouble(); - if (clr > 0) { + double clr = _attr.value(VERCLR).toDouble(&ok); + if (ok && clr > 0) _label = QString::fromUtf8("\xE2\x86\x95") + UNIT_SPACE + QString::number(clr) + UNIT_SPACE + hUnits(HUNI); - } + } else if (type == OBSTRN || type == WRECKS) { + double depth = _attr.value(VALSOU).toDouble(&ok); + if (ok && _label.isEmpty()) + _label = QString::number(depth); } else if (_type == SUBTYPE(RESARE, 8)) { if (_label.isEmpty()) _label = "Degaussing Range";