mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-06-17 15:14:09 +00:00
Initialize members to avoid uninitialized member accesses
This commit is contained in:
parent
fe2f8be642
commit
3ae21fd25f
@ -130,6 +130,7 @@ LegoCarBuild::LegoCarBuild()
|
||||
m_destLocation = LegoGameState::e_undefined;
|
||||
m_playingActorScript = DS_NOT_A_STREAM;
|
||||
m_alreadyFinished = 0;
|
||||
m_lastActorScript = 0;
|
||||
NotificationManager()->Register(this);
|
||||
}
|
||||
|
||||
|
||||
@ -331,6 +331,8 @@ LegoAnimationManager::LegoAnimationManager()
|
||||
m_animState = NULL;
|
||||
m_unk0x424 = NULL;
|
||||
|
||||
::memset(m_extras, 0, sizeof(m_extras));
|
||||
|
||||
Init();
|
||||
|
||||
NotificationManager()->Register(this);
|
||||
|
||||
@ -439,10 +439,11 @@ void LegoWorldPresenter::ParseExtra()
|
||||
extraCopy[extraLength] = '\0';
|
||||
|
||||
char output[1024];
|
||||
output[0] = '\0';
|
||||
if (KeyValueStringParse(output, g_strWORLD, extraCopy)) {
|
||||
char* worldKey = strtok(output, g_parseExtraTokens);
|
||||
LoadWorld(worldKey, (LegoWorld*) m_entity);
|
||||
((LegoWorld*) m_entity)->SetWorldId(Lego()->GetWorldId(worldKey));
|
||||
LoadWorld(worldKey, static_cast<LegoWorld*>(m_entity));
|
||||
static_cast<LegoWorld*>(m_entity)->SetWorldId(Lego()->GetWorldId(worldKey));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,9 +80,9 @@ MxResult Hospital::Create(MxDSAction& p_dsAction)
|
||||
|
||||
SetIsWorldActive(FALSE);
|
||||
|
||||
m_hospitalState = (HospitalState*) GameState()->GetState("HospitalState");
|
||||
m_hospitalState = static_cast<HospitalState*>(GameState()->GetState("HospitalState"));
|
||||
if (!m_hospitalState) {
|
||||
m_hospitalState = (HospitalState*) GameState()->CreateState("HospitalState");
|
||||
m_hospitalState = static_cast<HospitalState*>(GameState()->CreateState("HospitalState"));
|
||||
m_hospitalState->m_state = HospitalState::e_newState;
|
||||
}
|
||||
else if (m_hospitalState->m_state == HospitalState::e_unknown4) {
|
||||
@ -676,6 +676,7 @@ MxBool Hospital::Escape()
|
||||
// FUNCTION: LEGO1 0x10076370
|
||||
HospitalState::HospitalState()
|
||||
{
|
||||
m_state = e_newState;
|
||||
m_stateActor = 0;
|
||||
m_statePepper = 0;
|
||||
m_stateMama = 0;
|
||||
|
||||
@ -15,6 +15,8 @@ DECOMP_SIZE_ASSERT(MxDiskStreamController, 0xc8);
|
||||
// FUNCTION: LEGO1 0x100c7120
|
||||
MxDiskStreamController::MxDiskStreamController()
|
||||
{
|
||||
m_unk0xc4 = FALSE;
|
||||
m_unk0x70 = FALSE;
|
||||
m_unk0x8c = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -234,10 +234,10 @@ HRESULT FrameBufferImpl::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
||||
}
|
||||
|
||||
m_palette = lpDDPalette;
|
||||
SDL_SetSurfacePalette(m_transferBuffer->m_surface, ((DirectDrawPaletteImpl*) m_palette)->m_palette);
|
||||
SDL_SetSurfacePalette(m_transferBuffer->m_surface, static_cast<DirectDrawPaletteImpl*>(m_palette)->m_palette);
|
||||
|
||||
if (DDRenderer) {
|
||||
DDRenderer->SetPalette(((DirectDrawPaletteImpl*) m_palette)->m_palette);
|
||||
DDRenderer->SetPalette(static_cast<DirectDrawPaletteImpl*>(m_palette)->m_palette);
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
|
||||
@ -84,10 +84,10 @@ class OpenGLES2Renderer : public Direct3DRMRenderer {
|
||||
SDL_GLContext m_context;
|
||||
float m_anisotropic;
|
||||
GLuint m_fbo;
|
||||
GLuint m_colorTarget;
|
||||
GLuint m_depthTarget;
|
||||
GLuint m_shaderProgram;
|
||||
GLuint m_dummyTexture;
|
||||
GLuint m_colorTarget = 0;
|
||||
GLuint m_depthTarget = 0;
|
||||
GLuint m_shaderProgram = 0;
|
||||
GLuint m_dummyTexture = 0;
|
||||
GLint m_posLoc;
|
||||
GLint m_normLoc;
|
||||
GLint m_texLoc;
|
||||
|
||||
@ -93,13 +93,13 @@ class OpenGLES3Renderer : public Direct3DRMRenderer {
|
||||
SDL_GLContext m_context;
|
||||
uint32_t m_msaa;
|
||||
float m_anisotropic;
|
||||
GLuint m_fbo;
|
||||
GLuint m_resolveFBO;
|
||||
GLuint m_colorTarget;
|
||||
GLuint m_fbo = 0;
|
||||
GLuint m_resolveFBO = 0;
|
||||
GLuint m_colorTarget = 0;
|
||||
GLuint m_resolveColor = 0;
|
||||
GLuint m_depthTarget;
|
||||
GLuint m_shaderProgram;
|
||||
GLuint m_dummyTexture;
|
||||
GLuint m_depthTarget = 0;
|
||||
GLuint m_shaderProgram = 0;
|
||||
GLuint m_dummyTexture = 0;
|
||||
GLint m_posLoc;
|
||||
GLint m_normLoc;
|
||||
GLint m_texLoc;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user