--- a/src/network/newgrf_download.cpp Fri Jul 18 21:16:18 2008 +0300
+++ b/src/network/newgrf_download.cpp Fri Jul 18 21:28:42 2008 +0300
@@ -177,24 +177,34 @@
// the NewGRF name
const char *text = (c->name != NULL && !StrEmpty(c->name)) ? c->name : c->filename;
- /* Pick a colour */
+ /*
+ * Pick a colour
+ *
+ * orange - server has it, we don't, haven't checked availablity yet
+ * red - not available
+ * green - available
+ * blue - downloaded
+ */
switch (c->status) {
case GCS_NOT_FOUND:
+ pal = PALETTE_TO_ORANGE;
+ break;
+
case GCS_DISABLED:
pal = PALETTE_TO_RED;
break;
- // XXX: green if downloadable
- case GCS_ACTIVATED:
+ case GCS_AVAILABLE:
pal = PALETTE_TO_GREEN;
break;
- default:
+ default: // GCS_INITIALIZED or GCS_ACTIVATED
pal = PALETTE_TO_BLUE;
break;
}
-
- // XXX: more colour logic that must be fixed...
+
+ /*
+ XXX: flags?
if (pal != PALETTE_TO_RED) {
if (HasBit(c->flags, GCF_STATIC)) {
pal = PALETTE_TO_GREY;
@@ -204,7 +214,8 @@
}
}
-
+ */
+
// draw the square in the chosen colour
DrawSprite(SPR_SQUARE, pal, 5, y + 2);
--- a/src/newgrf_config.h Fri Jul 18 21:16:18 2008 +0300
+++ b/src/newgrf_config.h Fri Jul 18 21:28:42 2008 +0300
@@ -25,13 +25,14 @@
GCS_DISABLED, ///< GRF file is disabled
GCS_NOT_FOUND, ///< GRF file was not found in the local cache
GCS_INITIALISED, ///< GRF file has been initialised
- GCS_ACTIVATED ///< GRF file has been activated
+ GCS_ACTIVATED, ///< GRF file has been activated
+ GCS_AVAILABLE ///< GRF was not found in the local cache, but the download repo has it
};
/** Status of post-gameload GRF compatibility check */
enum GRFListCompatibility{
GLC_ALL_GOOD, ///< All GRF needed by game are present
- GLC_COMPATIBLE, ///< Compatible (eg. the same ID, but different chacksum) GRF found in at least one case
+ GLC_COMPATIBLE, ///< Compatible (eg. the same ID, but different checksum) GRF found in at least one case
GLC_NOT_FOUND ///< At least one GRF couldn't be found (higher priority than GLC_COMPATIBLE)
};