diff --git a/.vs/Speedy Eggbert 2 Source/v17/Browse.VC.db b/.vs/Speedy Eggbert 2 Source/v17/Browse.VC.db index 2f774ea..25a60dc 100644 Binary files a/.vs/Speedy Eggbert 2 Source/v17/Browse.VC.db and b/.vs/Speedy Eggbert 2 Source/v17/Browse.VC.db differ diff --git a/.vs/Speedy-Eggbert-2-Source-Code-Decomp/v17/.wsuo b/.vs/Speedy-Eggbert-2-Source-Code-Decomp/v17/.wsuo index 9f1f35a..4bc6e04 100644 Binary files a/.vs/Speedy-Eggbert-2-Source-Code-Decomp/v17/.wsuo and b/.vs/Speedy-Eggbert-2-Source-Code-Decomp/v17/.wsuo differ diff --git a/.vs/Speedy-Eggbert-2-Source-Code-Decomp/v17/Browse.VC.db b/.vs/Speedy-Eggbert-2-Source-Code-Decomp/v17/Browse.VC.db index a0cc6a6..009dfa8 100644 Binary files a/.vs/Speedy-Eggbert-2-Source-Code-Decomp/v17/Browse.VC.db and b/.vs/Speedy-Eggbert-2-Source-Code-Decomp/v17/Browse.VC.db differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 40a080c..978443b 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/decor.cpp b/decor.cpp index a141c49..9d16fb8 100644 --- a/decor.cpp +++ b/decor.cpp @@ -8000,7 +8000,102 @@ void CDecor::VoyageInit(POINT start, POINT end, int icon, int channel) m_voyagePhase = m_voyageTotal; VoyageStep(); } + m_voyageStart = start; + m_voyageEnd = end; + m_voyageIcon = icon; + m_voyageChannel = channel; + int num = abs(end.x - start.x); + int num2 = abs(end.y - start.y); + m_voyagePhase = 0; + m_voyageTotal = (num + num2) / 10; + if (m_voyageIcon == 48 && m_voyageChannel == 2) + { + m_voyageTotal = 40; + m_nbVies--; + m_pSound->PlayImage(9, end, -1, FALSE); + } + if (m_voyageIcon == 21 && m_voyageChannel == 10) + { + m_pSound->PlayImage(12, start, -1, FALSE); + } + if (m_voyageIcon == 6 && m_voyageChannel == 10) + { + if (m_nbTresor == m_totalTresor - 1) + { + m_pSound->PlayImage(19, start, -1, FALSE); + } + else + { + m_pSound->PlayImage(11, start, -1, FALSE); + } + } + if (m_voyageIcon == 215 && m_voyageChannel == 10) + { + m_pSound->PlayImage(11, start, -1, FALSE); + } + if (m_voyageIcon == 222 && m_voyageChannel == 10) + { + m_pSound->PlayImage(11, start, -1, FALSE); + } + if (m_voyageIcon == 229 && m_voyageChannel == 10) + { + m_pSound->PlayImage(11, start, -1, FALSE); + } + if (m_voyageIcon == 108 && m_voyageChannel == 4) + { + m_pSound->PlayImage(60, start, -1, FALSE); + } + if (m_voyageIcon == 252 && m_voyageChannel == 10) + { + m_pSound->PlayImage(60, start, -1, FALSE); + } + if (m_voyageIcon == 177 && m_voyageChannel == 10) + { + m_pSound->PlayImage(54, start, -1, FALSE); + } + if (m_voyageIcon == 230 && m_voyageChannel == 10) + { + m_voyageTotal = 100; + } + if (m_voyageIcon == 40 && m_voyageChannel == 10) + { + m_voyageTotal = 50; + } +} +// Add VoyageStep + +// Add VoyageDraw + +BOOL CDecor::IsFloatingObject(int i) +{ + POINT posCurrent = m_moveObject[i]->posCurrent; + int num = (posCurrent.x + 32) / 64; + int num2 = posCurrent.y / 64 + 1; + int icon = m_decor[num, num2]->icon; + return IsPassIcon(icon); +} + +// Add IsRightBorder + +BOOL CDecor::IsFromage(int x, int y) +{ + if (x < 0 || x >= 100 || y < 0 || y >= 100) + { + return FALSE; + } + int icon = m_decor[x, y]->icon; + return (icon >= 246 && icon <= 249) || icon == 339; +} + +BOOL CDecor::IsGrotte(int x, int y) +{ + if (x < 0 || x >= 100 || y < 0 || y >= 100) + { + return FALSE; + } + int icon = m_decor[x, y]->icon; + return icon = 284 || icon == 301 || icon == 337; } BOOL CDecor::SearchDoor(int n, POINT cel, POINT blupi) diff --git a/decor.h b/decor.h index e45186c..213fed5 100644 --- a/decor.h +++ b/decor.h @@ -626,6 +626,11 @@ public: int MoveObjectSearch(POINT pos, int type); void VoyageInit(POINT start, POINT end, int icon, int channel); void VoyageStep(); + BOOL IsFloatingObject(int i); + BOOL IsRightBorder(int x, int y, int dx, int dy); + BOOL IsFromage(int x, int y); + BOOL IsGrotte(int x, int y); + void AdaptMidBorder(int x, int y); void DynamiteStart(int i, int dx, int dy); int AscenseurDetect(RECT rect, POINT oldpos, POINT newpos); void ByeByeHelico(); @@ -689,6 +694,11 @@ protected: BOOL m_bSuperBlupi; Random m_random; WMessage m_phase; + int m_voyagePhase; + int m_voyageTotal; + POINT m_voyageStart; + POINT m_voyageEnd; + int m_voyageChannel; int m_targetMission; char m_missionTitle[100]; int m_nbCases;