Changeset - r26785:0936afca6ca7
[Not reviewed]
master
0 2 0
Rubidium - 17 months ago 2023-01-21 09:31:31
rubidium@openttd.org
Codechange: use MapLogY() instead of FindFirstBit(MapSizeY()), MapSize() instead of MapSizeX() * MapSizeY()
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/console_cmds.cpp
Show inline comments
 
@@ -1144,7 +1144,7 @@ DEF_CONSOLE_CMD(ConRestart)
 

	
 
	/* Don't copy the _newgame pointers to the real pointers, so call SwitchToMode directly */
 
	_settings_game.game_creation.map_x = MapLogX();
 
	_settings_game.game_creation.map_y = FindFirstBit(MapSizeY());
 
	_settings_game.game_creation.map_y = MapLogY();
 
	_switch_mode = SM_RESTARTGAME;
 
	return true;
 
}
 
@@ -1161,7 +1161,7 @@ DEF_CONSOLE_CMD(ConReload)
 

	
 
	/* Don't copy the _newgame pointers to the real pointers, so call SwitchToMode directly */
 
	_settings_game.game_creation.map_x = MapLogX();
 
	_settings_game.game_creation.map_y = FindFirstBit(MapSizeY());
 
	_settings_game.game_creation.map_y = MapLogY();
 
	_switch_mode = SM_RELOADGAME;
 
	return true;
 
}
src/landscape.cpp
Show inline comments
 
@@ -1536,7 +1536,7 @@ static uint CalculateCoverageLine(uint c
 
	}
 

	
 
	/* The amount of land we have is the map size minus the first (sea) layer. */
 
	uint land_tiles = MapSizeX() * MapSizeY() - histogram[0];
 
	uint land_tiles = MapSize() - histogram[0];
 
	int best_score = land_tiles;
 

	
 
	/* Our goal is the coverage amount of the land-mass. */
0 comments (0 inline, 0 general)