metaforce/Runtime/MP1/CFrontEndUI.cpp

158 lines
3.5 KiB
C++
Raw Normal View History

2015-08-27 00:23:46 +00:00
#include "CFrontEndUI.hpp"
2016-09-16 20:18:03 +00:00
#include "CArchitectureMessage.hpp"
#include "CArchitectureQueue.hpp"
#include "CDvdFile.hpp"
#include "CSimplePool.hpp"
#include "GameGlobalObjects.hpp"
#include "MP1.hpp"
#include "CSlideShow.hpp"
2015-08-27 00:23:46 +00:00
2016-03-04 23:04:53 +00:00
namespace urde
2015-08-27 00:23:46 +00:00
{
namespace MP1
{
2016-09-16 20:18:03 +00:00
SObjectTag g_DefaultWorldTag = {FOURCC('MLVL'), 0x158efe17};
CFrontEndUI::CFrontEndUI(CArchitectureQueue& queue)
2016-08-05 23:48:53 +00:00
: CIOWin("FrontEndUI")
{
2016-09-16 20:18:03 +00:00
x20_depsGroup = g_SimplePool->GetObj("FrontEnd_DGRP");
x38_pressStart = g_SimplePool->GetObj("TXTR_PressStart");
x44_frontendAudioGrp = g_SimplePool->GetObj("FrontEnd_AGSC");
g_Main->ResetGameState();
g_GameState->SetCurrentWorldId(g_DefaultWorldTag.id);
for (int i=0 ; CDvdFile::FileExists(GetAttractMovieFileName(i).c_str()) ; ++i)
++xc0_attractCount;
2016-08-05 23:48:53 +00:00
}
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnSliderSelectionChange(CGuiSliderGroup* grp, float)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnCheckBoxSelectionChange(CGuiTableGroup* grp)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnOptionSubMenuCancel(CGuiTableGroup* grp)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnOptionsMenuCancel(CGuiTableGroup* grp)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnNewGameMenuCancel(CGuiTableGroup* grp)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnFileMenuCancel(CGuiTableGroup* grp)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnGenericMenuSelectionChange(CGuiTableGroup* grp, int, int)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnOptionsMenuAdvance(CGuiTableGroup* grp)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnNewGameMenuAdvance(CGuiTableGroup* grp)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnFileMenuAdvance(CGuiTableGroup* grp)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::OnMainMenuAdvance(CGuiTableGroup* grp)
{}
2016-09-16 20:18:03 +00:00
void CFrontEndUI::StartSlideShow(CArchitectureQueue& queue)
{
queue.Push(std::move(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, new CSlideShow())));
}
std::string CFrontEndUI::GetAttractMovieFileName(int idx)
{
return hecl::Format("Video/attract%d.thp", idx);
}
std::string CFrontEndUI::GetNextAttractMovieFileName()
{
2016-09-17 06:40:45 +00:00
std::string ret = GetAttractMovieFileName(xbc_nextAttract);
2016-09-16 20:18:03 +00:00
xbc_nextAttract = (xbc_nextAttract + 1) % xc0_attractCount;
2016-09-17 06:40:45 +00:00
return ret;
2016-09-16 20:18:03 +00:00
}
2015-08-27 00:23:46 +00:00
void CFrontEndUI::SetCurrentMovie(EMenuMovie movie)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::StopAttractMovie()
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::StartAttractMovie(int idx)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::UpdateMenuHighlights(CGuiTableGroup* grp)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::CompleteStateTransition()
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
bool CFrontEndUI::CanBuild(const SObjectTag& tag)
2016-09-16 20:18:03 +00:00
{
return false;
}
2015-08-27 00:23:46 +00:00
void CFrontEndUI::StartStateTransition(EScreen screen)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::HandleDebugMenuReturnValue(CGameDebug::EReturnValue val, CArchitectureQueue& queue)
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::Draw() const
2016-09-16 20:18:03 +00:00
{
printf("DRAW\n");
}
2015-08-27 00:23:46 +00:00
void CFrontEndUI::UpdateMovies(float dt)
{}
2016-09-16 20:18:03 +00:00
void CFrontEndUI::ProcessUserInput(const CFinalInput& input, CArchitectureQueue& queue)
{
}
CIOWin::EMessageReturn CFrontEndUI::Update(float dt, CArchitectureQueue& queue)
{
printf("UPDATE\n");
return EMessageReturn::Exit;
}
2015-08-27 00:23:46 +00:00
CIOWin::EMessageReturn CFrontEndUI::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue)
2016-09-16 20:18:03 +00:00
{
switch (msg.GetType())
{
case EArchMsgType::UserInput:
{
const CArchMsgParmUserInput& input = MakeMsg::GetParmUserInput(msg);
ProcessUserInput(input.x4_parm, queue);
break;
}
case EArchMsgType::TimerTick:
{
float dt = MakeMsg::GetParmTimerTick(msg).x4_parm;
return Update(dt, queue);
}
case EArchMsgType::QuitGameplay:
{
x14_phase = Phase::Six;
break;
}
default: break;
}
return EMessageReturn::Normal;
}
2015-08-27 00:23:46 +00:00
void CFrontEndUI::StartGame()
{}
2016-09-16 20:18:03 +00:00
2015-08-27 00:23:46 +00:00
void CFrontEndUI::InitializeFrame()
{}
}
}