Changeset - r13184:d87c98640532
[Not reviewed]
master
0 12 0
smatz - 15 years ago 2009-10-04 20:51:50
smatz@openttd.org
(svn r17701) -Codechange: don't start line with a space if it's not inside comment
12 files changed with 25 insertions and 24 deletions:
0 comments (0 inline, 0 general)
src/ai/ai_scanner.hpp
Show inline comments
 
@@ -66,13 +66,13 @@ public:
 
	/**
 
	 * Rescan the AI dir for scripts.
 
	 */
 
	void RescanAIDir();
 

	
 
#if defined(ENABLE_NETWORK)
 
  bool HasAI(const struct ContentInfo *ci, bool md5sum);
 
	bool HasAI(const struct ContentInfo *ci, bool md5sum);
 
#endif
 
private:
 
	typedef std::map<const char *, class AILibrary *, StringCompare> AILibraryList;
 

	
 
	/**
 
	 * Scan the AI dir for scripts.
src/console.cpp
Show inline comments
 
@@ -309,13 +309,13 @@ void IConsoleVarHookAdd(const char *name
 
	}                                                                            \
 
                                                                               \
 
	if (item_before == NULL) {                                                   \
 
		_base = item_new;                                                          \
 
	} else {                                                                     \
 
		item_before->next = item_new;                                              \
 
  }                                                                            \
 
	}                                                                            \
 
                                                                               \
 
	item_new->next = item;                                                       \
 
	/* END - Alphabetical insert */                                              \
 
}
 

	
 
/**
src/network/network_gui.cpp
Show inline comments
 
@@ -939,13 +939,13 @@ void ShowNetworkGameWindow()
 
	/* Only show once */
 
	if (first) {
 
		first = false;
 
		/* add all servers from the config file to our list */
 
		for (char **iter = _network_host_list.Begin(); iter != _network_host_list.End(); iter++) {
 
			NetworkAddServer(*iter);
 
  }
 
		}
 
	}
 

	
 
	new NetworkGameWindow(&_network_game_window_desc);
 
}
 

	
 
enum {
src/network/network_udp.cpp
Show inline comments
 
@@ -525,13 +525,13 @@ void NetworkUDPAdvertiseThread(void *pnt
 
	_network_udp_mutex->BeginCritical();
 
	if (_udp_master_socket != NULL) _udp_master_socket->SendPacket(&p, &out_addr, true);
 
	_network_udp_mutex->EndCritical();
 
}
 

	
 
/* Register us to the master server
 
     This function checks if it needs to send an advertise */
 
 *   This function checks if it needs to send an advertise */
 
void NetworkUDPAdvertise()
 
{
 
	/* Check if we should send an advertise */
 
	if (!_networking || !_network_server || !_network_udp_server || !_settings_client.network.server_advertise)
 
		return;
 

	
src/pbs.cpp
Show inline comments
 
@@ -127,13 +127,13 @@ bool TryReserveRailTrack(TileIndex tile,
 

	
 
/**
 
 * Lift the reservation of a specific track on a tile
 
 * @param tile the tile
 
 * @param t the track
 
 */
 
 void UnreserveRailTrack(TileIndex tile, Track t)
 
void UnreserveRailTrack(TileIndex tile, Track t)
 
{
 
	assert((GetTileTrackStatus(tile, TRANSPORT_RAIL, 0) & TrackToTrackBits(t)) != 0);
 

	
 
	if (_settings_client.gui.show_track_reservation) {
 
		MarkTileDirtyByTile(tile);
 
	}
src/roadstop.cpp
Show inline comments
 
@@ -15,15 +15,16 @@
 
#include "roadstop_base.h"
 
#include "station_base.h"
 

	
 
RoadStopPool _roadstop_pool("RoadStop");
 
INSTANTIATE_POOL_METHODS(RoadStop)
 

	
 
/** De-Initializes a RoadStops. This includes clearing all slots that vehicles might
 
  * have and unlinks it from the linked list of road stops at the given station
 
  */
 
/**
 
 * De-Initializes RoadStops. This includes clearing all slots that vehicles might
 
 * have and unlinks it from the linked list of road stops at the given station
 
 */
 
RoadStop::~RoadStop()
 
{
 
	if (CleaningPool()) return;
 

	
 
	/* Clear the slot assignment of all vehicles heading for this road stop */
 
	if (this->num_vehicles != 0) {
src/strings.cpp
Show inline comments
 
@@ -532,13 +532,13 @@ static const Units units[] = {
 
 * Convert the given (internal) speed to the display speed.
 
 * @param speed the speed to convert
 
 * @return the converted speed.
 
 */
 
uint ConvertSpeedToDisplaySpeed(uint speed)
 
{
 
 return (speed * units[_settings_game.locale.units].s_m) >> units[_settings_game.locale.units].s_s;
 
	return (speed * units[_settings_game.locale.units].s_m) >> units[_settings_game.locale.units].s_s;
 
}
 

	
 
/**
 
 * Convert the given display speed to the (internal) speed.
 
 * @param speed the speed to convert
 
 * @return the converted speed.
src/table/build_industry.h
Show inline comments
 
@@ -1178,16 +1178,16 @@ enum {
 
 * @param s1   text for closure
 
 * @param s2   text for production up
 
 * @param s3   text for production down
 
 */
 

	
 
#define MI(tbl, sndc, snd, d, pc, ai1, ai2, ai3, ai4, ag1, ag2, ag3, ag4, col, \
 
           c1, c2, c3, proc, p1, r1, p2, r2, m, a1, im1, a2, im2, a3, im3, pr, clim, bev, in, intx, s1, s2, s3) \
 
	 {tbl, lengthof(tbl), (uint8)min(255, d), 0, d, pc, {c1, c2, c3}, proc, {p1, p2}, {r1, r2}, m,            \
 
	 {a1, a2, a3}, {{im1, 0}, {im2, 0}, {im3, 0}}, pr, clim, bev, col, in, intx, s1, s2, s3, STR_UNDEFINED, {ai1, ai2, ai3, ai4}, {ag1, ag2, ag3, ag4}, \
 
	 sndc, snd, 0, 0, true, {INVALID_INDUSTRYTYPE, 0, NULL, NULL, INVALID_INDUSTRYTYPE}}
 
			c1, c2, c3, proc, p1, r1, p2, r2, m, a1, im1, a2, im2, a3, im3, pr, clim, bev, in, intx, s1, s2, s3) \
 
		{tbl, lengthof(tbl), (uint8)min(255, d), 0, d, pc, {c1, c2, c3}, proc, {p1, p2}, {r1, r2}, m, \
 
		{a1, a2, a3}, {{im1, 0}, {im2, 0}, {im3, 0}}, pr, clim, bev, col, in, intx, s1, s2, s3, STR_UNDEFINED, {ai1, ai2, ai3, ai4}, {ag1, ag2, ag3, ag4}, \
 
		sndc, snd, 0, 0, true, {INVALID_INDUSTRYTYPE, 0, NULL, NULL, INVALID_INDUSTRYTYPE}}
 
	/* Format:
 
	   tile table                              count and sounds table
 
	   cost multiplier                         appear chances(4ingame, 4random)  map colour
 
	   cannot be close to these industries (3 times)             check proc
 
	   (produced cargo + rate) (twice)         minimum cargo moved to station
 
	   3 accepted cargo and their corresponding input multiplier
src/table/cargo_const.h
Show inline comments
 
@@ -7,13 +7,13 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file cargo_const.h Table of all default cargo types */
 

	
 
#define MK(bt, label, c, e, f, g, h, fr, te, ks1, ks2, ks3, ks4, ks5, l, m) \
 
          {bt, label, c, c, e, f, {g, h}, fr, te, 0, 0, ks1, ks2, ks3, ks4, ks5, l, m, NULL, NULL, 0}
 
		{bt, label, c, c, e, f, {g, h}, fr, te, 0, 0, ks1, ks2, ks3, ks4, ks5, l, m, NULL, NULL, 0}
 
static const CargoSpec _default_cargo[] = {
 
	MK(  0, 'PASS', 152,  1, 3185,  0,  24, false, TE_PASSENGERS,
 
		STR_CARGO_PLURAL_PASSENGERS,     STR_CARGO_SINGULAR_PASSENGER,      STR_PASSENGERS, STR_QUANTITY_PASSENGERS,   STR_ABBREV_PASSENGERS,
 
		SPR_CARGO_PASSENGER,     CC_PASSENGERS  ),
 

	
 
	MK(  1, 'COAL',  32, 16, 5916,  7, 255, true,  TE_NONE,
src/table/road_land.h
Show inline comments
 
@@ -72,14 +72,14 @@ static const DrawTileSprites _tram_depot
 

	
 
#undef TILE_SEQ_LINE
 
#undef TILE_SEQ_END
 

	
 

	
 
static const SpriteID _road_tile_sprites_1[16] = {
 
	0,     0x546, 0x545, 0x53B, 0x544, 0x534, 0x53E, 0x539,
 
  0x543, 0x53C, 0x535, 0x538, 0x53D, 0x537, 0x53A, 0x536
 
	    0, 0x546, 0x545, 0x53B, 0x544, 0x534, 0x53E, 0x539,
 
	0x543, 0x53C, 0x535, 0x538, 0x53D, 0x537, 0x53A, 0x536
 
};
 

	
 
static const SpriteID _road_frontwire_sprites_1[16] = {
 
	0, 0x54, 0x55, 0x5B, 0x54, 0x54, 0x5E, 0x5A, 0x55, 0x5C, 0x55, 0x58, 0x5D, 0x57, 0x59, 0x56
 
};
 

	
src/video/cocoa/cocoa_v.mm
Show inline comments
 
@@ -243,20 +243,20 @@ static CocoaSubdriver *QZ_CreateWindowSu
 
	ret = QZ_CreateWindowQuickdrawSubdriver(width, height, bpp);
 
	if (ret != NULL) return ret;
 
#endif
 

	
 
#ifdef ENABLE_COCOA_QUARTZ
 
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
 
        /*
 
	/*
 
	 * If we get here we are running 10.4 or earlier and either openttd was compiled without the quickdraw driver
 
	 * or it failed to load for some reason. Fall back to Quartz if possible even though that driver is slower.
 
	 */
 
        if (MacOSVersionIsAtLeast(10, 4, 0)) {
 
                ret = QZ_CreateWindowQuartzSubdriver(width, height, bpp);
 
                if (ret != NULL) return ret;
 
        }
 
	if (MacOSVersionIsAtLeast(10, 4, 0)) {
 
		ret = QZ_CreateWindowQuartzSubdriver(width, height, bpp);
 
		if (ret != NULL) return ret;
 
	}
 
#endif
 
#endif
 

	
 
	return NULL;
 
}
 

	
src/video/cocoa/wnd_quartz.mm
Show inline comments
 
@@ -348,13 +348,13 @@ static CGColorSpaceRef QZ_GetCorrectColo
 
	/* We need an Image in order to do blitting, but as we don't touch the context between this call and drawing no copying will actually be done here */
 
	fullImage = CGBitmapContextCreateImage(driver->cgcontext);
 

	
 
	/* Calculate total area we are blitting */
 
	for (n = 0; n < dirtyRectCount; n++) {
 
		blitArea += dirtyRects[n].size.width * dirtyRects[n].size.height;
 
 	}
 
	}
 

	
 
	/*
 
	 * This might be completely stupid, but in my extremely subjective opinion it feels faster
 
	 * The point is, if we're blitting less than 50% of the dirty rect union then it's still a good idea to blit each dirty
 
	 * rect separately but if we blit more than that, it's just cheaper to blit the entire union in one pass.
 
	 * Feel free to remove or find an even better value than 50% ... / blackis
 
@@ -393,14 +393,14 @@ static CGColorSpaceRef QZ_GetCorrectColo
 
			clipRect.size.height = rect.size.height;
 

	
 
			/* Blit dirty part of image */
 
			clippedImage = CGImageCreateWithImageInRect(fullImage, clipRect);
 
			CGContextDrawImage(viewContext, blitRect, clippedImage);
 
			CGImageRelease(clippedImage);
 
 		}
 
 	}
 
		}
 
	}
 

	
 
	CGImageRelease(fullImage);
 
}
 

	
 
@end
 

	
0 comments (0 inline, 0 general)