Implement/match Ambulance::HandlePathStruct (#1029)

* Implement/match Ambulance::HandlePathStruct

* Add annotation
This commit is contained in:
Christian Semmler
2024-06-13 14:10:19 -04:00
committed by GitHub
parent cf7246ac6c
commit bbc304ce46
41 changed files with 371 additions and 224 deletions

View File

@@ -58,7 +58,7 @@ MxLong ElevatorBottom::Notify(MxParam& p_param)
LegoWorld::Notify(p_param);
if (m_worldStarted) {
switch (((MxNotificationParam&) p_param).GetType()) {
switch (((MxNotificationParam&) p_param).GetNotification()) {
case c_notificationControl:
ret = HandleControl((LegoControlManagerEvent&) p_param);
break;

View File

@@ -61,7 +61,7 @@ MxLong InfocenterDoor::Notify(MxParam& p_param)
LegoWorld::Notify(p_param);
if (m_worldStarted) {
switch (((MxNotificationParam&) p_param).GetType()) {
switch (((MxNotificationParam&) p_param).GetNotification()) {
case c_notificationEndAction:
if (((MxEndActionNotificationParam&) p_param).GetAction()->GetAtomId() == m_atom) {
BackgroundAudioManager()->RaiseVolume();

View File

@@ -18,6 +18,7 @@
#include "legoinputmanager.h"
#include "legomain.h"
#include "legonamedtexture.h"
#include "legopathstruct.h"
#include "legoutils.h"
#include "legovariables.h"
#include "legovideomanager.h"
@@ -29,7 +30,6 @@
#include "mxnotificationmanager.h"
#include "mxstillpresenter.h"
#include "mxtransitionmanager.h"
#include "mxtype19notificationparam.h"
#include "mxvariabletable.h"
#include "pizza.h"
#include "pizzeria.h"
@@ -167,8 +167,8 @@ MxLong Isle::Notify(MxParam& p_param)
break;
}
break;
case c_notificationType19:
result = HandleType19Notification((MxType19NotificationParam&) p_param);
case c_notificationPathStruct:
result = HandlePathStruct((LegoPathStructEvent&) p_param);
break;
case c_notificationType20:
Enable(TRUE);
@@ -469,7 +469,7 @@ void Isle::UpdateGlobe()
}
// FUNCTION: LEGO1 0x100315f0
MxLong Isle::HandleType19Notification(MxType19NotificationParam& p_param)
MxLong Isle::HandlePathStruct(LegoPathStructEvent& p_param)
{
MxLong result = 0;
@@ -495,7 +495,8 @@ MxLong Isle::HandleType19Notification(MxType19NotificationParam& p_param)
}
if (result == 0) {
switch (p_param.GetUnknown0x0c()) {
// These values correspond to certain paths on the island
switch (p_param.GetData()) {
case 0x12c:
AnimationManager()->FUN_10064670(NULL);
result = 1;

View File

@@ -103,7 +103,7 @@ MxLong RegistrationBook::Notify(MxParam& p_param)
LegoWorld::Notify(p_param);
if (m_worldStarted) {
switch (((MxNotificationParam&) p_param).GetType()) {
switch (((MxNotificationParam&) p_param).GetNotification()) {
case c_notificationEndAction:
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
break;
@@ -117,7 +117,7 @@ MxLong RegistrationBook::Notify(MxParam& p_param)
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationType19:
case c_notificationPathStruct:
result = HandleNotification19(p_param);
break;
case c_notificationTransitioned:

View File

@@ -266,21 +266,21 @@ void Score::Paint()
m_surface = (MxU8*) desc.lpSurface;
for (MxU8 actor = 1; actor <= 5; actor++) {
MxU16 score;
MxS16 score;
score = carRaceState ? carRaceState->GetState(actor)->GetScore() : 0;
score = carRaceState ? carRaceState->GetState(actor)->GetHighScore() : 0;
FillArea(0, actor - 1, score);
score = jetskiRaceState ? jetskiRaceState->GetState(actor)->GetScore() : 0;
score = jetskiRaceState ? jetskiRaceState->GetState(actor)->GetHighScore() : 0;
FillArea(1, actor - 1, score);
score = pizzaMissionState ? pizzaMissionState->GetScore(actor) : 0;
score = pizzaMissionState ? pizzaMissionState->GetHighScore(actor) : 0;
FillArea(2, actor - 1, score);
score = towTrackMissionState ? towTrackMissionState->GetScore(actor) : 0;
score = towTrackMissionState ? towTrackMissionState->GetHighScore(actor) : 0;
FillArea(3, actor - 1, score);
score = ambulanceMissionState ? ambulanceMissionState->GetScore(actor) : 0;
score = ambulanceMissionState ? ambulanceMissionState->GetHighScore(actor) : 0;
FillArea(4, actor - 1, score);
}
@@ -299,14 +299,14 @@ void Score::FillArea(MxU32 i_activity, MxU32 i_actor, MxS16 score)
MxS32 local14[] = {0x2a, 0x27, 0x29, 0x29, 0x2a};
MxS32 local50[] = {0x2f, 0x56, 0x81, 0xaa, 0xd4};
MxS32 local28[] = {0x25, 0x29, 0x27, 0x28, 0x28};
MxS32 local60[] = {0x11, 0x0f, 0x08, 0x05};
MxS32 colors[] = {0x11, 0x0f, 0x08, 0x05};
MxU8* ptr = m_surface + local3c[i_actor] + local50[i_activity];
MxS32 val = local60[score];
MxS32 color = colors[score];
MxS32 size = local28[i_activity];
for (MxS32 i = 0; i < local14[i_actor]; i++) {
memset(ptr, val, size);
memset(ptr, color, size);
ptr += 0x100;
}
}