Merge branch 'master' into enhanced_viewport_overlay

Conflicts:
	src/road_gui.cpp
	src/widgets/dropdown.cpp
This commit is contained in:
Jonathan G Rennison
2015-08-11 21:41:41 +01:00
78 changed files with 6613 additions and 622 deletions

View File

@@ -30,7 +30,7 @@ ScriptExecMode::ScriptExecMode()
this->SetDoCommandMode(&ScriptExecMode::ModeProc, this);
}
ScriptExecMode::~ScriptExecMode()
void ScriptExecMode::FinalRelease()
{
if (this->GetDoCommandModeInstance() != this) {
/* Ignore this error if the script already died. */
@@ -38,5 +38,9 @@ ScriptExecMode::~ScriptExecMode()
throw Script_FatalError("ScriptExecMode object was removed while it was not the latest *Mode object created.");
}
}
}
ScriptExecMode::~ScriptExecMode()
{
this->SetDoCommandMode(this->last_mode, this->last_instance);
}

View File

@@ -46,6 +46,8 @@ public:
* in when the instance was created.
*/
~ScriptExecMode();
virtual void FinalRelease();
};
#endif /* SCRIPT_EXECMODE_HPP */

View File

@@ -371,8 +371,8 @@ static bool NormaliseTileOffset(int32 *tile)
if (!::IsValidTile(tile) || !::IsValidTile(start) || !::IsValidTile(end)) return -1;
if (::DistanceManhattan(tile, start) != 1 || ::DistanceManhattan(tile, end) != 1) return -1;
/* ROAD_NW ROAD_SW ROAD_SE ROAD_NE */
static const TileIndex neighbours[] = {::TileDiffXY(0, -1), ::TileDiffXY(1, 0), ::TileDiffXY(0, 1), ::TileDiffXY(-1, 0)};
/* ROAD_NW ROAD_SW ROAD_SE ROAD_NE */
static const TileIndexDiff neighbours[] = {::TileDiffXY(0, -1), ::TileDiffXY(1, 0), ::TileDiffXY(0, 1), ::TileDiffXY(-1, 0)};
Array *existing = (Array*)alloca(sizeof(Array) + lengthof(neighbours) * sizeof(int32));
existing->size = 0;

View File

@@ -30,7 +30,7 @@ ScriptTestMode::ScriptTestMode()
this->SetDoCommandMode(&ScriptTestMode::ModeProc, this);
}
ScriptTestMode::~ScriptTestMode()
void ScriptTestMode::FinalRelease()
{
if (this->GetDoCommandModeInstance() != this) {
/* Ignore this error if the script already died. */
@@ -38,5 +38,9 @@ ScriptTestMode::~ScriptTestMode()
throw Script_FatalError("Testmode object was removed while it was not the latest *Mode object created.");
}
}
}
ScriptTestMode::~ScriptTestMode()
{
this->SetDoCommandMode(this->last_mode, this->last_instance);
}

View File

@@ -48,6 +48,8 @@ public:
* in when the instance was created.
*/
~ScriptTestMode();
virtual void FinalRelease();
};
#endif /* SCRIPT_TESTMODE_HPP */