mirror of
https://github.com/isledecomp/isle.git
synced 2026-05-02 04:53:57 +00:00
Improve path struct trigger names
This commit is contained in:
parent
d7129ba668
commit
357eca8f1a
@ -73,13 +73,13 @@ class LegoPathStruct : public LegoPathStructBase {
|
|||||||
public:
|
public:
|
||||||
enum Trigger {
|
enum Trigger {
|
||||||
c_camAnim = 'C',
|
c_camAnim = 'C',
|
||||||
c_d = 'D',
|
c_waypoint = 'D',
|
||||||
c_e = 'E',
|
c_deleteAction = 'E',
|
||||||
c_g = 'G',
|
c_nothing = 'G',
|
||||||
c_h = 'H',
|
c_hideAnim = 'H',
|
||||||
c_music = 'M',
|
c_music = 'M',
|
||||||
c_s = 'S',
|
c_specialMissionWaypointAndAction = 'S',
|
||||||
c_w = 'W'
|
c_missionFinalWaypoint = 'W'
|
||||||
};
|
};
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100473a0
|
// FUNCTION: LEGO1 0x100473a0
|
||||||
|
|||||||
@ -315,7 +315,7 @@ MxLong Ambulance::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
|||||||
PlayAction(IsleScript::c_Avo915In_PlayWav);
|
PlayAction(IsleScript::c_Avo915In_PlayWav);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x131 && m_atBeachTask == 0) {
|
else if (p_param.GetTrigger() == LegoPathStruct::c_specialMissionWaypointAndAction && p_param.GetData() == 0x131 && m_atBeachTask == 0) {
|
||||||
m_atBeachTask = 1;
|
m_atBeachTask = 1;
|
||||||
m_taskState = Ambulance::e_waiting;
|
m_taskState = Ambulance::e_waiting;
|
||||||
|
|
||||||
|
|||||||
@ -281,7 +281,7 @@ MxLong Pizza::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
|||||||
if (m_state->m_state == PizzaMissionState::e_delivering) {
|
if (m_state->m_state == PizzaMissionState::e_delivering) {
|
||||||
MxLong time = Timer()->GetTime() - m_mission->m_startTime;
|
MxLong time = Timer()->GetTime() - m_mission->m_startTime;
|
||||||
|
|
||||||
if (p_param.GetTrigger() == LegoPathStruct::c_s && p_param.GetData() == 0x12e &&
|
if (p_param.GetTrigger() == LegoPathStruct::c_specialMissionWaypointAndAction && p_param.GetData() == 0x12e &&
|
||||||
GameState()->GetActorId() == LegoActor::c_pepper) {
|
GameState()->GetActorId() == LegoActor::c_pepper) {
|
||||||
m_state->m_state = PizzaMissionState::e_arrivedAtDestination;
|
m_state->m_state = PizzaMissionState::e_arrivedAtDestination;
|
||||||
m_state->SetPlayedAction(SndanimScript::c_TRS302_OpenJailDoor);
|
m_state->SetPlayedAction(SndanimScript::c_TRS302_OpenJailDoor);
|
||||||
@ -303,7 +303,7 @@ MxLong Pizza::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
|||||||
(p_param.GetData() == 0x33 && GameState()->GetActorId() == LegoActor::c_papa) ||
|
(p_param.GetData() == 0x33 && GameState()->GetActorId() == LegoActor::c_papa) ||
|
||||||
((p_param.GetData() == 0x08 || p_param.GetData() == 0x09) && GameState()->GetActorId() == LegoActor::c_nick) ||
|
((p_param.GetData() == 0x08 || p_param.GetData() == 0x09) && GameState()->GetActorId() == LegoActor::c_nick) ||
|
||||||
(p_param.GetData() == 0x0b && GameState()->GetActorId() == LegoActor::c_laura)
|
(p_param.GetData() == 0x0b && GameState()->GetActorId() == LegoActor::c_laura)
|
||||||
)) || (p_param.GetTrigger() == LegoPathStruct::c_w && p_param.GetData() == 0x169 && GameState()->GetActorId() == LegoActor::c_nick)) {
|
)) || (p_param.GetTrigger() == LegoPathStruct::c_missionFinalWaypoint && p_param.GetData() == 0x169 && GameState()->GetActorId() == LegoActor::c_nick)) {
|
||||||
IsleScript::Script action;
|
IsleScript::Script action;
|
||||||
|
|
||||||
if (time < m_mission->GetRedFinishTime()) {
|
if (time < m_mission->GetRedFinishTime()) {
|
||||||
@ -353,7 +353,7 @@ MxLong Pizza::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
|||||||
|
|
||||||
MxTrace("Pizza mission: ending\n");
|
MxTrace("Pizza mission: ending\n");
|
||||||
}
|
}
|
||||||
else if (p_param.GetTrigger() == LegoPathStruct::c_w) {
|
else if (p_param.GetTrigger() == LegoPathStruct::c_missionFinalWaypoint) {
|
||||||
if (p_param.GetData() == 0x15e && GameState()->GetActorId() == LegoActor::c_pepper) {
|
if (p_param.GetData() == 0x15e && GameState()->GetActorId() == LegoActor::c_pepper) {
|
||||||
if (!m_playedLocationAnimation) {
|
if (!m_playedLocationAnimation) {
|
||||||
m_playedLocationAnimation = TRUE;
|
m_playedLocationAnimation = TRUE;
|
||||||
|
|||||||
@ -300,7 +300,7 @@ MxLong TowTrack::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
|||||||
|
|
||||||
if (m_state->m_state == TowTrackMissionState::e_hookedUp &&
|
if (m_state->m_state == TowTrackMissionState::e_hookedUp &&
|
||||||
((p_param.GetTrigger() == LegoPathStruct::c_camAnim && (p_param.GetData() == 9 || p_param.GetData() == 8)) ||
|
((p_param.GetTrigger() == LegoPathStruct::c_camAnim && (p_param.GetData() == 9 || p_param.GetData() == 8)) ||
|
||||||
(p_param.GetTrigger() == LegoPathStruct::c_w && p_param.GetData() == 0x169))) {
|
(p_param.GetTrigger() == LegoPathStruct::c_missionFinalWaypoint && p_param.GetData() == 0x169))) {
|
||||||
m_state->m_state = TowTrackMissionState::e_none;
|
m_state->m_state = TowTrackMissionState::e_none;
|
||||||
|
|
||||||
MxLong time = Timer()->GetTime() - m_state->m_startTime;
|
MxLong time = Timer()->GetTime() - m_state->m_startTime;
|
||||||
@ -327,7 +327,7 @@ MxLong TowTrack::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
|||||||
Leave();
|
Leave();
|
||||||
PlayFinalAnimation(IsleScript::c_wrt060bm_RunAnim);
|
PlayFinalAnimation(IsleScript::c_wrt060bm_RunAnim);
|
||||||
}
|
}
|
||||||
else if (p_param.GetTrigger() == LegoPathStruct::c_w && m_state->m_state == TowTrackMissionState::e_started) {
|
else if (p_param.GetTrigger() == LegoPathStruct::c_missionFinalWaypoint && m_state->m_state == TowTrackMissionState::e_started) {
|
||||||
if (p_param.GetData() == 0x15f) {
|
if (p_param.GetData() == 0x15f) {
|
||||||
if (m_treeBlockageTriggered == 0) {
|
if (m_treeBlockageTriggered == 0) {
|
||||||
m_treeBlockageTriggered = 1;
|
m_treeBlockageTriggered = 1;
|
||||||
|
|||||||
@ -48,7 +48,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
|||||||
PlayCamAnim(p_actor, actualDirection, p_data, TRUE);
|
PlayCamAnim(p_actor, actualDirection, p_data, TRUE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case c_d: {
|
case c_waypoint: {
|
||||||
p_actor->SetLastPathStruct(p_data);
|
p_actor->SetLastPathStruct(p_data);
|
||||||
|
|
||||||
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||||
@ -60,12 +60,12 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case c_e:
|
case c_deleteAction:
|
||||||
HandleAction(m_name, p_data, !(p_invertDirection == FALSE));
|
HandleAction(m_name, p_data, !(p_invertDirection == FALSE));
|
||||||
break;
|
break;
|
||||||
case c_g:
|
case c_nothing:
|
||||||
break;
|
break;
|
||||||
case c_h: {
|
case c_hideAnim: {
|
||||||
LegoHideAnimPresenter* presenter = m_world->GetHideAnimPresenter();
|
LegoHideAnimPresenter* presenter = m_world->GetHideAnimPresenter();
|
||||||
if (presenter != NULL) {
|
if (presenter != NULL) {
|
||||||
presenter->ApplyVisibility(p_data * 100);
|
presenter->ApplyVisibility(p_data * 100);
|
||||||
@ -77,7 +77,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
|||||||
PlayMusic(p_direction, p_data);
|
PlayMusic(p_direction, p_data);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case c_s: {
|
case c_specialMissionWaypointAndAction: {
|
||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
if (world != NULL) {
|
if (world != NULL) {
|
||||||
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||||
@ -90,7 +90,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
|||||||
HandleAction(m_name, p_data, p_invertDirection == FALSE);
|
HandleAction(m_name, p_data, p_invertDirection == FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case c_w: {
|
case c_missionFinalWaypoint: {
|
||||||
LegoWorld* world = CurrentWorld();
|
LegoWorld* world = CurrentWorld();
|
||||||
if (world != NULL) {
|
if (world != NULL) {
|
||||||
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data);
|
||||||
|
|||||||
@ -189,7 +189,7 @@ MxLong CarRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
|||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
if (p_param.GetTrigger() == LegoPathStruct::c_d) {
|
if (p_param.GetTrigger() == LegoPathStruct::c_waypoint) {
|
||||||
MxEntity* sender = (MxEntity*) p_param.GetSender();
|
MxEntity* sender = (MxEntity*) p_param.GetSender();
|
||||||
MxS32 paramData = p_param.GetData();
|
MxS32 paramData = p_param.GetData();
|
||||||
|
|
||||||
|
|||||||
@ -158,7 +158,7 @@ MxLong JetskiRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
|||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
MxEntity* sender = (MxEntity*) p_param.GetSender();
|
MxEntity* sender = (MxEntity*) p_param.GetSender();
|
||||||
|
|
||||||
if (p_param.GetTrigger() == LegoPathStruct::c_d) {
|
if (p_param.GetTrigger() == LegoPathStruct::c_waypoint) {
|
||||||
MxS32 paramData = p_param.GetData();
|
MxS32 paramData = p_param.GetData();
|
||||||
|
|
||||||
switch (sender->GetEntityId()) {
|
switch (sender->GetEntityId()) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user