mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 09:04:21 +00:00
Projects/Scene: Implement SceneInitInfo (#796)
This commit is contained in:
parent
62c849bc59
commit
23f87c31d2
|
|
@ -295975,7 +295975,7 @@ Project/Scene/SceneInitInfo.o:
|
|||
label:
|
||||
- _ZN2al13SceneInitInfoC1EPKNS_14GameSystemInfoEPNS_18GameDataHolderBaseEPNS_21ScreenCaptureExecutorEPKciS9_PNS_13AudioDirectorE
|
||||
- _ZN2al13SceneInitInfoC2EPKNS_14GameSystemInfoEPNS_18GameDataHolderBaseEPNS_21ScreenCaptureExecutorEPKciS9_PNS_13AudioDirectorE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
Project/Screen/ScreenCapture.o:
|
||||
'.text':
|
||||
- offset: 0xa7fdf8
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void Scene::initializeAsync(const SceneInitInfo& info) {
|
|||
}
|
||||
|
||||
void Scene::initDrawSystemInfo(const SceneInitInfo& info) {
|
||||
mDrawSystemInfo = info.gameSysInfo->drawSystemInfo;
|
||||
mDrawSystemInfo = info.gameSystemInfo->drawSystemInfo;
|
||||
}
|
||||
|
||||
void Scene::initSceneObjHolder(SceneObjHolder* sceneObjHolder) {
|
||||
|
|
@ -99,7 +99,7 @@ void Scene::initLiveActorKit(const SceneInitInfo& info, s32 maxActors, s32 maxPl
|
|||
s32 maxCameras) {
|
||||
initLiveActorKitImpl(info, maxActors, maxPlayers, maxCameras);
|
||||
|
||||
DrawSystemInfo* drawSystemInfo = info.gameSysInfo->drawSystemInfo;
|
||||
DrawSystemInfo* drawSystemInfo = info.gameSystemInfo->drawSystemInfo;
|
||||
GraphicsInitArg graphicsInitArg = {getSceneDrawContext(this),
|
||||
drawSystemInfo->dockedRenderBuffer};
|
||||
graphicsInitArg._3c = maxCameras;
|
||||
|
|
@ -107,15 +107,15 @@ void Scene::initLiveActorKit(const SceneInitInfo& info, s32 maxActors, s32 maxPl
|
|||
mLiveActorKit->initGraphics(graphicsInitArg);
|
||||
|
||||
mLiveActorKit->getGraphicsSystemInfo()->setApplicationMessageReceiver(
|
||||
info.gameSysInfo->applicationMessageReciever);
|
||||
info.gameSystemInfo->applicationMessageReciever);
|
||||
}
|
||||
|
||||
void Scene::initLiveActorKitImpl(const SceneInitInfo& info, s32 maxActors, s32 maxPlayers,
|
||||
s32 maxCameras) {
|
||||
mLiveActorKit = new LiveActorKit(maxActors, maxPlayers);
|
||||
mLiveActorKit->setSceneDrawContext(getSceneDrawContext(this));
|
||||
mLiveActorKit->setGamePadSystem(info.gameSysInfo->gamePadSystem);
|
||||
mLiveActorKit->setEffectSystem(info.gameSysInfo->effectSystem);
|
||||
mLiveActorKit->setGamePadSystem(info.gameSystemInfo->gamePadSystem);
|
||||
mLiveActorKit->setEffectSystem(info.gameSystemInfo->effectSystem);
|
||||
mLiveActorKit->init(maxCameras);
|
||||
}
|
||||
|
||||
|
|
@ -125,13 +125,13 @@ void Scene::initLiveActorKitWithGraphics(const GraphicsInitArg& graphicsInitArg,
|
|||
initLiveActorKitImpl(info, maxActors, maxPlayers, maxCameras);
|
||||
mLiveActorKit->initGraphics(graphicsInitArg);
|
||||
mLiveActorKit->getGraphicsSystemInfo()->setApplicationMessageReceiver(
|
||||
info.gameSysInfo->applicationMessageReciever);
|
||||
info.gameSystemInfo->applicationMessageReciever);
|
||||
}
|
||||
|
||||
void Scene::initLayoutKit(const SceneInitInfo& info) {
|
||||
mLayoutKit = new LayoutKit(info.gameSysInfo->fontHolder);
|
||||
mLayoutKit->setEffectSystem(info.gameSysInfo->effectSystem);
|
||||
mLayoutKit->setLayoutSystem(info.gameSysInfo->layoutSystem);
|
||||
mLayoutKit = new LayoutKit(info.gameSystemInfo->fontHolder);
|
||||
mLayoutKit->setEffectSystem(info.gameSystemInfo->effectSystem);
|
||||
mLayoutKit->setLayoutSystem(info.gameSystemInfo->layoutSystem);
|
||||
mLayoutKit->setDrawContext(getSceneDrawContext(this));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -198,14 +198,14 @@ void initLayoutInitInfo(LayoutInitInfo* layoutInfo, const Scene* scene,
|
|||
layoutInfo->init(
|
||||
actorKit->getExecuteDirector(), actorKit->getEffectSystem()->getEffectSystemInfo(),
|
||||
scene->getSceneObjHolder(), scene->getAudioDirector(), actorKit->getCameraDirector(),
|
||||
sceneInfo.gameSysInfo->layoutSystem, sceneInfo.gameSysInfo->messageSystem,
|
||||
sceneInfo.gameSysInfo->gamePadSystem, actorKit->getPadRumbleDirector());
|
||||
sceneInfo.gameSystemInfo->layoutSystem, sceneInfo.gameSystemInfo->messageSystem,
|
||||
sceneInfo.gameSystemInfo->gamePadSystem, actorKit->getPadRumbleDirector());
|
||||
} else {
|
||||
layoutInfo->init(layoutKit->getExecuteDirector(),
|
||||
layoutKit->getEffectSystem()->getEffectSystemInfo(),
|
||||
scene->getSceneObjHolder(), scene->getAudioDirector(), nullptr,
|
||||
sceneInfo.gameSysInfo->layoutSystem, sceneInfo.gameSysInfo->messageSystem,
|
||||
sceneInfo.gameSysInfo->gamePadSystem, nullptr);
|
||||
layoutInfo->init(
|
||||
layoutKit->getExecuteDirector(), layoutKit->getEffectSystem()->getEffectSystemInfo(),
|
||||
scene->getSceneObjHolder(), scene->getAudioDirector(), nullptr,
|
||||
sceneInfo.gameSystemInfo->layoutSystem, sceneInfo.gameSystemInfo->messageSystem,
|
||||
sceneInfo.gameSystemInfo->gamePadSystem, nullptr);
|
||||
}
|
||||
|
||||
layoutInfo->setDrawContext(scene->getDrawSystemInfo()->drawContext);
|
||||
|
|
@ -682,8 +682,8 @@ void endCameraPause(PauseCameraCtrl* pauseCameraCtrl) {
|
|||
AudioDirector* initAudioDirectorImpl(Scene* scene, const SceneInitInfo& sceneInfo,
|
||||
AudioDirectorInitInfo& audioDirectorInfo) {
|
||||
audioDirectorInfo.audioSystemInfo =
|
||||
sceneInfo.gameSysInfo->audioSystem ?
|
||||
sceneInfo.gameSysInfo->audioSystem->getAudioSystemInfo() :
|
||||
sceneInfo.gameSystemInfo->audioSystem ?
|
||||
sceneInfo.gameSystemInfo->audioSystem->getAudioSystemInfo() :
|
||||
nullptr;
|
||||
|
||||
if (!audioDirectorInfo.curStage)
|
||||
|
|
@ -739,8 +739,8 @@ void initAudioDirector3D(Scene* scene, const SceneInitInfo& sceneInfo,
|
|||
|
||||
void initSceneAudioKeeper(Scene* scene, const SceneInitInfo& sceneInfo, const char* name) {
|
||||
AudioSystemInfo* audioSystemInfo = nullptr;
|
||||
if (sceneInfo.gameSysInfo->audioSystem)
|
||||
audioSystemInfo = sceneInfo.gameSysInfo->audioSystem->getAudioSystemInfo();
|
||||
if (sceneInfo.gameSystemInfo->audioSystem)
|
||||
audioSystemInfo = sceneInfo.gameSystemInfo->audioSystem->getAudioSystemInfo();
|
||||
|
||||
const char* seUserName = alSeDbFunction::tryFindSceneSeUserName(
|
||||
audioSystemInfo, sceneInfo.initStageName, sceneInfo.scenarioNo);
|
||||
|
|
@ -959,7 +959,7 @@ void stopAllSe(const Scene* scene, u32 index) {
|
|||
}
|
||||
|
||||
void initPadRumble(const Scene* scene, const SceneInitInfo& sceneInfo) {
|
||||
WaveVibrationHolder* waveVibrationHolder = sceneInfo.gameSysInfo->waveVibrationHolder;
|
||||
WaveVibrationHolder* waveVibrationHolder = sceneInfo.gameSystemInfo->waveVibrationHolder;
|
||||
scene->getLiveActorKit()->getPadRumbleDirector()->setWaveVibrationHolder(waveVibrationHolder);
|
||||
|
||||
alAudioSystemFunction::setPadRumbleDirectorForSe(
|
||||
|
|
|
|||
14
lib/al/Project/Scene/SceneInitInfo.cpp
Normal file
14
lib/al/Project/Scene/SceneInitInfo.cpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include "Project/Scene/SceneInitInfo.h"
|
||||
|
||||
namespace al {
|
||||
SceneInitInfo::SceneInitInfo(const GameSystemInfo* gameSystemInfo,
|
||||
GameDataHolderBase* gameDataHolder,
|
||||
ScreenCaptureExecutor* screenCaptureExecutor,
|
||||
const char* initStageName, s32 scenarioNo, const char* initSceneName,
|
||||
AudioDirector* audioDirector)
|
||||
: gameSystemInfo(gameSystemInfo), gameDataHolder(gameDataHolder),
|
||||
screenCaptureExecutor(screenCaptureExecutor), initStageName(initStageName),
|
||||
scenarioNo(scenarioNo), audioDirector(audioDirector) {
|
||||
sceneName = initSceneName;
|
||||
}
|
||||
} // namespace al
|
||||
|
|
@ -1,18 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include <basis/seadTypes.h>
|
||||
#include <prim/seadSafeString.h>
|
||||
|
||||
namespace al {
|
||||
class AudioDirector;
|
||||
struct GameSystemInfo;
|
||||
class GameDataHolderBase;
|
||||
class ScreenCaptureExecutor;
|
||||
class AudioDirector;
|
||||
|
||||
struct SceneInitInfo {
|
||||
struct GameSystemInfo* gameSysInfo;
|
||||
SceneInitInfo(const GameSystemInfo* gameSystemInfo, GameDataHolderBase* gameDataHolder,
|
||||
ScreenCaptureExecutor* screenCaptureExecutor, const char* initStageName,
|
||||
s32 scenarioNo, const char* sceneName, AudioDirector* audioDirector);
|
||||
const GameSystemInfo* gameSystemInfo;
|
||||
GameDataHolderBase* gameDataHolder;
|
||||
char field_10[8];
|
||||
char* initStageName;
|
||||
u32 scenarioNo;
|
||||
char filler[0x218];
|
||||
ScreenCaptureExecutor* screenCaptureExecutor;
|
||||
const char* initStageName;
|
||||
s32 scenarioNo;
|
||||
sead::FixedSafeString<512> sceneName;
|
||||
AudioDirector* audioDirector;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ StageSceneStatePauseMenu::StageSceneStatePauseMenu(
|
|||
|
||||
initNerve(&NrvStageSceneStatePauseMenu.Appear, 4);
|
||||
|
||||
al::GamePadSystem* gamePadSystem = sceneInitInfo.gameSysInfo->gamePadSystem;
|
||||
al::GamePadSystem* gamePadSystem = sceneInitInfo.gameSystemInfo->gamePadSystem;
|
||||
|
||||
mStateStartSeparatePlay = new StageSceneStateStartSeparatePlay(
|
||||
"おすそ分け開始", this, layoutInitInfo, mMenuWipe, gamePadSystem, mFooterParts);
|
||||
|
|
@ -142,7 +142,7 @@ StageSceneStatePauseMenu::StageSceneStatePauseMenu(
|
|||
"オプション画面[ヘルプから遷移]");
|
||||
|
||||
rs::registerGraphicsPresetPause(getHost());
|
||||
mHtmlViewer = sceneInitInfo.gameSysInfo->htmlViewer;
|
||||
mHtmlViewer = sceneInitInfo.gameSystemInfo->htmlViewer;
|
||||
}
|
||||
|
||||
void StageSceneStatePauseMenu::appear() {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ void TitleMenuScene::init(const al::SceneInitInfo& info) {
|
|||
al::initAudioDirector3D(this, info, audioDirectorInitInfo);
|
||||
|
||||
al::initSceneAudioKeeper(this, info, nullptr);
|
||||
alAudioSystemFunction::disableAudioMaximizer(info.gameSysInfo);
|
||||
alAudioSystemFunction::disableAudioMaximizer(info.gameSystemInfo);
|
||||
|
||||
ProjectCameraPoserFactory* projectCameraPoserFactory = new ProjectCameraPoserFactory();
|
||||
al::initCameraDirectorWithoutStageResource(this, projectCameraPoserFactory);
|
||||
|
|
|
|||
Loading…
Reference in a new issue