[Scummvm-git-logs] scummvm master -> dcf1bf9be7762abd10f2f5a181415f0aee2de120
Strangerke
noreply at scummvm.org
Sat Dec 27 07:28:44 UTC 2025
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
affa224671 CHEWY: Some janitorial work
d8a9bf6102 CHEWY: Fix PVS Studio v730 in Detail constructor
dcf1bf9be7 CHEWY: rename constants, fix two PVS Studio V560 in detail.cpp
Commit: affa224671aa4f27fa0f2e0822cf51af431d2971
https://github.com/scummvm/scummvm/commit/affa224671aa4f27fa0f2e0822cf51af431d2971
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-12-27T08:23:30+01:00
Commit Message:
CHEWY: Some janitorial work
Changed paths:
engines/chewy/atds.h
engines/chewy/chewy.h
engines/chewy/events.h
engines/chewy/globals.h
engines/chewy/inits.cpp
engines/chewy/main.cpp
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 40efdf62153..5b563fb4663 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -282,16 +282,16 @@ private:
bool _continueWhenSpeechEnds = false;
SplitStringInit _ssi[AAD_MAX_PERSON] = {
- { 0, 100, 0 },
- { 0, 100, 0 },
- { 0, 100, 0 },
- { 0, 100, 0 },
- { 0, 100, 0 },
- { 0, 100, 0 },
- { 0, 100, 0 },
- { 0, 100, 0 },
- { 0, 100, 0 },
- { 0, 100, 0 },
+ { nullptr, 100, 0 },
+ { nullptr, 100, 0 },
+ { nullptr, 100, 0 },
+ { nullptr, 100, 0 },
+ { nullptr, 100, 0 },
+ { nullptr, 100, 0 },
+ { nullptr, 100, 0 },
+ { nullptr, 100, 0 },
+ { nullptr, 100, 0 },
+ { nullptr, 100, 0 },
};
char *_splitPtr[MAX_STR_SPLIT] = { nullptr };
diff --git a/engines/chewy/chewy.h b/engines/chewy/chewy.h
index bc978288704..fc656b1a3ca 100644
--- a/engines/chewy/chewy.h
+++ b/engines/chewy/chewy.h
@@ -116,8 +116,6 @@ public:
uint getRandomNumber(uint max) {
return _rnd.getRandomNumber(max);
}
-
- void playVideo(uint num);
};
extern ChewyEngine *g_engine;
diff --git a/engines/chewy/events.h b/engines/chewy/events.h
index 19bd7e73472..8b0ea56c704 100644
--- a/engines/chewy/events.h
+++ b/engines/chewy/events.h
@@ -58,7 +58,7 @@ private:
int16 _hotkey = Common::KEYCODE_INVALID;
/**
- * Checks for timer expiries
+ * Checks for timers' expiration
*/
void checkTimers();
diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h
index 0cca3566dd9..9ca4028c83a 100644
--- a/engines/chewy/globals.h
+++ b/engines/chewy/globals.h
@@ -349,7 +349,7 @@ void auto_scroll(int16 scrx, int16 scry);
int16 calc_mouse_mov_obj(int16 *auto_nr);
-void check_mouse_ausgang(int16 x, int16 y);
+void check_mouse_exit(int16 x, int16 y);
void calcExit(int16 x, int16 y);
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index d8bccfda4f0..00e3e59b162 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -115,7 +115,7 @@ void var_init() {
for (int16 i = 0; i < MAX_PERSON; i++) {
_G(PersonAni)[i] = -1;
- _G(PersonTaf)[i] = 0;
+ _G(PersonTaf)[i] = nullptr;
_G(spieler_mi)[i].Mode = false;
_G(ani_stand_flag)[i] = false;
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index ea9f34da8e9..f9d40ba0867 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -62,10 +62,9 @@ void game_main() {
(void)g_engine->loadGameState(saveSlot);
Dialogs::MainMenu::playGame();
return;
- } else {
- Dialogs::MainMenu::execute();
}
+ Dialogs::MainMenu::execute();
tidy();
}
@@ -162,7 +161,6 @@ void cursorChoice(int16 nr) {
_G(cur)->setAnimation(40, 40, delay);
break;
case CUR_USER:
- break;
default:
break;
}
@@ -472,7 +470,7 @@ void setupScreen(SetupScreenMode mode) {
} else {
kb_mov(1);
_G(det)->unfreezeAni();
- check_mouse_ausgang(g_events->_mousePos.x + _G(gameState).scrollx, g_events->_mousePos.y + _G(gameState).scrolly);
+ check_mouse_exit(g_events->_mousePos.x + _G(gameState).scrollx, g_events->_mousePos.y + _G(gameState).scrolly);
if (!_G(flags).SaveMenu)
calc_ani_timer();
@@ -1143,7 +1141,7 @@ bool autoMove(int16 movNr, int16 playerNum) {
if (_G(mov)->auto_go_status()) {
while (_G(mov)->auto_go_status()) {
if (SHOULD_QUIT)
- return 0;
+ return false;
if (g_events->getSwitchCode() == Common::KEYCODE_ESCAPE) {
if (_G(flags).ExitMov || _G(flags).BreakAMov) {
key = Common::KEYCODE_ESCAPE;
@@ -1611,7 +1609,7 @@ bool isCurInventory(int16 nr) {
return _G(cur)->getInventoryCursor() == nr;
}
-void check_mouse_ausgang(int16 x, int16 y) {
+void check_mouse_exit(int16 x, int16 y) {
if (_G(menu_item) == CUR_WALK) {
bool found = true;
int16 nr = _G(obj)->is_exit(x, y);
Commit: d8a9bf6102d3c5057a616b19eb3828e8c6f36b2c
https://github.com/scummvm/scummvm/commit/d8a9bf6102d3c5057a616b19eb3828e8c6f36b2c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-12-27T08:23:30+01:00
Commit Message:
CHEWY: Fix PVS Studio v730 in Detail constructor
Changed paths:
engines/chewy/detail.cpp
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index e16e0a99a3f..6fa7ea8a70f 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -152,6 +152,11 @@ Detail::Detail() {
for (int16 i = 0; i < (MAX_M_ITEMS - 1) << 2; i += 4)
_rdi.mvect[i] = -1;
+ for (int16 i = 0; i < 4; ++i)
+ _rdiDataHeader._id[i] = 0;
+
+ _rdiDataHeader._nr = -1;
+
_globalDelay = 0;
_aniFreezeflag = false;
_fullTaf = false;
Commit: dcf1bf9be7762abd10f2f5a181415f0aee2de120
https://github.com/scummvm/scummvm/commit/dcf1bf9be7762abd10f2f5a181415f0aee2de120
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-12-27T08:23:30+01:00
Commit Message:
CHEWY: rename constants, fix two PVS Studio V560 in detail.cpp
Changed paths:
engines/chewy/detail.cpp
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 6fa7ea8a70f..4a4d50bb60a 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -28,8 +28,8 @@
namespace Chewy {
-#define ON 1
-#define OFF 0
+#define ANI_ON 1
+#define ANI_OFF 0
bool RoomInfo::load(Common::SeekableReadStream *src) {
_roomNr = src->readByte();
@@ -165,11 +165,11 @@ Detail::Detail() {
for (int16 i = 0; i < (MAXDETAILS * MAX_SOUNDS); i++) {
_rdi.detailSfxIndex[i] = -1;
}
- _directTafAni = OFF;
+ _directTafAni = ANI_OFF;
}
Detail::~Detail() {
- _directTafAni = OFF;
+ _directTafAni = ANI_OFF;
}
void Detail::load_rdi(const char *fname_, int16 room_nr) {
@@ -381,7 +381,7 @@ void Detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
for (int16 i = start; (i <= end); i++) {
AniDetailInfo *adiptr = &_rdi.Ainfo[i];
- if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
+ if (adiptr->start_flag && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
int16 sprnr = adiptr->ani_count;
int16 *Cxy = _rdi.dptr->correction + sprnr * 2;
int16 kx = Cxy[0];
@@ -420,9 +420,8 @@ void Detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
--adiptr->ani_count;
else {
adiptr->ani_count = adiptr->end_ani;
- if ((adiptr->start_flag != 255) && (adiptr->start_flag > 0)) {
+ if (adiptr->start_flag != 255) {
--adiptr->start_flag;
-
}
}
}
@@ -435,7 +434,7 @@ void Detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
++adiptr->ani_count;
else {
adiptr->ani_count = adiptr->start_ani;
- if ((adiptr->start_flag != 255) && (adiptr->start_flag > 0)) {
+ if (adiptr->start_flag != 255) {
--adiptr->start_flag;
}
}
@@ -605,7 +604,7 @@ int16 Detail::mouse_on_detail(int16 mouse_x, int16 mouse_y, int16 scrx, int16 sc
void Detail::set_taf_ani_mem(byte *load_area) {
_tafLoadBuffer = load_area;
- _directTafAni = ON;
+ _directTafAni = ANI_ON;
}
void Detail::load_taf_ani_sprite(int16 nr) {
More information about the Scummvm-git-logs
mailing list