water_map.h
author Darkvater
Thu, 02 Mar 2006 02:22:15 +0000
changeset 3121 2e50f731567a
parent 3111 1edf71aa942e
child 3372 e9eaf986b264
permissions -rw-r--r--
(svn r3726) - [6/6] Finalize conversion, finally save the patches struct.
- Remove the temporary synchronisation in during the map-transfer as this is no longer needed
- The saved patches work just like the saved gameoptions. You have a _patches and a _patches_newgame struct. The _patches_newgame struct contains the values from the configuration file and thus the defaults for new games. When a new game is started or an older game is loaded, the default values are copied over to _patches to be used. When you load a game that has PATS saved, the default values are also loaded, but immediately overwritten by the values from the savegame. This ensures that player-based values are always taken from your personal preferences.
- The current implementation also changes the default values if you change player-based settings in the game. For example changing window_snap_radius in a certain game will also change it for all next OpenTTD sessions.
- The savegame version has been increased to 22.
- The last 6 orso patches close the following reports:
[ 1366446 ] different names for patches: all patch settings have the same name as in the configuration file and are reachable from the console.
[ 1288024 ] Strange string on OTTD initial screen: configuration (and this includes patches) inputs are validated and clamped to their minimum/maximum values.
[ 1423198 ] Make "Signals on Drive side" player, not server, based: this is only visual so current setting is to save it with the savegame but not synchronise in multiplayer.
[ 1208070 ] Patches and New GRF options saved: apart from newgrf this is done
3111
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
     1
/* $Id$ */
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
     2
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
     3
#ifndef WATER_MAP_H
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
     4
#define WATER_MAP_H
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
     5
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
     6
static inline void MakeWater(TileIndex t)
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
     7
{
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
     8
	SetTileType(t, MP_WATER);
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
     9
	SetTileOwner(t, OWNER_WATER);
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    10
	_m[t].m2 = 0;
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    11
	_m[t].m3 = 0;
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    12
	_m[t].m4 = 0;
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    13
	_m[t].m5 = 0;
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    14
}
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    15
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    16
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    17
static inline void MakeShore(TileIndex t)
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    18
{
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    19
	SetTileType(t, MP_WATER);
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    20
	SetTileOwner(t, OWNER_WATER);
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    21
	_m[t].m2 = 0;
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    22
	_m[t].m3 = 0;
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    23
	_m[t].m4 = 0;
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    24
	_m[t].m5 = 1;
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    25
}
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    26
1edf71aa942e (svn r3714) Add functions to turn tiles into water and shore tiles
tron
parents:
diff changeset
    27
#endif