[Scummvm-git-logs] scummvm master -> f19954fad88ce3c9ea9e937e7d76c98afe03cd6b
bluegr
noreply at scummvm.org
Sun Jul 3 21:03:01 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f19954fad8 CHEWY: Fix skeleton and machete state in room 73 (jungle) - bug #13626
Commit: f19954fad88ce3c9ea9e937e7d76c98afe03cd6b
https://github.com/scummvm/scummvm/commit/f19954fad88ce3c9ea9e937e7d76c98afe03cd6b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-04T00:02:37+03:00
Commit Message:
CHEWY: Fix skeleton and machete state in room 73 (jungle) - bug #13626
Changed paths:
engines/chewy/rooms/room73.cpp
engines/chewy/rooms/room73.h
engines/chewy/t_event.cpp
engines/chewy/types.h
diff --git a/engines/chewy/rooms/room73.cpp b/engines/chewy/rooms/room73.cpp
index ec03b1ad249..0d0685ce0d3 100644
--- a/engines/chewy/rooms/room73.cpp
+++ b/engines/chewy/rooms/room73.cpp
@@ -43,8 +43,12 @@ void Room73::entry(int16 eib_nr) {
_G(flags).ZoomMov = true;
_G(zoom_mov_fak) = 3;
_G(SetUpScreenFunc) = setup_func;
+
if (_G(gameState).flags28_20)
- _G(det)->showStaticSpr(3+ (_G(gameState).R63Feuer ? 1 : 0)); // flags25_40
+ moveBushes();
+
+ if (_G(gameState).flags28_40)
+ pickupMachete();
if (_G(flags).LoadGame)
return;
@@ -55,6 +59,7 @@ void Room73::entry(int16 eib_nr) {
break;
case 115:
leftEntry();
+ break;
default:
break;
}
@@ -80,24 +85,21 @@ void Room73::xit(int16 eib_nr) {
}
}
-int Room73::proc1() {
- if (_G(cur)->usingInventoryCursor() && !_G(gameState).flags28_20)
+int Room73::procMoveBushes() {
+ if (_G(cur)->usingInventoryCursor() || _G(gameState).flags28_20)
return 0;
hideCur();
_G(gameState).flags28_20 = true;
autoMove(3, P_CHEWY);
start_spz_wait(13, 1, false, P_CHEWY);
- _G(atds)->delControlBit(433, ATS_ACTIVE_BIT);
- _G(atds)->delControlBit(432, ATS_ACTIVE_BIT);
- _G(atds)->set_ats_str(430, 1, ATS_DATA);
- _G(det)->showStaticSpr(3);
+ moveBushes();
showCur();
return 1;
}
-int Room73::proc2() {
+int Room73::procPickupMachete() {
if (_G(cur)->usingInventoryCursor())
return 0;
@@ -105,14 +107,27 @@ int Room73::proc2() {
_G(gameState).flags28_40 = true;
autoMove(4, P_CHEWY);
start_spz_wait(13, 1, false, P_CHEWY);
- _G(det)->hideStaticSpr(3);
- _G(det)->hideStaticSpr(4);
- _G(atds)->setControlBit(433, ATS_ACTIVE_BIT);
+ pickupMachete();
new_invent_2_cur(99);
showCur();
return 1;
}
+void Room73::moveBushes() {
+ _G(atds)->delControlBit(433, ATS_ACTIVE_BIT); // show machete hotspot
+ _G(atds)->delControlBit(432, ATS_ACTIVE_BIT); // show skeleton hotspot
+ _G(det)->showStaticSpr(3); // show skeleton + machete
+ _G(det)->hideStaticSpr(4); // hide skeleton
+ _G(atds)->set_ats_str(430, 1, ATS_DATA);
+}
+
+void Room73::pickupMachete() {
+ _G(atds)->setControlBit(433, ATS_ACTIVE_BIT); // hide machete hotspot
+ _G(atds)->setControlBit(432, ATS_ACTIVE_BIT); // show skeleton hotspot
+ _G(det)->hideStaticSpr(3); // hide skeleton + machete
+ _G(det)->showStaticSpr(4); // show skeleton
+}
+
} // namespace Rooms
} // namespace Chewy
diff --git a/engines/chewy/rooms/room73.h b/engines/chewy/rooms/room73.h
index 530f7b22e18..aa1d51740d5 100644
--- a/engines/chewy/rooms/room73.h
+++ b/engines/chewy/rooms/room73.h
@@ -29,8 +29,11 @@ class Room73 : public JungleRoom {
public:
static void entry(int16 eib_nr);
static void xit(int16 eib_nr);
- static int proc1();
- static int proc2();
+ static int procMoveBushes();
+ static int procPickupMachete();
+private:
+ static void moveBushes();
+ static void pickupMachete();
};
} // namespace Rooms
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index e0bdac8a17b..4603f15349c 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -608,11 +608,11 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
break;
case 430:
- retValue = Room73::proc1();
+ retValue = Room73::procMoveBushes();
break;
case 433:
- retValue = Room73::proc2();
+ retValue = Room73::procPickupMachete();
break;
case 435:
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index c9be166323d..8d2fa0f8855 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -280,8 +280,8 @@ struct GameFlags {
bool flags28_4 : 1;
bool flags28_8 : 1;
bool flags28_10 : 1;
- bool flags28_20 : 1;
- bool flags28_40 : 1;
+ bool flags28_20 : 1; // bushes moved
+ bool flags28_40 : 1; // machete picked up
bool R74CutRubberPlant : 1;
bool flags29_1 : 1;
More information about the Scummvm-git-logs
mailing list