[Scummvm-git-logs] scummvm branch-2-6 -> 886a140841a3dd7cd1a28f8a862633f5f3ba993d
bluegr
noreply at scummvm.org
Thu Jul 7 12:13:58 UTC 2022
This automated email contains information about 11 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3b184e2159 CHEWY: Remove leftover debug messages
bb4e89cd63 CHEWY: Remove dead code
a0a2c3b9a7 CHEWY: Rename stop_detail() -> stopDetail()
8d77908a6b CHEWY: Move the ChewyFont class into a separate file
cf1a10f24a CHEWY: Move private members of FontMgr
9c745730a7 CHEWY: Remove the InputMgr class
3fbaf437b1 CHEWY: Cleanup
89d365781b CHEWY: Remove the CustomInfo struct
13462c1f6e CHEWY: Change default value of getSwitchCode()
6ea7408f09 CHEWY: Clear pending events when starting or skipping text
886a140841 CHEWY: Fix in-game dialogs - bugs #13594 and 13632
Commit: 3b184e2159aa1850a88dd4f860519881ddc11ff1
https://github.com/scummvm/scummvm/commit/3b184e2159aa1850a88dd4f860519881ddc11ff1
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:34+03:00
Commit Message:
CHEWY: Remove leftover debug messages
Changed paths:
engines/chewy/detail.cpp
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 665f1720aeb..842a057b237 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -56,10 +56,8 @@ bool SoundDefBlk::load(Common::SeekableReadStream *src) {
int i;
src->skip(MAX_SOUNDS * 2); // sound_enable flags
- for (i = 0; i < MAX_SOUNDS; ++i) {
+ for (i = 0; i < MAX_SOUNDS; ++i)
sound_index[i] = src->readSint16LE();
- debug("Sound %d: %d", i, sound_index[i]);
- }
for (i = 0; i < MAX_SOUNDS; ++i)
sound_start[i] = src->readSint16LE();
for (i = 0; i < MAX_SOUNDS; ++i)
Commit: bb4e89cd63bde9902cbc828b645600395592a004
https://github.com/scummvm/scummvm/commit/bb4e89cd63bde9902cbc828b645600395592a004
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:35+03:00
Commit Message:
CHEWY: Remove dead code
Changed paths:
engines/chewy/dialogs/main_menu.cpp
engines/chewy/types.cpp
engines/chewy/types.h
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index a7b53720fcb..c896ae41584 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -55,7 +55,6 @@ void MainMenu::execute() {
g_events->_mousePos.y = 92;
_G(cur)->setInventoryCursor(-1);
_G(menu_display) = 0;
- _G(gameState).soundLoopMode = 1;
bool done = false;
while (!done && !SHOULD_QUIT) {
@@ -174,12 +173,10 @@ void MainMenu::startGame() {
exit_room(-1);
uint8 framesPerSecond = _G(gameState).FramesPerSecond;
- int sndLoopMode = _G(gameState).soundLoopMode;
var_init();
_G(gameState).FramesPerSecond = framesPerSecond;
- _G(gameState).soundLoopMode = sndLoopMode;
_G(gameState)._personRoomNr[P_CHEWY] = 0;
_G(room)->loadRoom(&_G(room_blk), 0, &_G(gameState));
diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
index 35bbb906a51..661e01c7e6f 100644
--- a/engines/chewy/types.cpp
+++ b/engines/chewy/types.cpp
@@ -154,7 +154,7 @@ bool GameState::synchronize(Common::Serializer &s) {
s.syncAsSint16LE(SVal2);
s.syncAsSint16LE(SVal3);
s.syncAsSint16LE(SVal4);
- s.syncAsSint16LE(soundLoopMode);
+ s.syncAsSint16LE(dummy16); // sound loop mode
s.syncAsByte(dummy); // sound switch
s.syncAsByte(dummy); // sound volume
s.syncAsByte(dummy); // music switch
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 42000ef1a28..28986df32bb 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -505,7 +505,6 @@ struct GameState : public GameFlags {
int16 SVal2 = 0;
int16 SVal3 = 0;
int16 SVal4 = 0;
- int16 soundLoopMode = 0;
uint8 FramesPerSecond = 0;
};
Commit: a0a2c3b9a7b9866e2a0da695e116e9780ac34afc
https://github.com/scummvm/scummvm/commit/a0a2c3b9a7b9866e2a0da695e116e9780ac34afc
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:35+03:00
Commit Message:
CHEWY: Rename stop_detail() -> stopDetail()
Changed paths:
engines/chewy/detail.cpp
engines/chewy/detail.h
engines/chewy/menus.cpp
engines/chewy/object.cpp
engines/chewy/r_event.cpp
engines/chewy/rooms/room00.cpp
engines/chewy/rooms/room02.cpp
engines/chewy/rooms/room03.cpp
engines/chewy/rooms/room06.cpp
engines/chewy/rooms/room07.cpp
engines/chewy/rooms/room08.cpp
engines/chewy/rooms/room11.cpp
engines/chewy/rooms/room12.cpp
engines/chewy/rooms/room13.cpp
engines/chewy/rooms/room18.cpp
engines/chewy/rooms/room21.cpp
engines/chewy/rooms/room22.cpp
engines/chewy/rooms/room23.cpp
engines/chewy/rooms/room24.cpp
engines/chewy/rooms/room25.cpp
engines/chewy/rooms/room29.cpp
engines/chewy/rooms/room35.cpp
engines/chewy/rooms/room37.cpp
engines/chewy/rooms/room39.cpp
engines/chewy/rooms/room40.cpp
engines/chewy/rooms/room41.cpp
engines/chewy/rooms/room42.cpp
engines/chewy/rooms/room45.cpp
engines/chewy/rooms/room46.cpp
engines/chewy/rooms/room48.cpp
engines/chewy/rooms/room49.cpp
engines/chewy/rooms/room50.cpp
engines/chewy/rooms/room51.cpp
engines/chewy/rooms/room52.cpp
engines/chewy/rooms/room54.cpp
engines/chewy/rooms/room55.cpp
engines/chewy/rooms/room56.cpp
engines/chewy/rooms/room62.cpp
engines/chewy/rooms/room63.cpp
engines/chewy/rooms/room64.cpp
engines/chewy/rooms/room65.cpp
engines/chewy/rooms/room67.cpp
engines/chewy/rooms/room68.cpp
engines/chewy/rooms/room71.cpp
engines/chewy/rooms/room78.cpp
engines/chewy/rooms/room81.cpp
engines/chewy/rooms/room82.cpp
engines/chewy/rooms/room84.cpp
engines/chewy/rooms/room85.cpp
engines/chewy/rooms/room86.cpp
engines/chewy/rooms/room90.cpp
engines/chewy/rooms/room91.cpp
engines/chewy/rooms/room94.cpp
engines/chewy/rooms/room97.cpp
engines/chewy/t_event.cpp
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 842a057b237..8e3a9c63519 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -484,7 +484,7 @@ void Detail::startDetail(int16 nr, int16 rep, int16 reverse) {
}
}
-void Detail::stop_detail(int16 nr) {
+void Detail::stopDetail(int16 nr) {
if (nr >= 0 && nr < 32) {
_rdi.Ainfo[nr].start_flag = 0;
}
diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h
index b9ec6e63220..11ec7bba2f3 100644
--- a/engines/chewy/detail.h
+++ b/engines/chewy/detail.h
@@ -186,7 +186,7 @@ public:
void del_static_ani(int16 ani_nr);
void startDetail(int16 nr, int16 rep, int16 reverse);
- void stop_detail(int16 nr);
+ void stopDetail(int16 nr);
void playSound(int16 nr, int16 slot);
void stopSound(int16 slot);
void plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 43ba04996a5..e8e4a1f012c 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -300,7 +300,7 @@ void handleDialogCloseupMenu() {
_G(ads_blk_nr) = an_blk->_blkNr;
_G(dialogCloseupItemPtr) = _G(atds)->dialogCloseupItemPtr(_G(ads_dia_nr), _G(ads_blk_nr), &_G(ads_item_nr));
}
- _G(det)->stop_detail(_G(talk_start_ani));
+ _G(det)->stopDetail(_G(talk_start_ani));
_G(det)->showStaticSpr(_G(talk_hide_static));
_G(talk_start_ani) = -1;
_G(talk_hide_static) = -1;
diff --git a/engines/chewy/object.cpp b/engines/chewy/object.cpp
index 51d911b5df4..f38ef911bb8 100644
--- a/engines/chewy/object.cpp
+++ b/engines/chewy/object.cpp
@@ -373,14 +373,14 @@ void Object::calc_static_detail(int16 det_nr) {
nr = SIB_ZUSTAND_TBL[i];
if (nr >= 40)
- _G(det)->stop_detail(nr - 40);
+ _G(det)->stopDetail(nr - 40);
else
_G(det)->hideStaticSpr(nr);
++i;
}
}
} else if (nr >= 40)
- _G(det)->stop_detail(nr - 40);
+ _G(det)->stopDetail(nr - 40);
else {
_G(det)->hideStaticSpr(nr);
}
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index c599bb95b81..36dfc1f4269 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -854,7 +854,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
case SIB_TERMINAL_R5:
if (_G(gameState).R5Terminal) {
_G(gameState).R5Terminal = 0;
- _G(det)->stop_detail(6);
+ _G(det)->stopDetail(6);
_G(atds)->set_ats_str(27, TXT_MARK_LOOK, 0, ATS_DATA);
_G(atds)->set_ats_str(30, TXT_MARK_LOOK, 0, ATS_DATA);
}
@@ -957,7 +957,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
_G(det)->startDetail(i, 255, ANI_FRONT);
} else {
for (int i = 0; i < 5; ++i)
- _G(det)->stop_detail(i);
+ _G(det)->stopDetail(i);
}
_G(atds)->set_ats_str(94, TXT_MARK_LOOK, _G(gameState).R13Bandlauf, ATS_DATA);
@@ -1120,7 +1120,7 @@ int16 sib_event_no_inv(int16 sib_nr) {
case SIB_ASHTRAY_R64:
// Pick up ashtray
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(obj)->hide_sib(sib_nr);
_G(gameState).R64AshtrayTaken = true;
Room64::talk_man(351);
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index c4de91f8f38..ec9bdc79705 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -578,7 +578,7 @@ void Room0::checkFeed() {
if (adi->ani_count == 136) {
_G(gameState)._personHide[P_CHEWY] = true;
if (!_G(gameState).R0SlimeUsed)
- _G(det)->stop_detail(16);
+ _G(det)->stopDetail(16);
}
if (adi->ani_count > 138) {
diff --git a/engines/chewy/rooms/room02.cpp b/engines/chewy/rooms/room02.cpp
index 6a345bca5ad..6f2248c9c37 100644
--- a/engines/chewy/rooms/room02.cpp
+++ b/engines/chewy/rooms/room02.cpp
@@ -47,7 +47,7 @@ void Room2::jump_out_r1(int16 nr) {
_G(gameState)._personHide[P_CHEWY] = true;
startSetAILWait(nr, 1, ANI_FRONT);
setupScreen(DO_SETUP);
- _G(det)->stop_detail(6);
+ _G(det)->stopDetail(6);
setPersonPos(32, 127, P_CHEWY, P_LEFT);
_G(gameState)._personHide[P_CHEWY] = false;
clear_prog_ani();
@@ -59,7 +59,7 @@ void Room2::electrifyWalkway1() {
_G(det)->startDetail(ANI_5, 255, ANI_FRONT);
start_spz(CH_TALK6, 255, false, ANI_FRONT);
startAadWait(49);
- _G(det)->stop_detail(ANI_5);
+ _G(det)->stopDetail(ANI_5);
_G(det)->startDetail(GRID_FLASHING, 12, ANI_FRONT);
_G(gameState).R2ElectrocutedBork = true;
@@ -80,7 +80,7 @@ void Room2::electrifyWalkway2() {
void Room2::gedAction(int index) {
if (index == 0) {
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
if (!_G(gameState).R2ElectrocutedBork)
_G(det)->startDetail(6, 2, ANI_FRONT);
else
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index 3ad7539e1db..44eb836f114 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -106,7 +106,7 @@ void Room3::terminal() {
_G(spr_info)[0]._zLevel = 0;
if (!_G(gameState).R2ElectrocutedBork) {
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
startAniBlock(2, ABLOCK3);
if (_G(gameState).R2FussSchleim) {
_G(gameState).R2FussSchleim = false;
@@ -115,7 +115,7 @@ void Room3::terminal() {
_G(gameState)._personHide[P_CHEWY] = true;
startSetAILWait(8, 1, ANI_FRONT);
setupScreen(DO_SETUP);
- _G(det)->stop_detail(6);
+ _G(det)->stopDetail(6);
clear_prog_ani();
switchRoom(1);
startAniBlock(2, ABLOCK0);
diff --git a/engines/chewy/rooms/room06.cpp b/engines/chewy/rooms/room06.cpp
index ae94c6553bc..69cc50f5b66 100644
--- a/engines/chewy/rooms/room06.cpp
+++ b/engines/chewy/rooms/room06.cpp
@@ -66,7 +66,7 @@ void Room6::entry() {
if (_G(gameState).R6RaumBetreten == 2) {
hideCur();
- _G(det)->stop_detail(7);
+ _G(det)->stopDetail(7);
init_robo();
wait_auto_obj(0);
_G(gameState).R6BolaOk = true;
diff --git a/engines/chewy/rooms/room07.cpp b/engines/chewy/rooms/room07.cpp
index a51a4c768b7..f5aff1ba52e 100644
--- a/engines/chewy/rooms/room07.cpp
+++ b/engines/chewy/rooms/room07.cpp
@@ -87,7 +87,7 @@ void Room7::bell() {
startSetAILWait(12, 1, ANI_FRONT);
startSetAILWait(11, 1, ANI_FRONT);
_G(det)->hideStaticSpr(7);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
setPersonPos(95, 94, P_CHEWY, P_RIGHT);
_G(gameState)._personHide[P_CHEWY] = false;
} else if (_G(gameState).R7BellCount == 1) {
@@ -98,7 +98,7 @@ void Room7::bell() {
startSetAILWait(10, 1, ANI_FRONT);
_G(det)->startDetail(13, 1, ANI_FRONT);
setPersonPos(95, 94, P_CHEWY, P_RIGHT);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(gameState)._personHide[P_CHEWY] = false;
_G(flags).NoScroll = true;
@@ -108,7 +108,7 @@ void Room7::bell() {
_G(det)->startDetail(0, 255, ANI_FRONT);
startSetAILWait(13, 1, ANI_FRONT);
flic_cut(FCUT_001);
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(gameState).scrollx = 0;
_G(gameState).scrolly = 0;
setPersonPos(114, 138, P_CHEWY, -1);
@@ -133,7 +133,7 @@ void Room7::bell() {
_G(det)->load_taf_seq(192, 74, nullptr);
_G(det)->startDetail(14, 1, ANI_FRONT);
setPersonPos(95, 94, P_CHEWY, P_RIGHT);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(gameState)._personHide[P_CHEWY] = false;
_G(flags).NoScroll = true;
@@ -143,7 +143,7 @@ void Room7::bell() {
waitDetail(14);
startAniBlock(4, ABLOCK10);
_G(det)->hideStaticSpr(7);
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
setPersonPos(181, 130, P_CHEWY, P_RIGHT);
_G(gameState)._personHide[P_CHEWY] = false;
_G(flags).NoScroll = false;
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index e5455c690fd..5f280128755 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -52,7 +52,7 @@ void Room8::entry() {
void Room8::start_folter() {
_G(atds)->set_ats_str(67, 1, ATS_DATA);
- _G(det)->stop_detail(19);
+ _G(det)->stopDetail(19);
_G(det)->startDetail(13, 255, ANI_FRONT);
}
@@ -60,7 +60,7 @@ void Room8::stop_folter() {
_G(atds)->set_ats_str(67, 0, ATS_DATA);
_G(det)->startDetail(19, 255, ANI_FRONT);
- _G(det)->stop_detail(13);
+ _G(det)->stopDetail(13);
_G(gameState).R8Folter = true;
_G(obj)->hide_sib(SIB_FOLTER_R8);
@@ -102,7 +102,7 @@ void Room8::start_verbrennen() {
}
}
- _G(det)->stop_detail(9);
+ _G(det)->stopDetail(9);
setPersonPos(129, 246, P_CHEWY, P_RIGHT);
startAniBlock(2, ABLOCK13);
_G(atds)->set_ats_str(60, TXT_MARK_LOOK, 1, ATS_DATA);
diff --git a/engines/chewy/rooms/room11.cpp b/engines/chewy/rooms/room11.cpp
index 960b4e8d1ed..0e10bb5d14f 100644
--- a/engines/chewy/rooms/room11.cpp
+++ b/engines/chewy/rooms/room11.cpp
@@ -66,7 +66,7 @@ void Room11::entry() {
startAniBlock(2, ABLOCK17);
autoMove(8, P_CHEWY);
startAadWait(31);
- _G(det)->stop_detail(9);
+ _G(det)->stopDetail(9);
}
_G(det)->showStaticSpr(8);
if (!_G(flags).LoadGame)
@@ -125,7 +125,7 @@ void Room11::chewy_bo_use() {
_G(det)->hideStaticSpr(8);
startAniBlock(2, ABLOCK17);
startAadWait(32);
- _G(det)->stop_detail(9);
+ _G(det)->stopDetail(9);
_G(det)->showStaticSpr(8);
autoMove(6, P_CHEWY);
@@ -183,7 +183,7 @@ void Room11::get_card() {
_G(obj)->addInventory(_G(gameState).R11IdCardNr, &_G(room_blk));
_G(cur)->setInventoryCursor(_G(gameState).R11IdCardNr);
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(atds)->set_ats_str(83, TXT_MARK_LOOK, 0, ATS_DATA);
_G(atds)->set_ats_str(84, TXT_MARK_LOOK, 0, ATS_DATA);
}
diff --git a/engines/chewy/rooms/room12.cpp b/engines/chewy/rooms/room12.cpp
index a534bd71bf1..fe2c8bf1ebb 100644
--- a/engines/chewy/rooms/room12.cpp
+++ b/engines/chewy/rooms/room12.cpp
@@ -173,7 +173,7 @@ void Room12::bork_ok() {
_G(det)->setDetailPos(3, 170, 145);
_G(det)->startDetail(3, 255, ANI_FRONT);
startAadWait(57);
- _G(det)->stop_detail(3);
+ _G(det)->stopDetail(3);
_G(mov_phasen)[R12_BORK_OBJ].Repeat = 1;
_G(mov_phasen)[R12_BORK_OBJ].Lines = 3;
diff --git a/engines/chewy/rooms/room13.cpp b/engines/chewy/rooms/room13.cpp
index f474231cb27..46c88ba4b48 100644
--- a/engines/chewy/rooms/room13.cpp
+++ b/engines/chewy/rooms/room13.cpp
@@ -107,7 +107,7 @@ void Room13::talk_bork() {
_G(det)->setStaticPos(12, _G(moveState)[P_CHEWY].Xypos[0], _G(moveState)[P_CHEWY].Xypos[1], false, true);
_G(gameState)._personHide[P_CHEWY] = true;
startAadWait(33);
- _G(det)->stop_detail(9);
+ _G(det)->stopDetail(9);
_G(det)->load_taf_seq(86, 12, nullptr);
_G(gameState)._personHide[P_CHEWY] = false;
_G(det)->hideStaticSpr(12);
diff --git a/engines/chewy/rooms/room18.cpp b/engines/chewy/rooms/room18.cpp
index 394a5f0b08a..9b174ebdc53 100644
--- a/engines/chewy/rooms/room18.cpp
+++ b/engines/chewy/rooms/room18.cpp
@@ -109,7 +109,7 @@ void Room18::entry() {
_G(det)->hideStaticSpr(19);
if (_G(gameState).R17EnergieOut) {
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(atds)->set_ats_str(150, TXT_MARK_LOOK, 1, ATS_DATA);
} else {
_G(atds)->set_ats_str(150, TXT_MARK_LOOK, 0, ATS_DATA);
@@ -192,7 +192,7 @@ void Room18::monitor() {
startAniBlock(2, ABLOCK21);
nr = (_G(gameState).R17EnergieOut) ? 2 : 1;
} else {
- _G(det)->stop_detail(23);
+ _G(det)->stopDetail(23);
_G(atds)->set_ats_str(41, TXT_MARK_LOOK, 1, ATS_DATA);
}
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index 48516727b9a..95154bb28d2 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -86,7 +86,7 @@ bool Room21::timer(int16 t_nr, int16 ani_nr) {
void Room21::calc_laser() {
if (_G(gameState).R21Hebel1 && !_G(gameState).R21Hebel2 && _G(gameState).R21Hebel3) {
_G(gameState).R21Laser1Weg = true;
- _G(det)->stop_detail(3);
+ _G(det)->stopDetail(3);
_G(atds)->setControlBit(134, ATS_ACTIVE_BIT);
_G(atds)->delControlBit(133, ATS_ACTIVE_BIT);
} else {
@@ -103,7 +103,7 @@ void Room21::calc_laser() {
}
_G(gameState).R21Laser2Weg = true;
- _G(det)->stop_detail(4);
+ _G(det)->stopDetail(4);
_G(atds)->setControlBit(135, ATS_ACTIVE_BIT);
} else {
diff --git a/engines/chewy/rooms/room22.cpp b/engines/chewy/rooms/room22.cpp
index f3c3b7569f2..997569a7f46 100644
--- a/engines/chewy/rooms/room22.cpp
+++ b/engines/chewy/rooms/room22.cpp
@@ -168,7 +168,7 @@ void Room22::get_bork() {
startAniBlock(2, ABLOCK14);
setPersonPos(171, 120, P_CHEWY, P_LEFT);
startAadWait(11);
- _G(det)->stop_detail(3);
+ _G(det)->stopDetail(3);
_G(gameState)._personHide[P_CHEWY] = false;
_G(atds)->setControlBit(81, ATS_ACTIVE_BIT);
invent_2_slot(BORK_INV);
diff --git a/engines/chewy/rooms/room23.cpp b/engines/chewy/rooms/room23.cpp
index efba4da953b..886798a6132 100644
--- a/engines/chewy/rooms/room23.cpp
+++ b/engines/chewy/rooms/room23.cpp
@@ -83,7 +83,7 @@ int16 Room23::start_gleiter() {
waitShowScreen(30);
for (int16 i = 0; i < 4; i++)
- _G(det)->stop_detail(i);
+ _G(det)->stopDetail(i);
if (_G(gameState).R23GleiterExit == 14) {
_G(out)->setPointer(nullptr);
diff --git a/engines/chewy/rooms/room24.cpp b/engines/chewy/rooms/room24.cpp
index 879fcc62a9c..3115bb8364f 100644
--- a/engines/chewy/rooms/room24.cpp
+++ b/engines/chewy/rooms/room24.cpp
@@ -145,7 +145,7 @@ void Room24::calc_animation(int16 kristall_nr) {
int16 ani_nr = KRISTALL_SPR[kristall_nr][_G(gameState).R24Hebel[kristall_nr]] == 13 ? 7 : 8;
_G(det)->stopSound(0);
_G(det)->playSound(5 + ani_nr + kristall_nr * 4, 0);
- _G(det)->stop_detail(5 + kristall_nr * 4);
+ _G(det)->stopDetail(5 + kristall_nr * 4);
startSetAILWait(6 + kristall_nr * 4, 1, ANI_FRONT);
startSetAILWait(ani_nr + kristall_nr * 4, 1, ANI_FRONT);
}
diff --git a/engines/chewy/rooms/room25.cpp b/engines/chewy/rooms/room25.cpp
index e3d6c4f2d05..5cdc41cce27 100644
--- a/engines/chewy/rooms/room25.cpp
+++ b/engines/chewy/rooms/room25.cpp
@@ -111,7 +111,7 @@ int16 Room25::gleiter_loesch() {
_G(det)->stopSound(0);
for (int i = 0; i < 9; ++i)
- _G(det)->stop_detail(i);
+ _G(det)->stopDetail(i);
}
} else if (_G(gameState).R25GleiteLoesch) {
diff --git a/engines/chewy/rooms/room29.cpp b/engines/chewy/rooms/room29.cpp
index a81a640f282..d4e90bd2d68 100644
--- a/engines/chewy/rooms/room29.cpp
+++ b/engines/chewy/rooms/room29.cpp
@@ -148,7 +148,7 @@ void Room29::schlitz_sitz() {
_G(det)->startDetail(2, 255, ANI_FRONT);
startAadWait(63);
- _G(det)->stop_detail(2);
+ _G(det)->stopDetail(2);
_G(atds)->delControlBit(212, ATS_ACTIVE_BIT);
_G(gameState)._personHide[P_CHEWY] = false;
_G(mouseLeftClick) = false;
diff --git a/engines/chewy/rooms/room35.cpp b/engines/chewy/rooms/room35.cpp
index 5b0f760a4b5..b58290734b4 100644
--- a/engines/chewy/rooms/room35.cpp
+++ b/engines/chewy/rooms/room35.cpp
@@ -92,7 +92,7 @@ int16 Room35::use_cat() {
_G(gameState).R35CatEat = true;
start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
delInventory(_G(cur)->getInventoryCursor());
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(det)->del_static_ani(0);
startSetAILWait(1, 1, ANI_FRONT);
_G(det)->startDetail(2, 1, ANI_FRONT);
diff --git a/engines/chewy/rooms/room37.cpp b/engines/chewy/rooms/room37.cpp
index e0ba788caea..80e33607c24 100644
--- a/engines/chewy/rooms/room37.cpp
+++ b/engines/chewy/rooms/room37.cpp
@@ -183,7 +183,7 @@ void Room37::dog_bell() {
_G(flags).NoScroll = true;
auto_scroll(178, 0);
disable_timer();
- _G(det)->stop_detail(3);
+ _G(det)->stopDetail(3);
_G(det)->del_static_ani(3);
startSetAILWait(5, 1, ANI_FRONT);
_G(det)->hideStaticSpr(9);
@@ -192,7 +192,7 @@ void Room37::dog_bell() {
_G(det)->startDetail(11, 255, ANI_FRONT);
flic_cut(FCUT_050);
startSetAILWait(6, 1, ANI_BACK);
- _G(det)->stop_detail(11);
+ _G(det)->stopDetail(11);
setPersonPos(326, 85, P_CHEWY, P_LEFT);
_G(gameState)._personHide[P_CHEWY] = false;
_G(det)->showStaticSpr(9);
@@ -211,7 +211,7 @@ void Room37::dog_bell() {
auto_scroll(178, 0);
_G(room)->set_timer_status(3, TIMER_STOP);
_G(det)->del_static_ani(3);
- _G(det)->stop_detail(3);
+ _G(det)->stopDetail(3);
startSetAILWait(4, 1, ANI_FRONT);
flic_cut(FCUT_051);
_G(gameState).scrollx = 104;
@@ -270,7 +270,7 @@ void Room37::use_hahn() {
autoMove(6, P_CHEWY);
g_engine->_sound->playRoomMusic(256);
_G(room)->set_timer_status(7, TIMER_STOP);
- _G(det)->stop_detail(7);
+ _G(det)->stopDetail(7);
_G(det)->del_static_ani(7);
_G(det)->startDetail(9, 1, ANI_FRONT);
start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
@@ -288,7 +288,7 @@ void Room37::use_hahn() {
_G(det)->startDetail(10, 10, ANI_FRONT);
autoMove(8, P_CHEWY);
flic_cut(FCUT_053);
- _G(det)->stop_detail(10);
+ _G(det)->stopDetail(10);
_G(gameState).scrollx = 320;
_G(flags).NoScroll = false;
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 7702d965ace..f919445f834 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -84,16 +84,16 @@ short Room39::use_howard() {
_G(gameState)._personHide[P_CHEWY] = true;
_G(det)->startDetail(6, 255, ANI_FRONT);
startAadWait(170);
- _G(det)->stop_detail(6);
+ _G(det)->stopDetail(6);
startSetAILWait(7, 1, ANI_FRONT);
_G(gameState)._personHide[P_CHEWY] = false;
delInventory(_G(cur)->getInventoryCursor());
- _G(det)->stop_detail(1);
+ _G(det)->stopDetail(1);
startAniBlock(2, ABLOCK33);
start_spz(CH_TALK6, 255, ANI_FRONT, P_CHEWY);
startAadWait(167);
- _G(det)->stop_detail(3);
+ _G(det)->stopDetail(3);
startSetAILWait(4, 1, ANI_FRONT);
_G(det)->set_static_ani(5, -1);
_G(atds)->set_ats_str(62, 1, ATS_DATA);
@@ -342,7 +342,7 @@ void Room39::set_tv() {
if (_G(gameState).R39TvKanal == 2) {
_G(det)->startDetail(0, 255, ANI_FRONT);
} else {
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(det)->showStaticSpr(_G(gameState).R39TvKanal + 4);
}
diff --git a/engines/chewy/rooms/room40.cpp b/engines/chewy/rooms/room40.cpp
index fcd5af1d964..1fa63514dee 100644
--- a/engines/chewy/rooms/room40.cpp
+++ b/engines/chewy/rooms/room40.cpp
@@ -205,7 +205,7 @@ void Room40::move_train(int16 mode) {
SHOULD_QUIT_RETURN;
}
- _G(det)->stop_detail(7);
+ _G(det)->stopDetail(7);
_G(det)->hideStaticSpr(11);
_G(det)->hideStaticSpr(12);
@@ -289,7 +289,7 @@ void Room40::setup_func() {
_G(gameState).R40PoliceAway = true;
_G(det)->startDetail(17, 255, ANI_FRONT);
startAadWait(226);
- _G(det)->stop_detail(17);
+ _G(det)->stopDetail(17);
_G(gameState).R40HoUse = true;
_G(person_end_phase)[P_CHEWY] = P_RIGHT;
startSetAILWait(10, 1, ANI_FRONT);
@@ -551,7 +551,7 @@ void Room40::bmeister_dia(int16 aad_nr) {
auto_scroll(206, 0);
_G(det)->del_static_ani(0);
_G(room)->set_timer_status(0, TIMER_STOP);
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
startSetAILWait(1, 1, ANI_FRONT);
_G(det)->set_static_ani(2, -1);
diff --git a/engines/chewy/rooms/room41.cpp b/engines/chewy/rooms/room41.cpp
index d0fe44b354b..3854dc7d407 100644
--- a/engines/chewy/rooms/room41.cpp
+++ b/engines/chewy/rooms/room41.cpp
@@ -169,7 +169,7 @@ void Room41::stop_hoggy() {
for (int16 i = 0; i < 2; i++) {
_G(room)->set_timer_status(i, TIMER_STOP);
_G(det)->del_static_ani(i);
- _G(det)->stop_detail(i);
+ _G(det)->stopDetail(i);
_G(det)->set_static_ani(i + 3, -1);
}
}
@@ -199,7 +199,7 @@ int16 Room41::use_lola() {
_G(det)->stopSound(0);
flic_cut(FCUT_057);
setPersonPos(127, 112, P_CHEWY, P_LEFT);
- _G(det)->stop_detail(6);
+ _G(det)->stopDetail(6);
_G(atds)->delControlBit(267, ATS_ACTIVE_BIT);
_G(atds)->set_ats_str(267, 1, ATS_DATA);
diff --git a/engines/chewy/rooms/room42.cpp b/engines/chewy/rooms/room42.cpp
index 490db76a87f..d9573b2af72 100644
--- a/engines/chewy/rooms/room42.cpp
+++ b/engines/chewy/rooms/room42.cpp
@@ -41,7 +41,7 @@ void Room42::entry() {
_G(SetUpScreenFunc) = setup_func;
if (!_G(flags).LoadGame) {
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(timer_nr)[0] = _G(room)->set_timer(8, 5);
_G(det)->set_static_ani(8, -1);
_G(gameState).R42BeamterWach = true;
@@ -211,7 +211,7 @@ void Room42::dialogWithStationEmployee(int16 str_end_nr) {
SHOULD_QUIT_RETURN;
}
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(det)->stopSound(0);
startSetAILWait(1, 1, ANI_FRONT);
_G(det)->startDetail(2, 255, ANI_FRONT);
@@ -221,7 +221,7 @@ void Room42::dialogWithStationEmployee(int16 str_end_nr) {
SHOULD_QUIT_RETURN;
}
- _G(det)->stop_detail(2);
+ _G(det)->stopDetail(2);
_G(det)->startDetail(0, 255, ANI_FRONT);
_G(det)->playSound(0, 0);
_G(det)->playSound(0, 0);
@@ -230,7 +230,7 @@ void Room42::dialogWithStationEmployee(int16 str_end_nr) {
_G(gameState)._personHide[P_CHEWY] = true;
_G(det)->startDetail(6, 255, ANI_FRONT);
startAadWait(135);
- _G(det)->stop_detail(6);
+ _G(det)->stopDetail(6);
_G(flags).NoDiaBox = false;
_G(gameState)._personHide[P_CHEWY] = false;
showCur();
diff --git a/engines/chewy/rooms/room45.cpp b/engines/chewy/rooms/room45.cpp
index d6afae361cf..5cf1b0e607f 100644
--- a/engines/chewy/rooms/room45.cpp
+++ b/engines/chewy/rooms/room45.cpp
@@ -111,13 +111,13 @@ void Room45::setup_func() {
x -= _G(r45_pinfo)[i][1];
if (x < -30) {
_G(r45_pinfo)[i][0] = 0;
- _G(det)->stop_detail(3 + i);
+ _G(det)->stopDetail(3 + i);
}
} else {
x += _G(r45_pinfo)[i][1];
if (x > 540) {
_G(r45_pinfo)[i][0] = 0;
- _G(det)->stop_detail(3 + i);
+ _G(det)->stopDetail(3 + i);
}
}
_G(det)->setDetailPos(3 + i, x, y);
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index 3eeb95f780a..cdc2910ef8f 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -115,7 +115,7 @@ void Room46::bodo() {
startSetAILWait(0, 1, ANI_FRONT);
_G(det)->startDetail(5, 255, ANI_FRONT);
startAadWait(241);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(det)->showStaticSpr(5);
startAadWait(609);
_G(det)->hideStaticSpr(5);
@@ -123,7 +123,7 @@ void Room46::bodo() {
startSetAILWait(3, 1, ANI_FRONT);
_G(det)->startDetail(4, 255, ANI_FRONT);
startAadWait(242);
- _G(det)->stop_detail(4);
+ _G(det)->stopDetail(4);
_G(det)->showStaticSpr(6);
startAadWait(610);
diff --git a/engines/chewy/rooms/room48.cpp b/engines/chewy/rooms/room48.cpp
index d114a5becb3..ad0d6538ad1 100644
--- a/engines/chewy/rooms/room48.cpp
+++ b/engines/chewy/rooms/room48.cpp
@@ -134,7 +134,7 @@ void Room48::setup_func() {
hideCur();
_G(room)->set_timer_status(255, TIMER_STOP);
_G(room)->set_timer_status(0, TIMER_STOP);
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(det)->del_static_ani(0);
startSetAILWait(2, 1, ANI_FRONT);
_G(det)->stopSound(0);
diff --git a/engines/chewy/rooms/room49.cpp b/engines/chewy/rooms/room49.cpp
index 3de0cd4d306..0308131ae0c 100644
--- a/engines/chewy/rooms/room49.cpp
+++ b/engines/chewy/rooms/room49.cpp
@@ -121,7 +121,7 @@ void Room49::calc_boy() {
stopPerson(P_CHEWY);
stopPerson(P_HOWARD);
_G(person_end_phase)[P_CHEWY] = P_LEFT;
- _G(det)->stop_detail(_G(gameState).R49BoyAni ? 1 : 0);
+ _G(det)->stopDetail(_G(gameState).R49BoyAni ? 1 : 0);
_G(det)->del_static_ani(_G(gameState).R49BoyAni ? 1 : 0);
_G(det)->set_static_ani(2, -1);
@@ -189,7 +189,7 @@ void Room49::use_boy_cigar() {
_G(room)->set_timer_status(255, TIMER_STOP);
_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
_G(det)->del_static_ani(_G(gameState).R49BoyAni ? 1 : 0);
- _G(det)->stop_detail(_G(gameState).R49BoyAni ? 1 : 0);
+ _G(det)->stopDetail(_G(gameState).R49BoyAni ? 1 : 0);
_G(flags).NoScroll = false;
setPersonSpr(P_RIGHT, P_CHEWY);
@@ -216,7 +216,7 @@ void Room49::talk_boy(int16 aad_nr) {
if (!_G(gameState).R49BoyWeg) {
_G(room)->set_timer_status(255, TIMER_STOP);
_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
- _G(det)->stop_detail(_G(gameState).R49BoyAni ? 1 : 0);
+ _G(det)->stopDetail(_G(gameState).R49BoyAni ? 1 : 0);
_G(det)->set_static_ani(_G(gameState).R49BoyAni ? 1 : 0, -1);
_G(det)->set_static_ani(2, -1);
diff --git a/engines/chewy/rooms/room50.cpp b/engines/chewy/rooms/room50.cpp
index 693df0cc94c..7455384c401 100644
--- a/engines/chewy/rooms/room50.cpp
+++ b/engines/chewy/rooms/room50.cpp
@@ -112,7 +112,7 @@ void Room50::stop_cigar() {
_G(room)->set_timer_status(0, TIMER_STOP);
_G(det)->del_static_ani(0);
_G(atds)->set_ats_str(328, 1, ATS_DATA);
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(gameState).R50Zigarre = true;
}
@@ -127,8 +127,8 @@ void Room50::calc_wasser() {
void Room50::stop_page() {
_G(room)->set_timer_status(3, TIMER_STOP);
_G(det)->del_static_ani(3);
- _G(det)->stop_detail(3);
- _G(det)->stop_detail(4);
+ _G(det)->stopDetail(3);
+ _G(det)->stopDetail(4);
}
void Room50::go_page() {
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 2981e756ee5..398bbb80bc1 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -245,7 +245,7 @@ int16 Room51::use_door(int16 txt_nr) {
if (!_G(gameState).R52HotDogOk) {
startAadWait(287);
autoMove(12, P_CHEWY);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
startAniBlock(5, ABLOCK37);
_G(det)->hideStaticSpr(1);
_G(det)->stopSound(0);
@@ -264,7 +264,7 @@ int16 Room51::use_door(int16 txt_nr) {
_G(det)->hideStaticSpr(16);
_G(flags).NoPalAfterFlc = false;
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(obj)->show_sib(SIB_AUSRUEST_R52);
_G(obj)->calc_rsi_flip_flop(SIB_AUSRUEST_R52);
_G(det)->hideStaticSpr(1);
diff --git a/engines/chewy/rooms/room52.cpp b/engines/chewy/rooms/room52.cpp
index 33216f137d6..f0b4cbca93c 100644
--- a/engines/chewy/rooms/room52.cpp
+++ b/engines/chewy/rooms/room52.cpp
@@ -42,7 +42,7 @@ void Room52::entry() {
}
if (_G(gameState).R52KakerWeg)
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
if (!_G(flags).LoadGame) {
_G(det)->showStaticSpr(4);
@@ -97,12 +97,12 @@ int16 Room52::use_hot_dog() {
for (int16 i = 0; i < 5; i++) {
waitShowScreen(20);
- _G(det)->stop_detail(2 + i);
+ _G(det)->stopDetail(2 + i);
}
_G(det)->stopSound(0);
- _G(det)->stop_detail(0);
- _G(det)->stop_detail(8);
+ _G(det)->stopDetail(0);
+ _G(det)->stopDetail(8);
startSetAILWait(7, 1, ANI_BACK);
_G(det)->stopSound(0);
_G(gameState)._personHide[P_CHEWY] = false;
diff --git a/engines/chewy/rooms/room54.cpp b/engines/chewy/rooms/room54.cpp
index 41cc9b4e8c2..b670bd2dde5 100644
--- a/engines/chewy/rooms/room54.cpp
+++ b/engines/chewy/rooms/room54.cpp
@@ -145,7 +145,7 @@ int16 Room54::use_schalter() {
startSetAILWait(1, 1, ANI_FRONT);
_G(det)->startDetail(3, 255, ANI_FRONT);
startAadWait(292 + _G(gameState).R54LiftCount);
- _G(det)->stop_detail(3);
+ _G(det)->stopDetail(3);
++_G(gameState).R54LiftCount;
int16 aad_nr;
@@ -204,12 +204,12 @@ void Room54::talk_verkauf() {
_G(det)->startDetail(8, 255, ANI_FRONT);
startAadWait(310);
- _G(det)->stop_detail(8);
+ _G(det)->stopDetail(8);
startSetAILWait(9, 1, ANI_FRONT);
startSetAILWait(10, 1, ANI_FRONT);
_G(det)->startDetail(11, 255, ANI_FRONT);
startAadWait(311);
- _G(det)->stop_detail(11);
+ _G(det)->stopDetail(11);
_G(room)->set_timer_status(6, TIMER_START);
_G(det)->set_static_ani(6, -1);
autoMove(4, P_CHEWY);
diff --git a/engines/chewy/rooms/room55.cpp b/engines/chewy/rooms/room55.cpp
index f74489a6672..c7caa0b7f64 100644
--- a/engines/chewy/rooms/room55.cpp
+++ b/engines/chewy/rooms/room55.cpp
@@ -192,7 +192,7 @@ int16 Room55::use_telefon() {
startSetAILWait(10, 1, ANI_FRONT);
_G(det)->startDetail(11, 255, ANI_FRONT);
startAadWait(329);
- _G(det)->stop_detail(11);
+ _G(det)->stopDetail(11);
startSetAILWait(10, 1, ANI_BACK);
_G(gameState)._personHide[P_CHEWY] = false;
@@ -204,7 +204,7 @@ int16 Room55::use_telefon() {
startSetAILWait(0, 1, ANI_FRONT);
_G(det)->startDetail(1, 255, ANI_FRONT);
startAadWait(331);
- _G(det)->stop_detail(1);
+ _G(det)->stopDetail(1);
_G(det)->showStaticSpr(16);
startAadWait(608);
@@ -346,7 +346,7 @@ void Room55::strasse(int16 mode) {
_G(gameState)._personHide[P_CHEWY] = true;
_G(room)->set_timer_status(4, TIMER_STOP);
_G(det)->del_static_ani(4);
- _G(det)->stop_detail(4);
+ _G(det)->stopDetail(4);
_G(atds)->setControlBit(340, ATS_ACTIVE_BIT);
startSetAILWait(3, 1, ANI_BACK);
@@ -373,7 +373,7 @@ int16 Room55::use_kammeraus() {
const int aniNr = 19 + (_G(gameState).R55Entry ? 1 : 0);
_G(room)->set_timer_status(aniNr, TIMER_STOP);
- _G(det)->stop_detail(aniNr);
+ _G(det)->stopDetail(aniNr);
_G(det)->del_static_ani(aniNr);
_G(det)->hideStaticSpr(10);
_G(gameState).R55ExitDia = 322;
@@ -429,7 +429,7 @@ void Room55::talk_line() {
_G(gameState).R55ExitDia = 321;
const int aniNr = 19 + (_G(gameState).R55Entry ? 1 : 0);
_G(room)->set_timer_status(aniNr, TIMER_STOP);
- _G(det)->stop_detail(aniNr);
+ _G(det)->stopDetail(aniNr);
_G(det)->del_static_ani(aniNr);
startSetAILWait(22, 1, ANI_FRONT);
_G(det)->set_static_ani(21, -1);
diff --git a/engines/chewy/rooms/room56.cpp b/engines/chewy/rooms/room56.cpp
index 66543fcb957..9376e2299eb 100644
--- a/engines/chewy/rooms/room56.cpp
+++ b/engines/chewy/rooms/room56.cpp
@@ -305,7 +305,7 @@ int16 Room56::use_kneipe() {
_G(det)->playSound(9, 0);
_G(det)->startDetail(10, 6, ANI_FRONT);
startAadWait(307);
- _G(det)->stop_detail(10);
+ _G(det)->stopDetail(10);
_G(det)->playSound(10, 0);
_G(out)->fadeOut();
setupScreen(DO_SETUP);
diff --git a/engines/chewy/rooms/room62.cpp b/engines/chewy/rooms/room62.cpp
index 4fc8c655d07..24f2b9c59e8 100644
--- a/engines/chewy/rooms/room62.cpp
+++ b/engines/chewy/rooms/room62.cpp
@@ -40,22 +40,22 @@ void Room62::entry() {
setPersonPos(49, 113, P_HOWARD, P_RIGHT);
_G(det)->startDetail(6, 255, ANI_FRONT);
startAadWait(345);
- _G(det)->stop_detail(6);
+ _G(det)->stopDetail(6);
_G(det)->set_static_ani(5, -1);
goAutoXy(199, 59, P_HOWARD, ANI_WAIT);
setPersonSpr(0, P_HOWARD);
_G(det)->del_static_ani(5);
_G(det)->startDetail(5, 255, ANI_FRONT);
startAadWait(346);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(det)->startDetail(6, 255, ANI_FRONT);
startAadWait(347);
- _G(det)->stop_detail(6);
+ _G(det)->stopDetail(6);
startSetAILWait(7, 1, ANI_FRONT);
_G(det)->set_static_ani(5, -1);
_G(det)->startDetail(0, 255, ANI_FRONT);
startAadWait(348);
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(det)->del_static_ani(0);
_G(det)->startDetail(1, 1, ANI_FRONT);
autoMove(0, P_CHEWY);
@@ -84,7 +84,7 @@ void Room62::entry() {
void Room62::setup_func() {
if (_G(r62Delay) <= 0 && _G(gameState).R62TShow) {
_G(r62Delay) = (_G(gameState).DelaySpeed + 1) * 60;
- _G(det)->stop_detail(_G(r62TalkAni));
+ _G(det)->stopDetail(_G(r62TalkAni));
if (_G(r62TalkAni) == 4)
_G(r62TalkAni) = 8;
else
@@ -103,7 +103,7 @@ int16 Room62::use_laura() {
auto_scroll(0, 0);
_G(SetUpScreenFunc) = nullptr;
_G(det)->del_static_ani(8);
- _G(det)->stop_detail(8);
+ _G(det)->stopDetail(8);
_G(gameState)._personHide[P_CHEWY] = true;
_G(det)->startDetail(2, 255, ANI_FRONT);
_G(det)->startDetail(6, 255, ANI_FRONT);
diff --git a/engines/chewy/rooms/room63.cpp b/engines/chewy/rooms/room63.cpp
index c186bf9da08..64265ca19eb 100644
--- a/engines/chewy/rooms/room63.cpp
+++ b/engines/chewy/rooms/room63.cpp
@@ -42,11 +42,11 @@ void Room63::entry() {
_G(det)->startDetail(10, 255, ANI_FRONT);
_G(det)->startDetail(18, 255, ANI_FRONT);
autoMove(4, P_CHEWY);
- _G(det)->stop_detail(10);
+ _G(det)->stopDetail(10);
_G(det)->startDetail(11, 255, ANI_FRONT);
auto_scroll(58, 0);
startAadWait(355);
- _G(det)->stop_detail(11);
+ _G(det)->stopDetail(11);
_G(det)->startDetail(10, 255, ANI_FRONT);
showCur();
} else if (!_G(gameState).R63Fire) {
@@ -164,7 +164,7 @@ void Room63::talk_hunter() {
startAadWait(356);
if (_G(gameState).R63Uhr) {
_G(det)->showStaticSpr(10);
- _G(det)->stop_detail(10);
+ _G(det)->stopDetail(10);
}
showCur();
}
@@ -174,10 +174,10 @@ void Room63::talk_regie() {
autoMove(3, P_CHEWY);
if (_G(gameState).R63Uhr)
_G(det)->hideStaticSpr(12);
- _G(det)->stop_detail(18);
+ _G(det)->stopDetail(18);
_G(det)->startDetail(19, 255, ANI_FRONT);
startAadWait(357);
- _G(det)->stop_detail(19);
+ _G(det)->stopDetail(19);
if (_G(gameState).R63Uhr) {
_G(det)->showStaticSpr(12);
} else {
@@ -206,7 +206,7 @@ int16 Room63::use_fx_man() {
startSetAILWait(6, 1, ANI_FRONT);
_G(det)->startDetail(7, 255, ANI_FRONT);
startAadWait(362);
- _G(det)->stop_detail(7);
+ _G(det)->stopDetail(7);
startSetAILWait(8, 1, ANI_FRONT);
_G(gameState).R63FxManAway = true;
_G(atds)->setControlBit(384, ATS_ACTIVE_BIT);
@@ -252,7 +252,7 @@ int16 Room63::use_schalter() {
void Room63::talk_girl() {
autoMove(2, P_CHEWY);
- _G(det)->stop_detail(12);
+ _G(det)->stopDetail(12);
startSetAILWait(13, 1, ANI_FRONT);
_G(det)->set_static_ani(14, -1);
startDialogCloseupWait(17);
@@ -267,18 +267,18 @@ int16 Room63::use_girl() {
hideCur();
autoMove(2, P_CHEWY);
delInventory(_G(cur)->getInventoryCursor());
- _G(det)->stop_detail(12);
+ _G(det)->stopDetail(12);
startSetAILWait(13, 1, ANI_FRONT);
_G(det)->set_static_ani(14, -1);
startAadWait(365);
_G(det)->del_static_ani(14);
_G(det)->startDetail(15, 255, ANI_FRONT);
startAadWait(360);
- _G(det)->stop_detail(15);
+ _G(det)->stopDetail(15);
startSetAILWait(16, 1, ANI_FRONT);
_G(gameState).R63Uhr = true;
- _G(det)->stop_detail(10);
- _G(det)->stop_detail(18);
+ _G(det)->stopDetail(10);
+ _G(det)->stopDetail(18);
_G(det)->showStaticSpr(10);
_G(det)->showStaticSpr(12);
_G(atds)->set_ats_str(381, 1, ATS_DATA);
diff --git a/engines/chewy/rooms/room64.cpp b/engines/chewy/rooms/room64.cpp
index dd137daa30e..97a852226cd 100644
--- a/engines/chewy/rooms/room64.cpp
+++ b/engines/chewy/rooms/room64.cpp
@@ -110,7 +110,7 @@ void Room64::setup_func() {
if (_G(r62Delay) <= 0 && _G(gameState).R62TShow) {
_G(r62Delay) = (_G(gameState).DelaySpeed + 1) * 60;
if (_G(r64TalkAni) == 3 || _G(r64TalkAni) == 4)
- _G(det)->stop_detail(_G(r64TalkAni));
+ _G(det)->stopDetail(_G(r64TalkAni));
if (_G(r64TalkAni) == 4)
_G(r64TalkAni) = _G(gameState).R64Moni1Ani;
@@ -129,7 +129,7 @@ void Room64::talk_man(int16 aad_nr) {
autoMove(4, P_CHEWY);
_G(room)->set_timer_status(1, TIMER_STOP);
_G(det)->del_static_ani(1);
- _G(det)->stop_detail(1);
+ _G(det)->stopDetail(1);
_G(det)->set_static_ani(2, -1);
startAadWait(aad_nr);
_G(det)->del_static_ani(2);
@@ -158,10 +158,10 @@ int16 Room64::useBag() {
autoMove(3, P_CHEWY);
_G(room)->set_timer_status(1, TIMER_STOP);
_G(det)->del_static_ani(1);
- _G(det)->stop_detail(1);
+ _G(det)->stopDetail(1);
_G(det)->startDetail(6, 255, false);
startAadWait(352);
- _G(det)->stop_detail(6);
+ _G(det)->stopDetail(6);
_G(room)->set_timer_status(0, TIMER_START);
_G(det)->set_static_ani(1, -1);
}
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index 4319ecb2549..fa658af825e 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -139,7 +139,7 @@ void Room65::atds_string_start(int16 dia_nr, int16 str_nr, int16 person_nr, int1
} else if (mode == AAD_STR_START) {
_G(det)->startDetail(person_nr, 255, ANI_FRONT);
} else {
- _G(det)->stop_detail(person_nr);
+ _G(det)->stopDetail(person_nr);
}
}
diff --git a/engines/chewy/rooms/room67.cpp b/engines/chewy/rooms/room67.cpp
index 53b3da07377..02f6affd9eb 100644
--- a/engines/chewy/rooms/room67.cpp
+++ b/engines/chewy/rooms/room67.cpp
@@ -91,7 +91,7 @@ int16 Room67::use_grammo() {
startAadWait(614);
start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
showCur();
}
return action_flag;
@@ -164,7 +164,7 @@ int16 Room67::talk_papagei() {
autoMove(4, P_CHEWY);
start_spz_wait(CH_LGET_O, 1, false, P_CHEWY);
_G(gameState).R67PapageiWeg = true;
- _G(det)->stop_detail(1);
+ _G(det)->stopDetail(1);
_G(det)->del_static_ani(1);
_G(det)->showStaticSpr(0);
invent_2_slot(PAPAGEI_INV);
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index 48057029a03..acadbebae46 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -109,7 +109,7 @@ void Room68::setup_func() {
// TODO
//while (_G(sndPlayer)->getSampleStatus(1) == 4)
// setupScreen(DO_SETUP);
- _G(det)->stop_detail(_G(r68HohesC));
+ _G(det)->stopDetail(_G(r68HohesC));
} else {
_G(det)->startDetail(_G(r68HohesC), 3, ANI_FRONT);
}
@@ -122,7 +122,7 @@ void Room68::setup_func() {
case 2:
if (_G(det)->get_ani_status(_G(r68HohesC)) == false) {
_G(r68HohesC) = -1;
- _G(det)->stop_detail(18);
+ _G(det)->stopDetail(18);
_G(det)->showStaticSpr(3);
_G(uhr)->resetTimer(_G(timer_nr)[0], 0);
}
@@ -193,7 +193,7 @@ int16 Room68::use_indigo() {
hideCur();
_G(room)->set_timer_status(8, TIMER_STOP);
_G(det)->del_static_ani(8);
- _G(det)->stop_detail(8);
+ _G(det)->stopDetail(8);
startSetAILWait(13, 3, ANI_FRONT);
startSetAILWait(25, 1, ANI_FRONT);
_G(det)->set_static_ani(12, -1);
@@ -201,7 +201,7 @@ int16 Room68::use_indigo() {
hideCur();
_G(room)->set_timer_status(8, TIMER_STOP);
_G(det)->del_static_ani(8);
- _G(det)->stop_detail(8);
+ _G(det)->stopDetail(8);
startSetAILWait(26, 1, ANI_FRONT);
_G(room)->set_timer_status(8, TIMER_START);
_G(det)->set_static_ani(8, -1);
@@ -365,7 +365,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
g_engine->_sound->waitForSpeechToFinish();
- _G(det)->stop_detail(23);
+ _G(det)->stopDetail(23);
}
_G(det)->playSound(108, 1);
@@ -379,13 +379,13 @@ void Room68::kostuem_aad(int16 aad_nr) {
startSetAILWait(10, 1, ANI_FRONT);
_G(det)->startDetail(11, 255, ANI_FRONT);
startAadWait(396);
- _G(det)->stop_detail(11);
+ _G(det)->stopDetail(11);
_G(det)->set_static_ani(12, -1);
startAadWait(611);
_G(det)->del_static_ani(12);
_G(det)->startDetail(14, 255, ANI_FRONT);
startAadWait(395);
- _G(det)->stop_detail(14);
+ _G(det)->stopDetail(14);
_G(room)->set_timer_status(8, TIMER_START);
_G(det)->set_static_ani(8, -1);
startAadWait(392);
@@ -393,8 +393,8 @@ void Room68::kostuem_aad(int16 aad_nr) {
g_engine->_sound->waitForSpeechToFinish();
_G(gameState)._personHide[P_HOWARD] = false;
- _G(det)->stop_detail(27);
- _G(det)->stop_detail(24);
+ _G(det)->stopDetail(27);
+ _G(det)->stopDetail(24);
_G(det)->showStaticSpr(13);
_G(gameState).R68Lied = true;
autoMove(1, P_CHEWY);
diff --git a/engines/chewy/rooms/room71.cpp b/engines/chewy/rooms/room71.cpp
index 4df1509a874..fbefa912427 100644
--- a/engines/chewy/rooms/room71.cpp
+++ b/engines/chewy/rooms/room71.cpp
@@ -210,7 +210,7 @@ void Room71::proc2() {
_G(det)->hideStaticSpr(5);
startSetAILWait(1, 1, ANI_FRONT);
_G(det)->startDetail(2, 255, false);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(det)->showStaticSpr(8);
_G(atds)->setControlBit(442, ATS_ACTIVE_BIT);
_G(atds)->setControlBit(446, ATS_ACTIVE_BIT);
@@ -293,7 +293,7 @@ void Room71::proc7() {
_G(gameState)._personHide[P_NICHELLE] = true;
_G(det)->startDetail(7, 255, false);
startAadWait(624);
- _G(det)->stop_detail(7);
+ _G(det)->stopDetail(7);
_G(gameState)._personHide[P_NICHELLE] = false;
_G(SetUpScreenFunc) = setup_func;
_G(flags).NoScroll = false;
diff --git a/engines/chewy/rooms/room78.cpp b/engines/chewy/rooms/room78.cpp
index 5b8677a3e15..3b6b68819e0 100644
--- a/engines/chewy/rooms/room78.cpp
+++ b/engines/chewy/rooms/room78.cpp
@@ -83,7 +83,7 @@ void Room78::entry() {
flag1 = true;
} else {
flag1 = true;
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(det)->startDetail(1, 1, false);
}
}
@@ -93,7 +93,7 @@ void Room78::entry() {
if (det4DestX <= 222 && flag2 == 0) {
if (_G(gameState).flags29_10) {
flag2 = true;
- _G(det)->stop_detail(4);
+ _G(det)->stopDetail(4);
if (flag1 == 0) {
_G(det)->startDetail(5, 1, false);
} else {
diff --git a/engines/chewy/rooms/room81.cpp b/engines/chewy/rooms/room81.cpp
index 453dbb13312..fc85542c287 100644
--- a/engines/chewy/rooms/room81.cpp
+++ b/engines/chewy/rooms/room81.cpp
@@ -85,7 +85,7 @@ void Room81::proc1() {
startSetAILWait(0, 1, ANI_FRONT);
_G(det)->startDetail(1, 255, false);
startAadWait(459);
- _G(det)->stop_detail(1);
+ _G(det)->stopDetail(1);
startSetAILWait(0, 1, ANI_GO);
_G(gameState)._personHide[P_CHEWY] = false;
goAutoXy(171, 93, P_CHEWY, ANI_WAIT);
@@ -147,7 +147,7 @@ void Room81::proc3() {
for (int i = 0; i < 3; ++i)
_G(det)->startDetail(3 + i, 255, false);
- _G(det)->stop_detail(2);
+ _G(det)->stopDetail(2);
_G(atds)->delControlBit(486, ATS_ACTIVE_BIT);
_G(atds)->setControlBit(490, ATS_ACTIVE_BIT);
}
diff --git a/engines/chewy/rooms/room82.cpp b/engines/chewy/rooms/room82.cpp
index fc9432a0ee8..98188a4ff45 100644
--- a/engines/chewy/rooms/room82.cpp
+++ b/engines/chewy/rooms/room82.cpp
@@ -232,7 +232,7 @@ void Room82::proc8() {
_G(gameState)._personHide[P_NICHELLE] = true;
_G(det)->startDetail(10, 255, false);
startAadWait(625);
- _G(det)->stop_detail(10);
+ _G(det)->stopDetail(10);
_G(gameState)._personHide[P_NICHELLE] = false;
startAadWait(448);
_G(det)->del_static_ani(4);
diff --git a/engines/chewy/rooms/room84.cpp b/engines/chewy/rooms/room84.cpp
index 3d86395e58b..aeaed795185 100644
--- a/engines/chewy/rooms/room84.cpp
+++ b/engines/chewy/rooms/room84.cpp
@@ -45,7 +45,7 @@ void Room84::entry() {
if (_G(gameState).R88UsedMonkey) {
_G(det)->del_static_ani(3);
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(gameState).room_e_obj[124].Attribut = EXIT_TOP;
_G(atds)->setControlBit(478, ATS_ACTIVE_BIT);
_G(atds)->setControlBit(479, ATS_ACTIVE_BIT);
@@ -191,7 +191,7 @@ int Room84::proc4() {
autoMove(5, P_CHEWY);
if (_G(gameState).flags32_10) {
- _G(det)->stop_detail(7);
+ _G(det)->stopDetail(7);
startSetAILWait(8, 1, ANI_FRONT);
} else {
_G(gameState)._personRoomNr[P_NICHELLE] = 88;
diff --git a/engines/chewy/rooms/room85.cpp b/engines/chewy/rooms/room85.cpp
index 01062ea76cd..710c89c0648 100644
--- a/engines/chewy/rooms/room85.cpp
+++ b/engines/chewy/rooms/room85.cpp
@@ -153,7 +153,7 @@ int Room85::proc2() {
return 0;
autoMove(2, P_CHEWY);
- _G(det)->stop_detail(1);
+ _G(det)->stopDetail(1);
startSetAILWait(2, 1, ANI_FRONT);
_G(gameState)._personRoomNr[P_HOWARD] = 89;
cur_2_inventory();
diff --git a/engines/chewy/rooms/room86.cpp b/engines/chewy/rooms/room86.cpp
index 28e6ab9d005..c0dab17b3a2 100644
--- a/engines/chewy/rooms/room86.cpp
+++ b/engines/chewy/rooms/room86.cpp
@@ -78,7 +78,7 @@ void Room86::entry(int16 eib_nr) {
start_spz_wait(13, 1, false, P_CHEWY);
_G(flags).NoScroll = false;
_G(spieler_mi)[P_CHEWY].Vorschub = 8;
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(det)->showStaticSpr(4);
_G(det)->showStaticSpr(5);
invent_2_slot(94);
diff --git a/engines/chewy/rooms/room90.cpp b/engines/chewy/rooms/room90.cpp
index 23b206e14e2..09fb411951f 100644
--- a/engines/chewy/rooms/room90.cpp
+++ b/engines/chewy/rooms/room90.cpp
@@ -128,13 +128,13 @@ void Room90::setup_func() {
destX += _G(gameState).r90_Array187030[i][1];
if (destX > 540) {
_G(gameState).r90_Array187030[i][0] = 0;
- _G(det)->stop_detail(i + 4);
+ _G(det)->stopDetail(i + 4);
}
} else {
destX -= _G(gameState).r90_Array187030[i][1];
if (destX < -30) {
_G(gameState).r90_Array187030[i][0] = 0;
- _G(det)->stop_detail(i + 4);
+ _G(det)->stopDetail(i + 4);
}
}
_G(det)->setDetailPos(i + 4, destX, destY);
@@ -305,7 +305,7 @@ int Room90::shootControlUnit() {
_G(flags).NoScroll = false;
_G(HowardMov) = 0;
_G(gameState).flags33_40 = true;
- _G(det)->stop_detail(12);
+ _G(det)->stopDetail(12);
_G(atds)->setControlBit(519, ATS_ACTIVE_BIT);
_G(atds)->delControlBit(520, ATS_ACTIVE_BIT);
_G(flags).ZoomMov = true;
diff --git a/engines/chewy/rooms/room91.cpp b/engines/chewy/rooms/room91.cpp
index a1b2075f2b2..46784568a8b 100644
--- a/engines/chewy/rooms/room91.cpp
+++ b/engines/chewy/rooms/room91.cpp
@@ -114,7 +114,7 @@ void Room91::setup_func() {
_click = 1;
const int aniNr = 1 + (g_events->_mousePos.y <= 100 ? 1 : 0);
hideCur();
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
startSetAILWait(aniNr, 1, ANI_FRONT);
_click = oldClick;
_G(det)->startDetail(0, 255, false);
@@ -124,7 +124,7 @@ void Room91::setup_func() {
_G(gameState).SVal3 += 1;
showCur();
if (_G(gameState).SVal3 == 4) {
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(gameState)._personHide[P_CHEWY] = false;
hideCur();
autoMove(1, P_CHEWY);
diff --git a/engines/chewy/rooms/room94.cpp b/engines/chewy/rooms/room94.cpp
index 514140cd26c..a881ca3e6bf 100644
--- a/engines/chewy/rooms/room94.cpp
+++ b/engines/chewy/rooms/room94.cpp
@@ -145,14 +145,14 @@ int Room94::giveGhostBottle() {
_G(fx_blend) = BLEND3;
_G(det)->startDetail(5, 255, false);
startAadWait(541);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(det)->showStaticSpr(5);
Room66::proc8(3, 3, 2, 617);
hideCur();
_G(det)->hideStaticSpr(5);
_G(det)->startDetail(5, 255, false);
startAadWait(622);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(det)->startDetail(6, 1, false);
_G(room)->set_timer_status(3, TIMER_STOP);
_G(det)->del_static_ani(3);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 90e0e2b1f34..bf8ebf07560 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -67,7 +67,7 @@ void Room97::entry() {
if (_G(gameState).flags36_10) {
_G(det)->startDetail(11, 255, ANI_FRONT);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(det)->startDetail(6, 255, ANI_FRONT);
_G(det)->startDetail(12, 255, ANI_FRONT);
}
@@ -83,7 +83,7 @@ void Room97::entry() {
if (_G(gameState).flags36_20) {
_G(det)->setDetailPos(27, 272, 110);
for (int i = 0; i < 2; ++i) {
- _G(det)->stop_detail(23 + i);
+ _G(det)->stopDetail(23 + i);
_G(det)->startDetail(27 + i, 255, ANI_FRONT);
}
_G(det)->stopSound(0);
@@ -431,7 +431,7 @@ int Room97::proc6() {
start_spz(CH_TALK5, 255, false, P_CHEWY);
startAadWait(558);
_G(det)->hideStaticSpr(28);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(det)->showStaticSpr(15);
_G(gameState).flags36_2 = true;
_G(atds)->delControlBit(538, ATS_ACTIVE_BIT);
@@ -494,11 +494,11 @@ int Room97::proc8() {
autoMove(3, P_CHEWY);
auto_scroll(406, 0);
waitShowScreen(40);
- _G(det)->stop_detail(24);
+ _G(det)->stopDetail(24);
_G(det)->playSound(26, 0);
startSetAILWait(25, 1, ANI_FRONT);
_G(det)->startDetail(26, 255, false);
- _G(det)->stop_detail(23);
+ _G(det)->stopDetail(23);
_G(det)->startDetail(27, 255, false);
waitShowScreen(80);
autoMove(4, P_CHEWY);
@@ -506,8 +506,8 @@ int Room97::proc8() {
startAadWait(566);
waitShowScreen(60);
startAadWait(567);
- _G(det)->stop_detail(26);
- _G(det)->stop_detail(27);
+ _G(det)->stopDetail(26);
+ _G(det)->stopDetail(27);
_G(gameState).flags36_20 = true;
_G(det)->startDetail(28, 255, false);
_G(det)->setDetailPos(27, 272, 110);
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index 144c34221e1..fd1859ce9f6 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -826,7 +826,7 @@ int16 atsAction(int16 txtNr, int16 txtMode, int16 mode) {
switch (txtNr) {
case 11:
autoMove(3, P_CHEWY);
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
_G(det)->startDetail(6, 2, ANI_FRONT);
Room2::jump_out_r1(9);
break;
@@ -1262,13 +1262,13 @@ void endDialogCloseup(int16 diaNr, int16 blkNr, int16 strEndNr) {
if (mode == AAD_STR_START) \
talkAni = tmp; \
else \
- _G(det)->stop_detail(tmp)
+ _G(det)->stopDetail(tmp)
#define START_STOP(NUM) \
if (mode == AAD_STR_START) \
talkAni = NUM; \
else \
- _G(det)->stop_detail(NUM) \
+ _G(det)->stopDetail(NUM) \
void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
@@ -1469,7 +1469,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
talkAni = 1;
} else {
_G(room)->set_timer_status(0, TIMER_START);
- _G(det)->stop_detail(1);
+ _G(det)->stopDetail(1);
_G(det)->set_static_ani(0, -1);
}
break;
@@ -1489,7 +1489,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
talkAni = 0;
} else {
_G(room)->set_timer_status(1, TIMER_START);
- _G(det)->stop_detail(0);
+ _G(det)->stopDetail(0);
_G(det)->set_static_ani(1, -1);
}
}
@@ -1510,7 +1510,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
if (mode == AAD_STR_START) {
_G(det)->startDetail(5, 255, ANI_FRONT);
} else {
- _G(det)->stop_detail(5);
+ _G(det)->stopDetail(5);
}
break;
@@ -1564,7 +1564,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
if (mode == AAD_STR_START) {
_G(det)->startDetail(tmp, 255, ANI_FRONT);
} else {
- _G(det)->stop_detail(tmp);
+ _G(det)->stopDetail(tmp);
}
++tmp;
}
@@ -1771,7 +1771,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
case P_3:
if (mode == AAD_STR_START) {
- _G(det)->stop_detail(2);
+ _G(det)->stopDetail(2);
} else {
stop_spz();
}
@@ -1818,7 +1818,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
talkAni = 2;
} else {
_G(room)->set_timer_status(8, TIMER_START);
- _G(det)->stop_detail(2);
+ _G(det)->stopDetail(2);
_G(det)->set_static_ani(8, -1);
}
break;
@@ -1834,7 +1834,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
talkAni = 2;
} else {
_G(room)->set_timer_status(0, TIMER_START);
- _G(det)->stop_detail(2);
+ _G(det)->stopDetail(2);
_G(det)->set_static_ani(0, -1);
}
break;
@@ -1954,7 +1954,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
if (diaNr != 376)
talkAni = 1;
} else if (diaNr != 376)
- _G(det)->stop_detail(1);
+ _G(det)->stopDetail(1);
break;
@@ -2105,7 +2105,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
if (mode == AAD_STR_START) {
_G(det)->startDetail(personNr, 255, ANI_FRONT);
} else {
- _G(det)->stop_detail(personNr);
+ _G(det)->stopDetail(personNr);
}
break;
@@ -2128,7 +2128,7 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
_G(gameState)._personHide[P_CHEWY] = true;
talkAni = 29;
} else {
- _G(det)->stop_detail(29);
+ _G(det)->stopDetail(29);
_G(gameState)._personHide[P_CHEWY] = false;
}
break;
@@ -2144,12 +2144,12 @@ void atdsStringStart(int16 diaNr, int16 strNr, int16 personNr, int16 mode) {
if (oldFormat) {
_G(det)->startDetail(_G(talk_start_ani), 255, ANI_FRONT);
- _G(det)->stop_detail(talkStopAni);
+ _G(det)->stopDetail(talkStopAni);
_G(det)->hideStaticSpr(_G(talk_hide_static));
_G(det)->showStaticSpr(talkShowStatic);
} else {
_G(det)->startDetail(talkAni, 255, ANI_FRONT);
- _G(det)->stop_detail(stopAni);
+ _G(det)->stopDetail(stopAni);
}
}
Commit: 8d77908a6b263f60c4ff5fff6d273e8cece25025
https://github.com/scummvm/scummvm/commit/8d77908a6b263f60c4ff5fff6d273e8cece25025
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:36+03:00
Commit Message:
CHEWY: Move the ChewyFont class into a separate file
Changed paths:
A engines/chewy/font.cpp
A engines/chewy/font.h
engines/chewy/atds.cpp
engines/chewy/dialogs/cinema.cpp
engines/chewy/dialogs/credits.cpp
engines/chewy/dialogs/inventory.cpp
engines/chewy/dialogs/main_menu.cpp
engines/chewy/globals.h
engines/chewy/main.cpp
engines/chewy/main.h
engines/chewy/mcga_graphics.cpp
engines/chewy/menus.cpp
engines/chewy/module.mk
engines/chewy/rooms/room00.cpp
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index d8c7f27c59c..4f8943096fb 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -23,6 +23,7 @@
#include "chewy/atds.h"
#include "chewy/defines.h"
#include "chewy/events.h"
+#include "chewy/font.h"
#include "chewy/globals.h"
#include "chewy/main.h"
#include "chewy/mcga_graphics.h"
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index fe6ccef0c11..a1add56ea64 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -22,6 +22,7 @@
#include "chewy/dialogs/cinema.h"
#include "chewy/cursor.h"
#include "chewy/events.h"
+#include "chewy/font.h"
#include "chewy/globals.h"
#include "chewy/main.h"
#include "chewy/mcga_graphics.h"
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 620a25c402e..4a0ceee7bcc 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -21,8 +21,8 @@
#include "chewy/dialogs/credits.h"
#include "chewy/events.h"
+#include "chewy/font.h"
#include "chewy/globals.h"
-#include "chewy/main.h"
#include "chewy/mcga_graphics.h"
#include "chewy/mouse.h"
#include "chewy/text.h"
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 63ed3169b03..47aa4152d08 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -24,8 +24,8 @@
#include "chewy/rooms/room58.h"
#include "chewy/cursor.h"
#include "chewy/events.h"
+#include "chewy/font.h"
#include "chewy/globals.h"
-#include "chewy/main.h"
#include "chewy/menus.h"
#include "chewy/mouse.h"
#include "chewy/sound.h"
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index c896ae41584..7d11571c89d 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -26,6 +26,7 @@
#include "chewy/dialogs/files.h"
#include "chewy/cursor.h"
#include "chewy/events.h"
+#include "chewy/font.h"
#include "chewy/globals.h"
#include "chewy/main.h"
#include "chewy/mcga_graphics.h"
diff --git a/engines/chewy/font.cpp b/engines/chewy/font.cpp
new file mode 100644
index 00000000000..320cc5999f7
--- /dev/null
+++ b/engines/chewy/font.cpp
@@ -0,0 +1,106 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/file.h"
+#include "common/rect.h"
+#include "chewy/font.h"
+
+namespace Chewy {
+
+ChewyFont::ChewyFont(Common::String filename) {
+ const uint32 headerFont = MKTAG('T', 'F', 'F', '\0');
+ Common::File stream;
+
+ stream.open(filename);
+
+ uint32 header = stream.readUint32BE();
+
+ if (header != headerFont)
+ error("Invalid resource - %s", filename.c_str());
+
+ stream.skip(4); // total memory
+ _count = stream.readUint16LE();
+ _first = stream.readUint16LE();
+ _last = stream.readUint16LE();
+ _deltaX = _dataWidth = stream.readUint16LE();
+ _dataHeight = stream.readUint16LE();
+
+ _displayWidth = _dataWidth;
+ _displayHeight = _dataHeight;
+
+ _fontSurface.create(_dataWidth * _count, _dataHeight, Graphics::PixelFormat::createFormatCLUT8());
+
+ int bitIndex = 7;
+
+ byte curr = stream.readByte();
+
+ for (uint n = 0; n < _count; n++) {
+ for (uint y = 0; y < _dataHeight; y++) {
+ byte *p = (byte *)_fontSurface.getBasePtr(n * _dataWidth, y);
+
+ for (uint x = n * _dataWidth; x < n * _dataWidth + _dataWidth; x++) {
+ *p++ = (curr & (1 << bitIndex)) ? 0 : 0xFF;
+
+ bitIndex--;
+ if (bitIndex < 0) {
+ bitIndex = 7;
+ curr = stream.readByte();
+ }
+ }
+ }
+ }
+}
+
+ChewyFont::~ChewyFont() {
+ _fontSurface.free();
+}
+
+void ChewyFont::setDisplaySize(uint16 width, uint16 height) {
+ _displayWidth = width;
+ _displayHeight = height;
+}
+
+void ChewyFont::setDeltaX(uint16 deltaX) {
+ _deltaX = deltaX;
+}
+
+Graphics::Surface *ChewyFont::getLine(const Common::String &texts) {
+ Graphics::Surface *line = new Graphics::Surface();
+ if (texts.size() == 0)
+ return line;
+
+ Common::Rect subrect(0, 0, _dataWidth, _dataHeight);
+ line->create(texts.size() * _deltaX, _dataHeight, Graphics::PixelFormat::createFormatCLUT8());
+ line->fillRect(Common::Rect(line->w, line->h), 0xFF);
+
+ for (uint i = 0; i < texts.size(); i++) {
+ subrect.moveTo(((byte)texts[i] - _first) * _dataWidth, 0);
+ line->copyRectToSurface(_fontSurface, i * (_deltaX - 2), 0, subrect);
+ }
+
+ return line;
+}
+
+Graphics::Surface *FontMgr::getLine(const Common::String &texts) {
+ return _font->getLine(texts);
+}
+
+} // namespace Chewy
diff --git a/engines/chewy/font.h b/engines/chewy/font.h
new file mode 100644
index 00000000000..a07ec078087
--- /dev/null
+++ b/engines/chewy/font.h
@@ -0,0 +1,69 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CHEWY_FONT_H
+#define CHEWY_FONT_H
+
+#include "common/str.h"
+#include "graphics/surface.h"
+
+namespace Chewy {
+
+class ChewyFont {
+public:
+ ChewyFont(Common::String filename);
+ virtual ~ChewyFont();
+
+ Graphics::Surface *getLine(const Common::String &texts);
+ void setDisplaySize(uint16 width, uint16 height);
+ void setDeltaX(uint16 deltaX);
+
+ uint16 getDataWidth() const { return _dataWidth; }
+ uint16 getDataHeight() const { return _dataHeight; }
+ uint16 getFirst() const { return _first; }
+ uint16 getLast() const { return _last; }
+
+private:
+ uint16 _count, _first, _last;
+ uint16 _dataWidth, _dataHeight;
+ uint16 _displayWidth, _displayHeight;
+ uint16 _deltaX;
+
+ Graphics::Surface _fontSurface;
+};
+
+class FontMgr {
+private:
+ ChewyFont *_font;
+
+public:
+ FontMgr() : _font(nullptr) {};
+ virtual ~FontMgr() {};
+
+ Graphics::Surface *getLine(const Common::String &texts);
+
+ void setFont(ChewyFont *font) { _font = font; }
+ ChewyFont *getFont() { return _font; }
+};
+
+} // namespace Chewy
+
+#endif
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 775761dfb85..ddc4ac7e7df 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -353,7 +353,7 @@ int16 calc_mouse_mov_obj(int16 *auto_nr);
void check_mouse_ausgang(int16 x, int16 y);
-void calc_ausgang(int16 x, int16 y);
+void calcExit(int16 x, int16 y);
void goAutoXy(int16 x, int16 y, int16 personNum, int16 mode);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 57b24491670..28b9990bed5 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -24,6 +24,7 @@
#include "chewy/chewy.h"
#include "chewy/cursor.h"
#include "chewy/events.h"
+#include "chewy/font.h"
#include "chewy/mcga_graphics.h"
#include "chewy/menus.h"
#include "chewy/dialogs/files.h"
@@ -475,7 +476,7 @@ void setupScreen(SetupScreenMode mode) {
if (_G(mouseLeftClick)) {
if (_G(menu_item) == CUR_WALK) {
if (_G(cur_ausgang_flag)) {
- calc_ausgang(g_events->_mousePos.x + _G(gameState).scrollx, g_events->_mousePos.y + _G(gameState).scrolly);
+ calcExit(g_events->_mousePos.x + _G(gameState).scrollx, g_events->_mousePos.y + _G(gameState).scrolly);
} else {
if (!_G(flags).ChewyDontGo) {
_G(gpkt).Dx = g_events->_mousePos.x - _G(spieler_mi)[P_CHEWY].HotMovX +
@@ -1634,7 +1635,7 @@ void check_mouse_ausgang(int16 x, int16 y) {
}
}
-void calc_ausgang(int16 x, int16 y) {
+void calcExit(int16 x, int16 y) {
if (!_G(flags).ExitMov) {
_G(mouseLeftClick) = false;
int16 nr = _G(obj)->is_exit(x, y);
@@ -1831,83 +1832,4 @@ bool is_chewy_busy() {
return ret;
}
-
-ChewyFont::ChewyFont(Common::String filename) {
- const uint32 headerFont = MKTAG('T', 'F', 'F', '\0');
- Common::File stream;
-
- stream.open(filename);
-
- uint32 header = stream.readUint32BE();
-
- if (header != headerFont)
- error("Invalid resource - %s", filename.c_str());
-
- stream.skip(4); // total memory
- _count = stream.readUint16LE();
- _first = stream.readUint16LE();
- _last = stream.readUint16LE();
- _deltaX = _dataWidth = stream.readUint16LE();
- _dataHeight = stream.readUint16LE();
-
- _displayWidth = _dataWidth;
- _displayHeight = _dataHeight;
-
- _fontSurface.create(_dataWidth * _count, _dataHeight, Graphics::PixelFormat::createFormatCLUT8());
-
- int bitIndex = 7;
-
- byte curr = stream.readByte();
-
- for (uint n = 0; n < _count; n++) {
- for (uint y = 0; y < _dataHeight; y++) {
- byte *p = (byte *)_fontSurface.getBasePtr(n * _dataWidth, y);
-
- for (uint x = n * _dataWidth; x < n * _dataWidth + _dataWidth; x++) {
- *p++ = (curr & (1 << bitIndex)) ? 0 : 0xFF;
-
- bitIndex--;
- if (bitIndex < 0) {
- bitIndex = 7;
- curr = stream.readByte();
- }
- }
- }
- }
-}
-
-ChewyFont::~ChewyFont() {
- _fontSurface.free();
-}
-
-void ChewyFont::setDisplaySize(uint16 width, uint16 height) {
- _displayWidth = width;
- _displayHeight = height;
-}
-
-void ChewyFont::setDeltaX(uint16 deltaX) {
- _deltaX = deltaX;
-}
-
-Graphics::Surface *ChewyFont::getLine(const Common::String &texts) {
- Graphics::Surface *line = new Graphics::Surface();
- if (texts.size() == 0)
- return line;
-
- Common::Rect subrect(0, 0, _dataWidth, _dataHeight);
- line->create(texts.size() * _deltaX, _dataHeight, Graphics::PixelFormat::createFormatCLUT8());
- line->fillRect(Common::Rect(line->w, line->h), 0xFF);
-
- for (uint i = 0; i < texts.size(); i++) {
- subrect.moveTo(((byte)texts[i] - _first) * _dataWidth, 0);
- line->copyRectToSurface(_fontSurface, i * (_deltaX - 2), 0, subrect);
- }
-
- return line;
-}
-
-Graphics::Surface *FontMgr::getLine(const Common::String &texts) {
- return _font->getLine(texts);
-}
-
} // namespace Chewy
diff --git a/engines/chewy/main.h b/engines/chewy/main.h
index 6eabb359bdc..b49017e56f2 100644
--- a/engines/chewy/main.h
+++ b/engines/chewy/main.h
@@ -23,7 +23,6 @@
#define CHEWY_MAIN_H
#include "graphics/surface.h"
-#include "chewy/globals.h"
namespace Chewy {
@@ -39,44 +38,6 @@ int16 getAniDirection(int16 status);
void menuEntry();
void menuExit();
-
-class ChewyFont {
-public:
- ChewyFont(Common::String filename);
- virtual ~ChewyFont();
-
- Graphics::Surface *getLine(const Common::String &texts);
- void setDisplaySize(uint16 width, uint16 height);
- void setDeltaX(uint16 deltaX);
-
- uint16 getDataWidth() const { return _dataWidth; }
- uint16 getDataHeight() const { return _dataHeight; }
- uint16 getFirst() const { return _first; }
- uint16 getLast() const { return _last; }
-
-private:
- uint16 _count, _first, _last;
- uint16 _dataWidth, _dataHeight;
- uint16 _displayWidth, _displayHeight;
- uint16 _deltaX;
-
- Graphics::Surface _fontSurface;
-};
-
-class FontMgr {
-private:
- ChewyFont *_font;
-
-public:
- FontMgr() : _font(nullptr) {};
- virtual ~FontMgr() {};
-
- Graphics::Surface *getLine(const Common::String &texts);
-
- void setFont(ChewyFont *font) { _font = font; }
- ChewyFont *getFont() { return _font; }
-};
-
} // namespace Chewy
#endif
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 867c1e123e5..3dba11929d6 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -24,6 +24,7 @@
#include "graphics/palette.h"
#include "chewy/chewy.h"
#include "chewy/events.h"
+#include "chewy/font.h"
#include "chewy/globals.h"
#include "chewy/main.h"
#include "chewy/mcga_graphics.h"
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index e8e4a1f012c..5e081f776bb 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -23,6 +23,7 @@
#include "chewy/defines.h"
#include "chewy/detail.h"
#include "chewy/events.h"
+#include "chewy/font.h"
#include "chewy/globals.h"
#include "chewy/main.h"
#include "chewy/mcga_graphics.h"
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index b981a9a9e00..1f506243463 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -9,6 +9,7 @@ MODULE_OBJS = \
detail.o \
effect.o \
events.o \
+ font.o \
globals.o \
inits.o \
main.o \
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index ec9bdc79705..de3157af762 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -22,6 +22,7 @@
#include "chewy/cursor.h"
#include "chewy/defines.h"
#include "chewy/events.h"
+#include "chewy/font.h"
#include "chewy/globals.h"
#include "chewy/main.h"
#include "chewy/room.h"
Commit: cf1a10f24a1556d229f9015445066357671f46cb
https://github.com/scummvm/scummvm/commit/cf1a10f24a1556d229f9015445066357671f46cb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:36+03:00
Commit Message:
CHEWY: Move private members of FontMgr
Changed paths:
engines/chewy/font.h
diff --git a/engines/chewy/font.h b/engines/chewy/font.h
index a07ec078087..7edf91e8e30 100644
--- a/engines/chewy/font.h
+++ b/engines/chewy/font.h
@@ -51,9 +51,6 @@ private:
};
class FontMgr {
-private:
- ChewyFont *_font;
-
public:
FontMgr() : _font(nullptr) {};
virtual ~FontMgr() {};
@@ -62,6 +59,9 @@ public:
void setFont(ChewyFont *font) { _font = font; }
ChewyFont *getFont() { return _font; }
+
+private:
+ ChewyFont *_font;
};
} // namespace Chewy
Commit: 9c745730a72c9063dfedc1a42b9a853df0334a1a
https://github.com/scummvm/scummvm/commit/9c745730a72c9063dfedc1a42b9a853df0334a1a
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:36+03:00
Commit Message:
CHEWY: Remove the InputMgr class
Changed paths:
R engines/chewy/mouse.cpp
R engines/chewy/mouse.h
engines/chewy/atds.cpp
engines/chewy/cursor.h
engines/chewy/defines.h
engines/chewy/dialogs/cinema.cpp
engines/chewy/dialogs/credits.cpp
engines/chewy/dialogs/files.cpp
engines/chewy/dialogs/inventory.cpp
engines/chewy/dialogs/main_menu.cpp
engines/chewy/dialogs/options.cpp
engines/chewy/events.cpp
engines/chewy/events.h
engines/chewy/globals.h
engines/chewy/inits.cpp
engines/chewy/main.cpp
engines/chewy/mcga_graphics.cpp
engines/chewy/mcga_graphics.h
engines/chewy/menus.cpp
engines/chewy/module.mk
engines/chewy/rooms/room04.cpp
engines/chewy/rooms/room46.cpp
engines/chewy/rooms/room51.cpp
engines/chewy/rooms/room97.cpp
engines/chewy/t_event.cpp
engines/chewy/video/video_player.cpp
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 4f8943096fb..9eb63662496 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -25,9 +25,7 @@
#include "chewy/events.h"
#include "chewy/font.h"
#include "chewy/globals.h"
-#include "chewy/main.h"
#include "chewy/mcga_graphics.h"
-#include "chewy/mouse.h"
#include "chewy/sound.h"
#include "chewy/text.h"
@@ -394,10 +392,10 @@ void Atdsys::stop_ats() {
void Atdsys::print_ats(int16 x, int16 y, int16 scrX, int16 scrY) {
if (_atsv.shown) {
if (_atdsv._eventsEnabled) {
- switch (_G(in)->getSwitchCode()) {
+ switch (g_events->getSwitchCode()) {
case Common::KEYCODE_ESCAPE:
case Common::KEYCODE_RETURN:
- case MOUSE_LEFT:
+ case Common::MOUSE_BUTTON_LEFT:
if (!_mousePush) {
if (_atsv._silentCount <= 0 && _atsv._delayCount > _printDelayCount1) {
_mousePush = true;
@@ -538,10 +536,10 @@ void Atdsys::stopAad() {
void Atdsys::print_aad(int16 scrX, int16 scrY) {
if (_aadv._dialog) {
if (_atdsv._eventsEnabled) {
- switch (_G(in)->getSwitchCode()) {
+ switch (g_events->getSwitchCode()) {
case Common::KEYCODE_ESCAPE:
case Common::KEYCODE_RETURN:
- case MOUSE_LEFT:
+ case Common::MOUSE_BUTTON_LEFT:
EVENTS_CLEAR;
if (!_mousePush) {
diff --git a/engines/chewy/cursor.h b/engines/chewy/cursor.h
index e2cec3016f9..e28a853c9f5 100644
--- a/engines/chewy/cursor.h
+++ b/engines/chewy/cursor.h
@@ -23,7 +23,6 @@
#define CHEWY_CURSOR_H
#include "chewy/globals.h"
-#include "chewy/mouse.h"
namespace Chewy {
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 69bb2376e72..a72bc25c007 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -574,7 +574,7 @@ enum SetupScreenMode {
#define EXIT_RIGHT 2
#define EXIT_TOP 3
#define EXIT_BOTTOM 4
-#define WAIT_TASTE_LOS while (_G(in)->getSwitchCode() != 0 \
+#define WAIT_TASTE_LOS while (g_events->getSwitchCode() != 0 \
&& !SHOULD_QUIT) { g_events->update(); }
} // namespace Chewy
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index a1add56ea64..0a746527128 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -88,7 +88,7 @@ void Cinema::execute() {
if (_G(minfo).button == 1 && !flag) {
flag = true;
- switch (_G(in)->findHotspot(_G(cinematicsHotspots))) {
+ switch (_G(out)->findHotspot(_G(cinematicsHotspots))) {
case 0:
g_events->_kbInfo._scanCode = Common::KEYCODE_UP;
break;
diff --git a/engines/chewy/dialogs/credits.cpp b/engines/chewy/dialogs/credits.cpp
index 4a0ceee7bcc..68f9c2e41ea 100644
--- a/engines/chewy/dialogs/credits.cpp
+++ b/engines/chewy/dialogs/credits.cpp
@@ -24,7 +24,6 @@
#include "chewy/font.h"
#include "chewy/globals.h"
#include "chewy/mcga_graphics.h"
-#include "chewy/mouse.h"
#include "chewy/text.h"
namespace Chewy {
@@ -217,7 +216,7 @@ void Credits::execute() {
_G(gameState).DelaySpeed = 2;
for (;;) {
- if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE || SHOULD_QUIT)
+ if (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE || SHOULD_QUIT)
break;
// Display the starfield background
@@ -229,7 +228,7 @@ void Credits::execute() {
if (++_G(gameState).scrollx >= 320)
_G(gameState).scrollx = 0;
- if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE)
+ if (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE)
break;
++lineScrolled;
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 4d25138c377..799d53bec20 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -126,7 +126,7 @@ bool Files::execute(bool isInGame) {
}
}
- key = _G(in)->getSwitchCode();
+ key = g_events->getSwitchCode();
if (mode[SCROLL_UP])
--mode[SCROLL_UP];
@@ -160,7 +160,7 @@ bool Files::execute(bool isInGame) {
}
if (!flag && _G(minfo).button == 1) {
- int16 rect = _G(in)->findHotspot(_G(fileHotspots));
+ int16 rect = _G(out)->findHotspot(_G(fileHotspots));
flag = true;
key = 0;
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index 47aa4152d08..273edbff26d 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -27,7 +27,6 @@
#include "chewy/font.h"
#include "chewy/globals.h"
#include "chewy/menus.h"
-#include "chewy/mouse.h"
#include "chewy/sound.h"
namespace Chewy {
@@ -56,7 +55,7 @@ void Inventory::plot_menu() {
}
int16 y;
- int16 hotspotId = _G(in)->findHotspot(_G(inventoryHotspots));
+ int16 hotspotId = _G(out)->findHotspot(_G(inventoryHotspots));
// Highlight hotspots
if (hotspotId != -1) {
@@ -218,7 +217,7 @@ void Inventory::menu() {
mouseFl = true;
g_events->_kbInfo._keyCode = '\0';
- int16 k = _G(in)->findHotspot(_G(inventoryHotspots));
+ int16 k = _G(out)->findHotspot(_G(inventoryHotspots));
if (keyVal == Common::KEYCODE_F1)
k = 0;
else if (keyVal == Common::KEYCODE_F2)
@@ -252,11 +251,11 @@ void Inventory::menu() {
break;
case 3:
- _G(in)->_hotkey = Common::KEYCODE_PAGEUP;
+ g_events->setHotKey(Common::KEYCODE_PAGEUP);
break;
case 4:
- _G(in)->_hotkey = Common::KEYCODE_PAGEDOWN;
+ g_events->setHotKey(Common::KEYCODE_PAGEDOWN);
break;
case 5:
@@ -296,7 +295,7 @@ void Inventory::menu() {
} else if (_G(minfo).button == 2 || g_events->_kbInfo._keyCode == Common::KEYCODE_ESCAPE) {
if (!mouseFl) {
// Set virtual key
- _G(in)->_hotkey = Common::KEYCODE_ESCAPE;
+ g_events->setHotKey(Common::KEYCODE_ESCAPE);
mouseFl = true;
}
}
@@ -314,7 +313,7 @@ void Inventory::menu() {
}
ret_look = -1;
- int16 keyCode = _G(in)->getSwitchCode();
+ int16 keyCode = g_events->getSwitchCode();
// The original hid the cursor here
if (taste_flag) {
@@ -333,7 +332,7 @@ void Inventory::menu() {
case Common::KEYCODE_ESCAPE:
if (!menuFirstFl) {
_G(cur)->showCursor();
- while (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE) {
+ while (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE) {
SHOULD_QUIT_RETURN;
setupScreen(NO_SETUP);
inv_rand_x = -1;
@@ -414,7 +413,7 @@ void Inventory::menu() {
g_events->_mousePos.y = _G(maus_old_y);
_G(minfo).button = 0;
- while (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
+ while (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
setupScreen(NO_SETUP);
_G(cur)->updateCursor();
_G(out)->copyToScreen();
@@ -469,7 +468,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
const int16 speechId = _G(atds)->getLastSpeechId();
while (!endLoop) {
- int16 rect = _G(in)->findHotspot(_G(inventoryHotspots));
+ int16 rect = _G(out)->findHotspot(_G(inventoryHotspots));
if (_G(minfo).button) {
if (_G(minfo).button == 2) {
@@ -516,8 +515,11 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
switch (g_events->_kbInfo._scanCode) {
case Common::KEYCODE_F1:
+ g_events->setHotKey(Common::KEYCODE_F1);
+ break;
+
case Common::KEYCODE_F2:
- _G(in)->_hotkey = g_events->_kbInfo._scanCode;
+ g_events->setHotKey(Common::KEYCODE_F2);
break;
case Common::KEYCODE_ESCAPE:
@@ -589,7 +591,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
SHOULD_QUIT_RETURN0;
}
- while (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE) {
+ while (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE) {
setupScreen(NO_SETUP);
plot_menu();
_G(cur)->updateCursor();
@@ -712,7 +714,7 @@ void Inventory::showDiary() {
_G(out)->setPointer(nullptr);
_G(fx)->blende1(_G(workptr), _G(pal), 0, 0);
- while (_G(in)->getSwitchCode() != Common::KEYCODE_ESCAPE) {
+ while (g_events->getSwitchCode() != Common::KEYCODE_ESCAPE) {
g_events->update();
SHOULD_QUIT_RETURN;
}
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 7d11571c89d..2ca2ab0e5fb 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -132,7 +132,7 @@ void MainMenu::execute() {
void MainMenu::screenFunc() {
int vec = _G(det)->maus_vector(g_events->_mousePos.x + _G(gameState).scrollx, g_events->_mousePos.y + _G(gameState).scrolly);
- if (_G(in)->getSwitchCode() == 28 || _G(minfo).button == 1) {
+ if (g_events->getSwitchCode() == 28 || _G(minfo).button == 1) {
_selection = vec;
}
}
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 13f64314d09..18bb7d0635b 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -142,13 +142,13 @@ void Options::execute(TafInfo *ti) {
18 + ti->correction[EXIT << 1],
8 + ti->correction[(EXIT << 1) + 1], 0);
- key = _G(in)->getSwitchCode();
+ key = g_events->getSwitchCode();
if ((_G(minfo).button == 1) || (key == Common::KEYCODE_RETURN)) {
// TODO This line breaks screen updates. Not sure what it does
// otherwise; options screen seems to work without it.
//WAIT_TASTE_LOS
- int16 rect = _G(in)->findHotspot(_G(optionHotspots));
+ int16 rect = _G(out)->findHotspot(_G(optionHotspots));
switch (rect) {
case 0: // Hamster wheel arrow left (speed down)
if (_G(gameState).FramesPerSecond > 6)
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index b758a775922..3d166d1b63a 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -22,7 +22,6 @@
#include "common/system.h"
#include "chewy/events.h"
#include "chewy/globals.h"
-#include "chewy/mouse.h"
namespace Chewy {
@@ -220,6 +219,28 @@ void EventsManager::warpMouse(const Common::Point &newPos) {
g_system->warpMouse(newPos.x, newPos.y);
}
+int16 EventsManager::getSwitchCode() {
+ int16 switch_code = 0;
+
+ if (_G(minfo).button == 2)
+ switch_code = Common::KEYCODE_ESCAPE;
+ else if (_G(minfo).button == 1)
+ switch_code = Common::MOUSE_BUTTON_LEFT;
+ else if (_G(minfo).button == 4)
+ switch_code = Common::MOUSE_BUTTON_MIDDLE;
+
+ if (g_events->_kbInfo._keyCode != 0)
+ switch_code = (int16)g_events->_kbInfo._keyCode;
+
+ // Virtual key, set when an item is taken from the inventory
+ if (_hotkey != Common::KEYCODE_INVALID) {
+ switch_code = _hotkey;
+ _hotkey = Common::KEYCODE_INVALID;
+ }
+
+ return switch_code;
+}
+
void delay(size_t time) {
g_events->delay(time);
}
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 6ca333e5c97..19bd7e73472 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -55,6 +55,7 @@ private:
TimerList _timers;
Common::Queue<Common::Event> _pendingEvents;
Common::Queue<Common::Event> _pendingKeyEvents;
+ int16 _hotkey = Common::KEYCODE_INVALID;
/**
* Checks for timer expiries
@@ -146,6 +147,9 @@ public:
* Clear any pending events
*/
void clearEvents();
+
+ void setHotKey(Common::KeyCode key) { _hotkey = key; }
+ int16 getSwitchCode();
};
extern EventsManager *g_events;
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index ddc4ac7e7df..ac4bb1026c1 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -46,7 +46,6 @@ extern const uint8 RAND_NO_USE[MAX_RAND_NO_USE];
class ChewyFont;
class Cursor;
class FontMgr;
-class InputMgr;
class McgaGraphics;
class Memory;
@@ -228,7 +227,6 @@ public:
int16 _cur_ausgang_flag = 0;
int16 _room_start_nr = 0;
int16 _TmpFrameSpeed = 0;
- InputMgr *_in = nullptr;
Memory *_mem = nullptr;
McgaGraphics *_out = nullptr;
Cursor *_cur = nullptr;
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 86cbb9bc587..fe142afb069 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -35,7 +35,6 @@ namespace Chewy {
void standard_init() {
_G(mem) = new Memory();
_G(out) = new McgaGraphics();
- _G(in) = new InputMgr();
_G(fx) = new Effect();
_G(txt) = new Text();
_G(barriers) = new Barriers();
@@ -208,7 +207,6 @@ void tidy() {
delete _G(barriers);
delete _G(txt);
delete _G(fx);
- delete _G(in);
delete _G(out);
delete _G(mem);
@@ -222,7 +220,6 @@ void tidy() {
_G(barriers) = nullptr;
_G(txt) = nullptr;
_G(fx) = nullptr;
- _G(in) = nullptr;
_G(out) = nullptr;
_G(mem) = nullptr;
}
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 28b9990bed5..6fe39f90be8 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -684,7 +684,7 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
void kb_mov(int16 mode) {
bool ende = false;
while (!ende) {
- switch (_G(in)->getSwitchCode()) {
+ switch (g_events->getSwitchCode()) {
case Common::KEYCODE_RIGHT:
if (g_events->_mousePos.x < 320 - _G(cur)->getCursorWidth())
_G(cur)->move(g_events->_mousePos.x + 2, g_events->_mousePos.y);
@@ -1129,7 +1129,7 @@ bool autoMove(int16 movNr, int16 playerNum) {
while (_G(mov)->auto_go_status()) {
if (SHOULD_QUIT)
return 0;
- if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE) {
+ if (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE) {
if (_G(flags).ExitMov || _G(flags).BreakAMov) {
key = Common::KEYCODE_ESCAPE;
_G(mov)->stop_auto_go();
@@ -1148,7 +1148,7 @@ bool autoMove(int16 movNr, int16 playerNum) {
_G(mov)->get_mov_vector((int16 *)_G(spieler_mi)[playerNum].XyzStart, (int16 *)_G(spieler_mi)[playerNum].XyzEnd, _G(spieler_mi)[playerNum].Vorschub, &_G(moveState)[playerNum]);
get_phase(&_G(moveState)[playerNum], &_G(spieler_mi)[playerNum]);
while (!endLoopFl) {
- if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE || key == Common::KEYCODE_ESCAPE) {
+ if (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE || key == Common::KEYCODE_ESCAPE) {
if (_G(flags).ExitMov || _G(flags).BreakAMov) {
_G(moveState)[playerNum].Count = 0;
movingFl = false;
@@ -1196,7 +1196,7 @@ void goAutoXy(int16 x, int16 y, int16 personNum, int16 mode) {
if (mode == ANI_WAIT) {
bool endLoopFl = false;
while (!endLoopFl) {
- if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE) {
+ if (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE) {
if (_G(flags).ExitMov || _G(flags).BreakAMov) {
_G(moveState)[personNum].Count = 0;
move_status = false;
@@ -1537,7 +1537,7 @@ void get_user_key(int16 mode) {
_G(mouseLeftClick) = false;
if (!_G(inv_disp_ok)) {
- switch (_G(in)->getSwitchCode()) {
+ switch (g_events->getSwitchCode()) {
case Common::KEYCODE_F5:
case Common::KEYCODE_SPACE:
case Common::KEYCODE_ESCAPE:
diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp
index 3dba11929d6..de1509133b6 100644
--- a/engines/chewy/mcga_graphics.cpp
+++ b/engines/chewy/mcga_graphics.cpp
@@ -26,7 +26,6 @@
#include "chewy/events.h"
#include "chewy/font.h"
#include "chewy/globals.h"
-#include "chewy/main.h"
#include "chewy/mcga_graphics.h"
namespace Chewy {
@@ -931,4 +930,16 @@ void McgaGraphics::zoom_set(byte *source, int16 x, int16 y, int16 xDiff, int16 y
}
}
+int16 McgaGraphics::findHotspot(const Common::Rect *hotspots) {
+ int16 i = 0;
+
+ do {
+ if (hotspots[i].contains(g_events->_mousePos))
+ return i;
+ i++;
+ } while (hotspots[i].left != -1);
+
+ return -1;
+}
+
} // namespace Chewy
diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h
index 6ce6e1a8d6c..3776203a1cc 100644
--- a/engines/chewy/mcga_graphics.h
+++ b/engines/chewy/mcga_graphics.h
@@ -63,6 +63,7 @@ public:
void printxy(int16 x, int16 y, int16 fgCol, int16 bgCol, int16 scrwidth,
const char *format);
void move(int16 x, int16 y);
+ int16 findHotspot(const Common::Rect *hotspots);
private:
int16 devices();
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index 5e081f776bb..ff4128942d0 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -28,7 +28,6 @@
#include "chewy/main.h"
#include "chewy/mcga_graphics.h"
#include "chewy/menus.h"
-#include "chewy/mouse.h"
namespace Chewy {
@@ -284,8 +283,8 @@ void handleDialogCloseupMenu() {
}
}
- switch (_G(in)->getSwitchCode()) {
- case 255:
+ switch (g_events->getSwitchCode()) {
+ case Common::MOUSE_BUTTON_LEFT:
case Common::KEYCODE_RETURN:
if (curY < _G(ads_item_nr) && curY >= 0 && _G(ads_push) == false) {
_G(ads_push) = true;
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 1f506243463..9a568b21f75 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -13,7 +13,6 @@ MODULE_OBJS = \
globals.o \
inits.o \
main.o \
- mouse.o \
mcga_graphics.o \
memory.o \
menus.o \
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
deleted file mode 100644
index 2d2de152d5b..00000000000
--- a/engines/chewy/mouse.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/textconsole.h"
-#include "chewy/mouse.h"
-#include "chewy/events.h"
-#include "chewy/globals.h"
-
-namespace Chewy {
-
-InputMgr::InputMgr() {
-}
-
-InputMgr::~InputMgr() {
-}
-
-int16 InputMgr::findHotspot(const Common::Rect *hotspots) {
- int16 i = 0;
-
- do {
- if (hotspots[i].contains(g_events->_mousePos))
- return i;
- i++;
- } while (hotspots[i].left != -1);
-
- return -1;
-}
-
-int16 InputMgr::getSwitchCode() {
- int16 switch_code = 0;
-
- if (_G(minfo).button == 2) {
- switch_code = Common::KEYCODE_ESCAPE;
- } else if (_G(minfo).button == 1)
- switch_code = MOUSE_LEFT;
- else if (_G(minfo).button == 4)
- switch_code = MOUSE_CENTER;
-
- if (g_events->_kbInfo._keyCode != 0)
- switch_code = (int16)g_events->_kbInfo._keyCode;
-
- // Virtual key, set when an item is taken from the inventory
- if (_hotkey != Common::KEYCODE_INVALID) {
- switch_code = _hotkey;
- _hotkey = Common::KEYCODE_INVALID;
- }
-
- return switch_code;
-}
-
-} // namespace Chewy
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
deleted file mode 100644
index 6477447403c..00000000000
--- a/engines/chewy/mouse.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef CHEWY_MOUSE_H
-#define CHEWY_MOUSE_H
-
-#include "common/keyboard.h"
-#include "common/rect.h"
-
-namespace Chewy {
-
-#define MOUSE_LEFT 255
-#define MOUSE_CENTER 254
-
-class InputMgr {
-public:
- InputMgr();
- ~InputMgr();
-
- int16 findHotspot(const Common::Rect *hotspots);
-
- int16 getSwitchCode();
-
- int16 _hotkey = Common::KEYCODE_INVALID;
-};
-
-} // namespace Chewy
-
-#endif
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index adddb3a621d..1badef6f12b 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -23,7 +23,6 @@
#include "chewy/defines.h"
#include "chewy/events.h"
#include "chewy/globals.h"
-#include "chewy/mouse.h"
#include "chewy/room.h"
#include "chewy/rooms/room04.h"
#include "chewy/sound.h"
@@ -84,7 +83,7 @@ int16 Room4::comp_probe() {
mouseAction();
if (_G(mouseLeftClick)) {
- switch (_G(in)->findHotspot(CONSOLE_HOTSPOTS)) {
+ switch (_G(out)->findHotspot(CONSOLE_HOTSPOTS)) {
case 0:
if (curX > 0)
--curX;
diff --git a/engines/chewy/rooms/room46.cpp b/engines/chewy/rooms/room46.cpp
index cdc2910ef8f..7734dbf9324 100644
--- a/engines/chewy/rooms/room46.cpp
+++ b/engines/chewy/rooms/room46.cpp
@@ -168,7 +168,7 @@ void Room46::kloppe() {
if (g_engine->_sound->speechEnabled()) {
g_engine->_sound->waitForSpeechToFinish();
} else {
- while (_G(in)->getSwitchCode() == Common::KEYCODE_INVALID && delay) {
+ while (g_events->getSwitchCode() == Common::KEYCODE_INVALID && delay) {
--delay;
EVENTS_UPDATE;
SHOULD_QUIT_RETURN;
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index 398bbb80bc1..4afd06f3ef4 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -143,7 +143,7 @@ void Room51::setup_func() {
_G(det)->setStaticPos(17, _tmpx, _tmpy, false, false);
- if ((_G(minfo).button == 1 || _G(in)->getSwitchCode() == 28) && !_flag) {
+ if ((_G(minfo).button == 1 || g_events->getSwitchCode() == 28) && !_flag) {
_flag = true;
_G(det)->setDetailPos(8, _tmpx - 20, _tmpy + 41);
startSetAILWait(8, 1, ANI_FRONT);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index bf8ebf07560..2faeda9f5e2 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -23,7 +23,6 @@
#include "chewy/defines.h"
#include "chewy/events.h"
#include "chewy/globals.h"
-#include "chewy/mouse.h"
#include "chewy/room.h"
#include "chewy/rooms/room97.h"
#include "chewy/sound.h"
@@ -682,7 +681,7 @@ void Room97::sensorAnim() {
while (_G(det)->get_ani_status(16)) {
get_user_key(NO_SETUP);
- if (_G(minfo).button == 1 || _G(in)->getSwitchCode() == 28) {
+ if (_G(minfo).button == 1 || g_events->getSwitchCode() == 28) {
if (_G(cur)->usingInventoryCursor())
_G(mouseLeftClick) = true;
}
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index fd1859ce9f6..d4429ebb9fc 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -25,7 +25,6 @@
#include "chewy/dialogs/inventory.h"
#include "chewy/events.h"
#include "chewy/globals.h"
-#include "chewy/mouse.h"
#include "chewy/rooms/rooms.h"
namespace Chewy {
@@ -2173,11 +2172,11 @@ void calc_inv_use_txt(int16 test_nr) {
_G(out)->map_spr2screen(_G(ablage)[_G(room_blk).AkAblage], _G(gameState).scrollx, _G(gameState).scrolly);
_G(out)->copyToScreen();
- while (_G(in)->getSwitchCode() != Common::KEYCODE_ESCAPE) {
+ while (g_events->getSwitchCode() != Common::KEYCODE_ESCAPE) {
g_events->update();
SHOULD_QUIT_RETURN;
}
- while (_G(in)->getSwitchCode() != Common::KEYCODE_INVALID) {
+ while (g_events->getSwitchCode() != Common::KEYCODE_INVALID) {
g_events->update();
SHOULD_QUIT_RETURN;
}
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index 380da53f660..f0c28925a85 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -24,7 +24,6 @@
#include "chewy/cursor.h"
#include "chewy/events.h"
#include "chewy/globals.h"
-#include "chewy/mouse.h"
#include "chewy/resource.h"
#include "chewy/sound.h"
#include "common/events.h"
@@ -89,7 +88,7 @@ bool VideoPlayer::playVideo(uint num, bool stopMusic) {
// FIXME: We ignore mouse events because the game checks
// for left mouse down, instead of up, so releasing the
// mouse button results in video skipping
- if (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE)
+ if (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE)
skipVideo = true;
// Clear any pending keys
@@ -292,7 +291,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
cfoDecoder->rewind();
_playCount++;
}
- return (_G(in)->getSwitchCode() == 1) ? false : true;
+ return (g_events->getSwitchCode() == 1) ? false : true;
case FCUT_116:
if (cfoDecoder->endOfVideo() && _playCount < 6) {
cfoDecoder->rewind();
Commit: 3fbaf437b1c933e73f8bfa7f0f265be8ce164713
https://github.com/scummvm/scummvm/commit/3fbaf437b1c933e73f8bfa7f0f265be8ce164713
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:37+03:00
Commit Message:
CHEWY: Cleanup
Changed paths:
engines/chewy/memory.cpp
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 24be5e55a90..834691f4a18 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -55,7 +55,7 @@ TafInfo *Memory::taf_adr(const char *filename) {
}
TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
- TafSeqInfo *ts_info = nullptr;
+ TafSeqInfo *ts_info;
SpriteResource *res = new SpriteResource(CH_SPZ_FILE);
uint32 size = 0;
@@ -74,7 +74,7 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
ts_info->count = image_anz;
ts_info->image = (byte **)(tmp1 + sizeof(TafSeqInfo));
ts_info->correction = (int16 *)(tmp1 + size);
- byte *sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo)) + (image_anz * sizeof(char *)));
+ byte *sp_ptr = tmp1 + ((sizeof(TafSeqInfo)) + (image_anz * sizeof(char *)));
for (int16 i = 0; i < image_anz; i++) {
ts_info->image[i] = sp_ptr;
Commit: 89d365781b9182a61c01a500568d981b9ca12238
https://github.com/scummvm/scummvm/commit/89d365781b9182a61c01a500568d981b9ca12238
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:37+03:00
Commit Message:
CHEWY: Remove the CustomInfo struct
Changed paths:
engines/chewy/globals.h
engines/chewy/main.cpp
engines/chewy/ngstypes.h
engines/chewy/rooms/room89.cpp
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index ac4bb1026c1..395573607c9 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -203,7 +203,7 @@ public:
RaumBlk _room_blk;
Flags _flags = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 };
- CustomInfo _Ci;
+ byte *_tempArea = nullptr;
GotoPkt _gpkt;
bool _disableScreen = false;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 6fe39f90be8..7bcc51baec8 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -72,8 +72,8 @@ void game_main() {
void alloc_buffers() {
_G(workpage) = (byte *)MALLOC(64004l);
_G(pal) = (byte *)MALLOC(768l);
- _G(Ci).tempArea = (byte *)MALLOC(64004l);
- _G(det)->set_taf_ani_mem(_G(Ci).tempArea);
+ _G(tempArea) = (byte *)MALLOC(64004l);
+ _G(det)->set_taf_ani_mem(_G(tempArea));
}
void free_buffers() {
@@ -85,7 +85,7 @@ void free_buffers() {
free(_G(menutaf));
free(_G(chewy));
- free(_G(Ci).tempArea);
+ free(_G(tempArea));
free(_G(pal));
free(_G(workpage));
}
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 04138095650..d7a0bb50175 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -52,10 +52,6 @@ struct MusicInfo {
char *cur_pattern = nullptr;
};
-struct CustomInfo {
- byte *tempArea = 0;
-};
-
} // namespace Chewy
#endif
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index c56460da2cb..4ab652bf5d2 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -95,13 +95,13 @@ void Room89::entry() {
// Squash screen into a single point at the center
int edi = -20;
int var24 = 0;
- _G(out)->spriteSave(_G(Ci).tempArea, 0, 0, 320, 200);
+ _G(out)->spriteSave(_G(tempArea), 0, 0, 320, 200);
for (int esi = 0; esi < 100; ++esi) {
edi -= 3;
var24 -= 2;
_G(out)->setPointer(_G(workptr));
_G(out)->cls();
- _G(out)->scale_set(_G(Ci).tempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
+ _G(out)->scale_set(_G(tempArea), ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
_G(out)->setPointer(nullptr);
_G(out)->copyToScreen();
g_events->delay(30);
@@ -114,7 +114,7 @@ void Room89::entry() {
// Those strings are also displayed in the the German version
_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
_G(out)->printxy(70, 100, 15, 0, 0, " CHEWY Esc from F5");
- _G(out)->spriteSave(_G(Ci).tempArea, 0, 0, 320, 200);
+ _G(out)->spriteSave(_G(tempArea), 0, 0, 320, 200);
edi = -300;
int var30 = -200;
@@ -123,7 +123,7 @@ void Room89::entry() {
var30 += 2;
_G(out)->setPointer(_G(workptr));
_G(out)->cls();
- _G(out)->scale_set(_G(Ci).tempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
+ _G(out)->scale_set(_G(tempArea), ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
_G(out)->setPointer(nullptr);
_G(out)->copyToScreen();
g_events->delay(30);
Commit: 13462c1f6e63c112bc3ee52e1cbb23e6434438cb
https://github.com/scummvm/scummvm/commit/13462c1f6e63c112bc3ee52e1cbb23e6434438cb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:37+03:00
Commit Message:
CHEWY: Change default value of getSwitchCode()
A value of 0 clashes with Common::MOUSE_BUTTON_LEFT
Changed paths:
engines/chewy/defines.h
engines/chewy/events.cpp
engines/chewy/video/video_player.cpp
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index a72bc25c007..475b2ef7a08 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -574,7 +574,7 @@ enum SetupScreenMode {
#define EXIT_RIGHT 2
#define EXIT_TOP 3
#define EXIT_BOTTOM 4
-#define WAIT_TASTE_LOS while (g_events->getSwitchCode() != 0 \
+#define WAIT_TASTE_LOS while (g_events->getSwitchCode() != -1 \
&& !SHOULD_QUIT) { g_events->update(); }
} // namespace Chewy
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 3d166d1b63a..bff6caeadab 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -220,7 +220,7 @@ void EventsManager::warpMouse(const Common::Point &newPos) {
}
int16 EventsManager::getSwitchCode() {
- int16 switch_code = 0;
+ int16 switch_code = -1;
if (_G(minfo).button == 2)
switch_code = Common::KEYCODE_ESCAPE;
@@ -238,6 +238,8 @@ int16 EventsManager::getSwitchCode() {
_hotkey = Common::KEYCODE_INVALID;
}
+ //debug("Mouse button: %d, key: %d, hotkey: %d", _G(minfo).button, g_events->_kbInfo._keyCode, _hotkey);
+
return switch_code;
}
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index f0c28925a85..13286b159ad 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -291,7 +291,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
cfoDecoder->rewind();
_playCount++;
}
- return (g_events->getSwitchCode() == 1) ? false : true;
+ return (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE) ? false : true;
case FCUT_116:
if (cfoDecoder->endOfVideo() && _playCount < 6) {
cfoDecoder->rewind();
Commit: 6ea7408f09de072f116794ad38f28a653f3feefb
https://github.com/scummvm/scummvm/commit/6ea7408f09de072f116794ad38f28a653f3feefb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:38+03:00
Commit Message:
CHEWY: Clear pending events when starting or skipping text
Changed paths:
engines/chewy/atds.cpp
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 9eb63662496..6ec14df3430 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -354,6 +354,11 @@ void Atdsys::load_atds(int16 chunkNr, int16 mode) {
bool Atdsys::start_ats(int16 txtNr, int16 txtMode, int16 color, int16 mode, int16 *vocNr) {
assert(mode == ATS_DATA || mode == INV_USE_DATA || mode == INV_USE_DEF);
+ EVENTS_CLEAR;
+ g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
+ g_events->_kbInfo._keyCode = '\0';
+ _G(minfo).button = 0;
+
*vocNr = -1;
_atsv.shown = false;
@@ -397,11 +402,14 @@ void Atdsys::print_ats(int16 x, int16 y, int16 scrX, int16 scrY) {
case Common::KEYCODE_RETURN:
case Common::MOUSE_BUTTON_LEFT:
if (!_mousePush) {
+ EVENTS_CLEAR;
+ g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
+ g_events->_kbInfo._keyCode = '\0';
+ _G(minfo).button = 0;
+
if (_atsv._silentCount <= 0 && _atsv._delayCount > _printDelayCount1) {
_mousePush = true;
_atsv._delayCount = 0;
- g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
- g_events->_kbInfo._keyCode = '\0';
}
}
break;
@@ -496,6 +504,11 @@ int16 Atdsys::start_aad(int16 diaNr) {
if (_aadv._dialog)
stopAad();
+ EVENTS_CLEAR;
+ g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
+ g_events->_kbInfo._keyCode = '\0';
+ _G(minfo).button = 0;
+
if (_atdsMem[AAD_HANDLE]) {
_aadv._ptr = _atdsMem[AAD_HANDLE];
aad_search_dia(diaNr, &_aadv._ptr);
@@ -540,14 +553,15 @@ void Atdsys::print_aad(int16 scrX, int16 scrY) {
case Common::KEYCODE_ESCAPE:
case Common::KEYCODE_RETURN:
case Common::MOUSE_BUTTON_LEFT:
- EVENTS_CLEAR;
-
if (!_mousePush) {
+ EVENTS_CLEAR;
+ g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
+ g_events->_kbInfo._keyCode = '\0';
+ _G(minfo).button = 0;
+
if (_aadv._silentCount <= 0 && _aadv._delayCount > _printDelayCount1) {
_mousePush = true;
_aadv._delayCount = 0;
- g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
- g_events->_kbInfo._keyCode = '\0';
}
}
break;
@@ -716,9 +730,9 @@ void Atdsys::aad_search_dia(int16 diaNr, char **ptr) {
bool Atdsys::startDialogCloseup(int16 diaNr) {
bool ret = false;
+ bool end = false;
load_atds(diaNr, DIALOG_CLOSEUP_DATA);
- bool end = false;
if (_atdsMem[ADS_HANDLE][0] == (char)BLOCKENDE &&
_atdsMem[ADS_HANDLE][1] == (char)BLOCKENDE &&
Commit: 886a140841a3dd7cd1a28f8a862633f5f3ba993d
https://github.com/scummvm/scummvm/commit/886a140841a3dd7cd1a28f8a862633f5f3ba993d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-07T15:13:38+03:00
Commit Message:
CHEWY: Fix in-game dialogs - bugs #13594 and 13632
Changed paths:
engines/chewy/atds.cpp
engines/chewy/atds.h
engines/chewy/globals.h
engines/chewy/r_event.cpp
engines/chewy/sprite.cpp
engines/chewy/video/video_player.cpp
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 6ec14df3430..7b70308986a 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -500,10 +500,12 @@ void Atdsys::delControlBit(int16 txtNr, int16 bitIdx) {
_text->delControlBit(txtNr, bitIdx);
}
-int16 Atdsys::start_aad(int16 diaNr) {
+int16 Atdsys::start_aad(int16 diaNr, bool continueWhenSpeechEnds) {
if (_aadv._dialog)
stopAad();
+ _continueWhenSpeechEnds = continueWhenSpeechEnds;
+
EVENTS_CLEAR;
g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
g_events->_kbInfo._keyCode = '\0';
@@ -624,7 +626,7 @@ void Atdsys::print_aad(int16 scrX, int16 scrY) {
g_engine->_sound->playSpeech(_atdsv._vocNr, false);
}
- if (_atdsv._vocNr >= 0 && !g_engine->_sound->isSpeechActive())
+ if (_continueWhenSpeechEnds && _atdsv._vocNr >= 0 && !g_engine->_sound->isSpeechActive())
stopAad();
}
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 76508377ad9..82581d3d852 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -228,7 +228,7 @@ public:
void delControlBit(int16 txtNr, int16 bitIdx);
void set_ats_str(int16 txtNr, int16 txtMode, int16 strNr, int16 mode);
void set_ats_str(int16 txtNr, int16 strNr, int16 mode);
- int16 start_aad(int16 diaNr);
+ int16 start_aad(int16 diaNr, bool continueWhenSpeechEnds = false);
void stopAad();
void print_aad(int16 scrX, int16 scrY);
int16 aadGetStatus();
@@ -280,6 +280,7 @@ private:
DialogCloseupNextBlock _dialogCloseupNextBlock;
uint8 _dialogCloseupStack[DIALOG_CLOSEUP_STACK_SIZE] = { 0 };
int16 _dialogCloseupStackPtr;
+ bool _continueWhenSpeechEnds = false;
SplitStringInit _ssi[AAD_MAX_PERSON] = {
{ 0, 100, 0 },
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 395573607c9..9baf0d52ea5 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -477,7 +477,7 @@ void startAadWait(int16 diaNr);
void start_aad(int16 diaNr);
void aadWait(int16 strNr);
void startDialogCloseupWait(int16 diaNr);
-void start_aad(int16 diaNr, int16 ssiNr);
+void start_aad(int16 diaNr, int16 ssiNr, bool continueWhenSpeechEnds = false);
void wait_auto_obj(int16 nr);
void stop_auto_obj(int16 nr);
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index 36dfc1f4269..63114ad06da 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -672,7 +672,7 @@ static void playIntroSequence() {
g_engine->_sound->playRoomMusic(260);
if (introDialog[i] != -1)
- start_aad(introDialog[i], -1);
+ start_aad(introDialog[i], -1, true);
ret = g_engine->_video->playVideo(introVideo[i], false) ? 0 : -1;
_G(atds)->stopAad();
@@ -734,7 +734,7 @@ void flic_cut(int16 nr) {
if (!_G(gameState).R43GetPgLady) {
g_engine->_video->playVideo(FCUT_060);
} else {
- start_aad(623, -1);
+ start_aad(623, -1, true);
g_engine->_video->playVideo(FCUT_061);
g_engine->_video->playVideo(FCUT_062);
}
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index e7207fe0aff..09b39ad4683 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -558,14 +558,14 @@ void aadWait(int16 strNr) {
g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
}
-void start_aad(int16 diaNr, int16 ssiNr) {
+void start_aad(int16 diaNr, int16 ssiNr, bool continueWhenSpeechEnds) {
if (ssiNr == 0) {
int16 x = _G(moveState)[P_CHEWY].Xypos[0] - _G(gameState).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
int16 y = _G(moveState)[P_CHEWY].Xypos[1] - _G(gameState).scrolly;
_G(atds)->set_split_win(0, x, y);
}
- _G(atds)->start_aad(diaNr);
+ _G(atds)->start_aad(diaNr, continueWhenSpeechEnds);
}
void startDialogCloseupWait(int16 diaNr) {
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index 13286b159ad..abae8c96f51 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -119,7 +119,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
// Room10::cut_serv
_G(atds)->print_aad(scrollx, scrolly);
if (frame == 31)
- start_aad(107, 0);
+ start_aad(107, 0, true);
break;
case FCUT_009:
case FCUT_010:
@@ -136,7 +136,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
if (num == FCUT_010) {
_G(atds)->print_aad(scrollx, scrolly);
if (frame == 43)
- start_aad(106, 0);
+ start_aad(106, 0, true);
}
break;
case FCUT_032:
@@ -162,13 +162,13 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
switch (frame) {
case 121:
- start_aad(599, -1);
+ start_aad(599, -1, true);
break;
case 247:
- start_aad(600, -1);
+ start_aad(600, -1, true);
break;
case 267:
- start_aad(601, 0);
+ start_aad(601, 0, true);
break;
case 297:
//_G(in)->_hotkey = 1;
More information about the Scummvm-git-logs
mailing list