mirror of https://github.com/OpenRCT2/OpenRCT2.git
parent
c5297dfcdd
commit
d7f23bc5bf
|
@ -2774,7 +2774,6 @@ STR_5410 :Edit
|
|||
STR_5411 :Reload
|
||||
STR_5412 :Skip to
|
||||
STR_5413 :Load
|
||||
STR_5414 :Load{MOVE_X}{87}Six Flags Magic Mountain.SC6
|
||||
STR_5415 :Load{MOVE_X}{87}{STRING}
|
||||
STR_5416 :Load{MOVE_X}{87}No save selected
|
||||
STR_5417 :Location
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
- Fix: [#10477] Large Scenery cannot be placed higher using SHIFT.
|
||||
- Fix: [#10489] Hosts last player action not being synchronized.
|
||||
- Fix: [#10543] Secondary shop item prices are not imported correctly from RCT1 saves.
|
||||
- Removed: [#6898] LOADMM and LOADRCT1 title sequence commands (use LOADSC instead).
|
||||
|
||||
0.2.4 (2019-10-28)
|
||||
------------------------------------------------------------------------
|
||||
|
|
|
@ -622,9 +622,8 @@ public:
|
|||
if (_titleSequencePlayer == nullptr)
|
||||
{
|
||||
auto context = GetContext();
|
||||
auto scenarioRepository = context->GetScenarioRepository();
|
||||
auto gameState = context->GetGameState();
|
||||
_titleSequencePlayer = CreateTitleSequencePlayer(*scenarioRepository, *gameState);
|
||||
_titleSequencePlayer = CreateTitleSequencePlayer(*gameState);
|
||||
}
|
||||
return _titleSequencePlayer.get();
|
||||
}
|
||||
|
|
|
@ -45,12 +45,8 @@ using namespace OpenRCT2;
|
|||
class TitleSequencePlayer final : public ITitleSequencePlayer
|
||||
{
|
||||
private:
|
||||
static constexpr const char* SFMM_FILENAME = "Six Flags Magic Mountain.SC6";
|
||||
|
||||
IScenarioRepository& _scenarioRepository;
|
||||
GameState& _gameState;
|
||||
|
||||
size_t _sequenceId = 0;
|
||||
TitleSequence* _sequence = nullptr;
|
||||
int32_t _position = 0;
|
||||
int32_t _waitCounter = 0;
|
||||
|
@ -60,9 +56,8 @@ private:
|
|||
CoordsXY _viewCentreLocation = {};
|
||||
|
||||
public:
|
||||
explicit TitleSequencePlayer(IScenarioRepository& scenarioRepository, GameState& gameState)
|
||||
: _scenarioRepository(scenarioRepository)
|
||||
, _gameState(gameState)
|
||||
explicit TitleSequencePlayer(GameState& gameState)
|
||||
: _gameState(gameState)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -99,7 +94,6 @@ public:
|
|||
|
||||
Eject();
|
||||
_sequence = sequence;
|
||||
_sequenceId = titleSequenceId;
|
||||
|
||||
Reset();
|
||||
return true;
|
||||
|
@ -258,23 +252,6 @@ private:
|
|||
// 25 ms/tick
|
||||
_waitCounter = std::max<int32_t>(1, command->Milliseconds / (uint32_t)GAME_UPDATE_TIME_MS);
|
||||
break;
|
||||
case TITLE_SCRIPT_LOADMM:
|
||||
{
|
||||
const scenario_index_entry* entry = _scenarioRepository.GetByFilename(SFMM_FILENAME);
|
||||
if (entry == nullptr)
|
||||
{
|
||||
Console::Error::WriteLine("%s not found.", SFMM_FILENAME);
|
||||
return false;
|
||||
}
|
||||
|
||||
const utf8* path = entry->path;
|
||||
if (!LoadParkFromFile(path))
|
||||
{
|
||||
Console::Error::WriteLine("Failed to load: \"%s\" for the title sequence.", path);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TITLE_SCRIPT_LOCATION:
|
||||
{
|
||||
int32_t x = command->X * 32 + 16;
|
||||
|
@ -318,32 +295,6 @@ private:
|
|||
}
|
||||
break;
|
||||
}
|
||||
case TITLE_SCRIPT_LOADRCT1:
|
||||
{
|
||||
source_desc sourceDesc;
|
||||
if (!ScenarioSources::TryGetById(command->SaveIndex, &sourceDesc) || sourceDesc.index == -1)
|
||||
{
|
||||
Console::Error::WriteLine("Invalid scenario id.");
|
||||
return false;
|
||||
}
|
||||
|
||||
const utf8* path = nullptr;
|
||||
size_t numScenarios = _scenarioRepository.GetCount();
|
||||
for (size_t i = 0; i < numScenarios; i++)
|
||||
{
|
||||
const scenario_index_entry* scenario = _scenarioRepository.GetByIndex(i);
|
||||
if (scenario && scenario->source_index == sourceDesc.index)
|
||||
{
|
||||
path = scenario->path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (path == nullptr || !LoadParkFromFile(path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TITLE_SCRIPT_LOADSC:
|
||||
{
|
||||
bool loadSuccess = false;
|
||||
|
@ -558,7 +509,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
std::unique_ptr<ITitleSequencePlayer> CreateTitleSequencePlayer(IScenarioRepository& scenarioRepository, GameState& gameState)
|
||||
std::unique_ptr<ITitleSequencePlayer> CreateTitleSequencePlayer(GameState& gameState)
|
||||
{
|
||||
return std::make_unique<TitleSequencePlayer>(scenarioRepository, gameState);
|
||||
return std::make_unique<TitleSequencePlayer>(gameState);
|
||||
}
|
||||
|
|
|
@ -20,5 +20,4 @@ namespace OpenRCT2
|
|||
class GameState;
|
||||
}
|
||||
|
||||
std::unique_ptr<ITitleSequencePlayer> CreateTitleSequencePlayer(
|
||||
IScenarioRepository& scenarioRepository, OpenRCT2::GameState& gameState);
|
||||
std::unique_ptr<ITitleSequencePlayer> CreateTitleSequencePlayer(OpenRCT2::GameState& gameState);
|
||||
|
|
|
@ -955,9 +955,6 @@ static void window_title_editor_scrollpaint_commands(rct_window* w, rct_drawpixe
|
|||
set_format_arg(0, uintptr_t, _editingTitleSequence->Saves[command->SaveIndex]);
|
||||
}
|
||||
break;
|
||||
case TITLE_SCRIPT_LOADMM:
|
||||
commandName = STR_TITLE_EDITOR_COMMAND_LOAD_SFMM;
|
||||
break;
|
||||
case TITLE_SCRIPT_LOCATION:
|
||||
commandName = STR_TITLE_EDITOR_COMMAND_LOCATION;
|
||||
set_format_arg(0, uint16_t, command->X);
|
||||
|
@ -996,18 +993,6 @@ static void window_title_editor_scrollpaint_commands(rct_window* w, rct_drawpixe
|
|||
case TITLE_SCRIPT_END:
|
||||
commandName = STR_TITLE_EDITOR_END;
|
||||
break;
|
||||
case TITLE_SCRIPT_LOADRCT1:
|
||||
{
|
||||
commandName = STR_TITLE_EDITOR_COMMAND_LOAD_FILE;
|
||||
const char* name = "";
|
||||
source_desc desc;
|
||||
if (ScenarioSources::TryGetById(command->SaveIndex, &desc))
|
||||
{
|
||||
name = desc.title;
|
||||
}
|
||||
set_format_arg(0, uintptr_t, name);
|
||||
break;
|
||||
}
|
||||
case TITLE_SCRIPT_LOADSC:
|
||||
{
|
||||
commandName = STR_TITLE_EDITOR_COMMAND_LOAD_FILE;
|
||||
|
|
|
@ -2902,7 +2902,6 @@ enum
|
|||
STR_TITLE_EDITOR_ACTION_RELOAD = 5411, // unused (commented out)
|
||||
STR_TITLE_EDITOR_ACTION_SKIP_TO = 5412,
|
||||
STR_TITLE_EDITOR_ACTION_LOAD = 5413,
|
||||
STR_TITLE_EDITOR_COMMAND_LOAD_SFMM = 5414,
|
||||
STR_TITLE_EDITOR_COMMAND_LOAD_FILE = 5415,
|
||||
STR_TITLE_EDITOR_COMMAND_LOAD_NO_SAVE = 5416,
|
||||
STR_TITLE_EDITOR_COMMAND_TYPE_LOCATION = 5417,
|
||||
|
|
|
@ -453,15 +453,6 @@ static std::vector<TitleCommand> LegacyScriptRead(utf8* script, size_t scriptLen
|
|||
{
|
||||
command.Type = TITLE_SCRIPT_END;
|
||||
}
|
||||
else if (_stricmp(token, "LOADMM") == 0)
|
||||
{
|
||||
command.Type = TITLE_SCRIPT_LOADMM;
|
||||
}
|
||||
else if (_stricmp(token, "LOADRCT1") == 0)
|
||||
{
|
||||
command.Type = TITLE_SCRIPT_LOADRCT1;
|
||||
command.SaveIndex = atoi(part1) & 0xFF;
|
||||
}
|
||||
else if (_stricmp(token, "LOADSC") == 0)
|
||||
{
|
||||
command.Type = TITLE_SCRIPT_LOADSC;
|
||||
|
@ -578,13 +569,6 @@ static std::string LegacyScriptWrite(TitleSequence* seq)
|
|||
const TitleCommand* command = &seq->Commands[i];
|
||||
switch (command->Type)
|
||||
{
|
||||
case TITLE_SCRIPT_LOADMM:
|
||||
sb.Append("LOADMM");
|
||||
break;
|
||||
case TITLE_SCRIPT_LOADRCT1:
|
||||
String::Format(buffer, sizeof(buffer), "LOADRCT1 %u", command->SaveIndex);
|
||||
sb.Append(buffer);
|
||||
break;
|
||||
case TITLE_SCRIPT_LOAD:
|
||||
if (command->SaveIndex == 0xFF)
|
||||
{
|
||||
|
@ -648,9 +632,7 @@ bool TitleSequenceIsLoadCommand(const TitleCommand* command)
|
|||
{
|
||||
switch (command->Type)
|
||||
{
|
||||
case TITLE_SCRIPT_LOADMM:
|
||||
case TITLE_SCRIPT_LOAD:
|
||||
case TITLE_SCRIPT_LOADRCT1:
|
||||
case TITLE_SCRIPT_LOADSC:
|
||||
return true;
|
||||
default:
|
||||
|
|
|
@ -62,7 +62,6 @@ enum TITLE_SCRIPT
|
|||
{
|
||||
TITLE_SCRIPT_UNDEFINED = 0xFF,
|
||||
TITLE_SCRIPT_WAIT = 0,
|
||||
TITLE_SCRIPT_LOADMM,
|
||||
TITLE_SCRIPT_LOCATION,
|
||||
TITLE_SCRIPT_ROTATE,
|
||||
TITLE_SCRIPT_ZOOM,
|
||||
|
@ -73,7 +72,6 @@ enum TITLE_SCRIPT
|
|||
TITLE_SCRIPT_SPEED,
|
||||
TITLE_SCRIPT_LOOP,
|
||||
TITLE_SCRIPT_ENDLOOP,
|
||||
TITLE_SCRIPT_LOADRCT1,
|
||||
TITLE_SCRIPT_LOADSC,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue