mirror of
https://github.com/jummy0/sb2-decomp
synced 2025-03-14 20:23:30 +01:00
approaching playability
This commit is contained in:
parent
43d26ddece
commit
18593a8fd0
349
src/decblupi.cpp
349
src/decblupi.cpp
@ -2178,15 +2178,16 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
m_blupiSuspend = FALSE;
|
||||
m_blupiAir = TRUE;
|
||||
m_blupiAction = 5;
|
||||
m_blupiAction = ACTION_AIR;
|
||||
m_blupiPhase = 0;
|
||||
end.y -= 2;
|
||||
m_blupiVitesse.y = -11;
|
||||
m_blupiNoBarre = 5;
|
||||
PlaySound(35, end);
|
||||
PlaySound(SOUND_SUSPENDJUMP, end);
|
||||
}
|
||||
}
|
||||
if ( !m_blupiHelico &&
|
||||
if (m_keyPress & KEY_FIRE &&
|
||||
!m_blupiHelico &&
|
||||
!m_blupiOver &&
|
||||
!m_blupiBalloon &&
|
||||
!m_blupiEcrase &&
|
||||
@ -2212,43 +2213,43 @@ void CDecor::BlupiStep()
|
||||
bIsOpen2 = !DecorDetect(rect);
|
||||
if (!bIsOpen && !bIsOpen2 && ObjectStart(end, 56, 0) != -1)
|
||||
{
|
||||
m_blupiAction = 87;
|
||||
m_blupiAction = ACTION_PUTDYNAMITE;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiFocus = FALSE;
|
||||
PlaySound(61, end);
|
||||
PlaySound(SOUND_PERSOPOSE, end);
|
||||
m_blupiDynamite--;
|
||||
}
|
||||
}
|
||||
else if (m_blupiPerso > 0)
|
||||
{
|
||||
num = MoveObjectDetect(end, &bNear);
|
||||
if (num == -1 || m_moveObject[num].type != 200)
|
||||
if (num == -1 || m_moveObject[num].type != TYPE_BOMBEPERSO1)
|
||||
{
|
||||
rect.left = end.x + 18;
|
||||
rect.right = end.x + 20;
|
||||
rect.top = end.y + 60 - 2;
|
||||
rect.bottom = end.y + 60;
|
||||
rect.top = end.y + DIMBLUPIY - 2;
|
||||
rect.bottom = end.y + DIMBLUPIY;
|
||||
bIsOpen = !DecorDetect(rect);
|
||||
rect.left = end.x + 60 - 20;
|
||||
rect.right = end.x + 60 - 18;
|
||||
rect.top = end.y + 60 - 2;
|
||||
rect.bottom = end.y + 60;
|
||||
rect.left = end.x + DIMBLUPIX - 20;
|
||||
rect.right = end.x + DIMBLUPIX - 18;
|
||||
rect.top = end.y + DIMBLUPIY - 2;
|
||||
rect.bottom = end.y + DIMBLUPIY;
|
||||
bIsOpen2 = !DecorDetect(rect);
|
||||
num = MoveChargeDetect(end);
|
||||
if (num == -1 && !bIsOpen && !bIsOpen2 && ObjectStart(end, 200, 0) != -1)
|
||||
if (num == -1 && !bIsOpen && !bIsOpen2 && ObjectStart(end, TYPE_BOMBEPERSO1, 0) != -1)
|
||||
{
|
||||
m_blupiAction = 46;
|
||||
m_blupiAction = ACTION_OUF2;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiFocus = FALSE;
|
||||
PlaySound(61, end);
|
||||
PlaySound(SOUND_PERSOPOSE, end);
|
||||
m_blupiPerso--;
|
||||
}
|
||||
}
|
||||
if (m_blupiFocus)
|
||||
{
|
||||
m_blupiAction = 47;
|
||||
m_blupiAction = ACTION_OUF3;
|
||||
m_blupiPhase = 0;
|
||||
PlaySound(27, end);
|
||||
PlaySound(SOUND_ERROR, end);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2285,7 +2286,20 @@ void CDecor::BlupiStep()
|
||||
}
|
||||
POINT blupiPos = m_blupiPos;
|
||||
m_blupiPos = end;
|
||||
if ((m_blupiAction == 1 || m_blupiAction == 60 || m_blupiAction == 7 || m_blupiAction == 6) && !m_blupiAir && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus)
|
||||
if ((m_blupiAction == ACTION_STOP ||
|
||||
m_blupiAction == ACTION_STOPMARCH ||
|
||||
m_blupiAction == ACTION_UP ||
|
||||
m_blupiAction == ACTION_DOWN) &&
|
||||
!m_blupiAir &&
|
||||
!m_blupiBalloon &&
|
||||
!m_blupiEcrase &&
|
||||
!m_blupiJeep &&
|
||||
!m_blupiTank &&
|
||||
!m_blupiSkate &&
|
||||
!m_blupiNage &&
|
||||
!m_blupiSurf &&
|
||||
!m_blupiSuspend &&
|
||||
m_blupiFocus)
|
||||
{
|
||||
if (m_blupiTransport != -1)
|
||||
{
|
||||
@ -2295,26 +2309,26 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
rect.left = end.x + 24;
|
||||
rect.right = end.x + 26;
|
||||
rect.top = end.y + 60 - 2;
|
||||
rect.bottom = end.y + 60;
|
||||
rect.top = end.y + DIMBLUPIY - 2;
|
||||
rect.bottom = end.y + DIMBLUPIY;
|
||||
bIsOpen = !DecorDetect(rect);
|
||||
rect.left = end.x + 60 - 26;
|
||||
rect.right = end.x + 60 - 24;
|
||||
rect.top = end.y + 60 - 2;
|
||||
rect.bottom = end.y + 60;
|
||||
rect.left = end.x + DIMBLUPIX - 26;
|
||||
rect.right = end.x + DIMBLUPIX - 24;
|
||||
rect.top = end.y + DIMBLUPIY - 2;
|
||||
rect.bottom = end.y + DIMBLUPIY;
|
||||
bIsOpen2 = !DecorDetect(rect);
|
||||
}
|
||||
if (m_blupiDir == DIR_LEFT && bIsOpen && !bIsOpen2)
|
||||
{
|
||||
if (m_blupiHelico || m_blupiOver || AscenseurShift(m_blupiTransport))
|
||||
{
|
||||
m_blupiAction = 9;
|
||||
m_blupiAction = ACTION_RECEDE;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySound(6, end);
|
||||
m_blupiAction = 8;
|
||||
PlaySound(SOUND_VERTIGO, end);
|
||||
m_blupiAction = ACTION_VERTIGO;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
}
|
||||
@ -2322,27 +2336,39 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
if (m_blupiHelico || m_blupiOver || AscenseurShift(m_blupiTransport))
|
||||
{
|
||||
m_blupiAction = 9;
|
||||
m_blupiAction = ACTION_RECEDE;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySound(6, end);
|
||||
m_blupiAction = 8;
|
||||
PlaySound(SOUND_VERTIGO, end);
|
||||
m_blupiAction = ACTION_VERTIGO;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
}
|
||||
if (m_blupiAction != ACTION_VERTIGO && m_blupiAction != ACTION_ADVANCE && m_blupiAction != ACTION_RECEDE && (bIsOpen || bIsOpen2))
|
||||
if (m_blupiAction != ACTION_VERTIGO &&
|
||||
m_blupiAction != ACTION_ADVANCE &&
|
||||
m_blupiAction != ACTION_RECEDE &&
|
||||
(bIsOpen || bIsOpen2))
|
||||
{
|
||||
if (!m_blupiHelico && !m_blupiOver)
|
||||
{
|
||||
PlaySound(6, end);
|
||||
PlaySound(SOUND_VERTIGO, end);
|
||||
}
|
||||
m_blupiAction = 10;
|
||||
m_blupiAction = ACTION_ADVANCE;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
}
|
||||
if (m_blupiAction == 1 && m_blupiJeep && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus)
|
||||
if (m_blupiAction == ACTION_STOP &&
|
||||
m_blupiJeep &&
|
||||
!m_blupiHelico &&
|
||||
!m_blupiOver &&
|
||||
!m_blupiBalloon &&
|
||||
!m_blupiEcrase &&
|
||||
!m_blupiNage &&
|
||||
!m_blupiSurf &&
|
||||
!m_blupiSuspend &&
|
||||
m_blupiFocus)
|
||||
{
|
||||
if (m_blupiTransport != -1)
|
||||
{
|
||||
@ -2352,27 +2378,36 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
rect.left = end.x + 2;
|
||||
rect.right = end.x + 18;
|
||||
rect.top = end.y + 60 - 2;
|
||||
rect.bottom = end.y + 60;
|
||||
rect.top = end.y + DIMBLUPIY - 2;
|
||||
rect.bottom = end.y + DIMBLUPIY;
|
||||
bIsOpen = !DecorDetect(rect);
|
||||
rect.left = end.x + 60 - 18;
|
||||
rect.right = end.x + 60 - 2;
|
||||
rect.top = end.y + 60 - 2;
|
||||
rect.bottom = end.y + 60;
|
||||
rect.left = end.x + DIMBLUPIX - 18;
|
||||
rect.right = end.x + DIMBLUPIX - 2;
|
||||
rect.top = end.y + DIMBLUPIY - 2;
|
||||
rect.bottom = end.y + DIMBLUPIY;
|
||||
bIsOpen2 = !DecorDetect(rect);
|
||||
}
|
||||
if (bIsOpen && !bIsOpen2)
|
||||
{
|
||||
m_blupiAction = 10;
|
||||
m_blupiAction = ACTION_ADVANCE;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
if (!bIsOpen && bIsOpen2)
|
||||
{
|
||||
m_blupiAction = 10;
|
||||
m_blupiAction = ACTION_ADVANCE;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
}
|
||||
if (m_blupiAction == 1 && m_blupiTank && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus)
|
||||
if (m_blupiAction == ACTION_STOP &&
|
||||
m_blupiTank &&
|
||||
!m_blupiHelico &&
|
||||
!m_blupiOver &&
|
||||
!m_blupiBalloon &&
|
||||
!m_blupiEcrase &&
|
||||
!m_blupiNage &&
|
||||
!m_blupiSurf &&
|
||||
!m_blupiSuspend &&
|
||||
m_blupiFocus)
|
||||
{
|
||||
if (m_blupiTransport != -1)
|
||||
{
|
||||
@ -2382,27 +2417,36 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
rect.left = end.x + 2;
|
||||
rect.right = end.x + 18;
|
||||
rect.top = end.y + 60 - 2;
|
||||
rect.bottom = end.y + 60;
|
||||
rect.top = end.y + DIMBLUPIY - 2;
|
||||
rect.bottom = end.y + DIMBLUPIY;
|
||||
bIsOpen = !DecorDetect(rect);
|
||||
rect.left = end.x + 60 - 18;
|
||||
rect.right = end.x + 60 - 2;
|
||||
rect.top = end.y + 60 - 2;
|
||||
rect.bottom = end.y + 60;
|
||||
rect.left = end.x + DIMBLUPIX - 18;
|
||||
rect.right = end.x + DIMBLUPIX - 2;
|
||||
rect.top = end.y + DIMBLUPIY - 2;
|
||||
rect.bottom = end.y + DIMBLUPIY;
|
||||
bIsOpen2 = !DecorDetect(rect);
|
||||
}
|
||||
if (bIsOpen && !bIsOpen2)
|
||||
{
|
||||
m_blupiAction = 10;
|
||||
m_blupiAction = ACTION_ADVANCE;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
if (!bIsOpen && bIsOpen2)
|
||||
{
|
||||
m_blupiAction = 10;
|
||||
m_blupiAction = ACTION_ADVANCE;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
}
|
||||
if (m_blupiAction == 1 && m_blupiSkate && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus)
|
||||
if (m_blupiAction == ACTION_STOP &&
|
||||
m_blupiSkate &&
|
||||
!m_blupiHelico &&
|
||||
!m_blupiOver &&
|
||||
!m_blupiBalloon &&
|
||||
!m_blupiEcrase &&
|
||||
!m_blupiNage &&
|
||||
!m_blupiSurf &&
|
||||
!m_blupiSuspend &&
|
||||
m_blupiFocus)
|
||||
{
|
||||
if (m_blupiTransport != -1)
|
||||
{
|
||||
@ -2412,34 +2456,34 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
rect.left = end.x + 12;
|
||||
rect.right = end.x + 19;
|
||||
rect.top = end.y + 60 - 2;
|
||||
rect.bottom = end.y + 60;
|
||||
rect.top = end.y + DIMBLUPIY - 2;
|
||||
rect.bottom = end.y + DIMBLUPIY;
|
||||
bIsOpen = !DecorDetect(rect);
|
||||
rect.left = end.x + 60 - 19;
|
||||
rect.right = end.x + 60 - 12;
|
||||
rect.top = end.y + 60 - 2;
|
||||
rect.bottom = end.y + 60;
|
||||
rect.left = end.x + DIMBLUPIX - 19;
|
||||
rect.right = end.x + DIMBLUPIX - 12;
|
||||
rect.top = end.y + DIMBLUPIY - 2;
|
||||
rect.bottom = end.y + DIMBLUPIY;
|
||||
bIsOpen2 = !DecorDetect(rect);
|
||||
}
|
||||
if (bIsOpen && !bIsOpen2)
|
||||
{
|
||||
m_blupiAction = 10;
|
||||
m_blupiAction = ACTION_ADVANCE;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
if (!bIsOpen && bIsOpen2)
|
||||
{
|
||||
m_blupiAction = 10;
|
||||
m_blupiAction = ACTION_ADVANCE;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
}
|
||||
if (m_blupiFocus)
|
||||
{
|
||||
if (m_blupiAction == 8 && m_blupiPhase == 16)
|
||||
if (m_blupiAction == ACTION_VERTIGO && m_blupiPhase == 16)
|
||||
{
|
||||
m_blupiAction = 9;
|
||||
m_blupiAction = ACTION_RECEDE;
|
||||
m_blupiPhase = 0;
|
||||
}
|
||||
if (m_blupiAction == 9 && m_blupiPhase == 3)
|
||||
if (m_blupiAction == ACTION_RECEDE && m_blupiPhase == 3)
|
||||
{
|
||||
StopBlupi();
|
||||
m_blupiActionOuf = 0;
|
||||
@ -2457,7 +2501,7 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
num3 = 10;
|
||||
}
|
||||
if (m_blupiAction == 10 && m_blupiPhase == num3)
|
||||
if (m_blupiAction == ACTION_ADVANCE && m_blupiPhase == num3)
|
||||
{
|
||||
StopBlupi();
|
||||
}
|
||||
@ -2467,7 +2511,7 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
if (m_blupiTimeShield == 10)
|
||||
{
|
||||
PlaySound(43, m_blupiPos);
|
||||
PlaySound(SOUND_STOPSHIELD, m_blupiPos);
|
||||
}
|
||||
if (m_blupiTimeShield == 0)
|
||||
{
|
||||
@ -2484,7 +2528,7 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
if (m_blupiTimeShield == 20)
|
||||
{
|
||||
PlaySound(45, m_blupiPos);
|
||||
PlaySound(SOUND_STOPPOWER, m_blupiPos);
|
||||
}
|
||||
if (m_blupiTimeShield == 0)
|
||||
{
|
||||
@ -2501,7 +2545,7 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
if (m_blupiTimeShield == 25)
|
||||
{
|
||||
PlaySound(56, m_blupiPos);
|
||||
PlaySound(SOUND_STOPCLOUD, m_blupiPos);
|
||||
}
|
||||
if (m_blupiTimeShield == 0)
|
||||
{
|
||||
@ -2518,7 +2562,7 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
if (m_blupiTimeShield == 20)
|
||||
{
|
||||
PlaySound(63, m_blupiPos);
|
||||
PlaySound(SOUND_STOPHIDE, m_blupiPos);
|
||||
}
|
||||
if (m_blupiTimeShield == 0)
|
||||
{
|
||||
@ -2539,17 +2583,17 @@ void CDecor::BlupiStep()
|
||||
m_jauges[JAUGE_POWER].SetHide(TRUE);
|
||||
tinyPoint.x = m_blupiPos.x;
|
||||
tinyPoint.y = m_blupiPos.y + 100;
|
||||
ObjectStart(tinyPoint, 42, -60);
|
||||
ObjectStart(tinyPoint, TYPE_INVERTSTOP, -60);
|
||||
tinyPoint.x = m_blupiPos.x;
|
||||
tinyPoint.y = m_blupiPos.y - 100;
|
||||
ObjectStart(tinyPoint, 42, 60);
|
||||
ObjectStart(tinyPoint, TYPE_INVERTSTOP, 60);
|
||||
tinyPoint.x = m_blupiPos.x - 100;
|
||||
tinyPoint.y = m_blupiPos.y;
|
||||
ObjectStart(tinyPoint, 42, 10);
|
||||
ObjectStart(tinyPoint, TYPE_INVERTSTOP, 10);
|
||||
tinyPoint.x = m_blupiPos.x + 100;
|
||||
tinyPoint.y = m_blupiPos.y;
|
||||
ObjectStart(tinyPoint, 42, -10);
|
||||
PlaySound(67, end);
|
||||
ObjectStart(tinyPoint, TYPE_INVERTSTOP, -10);
|
||||
PlaySound(SOUND_INVERTSTOP, end);
|
||||
}
|
||||
else if (m_time % 3 == 0)
|
||||
{
|
||||
@ -2565,8 +2609,8 @@ void CDecor::BlupiStep()
|
||||
m_jauges[JAUGE_POWER].SetHide(TRUE);
|
||||
tinyPoint.x = m_blupiPos.x - 34;
|
||||
tinyPoint.y = m_blupiPos.y - 34;
|
||||
ObjectStart(tinyPoint, 91, 0);
|
||||
PlaySound(41, m_blupiPos);
|
||||
ObjectStart(tinyPoint, TYPE_EXPLO6, 0);
|
||||
PlaySound(SOUND_RESSORT, m_blupiPos);
|
||||
}
|
||||
else if (m_time % 2 == 0)
|
||||
{
|
||||
@ -2581,14 +2625,14 @@ void CDecor::BlupiStep()
|
||||
m_blupiEcrase = FALSE;
|
||||
m_blupiAir = TRUE;
|
||||
m_jauges[JAUGE_POWER].SetHide(TRUE);
|
||||
ObjectStart(m_blupiPos, 41, -60);
|
||||
ObjectStart(m_blupiPos, 41, 60);
|
||||
ObjectStart(m_blupiPos, 41, 10);
|
||||
ObjectStart(m_blupiPos, 41, -10);
|
||||
ObjectStart(m_blupiPos, TYPE_INVERTSTART, -60);
|
||||
ObjectStart(m_blupiPos, TYPE_INVERTSTART, 60);
|
||||
ObjectStart(m_blupiPos, TYPE_INVERTSTART, 10);
|
||||
ObjectStart(m_blupiPos, TYPE_INVERTSTART, -10);
|
||||
tinyPoint.x = m_blupiPos.x - 34;
|
||||
tinyPoint.y = m_blupiPos.y - 34;
|
||||
ObjectStart(tinyPoint, 90, 0);
|
||||
PlaySound(41, m_blupiPos);
|
||||
ObjectStart(tinyPoint, TYPE_EXPLO5, 0);
|
||||
PlaySound(SOUND_RESSORT, m_blupiPos);
|
||||
}
|
||||
else if (m_time % 2 == 0)
|
||||
{
|
||||
@ -2601,12 +2645,12 @@ void CDecor::BlupiStep()
|
||||
num = MoveObjectFree();
|
||||
if (num != -1)
|
||||
{
|
||||
m_moveObject[num].type = 27;
|
||||
m_moveObject[num].type = TYPE_MAGICTRACK;
|
||||
m_moveObject[num].phase = 0;
|
||||
m_moveObject[num].posCurrent = m_blupiPos;
|
||||
m_moveObject[num].posStart = m_moveObject[num].posCurrent;
|
||||
m_moveObject[num].posEnd = m_moveObject[num].posCurrent;
|
||||
m_moveObject[num].step = 1;
|
||||
m_moveObject[num].step = STEP_STOPSTART;
|
||||
m_moveObject[num].time = 0;
|
||||
MoveObjectStepIcon(num);
|
||||
m_blupiPosMagic = m_blupiPos;
|
||||
@ -2617,35 +2661,37 @@ void CDecor::BlupiStep()
|
||||
num = MoveObjectFree();
|
||||
if (num != -1)
|
||||
{
|
||||
m_moveObject[num].type = 57;
|
||||
m_moveObject[num].type = TYPE_SHIELDTRACK;
|
||||
m_moveObject[num].phase = 0;
|
||||
m_moveObject[num].posCurrent = m_blupiPos;
|
||||
m_moveObject[num].posStart = m_moveObject[num].posCurrent;
|
||||
m_moveObject[num].posEnd = m_moveObject[num].posCurrent;
|
||||
m_moveObject[num].step = 1;
|
||||
m_moveObject[num].step = STEP_STOPSTART;
|
||||
m_moveObject[num].time = 0;
|
||||
MoveObjectStepIcon(num);
|
||||
m_blupiPosMagic = m_blupiPos;
|
||||
}
|
||||
}
|
||||
/* // winphone
|
||||
if (m_blupiHide && abs(m_blupiPos.x - m_blupiPosMagic.x) + abs(m_blupiPos.y - m_blupiPosMagic.y) >= 10)
|
||||
{
|
||||
num = MoveObjectFree();
|
||||
if (num != -1)
|
||||
{
|
||||
m_moveObject[num].type = 58;
|
||||
m_moveObject[num].type = TYPE_HIDETRACK;
|
||||
m_moveObject[num].icon = m_blupiIcon;
|
||||
m_moveObject[num].channel = 2;
|
||||
m_moveObject[num].channel = CHBLUPI;
|
||||
m_moveObject[num].phase = 0;
|
||||
m_moveObject[num].posCurrent = m_blupiPos;
|
||||
m_moveObject[num].posStart = m_moveObject[num].posCurrent;
|
||||
m_moveObject[num].posEnd = m_moveObject[num].posCurrent;
|
||||
m_moveObject[num].step = 1;
|
||||
m_moveObject[num].step = STEP_STOPSTART;
|
||||
m_moveObject[num].time = 0;
|
||||
MoveObjectStepIcon(num);
|
||||
m_blupiPosMagic = m_blupiPos;
|
||||
}
|
||||
}
|
||||
*/
|
||||
if (m_blupiTimeNoAsc > 0)
|
||||
{
|
||||
m_blupiTimeNoAsc--;
|
||||
@ -2661,11 +2707,11 @@ void CDecor::BlupiStep()
|
||||
m_blupiHelico = FALSE;
|
||||
tinyPoint.x = m_blupiPos.x - 34;
|
||||
tinyPoint.y = m_blupiPos.y - 34;
|
||||
ObjectStart(tinyPoint, 9, 0);
|
||||
ObjectStart(tinyPoint, TYPE_EXPLO2, 0);
|
||||
m_decorAction = 1;
|
||||
m_decorPhase = 0;
|
||||
StopVehicleSound();
|
||||
PlaySound(10, m_blupiPos);
|
||||
PlaySound(SOUND_BOUM, m_blupiPos);
|
||||
}
|
||||
}
|
||||
if (!m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && m_blupiFocus)
|
||||
@ -2714,17 +2760,17 @@ void CDecor::BlupiStep()
|
||||
m_blupiAir = FALSE;
|
||||
m_blupiNage = FALSE;
|
||||
m_blupiSurf = TRUE;
|
||||
PlaySound(25, m_blupiPos);
|
||||
PlaySound(SOUND_DROWN, m_blupiPos);
|
||||
m_jauges[JAUGE_AIR].SetHide(TRUE);
|
||||
}
|
||||
tinyPoint4.x = m_blupiPos.x;
|
||||
tinyPoint4.y = m_blupiPos.y - 60;
|
||||
if ((m_blupiSurf || m_blupiNage) && (m_blupiPos.y % 64 == 64 - BLUPISURF || m_blupiPos.y % 64 == 32) && IsOutWater(tinyPoint4) && (m_keyPress & KEY_JUMP) != 0)
|
||||
tinyPoint4.y = m_blupiPos.y - DIMOBJY;
|
||||
if ((m_blupiSurf || m_blupiNage) && (m_blupiPos.y % DIMOBJY == DIMOBJY - BLUPISURF || m_blupiPos.y % DIMOBJY == DIMOBJY / 2) && IsOutWater(tinyPoint4) && m_keyPress & KEY_JUMP)
|
||||
{
|
||||
m_blupiNage = FALSE;
|
||||
m_blupiSurf = FALSE;
|
||||
m_blupiAir = TRUE;
|
||||
m_blupiAction = 5;
|
||||
m_blupiAction = ACTION_AIR;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiVitesse.x = 0;
|
||||
if (m_blupiPower)
|
||||
@ -2736,7 +2782,7 @@ void CDecor::BlupiStep()
|
||||
m_blupiVitesse.y = -12;
|
||||
}
|
||||
MoveObjectTiplouf(m_blupiPos);
|
||||
PlaySound(22, m_blupiPos);
|
||||
PlaySound(SOUND_JUMP0, m_blupiPos);
|
||||
m_jauges[JAUGE_AIR].SetHide(TRUE);
|
||||
}
|
||||
if ((m_blupiSurf || m_blupiNage) && IsOutWater(m_blupiPos))
|
||||
@ -2753,12 +2799,12 @@ void CDecor::BlupiStep()
|
||||
m_blupiNage = FALSE;
|
||||
m_blupiSurf = FALSE;
|
||||
m_blupiAir = TRUE;
|
||||
m_blupiAction = 5;
|
||||
m_blupiAction = ACTION_AIR;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiPos.y = m_blupiPos.y - 10;
|
||||
m_blupiVitesse.x = 0;
|
||||
m_blupiVitesse.y = -10;
|
||||
PlaySound(22, m_blupiPos);
|
||||
PlaySound(SOUND_JUMP0, m_blupiPos);
|
||||
m_jauges[JAUGE_AIR].SetHide(TRUE);
|
||||
}
|
||||
}
|
||||
@ -2767,12 +2813,12 @@ void CDecor::BlupiStep()
|
||||
m_blupiNage = FALSE;
|
||||
m_blupiSurf = FALSE;
|
||||
m_blupiAir = FALSE;
|
||||
m_blupiAction = 5;
|
||||
m_blupiAction = ACTION_AIR;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiPos.y = m_blupiPos.y + 30;
|
||||
m_blupiVitesse.x = 0;
|
||||
m_blupiVitesse.y = 0;
|
||||
PlaySound(22, m_blupiPos);
|
||||
PlaySound(SOUND_JUMP0, m_blupiPos);
|
||||
m_jauges[JAUGE_AIR].SetHide(TRUE);
|
||||
}
|
||||
else
|
||||
@ -2784,13 +2830,13 @@ void CDecor::BlupiStep()
|
||||
m_blupiPos.y = m_blupiPos.y - 10;
|
||||
m_blupiVitesse.x = 0;
|
||||
m_blupiVitesse.y = 0;
|
||||
PlaySound(22, m_blupiPos);
|
||||
PlaySound(SOUND_JUMP0, m_blupiPos);
|
||||
m_jauges[JAUGE_AIR].SetHide(TRUE);
|
||||
}
|
||||
}
|
||||
if ((m_blupiSurf || m_blupiNage) && m_blupiActionOuf != 44)
|
||||
if ((m_blupiSurf || m_blupiNage) && m_blupiActionOuf != ACTION_OUF1a)
|
||||
{
|
||||
m_blupiActionOuf = 44;
|
||||
m_blupiActionOuf = ACTION_OUF1a;
|
||||
m_blupiTimeOuf = 0;
|
||||
}
|
||||
}
|
||||
@ -2805,16 +2851,16 @@ void CDecor::BlupiStep()
|
||||
m_blupiSkate = FALSE;
|
||||
tinyPoint.x = m_blupiPos.x - 34;
|
||||
tinyPoint.y = m_blupiPos.y - 34;
|
||||
ObjectStart(tinyPoint, 9, 0);
|
||||
ObjectStart(tinyPoint, TYPE_EXPLO2, 0);
|
||||
m_decorAction = 1;
|
||||
m_decorPhase = 0;
|
||||
StopVehicleSound();
|
||||
PlaySound(10, m_blupiPos);
|
||||
PlaySound(SOUND_BOUM, m_blupiPos);
|
||||
}
|
||||
if (m_blupiFocus && !m_blupiSuspend && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && m_blupiNoBarre == 0 && GetTypeBarre(m_blupiPos) == 1)
|
||||
{
|
||||
tinyPoint4.x = m_blupiPos.x;
|
||||
tinyPoint4.y = (m_blupiPos.y + 22) / 64 * 64 + BLUPISUSPEND;
|
||||
tinyPoint4.y = (m_blupiPos.y + 22) / DIMOBJY * DIMOBJY + BLUPISUSPEND;
|
||||
rect = BlupiRect(tinyPoint4);
|
||||
if (!DecorDetect(rect, TRUE))
|
||||
{
|
||||
@ -2823,7 +2869,7 @@ void CDecor::BlupiStep()
|
||||
m_blupiAir = FALSE;
|
||||
StopBlupi();
|
||||
m_blupiActionOuf = 0;
|
||||
PlaySound(34, m_blupiPos);
|
||||
PlaySound(SOUND_SUSPENDTOC, m_blupiPos);
|
||||
}
|
||||
}
|
||||
if (m_blupiNoBarre > 0)
|
||||
@ -2834,11 +2880,11 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
if (m_blupiFocus && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi)
|
||||
{
|
||||
BlupiDead(11, 75);
|
||||
BlupiDead(ACTION_CLEAR1, ACTION_CLEAR2);
|
||||
}
|
||||
tinyPoint.x = m_blupiPos.x - 34;
|
||||
tinyPoint.y = m_blupiPos.y - 34;
|
||||
ObjectStart(tinyPoint, 11, 0);
|
||||
ObjectStart(tinyPoint, TYPE_EXPLO4, 0);
|
||||
m_decorAction = 2;
|
||||
m_decorPhase = 0;
|
||||
StopVehicleSound();
|
||||
@ -2850,8 +2896,8 @@ void CDecor::BlupiStep()
|
||||
if (num != -1)
|
||||
{
|
||||
StopVehicleSound();
|
||||
PlaySound(32, m_blupiPos);
|
||||
m_blupiAction = 30;
|
||||
PlaySound(SOUND_BYE, m_blupiPos);
|
||||
m_blupiAction = ACTION_BYE;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiFocus = FALSE;
|
||||
m_blupiFront = TRUE;
|
||||
@ -2859,33 +2905,40 @@ void CDecor::BlupiStep()
|
||||
}
|
||||
int num27 = MoveObjectDetect(m_blupiPos, &bNear);
|
||||
POINT tinyPoint5;
|
||||
if (m_blupiAction != 11 && m_blupiAction != 75 && m_blupiAction != 76 && m_blupiAction != 77 && m_blupiAction != 78 && m_blupiAction != 79 && m_blupiAction != ACTION_CLEAR7 && m_blupiAction != ACTION_CLEAR8)
|
||||
if (m_blupiAction != ACTION_CLEAR1 &&
|
||||
m_blupiAction != ACTION_CLEAR2 &&
|
||||
m_blupiAction != ACTION_CLEAR3 &&
|
||||
m_blupiAction != ACTION_CLEAR4 &&
|
||||
m_blupiAction != ACTION_CLEAR5 &&
|
||||
m_blupiAction != ACTION_CLEAR6 &&
|
||||
m_blupiAction != ACTION_CLEAR7 &&
|
||||
m_blupiAction != ACTION_CLEAR8)
|
||||
{
|
||||
if (IsLave(m_blupiPos) && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi)
|
||||
{
|
||||
BlupiDead(76, -1);
|
||||
BlupiDead(ACTION_CLEAR3, -1);
|
||||
m_blupiRestart = TRUE;
|
||||
m_blupiPos.y = m_blupiPos.y / DIMOBJY * 64 + BLUPIOFFY;
|
||||
PlaySound(8, m_blupiPos);
|
||||
m_blupiPos.y = m_blupiPos.y / DIMOBJY * DIMOBJY + BLUPIOFFY;
|
||||
PlaySound(SOUND_FALL, m_blupiPos);
|
||||
}
|
||||
if (IsPiege(m_blupiPos) && !m_blupiOver && !m_blupiJeep && !m_blupiTank && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus)
|
||||
{
|
||||
BlupiDead(54, -1);
|
||||
BlupiDead(ACTION_GLU, -1);
|
||||
m_blupiRestart = TRUE;
|
||||
m_blupiAir = TRUE;
|
||||
ObjectStart(m_blupiPos, 53, 0);
|
||||
PlaySound(51, m_blupiPos);
|
||||
PlaySound(SOUND_GLU, m_blupiPos);
|
||||
}
|
||||
if (IsGoutte(m_blupiPos, FALSE) && !m_blupiOver && !m_blupiJeep && !m_blupiTank && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus)
|
||||
{
|
||||
BlupiDead(54, -1);
|
||||
BlupiDead(ACTION_GLU, -1);
|
||||
m_blupiRestart = TRUE;
|
||||
m_blupiAir = TRUE;
|
||||
PlaySound(51, m_blupiPos);
|
||||
PlaySound(SOUND_GLU, m_blupiPos);
|
||||
}
|
||||
if (IsScie(m_blupiPos) && !m_blupiOver && !m_blupiJeep && !m_blupiTank && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus)
|
||||
{
|
||||
BlupiDead(77, -1);
|
||||
BlupiDead(ACTION_CLEAR4, -1);
|
||||
m_blupiFront = TRUE;
|
||||
m_blupiRestart = TRUE;
|
||||
m_blupiAir = TRUE;
|
||||
@ -2894,7 +2947,7 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
|
||||
ActiveSwitch(m_decor[tinyPoint.x][tinyPoint.y].icon == 385, tinyPoint);
|
||||
m_blupiAction = 82;
|
||||
m_blupiAction = ACTION_SWITCH;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiFocus = FALSE;
|
||||
m_blupiVitesse.x = 0;
|
||||
@ -2902,11 +2955,11 @@ void CDecor::BlupiStep()
|
||||
}
|
||||
if (IsBlitz(m_blupiPos, FALSE) && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi)
|
||||
{
|
||||
BlupiDead(11, -1);
|
||||
BlupiDead(ACTION_CLEAR1, -1);
|
||||
m_blupiRestart = TRUE;
|
||||
m_blupiAir = TRUE;
|
||||
m_blupiPos.y = m_blupiPos.y / DIMOBJY * 64 + BLUPIOFFY;
|
||||
PlaySound(8, m_blupiPos);
|
||||
m_blupiPos.y = m_blupiPos.y / DIMOBJY * DIMOBJY + BLUPIOFFY;
|
||||
PlaySound(SOUND_FALL, m_blupiPos);
|
||||
}
|
||||
if (IsEcraseur(m_blupiPos) && !m_blupiEcrase && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus)
|
||||
{
|
||||
@ -2936,35 +2989,35 @@ void CDecor::BlupiStep()
|
||||
{
|
||||
StopVehicleSound();
|
||||
}
|
||||
PlaySound(70, m_blupiPos);
|
||||
ObjectStart(m_blupiPos, 41, -60);
|
||||
ObjectStart(m_blupiPos, 41, 60);
|
||||
ObjectStart(m_blupiPos, 41, 10);
|
||||
ObjectStart(m_blupiPos, 41, -10);
|
||||
PlaySound(SOUND_ECRASE, m_blupiPos);
|
||||
ObjectStart(m_blupiPos, TYPE_INVERTSTART, -60);
|
||||
ObjectStart(m_blupiPos, TYPE_INVERTSTART, 60);
|
||||
ObjectStart(m_blupiPos, TYPE_INVERTSTART, 10);
|
||||
ObjectStart(m_blupiPos, TYPE_INVERTSTART, -10);
|
||||
tinyPoint.x = m_blupiPos.x - 34;
|
||||
tinyPoint.y = m_blupiPos.y - 34;
|
||||
ObjectStart(tinyPoint, 90, 0);
|
||||
ObjectStart(tinyPoint, TYPE_EXPLO5, 0);
|
||||
m_decorAction = 2;
|
||||
m_decorPhase = 0;
|
||||
}
|
||||
if (IsTeleporte(m_blupiPos) != -1 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiAir && m_blupiFocus && m_blupiPosHelico.x == -1)
|
||||
{
|
||||
m_blupiAction = 74;
|
||||
m_blupiAction = ACTION_TELEPORTE;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiVitesse.x = 0;
|
||||
m_blupiVitesse.y = 0;
|
||||
m_blupiFocus = FALSE;
|
||||
m_blupiPos.x = m_blupiPos.x / DIMOBJX * 64;
|
||||
PlaySound(71, m_blupiPos);
|
||||
m_blupiPos.x = m_blupiPos.x / DIMOBJX * DIMOBJX;
|
||||
PlaySound(SOUND_TELEPORTE, m_blupiPos);
|
||||
tinyPoint.x = m_blupiPos.x;
|
||||
tinyPoint.y = m_blupiPos.y - 5;
|
||||
ObjectStart(tinyPoint, 92, 0);
|
||||
}
|
||||
if (IsBridge(m_blupiPos, tinyPoint2) && m_blupiFocus)
|
||||
{
|
||||
tinyPoint2.x *= 64;
|
||||
tinyPoint2.y *= 64;
|
||||
ObjectStart(tinyPoint2, 52, 0);
|
||||
tinyPoint2.x *= DIMOBJX;
|
||||
tinyPoint2.y *= DIMOBJY;
|
||||
ObjectStart(tinyPoint2, TYPE_BRIDGE, 0);
|
||||
}
|
||||
int num2 = IsDoor(m_blupiPos, tinyPoint2);
|
||||
if (num2 != -1 && (m_blupiCle & 1 << num2 - 334) != 0)
|
||||
@ -2975,7 +3028,7 @@ void CDecor::BlupiStep()
|
||||
tinyPoint.y = 418;
|
||||
tinyPoint5.x = tinyPoint2.x * 64 - m_posDecor.x;
|
||||
tinyPoint5.y = tinyPoint2.y * 64 - m_posDecor.y;
|
||||
////VoyageInit(tinyPoint, m_pPixmap->HotSpotToHud(tinyPoint5), 214 + (num2 - 334) * 7, 10);
|
||||
VoyageInit(tinyPoint, tinyPoint5, 214 + (num2 - 334) * 7, 10);
|
||||
}
|
||||
}
|
||||
if (!m_blupiHelico && !m_blupiSuspend && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiSkate && !m_blupiJeep && !m_blupiTank && !m_blupiJeep && m_blupiFocus)
|
||||
@ -3066,7 +3119,7 @@ void CDecor::BlupiStep()
|
||||
tinyPoint.y = m_moveObject[num].posCurrent.y - m_posDecor.y;
|
||||
tinyPoint5.x = 570;
|
||||
tinyPoint5.y = 430;
|
||||
////VoyageInit(m_pPixmap->HotSpotToHud(tinyPoint), tinyPoint5, 177, 10);
|
||||
VoyageInit(tinyPoint, tinyPoint5, 177, 10);
|
||||
m_blupiBullet += 10;
|
||||
if (m_blupiBullet > 10)
|
||||
{
|
||||
@ -3080,7 +3133,7 @@ void CDecor::BlupiStep()
|
||||
m_scrollAdd.y = 0;
|
||||
m_blupiAction = 42;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiPos.y = m_moveObject[num].posCurrent.y / 64 * 64 + BLUPIOFFY;
|
||||
m_blupiPos.y = m_moveObject[num].posCurrent.y / DIMOBJY * DIMOBJY + BLUPIOFFY;
|
||||
m_blupiFocus = FALSE;
|
||||
m_blupiAir = FALSE;
|
||||
m_blupiSkate = TRUE;
|
||||
@ -3259,7 +3312,7 @@ void CDecor::BlupiStep()
|
||||
POINT end;
|
||||
end.x = 430;
|
||||
end.y = 430;
|
||||
//VoyageInit(m_pPixmap->HotSpotToHud(tinyPoint), end, 6, 10);
|
||||
VoyageInit(tinyPoint, end, 6, 10);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, -60);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, 60);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, 10);
|
||||
@ -3273,7 +3326,7 @@ void CDecor::BlupiStep()
|
||||
POINT end2;
|
||||
end2.x = 520;
|
||||
end2.y = 418;
|
||||
//VoyageInit(m_pPixmap->HotSpotToHud(tinyPoint), end2, 215, 10);
|
||||
VoyageInit(tinyPoint, end2, 215, 10);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, -60);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, 60);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, 10);
|
||||
@ -3287,7 +3340,7 @@ void CDecor::BlupiStep()
|
||||
POINT end3;
|
||||
end3.x = 530;
|
||||
end3.y = 418;
|
||||
//VoyageInit(m_pPixmap->HotSpotToHud(tinyPoint), end3, 222, 10);
|
||||
VoyageInit(tinyPoint, end3, 222, 10);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, -60);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, 60);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, 10);
|
||||
@ -3301,7 +3354,7 @@ void CDecor::BlupiStep()
|
||||
POINT end4;
|
||||
end4.x = 540;
|
||||
end4.y = 418;
|
||||
//VoyageInit(m_pPixmap->HotSpotToHud(tinyPoint), end4, 229, 10);
|
||||
VoyageInit(tinyPoint, end4, 229, 10);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, -60);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, 60);
|
||||
ObjectStart(m_moveObject[num].posCurrent, 39, 10);
|
||||
@ -3312,7 +3365,7 @@ void CDecor::BlupiStep()
|
||||
ObjectDelete(m_moveObject[num].posCurrent, m_moveObject[num].type);
|
||||
tinyPoint.x = m_moveObject[num].posCurrent.x - m_posDecor.x;
|
||||
tinyPoint.y = m_moveObject[num].posCurrent.y - m_posDecor.y;
|
||||
//VoyageInit(m_pPixmap->HotSpotToHud(tinyPoint), VoyageGetPosVie(m_nbVies + 1), 21, 10);
|
||||
VoyageInit(tinyPoint, VoyageGetPosVie(m_nbVies + 1), 21, 10);
|
||||
}
|
||||
if (m_moveObject[num].type == 25 && !m_blupiShield && !m_blupiHide && !m_blupiPower && m_blupiFocus)
|
||||
{
|
||||
@ -3390,7 +3443,7 @@ void CDecor::BlupiStep()
|
||||
tinyPoint.y = m_moveObject[num].posCurrent.y - m_posDecor.y;
|
||||
tinyPoint5.x = 0;
|
||||
tinyPoint5.y = 438;
|
||||
////VoyageInit(m_pPixmap->HotSpotToHud(tinyPoint), tinyPoint5, 108, 4);
|
||||
VoyageInit(tinyPoint, tinyPoint5, 108, 4);
|
||||
}
|
||||
}
|
||||
else if (!m_blupiShield && !m_blupiHide && !m_bSuperBlupi)
|
||||
@ -3414,7 +3467,7 @@ void CDecor::BlupiStep()
|
||||
tinyPoint.y = m_moveObject[num].posCurrent.y - m_posDecor.y;
|
||||
tinyPoint5.x = 505;
|
||||
tinyPoint5.y = 414;
|
||||
////VoyageInit(m_pPixmap->HotSpotToHud(tinyPoint), tinyPoint5, 252, 10);
|
||||
VoyageInit(tinyPoint, tinyPoint5, 252, 10);
|
||||
m_blupiAction = 86;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiFocus = FALSE;
|
||||
@ -3659,7 +3712,7 @@ void CDecor::BlupiStep()
|
||||
POINT posDecor = GetPosDecor(m_blupiPos);
|
||||
tinyPoint.x = m_blupiPos.x - posDecor.x - 30;
|
||||
tinyPoint.y = m_blupiPos.y - posDecor.y;
|
||||
////VoyageInit(VoyageGetPosVie(m_nbVies), m_pPixmap->HotSpotToHud(tinyPoint), 48, 2);
|
||||
VoyageInit(VoyageGetPosVie(m_nbVies), tinyPoint, 48, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3866,7 +3919,7 @@ void CDecor::BlupiDead(int action1, int action2)
|
||||
pos.y = m_blupiPos.y - m_posDecor.y;
|
||||
pos2.x = m_blupiPos.x - m_posDecor.x;
|
||||
pos2.y = m_blupiPos.y - m_posDecor.y - 300;
|
||||
////VoyageInit(m_pPixmap->HotSpotToHud(pos), m_pPixmap->HotSpotToHud(pos2), 230, 10);
|
||||
VoyageInit(pos, pos2, 230, 10);
|
||||
PlaySound(SOUND_ANGEL, m_blupiPos);
|
||||
}
|
||||
if (m_blupiAction == ACTION_CLEAR3)
|
||||
@ -3875,7 +3928,7 @@ void CDecor::BlupiDead(int action1, int action2)
|
||||
pos.y = m_blupiPos.y - m_posDecor.y;
|
||||
pos2.x = m_blupiPos.x - m_posDecor.x;
|
||||
pos2.y = m_blupiPos.y - m_posDecor.y - 2000;
|
||||
////VoyageInit(m_pPixmap->HotSpotToHud(pos), m_pPixmap->HotSpotToHud(pos2), 40, 10);
|
||||
VoyageInit(pos, pos2, 40, 10);
|
||||
PlaySound(SOUND_ANGEL, m_blupiPos);
|
||||
}
|
||||
if (m_blupiAction == ACTION_CLEAR4)
|
||||
|
@ -407,7 +407,7 @@ void CDecor::MoveObjectStep()
|
||||
posCurrent.x -= 34;
|
||||
posCurrent.y -= 34;
|
||||
ObjectStart(posCurrent, TYPE_EXPLO1, 0, TRUE);
|
||||
PlaySound(10, m_moveObject[i].posCurrent);
|
||||
PlaySound(SOUND_BOUM, m_moveObject[i].posCurrent);
|
||||
m_decorAction = 1;
|
||||
m_decorPhase = 0;
|
||||
posCurrent = m_moveObject[i].posCurrent;
|
||||
@ -512,14 +512,14 @@ void CDecor::MoveObjectStepLine(int i)
|
||||
}
|
||||
else if (m_moveObject[i].step == STEP_ADVANCE)
|
||||
{
|
||||
if (m_moveObject[i].posCurrent.x != m_moveObject[i].posEnd.x || m_moveObject[i].posCurrent.x != m_moveObject[i].posEnd.y)
|
||||
if (m_moveObject[i].posCurrent.x != m_moveObject[i].posEnd.x || m_moveObject[i].posCurrent.y != m_moveObject[i].posEnd.y)
|
||||
{
|
||||
m_moveObject[i].time ++;
|
||||
if (m_moveObject[i].stepAdvance != 0)
|
||||
{
|
||||
m_moveObject[i].posCurrent = (m_moveObject[i].posEnd - m_moveObject[i].posStart) * m_moveObject[i].time / m_moveObject[i].stepAdvance + m_moveObject[i].posStart;
|
||||
//m_moveObject[i].posCurrent.x = (m_moveObject[i].posEnd.x - m_moveObject[i].posStart.x) * m_moveObject[i].time / m_moveObject[i].stepAdvance + m_moveObject[i].posStart.x;
|
||||
//m_moveObject[i].posCurrent.y = (m_moveObject[i].posEnd.y - m_moveObject[i].posStart.y) * m_moveObject[i].time / m_moveObject[i].stepAdvance + m_moveObject[i].posStart.y;
|
||||
//m_moveObject[i].posCurrent = (m_moveObject[i].posEnd - m_moveObject[i].posStart) * m_moveObject[i].time / m_moveObject[i].stepAdvance + m_moveObject[i].posStart;
|
||||
m_moveObject[i].posCurrent.x = (m_moveObject[i].posEnd.x - m_moveObject[i].posStart.x) * m_moveObject[i].time / m_moveObject[i].stepAdvance + m_moveObject[i].posStart.x;
|
||||
m_moveObject[i].posCurrent.y = (m_moveObject[i].posEnd.y - m_moveObject[i].posStart.y) * m_moveObject[i].time / m_moveObject[i].stepAdvance + m_moveObject[i].posStart.y;
|
||||
}
|
||||
|
||||
}
|
||||
@ -559,11 +559,11 @@ void CDecor::MoveObjectStepLine(int i)
|
||||
m_moveObject[i].time ++;
|
||||
if (m_moveObject[i].stepRecede != 0)
|
||||
{
|
||||
m_moveObject[i].posCurrent = (m_moveObject[i].posStart - m_moveObject[i].posEnd) * m_moveObject[i].time / m_moveObject[i].stepRecede + m_moveObject[i].posEnd;
|
||||
//m_moveObject[i].posCurrent.x = (m_moveObject[i].posStart.x - m_moveObject[i].posEnd.x) *
|
||||
// m_moveObject[i].time / m_moveObject[i].stepRecede + m_moveObject[i].posEnd.x;
|
||||
//m_moveObject[i].posCurrent.y = (m_moveObject[i].posStart.y - m_moveObject[i].posEnd.y) *
|
||||
// m_moveObject[i].time / m_moveObject[i].stepRecede + m_moveObject[i].posEnd.y;
|
||||
//m_moveObject[i].posCurrent = (m_moveObject[i].posStart - m_moveObject[i].posEnd) * m_moveObject[i].time / m_moveObject[i].stepRecede + m_moveObject[i].posEnd;
|
||||
m_moveObject[i].posCurrent.x = (m_moveObject[i].posStart.x - m_moveObject[i].posEnd.x) *
|
||||
m_moveObject[i].time / m_moveObject[i].stepRecede + m_moveObject[i].posEnd.x;
|
||||
m_moveObject[i].posCurrent.y = (m_moveObject[i].posStart.y - m_moveObject[i].posEnd.y) *
|
||||
m_moveObject[i].time / m_moveObject[i].stepRecede + m_moveObject[i].posEnd.y;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1481,12 +1481,13 @@ void CDecor::DynamiteStart(int i, int dx, int dy)
|
||||
src.top = posStart.y;
|
||||
src.bottom = posStart.y + DIMOBJY * 2;
|
||||
POINT tinyPoint;
|
||||
tinyPoint.y = posStart.y / DIMOBJY;
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
tinyPoint.x = posStart.x / DIMOBJX;
|
||||
for (int k = 0; k < 2; j++)
|
||||
{
|
||||
if (tinyPoint.x >= 0 && tinyPoint.x < 100 && tinyPoint.y >= 0 && tinyPoint.y < 100)
|
||||
if (tinyPoint.x >= 0 && tinyPoint.x < MAXCELX && tinyPoint.y >= 0 && tinyPoint.y < MAXCELY)
|
||||
{
|
||||
int icon = m_decor[tinyPoint.x][tinyPoint.y].icon;
|
||||
if (icon == 378 || icon == 379 || icon == 404 || icon == 410)
|
||||
@ -1960,10 +1961,8 @@ BOOL CDecor::BlupiElectro(POINT pos)
|
||||
|
||||
void CDecor::MoveObjectFollow(POINT pos)
|
||||
{
|
||||
if (m_blupiHide)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_blupiHide) return;
|
||||
|
||||
RECT src = BlupiRect(pos);
|
||||
src.left = pos.x + 16;
|
||||
src.right = pos.x + DIMBLUPIX - 16;
|
||||
|
256
src/decor.cpp
256
src/decor.cpp
@ -802,14 +802,23 @@ void CDecor::Build(RECT rect)
|
||||
}
|
||||
tinyPoint.x += 64;
|
||||
}
|
||||
for (int num3 = 0; num3 < MAXMOVEOBJECT; num3++)
|
||||
for (int i = 0; i < MAXMOVEOBJECT; i++)
|
||||
{
|
||||
if (m_moveObject[num3].type != 0 && m_moveObject[num3].posCurrent.x >= posDecor.x - 64 && m_moveObject[num3].posCurrent.y >= posDecor.y - 64 && m_moveObject[num3].posCurrent.x <= posDecor.x + LXIMAGE && m_moveObject[num3].posCurrent.y <= posDecor.y + LYIMAGE && ((m_moveObject[num3].type >= 8 && m_moveObject[num3].type <= 11) || (m_moveObject[num3].type >= 90 && m_moveObject[num3].type <= 95) || (m_moveObject[num3].type >= 98 && m_moveObject[num3].type <= 100) || m_moveObject[num3].type == 53))
|
||||
if (m_moveObject[i].type != 0 && m_moveObject[i].posCurrent.x >= posDecor.x - 64 && m_moveObject[i].posCurrent.y >= posDecor.y - 64 && m_moveObject[i].posCurrent.x <= posDecor.x + LXIMAGE && m_moveObject[i].posCurrent.y <= posDecor.y + LYIMAGE && ((m_moveObject[i].type >= 8 && m_moveObject[i].type <= 11) || (m_moveObject[i].type >= 90 && m_moveObject[i].type <= 95) || (m_moveObject[i].type >= 98 && m_moveObject[i].type <= 100) || m_moveObject[i].type == 53))
|
||||
{
|
||||
tinyPoint.x = 0 + m_moveObject[num3].posCurrent.x - posDecor.x;
|
||||
tinyPoint.y = 0 + m_moveObject[num3].posCurrent.y - posDecor.y;
|
||||
m_pPixmap->QuickIcon(m_moveObject[num3].channel, m_moveObject[num3].icon, tinyPoint);
|
||||
tinyPoint.x = 0 + m_moveObject[i].posCurrent.x - posDecor.x;
|
||||
tinyPoint.y = 0 + m_moveObject[i].posCurrent.y - posDecor.y;
|
||||
m_pPixmap->QuickIcon(m_moveObject[i].channel, m_moveObject[i].icon, tinyPoint);
|
||||
}
|
||||
////debug
|
||||
if (m_moveObject[i].posCurrent.x >= posDecor.x - 64 && m_moveObject[i].posCurrent.y >= posDecor.y - 64 && m_moveObject[i].posCurrent.x <= posDecor.x + LXIMAGE && m_moveObject[i].posCurrent.y <= posDecor.y + LYIMAGE)
|
||||
{
|
||||
char str[20];
|
||||
sprintf(str, "#%d", i);
|
||||
DrawText(m_pPixmap, posDecor - m_moveObject[i].posCurrent, str, FONTWHITE);
|
||||
DrawText(m_pPixmap, posDecor - m_moveObject[i].posCurrent + POINT{0, 10}, m_moveObject[i].type ? debugMobTypeNames[m_moveObject[i].type] : "-", FONTWHITE);
|
||||
}
|
||||
////
|
||||
}
|
||||
if (m_blupiFront)
|
||||
{
|
||||
@ -855,7 +864,7 @@ void CDecor::DrawInfo()
|
||||
|
||||
if (m_blupiPerso > 0) {
|
||||
m_pPixmap->QuickIcon(CHBUTTON, GetIconPerso(), { 465, 438 });
|
||||
sprintf(text, "=_%d", m_blupiPerso);
|
||||
sprintf(text, "= %d", m_blupiPerso);
|
||||
DrawText(m_pPixmap, { 497, 452 }, text, FONTWHITE);
|
||||
}
|
||||
|
||||
@ -897,8 +906,9 @@ void CDecor::DrawInfo()
|
||||
if (m_blupiPos.x > 788) m_blupiPos.x = 788;
|
||||
break;
|
||||
}
|
||||
// more...
|
||||
// tutorial text...
|
||||
}
|
||||
// more...
|
||||
}
|
||||
}
|
||||
|
||||
@ -1490,56 +1500,56 @@ void CDecor::VoyageInit(POINT start, POINT end, int icon, int channel)
|
||||
int num2 = abs(end.y - start.y);
|
||||
m_voyagePhase = 0;
|
||||
m_voyageTotal = (num + num2) / 10;
|
||||
if (m_voyageIcon == 48 && m_voyageChannel == 2)
|
||||
if (m_voyageIcon == 48 && m_voyageChannel == CHBLUPI)
|
||||
{
|
||||
m_voyageTotal = 40;
|
||||
m_nbVies--;
|
||||
m_pSound->PlayImage(9, end, -1);
|
||||
m_pSound->PlayImage(SOUND_NEW, end, -1);
|
||||
}
|
||||
if (m_voyageIcon == 21 && m_voyageChannel == 10)
|
||||
if (m_voyageIcon == 21 && m_voyageChannel == CHELEMENT)
|
||||
{
|
||||
m_pSound->PlayImage(12, start, -1);
|
||||
m_pSound->PlayImage(SOUND_EGG, start, -1);
|
||||
}
|
||||
if (m_voyageIcon == 6 && m_voyageChannel == 10)
|
||||
if (m_voyageIcon == 6 && m_voyageChannel == CHELEMENT)
|
||||
{
|
||||
if (m_nbTresor == m_totalTresor - 1)
|
||||
{
|
||||
m_pSound->PlayImage(19, start, -1);
|
||||
m_pSound->PlayImage(SOUND_LASTTRESOR, start, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pSound->PlayImage(11, start, -1);
|
||||
m_pSound->PlayImage(SOUND_TRESOR, start, -1);
|
||||
}
|
||||
}
|
||||
if (m_voyageIcon == 215 && m_voyageChannel == 10)
|
||||
if (m_voyageIcon == 215 && m_voyageChannel == CHELEMENT)
|
||||
{
|
||||
m_pSound->PlayImage(11, start, -1);
|
||||
m_pSound->PlayImage(SOUND_TRESOR, start, -1);
|
||||
}
|
||||
if (m_voyageIcon == 222 && m_voyageChannel == 10)
|
||||
if (m_voyageIcon == 222 && m_voyageChannel == CHELEMENT)
|
||||
{
|
||||
m_pSound->PlayImage(11, start, -1);
|
||||
m_pSound->PlayImage(SOUND_TRESOR, start, -1);
|
||||
}
|
||||
if (m_voyageIcon == 229 && m_voyageChannel == 10)
|
||||
if (m_voyageIcon == 229 && m_voyageChannel == CHELEMENT)
|
||||
{
|
||||
m_pSound->PlayImage(11, start, -1);
|
||||
m_pSound->PlayImage(SOUND_TRESOR, start, -1);
|
||||
}
|
||||
if (m_voyageIcon == 108 && m_voyageChannel == 4)
|
||||
if (m_voyageIcon == 108 && m_voyageChannel == CHBUTTON)
|
||||
{
|
||||
m_pSound->PlayImage(60, start, -1);
|
||||
m_pSound->PlayImage(SOUND_PERSOTAKE, start, -1);
|
||||
}
|
||||
if (m_voyageIcon == 252 && m_voyageChannel == 10)
|
||||
if (m_voyageIcon == 252 && m_voyageChannel == CHELEMENT)
|
||||
{
|
||||
m_pSound->PlayImage(60, start, -1);
|
||||
m_pSound->PlayImage(SOUND_PERSOTAKE, start, -1);
|
||||
}
|
||||
if (m_voyageIcon == 177 && m_voyageChannel == 10)
|
||||
if (m_voyageIcon == 177 && m_voyageChannel == CHELEMENT)
|
||||
{
|
||||
m_pSound->PlayImage(54, start, -1);
|
||||
m_pSound->PlayImage(SOUND_TAKEGLU, start, -1);
|
||||
}
|
||||
if (m_voyageIcon == 230 && m_voyageChannel == 10)
|
||||
if (m_voyageIcon == 230 && m_voyageChannel == CHELEMENT)
|
||||
{
|
||||
m_voyageTotal = 100;
|
||||
}
|
||||
if (m_voyageIcon == 40 && m_voyageChannel == 10)
|
||||
if (m_voyageIcon == 40 && m_voyageChannel == CHELEMENT)
|
||||
{
|
||||
m_voyageTotal = 50;
|
||||
}
|
||||
@ -1547,12 +1557,154 @@ void CDecor::VoyageInit(POINT start, POINT end, int icon, int channel)
|
||||
|
||||
void CDecor::VoyageStep()
|
||||
{
|
||||
|
||||
int v3; // eax
|
||||
LONG y; // ecx
|
||||
LONG x; // eax
|
||||
LONG v7; // edx
|
||||
LONG v8; // eax
|
||||
LONG v9; // eax
|
||||
LONG v11; // edx
|
||||
POINT v12; // [esp-30h] [ebp-34h]
|
||||
POINT v13; // [esp-2Ch] [ebp-30h]
|
||||
POINT v14; // [esp-28h] [ebp-2Ch]
|
||||
POINT v15; // [esp-24h] [ebp-28h]
|
||||
POINT v16; // [esp-20h] [ebp-24h]
|
||||
POINT v17; // [esp-18h] [ebp-1Ch]
|
||||
if (m_voyageIcon != -1)
|
||||
{
|
||||
if (m_voyagePhase >= m_voyageTotal)
|
||||
{
|
||||
if (m_voyageIcon == 48 && m_voyageChannel == CDecor::GetBlupiChannelActual())
|
||||
{
|
||||
m_blupiAction = ACTION_STOP;
|
||||
m_blupiPhase = 0;
|
||||
m_blupiFocus = 1;
|
||||
m_blupiEnergyUnused = 100;
|
||||
}
|
||||
if (m_voyageIcon == 21 && m_voyageChannel == 10)
|
||||
{
|
||||
y = m_voyageEnd.y;
|
||||
++m_nbVies;
|
||||
v17.y = y;
|
||||
v17.x = m_voyageEnd.x;
|
||||
m_pSound->PlayImage(3, v17, -1);
|
||||
}
|
||||
if (m_voyageIcon == 6 && m_voyageChannel == 10)
|
||||
{
|
||||
++m_nbTresor;
|
||||
CDecor::OpenDoorsTresor();
|
||||
m_pSound->PlayImage(3, m_voyageEnd, -1);
|
||||
}
|
||||
if (m_voyageIcon == 215 && m_voyageChannel == 10)
|
||||
{
|
||||
x = m_voyageEnd.x;
|
||||
m_pSound = m_pSound;
|
||||
m_blupiCle |= CLE_RED;
|
||||
v16.y = m_voyageEnd.y;
|
||||
v16.x = x;
|
||||
m_pSound->PlayImage(3, v16, -1);
|
||||
}
|
||||
if (m_voyageIcon == 222 && m_voyageChannel == 10)
|
||||
{
|
||||
v7 = m_voyageEnd.x;
|
||||
m_blupiCle |= CLE_GREEN;
|
||||
v15.y = m_voyageEnd.y;
|
||||
v15.x = v7;
|
||||
m_pSound->PlayImage(3, v15, -1);
|
||||
}
|
||||
if (m_voyageIcon == 229 && m_voyageChannel == 10)
|
||||
{
|
||||
v8 = m_voyageEnd.y;
|
||||
m_blupiCle |= CLE_BLUE;
|
||||
v14.y = v8;
|
||||
v14.x = m_voyageEnd.x;
|
||||
m_pSound->PlayImage(3, v14, -1);
|
||||
}
|
||||
if (m_voyageIcon == GetIconPerso() && m_voyageChannel == 4)
|
||||
{
|
||||
v9 = m_voyageEnd.x;
|
||||
++m_blupiPerso;
|
||||
v13.y = m_voyageEnd.y;
|
||||
v13.x = v9;
|
||||
m_pSound->PlayImage(3, v13, -1);
|
||||
}
|
||||
if (m_voyageIcon == 252 && m_voyageChannel == 10)
|
||||
{
|
||||
v11 = m_voyageEnd.x;
|
||||
++m_blupiDynamite;
|
||||
v12.y = m_voyageEnd.y;
|
||||
v12.x = v11;
|
||||
m_pSound->PlayImage(3, v12, -1);
|
||||
}
|
||||
if (m_voyageIcon == 177 && m_voyageChannel == 10)
|
||||
{
|
||||
m_pSound->PlayImage(3, m_voyageEnd, -1);
|
||||
}
|
||||
m_voyageIcon = -1;
|
||||
}
|
||||
else if (!(m_time % 2) && m_voyageIcon >= 230 && m_voyageIcon <= 241 && m_voyageChannel == 10)
|
||||
{
|
||||
m_voyageIcon = m_voyageIcon + 1;
|
||||
if (m_voyageIcon + 1 > 241)
|
||||
{
|
||||
v3 = m_voyagePhase + 1;
|
||||
m_voyageIcon = 230;
|
||||
m_voyagePhase = v3;
|
||||
return;
|
||||
}
|
||||
}
|
||||
++m_voyagePhase;
|
||||
}
|
||||
}
|
||||
|
||||
void CDecor::VoyageDraw()
|
||||
{
|
||||
POINT v5; // ebx
|
||||
int v6; // eax
|
||||
int v8; // edi
|
||||
int v9; // ebx
|
||||
int v10; // ecx
|
||||
POINT v11; // [esp-14h] [ebp-2Ch]
|
||||
LONG pos; // [esp+10h] [ebp-8h]
|
||||
const int speed[9] = {
|
||||
-8, -6, -1, -1, -1, -4, -1, -1, -1
|
||||
};
|
||||
|
||||
if (m_voyageIcon != -1)
|
||||
{
|
||||
m_voyagePhase = m_voyagePhase;
|
||||
if (m_voyageIcon == 40 && m_voyageChannel == 10)
|
||||
{
|
||||
m_voyagePhase -= 30;
|
||||
if (m_voyagePhase < 0)
|
||||
{
|
||||
m_voyagePhase = 0;
|
||||
}
|
||||
}
|
||||
m_voyageTotal = m_voyageTotal;
|
||||
v5.x = m_voyageStart.x + m_voyagePhase * (m_voyageEnd.x - m_voyageStart.x) / m_voyageTotal;
|
||||
v6 = m_voyageIcon;
|
||||
v5.y = m_voyageStart.y + m_voyagePhase * (m_voyageEnd.y - m_voyageStart.y) / m_voyageTotal;
|
||||
if (v6 != 40 || m_voyageChannel != 10 || m_voyagePhase)
|
||||
{
|
||||
m_pPixmap->QuickIcon(m_voyageChannel, v6, v5);
|
||||
}
|
||||
if (m_voyageIcon == 40 && m_voyageChannel == 10)
|
||||
{
|
||||
v8 = m_posDecor.y + v5.y;
|
||||
pos = v5.x + m_posDecor.x - 34;
|
||||
v9 = speed[Random(0, 6)];
|
||||
v10 = Random(-10, 10);
|
||||
if (!m_voyagePhase)
|
||||
{
|
||||
v9 /= 2;
|
||||
v10 *= 4;
|
||||
}
|
||||
v11.y = v10 + v8;
|
||||
v11.x = pos;
|
||||
ObjectStart(v11, 93, v9, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CDecor::DrawMap(BOOL bPlay, int team)
|
||||
@ -1571,19 +1723,19 @@ BOOL CDecor::SearchWorld(int world, POINT *cel, POINT *newBlupiPos)
|
||||
{
|
||||
if (world == icon - Object::Level_1 + 1)
|
||||
{
|
||||
if (x > 1 && m_decor[x + 1][y].icon == Object::DoorLevel)
|
||||
if (x > 1 && m_decor[x - 1][y].icon == Object::DoorLevel)
|
||||
{
|
||||
*cel = { x - 1, y };
|
||||
*newBlupiPos = { (x - 2) * DIMOBJX + 2, y * DIMOBJY + 6 };
|
||||
return TRUE;
|
||||
}
|
||||
if (x > 2 && m_decor[x + 2][y].icon == Object::DoorLevel)
|
||||
if (x > 2 && m_decor[x - 2][y].icon == Object::DoorLevel)
|
||||
{
|
||||
*cel = { x - 2, y };
|
||||
*newBlupiPos = { (x - 3) * DIMOBJX + 2, y * DIMOBJY + 6 };
|
||||
return TRUE;
|
||||
}
|
||||
if (x < MAXCELX - 1 && m_decor[x - 1][y].icon == Object::DoorLevel)
|
||||
if (x < MAXCELX - 1 && m_decor[x + 1][y].icon == Object::DoorLevel)
|
||||
{
|
||||
*cel = { x + 1, y };
|
||||
*newBlupiPos = { (x + 2) * DIMOBJX + 2, y * DIMOBJY + 6 };
|
||||
@ -1604,37 +1756,15 @@ BOOL CDecor::SearchWorld(int world, POINT *cel, POINT *newBlupiPos)
|
||||
|
||||
BOOL CDecor::SearchDoor(int n, POINT *cel)
|
||||
{
|
||||
for (int i = 0; i < 100; i++)
|
||||
for (int x = 0; x < MAXCELX; x++)
|
||||
{
|
||||
for (int j = 0; j < 100; j++)
|
||||
for (int y = 0; y < MAXCELY; y++)
|
||||
{
|
||||
int icon = m_decor[i][j].icon;
|
||||
if (icon >= 174 && icon <= 181 && icon - 174 + 1 == n)
|
||||
if (m_decor[x][y].icon == 183)
|
||||
{
|
||||
if (i > 0 && m_decor[i - 1, j]->icon == 182)
|
||||
{
|
||||
cel->x = i - 1;
|
||||
cel->y = j;
|
||||
return TRUE;
|
||||
}
|
||||
if (i > 1 && m_decor[i - 2, j]->icon == 182)
|
||||
{
|
||||
cel->x = i - 2;
|
||||
cel->y = j;
|
||||
return TRUE;
|
||||
}
|
||||
if (i < 99 && m_decor[i + 1, j]->icon == 182)
|
||||
{
|
||||
cel->x = i + 1;
|
||||
cel->y = j;
|
||||
return TRUE;
|
||||
}
|
||||
if (i < 98 && m_decor[i + 2, j]->icon == 182)
|
||||
{
|
||||
cel->x = i + 2;
|
||||
cel->y = j;
|
||||
return TRUE;
|
||||
}
|
||||
cel->x = x;
|
||||
cel->y = y;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1713,8 +1843,8 @@ void CDecor::AdaptDoors(BOOL bPrivate, int mission)
|
||||
OpenDoor(cel);
|
||||
for (int j = 0; j < MAXNETPLAYER; j++)
|
||||
{
|
||||
m_blupiStartPos[i] = newPosBlupi;
|
||||
m_blupiStartDir[i] = (m_blupiStartPos[i].x < cel.x * DIMOBJX) ? DIR_RIGHT : DIR_LEFT;
|
||||
m_blupiStartPos[j] = newPosBlupi;
|
||||
m_blupiStartDir[j] = (m_blupiStartPos[j].x < cel.x * DIMOBJX) ? DIR_RIGHT : DIR_LEFT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1741,7 +1871,7 @@ void CDecor::OpenDoorsTresor()
|
||||
void CDecor::OpenDoor(POINT cel)
|
||||
{
|
||||
int icon = m_decor[cel.x][cel.y].icon;
|
||||
m_decor[cel.x, cel.y]->icon = -1;
|
||||
m_decor[cel.x][cel.y].icon = -1;
|
||||
int num = MoveObjectFree();
|
||||
m_moveObject[num].type = TYPE_DOOR;
|
||||
m_moveObject[num].stepAdvance = 50;
|
||||
|
111
src/def.h
111
src/def.h
@ -29,8 +29,8 @@
|
||||
#define MAXNOTIF 5
|
||||
#define MAXFIFOPOS 10
|
||||
|
||||
#define LXIMAGE 320 // dimensions de la fenêtre de jeu
|
||||
#define LYIMAGE 240
|
||||
#define LXIMAGE 640 // dimensions de la fenêtre de jeu
|
||||
#define LYIMAGE 480
|
||||
|
||||
#define POSDRAWX 0
|
||||
#define POSDRAWY 0
|
||||
@ -221,6 +221,95 @@ enum {
|
||||
SEC_HIDE
|
||||
};
|
||||
|
||||
static char debugMobTypeNames[204][20] =
|
||||
{
|
||||
"-",
|
||||
"ascenseur",
|
||||
"bombedown",
|
||||
"bombeup",
|
||||
"bulldozer",
|
||||
"tresor",
|
||||
"egg",
|
||||
"goal",
|
||||
"explo1",
|
||||
"explo2",
|
||||
"explo3",
|
||||
"explo4",
|
||||
"caisse",
|
||||
"helico",
|
||||
"plouf",
|
||||
"blup",
|
||||
"bombemove",
|
||||
"poisson",
|
||||
"tomates",
|
||||
"jeep",
|
||||
"oiseau",
|
||||
"cle",
|
||||
"door",
|
||||
"balle",
|
||||
"skate",
|
||||
"shield",
|
||||
"power",
|
||||
"magictrack",
|
||||
"tank",
|
||||
"bullet",
|
||||
"drink",
|
||||
"charge",
|
||||
"blupihelico",
|
||||
"blupitank",
|
||||
"glu",
|
||||
"tiplouf",
|
||||
"pollution",
|
||||
"clear",
|
||||
"electro",
|
||||
"tresortrack",
|
||||
"invert",
|
||||
"invertstart",
|
||||
"invertstop",
|
||||
"?????? (43)",
|
||||
"guepe",
|
||||
"?????? (45)",
|
||||
"over",
|
||||
"ascenseur s",
|
||||
"ascenseur si",
|
||||
"cle1",
|
||||
"cle2",
|
||||
"cle3",
|
||||
"bridge",
|
||||
"tentacule",
|
||||
"creature",
|
||||
"dynamite",
|
||||
"dynamite f",
|
||||
"shieldtrack",
|
||||
"hidetrack",
|
||||
"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",
|
||||
"explo5",
|
||||
"explo6",
|
||||
"explo7",
|
||||
"explo8",
|
||||
"explo9",
|
||||
"explo10",
|
||||
"bombefollow1",
|
||||
"bombefollow2",
|
||||
"sploutch1",
|
||||
"sploutch2",
|
||||
"sploutch3",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","","",
|
||||
"","","","","","","","","",
|
||||
"bombeperso1",
|
||||
"bombeperso2",
|
||||
"bombeperso3",
|
||||
"bombeperso4"
|
||||
};
|
||||
|
||||
// Types :
|
||||
|
||||
#define TYPE_ASCENSEUR 1 // lift
|
||||
@ -1136,7 +1225,7 @@ namespace Object {
|
||||
Saw_4,
|
||||
Saw_5,
|
||||
Saw_6,
|
||||
SawSwitchOn, // 382
|
||||
SawSwitchOn, // 384
|
||||
SawSwitchOff,
|
||||
Palace_1,
|
||||
Palace_2,
|
||||
@ -1152,7 +1241,7 @@ namespace Object {
|
||||
Palace_12,
|
||||
PalaceElement_1,
|
||||
PalaceElement_2,
|
||||
PalaceElement_3, // 398
|
||||
PalaceElement_3, // 400
|
||||
SpiderWeb_1,
|
||||
SpiderWeb_2,
|
||||
SpiderWeb_3,
|
||||
@ -1168,7 +1257,7 @@ namespace Object {
|
||||
World_12,
|
||||
World_13,
|
||||
World_14,
|
||||
WorldDone_10, // 414
|
||||
WorldDone_10, // 416
|
||||
WorldDone_11,
|
||||
WorldDone_12,
|
||||
WorldDone_13,
|
||||
@ -1184,7 +1273,7 @@ namespace Object {
|
||||
DoorTreasure_9,
|
||||
DoorTreasure_10,
|
||||
DoorTreasure_11,
|
||||
DoorTreasure_12, // 430
|
||||
DoorTreasure_12, // 432
|
||||
DoorTreasure_13,
|
||||
DoorTreasure_14,
|
||||
DoorTreasure_15,
|
||||
@ -1263,4 +1352,14 @@ POINT operator*=(POINT p, const int& a)
|
||||
POINT operator/=(POINT p, const int& a)
|
||||
{
|
||||
return { p.x /= a, p.y /= a };
|
||||
}
|
||||
|
||||
bool operator!=(POINT a, const POINT& b)
|
||||
{
|
||||
return a.x != b.x || a.y != b.y;
|
||||
}
|
||||
|
||||
bool operator==(POINT a, const POINT& b)
|
||||
{
|
||||
return a.x == b.x && a.y == b.y;
|
||||
}
|
@ -1779,7 +1779,7 @@ CEvent::CEvent()
|
||||
m_phase = 0;
|
||||
m_bSchool = FALSE;
|
||||
m_bPrivate = FALSE;
|
||||
m_bBuildOfficialMissions = TRUE;
|
||||
m_bBuildOfficialMissions = FALSE;
|
||||
m_bRunMovie = FALSE;
|
||||
m_bBuildModify = FALSE;
|
||||
m_bMousePress = FALSE;
|
||||
@ -3160,6 +3160,11 @@ BOOL CEvent::TreatEventBase(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rankCheat = -1;
|
||||
m_posCheat = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3184,7 +3189,7 @@ BOOL CEvent::TreatEventBase(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
return ChangePhase(WM_PHASE_GAMER);
|
||||
}
|
||||
if (m_mission % 10 != 0 && m_mission != 10)
|
||||
if (m_mission % 10 == 0 && m_mission != 10)
|
||||
{
|
||||
SetMission(1);
|
||||
m_phase = WM_PHASE_PLAY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user