mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 02:21:15 +00:00
Add transition type to ini (#441)
This commit is contained in:
parent
02dd261ca9
commit
020969c483
@ -96,11 +96,7 @@ IsleApp::IsleApp()
|
||||
m_cdPath = NULL;
|
||||
m_deviceId = NULL;
|
||||
m_savePath = NULL;
|
||||
#ifdef __EMSCRIPTEN__
|
||||
m_fullScreen = FALSE;
|
||||
#else
|
||||
m_fullScreen = TRUE;
|
||||
#endif
|
||||
m_flipSurfaces = FALSE;
|
||||
m_backBuffersInVram = TRUE;
|
||||
m_using8bit = FALSE;
|
||||
@ -140,6 +136,7 @@ IsleApp::IsleApp()
|
||||
m_iniPath = NULL;
|
||||
m_maxLod = RealtimeView::GetUserMaxLOD();
|
||||
m_maxAllowedExtras = m_islandQuality <= 1 ? 10 : 20;
|
||||
m_transitionType = MxTransitionManager::e_mosaic;
|
||||
}
|
||||
|
||||
// FUNCTION: ISLE 0x4011a0
|
||||
@ -726,6 +723,7 @@ MxResult IsleApp::SetupWindow()
|
||||
LegoBuildingManager::configureLegoBuildingManager(m_islandQuality);
|
||||
LegoROI::configureLegoROI(iVar10);
|
||||
LegoAnimationManager::configureLegoAnimationManager(m_maxAllowedExtras);
|
||||
MxTransitionManager::configureMxTransitionManager(m_transitionType);
|
||||
RealtimeView::SetUserMaxLOD(m_maxLod);
|
||||
if (LegoOmni::GetInstance()) {
|
||||
if (LegoOmni::GetInstance()->GetInputManager()) {
|
||||
@ -824,6 +822,7 @@ bool IsleApp::LoadConfig()
|
||||
SDL_snprintf(buf, sizeof(buf), "%f", m_maxLod);
|
||||
iniparser_set(dict, "isle:Max LOD", buf);
|
||||
iniparser_set(dict, "isle:Max Allowed Extras", SDL_itoa(m_maxAllowedExtras, buf, 10));
|
||||
iniparser_set(dict, "isle:Transition Type", SDL_itoa(m_transitionType, buf, 10));
|
||||
|
||||
iniparser_dump_ini(dict, iniFP);
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "New config written at '%s'", iniConfig);
|
||||
@ -853,7 +852,13 @@ bool IsleApp::LoadConfig()
|
||||
strcpy(m_mediaPath, mediaPath);
|
||||
|
||||
m_flipSurfaces = iniparser_getboolean(dict, "isle:Flip Surfaces", m_flipSurfaces);
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
m_fullScreen = FALSE;
|
||||
#else
|
||||
m_fullScreen = iniparser_getboolean(dict, "isle:Full Screen", m_fullScreen);
|
||||
#endif
|
||||
|
||||
m_wideViewAngle = iniparser_getboolean(dict, "isle:Wide View Angle", m_wideViewAngle);
|
||||
m_use3dSound = iniparser_getboolean(dict, "isle:3DSound", m_use3dSound);
|
||||
m_useMusic = iniparser_getboolean(dict, "isle:Music", m_useMusic);
|
||||
@ -880,6 +885,8 @@ bool IsleApp::LoadConfig()
|
||||
m_islandTexture = iniparser_getint(dict, "isle:Island Texture", m_islandTexture);
|
||||
m_maxLod = iniparser_getdouble(dict, "isle:Max LOD", m_maxLod);
|
||||
m_maxAllowedExtras = iniparser_getint(dict, "isle:Max Allowed Extras", m_maxAllowedExtras);
|
||||
m_transitionType =
|
||||
(MxTransitionManager::TransitionType) iniparser_getint(dict, "isle:Transition Type", m_transitionType);
|
||||
|
||||
const char* deviceId = iniparser_getstring(dict, "isle:3D Device ID", NULL);
|
||||
if (deviceId != NULL) {
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "legoutils.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
#include "mxtypes.h"
|
||||
#include "mxvideoparam.h"
|
||||
|
||||
@ -91,6 +92,7 @@ class IsleApp {
|
||||
char* m_iniPath;
|
||||
MxFloat m_maxLod;
|
||||
MxU32 m_maxAllowedExtras;
|
||||
MxTransitionManager::TransitionType m_transitionType;
|
||||
};
|
||||
|
||||
extern IsleApp* g_isle;
|
||||
|
||||
@ -55,6 +55,8 @@ class MxTransitionManager : public MxCore {
|
||||
|
||||
TransitionType GetTransitionType() { return m_mode; }
|
||||
|
||||
LEGO1_EXPORT static void configureMxTransitionManager(TransitionType p_transitionManagerConfig);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1004b9e0
|
||||
// MxTransitionManager::`scalar deleting destructor'
|
||||
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxTransitionManager, 0x900)
|
||||
|
||||
MxTransitionManager::TransitionType g_transitionManagerConfig = MxTransitionManager::e_mosaic;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f4378
|
||||
RECT g_fullScreenRect = {0, 0, 640, 480};
|
||||
|
||||
@ -105,7 +107,7 @@ MxResult MxTransitionManager::StartTransition(
|
||||
backgroundAudioManager->Stop();
|
||||
}
|
||||
|
||||
m_mode = p_animationType;
|
||||
m_mode = g_transitionManagerConfig;
|
||||
|
||||
m_copyFlags.m_bit0 = p_doCopy;
|
||||
|
||||
@ -632,3 +634,8 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC p_ddsc)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void MxTransitionManager::configureMxTransitionManager(TransitionType p_transitionManagerConfig)
|
||||
{
|
||||
g_transitionManagerConfig = p_transitionManagerConfig;
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ configureLegoModelPresenter(MxS32): 'DLL exported function'
|
||||
configureLegoPartPresenter(MxS32, MxS32): 'DLL exported function'
|
||||
configureLegoROI(int): 'DLL exported function'
|
||||
configureLegoWorldPresenter(MxS32): 'DLL exported function'
|
||||
configureMxTransitionManager(TransitionType): 'DLL exported function'
|
||||
GetNoCD_SourceName(): 'DLL exported function'
|
||||
m_3dView: 'Allow this variable name'
|
||||
m_3dManager: 'Allow this variable name'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user