Changeset - r7673:ae96f5f8bc2f
[Not reviewed]
master
0 1 0
belugas - 17 years ago 2007-10-05 02:21:40
belugas@openttd.org
(svn r11204) -Feature: [NewGRF] Add support for Action 00 for Industries and IndustryTiles.
Thanks to :Csaboka for original concept, specs & help. Dalestan for technical explanations.
Pikkabird & Georges for detailled comments on their grf works. The Alpha testers (You know who you are).
And finally (but not least) Maedhros (newhouses), peter1138(newgrf) Rubidium and glx (numerous and welcome patches)
Remember: it certainly can be buggy. But be sure that behaviour has been tested in TTDP (if you can) before raising a flag.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf.cpp
Show inline comments
 
@@ -4679,97 +4679,97 @@ static void InitializeGRFSpecial()
 

	
 
	_ttdpatch_flags[1] =                                        (0 << 0x07)  // moreairports - based on units of noise
 
	                   |        ((_patches.mammoth_trains ? 1 : 0) << 0x08)  // mammothtrains
 
	                   |                                        (1 << 0x09)  // trainrefit
 
	                   |                                        (0 << 0x0B)  // subsidiaries
 
	                   |       ((_patches.gradual_loading ? 1 : 0) << 0x0C)  // gradualloading
 
	                   |                                        (1 << 0x12)  // unifiedmaglevmode - set bit 0 mode. Not revelant to OTTD
 
	                   |                                        (1 << 0x13)  // unifiedmaglevmode - set bit 1 mode
 
	                   |                                        (1 << 0x14)  // bridgespeedlimits
 
	                   |                                        (1 << 0x16)  // eternalgame
 
	                   |                                        (1 << 0x17)  // newtrains
 
	                   |                                        (1 << 0x18)  // newrvs
 
	                   |                                        (1 << 0x19)  // newships
 
	                   |                                        (1 << 0x1A)  // newplanes
 
	                   |           ((_patches.signal_side ? 1 : 0) << 0x1B)  // signalsontrafficside
 
	                   |                                        (1 << 0x1C); // electrifiedrailway
 

	
 
	_ttdpatch_flags[2] =                                        (1 << 0x01)  // loadallgraphics - obsolote
 
	                   |                                        (1 << 0x03)  // semaphores
 
	                   |                                        (0 << 0x0B)  // enhancedgui
 
	                   |                                        (0 << 0x0C)  // newagerating
 
	                   |       ((_patches.build_on_slopes ? 1 : 0) << 0x0D)  // buildonslopes
 
	                   |         ((_patches.full_load_any ? 1 : 0) << 0x0E)  // fullloadany
 
	                   |                                        (1 << 0x0F)  // planespeed - TODO depends on patch when implemented
 
	                   |                                        (0 << 0x10)  // moreindustriesperclimate - obsolete
 
	                   |                                        (0 << 0x11)  // moretoylandfeatures
 
	                   |                                        (1 << 0x12)  // newstations
 
	                   |                                        (0 << 0x13)  // tracktypecostdiff
 
	                   |                                        (1 << 0x14)  // manualconvert
 
	                   |       ((_patches.build_on_slopes ? 1 : 0) << 0x15)  // buildoncoasts
 
	                   |                                        (1 << 0x16)  // canals
 
	                   |                                        (1 << 0x17)  // newstartyear
 
	                   |    ((_patches.freight_trains > 1 ? 1 : 0) << 0x18)  // freighttrains
 
	                   |                                        (1 << 0x19)  // newhouses
 
	                   |                                        (1 << 0x1A)  // newbridges
 
	                   |                                        (1 << 0x1B)  // newtownnames
 
	                   |                                        (0 << 0x1C)  // moreanimations
 
	                   |    ((_patches.wagon_speed_limits ? 1 : 0) << 0x1D)  // wagonspeedlimits
 
	                   |                                        (1 << 0x1E)  // newshistory
 
	                   |                                        (0 << 0x1F); // custombridgeheads
 

	
 
	_ttdpatch_flags[3] =                                        (0 << 0x00)  // newcargodistribution
 
	                   |                                        (1 << 0x01)  // windowsnap
 
	                   |                                        (0 << 0x02)  // townbuildnoroad
 
	                   |                                        (0 << 0x03)  // pathbasedsignalling. To enable if ever pbs is back
 
	                   |                                        (0 << 0x04)  // aichoosechance
 
	                   |                                        (1 << 0x05)  // resolutionwidth
 
	                   |                                        (1 << 0x06)  // resolutionheight
 
	                   |                                        (0 << 0x07)  // newindustries
 
	                   |                                        (1 << 0x07)  // newindustries
 
	                   |         ((_patches.improved_load ? 1 : 0) << 0x08)  // fifoloading
 
	                   |                                        (0 << 0x09)  // townroadbranchprob
 
	                   |                                        (0 << 0x0A)  // tempsnowline
 
	                   |                                        (1 << 0x0B)  // newcargo
 
	                   |                                        (1 << 0x0C)  // enhancemultiplayer
 
	                   |                                        (1 << 0x0D)  // onewayroads
 
	                   |   ((_patches.nonuniform_stations ? 1 : 0) << 0x0E)  // irregularstations
 
	                   |                                        (1 << 0x0F)  // statistics
 
	                   |                                        (1 << 0x10)  // newsounds
 
	                   |                                        (1 << 0x11)  // autoreplace
 
	                   |                                        (1 << 0x12)  // autoslope
 
	                   |                                        (0 << 0x13)  // followvehicle
 
	                   |                                        (1 << 0x14)  // trams
 
	                   |                                        (0 << 0x15)  // enhancetunnels
 
	                   |                                        (1 << 0x16)  // shortrvs
 
	                   |                                        (1 << 0x17)  // articulatedrvs
 
	                   |                                        (1 << 0x1E); // variablerunningcosts
 
}
 

	
 
static void ResetCustomStations()
 
{
 
	for (GRFFile *file = _first_grffile; file != NULL; file = file->next) {
 
		if (file->stations == NULL) continue;
 
		for (uint i = 0; i < MAX_STATIONS; i++) {
 
			if (file->stations[i] == NULL) continue;
 
			StationSpec *statspec = file->stations[i];
 

	
 
			/* Release renderdata, if it wasn't copied from another custom station spec  */
 
			if (!statspec->copied_renderdata) {
 
				for (uint t = 0; t < statspec->tiles; t++) {
 
					free((void*)statspec->renderdata[t].seq);
 
				}
 
				free(statspec->renderdata);
 
			}
 

	
 
			/* Release platforms and layouts */
 
			if (!statspec->copied_layouts) {
 
				for (uint l = 0; l < statspec->lengths; l++) {
 
					for (uint p = 0; p < statspec->platforms[l]; p++) {
 
						free(statspec->layouts[l][p]);
 
					}
 
					free(statspec->layouts[l]);
 
				}
 
				free(statspec->layouts);
 
				free(statspec->platforms);
 
			}
 

	
 
			/* Release this station */
0 comments (0 inline, 0 general)