Changeset - r15630:3f138941b535
[Not reviewed]
master
0 5 1
rubidium - 14 years ago 2010-08-02 15:29:31
rubidium@openttd.org
(svn r20305) -Change: reduce OpenTTD's install size by roughly 460 KiB by only providing the "extra" base graphics in one palette and doing the conversion upon loading; the conversion has existed for a while, but now the NewGRF can tell its palette using Action 14 thus it can enable the conversion for only that NewGRF.
6 files changed with 15 insertions and 9 deletions:
0 comments (0 inline, 0 general)
.gitignore
Show inline comments
 
@@ -5,8 +5,7 @@ bin/ai/*
 
!bin/ai/regression
 
!bin/data
 
bin/data/*
 
!bin/data/openttdd.grf
 
!bin/data/openttdw.grf
 
!bin/data/openttd.grf
 
!bin/data/opntitle.dat
 
!bin/data/orig_*.obg
 
!bin/data/orig_*.obs
bin/data/openttd.grf
Show inline comments
 
new file 100644
 
binary diff not shown
bin/data/orig_dos.obg
Show inline comments
 
@@ -47,7 +47,7 @@ logos        = TRGI.GRF
 
arctic       = TRGC.GRF
 
tropical     = TRGH.GRF
 
toyland      = TRGT.GRF
 
extra        = OPENTTDD.GRF
 
extra        = OPENTTD.GRF
 

	
 
[md5s]
 
TRG1.GRF     = 9311676280e5b14077a8ee41c1b42192
 
@@ -55,7 +55,7 @@ TRGI.GRF     = da6a6c9dcc451eec88d792114
 
TRGC.GRF     = ed446637e034104c5559b32c18afe78d
 
TRGH.GRF     = ee6616fb0e6ef6b24892c58c93d86fc9
 
TRGT.GRF     = e30e8a398ae86c03dc534a8ac7dfb3b6
 
OPENTTDD.GRF = 177d3eeda710bb6f1b93955fdd3754fa
 
OPENTTD.GRF  = fd012338722d33a311cfbaf1d1ad2ef5
 

	
 
[origin]
 
default      = You can find it on your Transport Tycoon Deluxe CD-ROM.
bin/data/orig_dos_de.obg
Show inline comments
 
@@ -47,7 +47,7 @@ logos        = TRGI.GRF
 
arctic       = TRGC.GRF
 
tropical     = TRGH.GRF
 
toyland      = TRGT.GRF
 
extra        = OPENTTDD.GRF
 
extra        = OPENTTD.GRF
 

	
 
[md5s]
 
TRG1.GRF     = 9311676280e5b14077a8ee41c1b42192
 
@@ -55,7 +55,7 @@ TRGI.GRF     = da6a6c9dcc451eec88d792114
 
TRGC.GRF     = ed446637e034104c5559b32c18afe78d
 
TRGH.GRF     = ee6616fb0e6ef6b24892c58c93d86fc9
 
TRGT.GRF     = fcde1d7e8a74197d72a62695884b909e
 
OPENTTDD.GRF = 177d3eeda710bb6f1b93955fdd3754fa
 
OPENTTD.GRF  = fd012338722d33a311cfbaf1d1ad2ef5
 

	
 
[origin]
 
default      = You can find it on your Transport Tycoon Deluxe CD-ROM.
bin/data/orig_win.obg
Show inline comments
 
@@ -47,7 +47,7 @@ logos        = TRGIR.GRF
 
arctic       = TRGCR.GRF
 
tropical     = TRGHR.GRF
 
toyland      = TRGTR.GRF
 
extra        = OPENTTDW.GRF
 
extra        = OPENTTD.GRF
 

	
 
[md5s]
 
TRG1R.GRF    = b04ce593d8c5016e07473a743d7d3358
 
@@ -55,7 +55,7 @@ TRGIR.GRF    = 0c2484ff6be49fc63a83be6ab
 
TRGCR.GRF    = 3668f410c761a050b5e7095a2b14879b
 
TRGHR.GRF    = 06bf2b7a31766f048baac2ebe43457b1
 
TRGTR.GRF    = de53650517fe661ceaa3138c6edb0eb8
 
OPENTTDW.GRF = 7f67abbead5b77b86c375d4f9a7b1a29
 
OPENTTD.GRF  = fd012338722d33a311cfbaf1d1ad2ef5
 

	
 
[origin]
 
default      = You can find it on your Transport Tycoon Deluxe CD-ROM.
src/gfxinit.cpp
Show inline comments
 
@@ -179,8 +179,15 @@ static void LoadSpriteTables()
 
	 */
 
	GRFConfig *top = _grfconfig;
 
	GRFConfig *master = new GRFConfig(used_set->files[GFT_EXTRA].filename);
 

	
 
	/* We know the palette of the base set, so if the base NewGRF is not
 
	 * setting one, use the palette of the base set and not the global
 
	 * one which might be the wrong palette for this base NewGRF. */
 
	PaletteType old_palette_type = _use_palette;
 
	_use_palette = used_set->palette;
 
	FillGRFDetails(master, false);
 
	master->palette = (used_set->palette == PAL_WINDOWS) ? GRFP_USE_WINDOWS : GRFP_USE_DOS;
 
	_use_palette = old_palette_type;
 

	
 
	ClrBit(master->flags, GCF_INIT_ONLY);
 
	master->next = top;
 
	_grfconfig = master;
0 comments (0 inline, 0 general)