Improve S4 / S6 import initialisation

This commit is contained in:
Ted John 2017-01-23 13:00:46 +00:00
parent a0fc01d54e
commit 3379143011
3 changed files with 9 additions and 2 deletions

View File

@ -1434,7 +1434,6 @@ private:
}
// Awards
award_reset();
for (sint32 i = 0; i < RCT12_MAX_AWARDS; i++)
{
rct12_award * src = &_s4.awards[i];

View File

@ -161,6 +161,8 @@ void S6Importer::LoadScenario(SDL_RWops *rw)
void S6Importer::Import()
{
Initialise();
// _s6.header
gS6Info = _s6.info;
@ -267,7 +269,6 @@ void S6Importer::Import()
memcpy(gPeepWarningThrottle, _s6.peep_warning_throttle, sizeof(_s6.peep_warning_throttle));
// Awards
award_reset();
for (sint32 i = 0; i < RCT12_MAX_AWARDS; i++)
{
rct12_award * src = &_s6.awards[i];
@ -389,6 +390,11 @@ void S6Importer::Import()
}
}
void S6Importer::Initialise()
{
game_init_all(_s6.map_size);
}
extern "C"
{
/**

View File

@ -43,4 +43,6 @@ private:
const utf8 * _s6Path = nullptr;
rct_s6_data _s6;
uint8 _gameVersion = 0;
void Initialise();
};