(svn r14176) -Fix: better 'safe' than ... 'save'

pull/155/head
smatz 16 years ago
parent c805cd6328
commit 6074de33d0

@ -369,7 +369,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
/*
* The "wire"-sprite position is inside the tile, i.e. 0 <= sss->?_offset < TILE_SIZE.
* Therefore it is save to use GetSlopeZ() for the elevation.
* Therefore it is safe to use GetSlopeZ() for the elevation.
* Also note, that the result of GetSlopeZ() is very special for bridge-ramps.
*/
AddSortableSpriteToDraw(sss->image, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,

@ -1521,7 +1521,7 @@ static CommandCost ClearTile_Track(TileIndex tile, byte flags)
/**
* Get surface height in point (x,y)
* On tiles with halftile foundations move (x,y) to a save point wrt. track
* On tiles with halftile foundations move (x,y) to a safe point wrt. track
*/
static uint GetSaveSlopeZ(uint x, uint y, Track track)
{
@ -2519,7 +2519,7 @@ static CommandCost TestAutoslopeOnRailTile(TileIndex tile, uint flags, uint z_ol
{
if (!_settings_game.construction.build_on_slopes || !AutoslopeEnabled()) return CMD_ERROR;
/* Is the slope-rail_bits combination valid in general? I.e. is it save to call GetRailFoundation() ? */
/* Is the slope-rail_bits combination valid in general? I.e. is it safe to call GetRailFoundation() ? */
if (CmdFailed(CheckRailSlope(tileh_new, rail_bits, TRACK_BIT_NONE, tile))) return CMD_ERROR;
/* Get the slopes on top of the foundations */

@ -1601,7 +1601,7 @@ static CommandCost TerraformTile_Road(TileIndex tile, uint32 flags, uint z_new,
case ROAD_TILE_NORMAL: {
RoadBits bits = GetAllRoadBits(tile);
RoadBits bits_copy = bits;
/* Check if the slope-road_bits combination is valid at all, i.e. it is save to call GetRoadFoundation(). */
/* Check if the slope-road_bits combination is valid at all, i.e. it is safe to call GetRoadFoundation(). */
if (!CmdFailed(CheckRoadSlope(tileh_new, &bits_copy, ROAD_NONE, ROAD_NONE))) {
/* CheckRoadSlope() sometimes changes the road_bits, if it does not agree with them. */
if (bits == bits_copy) {

@ -1472,7 +1472,7 @@ static CommandCost TerraformTile_TunnelBridge(TileIndex tile, uint32 flags, uint
uint z_old;
Slope tileh_old = GetTileSlope(tile, &z_old);
/* Check if new slope is valid for bridges in general (so we can savely call GetBridgeFoundation()) */
/* Check if new slope is valid for bridges in general (so we can safely call GetBridgeFoundation()) */
if ((direction == DIAGDIR_NW) || (direction == DIAGDIR_NE)) {
CheckBridgeSlopeSouth(axis, &tileh_old, &z_old);
res = CheckBridgeSlopeSouth(axis, &tileh_new, &z_new);

@ -671,13 +671,13 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
}
#ifdef _M_AMD64
extern "C" void *_get_save_esp();
extern "C" void *_get_safe_esp();
#endif
static void Win32InitializeExceptions()
{
#ifdef _M_AMD64
_safe_esp = _get_save_esp();
_safe_esp = _get_safe_esp();
#else
_asm {
mov _safe_esp, esp

@ -1,7 +1,7 @@
.CODE
PUBLIC _get_save_esp
_get_save_esp:
PUBLIC _get_safe_esp
_get_safe_esp:
MOV RAX,RSP
RET

Loading…
Cancel
Save