Address review comments, part 1

This commit is contained in:
jonschz 2024-11-01 16:47:50 +01:00
parent 9ae3e78836
commit a065aa10ad
2 changed files with 17 additions and 13 deletions

View File

@ -2,8 +2,10 @@
#include "copter_actions.h"
#include "dunebuggy.h"
#include "dunecar_actions.h"
#include "helicopter.h"
#include "jetski.h"
#include "jetski_actions.h"
#include "jukebox_actions.h"
#include "legocarbuildpresenter.h"
#include "legocontrolmanager.h"
@ -22,16 +24,18 @@
#include "mxticklemanager.h"
#include "mxtransitionmanager.h"
#include "racecar.h"
#include "racecar_actions.h"
#include "scripts.h"
#include <isle.h>
#include <vec.h>
// names and values verified by BETA10 0x1006d742
#define Helicopter_Actor 1
#define DuneBugy_Actor 2
#define Jetski_Actor 3
#define RaceCar_Actor 4
// Names and values verified by BETA10 0x1006d742.
// Note that these were probably hard-coded numbers in the original.
#define Helicopter_Actor CopterScript::c_Helicopter_Actor
#define DuneBugy_Actor DunecarScript::c_DuneBugy_Actor
#define Jetski_Actor JetskiScript::c_Jetski_Actor
#define RaceCar_Actor RacecarScript::c_RaceCar_Actor
DECOMP_SIZE_ASSERT(LegoCarBuild, 0x34c)
DECOMP_SIZE_ASSERT(LegoVehicleBuildState, 0x50)

View File

@ -47,20 +47,20 @@ MxTransitionManager::~MxTransitionManager()
MxResult MxTransitionManager::GetDDrawSurfaceFromVideoManager() // vtable+0x14
{
LegoVideoManager* videoManager = VideoManager();
this->m_ddSurface = videoManager->GetDisplaySurface()->GetDirectDrawSurface2();
m_ddSurface = videoManager->GetDisplaySurface()->GetDirectDrawSurface2();
return SUCCESS;
}
// FUNCTION: LEGO1 0x1004bac0
MxResult MxTransitionManager::Tickle()
{
if (this->m_animationSpeed + this->m_systemTime > timeGetTime()) {
if (m_animationSpeed + m_systemTime > timeGetTime()) {
return SUCCESS;
}
this->m_systemTime = timeGetTime();
m_systemTime = timeGetTime();
switch (this->m_mode) {
switch (m_mode) {
case e_noAnimation:
NoTransition();
break;
@ -94,13 +94,13 @@ MxResult MxTransitionManager::StartTransition(
{
assert(m_mode == e_idle);
if (this->m_mode == e_idle) {
if (m_mode == e_idle) {
if (!p_playMusicInAnim) {
MxBackgroundAudioManager* backgroundAudioManager = BackgroundAudioManager();
backgroundAudioManager->Stop();
}
this->m_mode = p_animationType;
m_mode = p_animationType;
m_copyFlags.m_bit0 = p_doCopy;
@ -113,9 +113,9 @@ MxResult MxTransitionManager::StartTransition(
}
MxU32 time = timeGetTime();
this->m_systemTime = time;
m_systemTime = time;
this->m_animationSpeed = p_speed;
m_animationSpeed = p_speed;
MxTickleManager* tickleManager = TickleManager();
tickleManager->RegisterClient(this, p_speed);