Changeset - r26783:5b5025ad2f5e
[Not reviewed]
master
0 1 0
Rubidium - 23 months ago 2023-01-21 09:08:04
rubidium@openttd.org
Codechange: use MakeSea/AllocateMap in the oldloader instead of MemSetT
1 file changed with 2 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/saveload/oldloader_sl.cpp
Show inline comments
 
@@ -47,9 +47,7 @@ void FixOldMapArray()
 
{
 
	/* TTO/TTD/TTDP savegames could have buoys at tile 0
 
	 * (without assigned station struct) */
 
	MemSetT(&_m[0], 0);
 
	SetTileType(0, MP_WATER);
 
	SetTileOwner(0, OWNER_WATER);
 
	MakeSea(0);
 
}
 

	
 
static void FixTTDMapArray()
 
@@ -1467,8 +1465,7 @@ static bool LoadOldGameDifficulty(Loadga
 
static bool LoadOldMapPart1(LoadgameState *ls, int num)
 
{
 
	if (_savegame_type == SGT_TTO) {
 
		MemSetT(_m, 0, OLD_MAP_SIZE);
 
		MemSetT(_me, 0, OLD_MAP_SIZE);
 
		AllocateMap(OLD_MAP_SIZE, OLD_MAP_SIZE);
 
	}
 

	
 
	for (uint i = 0; i < OLD_MAP_SIZE; i++) {
0 comments (0 inline, 0 general)