src/newgrf.cpp
changeset 10066 f18e97752eeb
parent 10063 29c32eeca86c
child 10208 72c00af5c95d
--- a/src/newgrf.cpp	Tue Sep 02 21:11:48 2008 +0000
+++ b/src/newgrf.cpp	Wed Sep 03 07:51:07 2008 +0000
@@ -3644,11 +3644,7 @@
 		}
 
 		case 0x0D: // TTD Version, 00=DOS, 01=Windows
-			if (_palette_remap_grf[_file_index]) {
-				*value = !_use_palette;
-			} else {
-				*value = _use_palette;
-			}
+			*value = _cur_grfconfig->windows_paletted;
 			return true;
 
 		case 0x0E: // Y-offset for train sprites
@@ -4100,7 +4096,7 @@
 	_cur_grfconfig->status = _cur_stage < GLS_RESERVE ? GCS_INITIALISED : GCS_ACTIVATED;
 
 	/* Do swap the GRFID for displaying purposes since people expect that */
-	DEBUG(grf, 1, "GRFInfo: Loaded GRFv%d set %08lX - %s", version, BSWAP32(grfid), name);
+	DEBUG(grf, 1, "GRFInfo: Loaded GRFv%d set %08lX - %s (palette: %s)", version, BSWAP32(grfid), name, _cur_grfconfig->windows_paletted ? "Windows" : "DOS");
 }
 
 /* Action 0x0A */
@@ -5894,6 +5890,7 @@
 
 	FioOpenFile(file_index, filename);
 	_file_index = file_index; // XXX
+	_palette_remap_grf[_file_index] = (config->windows_paletted != (_use_palette == PAL_WINDOWS));
 
 	_cur_grfconfig = config;