Skip to content

Commit

Permalink
Added support Intro playback
Browse files Browse the repository at this point in the history
  • Loading branch information
Belonit committed Aug 17, 2023
1 parent 1090784 commit 6177a97
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Spawner/Spawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
#include <Unsorted.h>
#include <WWMouseClass.h>

void __fastcall PlayMovie_FromID(
const char* movieName,
int queue_theme = -1,
char use_hidden_surface1 = -1,
char stretch_movie = -1,
char use_hidden_surface2 = -1,
char set_state_1 = -1
)
{
JMP_STD(0x5BED40);
}

bool Spawner::Enabled = false;
bool Spawner::Active = false;
std::unique_ptr<SpawnerConfig> Spawner::Config = nullptr;
Expand All @@ -62,6 +74,14 @@ bool Spawner::StartGame()
Spawner::Active = true;
Game::IsActive = true;

if (Config->IsCampaign && strstr(Config->ScenarioName, "PlayIntro->"))
{
PlayMovie_FromID("EA_WWLOGO");
char* introMoveName = Config->ScenarioName - 1 + sizeof("PlayIntro->");
PlayMovie_FromID(introMoveName);
return false;
}

Game::InitUIStuff();
Spawner::LoadSidesStuff();

Expand Down

0 comments on commit 6177a97

Please sign in to comment.