[Scummvm-git-logs] scummvm master -> de8f7899020b9b706389b611ed57b0452c188a01
Strangerke
noreply at scummvm.org
Mon Jan 13 23:30:52 UTC 2025
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9cbdf48c73 GOT: Remove an unused function in object
de8f789902 GOT: Fix several CppCheck issues in move_patterns
Commit: 9cbdf48c73c8f830f99a669e378c22c5b29c9698
https://github.com/scummvm/scummvm/commit/9cbdf48c73c8f830f99a669e378c22c5b29c9698
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-14T00:30:28+01:00
Commit Message:
GOT: Remove an unused function in object
Changed paths:
engines/got/game/object.cpp
diff --git a/engines/got/game/object.cpp b/engines/got/game/object.cpp
index e2e6be81b8f..69cd88abe2e 100644
--- a/engines/got/game/object.cpp
+++ b/engines/got/game/object.cpp
@@ -265,39 +265,6 @@ int use_thunder(int flag) {
return 0;
}
-int use_hourglass(int flag) {
- int hour_time[] = {0, 60, 120, 180, 240, 300, 360, 420, 480,
- 510, 540, 570, 600, 630, 660, 690};
-
- if (_G(hourglass_flag)) {
- if ((int)_G(magic_cnt) > hour_time[_G(hourglass_flag)]) {
- _G(hourglass_flag++);
- if (_G(hourglass_flag) == 16) {
- _G(hourglass_flag) = 0;
- music_resume();
- }
- play_sound(WOOP, true);
- }
- return 1;
- }
-
- if (flag && _G(thor_info).magic > 29) {
- if (!_G(hourglass_flag)) {
- _G(magic_cnt) = 0;
- add_magic(-30);
- music_pause();
- play_sound(WOOP, true);
- _G(hourglass_flag) = 1;
- return 1;
- }
- } else {
- _G(hourglass_flag) = 0;
- if (flag)
- not_enough_magic();
- }
- return 0;
-}
-
int use_boots(int flag) {
if (flag) {
if (_G(thor_info).magic > 0) {
Commit: de8f7899020b9b706389b611ed57b0452c188a01
https://github.com/scummvm/scummvm/commit/de8f7899020b9b706389b611ed57b0452c188a01
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-14T00:30:45+01:00
Commit Message:
GOT: Fix several CppCheck issues in move_patterns
Changed paths:
engines/got/game/move_patterns.cpp
diff --git a/engines/got/game/move_patterns.cpp b/engines/got/game/move_patterns.cpp
index 75f049ecb85..469916ab608 100644
--- a/engines/got/game/move_patterns.cpp
+++ b/engines/got/game/move_patterns.cpp
@@ -1078,11 +1078,8 @@ int special_movement_ten(ACTOR *actr) {
if (_G(thunder_flag))
return 0;
- if (!actor_ctr) {
- actor_ctr = 10;
- actor_speaks(actr, 0 - actr->pass_value, 0);
- }
-
+ actor_ctr = 10;
+ actor_speaks(actr, 0 - actr->pass_value, 0);
return 0;
}
@@ -1093,10 +1090,10 @@ int special_movement_eleven(ACTOR *actr) {
return 0;
}
- int t = actr->type;
+ const int oldType = actr->type;
actr->type = 4;
actor_speaks(actr, 0, 0);
- actr->type = t;
+ actr->type = oldType;
actr->talk_counter = 10;
return 0;
@@ -1322,7 +1319,6 @@ int movement_five(ACTOR *actr) {
return d;
}
}
- y1 = actr->y;
} else {
if (yd) {
y1 += yd;
@@ -2140,8 +2136,8 @@ int movement_twentyeight(ACTOR *actr) {
actr->temp3 = 1;
}
} else {
- actr->frame_count--;
- if (actr->frame_count <= 0) {
+ const int fcount = actr->frame_count - 1;
+ if (fcount <= 0) {
actr->next--;
actr->frame_count = actr->frame_speed;
if (!actr->next) {
@@ -2149,7 +2145,8 @@ int movement_twentyeight(ACTOR *actr) {
actr->frame_speed = 4;
actr->i1 = g_events->getRandomNumber(60, 159);
}
- }
+ } else
+ actr->frame_count = fcount;
}
goto done;
}
More information about the Scummvm-git-logs
mailing list