aboutsummaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-09 13:06:30 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-09 13:06:30 -0700
commit9e4f9fad19bd4696bf08da67b60ed9d2eb29b446 (patch)
tree762d87bb965705c6d51b89c6abf594e6c5b6bba5 /dive.h
parented3f67bc33fbd9aac819687317d3066c22799f83 (diff)
downloadsubsurface-9e4f9fad19bd4696bf08da67b60ed9d2eb29b446.tar.gz
Store the tag names instead of an opaque number
And as we need the names for that, simplify the way we show the tags in the Dive Info tab (and mark them for translation while we are at it). In the process I renamed the constants to DTAG_ from DTYPE_ (and made their nature as being just bits more obvious). Also mark the box on the Info tab "Dive Tags", not "Dive Type". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/dive.h b/dive.h
index 24f2f37e8..4daa541d5 100644
--- a/dive.h
+++ b/dive.h
@@ -28,18 +28,21 @@
#define SEAWATER_SALINITY 10300
#define FRESHWATER_SALINITY 10000
-/* Dive types definition */
-#define DTYPE_INVALID 1
-#define DTYPE_BOAT 2
-#define DTYPE_SHORE 4
-#define DTYPE_DRIFT 8
-#define DTYPE_DEEP 16
-#define DTYPE_CAVERN 32
-#define DTYPE_ICE 64
-#define DTYPE_WRECK 128
-#define DTYPE_CAVE 256
-#define DTYPE_ALTITUDE 512
-#define DTYPE_POOL 1024
+/* Dive tag definitions */
+#define DTAG_INVALID (1 << 0)
+#define DTAG_BOAT (1 << 1)
+#define DTAG_SHORE (1 << 2)
+#define DTAG_DRIFT (1 << 3)
+#define DTAG_DEEP (1 << 4)
+#define DTAG_CAVERN (1 << 5)
+#define DTAG_ICE (1 << 6)
+#define DTAG_WRECK (1 << 7)
+#define DTAG_CAVE (1 << 8)
+#define DTAG_ALTITUDE (1 << 9)
+#define DTAG_POOL (1 << 10)
+#define DTAG_NR 11
+/* defined in statistics.c */
+extern char *dtag_names[DTAG_NR];
/*
* Some silly typedefs to make our units very explicit.