[Scummvm-git-logs] scummvm master -> 9f90e6888b24333c04ea24c90006055ef5f6fac4
bluegr
noreply at scummvm.org
Sun Mar 20 23:33:07 UTC 2022
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fcd5122f68 CHEWY: Clean up defines
917fb1a3d3 CHEWY: Remove superfluous semicolons
a971cda7f5 CHEWY: Remove unused defines and add brackets to empty loops
9f90e6888b CHEWY: Remove dead code
Commit: fcd5122f68dda150032ec87622dcbfa24a7b3c6c
https://github.com/scummvm/scummvm/commit/fcd5122f68dda150032ec87622dcbfa24a7b3c6c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-21T01:32:46+02:00
Commit Message:
CHEWY: Clean up defines
Changed paths:
engines/chewy/data.cpp
engines/chewy/detail.cpp
engines/chewy/dialogs/files.cpp
engines/chewy/events.cpp
engines/chewy/gedclass.cpp
engines/chewy/gedclass.h
engines/chewy/io_game.h
engines/chewy/mouse.cpp
engines/chewy/mouse.h
engines/chewy/ngstypes.h
engines/chewy/rooms/room14.h
engines/chewy/rooms/room27.h
engines/chewy/rooms/room28.h
engines/chewy/timer.cpp
diff --git a/engines/chewy/data.cpp b/engines/chewy/data.cpp
index 940d3c40a57..80a5aa756bd 100644
--- a/engines/chewy/data.cpp
+++ b/engines/chewy/data.cpp
@@ -22,8 +22,7 @@
#include "common/debug.h"
#include "common/system.h"
#include "chewy/data.h"
-#include "chewy/chewy.h"
-#include "chewy/defines.h"
+#include "chewy/ngsdefs.h"
#include "chewy/globals.h"
namespace Chewy {
diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 95c0ebca78c..9822e3dbbba 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -21,6 +21,7 @@
#include "chewy/detail.h"
#include "chewy/globals.h"
+#include "chewy/ngsdefs.h"
#include "chewy/sound.h"
#include "chewy/resource.h"
@@ -501,8 +502,7 @@ void Detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end)
void Detail::startDetail(int16 nr, int16 rep, int16 reverse) {
if (nr != -1) {
- AniDetailInfo *adiptr;
- adiptr = &_rdi.Ainfo[nr];
+ AniDetailInfo *adiptr = &_rdi.Ainfo[nr];
if (rep)
adiptr->start_flag = rep;
else
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 9c70e0851a4..8ca9b265363 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -24,6 +24,7 @@
#include "chewy/dialogs/options.h"
#include "chewy/events.h"
#include "chewy/globals.h"
+#include "chewy/ngsdefs.h"
namespace Chewy {
namespace Dialogs {
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index 4e6308b6a1c..c188bd0c5aa 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -22,7 +22,7 @@
#include "common/system.h"
#include "chewy/events.h"
#include "chewy/globals.h"
-#include "chewy/timer.h"
+#include "chewy/ngsdefs.h"
namespace Chewy {
diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index a983a1072e4..da602089a1e 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -23,7 +23,6 @@
#include "chewy/chewy.h"
#include "chewy/globals.h"
#include "chewy/gedclass.h"
-#include "chewy/ngshext.h"
namespace Chewy {
diff --git a/engines/chewy/gedclass.h b/engines/chewy/gedclass.h
index c7f269092f4..9b29682a242 100644
--- a/engines/chewy/gedclass.h
+++ b/engines/chewy/gedclass.h
@@ -22,7 +22,6 @@
#ifndef CHEWY_GEDCLASS_H
#define CHEWY_GEDCLASS_H
-#include "common/stream.h"
#include "chewy/ngstypes.h"
namespace Chewy {
diff --git a/engines/chewy/io_game.h b/engines/chewy/io_game.h
index 36a20ebe2f2..056f979a88b 100644
--- a/engines/chewy/io_game.h
+++ b/engines/chewy/io_game.h
@@ -22,20 +22,13 @@
#ifndef CHEWY_IO_GAME_H
#define CHEWY_IO_GAME_H
-#include "chewy/mcga.h"
-#include "chewy/cursor.h"
-#include "chewy/ngstypes.h"
-
namespace Chewy {
#define IOG_END 1
#define USER_NAME 36
class IOGame {
-private:
char _fileFind[20][USER_NAME + 4];
-
-private:
int16 get_savegame_files();
public:
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index daf89694506..d71782e2490 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -23,6 +23,7 @@
#include "chewy/mouse.h"
#include "chewy/events.h"
#include "chewy/globals.h"
+#include "chewy/ngsdefs.h"
namespace Chewy {
diff --git a/engines/chewy/mouse.h b/engines/chewy/mouse.h
index c39a4c77921..528eb228dd6 100644
--- a/engines/chewy/mouse.h
+++ b/engines/chewy/mouse.h
@@ -22,7 +22,7 @@
#ifndef CHEWY_MOUSE_H
#define CHEWY_MOUSE_H
-#include "chewy/ngstypes.h"
+#include "common/keyboard.h"
namespace Chewy {
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index e6b7c737b87..3a91ade10f4 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -23,7 +23,6 @@
#define CHEWY_NGSTYPES_H
#include "graphics/screen.h"
-#include "chewy/ngsdefs.h"
namespace Chewy {
diff --git a/engines/chewy/rooms/room14.h b/engines/chewy/rooms/room14.h
index 2145ee54cc8..25d5970d78c 100644
--- a/engines/chewy/rooms/room14.h
+++ b/engines/chewy/rooms/room14.h
@@ -22,8 +22,6 @@
#ifndef CHEWY_ROOMS_ROOM14_H
#define CHEWY_ROOMS_ROOM14_H
-#include "chewy/ngsdefs.h"
-
namespace Chewy {
namespace Rooms {
diff --git a/engines/chewy/rooms/room27.h b/engines/chewy/rooms/room27.h
index 0aa572e2d42..00bcfba50c5 100644
--- a/engines/chewy/rooms/room27.h
+++ b/engines/chewy/rooms/room27.h
@@ -22,8 +22,6 @@
#ifndef CHEWY_ROOMS_ROOM27_H
#define CHEWY_ROOMS_ROOM27_H
-#include "chewy/room.h"
-
namespace Chewy {
namespace Rooms {
diff --git a/engines/chewy/rooms/room28.h b/engines/chewy/rooms/room28.h
index 19f4291271a..cdeb9137dbc 100644
--- a/engines/chewy/rooms/room28.h
+++ b/engines/chewy/rooms/room28.h
@@ -22,13 +22,10 @@
#ifndef CHEWY_ROOMS_ROOM28_H
#define CHEWY_ROOMS_ROOM28_H
-#include "chewy/room.h"
-
namespace Chewy {
namespace Rooms {
class Room28 {
-private:
static void haendler();
static void setup_func();
static void get_pump();
diff --git a/engines/chewy/timer.cpp b/engines/chewy/timer.cpp
index 0825cf30846..e1c7a8f1575 100644
--- a/engines/chewy/timer.cpp
+++ b/engines/chewy/timer.cpp
@@ -20,7 +20,6 @@
*/
#include "common/system.h"
-#include "common/textconsole.h"
#include "chewy/chewy.h"
#include "chewy/defines.h"
#include "chewy/globals.h"
Commit: 917fb1a3d3d60bc288f7ad6809bbb62151948145
https://github.com/scummvm/scummvm/commit/917fb1a3d3d60bc288f7ad6809bbb62151948145
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-21T01:32:46+02:00
Commit Message:
CHEWY: Remove superfluous semicolons
Changed paths:
engines/chewy/rooms/room39.cpp
engines/chewy/rooms/room58.cpp
engines/chewy/rooms/room65.cpp
engines/chewy/rooms/room68.cpp
engines/chewy/sprite.cpp
diff --git a/engines/chewy/rooms/room39.cpp b/engines/chewy/rooms/room39.cpp
index 9255d6af6b2..3519ef3e057 100644
--- a/engines/chewy/rooms/room39.cpp
+++ b/engines/chewy/rooms/room39.cpp
@@ -100,7 +100,7 @@ short Room39::use_howard() {
showCur();
_G(gameState).PersonGlobalDia[P_HOWARD] = 10012;
- _G(gameState).PersonDiaRoom[P_HOWARD] = true;;
+ _G(gameState).PersonDiaRoom[P_HOWARD] = true;
calc_person_dia(P_HOWARD);
if (_G(gameState).R41HowardDiaOK) {
diff --git a/engines/chewy/rooms/room58.cpp b/engines/chewy/rooms/room58.cpp
index 5930f67f8f4..7ced52ee9b2 100644
--- a/engines/chewy/rooms/room58.cpp
+++ b/engines/chewy/rooms/room58.cpp
@@ -51,7 +51,7 @@ void Room58::xit() {
void Room58::look_cut_mag(int16 r_nr) {
_G(gameState).R58TmpRoom = r_nr;
- _G(gameState).R58TmpRoom1 = _G(gameState)._personRoomNr[P_CHEWY];;
+ _G(gameState).R58TmpRoom1 = _G(gameState)._personRoomNr[P_CHEWY];
_G(gameState).R58TmpSx = _G(gameState).scrollx;
_G(gameState).R58TmpSy = _G(gameState).scrolly;
diff --git a/engines/chewy/rooms/room65.cpp b/engines/chewy/rooms/room65.cpp
index 6e1ec64990d..18afdcb9d3b 100644
--- a/engines/chewy/rooms/room65.cpp
+++ b/engines/chewy/rooms/room65.cpp
@@ -37,10 +37,10 @@ void Room65::entry() {
_G(r65tmp_scrolly) = _G(gameState).scrolly;
_G(gameState).scrollx = 0;
_G(gameState).scrolly = 0;
- _G(r65tmp_ch_x) = _G(spieler_vector)[P_CHEWY].Xypos[0];;
- _G(r65tmp_ch_y) = _G(spieler_vector)[P_CHEWY].Xypos[1];;
- _G(r65tmp_ho_x) = _G(spieler_vector)[P_HOWARD].Xypos[0];;
- _G(r65tmp_ho_y) = _G(spieler_vector)[P_HOWARD].Xypos[1];;
+ _G(r65tmp_ch_x) = _G(spieler_vector)[P_CHEWY].Xypos[0];
+ _G(r65tmp_ch_y) = _G(spieler_vector)[P_CHEWY].Xypos[1];
+ _G(r65tmp_ho_x) = _G(spieler_vector)[P_HOWARD].Xypos[0];
+ _G(r65tmp_ho_y) = _G(spieler_vector)[P_HOWARD].Xypos[1];
_G(spieler_vector)[P_CHEWY].Xypos[0] = 10;
_G(spieler_vector)[P_CHEWY].Xypos[1] = 80;
_G(spieler_vector)[P_HOWARD].Xypos[0] = 150;
diff --git a/engines/chewy/rooms/room68.cpp b/engines/chewy/rooms/room68.cpp
index ba89179428a..528721da2e7 100644
--- a/engines/chewy/rooms/room68.cpp
+++ b/engines/chewy/rooms/room68.cpp
@@ -227,7 +227,7 @@ void Room68::talk_keeper() {
startSetAILWait(15, 1, ANI_FRONT);
_G(det)->set_static_ani(16, -1);
showCur();
- int16 x = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(gameState).scrollx + _G(spieler_mi)[P_CHEWY].HotX;;
+ int16 x = _G(spieler_vector)[P_CHEWY].Xypos[0] - _G(gameState).scrollx + _G(spieler_mi)[P_CHEWY].HotX;
int16 y = _G(spieler_vector)[P_CHEWY].Xypos[1] - _G(gameState).scrolly;
_G(atds)->set_split_win(3, x, y);
startAdsWait(20);
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index c94eaa76abf..4305215e72e 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -661,9 +661,9 @@ void new_auto_line(int16 nr) {
_G(auto_mov_obj)[nr].XyzStart[0] = _G(auto_mov_obj)[nr].XyzEnd[0];
_G(auto_mov_obj)[nr].XyzStart[1] = _G(auto_mov_obj)[nr].XyzEnd[1];
_G(auto_mov_obj)[nr].XyzStart[2] = _G(auto_mov_obj)[nr].XyzEnd[2];
- _G(auto_mov_obj)[nr].XyzEnd[0] = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].EndXyz[0] ;
- _G(auto_mov_obj)[nr].XyzEnd[1] = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].EndXyz[1] ;;
- _G(auto_mov_obj)[nr].XyzEnd[2] = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].EndXyz[2] ;;
+ _G(auto_mov_obj)[nr].XyzEnd[0] = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].EndXyz[0];
+ _G(auto_mov_obj)[nr].XyzEnd[1] = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].EndXyz[1];
+ _G(auto_mov_obj)[nr].XyzEnd[2] = _G(mov_line)[nr][_G(auto_mov_vector)[nr].StNr - 1].EndXyz[2];
_G(mov)->get_mov_vector((int16 *)_G(auto_mov_obj)[nr].XyzStart,
_G(auto_mov_obj)[nr].Vorschub, &_G(auto_mov_vector)[nr]);
}
Commit: a971cda7f5b3a95b31fb1f14e936bb76324c3586
https://github.com/scummvm/scummvm/commit/a971cda7f5b3a95b31fb1f14e936bb76324c3586
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-21T01:32:46+02:00
Commit Message:
CHEWY: Remove unused defines and add brackets to empty loops
Changed paths:
engines/chewy/atds.cpp
engines/chewy/atds.h
engines/chewy/m_event.cpp
engines/chewy/main.cpp
engines/chewy/r_event.cpp
engines/chewy/sound_player.cpp
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index b019d131307..10275792cb1 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -26,13 +26,12 @@
#include "chewy/events.h"
#include "chewy/globals.h"
#include "chewy/main.h"
+#include "chewy/ngsdefs.h"
#include "chewy/sound.h"
#include "chewy/text.h"
namespace Chewy {
-#define MAX_DIALOG_DATA_SIZE 6 * 3 * 6
-
bool AtsTxtHeader::load(Common::SeekableReadStream *src) {
_txtNr = src->readUint16LE();
_aMov = src->readSint16LE();
@@ -1004,7 +1003,7 @@ void Atdsys::print_aad(int16 scrX, int16 scrY) {
} else {
if (_ssr->_next == false) {
++_aadv._strNr;
- while (*_aadv._ptr++ != ATDS_END_TEXT);
+ while (*_aadv._ptr++ != ATDS_END_TEXT) {}
int16 tmp_person = _aadv._strHeader->_akPerson;
int16 tmp_str_nr = _aadv._strNr;
@@ -1243,7 +1242,7 @@ void Atdsys::ads_search_block(int16 blockNr, char **ptr) {
*ptr = start_ptr;
} else {
start_ptr += 2 + sizeof(AadStrHeader);
- while (*start_ptr++ != ATDS_END_BLOCK);
+ while (*start_ptr++ != ATDS_END_BLOCK) {}
if (start_ptr[0] == ATDS_END &&
start_ptr[1] == ATDS_END) {
ende = true;
@@ -1262,7 +1261,7 @@ void Atdsys::ads_search_item(int16 itemNr, char **blkAdr) {
*blkAdr = start_ptr + 1;
} else {
start_ptr += 1 + sizeof(AadStrHeader);
- while (*start_ptr++ != ATDS_END_ENTRY);
+ while (*start_ptr++ != ATDS_END_ENTRY) {}
if (*start_ptr == ATDS_END_BLOCK) {
ende = true;
*blkAdr = nullptr;
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index f7d8b114fa3..134aca08ecd 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -324,7 +324,6 @@ private:
int16 _atdsPoolOff[MAX_HANDLE] = { 0 };
char *_atsMem = nullptr;
uint8 *_ats_sheader = nullptr;
- char *_atds_id_ptr = nullptr;
AadVar _aadv;
AtsVar _atsv;
AdsVar _adsv;
diff --git a/engines/chewy/m_event.cpp b/engines/chewy/m_event.cpp
index 9f94714ecd9..20787827483 100644
--- a/engines/chewy/m_event.cpp
+++ b/engines/chewy/m_event.cpp
@@ -190,7 +190,7 @@ void load_room_music(int16 room_nr) {
_G(sndPlayer)->setLoopMode(lp_mode);
if (ttp_index != _G(currentSong)) {
_G(sndPlayer)->stopMod();
- while (_G(sndPlayer)->musicPlaying());
+ while (_G(sndPlayer)->musicPlaying()) {}
memset(_G(Ci).MusicSlot, 0, MUSIC_SLOT_SIZE);
_G(mem)->file->selectPoolItem(_G(music_handle), _G(EndOfPool) - ttp_index);
_G(mem)->file->load_tmf(_G(music_handle), (TmfHeader *)_G(Ci).MusicSlot);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index bcade50d6e1..677108f09fa 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -31,7 +31,6 @@
namespace Chewy {
-#define AUSGANG_CHECK_PIX 8
#define SCROLL_LEFT 120
#define SCROLL_RIGHT SCREEN_WIDTH-SCROLL_LEFT
#define SCROLL_UP 80
diff --git a/engines/chewy/r_event.cpp b/engines/chewy/r_event.cpp
index ed2886b7683..e713dd5638e 100644
--- a/engines/chewy/r_event.cpp
+++ b/engines/chewy/r_event.cpp
@@ -33,11 +33,6 @@
namespace Chewy {
-//#define NEW_VIDEO_CODE 1
-
-#define STERNE_ANI 17
-#define TUER_ZU_ANI 3
-
void play_scene_ani(int16 nr, int16 mode) {
#define ROOM_1_1 101
#define ROOM_1_2 102
@@ -859,7 +854,7 @@ void flic_cut(int16 nr) {
_G(sndPlayer)->fadeOut(0);
_G(out)->ausblenden(1);
_G(out)->cls();
- while (_G(sndPlayer)->musicPlaying());
+ while (_G(sndPlayer)->musicPlaying()) {}
_G(sndPlayer)->setLoopMode(_G(gameState).soundLoopMode);
break;
@@ -879,7 +874,7 @@ void flic_cut(int16 nr) {
_G(sndPlayer)->fadeOut(0);
_G(out)->ausblenden(1);
_G(out)->cls();
- while (_G(sndPlayer)->musicPlaying() && !SHOULD_QUIT);
+ while (_G(sndPlayer)->musicPlaying() && !SHOULD_QUIT) {}
break;
case FCUT_065:
diff --git a/engines/chewy/sound_player.cpp b/engines/chewy/sound_player.cpp
index e3b31dba29d..a402bb4edbe 100644
--- a/engines/chewy/sound_player.cpp
+++ b/engines/chewy/sound_player.cpp
@@ -20,11 +20,10 @@
*/
#include "audio/audiostream.h"
-#include "audio/decoders/raw.h"
#include "chewy/chewy.h"
-#include "chewy/sound_player.h"
#include "chewy/globals.h"
-#include "chewy/ngshext.h"
+#include "chewy/ngsdefs.h"
+#include "chewy/sound_player.h"
#include "chewy/sound.h"
namespace Chewy {
@@ -183,12 +182,10 @@ void SoundPlayer::initMixMode() {
}
void SoundPlayer::playMod(TmfHeader *th) {
- char *tmp;
- int16 i;
ActiveSong = th;
- tmp = (char *)ActiveSong;
+ char *tmp = (char *)ActiveSong;
tmp += sizeof(TmfHeader);
- for (i = 0; i < 128; i++) {
+ for (int16 i = 0; i < 128; i++) {
Patterns[i] = tmp;
tmp += 1024;
}
@@ -275,8 +272,7 @@ int16 SoundPlayer::musicPlaying() {
}
void SoundPlayer::initNoteTable(uint16 sfreq) {
- float TimerFreq;
- TimerFreq = 7093789.2f;
+ float TimerFreq = 7093789.2f;
for (int j = 0; j < 16; j++) {
for (int i = 0; i < 48; i++)
RealFreq[(j * 48) + i] = (uint16)(TimerFreq / (float)(FreqTable[(j * 48) + i] << 1));
Commit: 9f90e6888b24333c04ea24c90006055ef5f6fac4
https://github.com/scummvm/scummvm/commit/9f90e6888b24333c04ea24c90006055ef5f6fac4
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-03-21T01:32:46+02:00
Commit Message:
CHEWY: Remove dead code
Changed paths:
engines/chewy/movclass.cpp
diff --git a/engines/chewy/movclass.cpp b/engines/chewy/movclass.cpp
index 757b7329b86..cb7b8899e3f 100644
--- a/engines/chewy/movclass.cpp
+++ b/engines/chewy/movclass.cpp
@@ -323,11 +323,9 @@ short MovClass::calc_go(int16 src_feld, int16 *dst_feld) {
if (om.Xyna[2][1] < 0) {
if (om.Xyna[2][0] < -1000) {
om.Xyna[2][0] += 1000;
- --tmpz;
}
} else if (om.Xyna[2][0] > 1000) {
om.Xyna[2][0] -= 1000;
- ++tmpz;
}
tmpz = 0;
More information about the Scummvm-git-logs
mailing list